sync_table_migration
async
¶
sync_table_migration(
role_arn: RoleArn,
table_arn: TableARN,
migration_output: MigrationOutputConfiguration,
*,
config_overrides: Optional[AsyncS3TablesClientConfig] = None,
review_migration_plan: Optional[bool] = None,
) -> SyncTableMigrationResponse
Migrates the changes in the source table since the previous start or sync, such as added and deleted source objects, into the destination table. The sync runs asynchronously: this operation returns the migration ID of the sync and its initial state, and you track progress with GetTableMigration.
A sync uses the source, destination, and data migration settings of the table's migration, and plans the work and writes its reports in the same way as StartTableMigration. You can sync after a start or sync that succeeded, failed, or was cancelled, if an earlier start or sync of the table has a valid plan (hasValidPlan). You can't sync a table while a start or sync is in progress for it, and you can sync a table until you call CompleteTableMigration for it.
If you overwrite a source object after an earlier migration migrated it, the sync fails. If no earlier start or sync of the table has a valid plan, you can't sync the table. To migrate it again, delete the destination table and start a new migration.
- Permissions
-
-
You must have the
s3tables:SyncTableMigrationpermission to use this operation. -
You must have the
iam:PassRolepermission on the role that you specify inroleARN, with a condition that allows passing it tomigration.s3tables.amazonaws.com. Set theiam:AssociatedResourceArncondition key to the table ARN.
-
Parameters:
-
role_arn(RoleArn) –The Amazon Resource Name (ARN) of the IAM role that the sync uses to read the source table and its data and to write the destination table and the reports. The role must be in your account, and its trust policy must allow
migration.s3tables.amazonaws.comto assume it. You can limit the trust policy to the destination table bucket with theaws:SourceArnandaws:SourceAccountcondition keys. -
table_arn(TableARN) –The Amazon Resource Name (ARN) of the destination table to sync. The table must have a migration, and you must not have called
CompleteTableMigrationfor it. -
review_migration_plan(Optional[bool], default:None) –Specifies whether the sync waits in the
pendingReviewstate, so that you can review the compatibility reports before it migrates any data. Valid values:-
true- The sync waits inpendingReviewuntil you callUpdateTableMigrationwithrequestedStateset toqueued. If you don't continue or cancel the sync within 30 days, the sync fails withinternalError. -
false- The sync continues without waiting for review. This is the default.
-
-
migration_output(MigrationOutputConfiguration) –The bucket and prefixes that the sync writes its reports to. The bucket must be a general purpose bucket in your account and in the same Region as the table bucket, and the migration role must be able to write objects to it. Otherwise, the migration fails when it writes its first report.
Raises:
-
AccessDeniedException–The action cannot be performed because you do not have the required permission.
-
BadRequestException–The request is invalid or malformed.
-
ConflictException–The request conflicts with the resource's current state, such as a previous write, an existing table, or a migration that's in progress or already in the requested state. If the conflict is with a concurrent write, you can retry the request.
-
ForbiddenException–The caller isn't authorized to make the request.
-
InternalServerErrorException–The request failed due to an internal server error.
-
NotFoundException–The request was rejected because the specified resource could not be found.
-
TooManyRequestsException–The limit on the number of requests per second was exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_s3tables/_services/async_s3_tables.py
3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 | |