Skip to content

list_backups

list_backups(
    *,
    config_overrides: Optional[DynamoDBClientConfig] = None,
    table_name: Optional[TableArn] = None,
    limit: Optional[BackupsInputLimit] = None,
    time_range_lower_bound: Optional[TimeRangeLowerBound] = None,
    time_range_upper_bound: Optional[TimeRangeUpperBound] = None,
    exclusive_start_backup_arn: Optional[BackupArn] = None,
    backup_type: Optional[BackupTypeFilter] = None,
) -> ListBackupsOutput

List DynamoDB backups that are associated with an Amazon Web Services account and weren't made with Amazon Web Services Backup. To list these backups for a given table, specify TableName. ListBackups returns a paginated list of results with at most 1 MB worth of items in a page. You can also specify a maximum number of entries to be returned in a page.

In the request, start time is inclusive, but end time is exclusive. Note that these boundaries are for the time at which the original backup was requested.

You can call ListBackups a maximum of five times per second.

If you want to retrieve the complete list of backups made with Amazon Web Services Backup, use the Amazon Web Services Backup list API.

Parameters:

  • table_name (Optional[TableArn], default: None ) –

    Lists the backups from the table specified in TableName. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

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

    Maximum number of backups to return at once.

  • time_range_lower_bound (Optional[TimeRangeLowerBound], default: None ) –

    Only backups created after this time are listed. TimeRangeLowerBound is inclusive.

  • time_range_upper_bound (Optional[TimeRangeUpperBound], default: None ) –

    Only backups created before this time are listed. TimeRangeUpperBound is exclusive.

  • exclusive_start_backup_arn (Optional[BackupArn], default: None ) –

    LastEvaluatedBackupArn is the Amazon Resource Name (ARN) of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the ExclusiveStartBackupArn of a new ListBackups operation in order to fetch the next page of results.

  • backup_type (Optional[BackupTypeFilter], default: None ) –

    The backups from the table specified by BackupType are listed.

    Where BackupType can be:

    • USER - On-demand backup created by you. (The default setting if no other backup types are specified.)

    • SYSTEM - On-demand backup automatically created by DynamoDB.

    • ALL - All types of on-demand backups (USER and SYSTEM).

Raises:

Source code in docs_src/capo_dynamodb/_services/dynamo_db.py
def list_backups(
    self,
    *,
    config_overrides: Optional[DynamoDBClientConfig] = None,
    table_name: Optional["capo_dynamodb.types.table_arn.TableArn"] = None,
    limit: Optional[
        "capo_dynamodb.types.backups_input_limit.BackupsInputLimit"
    ] = None,
    time_range_lower_bound: Optional[
        "capo_dynamodb.types.time_range_lower_bound.TimeRangeLowerBound"
    ] = None,
    time_range_upper_bound: Optional[
        "capo_dynamodb.types.time_range_upper_bound.TimeRangeUpperBound"
    ] = None,
    exclusive_start_backup_arn: Optional[
        "capo_dynamodb.types.backup_arn.BackupArn"
    ] = None,
    backup_type: Optional[
        "capo_dynamodb.types.backup_type_filter.BackupTypeFilter"
    ] = None,
) -> "capo_dynamodb.types.list_backups_output.ListBackupsOutput":
    """<p>List DynamoDB backups that are associated with an Amazon Web Services account and weren't made with Amazon Web Services Backup. To list these backups for a given table, specify <code>TableName</code>. <code>ListBackups</code> returns a paginated list of results with at most 1 MB worth of items in a page. You can also specify a maximum number of entries to be returned in a page.</p> <p>In the request, start time is inclusive, but end time is exclusive. Note that these boundaries are for the time at which the original backup was requested.</p> <p>You can call <code>ListBackups</code> a maximum of five times per second.</p> <p>If you want to retrieve the complete list of backups made with Amazon Web Services Backup, use the <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_ListBackupJobs.html">Amazon Web Services Backup list API.</a> </p>

    Args:
        table_name: <p>Lists the backups from the table specified in <code>TableName</code>. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.</p>
        limit: <p>Maximum number of backups to return at once.</p>
        time_range_lower_bound: <p>Only backups created after this time are listed. <code>TimeRangeLowerBound</code> is inclusive.</p>
        time_range_upper_bound: <p>Only backups created before this time are listed. <code>TimeRangeUpperBound</code> is exclusive. </p>
        exclusive_start_backup_arn: <p> <code>LastEvaluatedBackupArn</code> is the Amazon Resource Name (ARN) of the backup last evaluated when the current page of results was returned, inclusive of the current page of results. This value may be specified as the <code>ExclusiveStartBackupArn</code> of a new <code>ListBackups</code> operation in order to fetch the next page of results. </p>
        backup_type: <p>The backups from the table specified by <code>BackupType</code> are listed.</p> <p>Where <code>BackupType</code> can be:</p> <ul> <li> <p> <code>USER</code> - On-demand backup created by you. (The default setting if no other backup types are specified.)</p> </li> <li> <p> <code>SYSTEM</code> - On-demand backup automatically created by DynamoDB.</p> </li> <li> <p> <code>ALL</code> - All types of on-demand backups (USER and SYSTEM).</p> </li> </ul>

    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_backups_input.ListBackupsInput]",
    ) -> OperationResponse[
        "capo_dynamodb.types.list_backups_output.ListBackupsOutput"
    ]:
        import capo_dynamodb._operations.dynamo_db_20120810.list_backups

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBackups")
    )
    input_: capo_dynamodb.types.list_backups_input.ListBackupsInput = {}
    if table_name is not None:
        input_["table_name"] = table_name
    if limit is not None:
        input_["limit"] = limit
    if time_range_lower_bound is not None:
        input_["time_range_lower_bound"] = time_range_lower_bound
    if time_range_upper_bound is not None:
        input_["time_range_upper_bound"] = time_range_upper_bound
    if exclusive_start_backup_arn is not None:
        input_["exclusive_start_backup_arn"] = exclusive_start_backup_arn
    if backup_type is not None:
        input_["backup_type"] = backup_type

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