Skip to content

complete_table_migration async

complete_table_migration(
    table_arn: TableARN, *, config_overrides: Optional[AsyncS3TablesClientConfig] = None
) -> None

Completes the migration of a table. The table's most recent migration must be in the succeeded, failed or cancelled state. After you complete the migration, you can't sync the table again, and you can write to and maintain the table as you do any other table: compaction starts, and unreferenced file removal follows the table bucket's configuration. You can't undo this operation. Calling it again for the same table returns a ConflictException.

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

Parameters:

  • table_arn (TableARN) –

    The Amazon Resource Name (ARN) of the migrated table to complete the migration of.

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
async def complete_table_migration(
    self,
    table_arn: "capo_s3tables.types.table_arn.TableARN",
    *,
    config_overrides: Optional[AsyncS3TablesClientConfig] = None,
) -> None:
    """<p>Completes the migration of a table. The table's most recent migration must be in the <code>succeeded</code>, <code>failed</code> or <code>cancelled</code> state. After you complete the migration, you can't sync the table again, and you can write to and maintain the table as you do any other table: compaction starts, and unreferenced file removal follows the table bucket's configuration. You can't undo this operation. Calling it again for the same table returns a <code>ConflictException</code>.</p> <dl> <dt>Permissions</dt> <dd> <ul> <li> <p>You must have the <code>s3tables:CompleteTableMigration</code> permission to use this operation.</p> </li> </ul> </dd> </dl>

    Args:
        table_arn: <p>The Amazon Resource Name (ARN) of the migrated table to complete the migration of.</p>

    Raises:
        capo_s3tables.errors.access_denied_exception.AccessDeniedException: <p>The action cannot be performed because you do not have the required permission.</p>
        capo_s3tables.errors.bad_request_exception.BadRequestException: <p>The request is invalid or malformed.</p>
        capo_s3tables.errors.conflict_exception.ConflictException: <p>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.</p>
        capo_s3tables.errors.forbidden_exception.ForbiddenException: <p>The caller isn't authorized to make the request.</p>
        capo_s3tables.errors.internal_server_error_exception.InternalServerErrorException: <p>The request failed due to an internal server error.</p>
        capo_s3tables.errors.not_found_exception.NotFoundException: <p>The request was rejected because the specified resource could not be found.</p>
        capo_s3tables.errors.too_many_requests_exception.TooManyRequestsException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_s3tables.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_s3tables.types.complete_table_migration_request.CompleteTableMigrationRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_s3tables._operations.s3_table_buckets.complete_table_migration

        (
            output,
            http_response,
        ) = await capo_s3tables._operations.s3_table_buckets.complete_table_migration.async_complete_table_migration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CompleteTableMigration")
    )
    input_: capo_s3tables.types.complete_table_migration_request.CompleteTableMigrationRequest = {
        "table_arn": table_arn
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output