1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321
|
// Code generated by smithy-go-codegen DO NOT EDIT.
package databasemigrationservice
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/databasemigrationservice/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Modifies the specified endpoint. For a MySQL source or target endpoint, don't
// explicitly specify the database using the DatabaseName request parameter on the
// ModifyEndpoint API call. Specifying DatabaseName when you modify a MySQL
// endpoint replicates all the task tables to this single database. For MySQL
// endpoints, you specify the database only when you specify the schema in the
// table-mapping rules of the DMS task.
func (c *Client) ModifyEndpoint(ctx context.Context, params *ModifyEndpointInput, optFns ...func(*Options)) (*ModifyEndpointOutput, error) {
if params == nil {
params = &ModifyEndpointInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyEndpoint", params, optFns, c.addOperationModifyEndpointMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyEndpointOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyEndpointInput struct {
// The Amazon Resource Name (ARN) string that uniquely identifies the endpoint.
//
// This member is required.
EndpointArn *string
// The Amazon Resource Name (ARN) of the certificate used for SSL connection.
CertificateArn *string
// The name of the endpoint database. For a MySQL source or target endpoint, do
// not specify DatabaseName.
DatabaseName *string
// The settings in JSON format for the DMS transfer type of source endpoint.
// Attributes include the following:
// - serviceAccessRoleArn - The Amazon Resource Name (ARN) used by the service
// access IAM role. The role must allow the iam:PassRole action.
// - BucketName - The name of the S3 bucket to use.
// Shorthand syntax for these settings is as follows: ServiceAccessRoleArn=string
// ,BucketName=string JSON syntax for these settings is as follows: {
// "ServiceAccessRoleArn": "string", "BucketName": "string"}
DmsTransferSettings *types.DmsTransferSettings
// Settings in JSON format for the source DocumentDB endpoint. For more
// information about the available settings, see the configuration properties
// section in Using DocumentDB as a Target for Database Migration Service (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.DocumentDB.html)
// in the Database Migration Service User Guide.
DocDbSettings *types.DocDbSettings
// Settings in JSON format for the target Amazon DynamoDB endpoint. For
// information about other available settings, see Using Object Mapping to Migrate
// Data to DynamoDB (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html#CHAP_Target.DynamoDB.ObjectMapping)
// in the Database Migration Service User Guide.
DynamoDbSettings *types.DynamoDbSettings
// Settings in JSON format for the target OpenSearch endpoint. For more
// information about the available settings, see Extra Connection Attributes When
// Using OpenSearch as a Target for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Elasticsearch.html#CHAP_Target.Elasticsearch.Configuration)
// in the Database Migration Service User Guide.
ElasticsearchSettings *types.ElasticsearchSettings
// The database endpoint identifier. Identifiers must begin with a letter and must
// contain only ASCII letters, digits, and hyphens. They can't end with a hyphen or
// contain two consecutive hyphens.
EndpointIdentifier *string
// The type of endpoint. Valid values are source and target .
EndpointType types.ReplicationEndpointTypeValue
// The database engine name. Valid values, depending on the EndpointType, include
// "mysql" , "oracle" , "postgres" , "mariadb" , "aurora" , "aurora-postgresql" ,
// "redshift" , "s3" , "db2" , "db2-zos" , "azuredb" , "sybase" , "dynamodb" ,
// "mongodb" , "kinesis" , "kafka" , "elasticsearch" , "documentdb" , "sqlserver" ,
// "neptune" , and "babelfish" .
EngineName *string
// If this attribute is Y, the current call to ModifyEndpoint replaces all
// existing endpoint settings with the exact settings that you specify in this
// call. If this attribute is N, the current call to ModifyEndpoint does two
// things:
// - It replaces any endpoint settings that already exist with new values, for
// settings with the same names.
// - It creates new endpoint settings that you specify in the call, for settings
// with different names.
// For example, if you call create-endpoint ... --endpoint-settings '{"a":1}' ... ,
// the endpoint has the following endpoint settings: '{"a":1}' . If you then call
// modify-endpoint ... --endpoint-settings '{"b":2}' ... for the same endpoint, the
// endpoint has the following settings: '{"a":1,"b":2}' . However, suppose that you
// follow this with a call to modify-endpoint ... --endpoint-settings '{"b":2}'
// --exact-settings ... for that same endpoint again. Then the endpoint has the
// following settings: '{"b":2}' . All existing settings are replaced with the
// exact settings that you specify.
ExactSettings *bool
// The external table definition.
ExternalTableDefinition *string
// Additional attributes associated with the connection. To reset this parameter,
// pass the empty string ("") as an argument.
ExtraConnectionAttributes *string
// Settings in JSON format for the source GCP MySQL endpoint.
GcpMySQLSettings *types.GcpMySQLSettings
// Settings in JSON format for the source IBM Db2 LUW endpoint. For information
// about other available settings, see Extra connection attributes when using Db2
// LUW as a source for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.DB2.html#CHAP_Source.DB2.ConnectionAttrib)
// in the Database Migration Service User Guide.
IBMDb2Settings *types.IBMDb2Settings
// Settings in JSON format for the target Apache Kafka endpoint. For more
// information about the available settings, see Using object mapping to migrate
// data to a Kafka topic (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kafka.html#CHAP_Target.Kafka.ObjectMapping)
// in the Database Migration Service User Guide.
KafkaSettings *types.KafkaSettings
// Settings in JSON format for the target endpoint for Amazon Kinesis Data
// Streams. For more information about the available settings, see Using object
// mapping to migrate data to a Kinesis data stream (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping)
// in the Database Migration Service User Guide.
KinesisSettings *types.KinesisSettings
// Settings in JSON format for the source and target Microsoft SQL Server
// endpoint. For information about other available settings, see Extra connection
// attributes when using SQL Server as a source for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SQLServer.html#CHAP_Source.SQLServer.ConnectionAttrib)
// and Extra connection attributes when using SQL Server as a target for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SQLServer.html#CHAP_Target.SQLServer.ConnectionAttrib)
// in the Database Migration Service User Guide.
MicrosoftSQLServerSettings *types.MicrosoftSQLServerSettings
// Settings in JSON format for the source MongoDB endpoint. For more information
// about the available settings, see the configuration properties section in
// Endpoint configuration settings when using MongoDB as a source for Database
// Migration Service (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html#CHAP_Source.MongoDB.Configuration)
// in the Database Migration Service User Guide.
MongoDbSettings *types.MongoDbSettings
// Settings in JSON format for the source and target MySQL endpoint. For
// information about other available settings, see Extra connection attributes
// when using MySQL as a source for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MySQL.html#CHAP_Source.MySQL.ConnectionAttrib)
// and Extra connection attributes when using a MySQL-compatible database as a
// target for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.MySQL.html#CHAP_Target.MySQL.ConnectionAttrib)
// in the Database Migration Service User Guide.
MySQLSettings *types.MySQLSettings
// Settings in JSON format for the target Amazon Neptune endpoint. For more
// information about the available settings, see Specifying graph-mapping rules
// using Gremlin and R2RML for Amazon Neptune as a target (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.EndpointSettings)
// in the Database Migration Service User Guide.
NeptuneSettings *types.NeptuneSettings
// Settings in JSON format for the source and target Oracle endpoint. For
// information about other available settings, see Extra connection attributes
// when using Oracle as a source for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.Oracle.html#CHAP_Source.Oracle.ConnectionAttrib)
// and Extra connection attributes when using Oracle as a target for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Oracle.html#CHAP_Target.Oracle.ConnectionAttrib)
// in the Database Migration Service User Guide.
OracleSettings *types.OracleSettings
// The password to be used to login to the endpoint database.
Password *string
// The port used by the endpoint database.
Port *int32
// Settings in JSON format for the source and target PostgreSQL endpoint. For
// information about other available settings, see Extra connection attributes
// when using PostgreSQL as a source for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html#CHAP_Source.PostgreSQL.ConnectionAttrib)
// and Extra connection attributes when using PostgreSQL as a target for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html#CHAP_Target.PostgreSQL.ConnectionAttrib)
// in the Database Migration Service User Guide.
PostgreSQLSettings *types.PostgreSQLSettings
// Settings in JSON format for the Redis target endpoint.
RedisSettings *types.RedisSettings
// Provides information that defines an Amazon Redshift endpoint.
RedshiftSettings *types.RedshiftSettings
// Settings in JSON format for the target Amazon S3 endpoint. For more information
// about the available settings, see Extra Connection Attributes When Using Amazon
// S3 as a Target for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.Configuring)
// in the Database Migration Service User Guide.
S3Settings *types.S3Settings
// The name of the server where the endpoint database resides.
ServerName *string
// The Amazon Resource Name (ARN) for the IAM role you want to use to modify the
// endpoint. The role must allow the iam:PassRole action.
ServiceAccessRoleArn *string
// The SSL mode used to connect to the endpoint. The default value is none .
SslMode types.DmsSslModeValue
// Settings in JSON format for the source and target SAP ASE endpoint. For
// information about other available settings, see Extra connection attributes
// when using SAP ASE as a source for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.SAP.html#CHAP_Source.SAP.ConnectionAttrib)
// and Extra connection attributes when using SAP ASE as a target for DMS (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.SAP.html#CHAP_Target.SAP.ConnectionAttrib)
// in the Database Migration Service User Guide.
SybaseSettings *types.SybaseSettings
// Settings in JSON format for the target Amazon Timestream endpoint.
TimestreamSettings *types.TimestreamSettings
// The user name to be used to login to the endpoint database.
Username *string
noSmithyDocumentSerde
}
type ModifyEndpointOutput struct {
// The modified endpoint.
Endpoint *types.Endpoint
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationModifyEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) {
if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
return err
}
err = stack.Serialize.Add(&awsAwsjson11_serializeOpModifyEndpoint{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpModifyEndpoint{}, middleware.After)
if err != nil {
return err
}
if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyEndpoint"); err != nil {
return fmt.Errorf("add protocol finalizers: %v", err)
}
if err = addlegacyEndpointContextSetter(stack, options); err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack, options); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
return err
}
if err = addOpModifyEndpointValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyEndpoint(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.AddRecursionDetection(stack); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
if err = addDisableHTTPSMiddleware(stack, options); err != nil {
return err
}
return nil
}
func newServiceMetadataMiddleware_opModifyEndpoint(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
OperationName: "ModifyEndpoint",
}
}
|