Skip to content

list_table_migrations

list_table_migrations(
    *,
    config_overrides: Optional[S3TablesClientConfig] = None,
    table_bucket_arn: Optional[TableBucketARN] = None,
    namespace: Optional[NamespaceName] = None,
    name: Optional[TableName] = None,
    table_arn: Optional[TableARN] = None,
    state: Optional[MigrationState] = None,
    has_valid_plan: Optional[bool] = None,
    max_results: Optional[ListTableMigrationsLimit] = None,
    next_token: Optional[NextToken] = None,
) -> ListTableMigrationsResponse

Lists the migrations whose destination is in a table bucket, a namespace or a table. Specify a tableBucketARN to list the migrations into a table bucket, and add a namespace, or a namespace and a name, to narrow the list. Or specify a tableARN to list the migrations into a table.

Migrations are listed newest first. Results are paginated: use maxResults to set the page size, and pass the nextToken from a response to retrieve the next page of results. A page can contain fewer migrations than maxResults, or none, and still return a nextToken. Continue until a response has no nextToken.

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

Parameters:

  • table_bucket_arn (Optional[TableBucketARN], default: None ) –

    The Amazon Resource Name (ARN) of the table bucket to list migrations for.

  • namespace (Optional[NamespaceName], default: None ) –

    The namespace to list migrations for. Requires tableBucketARN.

  • name (Optional[TableName], default: None ) –

    The name of the table to list migrations for. Requires tableBucketARN and namespace.

  • table_arn (Optional[TableARN], default: None ) –

    The Amazon Resource Name (ARN) of the table to list migrations for. The list includes the migrations into this table. To also list migrations into an earlier table of the same name, specify tableBucketARN, namespace and name instead. Specify either tableARN or tableBucketARN, not both.

  • state (Optional[MigrationState], default: None ) –

    The state to filter the list by. For the valid values, see the state member of GetTableMigration.

  • has_valid_plan (Optional[bool], default: None ) –

    The hasValidPlan value to filter the list by. Whichever value you specify, ListTableMigrations lists a migration only after planning records a result.

  • max_results (Optional[ListTableMigrationsLimit], default: None ) –

    The maximum number of migrations to return, from 1 to 1,000. If you don't specify a value, the default is 100.

  • next_token (Optional[NextToken], default: None ) –

    The nextToken from a previous response, to get the next page of results.

Raises:

Source code in docs_src/capo_s3tables/_services/s3_tables.py
def list_table_migrations(
    self,
    *,
    config_overrides: Optional[S3TablesClientConfig] = None,
    table_bucket_arn: Optional[
        "capo_s3tables.types.table_bucket_arn.TableBucketARN"
    ] = None,
    namespace: Optional["capo_s3tables.types.namespace_name.NamespaceName"] = None,
    name: Optional["capo_s3tables.types.table_name.TableName"] = None,
    table_arn: Optional["capo_s3tables.types.table_arn.TableARN"] = None,
    state: Optional["capo_s3tables.types.migration_state.MigrationState"] = None,
    has_valid_plan: Optional[bool] = None,
    max_results: Optional[
        "capo_s3tables.types.list_table_migrations_limit.ListTableMigrationsLimit"
    ] = None,
    next_token: Optional["capo_s3tables.types.next_token.NextToken"] = None,
) -> (
    "capo_s3tables.types.list_table_migrations_response.ListTableMigrationsResponse"
):
    """<p>Lists the migrations whose destination is in a table bucket, a namespace or a table. Specify a <code>tableBucketARN</code> to list the migrations into a table bucket, and add a <code>namespace</code>, or a <code>namespace</code> and a <code>name</code>, to narrow the list. Or specify a <code>tableARN</code> to list the migrations into a table.</p> <p>Migrations are listed newest first. Results are paginated: use <code>maxResults</code> to set the page size, and pass the <code>nextToken</code> from a response to retrieve the next page of results. A page can contain fewer migrations than <code>maxResults</code>, or none, and still return a <code>nextToken</code>. Continue until a response has no <code>nextToken</code>.</p> <dl> <dt>Permissions</dt> <dd> <ul> <li> <p>You must have the <code>s3tables:ListTableMigrations</code> permission to use this operation.</p> </li> </ul> </dd> </dl>

    Args:
        table_bucket_arn: <p>The Amazon Resource Name (ARN) of the table bucket to list migrations for.</p>
        namespace: <p>The namespace to list migrations for. Requires <code>tableBucketARN</code>.</p>
        name: <p>The name of the table to list migrations for. Requires <code>tableBucketARN</code> and <code>namespace</code>.</p>
        table_arn: <p>The Amazon Resource Name (ARN) of the table to list migrations for. The list includes the migrations into this table. To also list migrations into an earlier table of the same name, specify <code>tableBucketARN</code>, <code>namespace</code> and <code>name</code> instead. Specify either <code>tableARN</code> or <code>tableBucketARN</code>, not both.</p>
        state: <p>The state to filter the list by. For the valid values, see the <code>state</code> member of <code>GetTableMigration</code>.</p>
        has_valid_plan: <p>The <code>hasValidPlan</code> value to filter the list by. Whichever value you specify, <code>ListTableMigrations</code> lists a migration only after planning records a result.</p>
        max_results: <p>The maximum number of migrations to return, from 1 to 1,000. If you don't specify a value, the default is 100.</p>
        next_token: <p>The <code>nextToken</code> from a previous response, to get the next page of results.</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.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.
    """

    def _handler(
        req: "OperationRequest[capo_s3tables.types.list_table_migrations_request.ListTableMigrationsRequest]",
    ) -> OperationResponse[
        "capo_s3tables.types.list_table_migrations_response.ListTableMigrationsResponse"
    ]:
        import capo_s3tables._operations.s3_table_buckets.list_table_migrations

        output, http_response = (
            capo_s3tables._operations.s3_table_buckets.list_table_migrations.list_table_migrations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTableMigrations")
    )
    input_: capo_s3tables.types.list_table_migrations_request.ListTableMigrationsRequest = {}
    if table_bucket_arn is not None:
        input_["table_bucket_arn"] = table_bucket_arn
    if namespace is not None:
        input_["namespace"] = namespace
    if name is not None:
        input_["name"] = name
    if table_arn is not None:
        input_["table_arn"] = table_arn
    if state is not None:
        input_["state"] = state
    if has_valid_plan is not None:
        input_["has_valid_plan"] = has_valid_plan
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output