Skip to content

list_global_tables

list_global_tables(
    *,
    config_overrides: Optional[DynamoDBClientConfig] = None,
    exclusive_start_global_table_name: Optional[TableName] = None,
    limit: Optional[PositiveIntegerObject] = None,
    region_name: Optional[RegionName] = None,
) -> ListGlobalTablesOutput

Lists all global tables that have a replica in the specified Region.

This documentation is for version 2017.11.29 (Legacy) of global tables, which should be avoided for new global tables. Customers should use Global Tables version 2019.11.21 (Current) when possible, because it provides greater flexibility, higher efficiency, and consumes less write capacity than 2017.11.29 (Legacy).

To determine which version you're using, see Determining the global table version you are using. To update existing global tables from version 2017.11.29 (Legacy) to version 2019.11.21 (Current), see Upgrading global tables.

Parameters:

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

    The first global table name that this operation will evaluate.

  • limit (Optional[PositiveIntegerObject], default: None ) –

    The maximum number of table names to return, if the parameter is not specified DynamoDB defaults to 100.

    If the number of global tables DynamoDB finds reaches this limit, it stops the operation and returns the table names collected up to that point, with a table name in the LastEvaluatedGlobalTableName to apply in a subsequent operation to the ExclusiveStartGlobalTableName parameter.

  • region_name (Optional[RegionName], default: None ) –

    Lists the global tables in a specific Region.

Raises:

Source code in docs_src/capo_dynamodb/_services/dynamo_db.py
def list_global_tables(
    self,
    *,
    config_overrides: Optional[DynamoDBClientConfig] = None,
    exclusive_start_global_table_name: Optional[
        "capo_dynamodb.types.table_name.TableName"
    ] = None,
    limit: Optional[
        "capo_dynamodb.types.positive_integer_object.PositiveIntegerObject"
    ] = None,
    region_name: Optional["capo_dynamodb.types.region_name.RegionName"] = None,
) -> "capo_dynamodb.types.list_global_tables_output.ListGlobalTablesOutput":
    """<p>Lists all global tables that have a replica in the specified Region.</p> <important> <p>This documentation is for version 2017.11.29 (Legacy) of global tables, which should be avoided for new global tables. Customers should use <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html">Global Tables version 2019.11.21 (Current)</a> when possible, because it provides greater flexibility, higher efficiency, and consumes less write capacity than 2017.11.29 (Legacy).</p> <p>To determine which version you're using, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.DetermineVersion.html">Determining the global table version you are using</a>. To update existing global tables from version 2017.11.29 (Legacy) to version 2019.11.21 (Current), see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_upgrade.html">Upgrading global tables</a>.</p> </important>

    Args:
        exclusive_start_global_table_name: <p>The first global table name that this operation will evaluate.</p>
        limit: <p>The maximum number of table names to return, if the parameter is not specified DynamoDB defaults to 100.</p> <p>If the number of global tables DynamoDB finds reaches this limit, it stops the operation and returns the table names collected up to that point, with a table name in the <code>LastEvaluatedGlobalTableName</code> to apply in a subsequent operation to the <code>ExclusiveStartGlobalTableName</code> parameter.</p>
        region_name: <p>Lists the global tables in a specific Region.</p>

    Raises:
        capo_dynamodb.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_dynamodb.errors.invalid_endpoint_exception.InvalidEndpointException
        capo_dynamodb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_dynamodb.types.list_global_tables_input.ListGlobalTablesInput]",
    ) -> OperationResponse[
        "capo_dynamodb.types.list_global_tables_output.ListGlobalTablesOutput"
    ]:
        import capo_dynamodb._operations.dynamo_db_20120810.list_global_tables

        output, http_response = (
            capo_dynamodb._operations.dynamo_db_20120810.list_global_tables.list_global_tables(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListGlobalTables")
    )
    input_: capo_dynamodb.types.list_global_tables_input.ListGlobalTablesInput = {}
    if exclusive_start_global_table_name is not None:
        input_["exclusive_start_global_table_name"] = (
            exclusive_start_global_table_name
        )
    if limit is not None:
        input_["limit"] = limit
    if region_name is not None:
        input_["region_name"] = region_name

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