Doc AWS SDK Examples GitHub リポジトリには、他にも SDK の例があります。 AWS
翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
AWS DMS を使用した の例 AWS CLI
次のコード例は、 AWS Command Line Interface で を使用してアクションを実行し、一般的なシナリオを実装する方法を示しています AWS DMS。
アクションはより大きなプログラムからのコードの抜粋であり、コンテキスト内で実行する必要があります。アクションは個々のサービス機能を呼び出す方法を示していますが、コンテキスト内のアクションは、関連するシナリオで確認できます。
各例には完全なソースコードへのリンクが含まれており、コードの設定方法と実行方法に関する手順を確認できます。
トピック
アクション
次のコード例は、add-tags-to-resource を使用する方法を示しています。
- AWS CLI
-
リソースにタグを追加するには
次の
add-tags-to-resourceの例では、タグをレプリケーション インスタンスに追加しています。aws dms add-tags-to-resource \ --resource-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --tagsKey=Environment,Value=PRODKey=Project,Value=dbMigrationこのコマンドでは何も出力されません。
詳細については、「AWS Database Migration Service ユーザーガイド」の「Tagging Resources」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「AddTagsToResource
」を参照してください。
-
次の例は、cancel-metadata-model-conversion を使用する方法を説明しています。
- AWS CLI
-
メタデータモデル変換をキャンセルするには
次の の
cancel-metadata-model-conversion例では、メタデータモデル変換オペレーションをキャンセルします。aws dms cancel-metadata-model-conversion \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --request-identifiera1b2c3d4-5678-90ab-cdef-EXAMPLE11111出力:
{ "Request": { "Status": "CANCELING", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" } }詳細については、「 Database AWS Migration Service ユーザーガイド」の「データベーススキーマの変換」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のCancelMetadataModelConversion
」を参照してください。
-
次の例は、cancel-metadata-model-creation を使用する方法を説明しています。
- AWS CLI
-
メタデータモデルの作成をキャンセルするには
次の の
cancel-metadata-model-creation例では、メタデータモデル作成オペレーションをキャンセルします。aws dms cancel-metadata-model-creation \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --request-identifiera1b2c3d4-5678-90ab-cdef-EXAMPLE11111出力:
{ "Request": { "Status": "CANCELING", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「ステートメントメタデータモデルの作成」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のCancelMetadataModelCreation
」を参照してください。
-
次の例は、create-data-provider を使用する方法を説明しています。
- AWS CLI
-
例 1: Microsoft SQL Server データプロバイダーを作成するには
次の の
create-data-provider例では、Microsoft SQL Server データプロバイダーを作成します。aws dms create-data-provider \ --data-provider-nameexample-data-provider\ --enginesqlserver\ --description"Example data provider for documentation"\ --settingsMicrosoftSqlServerSettings={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}出力:
{ "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" } } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「データプロバイダーの使用」を参照してください。
例 2: 仮想データプロバイダーを作成するには
次の
create-data-provider例では、データベースへの接続を必要としない仮想データプロバイダーを作成します。aws dms create-data-provider \ --data-provider-nameexample-virtual-data-provider\ --engineaurora-postgresql\ --description"Example data provider for documentation"\ --virtual \ --settingsPostgreSqlSettings={ServerName=virtual,Port=5432,DatabaseName=virtual,SslMode=none}出力:
{ "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" } } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「仮想データプロバイダーの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のCreateDataProvider
」を参照してください。
-
次の例は、create-endpoint を使用する方法を説明しています。
- AWS CLI
-
エンドポイントを作成するには
次の
create-endpointの例では、Amazon S3 ソースのエンドポイントを作成しています。aws dms create-endpoint \ --endpoint-typesource\ --engine-names3\ --endpoint-identifiersrc-endpoint\ --s3-settingsfile://s3-settings.jsons3-settings.jsonの内容:{ "BucketName":"my-corp-data", "BucketFolder":"sourcedata", "ServiceAccessRoleArn":"arn:aws:iam::123456789012:role/my-s3-access-role" }出力:
{ "Endpoint": { "EndpointIdentifier": "src-endpoint", "EndpointType": "SOURCE", "EngineName": "s3", "EngineDisplayName": "Amazon S3", "ExtraConnectionAttributes": "bucketFolder=sourcedata;bucketName=my-corp-data;compressionType=NONE;csvDelimiter=,;csvRowDelimiter=\\n;", "Status": "active", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:GUVAFG34EECUOJ6QVZ56DAHT3U", "SslMode": "none", "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "S3Settings": { "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "CsvRowDelimiter": "\\n", "CsvDelimiter": ",", "BucketFolder": "sourcedata", "BucketName": "my-corp-data", "CompressionType": "NONE", "EnableStatistics": true } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「DMS AWS エンドポイントの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「CreateEndpoint
」を参照してください。
-
次のコード例は、create-event-subscription を使用する方法を示しています。
- AWS CLI
-
イベントサブスクリプションを一覧表示するには
次の
create-event-subscriptionの例では、Amazon SNS トピック (my-sns-topic) へのイベントサブスクリプションを作成しています。aws dms create-event-subscription \ --subscription-namemy-dms-events\ --sns-topic-arnarn:aws:sns:us-east-1:123456789012:my-sns-topic出力:
{ "EventSubscription": { "CustomerAwsId": "123456789012", "CustSubscriptionId": "my-dms-events", "SnsTopicArn": "arn:aws:sns:us-east-1:123456789012:my-sns-topic", "Status": "creating", "SubscriptionCreationTime": "2020-05-21 21:58:38.598", "Enabled": true } }詳細については、「AWS Database Migration Service ユーザーガイド」の「Working with Events and Notifications」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「CreateEventSubscription
」を参照してください。
-
次の例は、create-instance-profile を使用する方法を説明しています。
- AWS CLI
-
インスタンスプロファイルを作成するには
次の の
create-instance-profile例では、インスタンスプロファイルを作成します。aws dms create-instance-profile \ --instance-profile-nameexample-instance-profile\ --description"Example instance profile for documentation"\ --subnet-group-identifierexample-replication-subnet-group\ --vpc-security-groups"sg-0123456789abcdef0"\ --kms-key-arnarn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111\ --network-typeIPV4\ --no-publicly-accessible出力:
{ "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" ] } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「インスタンスプロファイルの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「CreateInstanceProfile
」を参照してください。
-
次の例は、create-migration-project を使用する方法を説明しています。
- AWS CLI
-
移行プロジェクトを作成するには
次の の
create-migration-project例では、移行プロジェクトを作成します。aws dms create-migration-project \ --migration-project-nameexample-migration-project\ --description"Example migration project for documentation"\ --source-data-provider-descriptorsDataProviderIdentifier=arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS,SecretsManagerSecretId=arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3,SecretsManagerAccessRoleArn=arn:aws:iam::123456789012:role/example-secrets-manager-role\ --target-data-provider-descriptorsDataProviderIdentifier=arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS,SecretsManagerSecretId=arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3,SecretsManagerAccessRoleArn=arn:aws:iam::123456789012:role/example-secrets-manager-role\ --instance-profile-identifierarn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS\ --transformation-rules '{"rules":[{"rule-type":"transformation","rule-id":"1","rule-name":"1","rule-target":"schema","rule-action":"rename","object-locator":{"schema-name":"ExampleSchema"},"value":"TargetSchema"}]}' \ --schema-conversion-application-attributesS3BucketPath=s3://amzn-s3-demo-bucket,S3BucketRoleArn=arn:aws:iam::123456789012:role/example-s3-access-role出力:
{ "MigrationProject": { "MigrationProjectName": "example-migration-project", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "MigrationProjectCreationTime": "2026-01-09T12:30:00.000000+00:00", "SourceDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "TargetDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "InstanceProfileName": "example-instance-profile", "TransformationRules": "{\"rules\":[{\"rule-type\":\"transformation\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-target\":\"schema\",\"rule-action\":\"rename\",\"object-locator\":{\"schema-name\":\"ExampleSchema\"},\"value\":\"TargetSchema\"}]}", "Description": "Example migration project for documentation", "SchemaConversionApplicationAttributes": { "S3BucketPath": "s3://amzn-s3-demo-bucket", "S3BucketRoleArn": "arn:aws:iam::123456789012:role/example-s3-access-role" } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「移行プロジェクトの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のCreateMigrationProject
」を参照してください。
-
次の例は、create-replication-instance を使用する方法を説明しています。
- AWS CLI
-
レプリケーションインスタンスを作成するには
次の
create-replication-instanceの例では、レプリケーションインスタンスを作成しています。aws dms create-replication-instance \ --replication-instance-identifiermy-repl-instance\ --replication-instance-classdms.t2.micro\ --allocated-storage5出力:
{ "ReplicationInstance": { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "creating", "AllocatedStorage": 5, "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-f839b688", "Status": "active" } ], "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "default", "ReplicationSubnetGroupDescription": "default", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-42599426", "SubnetAvailabilityZone": { "Name": "us-east-1d" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-6746046b", "SubnetAvailabilityZone": { "Name": "us-east-1f" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-cbfff283", "SubnetAvailabilityZone": { "Name": "us-east-1b" }, "SubnetStatus": "Active" } ] }, "PreferredMaintenanceWindow": "sat:12:35-sat:13:05", "PendingModifiedValues": {}, "MultiAZ": false, "EngineVersion": "3.3.2", "AutoMinorVersionUpgrade": true, "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/f7bc0f8e-1a3a-4ace-9faa-e8494fa3921a", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:ZK2VQBUWFDBAWHIXHAYG5G2PKY", "PubliclyAccessible": true } }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS レプリケーションインスタンスの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「CreateReplicationInstance
」を参照してください。
-
次のコード例は、create-replication-subnet-group を使用する方法を示しています。
- AWS CLI
-
サブネットグループを作成するには
次の
create-replication-subnet-groupの例では、3 つのサブネットで構成されるグループを作成しています。aws dms create-replication-subnet-group \ --replication-subnet-group-identifiermy-subnet-group\ --replication-subnet-group-description"my subnet group"\ --subnet-idssubnet-da327bf6subnet-bac383e0subnet-d7c825e8出力:
{ "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "my-subnet-group", "ReplicationSubnetGroupDescription": "my subnet group", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" } ] } }詳細については、「AWS Database Migration Service ユーザーガイド」の「Setting Up a Network for a Replication Instance」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「CreateReplicationSubnetGroup
」を参照してください。
-
次のコード例は、create-replication-task を使用する方法を示しています。
- AWS CLI
-
レプリケーションタスクを作成するには
次の
create-replication-taskの例では、レプリケーションタスクを作成しています。aws dms create-replication-task \ --replication-task-identifiermovedata\ --source-endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA\ --target-endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U\ --replication-instance-arn$RI_ARN\ --migration-typefull-load\ --table-mappingsfile://table-mappings.jsontable-mappings.jsonの内容:{ "rules": [ { "rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": { "schema-name": "prodrep", "table-name": "%" }, "rule-action": "include", "filters": [] } ] }出力:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted... , "ReplicationTaskSettings": ...output omitted... , "Status": "creating", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS タスクの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「CreateReplicationTask
」を参照してください。
-
次のコード例は、delete-connection を使用する方法を示しています。
- AWS CLI
-
接続を削除するには
次の
delete-connectionの例では、レプリケーションインスタンスからエンドポイントの関連付けを解除しています。aws dms delete-connection \ --endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA\ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE出力:
{ "Connection": { "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "Status": "deleting", "EndpointIdentifier": "src-database-1", "ReplicationInstanceIdentifier": "my-repl-instance" } }詳細については、「AWS Database Migration Service ユーザーガイド」の https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.Creating.html を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DeleteConnection
」を参照してください。
-
次の例は、delete-data-provider を使用する方法を説明しています。
- AWS CLI
-
データプロバイダーを削除するには
次の の
delete-data-provider例では、ARN によって識別されるデータプロバイダーを削除します。aws dms delete-data-provider \ --data-provider-identifierarn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS出力:
{ "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" } } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「データプロバイダーの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDeleteDataProvider
」を参照してください。
-
次の例は、delete-endpoint を使用する方法を説明しています。
- AWS CLI
-
エンドポイントを削除するには
次の
delete-endpointの例では、エンドポイントを削除しています。aws dms delete-endpoint \ --endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:OUJJVXO4XZ4CYTSEG5XGMN2R3Y出力:
{ "Endpoint": { "EndpointIdentifier": "src-endpoint", "EndpointType": "SOURCE", "EngineName": "s3", "EngineDisplayName": "Amazon S3", "ExtraConnectionAttributes": "bucketFolder=sourcedata;bucketName=my-corp-data;compressionType=NONE;csvDelimiter=,;csvRowDelimiter=\\n;", "Status": "deleting", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:OUJJVXO4XZ4CYTSEG5XGMN2R3Y", "SslMode": "none", "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "S3Settings": { "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "CsvRowDelimiter": "\\n", "CsvDelimiter": ",", "BucketFolder": "sourcedata", "BucketName": "my-corp-data", "CompressionType": "NONE", "EnableStatistics": true } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「DMS AWS エンドポイントの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DeleteEndpoint
」を参照してください。
-
次のコード例は、delete-event-subscription を使用する方法を示しています。
- AWS CLI
-
イベントサブスクリプションを削除するには
次の
delete-event-subscriptionの例では、Amazon SNS トピックへのサブスクリプションを削除しています。aws dms delete-event-subscription \ --subscription-name"my-dms-events"出力:
{ "EventSubscription": { "CustomerAwsId": "123456789012", "CustSubscriptionId": "my-dms-events", "SnsTopicArn": "arn:aws:sns:us-east-1:123456789012:my-sns-topic", "Status": "deleting", "SubscriptionCreationTime": "2020-05-21 21:58:38.598", "Enabled": true } }詳細については、「AWS Database Migration Service ユーザーガイド」の「Working with Events and Notifications」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DeleteEventSubscription
」を参照してください。
-
次の例は、delete-instance-profile を使用する方法を説明しています。
- AWS CLI
-
インスタンスプロファイルを削除するには
次の の
delete-instance-profile例では、ARN によって識別されるインスタンスプロファイルを削除します。aws dms delete-instance-profile \ --instance-profile-identifierarn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS出力:
{ "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" ] } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「インスタンスプロファイルの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DeleteInstanceProfile
」を参照してください。
-
次の例は、delete-migration-project を使用する方法を説明しています。
- AWS CLI
-
移行プロジェクトを削除するには
次の の
delete-migration-project例では、ARN によって識別される移行プロジェクトを削除します。aws dms delete-migration-project \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS出力:
{ "MigrationProject": { "MigrationProjectName": "example-migration-project", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "MigrationProjectCreationTime": "2026-01-09T12:30:00.000000+00:00", "SourceDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "TargetDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "InstanceProfileName": "example-instance-profile", "TransformationRules": "{\"rules\":[{\"rule-type\":\"transformation\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-target\":\"schema\",\"rule-action\":\"rename\",\"object-locator\":{\"schema-name\":\"ExampleSchema\"},\"value\":\"TargetSchema\"}]}", "Description": "Example migration project for documentation", "SchemaConversionApplicationAttributes": { "S3BucketPath": "s3://amzn-s3-demo-bucket", "S3BucketRoleArn": "arn:aws:iam::123456789012:role/example-s3-access-role" } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「移行プロジェクトの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDeleteMigrationProject
」を参照してください。
-
次の例は、delete-replication-instance を使用する方法を説明しています。
- AWS CLI
-
レプリケーションインスタンスを削除するには
次の
delete-replication-instanceの例では、レプリケーション インスタンスを削除します。aws dms delete-replication-instance \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE出力:
{ "ReplicationInstance": { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "deleting", "AllocatedStorage": 5, "InstanceCreateTime": 1590011235.952, "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-f839b688", "Status": "active" } ], "AvailabilityZone": "us-east-1e", "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "default", "ReplicationSubnetGroupDescription": "default", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-42599426", "SubnetAvailabilityZone": { "Name": "us-east-1d" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-6746046b", "SubnetAvailabilityZone": { "Name": "us-east-1f" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-cbfff283", "SubnetAvailabilityZone": { "Name": "us-east-1b" }, "SubnetStatus": "Active" } ] }, "PreferredMaintenanceWindow": "wed:11:42-wed:12:12", "PendingModifiedValues": {}, "MultiAZ": true, "EngineVersion": "3.3.2", "AutoMinorVersionUpgrade": true, "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/f7bc0f8e-1a3a-4ace-9faa-e8494fa3921a", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "ReplicationInstancePublicIpAddress": "54.225.120.92", "ReplicationInstancePrivateIpAddress": "172.31.30.121", "ReplicationInstancePublicIpAddresses": [ "54.225.120.92", "3.230.18.248" ], "ReplicationInstancePrivateIpAddresses": [ "172.31.30.121", "172.31.75.90" ], "PubliclyAccessible": true, "SecondaryAvailabilityZone": "us-east-1b" } }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS レプリケーションインスタンスの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DeleteReplicationInstance
」を参照してください。
-
次のコード例は、delete-replication-subnet-group を使用する方法を示しています。
- AWS CLI
-
サブネットグループを削除するには
次の
delete-replication-subnet-groupの例では、サブネットグループを削除しています。aws dms delete-replication-subnet-group \ --replication-subnet-group-identifiermy-subnet-group出力:
(none)詳細については、「AWS Database Migration Service ユーザーガイド」の「Setting Up a Network for a Replication Instance」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DeleteReplicationSubnetGroup
」を参照してください。
-
次のコード例は、delete-replication-task を使用する方法を示しています。
- AWS CLI
-
レプリケーションタスクを削除するには
次の
delete-replication-taskの例では、レプリケーションタスクを削除しています。aws dms delete-replication-task \ --replication-task-arnarn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII出力:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted..., "ReplicationTaskSettings": ...output omitted..., "Status": "deleting", "StopReason": "Stop Reason FULL_LOAD_ONLY_FINISHED", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590789988.677, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS タスクの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DeleteReplicationTask
」を参照してください。
-
次のコード例は、describe-account-attributes を使用する方法を示しています。
- AWS CLI
-
アカウントの属性を記述するには
次の の
describe-account-attributes例では、 AWS アカウントの属性を一覧表示します。aws dms describe-account-attributes出力:
{ "AccountQuotas": [ { "AccountQuotaName": "ReplicationInstances", "Used": 1, "Max": 20 }, { "AccountQuotaName": "AllocatedStorage", "Used": 5, "Max": 10000 }, ...remaining output omitted... ], "UniqueAccountIdentifier": "cqahfbfy5xee" }-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeAccountAttributes
」を参照してください。
-
次のコード例は、describe-certificates を使用する方法を示しています。
- AWS CLI
-
使用可能な証明書を一覧表示するには
次の の
describe-certificates例では、 AWS アカウントで使用可能な証明書を一覧表示します。aws dms describe-certificates出力:
{ "Certificates": [ { "CertificateIdentifier": "my-cert", "CertificateCreationDate": 1543259542.506, "CertificatePem": "-----BEGIN CERTIFICATE-----\nMIID9DCCAtygAwIBAgIBQjANBgkqhkiG9w0BAQ ...U" ... remaining output omittted ... } ] }詳細については、「AWS Database Migration Service ユーザーガイド」の「Using SSL」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeCertificates
」を参照してください。
-
次のコード例は、describe-connections を使用する方法を示しています。
- AWS CLI
-
接続を記述するには
次の
describe-connectionsの例では、レプリケーションインスタンスとエンドポイント間でテストした接続を一覧表示しています。aws dms describe-connections出力:
{ "Connections": [ { "Status": "successful", "ReplicationInstanceIdentifier": "test", "EndpointArn": "arn:aws:dms:us-east-arn:aws:dms:us-east-1:123456789012:endpoint:ZW5UAN6P4E77EC7YWHK4RZZ3BE", "EndpointIdentifier": "testsrc1", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:6UTDJGBOUS3VI3SUWA66XFJCJQ" } ] }詳細については、「AWS Database Migration Service ユーザーガイド」の「Creating Source and Target Endpoints」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeConnections
」を参照してください。
-
次の例は、describe-conversion-configuration を使用する方法を説明しています。
- AWS CLI
-
変換設定を記述するには
次の の
describe-conversion-configuration例では、移行プロジェクトの変換設定を取得します。aws dms describe-conversion-configuration \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS出力:
{ "MigrationProjectIdentifier": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "ConversionConfiguration": "{\"Common project settings\":{\"ShowSeverityLevelInSql\":\"CRITICAL\",\"EnableGenAiConversion\":false},\"MSSQL_TO_AURORA_POSTGRESQL\":{\"ConvertProceduresToFunction\":true,\"UniqueIndexGeneration\":true,\"CaseSensitivityNames\":false},\"Conversion version\":{\"MSSQL_TO_AURORA_POSTGRESQL_target_engine_version\":\"15\"}}" }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「スキーマ変換設定の指定」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeConversionConfiguration
」を参照してください。
-
次の例は、describe-data-providers を使用する方法を説明しています。
- AWS CLI
-
データプロバイダーを記述するには
次の の
describe-data-providers例では、ARN によって識別されるデータプロバイダーの詳細を取得します。aws dms describe-data-providers \ --filtersName=data-provider-identifier,Values=arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS出力:
{ "DataProviders": [ { "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" } } } ] }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「データプロバイダーの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeDataProviders
」を参照してください。
-
次の例は、describe-endpoint-types を使用する方法を説明しています。
- AWS CLI
-
使用可能なエンドポイントタイプを一覧表示するには
次の
describe-endpoint-typesの例では、使用可能な MySQL エンドポイントタイプを一覧表示しています。aws dms describe-endpoint-types \ --filters"Name=engine-name,Values=mysql"出力:
{ "SupportedEndpointTypes": [ { "EngineName": "mysql", "SupportsCDC": true, "EndpointType": "source", "EngineDisplayName": "MySQL" }, { "EngineName": "mysql", "SupportsCDC": true, "EndpointType": "target", "EngineDisplayName": "MySQL" } ] }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「Working with AWS DMS Endpoints <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.html>`__」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeEndpointTypes
」を参照してください。
-
次のコード例は、describe-endpoints を使用する方法を示しています。
- AWS CLI
-
エンドポイントを記述するには
次の の
describe-endpoints例では、 AWS アカウントのエンドポイントを一覧表示します。aws dms describe-endpoints出力:
{ "Endpoints": [ { "Username": "dms", "Status": "active", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:SF2WOFLWYWKVEOHID2EKLP3SJI", "ServerName": "ec2-52-32-48-61.us-west-2.compute.amazonaws.com", "EndpointType": "SOURCE", "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/94d5c4e7-4e4c-44be-b58a-c8da7adf57cd", "DatabaseName": "test", "EngineName": "mysql", "EndpointIdentifier": "pri100", "Port": 8193 }, { "Username": "admin", "Status": "active", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:TJJZCIH3CJ24TJRU4VC32WEWFR", "ServerName": "test.example.com", "EndpointType": "SOURCE", "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/2431021b-1cf2-a2d4-77b2-59a9e4bce323", "DatabaseName": "EMPL", "EngineName": "oracle", "EndpointIdentifier": "test", "Port": 1521 } ] }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「DMS AWS エンドポイントの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeEndpoints
」を参照してください。
-
次のコード例は、describe-event-categories を使用する方法を示しています。
- AWS CLI
-
イベントカテゴリを記述するには
次の
describe-event-categoriesの例では、使用可能なイベントカテゴリを一覧表示しています。aws dms describe-event-categories出力:
{ "EventCategoryGroupList": [ { "SourceType": "replication-instance", "EventCategories": [ "low storage", "configuration change", "maintenance", "deletion", "creation", "failover", "failure" ] }, { "SourceType": "replication-task", "EventCategories": [ "configuration change", "state change", "deletion", "creation", "failure" ] } ] }詳細については、「AWS Database Migration Service ユーザーガイド」の「Working with Events and Notifications」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeEventCategories
」を参照してください。
-
次のコード例は、describe-event-subscriptions を使用する方法を示しています。
- AWS CLI
-
イベントサブスクリプションを記述するには
次の
describe-event-subscriptionsの例では、Amazon SNS トピックへのイベントサブスクリプションを一覧表示しています。aws dms describe-event-subscriptions出力:
{ "EventSubscriptionsList": [ { "CustomerAwsId": "123456789012", "CustSubscriptionId": "my-dms-events", "SnsTopicArn": "arn:aws:sns:us-east-1:123456789012:my-sns-topic", "Status": "deleting", "SubscriptionCreationTime": "2020-05-21 22:28:51.924", "Enabled": true } ] }詳細については、「AWS Database Migration Service ユーザーガイド」の「Working with Events and Notifications」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeEventSubscriptions
」を参照してください。
-
次のコード例は、describe-events を使用する方法を示しています。
- AWS CLI
-
DMS イベントを一覧表示するには
次の
describe-eventsの例では、レプリケーションインスタンスから発生したイベントを一覧表示しています。aws dms describe-events \ --source-type"replication-instance"出力:
{ "Events": [ { "SourceIdentifier": "my-repl-instance", "SourceType": "replication-instance", "Message": "Replication application shutdown", "EventCategories": [], "Date": 1590771645.776 } ] }詳細については、「AWS Database Migration Service ユーザーガイド」の「Working with Events and Notifications」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeEvents
」を参照してください。
-
次の例は、describe-extension-pack-associations を使用する方法を説明しています。
- AWS CLI
-
拡張パックの関連付けを記述するには
次の の
describe-extension-pack-associations例では、拡張パックをターゲットデータベースに適用するオペレーションのステータスを取得し、リクエスト IDs。aws dms describe-extension-pack-associations \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333出力:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "ProgressStep": "IN_PROGRESS" } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "The database user in your target secret does not have sufficient privileges. Grant the required privileges and try again." } } } ] }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「拡張機能パックの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeExtensionPackAssociations
」を参照してください。
-
次の例は、describe-instance-profiles を使用する方法を説明しています。
- AWS CLI
-
インスタンスプロファイルを記述するには
次の の
describe-instance-profiles例では、ARN によって識別されるインスタンスプロファイルの詳細を取得します。aws dms describe-instance-profiles \ --filtersName=instance-profile-identifier,Values=arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS出力:
{ "InstanceProfiles": [ { "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" ] } ] }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「インスタンスプロファイルの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeInstanceProfiles
」を参照してください。
-
次の例は、describe-metadata-model-assessments を使用する方法を説明しています。
- AWS CLI
-
メタデータモデル評価を記述するには
次の の
describe-metadata-model-assessments例では、リクエスト IDs で識別されるメタデータモデル評価オペレーションのステータスを取得します。aws dms describe-metadata-model-assessments \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333出力:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "ANALYZING", "ProcessedObject": { "Name": "ExampleTable", "Type": "table", "EndpointType": "SOURCE" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }詳細については、「 Database Migration AWS Service ユーザーガイド」の「データベース移行評価レポートの作成」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeMetadataModelAssessments
」を参照してください。
-
次の例は、describe-metadata-model-children を使用する方法を説明しています。
- AWS CLI
-
メタデータモデルの子を記述するには
次の の
describe-metadata-model-children例では、ソースメタデータツリーからExampleSchemaスキーマの子メタデータモデルを取得します。aws dms describe-metadata-model-children \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"}, "rule-action": "explicit"}]}' \ --originSOURCE出力:
{ "MetadataModelChildren": [ { "MetadataModelName": "Tables", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Tables\"}, \"rule-action\": \"explicit\"}]}" }, { "MetadataModelName": "Views", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"2\", \"rule-name\": \"2\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Views\"}, \"rule-action\": \"explicit\"}]}" }, { "MetadataModelName": "Functions", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"3\", \"rule-name\": \"3\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Functions\"}, \"rule-action\": \"explicit\"}]}" }, { "MetadataModelName": "Sequences", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"4\", \"rule-name\": \"4\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Sequences\"}, \"rule-action\": \"explicit\"}]}" } ] }詳細については、「 Database Migration Service ユーザーガイド」の「メタデータモデルツリーのナビゲート」を参照してください。 AWS
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeMetadataModelChildren
」を参照してください。
-
次の例は、describe-metadata-model-conversions を使用する方法を説明しています。
- AWS CLI
-
メタデータモデル変換を記述するには
次の の
describe-metadata-model-conversions例では、リクエスト IDs で識別されるメタデータモデル変換オペレーションのステータスを取得します。aws dms describe-metadata-model-conversions \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333出力:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "CONVERTING", "ProcessedObject": { "Name": "ExampleTable", "Type": "table", "EndpointType": "SOURCE" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }詳細については、「 Database AWS Migration Service ユーザーガイド」の「データベーススキーマの変換」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeMetadataModelConversions
」を参照してください。
-
次の例は、describe-metadata-model-creations を使用する方法を説明しています。
- AWS CLI
-
メタデータモデルの作成を記述するには
次の の
describe-metadata-model-creations例では、リクエスト IDs で識別されるメタデータモデル作成オペレーションのステータスを取得します。aws dms describe-metadata-model-creations \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333出力:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「ステートメントメタデータモデルの作成」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeMetadataModelCreations
」を参照してください。
-
次の例は、describe-metadata-model-exports-as-script を使用する方法を説明しています。
- AWS CLI
-
メタデータモデルのエクスポートをスクリプトとして記述するには
次の の
describe-metadata-model-exports-as-script例では、メタデータモデルをデータ定義言語 (DDL) スクリプトとしてエクスポートするオペレーションのステータスを取得し、リクエスト IDs。aws dms describe-metadata-model-exports-as-script \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333出力:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "ExportSqlDetails": { "S3ObjectKey": "s3://amzn-s3-demo-bucket/example-migration-project/ExampleScript.zip", "ObjectURL": "https://amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com/example-migration-project/ExampleScript.zip" } }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "IN_PROGRESS", "ProcessedObject": { "EndpointType": "TARGET" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「変換したコードを SQL ファイルに保存」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeMetadataModelExportsAsScript
」を参照してください。
-
次の例は、describe-metadata-model-exports-to-target を使用する方法を説明しています。
- AWS CLI
-
ターゲットへのメタデータモデルのエクスポートを記述するには
次の の
describe-metadata-model-exports-to-target例では、変換されたメタデータモデルをターゲットデータベースにエクスポートするオペレーションのステータスを取得し、リクエスト IDs。aws dms describe-metadata-model-exports-to-target \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333出力:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "APPLYING", "ProcessedObject": { "EndpointType": "TARGET" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }詳細については、「 Database Migration Service ユーザーガイド」の「変換されたコードの適用」を参照してください。 AWS
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeMetadataModelExportsToTarget
」を参照してください。
-
次の例は、describe-metadata-model-imports を使用する方法を説明しています。
- AWS CLI
-
メタデータモデルのインポートを記述するには
次の の
describe-metadata-model-imports例では、リクエスト IDs で識別されるメタデータインポートオペレーションのステータスを取得します。aws dms describe-metadata-model-imports \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333出力:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "IN_PROGRESS", "ProcessedObject": { "EndpointType": "SOURCE" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }詳細については、「 Database Migration Service ユーザーガイド」の「メタデータモデルツリーの操作」を参照してください。 AWS
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeMetadataModelImports
」を参照してください。
-
次の例は、describe-metadata-model を使用する方法を説明しています。
- AWS CLI
-
メタデータモデルを記述するには
次の の
describe-metadata-model例では、SQL 定義やターゲットデータベース内の対応する変換されたメタデータモデルへの参照など、ExampleSchemaスキーマ内のExampleTableテーブルに関する詳細情報をソースメタデータツリーから取得します。aws dms describe-metadata-model \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema", "table-name": "ExampleTable"}, "rule-action": "explicit"}]}' \ --originSOURCE出力:
{ "MetadataModelName": "ExampleTable", "MetadataModelType": "table", "TargetMetadataModels": [ { "MetadataModelName": "exampletable", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": {\"server-name\": \"example-target-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"exampleschema\", \"table-name\": \"exampletable\"}, \"rule-action\": \"explicit\"}]}" } ], "Definition": "CREATE TABLE ExampleTable (ExampleColumn INTEGER NOT NULL);" }詳細については、「 Database Migration Service ユーザーガイド」の「メタデータモデルツリーのナビゲート」を参照してください。 AWS
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeMetadataModel
」を参照してください。
-
次の例は、describe-migration-projects を使用する方法を説明しています。
- AWS CLI
-
移行プロジェクトを記述するには
次の の
describe-migration-projects例では、ARN によって識別される移行プロジェクトの詳細を取得します。aws dms describe-migration-projects \ --filtersName=migration-project-identifier,Values=arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS出力:
{ "MigrationProjects": [ { "MigrationProjectName": "example-migration-project", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "MigrationProjectCreationTime": "2026-01-09T12:30:00.000000+00:00", "SourceDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "TargetDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "InstanceProfileName": "example-instance-profile", "TransformationRules": "{\"rules\":[{\"rule-type\":\"transformation\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-target\":\"schema\",\"rule-action\":\"rename\",\"object-locator\":{\"schema-name\":\"ExampleSchema\"},\"value\":\"TargetSchema\"}]}", "Description": "Example migration project for documentation", "SchemaConversionApplicationAttributes": { "S3BucketPath": "s3://amzn-s3-demo-bucket", "S3BucketRoleArn": "arn:aws:iam::123456789012:role/example-s3-access-role" } } ] }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「移行プロジェクトの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のDescribeMigrationProjects
」を参照してください。
-
次の例は、describe-orderable-replication-instances を使用する方法を説明しています。
- AWS CLI
-
指示設定が可能なレプリケーションインスタンスを記述するには
次の
describe-orderable-replication-instancesの例では、指示設定が可能なレプリケーションインスタンスタイプを一覧表示しています。aws dms describe-orderable-replication-instances出力:
{ "OrderableReplicationInstances": [ { "EngineVersion": "3.3.2", "ReplicationInstanceClass": "dms.c4.2xlarge", "StorageType": "gp2", "MinAllocatedStorage": 5, "MaxAllocatedStorage": 6144, "DefaultAllocatedStorage": 100, "IncludedAllocatedStorage": 100, "AvailabilityZones": [ "us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d", "us-east-1e", "us-east-1f" ] }, { "EngineVersion": "3.3.2", "ReplicationInstanceClass": "dms.c4.4xlarge", "StorageType": "gp2", "MinAllocatedStorage": 5, "MaxAllocatedStorage": 6144, "DefaultAllocatedStorage": 100, "IncludedAllocatedStorage": 100, "AvailabilityZones": [ "us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d", "us-east-1e", "us-east-1f" ] }, ...remaining output omitted... }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS レプリケーションインスタンスの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeOrderableReplicationInstances
」を参照してください。
-
次のコード例は、describe-refresh-schemas-status を使用する方法を示しています。
- AWS CLI
-
エンドポイントの更新ステータスを一覧表示するには
次の
describe-refresh-schemas-statusの例では、以前の更新リクエストのステータスを返しています。aws dms describe-refresh-schemas-status \ --endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA出力:
{ "RefreshSchemasStatus": { "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "Status": "successful", "LastRefreshDate": 1590786544.605 } }-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeRefreshSchemasStatus
」を参照してください。
-
次のコード例は、describe-replication-instances を使用する方法を示しています。
- AWS CLI
-
レプリケーションインスタンスを記述するには
次の の
describe-replication-instances例では、 AWS アカウントのレプリケーションインスタンスを一覧表示します。aws dms describe-replication-instances出力:
{ "ReplicationInstances": [ { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "available", "AllocatedStorage": 5, "InstanceCreateTime": 1590011235.952, "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-f839b688", "Status": "active" } ], "AvailabilityZone": "us-east-1e", "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "default", "ReplicationSubnetGroupDescription": "default", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-42599426", "SubnetAvailabilityZone": { "Name": "us-east-1d" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-6746046b", "SubnetAvailabilityZone": { "Name": "us-east-1f" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-cbfff283", "SubnetAvailabilityZone": { "Name": "us-east-1b" }, "SubnetStatus": "Active" } ] }, "PreferredMaintenanceWindow": "wed:11:42-wed:12:12", "PendingModifiedValues": { "MultiAZ": true }, "MultiAZ": false, "EngineVersion": "3.3.2", "AutoMinorVersionUpgrade": true, "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/f7bc0f8e-1a3a-4ace-9faa-e8494fa3921a", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "ReplicationInstancePublicIpAddress": "3.230.18.248", "ReplicationInstancePrivateIpAddress": "172.31.75.90", "ReplicationInstancePublicIpAddresses": [ "3.230.18.248" ], "ReplicationInstancePrivateIpAddresses": [ "172.31.75.90" ], "PubliclyAccessible": true, "FreeUntil": 1590194829.267 } ] }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS レプリケーションインスタンスの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeReplicationInstances
」を参照してください。
-
次のコード例は、describe-replication-subnet-groups を使用する方法を示しています。
- AWS CLI
-
使用可能なサブネットグループを表示するには
次の
describe-replication-subnet-groupsの例では、使用可能なサブネットグループを一覧表示しています。aws dms describe-replication-subnet-groups \ --filter"Name=replication-subnet-group-id,Values=my-subnet-group"出力:
{ "ReplicationSubnetGroups": [ { "ReplicationSubnetGroupIdentifier": "my-subnet-group", "ReplicationSubnetGroupDescription": "my subnet group", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" } ] } ] }詳細については、「AWS Database Migration Service ユーザーガイド」の「Setting Up a Network for a Replication Instance」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeReplicationSubnetGroups
」を参照してください。
-
次のコード例は、describe-replication-task-assessment-results を使用する方法を示しています。
- AWS CLI
-
レプリケーションタスク評価の結果を一覧表示するには
次の
describe-replication-task-assessment-resultsの例では、以前のタスク評価の結果を一覧表示しています。aws dms describe-replication-task-assessment-results出力:
{ "ReplicationTaskAssessmentResults": [ { "ReplicationTaskIdentifier": "moveit2", "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII", "ReplicationTaskLastAssessmentDate": 1590790230.0, "AssessmentStatus": "No issues found", "AssessmentResultsFile": "moveit2/2020-05-29-22-10" } ] }詳細については、「AWS Database Migration Service ユーザーガイド」の「Creating a Task Assessment Report」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeReplicationTaskAssessmentResults
」を参照してください。
-
次のコード例は、describe-replication-tasks を使用する方法を示しています。
- AWS CLI
-
レプリケーションタスクを記述するには
次の
describe-replication-tasksの例では、現在のレプリケーションタスクについて表示しています。aws dms describe-replication-tasks出力:
{ "ReplicationTasks": [ { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted... , "ReplicationTaskSettings": ...output omitted... , "Status": "stopped", "StopReason": "Stop Reason FULL_LOAD_ONLY_FINISHED", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590619805.212, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII", "ReplicationTaskStats": { "FullLoadProgressPercent": 100, "ElapsedTimeMillis": 0, "TablesLoaded": 0, "TablesLoading": 0, "TablesQueued": 0, "TablesErrored": 0, "FreshStartDate": 1590619811.528, "StartDate": 1590619811.528, "StopDate": 1590619842.068 } } ] }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS タスクの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeReplicationTasks
」を参照してください。
-
次の例は、describe-schemas を使用する方法を説明しています。
- AWS CLI
-
データベーススキーマについて表示するには
次の
describe-schemasの例では、エンドポイントで使用可能なテーブルを一覧表示しています。aws dms describe-schemas \ --endpoint-arn"arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA"出力:
{ "Schemas": [ "prodrep" ] }詳細については、「AWS Database Migration Service ユーザーガイド」の「This is the topic title
」を参照してください。 -
API の詳細については、「AWS CLI コマンドリファレンス」の「DescribeSchemas
」を参照してください。
-
次の例は、export-metadata-model-assessment を使用する方法を説明しています。
- AWS CLI
-
変換評価レポートをエクスポートするには
次の の
export-metadata-model-assessment例では、ExampleSchemaスキーマ内のすべてのオブジェクトの変換評価レポートをエクスポートします。aws dms export-metadata-model-assessment \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"}, "rule-action": "explicit"}]}' \ --file-nameexample-assessment-report\ --assessment-report-typespdfcsv出力:
{ "PdfReport": { "S3ObjectKey": "example-migration-project/example-assessment-report.pdf", "ObjectURL": "https://amzn-s3-demo-bucket.s3.amazonaws.com/example-migration-project/example-assessment-report.pdf" }, "CsvReport": { "S3ObjectKey": "example-migration-project/example-assessment-report.zip", "ObjectURL": "https://amzn-s3-demo-bucket.s3.amazonaws.com/example-migration-project/example-assessment-report.zip" } }詳細については、「 Database Migration Service ユーザーガイド」の「データベース移行評価レポートの作成」を参照してください。 AWS
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のExportMetadataModelAssessment
」を参照してください。
-
次の例は、get-target-selection-rules を使用する方法を説明しています。
- AWS CLI
-
ソース選択ルールをターゲット選択ルールに変換するには
次の
get-target-selection-rules例では、ExampleSchemaスキーマ内のExampleTableテーブルを選択するソース選択ルールを、変換された対応するものを参照するターゲット選択ルールに変換します。aws dms get-target-selection-rules \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "database-name": "ExampleDatabase", "schema-name": "ExampleSchema", "table-name": "ExampleTable"}, "rule-action": "explicit"}]}'出力:
{ "TargetSelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": {\"server-name\": \"example-target-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"exampledatabase_exampleschema\", \"table-name\": \"exampletable\"}, \"rule-action\": \"explicit\"}]}" }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「選択ルールの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のGetTargetSelectionRules
」を参照してください。
-
次の例は、list-tags-for-resource を使用する方法を説明しています。
- AWS CLI
-
リソースのタグを一覧表示するには
次の
list-tags-for-resourceの例では、レプリケーションインスタンスのタグを一覧表示しています。aws dms list-tags-for-resource \ --resource-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE出力:
{ "TagList": [ { "Key": "Project", "Value": "dbMigration" }, { "Key": "Environment", "Value": "PROD" } ] }詳細については、「AWS Database Migration Service ユーザーガイド」の「Tagging Resources」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「ListTagsForResource
」を参照してください。
-
次の例は、modify-conversion-configuration を使用する方法を説明しています。
- AWS CLI
-
変換設定を変更するには
次の
modify-conversion-configuration例では、生成 AI アシスト変換を有効にし、移行プロジェクトの変換パス設定を更新します。aws dms modify-conversion-configuration \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --conversion-configuration '{"Common project settings":{"EnableGenAiConversion":true},"MSSQL_TO_AURORA_POSTGRESQL":{"ConvertProceduresToFunction":false}}'出力:
{ "MigrationProjectIdentifier": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「スキーマ変換設定の指定」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のModifyConversionConfiguration
」を参照してください。
-
次の例は、modify-data-provider を使用する方法を説明しています。
- AWS CLI
-
データプロバイダーを変更するには
次の の
modify-data-provider例では、データプロバイダーの説明とサーバー名を更新します。aws dms modify-data-provider \ --data-provider-identifierarn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS\ --description"Updated data provider description"\ --enginesqlserver\ --settingsMicrosoftSqlServerSettings={ServerName=new-source-server.us-east-1.rds.amazonaws.com}出力:
{ "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": "Updated data provider description", "Engine": "sqlserver", "Settings": { "MicrosoftSqlServerSettings": { "ServerName": "new-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" } } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「データプロバイダーの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のModifyDataProvider
」を参照してください。
-
次の例は、modify-endpoint を使用する方法を説明しています。
- AWS CLI
-
エンドポイントを変更するには
次の
modify-endpointの例では、エンドポイントに追加の接続属性を設定しています。aws dms modify-endpoint \ --endpoint-arn"arn:aws:dms:us-east-1:123456789012:endpoint:GUVAFG34EECUOJ6QVZ56DAHT3U"\ --extra-connection-attributes"compressionType=GZIP"出力:
{ "Endpoint": { "EndpointIdentifier": "src-endpoint", "EndpointType": "SOURCE", "EngineName": "s3", "EngineDisplayName": "Amazon S3", "ExtraConnectionAttributes": "compressionType=GZIP;csvDelimiter=,;csvRowDelimiter=\\n;", "Status": "active", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:GUVAFG34EECUOJ6QVZ56DAHT3U", "SslMode": "none", "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "S3Settings": { "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "CsvRowDelimiter": "\\n", "CsvDelimiter": ",", "BucketFolder": "", "BucketName": "", "CompressionType": "GZIP", "EnableStatistics": true } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「Working with AWS DMS Endpoints <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.html>`__」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「ModifyEndpoint
」を参照してください。
-
次のコード例は、modify-event-subscription を使用する方法を示しています。
- AWS CLI
-
イベントサブスクリプションを変更するには
次の
modify-event-subscriptionの例では、イベントサブスクリプションのソースタイプを変更しています。aws dms modify-event-subscription \ --subscription-name"my-dms-events"\ --source-typereplication-task出力:
{ "EventSubscription": { "CustomerAwsId": "123456789012", "CustSubscriptionId": "my-dms-events", "SnsTopicArn": "arn:aws:sns:us-east-1:123456789012:my-sns-topic", "Status": "modifying", "SubscriptionCreationTime": "2020-05-29 17:04:40.262", "SourceType": "replication-task", "Enabled": true } }詳細については、「AWS Database Migration Service ユーザーガイド」の「Working with Events and Notifications」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「ModifyEventSubscription
」を参照してください。
-
次の例は、modify-instance-profile を使用する方法を説明しています。
- AWS CLI
-
インスタンスプロファイルを変更するには
次の の
modify-instance-profile例では、インスタンスプロファイルの説明とネットワークタイプを更新します。aws dms modify-instance-profile \ --instance-profile-identifierarn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS\ --description"Updated instance profile description"\ --network-typeDUAL出力:
{ "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": "DUAL", "InstanceProfileName": "example-instance-profile", "Description": "Updated instance profile description", "InstanceProfileCreationTime": "2026-01-09T12:30:00.000000+00:00", "SubnetGroupIdentifier": "example-replication-subnet-group", "VpcSecurityGroups": [ "sg-0123456789abcdef0" ] } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「インスタンスプロファイルの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のModifyInstanceProfile
」を参照してください。
-
次の例は、modify-migration-project を使用する方法を説明しています。
- AWS CLI
-
移行プロジェクトを変更するには
次の の
modify-migration-project例では、ソースデータプロバイダーと移行プロジェクトの説明を更新します。aws dms modify-migration-project \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --description"Updated migration project description"\ --source-data-provider-descriptorsDataProviderIdentifier=arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS出力:
{ "MigrationProject": { "MigrationProjectName": "example-migration-project", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "MigrationProjectCreationTime": "2026-01-09T12:30:00.000000+00:00", "SourceDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "TargetDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "InstanceProfileName": "example-instance-profile", "TransformationRules": "{\"rules\":[{\"rule-type\":\"transformation\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-target\":\"schema\",\"rule-action\":\"rename\",\"object-locator\":{\"schema-name\":\"ExampleSchema\"},\"value\":\"TargetSchema\"}]}", "Description": "Updated migration project description", "SchemaConversionApplicationAttributes": { "S3BucketPath": "s3://amzn-s3-demo-bucket", "S3BucketRoleArn": "arn:aws:iam::123456789012:role/example-s3-access-role" } } }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「移行プロジェクトの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のModifyMigrationProject
」を参照してください。
-
次の例は、modify-replication-instance を使用する方法を説明しています。
- AWS CLI
-
レプリケーションインスタンスを変更するには
次の
modify-replication-instanceの例では、マルチ AZ 配置を使用するようにレプリケーションインスタンスを変更しています。aws dms modify-replication-instance \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --multi-az出力:
{ "ReplicationInstance": { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "available", "AllocatedStorage": 5, "InstanceCreateTime": 1590011235.952, ...output omitted... "PendingModifiedValues": { "MultiAZ": true }, "MultiAZ": false, "EngineVersion": "3.3.2", "AutoMinorVersionUpgrade": true, "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/f7bc0f8e-1a3a-4ace-9faa-e8494fa3921a", ...output omitted... } }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS レプリケーションインスタンスの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「ModifyReplicationInstance
」を参照してください。
-
次のコード例は、modify-replication-subnet-group を使用する方法を示しています。
- AWS CLI
-
サブネットグループを変更するには
次の
modify-replication-subnet-groupの例では、サブネットグループに関連付けられているサブネットのリストを変更しています。aws dms modify-replication-subnet-group \ --replication-subnet-group-identifiermy-subnet-group\ --subnet-idsubnet-da327bf6subnet-bac383e0出力:
{ "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "my-subnet-group", "ReplicationSubnetGroupDescription": "my subnet group", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" } ] } }詳細については、「AWS Database Migration Service ユーザーガイド」の「Setting Up a Network for a Replication Instance」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「ModifyReplicationSubnetGroup
」を参照してください。
-
次のコード例は、modify-replication-task を使用する方法を示しています。
- AWS CLI
-
レプリケーションタスクを変更するには
次の
modify-replication-taskの例では、タスクのテーブルマッピングを変更します。aws dms modify-replication-task \ --replication-task-arn"arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII"\ --table-mappingsfile://table-mappings.jsontable-mappings.jsonの内容:{ "rules": [ { "rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": { "schema-name": "prodrep", "table-name": "ACCT_%" }, "rule-action": "include", "filters": [] } ] }出力:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted..., "ReplicationTaskSettings": ...output omitted..., "Status": "modifying", "StopReason": "Stop Reason FULL_LOAD_ONLY_FINISHED", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590789424.653, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS タスクの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「ModifyReplicationTask
」を参照してください。
-
次のコード例は、reboot-replication-instance を使用する方法を示しています。
- AWS CLI
-
レプリケーションインスタンスを再起動するには
次の
reboot-replication-instanceの例では、レプリケーション インスタンスを再起動します。aws dms reboot-replication-instance \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE出力:
{ "ReplicationInstance": { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "rebooting", "AllocatedStorage": 5, "InstanceCreateTime": 1590011235.952, ... output omitted ... } }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS レプリケーションインスタンスの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「RebootReplicationInstance
」を参照してください。
-
次のコード例は、refresh-schemas を使用する方法を示しています。
- AWS CLI
-
データベーススキーマを更新するには
次の
refresh-schemas例では、DMS AWS がエンドポイントのスキーマのリストを更新するようにリクエストします。aws dms refresh-schemas \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --endpoint-arn"arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA"出力:
{ "RefreshSchemasStatus": { "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "Status": "refreshing", "LastRefreshDate": 1590019949.103 } }-
API の詳細については、「AWS CLI コマンドリファレンス」の「RefreshSchemas
」を参照してください。
-
次のコード例は、reload-tables を使用する方法を示しています。
- AWS CLI
-
エンドポイントで使用可能なテーブルのリストを更新するには
次の
reload-tablesの例では、エンドポイントで使用可能なテーブルのリストを再ロードしています。aws dms reload-tables \ --replication-task-arn"arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII"\ --tables-to-reload"SchemaName=prodrep,TableName=ACCT_BAL"出力:
{ "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" }-
API の詳細については、「AWS CLI コマンドリファレンス」の「ReloadTables
」を参照してください。
-
次のコード例は、remove-tags-from-resource を使用する方法を示しています。
- AWS CLI
-
レプリケーションインスタンスからタグを削除するには
次の
remove-tags-from-resourceの例では、レプリケーションインスタンスからタグを削除しています。aws dms remove-tags-from-resource \ --resource-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --tag-keysEnvironmentProjectこのコマンドでは何も出力されません。
詳細については、「AWS Database Migration Service ユーザーガイド」の「Tagging Resources」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「RemoveTagsFromResource
」を参照してください。
-
次の例は、start-extension-pack-association を使用する方法を説明しています。
- AWS CLI
-
拡張パックをターゲットデータベースに適用するには
次の の
start-extension-pack-association例では、拡張パックのアプリケーションをターゲットデータベースにキューに入れます。aws dms start-extension-pack-association \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS出力:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「拡張パックの使用」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のStartExtensionPackAssociation
」を参照してください。
-
次の例は、start-metadata-model-assessment を使用する方法を説明しています。
- AWS CLI
-
スキーマ内のすべてのオブジェクトを評価するには
次の
start-metadata-model-assessment例では、ExampleSchemaスキーマ内のすべてのオブジェクトの変換の複雑さの評価をキューに入れます。aws dms start-metadata-model-assessment \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}'出力:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }詳細については、「 Database Migration AWS Service ユーザーガイド」の「データベース移行評価レポートの作成」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のStartMetadataModelAssessment
」を参照してください。
-
次の例は、start-metadata-model-conversion を使用する方法を説明しています。
- AWS CLI
-
スキーマ内のすべてのオブジェクトを変換するには
次の
start-metadata-model-conversion例では、ExampleSchemaスキーマ内のすべてのオブジェクトをターゲットデータベース形式に変換します。aws dms start-metadata-model-conversion \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}'出力:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }詳細については、「 Database AWS Migration Service ユーザーガイド」の「データベーススキーマの変換」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のStartMetadataModelConversion
」を参照してください。
-
次の例は、start-metadata-model-creation を使用する方法を説明しています。
- AWS CLI
-
SQL ステートメントのメタデータモデルを作成するには
次の の
start-metadata-model-creation例では、SQL ステートメントのメタデータモデルの作成をキューに入れます。選択ルールは、メタデータモデルが配置されるスキーマを指定し、後続のオペレーションで使用する一意の識別子--metadata-model-nameを提供します。aws dms start-metadata-model-creation \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "database-name": "ExampleDatabase", "schema-name": "ExampleSchema"}, "rule-action": "explicit"}]}' \ --metadata-model-nameExampleStatement\ --properties StatementProperties={Definition="SELECT * FROM ExampleTable;"}出力:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「ステートメントメタデータモデルの作成」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のStartMetadataModelCreation
」を参照してください。
-
次の例は、start-metadata-model-export-as-script を使用する方法を説明しています。
- AWS CLI
-
変換されたメタデータモデルを DDL スクリプトとしてエクスポートするには
次の の
start-metadata-model-export-as-script例では、ExampleSchemaスキーマ内のすべてのオブジェクトの変換されたメタデータモデルをデータ定義言語 (DDL) スクリプトとして、移行プロジェクトに関連付けられた Amazon S3 バケットにエクスポートします。aws dms start-metadata-model-export-as-script \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-target-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}' \ --originTARGET\ --file-nameExampleScript出力:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }詳細については、AWS 「 Database Migration Service ユーザーガイド」の「変換したコードを SQL ファイルに保存」を参照してください。
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のStartMetadataModelExportAsScript
」を参照してください。
-
次の例は、start-metadata-model-export-to-target を使用する方法を説明しています。
- AWS CLI
-
変換されたメタデータモデルをターゲットデータベースにエクスポートするには
次の の
start-metadata-model-export-to-target例では、ExampleSchemaスキーマ内のすべてのオブジェクトの変換されたメタデータモデルのターゲットデータベースへのエクスポートをキューに入れます。aws dms start-metadata-model-export-to-target \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-target-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}' \ --overwrite-extension-pack出力:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }詳細については、「 Database Migration Service ユーザーガイド」の「変換されたコードの適用」を参照してください。 AWS
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のStartMetadataModelExportToTarget
」を参照してください。
-
次の例は、start-metadata-model-import を使用する方法を説明しています。
- AWS CLI
-
ソースデータベースからメタデータをインポートするには
次の の
start-metadata-model-import例では、ソースデータベースからExampleSchemaスキーマ内のすべてのオブジェクトのメタデータインポートをキューに入れます。aws dms start-metadata-model-import \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}' \ --originSOURCE\ --no-refresh出力:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }詳細については、「 Database Migration Service ユーザーガイド」の「メタデータモデルツリーのナビゲート」を参照してください。 AWS
-
API の詳細については、AWS CLI 「 コマンドリファレンス」のStartMetadataModelImport
」を参照してください。
-
次の例は、start-replication-task-assessment を使用する方法を説明しています。
- AWS CLI
-
タスク評価を開始するには
次の
start-replication-task-assessmentの例では、レプリケーションタスクの評価を開始しています。aws dms start-replication-task-assessment \ --replication-task-arnarn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII出力:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted..., "ReplicationTaskSettings": ...output omitted..., "Status": "testing", "StopReason": "Stop Reason FULL_LOAD_ONLY_FINISHED", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590789988.677, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }詳細については、「AWS Database Migration Service ユーザーガイド」の「Creating a Task Assessment Report」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「StartReplicationTaskAssessment
」を参照してください。
-
次のコード例は、start-replication-task を使用する方法を示しています。
- AWS CLI
-
レプリケーションタスクを開始するには
次の の
command-name例では、 AWS アカウントで使用可能なウィジェットを一覧表示します。aws dms start-replication-task \ --replication-task-arnarn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII\ --start-replication-task-typereload-target出力:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted... , "ReplicationTaskSettings": ...output omitted... , "Status": "starting", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590619805.212, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS タスクの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「StartReplicationTask
」を参照してください。
-
次のコード例は、stop-replication-task を使用する方法を示しています。
- AWS CLI
-
タスクを停止するには
次の
stop-replication-taskの例ではタスクを停止しています。aws dms stop-replication-task \ --replication-task-arnarn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII出力:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted..., "ReplicationTaskSettings": ...output omitted..., "Status": "stopping", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590789424.653, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }詳細については、AWS 「 Database Migration Service ユーザーガイドAWS 」の「DMS タスクの使用」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「StopReplicationTask
」を参照してください。
-
次のコード例は、test-connection を使用する方法を示しています。
- AWS CLI
-
エンドポイントへの接続をテストするには
次の
test-connectionの例では、レプリケーションインスタンスからエンドポイントにアクセスできるかどうかをテストしています。aws dms test-connection \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA出力:
{ "Connection": { "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "Status": "testing", "EndpointIdentifier": "src-database-1", "ReplicationInstanceIdentifier": "my-repl-instance" } }詳細については、「AWS Database Migration Service ユーザーガイド」の「Creating source and target endpoints」を参照してください。
-
API の詳細については、「AWS CLI コマンドリファレンス」の「TestConnection
」を参照してください。
-