create_endpoint
async
¶
create_endpoint(
endpoint_identifier: String,
endpoint_type: ReplicationEndpointTypeValue,
engine_name: String,
*,
config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
username: Optional[String] = None,
password: Optional[SecretString] = None,
server_name: Optional[String] = None,
port: Optional[IntegerOptional] = None,
database_name: Optional[String] = None,
extra_connection_attributes: Optional[String] = None,
kms_key_id: Optional[String] = None,
tags: Optional[TagList] = None,
certificate_arn: Optional[String] = None,
ssl_mode: Optional[DmsSslModeValue] = None,
service_access_role_arn: Optional[String] = None,
external_table_definition: Optional[String] = None,
dynamo_db_settings: Optional[DynamoDbSettings] = None,
s3_settings: Optional[S3Settings] = None,
dms_transfer_settings: Optional[DmsTransferSettings] = None,
mongo_db_settings: Optional[MongoDbSettings] = None,
kinesis_settings: Optional[KinesisSettings] = None,
kafka_settings: Optional[KafkaSettings] = None,
elasticsearch_settings: Optional[ElasticsearchSettings] = None,
neptune_settings: Optional[NeptuneSettings] = None,
redshift_settings: Optional[RedshiftSettings] = None,
postgre_sql_settings: Optional[PostgreSQLSettings] = None,
my_sql_settings: Optional[MySQLSettings] = None,
oracle_settings: Optional[OracleSettings] = None,
sybase_settings: Optional[SybaseSettings] = None,
microsoft_sql_server_settings: Optional[MicrosoftSQLServerSettings] = None,
ibm_db2_settings: Optional[IBMDb2Settings] = None,
resource_identifier: Optional[String] = None,
doc_db_settings: Optional[DocDbSettings] = None,
redis_settings: Optional[RedisSettings] = None,
gcp_my_sql_settings: Optional[GcpMySQLSettings] = None,
timestream_settings: Optional[TimestreamSettings] = None,
) -> CreateEndpointResponse
Creates an endpoint using the provided settings.
For a MySQL source or target endpoint, don't explicitly specify the database using the DatabaseName request parameter on the CreateEndpoint API call. Specifying DatabaseName when you create 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.
Parameters:
-
endpoint_identifier(String) –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.
-
endpoint_type(ReplicationEndpointTypeValue) –The type of endpoint. Valid values are
sourceandtarget. -
engine_name(String) –The type of engine for the endpoint. Valid values, depending on the
EndpointTypevalue, include"mysql","oracle","postgres","mariadb","aurora","aurora-postgresql","opensearch","redshift","s3","db2","db2-zos","azuredb","sybase","dynamodb","mongodb","kinesis","kafka","elasticsearch","docdb","sqlserver","neptune","babelfish",redshift-serverless,aurora-serverless,aurora-postgresql-serverless,gcp-mysql,azure-sql-managed-instance,redis,dms-transfer. -
username(Optional[String], default:None) –The user name to be used to log in to the endpoint database.
-
password(Optional[SecretString], default:None) –The password to be used to log in to the endpoint database.
-
server_name(Optional[String], default:None) –The name of the server where the endpoint database resides.
-
port(Optional[IntegerOptional], default:None) –The port used by the endpoint database.
-
database_name(Optional[String], default:None) –The name of the endpoint database. For a MySQL source or target endpoint, do not specify DatabaseName. To migrate to a specific database, use this setting and
targetDbType. -
extra_connection_attributes(Optional[String], default:None) –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 DMS Endpoints in the Database Migration Service User Guide.
-
kms_key_id(Optional[String], default:None) –An KMS key identifier that is used to encrypt the connection parameters for the endpoint.
If you don't specify a value for the
KmsKeyIdparameter, then DMS uses your default encryption key.KMS creates the default encryption key for your Amazon Web Services account. Your Amazon Web Services account has a different default encryption key for each Amazon Web Services Region.
-
tags(Optional[TagList], default:None) –One or more tags to be assigned to the endpoint.
-
certificate_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) for the certificate.
-
ssl_mode(Optional[DmsSslModeValue], default:None) –The Secure Sockets Layer (SSL) mode to use for the SSL connection. The default is
none -
service_access_role_arn(Optional[String], default:None) –The Amazon Resource Name (ARN) for the service access role that you want to use to create the endpoint. The role must allow the
iam:PassRoleaction. -
external_table_definition(Optional[String], default:None) –The external table definition.
-
dynamo_db_settings(Optional[DynamoDbSettings], default:None) –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 Database Migration Service User Guide.
-
s3_settings(Optional[S3Settings], default:None) –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 in the Database Migration Service User Guide.
-
dms_transfer_settings(Optional[DmsTransferSettings], default:None) –The settings in JSON format for the DMS transfer type of source endpoint.
Possible settings include the following:
-
ServiceAccessRoleArn- The Amazon Resource Name (ARN) used by the service access IAM role. The role must allow theiam:PassRoleaction. -
BucketName- The name of the S3 bucket to use.
Shorthand syntax for these settings is as follows:
ServiceAccessRoleArn=string,BucketName=stringJSON syntax for these settings is as follows:
{ "ServiceAccessRoleArn": "string", "BucketName": "string", } -
-
mongo_db_settings(Optional[MongoDbSettings], default:None) –Settings in JSON format for the source MongoDB endpoint. For more information about the available settings, see Endpoint configuration settings when using MongoDB as a source for Database Migration Service in the Database Migration Service User Guide.
-
kinesis_settings(Optional[KinesisSettings], default:None) –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 in the Database Migration Service User Guide.
-
kafka_settings(Optional[KafkaSettings], default:None) –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 in the Database Migration Service User Guide.
-
elasticsearch_settings(Optional[ElasticsearchSettings], default:None) –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 in the Database Migration Service User Guide.
-
neptune_settings(Optional[NeptuneSettings], default:None) –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 in the Database Migration Service User Guide.
-
postgre_sql_settings(Optional[PostgreSQLSettings], default:None) –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 and Extra connection attributes when using PostgreSQL as a target for DMS in the Database Migration Service User Guide.
-
my_sql_settings(Optional[MySQLSettings], default:None) –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 and Extra connection attributes when using a MySQL-compatible database as a target for DMS in the Database Migration Service User Guide.
-
oracle_settings(Optional[OracleSettings], default:None) –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 and Extra connection attributes when using Oracle as a target for DMS in the Database Migration Service User Guide.
-
sybase_settings(Optional[SybaseSettings], default:None) –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 and Extra connection attributes when using SAP ASE as a target for DMS in the Database Migration Service User Guide.
-
microsoft_sql_server_settings(Optional[MicrosoftSQLServerSettings], default:None) –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 and Extra connection attributes when using SQL Server as a target for DMS in the Database Migration Service User Guide.
-
ibm_db2_settings(Optional[IBMDb2Settings], default:None) –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 in the Database Migration Service User Guide.
-
resource_identifier(Optional[String], default:None) –A friendly name for the resource identifier at the end of the
EndpointArnresponse parameter that is returned in the createdEndpointobject. 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 asExample-App-ARN1. For example, this value might result in theEndpointArnvaluearn:aws:dms:eu-west-1:012345678901:rep:Example-App-ARN1. If you don't specify aResourceIdentifiervalue, DMS generates a default identifier value for the end ofEndpointArn. -
redis_settings(Optional[RedisSettings], default:None) –Settings in JSON format for the target Redis endpoint.
-
gcp_my_sql_settings(Optional[GcpMySQLSettings], default:None) –Settings in JSON format for the source GCP MySQL endpoint.
-
timestream_settings(Optional[TimestreamSettings], default:None) –Settings in JSON format for the target Amazon Timestream endpoint.
Raises:
-
AccessDeniedFault–DMS was denied access to the endpoint. Check that the role is correctly configured.
-
InvalidResourceStateFault–The resource is in a state that prevents it from being used for database migration.
-
KMSKeyNotAccessibleFault–DMS cannot access the KMS key.
-
ResourceAlreadyExistsFault–The resource you are attempting to create already exists.
-
ResourceNotFoundFault–The resource could not be found.
-
ResourceQuotaExceededFault–The quota for this resource quota has been exceeded.
-
S3AccessDeniedFault–Insufficient privileges are preventing access to an Amazon S3 object.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Create endpoint Creates an endpoint using the provided settings.
>>> await client.create_endpoint(endpoint_identifier='test-endpoint-1', endpoint_type='source', engine_name='mysql', username='username', password='pasword', server_name='mydb.cx1llnox7iyx.us-west-2.rds.amazonaws.com', port=3306, database_name='testdb', extra_connection_attributes='', kms_key_id='arn:aws:kms:us-east-1:123456789012:key/4c1731d6-5435-ed4d-be13-d53411a7cfbd', tags=[{'Key': 'Acount', 'Value': '143327655'}], certificate_arn='', ssl_mode='require')
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 | |