createEndpoint method
- required String endpointIdentifier,
- required ReplicationEndpointTypeValue endpointType,
- required String engineName,
- String? certificateArn,
- String? databaseName,
- DmsTransferSettings? dmsTransferSettings,
- DocDbSettings? docDbSettings,
- DynamoDbSettings? dynamoDbSettings,
- ElasticsearchSettings? elasticsearchSettings,
- String? externalTableDefinition,
- String? extraConnectionAttributes,
- IBMDb2Settings? iBMDb2Settings,
- KafkaSettings? kafkaSettings,
- KinesisSettings? kinesisSettings,
- String? kmsKeyId,
- MicrosoftSQLServerSettings? microsoftSQLServerSettings,
- MongoDbSettings? mongoDbSettings,
- MySQLSettings? mySQLSettings,
- NeptuneSettings? neptuneSettings,
- OracleSettings? oracleSettings,
- String? password,
- int? port,
- PostgreSQLSettings? postgreSQLSettings,
- RedshiftSettings? redshiftSettings,
- String? resourceIdentifier,
- S3Settings? s3Settings,
- String? serverName,
- String? serviceAccessRoleArn,
- DmsSslModeValue? sslMode,
- SybaseSettings? sybaseSettings,
- List<
Tag> ? tags, - String? username,
Creates an endpoint using the provided settings.
May throw KMSKeyNotAccessibleFault. May throw ResourceAlreadyExistsFault. May throw ResourceQuotaExceededFault. May throw InvalidResourceStateFault. May throw ResourceNotFoundFault. May throw AccessDeniedFault. May throw S3AccessDeniedFault.
Parameter endpointIdentifier
:
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.
Parameter endpointType
:
The type of endpoint. Valid values are source
and
target
.
Parameter engineName
:
The type of engine for the endpoint. Valid values, depending on the
EndpointType
value, include "mysql"
,
"oracle"
, "postgres"
, "mariadb"
,
"aurora"
, "aurora-postgresql"
,
"redshift"
, "s3"
, "db2"
,
"azuredb"
, "sybase"
, "dynamodb"
,
"mongodb"
, "kinesis"
, "kafka"
,
"elasticsearch"
, "docdb"
,
"sqlserver"
, and "neptune"
.
Parameter certificateArn
:
The Amazon Resource Name (ARN) for the certificate.
Parameter databaseName
:
The name of the endpoint database.
Parameter dmsTransferSettings
:
The settings in JSON format for the DMS transfer type of source endpoint.
Possible settings include the following:
-
ServiceAccessRoleArn
- The IAM role that has permission to access the Amazon S3 bucket. -
BucketName
- The name of the S3 bucket to use. -
CompressionType
- An optional parameter to use GZIP to compress the target files. To use GZIP, set this value toNONE
(the default). To keep the files uncompressed, don't use this value.
ServiceAccessRoleArn=string,BucketName=string,CompressionType=string
JSON syntax for these settings is as follows: {
"ServiceAccessRoleArn": "string", "BucketName": "string",
"CompressionType": "none"|"gzip" }
Parameter dynamoDbSettings
:
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 in the AWS Database
Migration Service User Guide.
Parameter elasticsearchSettings
:
Settings in JSON format for the target Elasticsearch endpoint. For more
information about the available settings, see Extra
Connection Attributes When Using Elasticsearch as a Target for AWS DMS
in the AWS Database Migration Service User Guide.
Parameter externalTableDefinition
:
The external table definition.
Parameter extraConnectionAttributes
:
Additional attributes associated with the connection. Each attribute is
specified as a name-value pair associated by an equal sign (=). Multiple
attributes are separated by a semicolon (;) with no additional white
space. For information on the attributes available for connecting your
source or target endpoint, see Working
with AWS DMS Endpoints in the AWS Database Migration Service User
Guide.
Parameter iBMDb2Settings
:
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 AWS DMS in
the AWS Database Migration Service User Guide.
Parameter kafkaSettings
:
Settings in JSON format for the target Apache Kafka endpoint. For more
information about the available settings, see Using
Apache Kafka as a Target for AWS Database Migration Service in the
AWS Database Migration Service User Guide.
Parameter kinesisSettings
:
Settings in JSON format for the target endpoint for Amazon Kinesis Data
Streams. For more information about the available settings, see Using
Amazon Kinesis Data Streams as a Target for AWS Database Migration
Service in the AWS Database Migration Service User Guide.
Parameter kmsKeyId
:
An AWS KMS key identifier that is used to encrypt the connection
parameters for the endpoint.
If you don't specify a value for the KmsKeyId
parameter, then
AWS DMS uses your default encryption key.
AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS Region.
Parameter microsoftSQLServerSettings
:
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 AWS DMS
and
Extra connection attributes when using SQL Server as a target for AWS
DMS in the AWS Database Migration Service User Guide.
Parameter mongoDbSettings
:
Settings in JSON format for the source MongoDB endpoint. For more
information about the available settings, see Using
MongoDB as a Target for AWS Database Migration Service in the AWS
Database Migration Service User Guide.
Parameter mySQLSettings
:
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 AWS DMS and Extra
connection attributes when using a MySQL-compatible database as a target
for AWS DMS in the AWS Database Migration Service User Guide.
Parameter neptuneSettings
:
Settings in JSON format for the target Amazon Neptune endpoint. For more
information about the available settings, see Specifying
Endpoint Settings for Amazon Neptune as a Target in the AWS
Database Migration Service User Guide.
Parameter oracleSettings
:
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 AWS DMS and
Extra connection attributes when using Oracle as a target for AWS DMS
in the AWS Database Migration Service User Guide.
Parameter password
:
The password to be used to log in to the endpoint database.
Parameter port
:
The port used by the endpoint database.
Parameter postgreSQLSettings
:
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 AWS DMS
and
Extra connection attributes when using PostgreSQL as a target for AWS
DMS in the AWS Database Migration Service User Guide.
Parameter resourceIdentifier
:
A friendly name for the resource identifier at the end of the
EndpointArn
response parameter that is returned in the
created Endpoint
object. The value for this parameter can
have up to 31 characters. It can contain only ASCII letters, digits, and
hyphen ('-'). Also, it can't end with a hyphen or contain two consecutive
hyphens, and can only begin with a letter, such as
Example-App-ARN1
. For example, this value might result in the
EndpointArn
value
arn:aws:dms:eu-west-1:012345678901:rep:Example-App-ARN1
. If
you don't specify a ResourceIdentifier
value, AWS DMS
generates a default identifier value for the end of
EndpointArn
.
Parameter s3Settings
:
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 AWS DMS in
the AWS Database Migration Service User Guide.
Parameter serverName
:
The name of the server where the endpoint database resides.
Parameter serviceAccessRoleArn
:
The Amazon Resource Name (ARN) for the service access role that you want
to use to create the endpoint.
Parameter sslMode
:
The Secure Sockets Layer (SSL) mode to use for the SSL connection. The
default is none
Parameter sybaseSettings
:
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 AWS DMS and
Extra
connection attributes when using SAP ASE as a target for AWS DMS in
the AWS Database Migration Service User Guide.
Parameter tags
:
One or more tags to be assigned to the endpoint.
Parameter username
:
The user name to be used to log in to the endpoint database.
Implementation
Future<CreateEndpointResponse> createEndpoint({
required String endpointIdentifier,
required ReplicationEndpointTypeValue endpointType,
required String engineName,
String? certificateArn,
String? databaseName,
DmsTransferSettings? dmsTransferSettings,
DocDbSettings? docDbSettings,
DynamoDbSettings? dynamoDbSettings,
ElasticsearchSettings? elasticsearchSettings,
String? externalTableDefinition,
String? extraConnectionAttributes,
IBMDb2Settings? iBMDb2Settings,
KafkaSettings? kafkaSettings,
KinesisSettings? kinesisSettings,
String? kmsKeyId,
MicrosoftSQLServerSettings? microsoftSQLServerSettings,
MongoDbSettings? mongoDbSettings,
MySQLSettings? mySQLSettings,
NeptuneSettings? neptuneSettings,
OracleSettings? oracleSettings,
String? password,
int? port,
PostgreSQLSettings? postgreSQLSettings,
RedshiftSettings? redshiftSettings,
String? resourceIdentifier,
S3Settings? s3Settings,
String? serverName,
String? serviceAccessRoleArn,
DmsSslModeValue? sslMode,
SybaseSettings? sybaseSettings,
List<Tag>? tags,
String? username,
}) async {
ArgumentError.checkNotNull(endpointIdentifier, 'endpointIdentifier');
ArgumentError.checkNotNull(endpointType, 'endpointType');
ArgumentError.checkNotNull(engineName, 'engineName');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.CreateEndpoint'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'EndpointIdentifier': endpointIdentifier,
'EndpointType': endpointType.toValue(),
'EngineName': engineName,
if (certificateArn != null) 'CertificateArn': certificateArn,
if (databaseName != null) 'DatabaseName': databaseName,
if (dmsTransferSettings != null)
'DmsTransferSettings': dmsTransferSettings,
if (docDbSettings != null) 'DocDbSettings': docDbSettings,
if (dynamoDbSettings != null) 'DynamoDbSettings': dynamoDbSettings,
if (elasticsearchSettings != null)
'ElasticsearchSettings': elasticsearchSettings,
if (externalTableDefinition != null)
'ExternalTableDefinition': externalTableDefinition,
if (extraConnectionAttributes != null)
'ExtraConnectionAttributes': extraConnectionAttributes,
if (iBMDb2Settings != null) 'IBMDb2Settings': iBMDb2Settings,
if (kafkaSettings != null) 'KafkaSettings': kafkaSettings,
if (kinesisSettings != null) 'KinesisSettings': kinesisSettings,
if (kmsKeyId != null) 'KmsKeyId': kmsKeyId,
if (microsoftSQLServerSettings != null)
'MicrosoftSQLServerSettings': microsoftSQLServerSettings,
if (mongoDbSettings != null) 'MongoDbSettings': mongoDbSettings,
if (mySQLSettings != null) 'MySQLSettings': mySQLSettings,
if (neptuneSettings != null) 'NeptuneSettings': neptuneSettings,
if (oracleSettings != null) 'OracleSettings': oracleSettings,
if (password != null) 'Password': password,
if (port != null) 'Port': port,
if (postgreSQLSettings != null)
'PostgreSQLSettings': postgreSQLSettings,
if (redshiftSettings != null) 'RedshiftSettings': redshiftSettings,
if (resourceIdentifier != null)
'ResourceIdentifier': resourceIdentifier,
if (s3Settings != null) 'S3Settings': s3Settings,
if (serverName != null) 'ServerName': serverName,
if (serviceAccessRoleArn != null)
'ServiceAccessRoleArn': serviceAccessRoleArn,
if (sslMode != null) 'SslMode': sslMode.toValue(),
if (sybaseSettings != null) 'SybaseSettings': sybaseSettings,
if (tags != null) 'Tags': tags,
if (username != null) 'Username': username,
},
);
return CreateEndpointResponse.fromJson(jsonResponse.body);
}