BackupStorage

Table of Contents

Client

class BackupStorage.Client

A low-level client representing AWS Backup Storage The frontend service for Cryo Storage.:

import boto3

client = boto3.client('backupstorage')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
close()

Closes underlying endpoint connections.

delete_object(**kwargs)

Delete Object from the incremental base Backup.

See also: AWS API Documentation

Request Syntax

response = client.delete_object(
    BackupJobId='string',
    ObjectName='string'
)
Parameters
  • BackupJobId (string) -- [REQUIRED] Backup job Id for the in-progress backup.
  • ObjectName (string) -- [REQUIRED] The name of the Object.
Returns

None

Exceptions

  • BackupStorage.Client.exceptions.ServiceUnavailableException
  • BackupStorage.Client.exceptions.ServiceInternalException
  • BackupStorage.Client.exceptions.RetryableException
  • BackupStorage.Client.exceptions.IllegalArgumentException
  • BackupStorage.Client.exceptions.ResourceNotFoundException
  • BackupStorage.Client.exceptions.ThrottlingException
  • BackupStorage.Client.exceptions.AccessDeniedException
get_chunk(**kwargs)

Gets the specified object's chunk.

See also: AWS API Documentation

Request Syntax

response = client.get_chunk(
    StorageJobId='string',
    ChunkToken='string'
)
Parameters
  • StorageJobId (string) -- [REQUIRED] Storage job id
  • ChunkToken (string) -- [REQUIRED] Chunk token
Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --
    • Data (StreamingBody) -- Chunk data
    • Length (integer) -- Data length
    • Checksum (string) -- Data checksum
    • ChecksumAlgorithm (string) -- Checksum algorithm

Exceptions

  • BackupStorage.Client.exceptions.IllegalArgumentException
  • BackupStorage.Client.exceptions.RetryableException
  • BackupStorage.Client.exceptions.ResourceNotFoundException
  • BackupStorage.Client.exceptions.ServiceInternalException
  • BackupStorage.Client.exceptions.ThrottlingException
  • BackupStorage.Client.exceptions.KMSInvalidKeyUsageException
  • BackupStorage.Client.exceptions.AccessDeniedException
get_object_metadata(**kwargs)

Get metadata associated with an Object.

See also: AWS API Documentation

Request Syntax

response = client.get_object_metadata(
    StorageJobId='string',
    ObjectToken='string'
)
Parameters
  • StorageJobId (string) -- [REQUIRED] Backup job id for the in-progress backup.
  • ObjectToken (string) -- [REQUIRED] Object token.
Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --
    • MetadataString (string) -- Metadata string.
    • MetadataBlob (StreamingBody) -- Metadata blob.
    • MetadataBlobLength (integer) -- The size of MetadataBlob.
    • MetadataBlobChecksum (string) -- MetadataBlob checksum.
    • MetadataBlobChecksumAlgorithm (string) -- Checksum algorithm.

Exceptions

  • BackupStorage.Client.exceptions.ServiceUnavailableException
  • BackupStorage.Client.exceptions.ServiceInternalException
  • BackupStorage.Client.exceptions.ResourceNotFoundException
  • BackupStorage.Client.exceptions.RetryableException
  • BackupStorage.Client.exceptions.IllegalArgumentException
  • BackupStorage.Client.exceptions.ThrottlingException
  • BackupStorage.Client.exceptions.KMSInvalidKeyUsageException
  • BackupStorage.Client.exceptions.AccessDeniedException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_chunks(**kwargs)

List chunks in a given Object

See also: AWS API Documentation

Request Syntax

response = client.list_chunks(
    StorageJobId='string',
    ObjectToken='string',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • StorageJobId (string) -- [REQUIRED] Storage job id
  • ObjectToken (string) -- [REQUIRED] Object token
  • MaxResults (integer) -- Maximum number of chunks
  • NextToken (string) -- Pagination token
Return type

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

Exceptions

  • BackupStorage.Client.exceptions.ServiceUnavailableException
  • BackupStorage.Client.exceptions.ResourceNotFoundException
  • BackupStorage.Client.exceptions.ServiceInternalException
  • BackupStorage.Client.exceptions.RetryableException
  • BackupStorage.Client.exceptions.IllegalArgumentException
  • BackupStorage.Client.exceptions.AccessDeniedException
list_objects(**kwargs)

List all Objects in a given Backup.

See also: AWS API Documentation

Request Syntax

response = client.list_objects(
    StorageJobId='string',
    StartingObjectName='string',
    StartingObjectPrefix='string',
    MaxResults=123,
    NextToken='string',
    CreatedBefore=datetime(2015, 1, 1),
    CreatedAfter=datetime(2015, 1, 1)
)
Parameters
  • StorageJobId (string) -- [REQUIRED] Storage job id
  • StartingObjectName (string) -- Optional, specifies the starting Object name to list from. Ignored if NextToken is not NULL
  • StartingObjectPrefix (string) -- Optional, specifies the starting Object prefix to list from. Ignored if NextToken is not NULL
  • MaxResults (integer) -- Maximum objects count
  • NextToken (string) -- Pagination token
  • CreatedBefore (datetime) -- (Optional) Created before filter
  • CreatedAfter (datetime) -- (Optional) Created after filter
Return type

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

Exceptions

  • BackupStorage.Client.exceptions.ServiceUnavailableException
  • BackupStorage.Client.exceptions.ServiceInternalException
  • BackupStorage.Client.exceptions.RetryableException
  • BackupStorage.Client.exceptions.IllegalArgumentException
  • BackupStorage.Client.exceptions.ThrottlingException
  • BackupStorage.Client.exceptions.ResourceNotFoundException
  • BackupStorage.Client.exceptions.KMSInvalidKeyUsageException
  • BackupStorage.Client.exceptions.AccessDeniedException
notify_object_complete(**kwargs)

Complete upload

See also: AWS API Documentation

Request Syntax

response = client.notify_object_complete(
    BackupJobId='string',
    UploadId='string',
    ObjectChecksum='string',
    ObjectChecksumAlgorithm='SUMMARY',
    MetadataString='string',
    MetadataBlob=b'bytes'|file,
    MetadataBlobLength=123,
    MetadataBlobChecksum='string',
    MetadataBlobChecksumAlgorithm='SHA256'
)
Parameters
  • BackupJobId (string) -- [REQUIRED] Backup job Id for the in-progress backup
  • UploadId (string) -- [REQUIRED] Upload Id for the in-progress upload
  • ObjectChecksum (string) -- [REQUIRED] Object checksum
  • ObjectChecksumAlgorithm (string) -- [REQUIRED] Checksum algorithm
  • MetadataString (string) -- Optional metadata associated with an Object. Maximum string length is 256 bytes.
  • MetadataBlob (bytes or seekable file-like object) -- Optional metadata associated with an Object. Maximum length is 4MB.
  • MetadataBlobLength (integer) -- The size of MetadataBlob.
  • MetadataBlobChecksum (string) -- Checksum of MetadataBlob.
  • MetadataBlobChecksumAlgorithm (string) -- Checksum algorithm.
Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --
    • ObjectChecksum (string) -- Object checksum
    • ObjectChecksumAlgorithm (string) -- Checksum algorithm

Exceptions

  • BackupStorage.Client.exceptions.ServiceUnavailableException
  • BackupStorage.Client.exceptions.ServiceInternalException
  • BackupStorage.Client.exceptions.NotReadableInputStreamException
  • BackupStorage.Client.exceptions.RetryableException
  • BackupStorage.Client.exceptions.IllegalArgumentException
  • BackupStorage.Client.exceptions.ThrottlingException
  • BackupStorage.Client.exceptions.KMSInvalidKeyUsageException
  • BackupStorage.Client.exceptions.AccessDeniedException
put_chunk(**kwargs)

Upload chunk.

See also: AWS API Documentation

Request Syntax

response = client.put_chunk(
    BackupJobId='string',
    UploadId='string',
    ChunkIndex=123,
    Data=b'bytes'|file,
    Length=123,
    Checksum='string',
    ChecksumAlgorithm='SHA256'
)
Parameters
  • BackupJobId (string) -- [REQUIRED] Backup job Id for the in-progress backup.
  • UploadId (string) -- [REQUIRED] Upload Id for the in-progress upload.
  • ChunkIndex (integer) -- [REQUIRED] Describes this chunk's position relative to the other chunks
  • Data (bytes or seekable file-like object) -- [REQUIRED] Data to be uploaded
  • Length (integer) -- [REQUIRED] Data length
  • Checksum (string) -- [REQUIRED] Data checksum
  • ChecksumAlgorithm (string) -- [REQUIRED] Checksum algorithm
Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --
    • ChunkChecksum (string) -- Chunk checksum
    • ChunkChecksumAlgorithm (string) -- Checksum algorithm

Exceptions

  • BackupStorage.Client.exceptions.ServiceUnavailableException
  • BackupStorage.Client.exceptions.ServiceInternalException
  • BackupStorage.Client.exceptions.NotReadableInputStreamException
  • BackupStorage.Client.exceptions.RetryableException
  • BackupStorage.Client.exceptions.IllegalArgumentException
  • BackupStorage.Client.exceptions.ThrottlingException
  • BackupStorage.Client.exceptions.KMSInvalidKeyUsageException
  • BackupStorage.Client.exceptions.AccessDeniedException
put_object(**kwargs)

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

response = 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
)
Parameters
  • BackupJobId (string) -- [REQUIRED] Backup job Id for the in-progress backup.
  • ObjectName (string) -- [REQUIRED] The name of the Object to be uploaded.
  • MetadataString (string) -- Store user defined metadata like backup checksum, disk ids, restore metadata etc.
  • InlineChunk (bytes or seekable file-like object) -- Inline chunk data to be uploaded.
  • InlineChunkLength (integer) -- Length of the inline chunk data.
  • InlineChunkChecksum (string) -- Inline chunk checksum
  • InlineChunkChecksumAlgorithm (string) -- Inline chunk checksum algorithm
  • ObjectChecksum (string) -- object checksum
  • ObjectChecksumAlgorithm (string) -- object checksum algorithm
  • ThrowOnDuplicate (boolean) -- Throw an exception if Object name is already exist.
Return type

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

Exceptions

  • BackupStorage.Client.exceptions.ServiceUnavailableException
  • BackupStorage.Client.exceptions.ServiceInternalException
  • BackupStorage.Client.exceptions.NotReadableInputStreamException
  • BackupStorage.Client.exceptions.RetryableException
  • BackupStorage.Client.exceptions.IllegalArgumentException
  • BackupStorage.Client.exceptions.ThrottlingException
  • BackupStorage.Client.exceptions.KMSInvalidKeyUsageException
  • BackupStorage.Client.exceptions.AccessDeniedException
start_object(**kwargs)

Start upload containing one or many chunks.

See also: AWS API Documentation

Request Syntax

response = client.start_object(
    BackupJobId='string',
    ObjectName='string',
    ThrowOnDuplicate=True|False
)
Parameters
  • BackupJobId (string) -- [REQUIRED] Backup job Id for the in-progress backup
  • ObjectName (string) -- [REQUIRED] Name for the object.
  • ThrowOnDuplicate (boolean) -- Throw an exception if Object name is already exist.
Return type

dict

Returns

Response Syntax

{
    'UploadId': 'string'
}

Response Structure

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

Exceptions

  • BackupStorage.Client.exceptions.ServiceUnavailableException
  • BackupStorage.Client.exceptions.ServiceInternalException
  • BackupStorage.Client.exceptions.RetryableException
  • BackupStorage.Client.exceptions.IllegalArgumentException
  • BackupStorage.Client.exceptions.ResourceNotFoundException
  • BackupStorage.Client.exceptions.DataAlreadyExistsException
  • BackupStorage.Client.exceptions.ThrottlingException
  • BackupStorage.Client.exceptions.AccessDeniedException

Paginators

The available paginators are: