AWS code-library documentation change
Summary
Added documentation for 30+ new AWS DMS CLI commands including metadata model operations, data providers, instance profiles, migration projects, and security configurations.
Security assessment
The changes add security-related configurations in examples (SSL modes, certificate ARNs, non-public instances) but show no evidence of addressing specific vulnerabilities. Security documentation is added through examples of secure connection settings.
Diff
diff --git a/code-library/latest/ug/cli_2_database-migration-service_code_examples.md b/code-library/latest/ug/cli_2_database-migration-service_code_examples.md index 3ada31747..cb06bb557 100644 --- a//code-library/latest/ug/cli_2_database-migration-service_code_examples.md +++ b//code-library/latest/ug/cli_2_database-migration-service_code_examples.md @@ -51,0 +52,149 @@ For more information, see [Tagging Resources](https://docs.aws.amazon.com/dms/la +The following code example shows how to use `cancel-metadata-model-conversion`. + +**AWS CLI** + + +**To cancel a metadata model conversion** + +The following `cancel-metadata-model-conversion` example cancels a metadata model conversion operation. + + + aws dms cancel-metadata-model-conversion \ + --migration-project-identifier arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS \ + --request-identifier a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 + + +Output: + + + { + "Request": { + "Status": "CANCELING", + "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", + "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" + } + } + +For more information, see [Converting database schemas](https://docs.aws.amazon.com/dms/latest/userguide/schema-conversion-convert.html) in the _AWS Database Migration Service User Guide_. + + * For API details, see [CancelMetadataModelConversion](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dms/cancel-metadata-model-conversion.html) in _AWS CLI Command Reference_. + + + + +The following code example shows how to use `cancel-metadata-model-creation`. + +**AWS CLI** + + +**To cancel a metadata model creation** + +The following `cancel-metadata-model-creation` example cancels a metadata model creation operation. + + + aws dms cancel-metadata-model-creation \ + --migration-project-identifier arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS \ + --request-identifier a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 + + +Output: + + + { + "Request": { + "Status": "CANCELING", + "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", + "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" + } + } + +For more information, see [Creating statement metadata models](https://docs.aws.amazon.com/dms/latest/userguide/sc-metadata-model.html#sc-metadata-model-creation) in the _AWS Database Migration Service User Guide_. + + * For API details, see [CancelMetadataModelCreation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dms/cancel-metadata-model-creation.html) in _AWS CLI Command Reference_. + + + + +The following code example shows how to use `create-data-provider`. + +**AWS CLI** + + +**Example 1: To create a Microsoft SQL Server data provider** + +The following `create-data-provider` example creates a Microsoft SQL Server data provider. + + + aws dms create-data-provider \ + --data-provider-name example-data-provider \ + --engine sqlserver \ + --description "Example data provider for documentation" \ + --settings MicrosoftSqlServerSettings={ServerName=example-source-server.us-east-1.rds.amazonaws.com,Port=1433,DatabaseName=ExampleDatabase,SslMode=verify-full,CertificateArn=arn:aws:dms:us-east-1:123456789012:cert:EXAMPLEABCDEFGHIJKLMNOPQRS} + + +Output: + + + { + "DataProvider": { + "DataProviderName": "example-data-provider", + "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS", + "DataProviderCreationTime": "2026-01-09T12:30:00.000000+00:00", + "Description": "Example data provider for documentation", + "Engine": "sqlserver", + "Settings": { + "MicrosoftSqlServerSettings": { + "ServerName": "example-source-server.us-east-1.rds.amazonaws.com", + "Port": 1433, + "DatabaseName": "ExampleDatabase", + "SslMode": "verify-full", + "CertificateArn": "arn:aws:dms:us-east-1:123456789012:cert:EXAMPLEABCDEFGHIJKLMNOPQRS" + } + } + } + } + +For more information, see [Working with data providers](https://docs.aws.amazon.com/dms/latest/userguide/data-providers.html) in the _AWS Database Migration Service User Guide_. + +**Example 2: To create a virtual data provider** + +The following `create-data-provider` example creates a virtual data provider, which doesn't require a connection to the database. + + + aws dms create-data-provider \ + --data-provider-name example-virtual-data-provider \ + --engine aurora-postgresql \ + --description "Example data provider for documentation" \ + --virtual \ + --settings PostgreSqlSettings={ServerName=virtual,Port=5432,DatabaseName=virtual,SslMode=none} + + +Output: + + + { + "DataProvider": { + "DataProviderName": "example-virtual-data-provider", + "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS", + "DataProviderCreationTime": "2026-01-09T12:30:00.000000+00:00", + "Description": "Example data provider for documentation", + "Engine": "aurora-postgresql", + "Virtual": true, + "Settings": { + "PostgreSqlSettings": { + "ServerName": "virtual", + "Port": 5432, + "DatabaseName": "virtual", + "SslMode": "none" + } + } + } + } + +For more information, see [Working with virtual data providers](https://docs.aws.amazon.com/dms/latest/userguide/virtual-data-provider.html) in the _AWS Database Migration Service User Guide_. + + * For API details, see [CreateDataProvider](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dms/create-data-provider.html) in _AWS CLI Command Reference_. + + + + @@ -146,0 +296,108 @@ For more information, see [Working with Events and Notifications](https://docs.a +The following code example shows how to use `create-instance-profile`. + +**AWS CLI** + + +**To create an instance profile** + +The following `create-instance-profile` example creates an instance profile. + + + aws dms create-instance-profile \ + --instance-profile-name example-instance-profile \ + --description "Example instance profile for documentation" \ + --subnet-group-identifier example-replication-subnet-group \ + --vpc-security-groups "sg-0123456789abcdef0" \ + --kms-key-arn arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 \ + --network-type IPV4 \ + --no-publicly-accessible + + +Output: + + + { + "InstanceProfile": { + "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", + "KmsKeyArn": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", + "PubliclyAccessible": false, + "NetworkType": "IPV4", + "InstanceProfileName": "example-instance-profile", + "Description": "Example instance profile for documentation", + "InstanceProfileCreationTime": "2026-01-09T12:30:00.000000+00:00", + "SubnetGroupIdentifier": "example-replication-subnet-group", + "VpcSecurityGroups": [ + "sg-0123456789abcdef0" + ] + } + } + +For more information, see [Working with instance profiles](https://docs.aws.amazon.com/dms/latest/userguide/instance-profiles.html) in the _AWS Database Migration Service User Guide_. + + * For API details, see [CreateInstanceProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/dms/create-instance-profile.html) in _AWS CLI Command Reference_. + + +