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