AWS Backup Storage

2022/08/11 - AWS Backup Storage - 9 new api methods

Changes  This is the first public release of AWS Backup Storage. We are exposing some previously-internal APIs for use by external services. These APIs are not meant to be used directly by customers.

PutObject (new) Link ¶

Upload object that can store object metadata String and data blob in single API call using inline chunk field.

See also: AWS API Documentation

Request Syntax

client.put_object(
    BackupJobId='string',
    ObjectName='string',
    MetadataString='string',
    InlineChunk=b'bytes'|file,
    InlineChunkLength=123,
    InlineChunkChecksum='string',
    InlineChunkChecksumAlgorithm='string',
    ObjectChecksum='string',
    ObjectChecksumAlgorithm='SUMMARY',
    ThrowOnDuplicate=True|False
)
type BackupJobId

string

param BackupJobId

[REQUIRED] Backup job Id for the in-progress backup.

type ObjectName

string

param ObjectName

[REQUIRED] The name of the Object to be uploaded.

type MetadataString

string

param MetadataString

Store user defined metadata like backup checksum, disk ids, restore metadata etc.

type InlineChunk

bytes or seekable file-like object

param InlineChunk

Inline chunk data to be uploaded.

type InlineChunkLength

integer

param InlineChunkLength

Length of the inline chunk data.

type InlineChunkChecksum

string

param InlineChunkChecksum

Inline chunk checksum

type InlineChunkChecksumAlgorithm

string

param InlineChunkChecksumAlgorithm

Inline chunk checksum algorithm

type ObjectChecksum

string

param ObjectChecksum

object checksum

type ObjectChecksumAlgorithm

string

param ObjectChecksumAlgorithm

object checksum algorithm

type ThrowOnDuplicate

boolean

param ThrowOnDuplicate

Throw an exception if Object name is already exist.

rtype

dict

returns

Response Syntax

{
    'InlineChunkChecksum': 'string',
    'InlineChunkChecksumAlgorithm': 'SHA256',
    'ObjectChecksum': 'string',
    'ObjectChecksumAlgorithm': 'SUMMARY'
}

Response Structure

  • (dict) --

    • InlineChunkChecksum (string) -- Inline chunk checksum

    • InlineChunkChecksumAlgorithm (string) -- Inline chunk checksum algorithm

    • ObjectChecksum (string) -- object checksum

    • ObjectChecksumAlgorithm (string) -- object checksum algorithm

StartObject (new) Link ¶

Start upload containing one or many chunks.

See also: AWS API Documentation

Request Syntax

client.start_object(
    BackupJobId='string',
    ObjectName='string',
    ThrowOnDuplicate=True|False
)
type BackupJobId

string

param BackupJobId

[REQUIRED] Backup job Id for the in-progress backup

type ObjectName

string

param ObjectName

[REQUIRED] Name for the object.

type ThrowOnDuplicate

boolean

param ThrowOnDuplicate

Throw an exception if Object name is already exist.

rtype

dict

returns

Response Syntax

{
    'UploadId': 'string'
}

Response Structure

  • (dict) --

    • UploadId (string) -- Upload Id for a given upload.

GetChunk (new) Link ¶

Gets the specified object's chunk.

See also: AWS API Documentation

Request Syntax

client.get_chunk(
    StorageJobId='string',
    ChunkToken='string'
)
type StorageJobId

string

param StorageJobId

[REQUIRED] Storage job id

type ChunkToken

string

param ChunkToken

[REQUIRED] Chunk token

rtype

dict

returns

Response Syntax

{
    'Data': StreamingBody(),
    'Length': 123,
    'Checksum': 'string',
    'ChecksumAlgorithm': 'SHA256'
}

Response Structure

  • (dict) --

    • Data (:class:`.StreamingBody`) -- Chunk data

    • Length (integer) -- Data length

    • Checksum (string) -- Data checksum

    • ChecksumAlgorithm (string) -- Checksum algorithm

DeleteObject (new) Link ¶

Delete Object from the incremental base Backup.

See also: AWS API Documentation

Request Syntax

client.delete_object(
    BackupJobId='string',
    ObjectName='string'
)
type BackupJobId

string

param BackupJobId

[REQUIRED] Backup job Id for the in-progress backup.

type ObjectName

string

param ObjectName

[REQUIRED] The name of the Object.

returns

None

PutChunk (new) Link ¶

Upload chunk.

See also: AWS API Documentation

Request Syntax

client.put_chunk(
    BackupJobId='string',
    UploadId='string',
    ChunkIndex=123,
    Data=b'bytes'|file,
    Length=123,
    Checksum='string',
    ChecksumAlgorithm='SHA256'
)
type BackupJobId

string

param BackupJobId

[REQUIRED] Backup job Id for the in-progress backup.

type UploadId

string

param UploadId

[REQUIRED] Upload Id for the in-progress upload.

type ChunkIndex

integer

param ChunkIndex

[REQUIRED] Describes this chunk's position relative to the other chunks

type Data

bytes or seekable file-like object

param Data

[REQUIRED] Data to be uploaded

type Length

integer

param Length

[REQUIRED] Data length

type Checksum

string

param Checksum

[REQUIRED] Data checksum

type ChecksumAlgorithm

string

param ChecksumAlgorithm

[REQUIRED] Checksum algorithm

rtype

dict

returns

Response Syntax

{
    'ChunkChecksum': 'string',
    'ChunkChecksumAlgorithm': 'SHA256'
}

Response Structure

  • (dict) --

    • ChunkChecksum (string) -- Chunk checksum

    • ChunkChecksumAlgorithm (string) -- Checksum algorithm

GetObjectMetadata (new) Link ¶

Get metadata associated with an Object.

See also: AWS API Documentation

Request Syntax

client.get_object_metadata(
    StorageJobId='string',
    ObjectToken='string'
)
type StorageJobId

string

param StorageJobId

[REQUIRED] Backup job id for the in-progress backup.

type ObjectToken

string

param ObjectToken

[REQUIRED] Object token.

rtype

dict

returns

Response Syntax

{
    'MetadataString': 'string',
    'MetadataBlob': StreamingBody(),
    'MetadataBlobLength': 123,
    'MetadataBlobChecksum': 'string',
    'MetadataBlobChecksumAlgorithm': 'SHA256'
}

Response Structure

  • (dict) --

    • MetadataString (string) -- Metadata string.

    • MetadataBlob (:class:`.StreamingBody`) -- Metadata blob.

    • MetadataBlobLength (integer) -- The size of MetadataBlob.

    • MetadataBlobChecksum (string) -- MetadataBlob checksum.

    • MetadataBlobChecksumAlgorithm (string) -- Checksum algorithm.

NotifyObjectComplete (new) Link ¶

Complete upload

See also: AWS API Documentation

Request Syntax

client.notify_object_complete(
    BackupJobId='string',
    UploadId='string',
    ObjectChecksum='string',
    ObjectChecksumAlgorithm='SUMMARY',
    MetadataString='string',
    MetadataBlob=b'bytes'|file,
    MetadataBlobLength=123,
    MetadataBlobChecksum='string',
    MetadataBlobChecksumAlgorithm='SHA256'
)
type BackupJobId

string

param BackupJobId

[REQUIRED] Backup job Id for the in-progress backup

type UploadId

string

param UploadId

[REQUIRED] Upload Id for the in-progress upload

type ObjectChecksum

string

param ObjectChecksum

[REQUIRED] Object checksum

type ObjectChecksumAlgorithm

string

param ObjectChecksumAlgorithm

[REQUIRED] Checksum algorithm

type MetadataString

string

param MetadataString

Optional metadata associated with an Object. Maximum string length is 256 bytes.

type MetadataBlob

bytes or seekable file-like object

param MetadataBlob

Optional metadata associated with an Object. Maximum length is 4MB.

type MetadataBlobLength

integer

param MetadataBlobLength

The size of MetadataBlob.

type MetadataBlobChecksum

string

param MetadataBlobChecksum

Checksum of MetadataBlob.

type MetadataBlobChecksumAlgorithm

string

param MetadataBlobChecksumAlgorithm

Checksum algorithm.

rtype

dict

returns

Response Syntax

{
    'ObjectChecksum': 'string',
    'ObjectChecksumAlgorithm': 'SUMMARY'
}

Response Structure

  • (dict) --

    • ObjectChecksum (string) -- Object checksum

    • ObjectChecksumAlgorithm (string) -- Checksum algorithm

ListObjects (new) Link ¶

List all Objects in a given Backup.

See also: AWS API Documentation

Request Syntax

client.list_objects(
    StorageJobId='string',
    StartingObjectName='string',
    StartingObjectPrefix='string',
    MaxResults=123,
    NextToken='string',
    CreatedBefore=datetime(2015, 1, 1),
    CreatedAfter=datetime(2015, 1, 1)
)
type StorageJobId

string

param StorageJobId

[REQUIRED] Storage job id

type StartingObjectName

string

param StartingObjectName

Optional, specifies the starting Object name to list from. Ignored if NextToken is not NULL

type StartingObjectPrefix

string

param StartingObjectPrefix

Optional, specifies the starting Object prefix to list from. Ignored if NextToken is not NULL

type MaxResults

integer

param MaxResults

Maximum objects count

type NextToken

string

param NextToken

Pagination token

type CreatedBefore

datetime

param CreatedBefore

(Optional) Created before filter

type CreatedAfter

datetime

param CreatedAfter

(Optional) Created after filter

rtype

dict

returns

Response Syntax

{
    'ObjectList': [
        {
            'Name': 'string',
            'ChunksCount': 123,
            'MetadataString': 'string',
            'ObjectChecksum': 'string',
            'ObjectChecksumAlgorithm': 'SUMMARY',
            'ObjectToken': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ObjectList (list) -- Object list

      • (dict) -- Object

        • Name (string) -- Object name

        • ChunksCount (integer) -- Number of chunks in object

        • MetadataString (string) -- Metadata string associated with the Object

        • ObjectChecksum (string) -- Object checksum

        • ObjectChecksumAlgorithm (string) -- Checksum algorithm

        • ObjectToken (string) -- Object token

    • NextToken (string) -- Pagination token

ListChunks (new) Link ¶

List chunks in a given Object

See also: AWS API Documentation

Request Syntax

client.list_chunks(
    StorageJobId='string',
    ObjectToken='string',
    MaxResults=123,
    NextToken='string'
)
type StorageJobId

string

param StorageJobId

[REQUIRED] Storage job id

type ObjectToken

string

param ObjectToken

[REQUIRED] Object token

type MaxResults

integer

param MaxResults

Maximum number of chunks

type NextToken

string

param NextToken

Pagination token

rtype

dict

returns

Response Syntax

{
    'ChunkList': [
        {
            'Index': 123,
            'Length': 123,
            'Checksum': 'string',
            'ChecksumAlgorithm': 'SHA256',
            'ChunkToken': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ChunkList (list) -- List of chunks

      • (dict) -- Chunk

        • Index (integer) -- Chunk index

        • Length (integer) -- Chunk length

        • Checksum (string) -- Chunk checksum

        • ChecksumAlgorithm (string) -- Checksum algorithm

        • ChunkToken (string) -- Chunk token

    • NextToken (string) -- Pagination token