S3Tables / Client / get_table_record_expiration_job_status

get_table_record_expiration_job_status

S3Tables.Client.get_table_record_expiration_job_status(**kwargs)

Retrieves the status, metrics, and details of the latest record expiration job for a table. This includes when the job ran, and whether it succeeded or failed. If the job ran successfully, this also includes statistics about the records that were removed.

Permissions

You must have the s3tables:GetTableRecordExpirationJobStatus permission to use this operation.

See also: AWS API Documentation

Request Syntax

response = client.get_table_record_expiration_job_status(
    tableArn='string'
)
Parameters:

tableArn (string) –

[REQUIRED]

The Amazon Resource Name (ARN) of the table.

Return type:

dict

Returns:

Response Syntax

{
    'status': 'NotYetRun'|'Successful'|'Failed'|'Disabled',
    'lastRunTimestamp': datetime(2015, 1, 1),
    'failureMessage': 'string',
    'metrics': {
        'deletedDataFiles': 123,
        'deletedRecords': 123,
        'removedFilesSize': 123
    }
}

Response Structure

  • (dict) –

    • status (string) –

      The current status of the most recent expiration job.

    • lastRunTimestamp (datetime) –

      The timestamp when the expiration job was last executed.

    • failureMessage (string) –

      If the job failed, this field contains an error message describing the failure reason.

    • metrics (dict) –

      Metrics about the most recent expiration job execution, including the number of records and files deleted.

      • deletedDataFiles (integer) –

        The total number of data files that were removed when the job ran.

      • deletedRecords (integer) –

        The total number of records that were removed when the job ran.

      • removedFilesSize (integer) –

        The total size (in bytes) of the data files that were removed when the job ran.

Exceptions

  • S3Tables.Client.exceptions.InternalServerErrorException

  • S3Tables.Client.exceptions.MethodNotAllowedException

  • S3Tables.Client.exceptions.ForbiddenException

  • S3Tables.Client.exceptions.NotFoundException

  • S3Tables.Client.exceptions.TooManyRequestsException

  • S3Tables.Client.exceptions.BadRequestException