View a markdown version of this page

GetTableMigration - Amazon S3

GetTableMigration

Gets the details of a migration, including its state, the reason it failed, its statistics and the location of its reports. Identify the migration by its migrationId, or specify the tableARN of a destination table to get that table's most recent migration.

Permissions
  • You must have the s3tables:GetTableMigration permission to use this operation.

Request Syntax

GET /get-table-migration?migrationId=migrationId&tableARN=tableARN HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

migrationId

The ID of the migration to get. Specify either migrationId or tableARN, not both.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-z0-9-]+

tableARN

The Amazon Resource Name (ARN) of the destination table. Gets the table's most recent migration. Specify either tableARN or migrationId, not both.

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: (arn:aws[-a-z0-9]*:[a-z0-9]+:[-a-z0-9]*:[0-9]{12}:bucket/[a-z0-9_-]{3,63}/table/[a-zA-Z0-9-_]{1,255})

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "createdAt": "string", "dataMigration": { "maintenanceSettings": { "icebergCompaction": { "strategy": "string", "targetFileSizeMB": number }, "icebergSnapshotManagement": { "maxSnapshotAgeHours": number, "minSnapshotsToKeep": number } }, "migrationPolicies": { "incompatibleValuesPolicy": "string", "unmatchedSourceFieldsPolicy": "string" } }, "failureReason": { "code": "string", "detail": "string" }, "hasValidPlan": boolean, "migrationId": "string", "migrationOutput": { "bucket": "string", "objectCompatibilityReport": { "checksumCRC64NVME": "string", "invalidFindings": { "string" : number }, "key": "string", "prefix": "string" }, "objectMigrationReport": { "checksumCRC64NVME": "string", "invalidFindings": { "string" : number }, "key": "string", "prefix": "string" }, "tableCompatibilityReport": { "checksumCRC64NVME": "string", "invalidFindings": { "string" : number }, "key": "string", "prefix": "string" } }, "migrationStats": { "objectsFailedMigration": number, "objectsMigrated": number, "objectsPendingMigration": number }, "name": "string", "namespace": "string", "planningStats": { "objectsPlanned": number, "objectsScanned": number, "partitionCount": number }, "reviewMigrationPlan": boolean, "roleARN": "string", "source": { ... }, "sourceType": "string", "state": "string", "stateUpdatedAt": "string", "tableARN": "string", "tableBucketARN": "string", "type": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

createdAt

The date and time that the migration was created.

Type: Timestamp

dataMigration

The maintenance settings and migration policies for the destination table.

Type: DataMigrationOverview object

failureReason

The reason that the migration failed. The code names the cause, such as a migration role that S3 Tables can't assume or an AWS Glue table that doesn't exist, or the report that lists the findings. This value is returned only when the migration is in the failed state.

Type: MigrationFailureReason object

hasValidPlan

A Boolean value that specifies whether planning produced a plan that the migration can run. If planning hasn't finished, this value isn't returned.

Type: Boolean

migrationId

The ID of the migration.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-z0-9-]+

migrationOutput

The bucket and prefixes for the migration's reports, and the location of each report once it is written.

Type: MigrationOutputOverview object

migrationStats

The number of objects that migrated, failed or are pending. These counts are set when planning finishes and updated when the migration ends.

Type: MigrationStats object

name

The name of the destination table.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [0-9a-z_]*

namespace

The namespace of the destination table.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [0-9a-z_]*

planningStats

Statistics about the source and the partitions in the migration. This value is returned after planning finishes.

Type: PlanningStats object

reviewMigrationPlan

A Boolean value that specifies whether the migration waits in the pendingReview state, so that you can review the compatibility reports before it migrates any data.

Type: Boolean

roleARN

The Amazon Resource Name (ARN) of the IAM role that the migration uses.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:aws[-a-z0-9]*:iam::[0-9]{12}:role/.+

source

The source table of the migration.

Type: SourceConfiguration object

Note: This object is a Union. Only one member of this object can be specified or returned.

sourceType

The type of the migration's source.

Type: String

Valid Values: glueTable

state

The state of the migration. Valid values:

  • new - S3 Tables accepted the request.

  • planning - The migration is checking the source table, its objects and the destination for compatibility, and writing the compatibility reports.

  • pendingReview - Planning finished, and the migration waits for you to continue or cancel it with UpdateTableMigration.

  • queued - The migration is waiting to start migrating data.

  • migrating - The migration is running the plan from the planning state: it copies data and commits it to the destination table. A migration reaches this state only if hasValidPlan is true.

  • succeeded - Every planned object migrated.

  • failed - The migration failed. Check failureReason for the cause.

  • cancelling - You cancelled the migration, and it is finishing the work in progress.

  • cancelled - The migration is cancelled.

A migration ends in the succeeded, failed or cancelled state. You can cancel it until it ends.

Type: String

Valid Values: new | planning | pendingReview | queued | migrating | succeeded | failed | cancelling | cancelled

stateUpdatedAt

The date and time that the migration's state last changed.

Type: Timestamp

tableARN

The Amazon Resource Name (ARN) of the destination table, once the migration creates it.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: (arn:aws[-a-z0-9]*:[a-z0-9]+:[-a-z0-9]*:[0-9]{12}:bucket/[a-z0-9_-]{3,63}/table/[a-zA-Z0-9-_]{1,255})

tableBucketARN

The Amazon Resource Name (ARN) of the table bucket that contains the destination table.

Type: String

Pattern: (arn:aws[-a-z0-9]*:[a-z0-9]+:[-a-z0-9]*:[0-9]{12}:bucket/[a-z0-9_-]{3,63})

type

The type of the migration. Valid values:

  • start - A migration that StartTableMigration started.

  • sync - A migration that SyncTableMigration started.

Type: String

Valid Values: start | sync

Errors

AccessDeniedException

The action cannot be performed because you do not have the required permission.

HTTP Status Code: 403

BadRequestException

The request is invalid or malformed.

HTTP Status Code: 400

ForbiddenException

The caller isn't authorized to make the request.

HTTP Status Code: 403

InternalServerErrorException

The request failed due to an internal server error.

HTTP Status Code: 500

NotFoundException

The request was rejected because the specified resource could not be found.

HTTP Status Code: 404

TooManyRequestsException

The limit on the number of requests per second was exceeded.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: