A low-level client representing AWS Backup Storage The frontend service for Cryo Storage.:
client = session.create_client('backupstorage')
These are the available methods:
Check if an operation can be paginated.
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")
.
True
if the operation can be paginated,
False
otherwise.
Closes underlying endpoint connections.
Delete Object from the incremental base Backup.
See also: AWS API Documentation
Request Syntax
response = client.delete_object(
BackupJobId='string',
ObjectName='string'
)
BackupJobId (string) – [REQUIRED] Backup job Id for the in-progress backup.
ObjectName (string) – [REQUIRED] The name of the Object.
None
Exceptions
Gets the specified object’s chunk.
See also: AWS API Documentation
Request Syntax
response = client.get_chunk(
StorageJobId='string',
ChunkToken='string'
)
StorageJobId (string) – [REQUIRED] Storage job id
ChunkToken (string) – [REQUIRED] Chunk token
dict
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
Get metadata associated with an Object.
See also: AWS API Documentation
Request Syntax
response = client.get_object_metadata(
StorageJobId='string',
ObjectToken='string'
)
StorageJobId (string) – [REQUIRED] Backup job id for the in-progress backup.
ObjectToken (string) – [REQUIRED] Object token.
dict
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
Create a paginator for an operation.
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")
.
OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate
method to
check if an operation is pageable.
L{botocore.paginate.Paginator}
A paginator object.
Returns an object that can wait for some condition.
waiter_name (str) – The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
The specified waiter object.
botocore.waiter.Waiter
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'
)
StorageJobId (string) – [REQUIRED] Storage job id
ObjectToken (string) – [REQUIRED] Object token
MaxResults (integer) – Maximum number of chunks
NextToken (string) – Pagination token
dict
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
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)
)
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
dict
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
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'
)
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.
dict
Response Syntax
{
'ObjectChecksum': 'string',
'ObjectChecksumAlgorithm': 'SUMMARY'
}
Response Structure
(dict) –
ObjectChecksum (string) – Object checksum
ObjectChecksumAlgorithm (string) – Checksum algorithm
Exceptions
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'
)
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
dict
Response Syntax
{
'ChunkChecksum': 'string',
'ChunkChecksumAlgorithm': 'SHA256'
}
Response Structure
(dict) –
ChunkChecksum (string) – Chunk checksum
ChunkChecksumAlgorithm (string) – Checksum algorithm
Exceptions
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
)
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.
dict
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
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
)
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.
dict
Response Syntax
{
'UploadId': 'string'
}
Response Structure
(dict) –
UploadId (string) – Upload Id for a given upload.
Exceptions
Client exceptions are available on a client instance via the exceptions
property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.
The available client exceptions are:
Example
try:
...
except client.exceptions.AccessDeniedException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Non-retryable exception. Attempted to create already existing object or chunk. This message contains a checksum of already presented data.
Example
try:
...
except client.exceptions.DataAlreadyExistsException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Checksum': 'string',
'ChecksumAlgorithm': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) – Non-retryable exception. Attempted to create already existing object or chunk. This message contains a checksum of already presented data.
Message (string) –
Checksum (string) – Data checksum used
ChecksumAlgorithm (string) – Checksum algorithm used
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Non-retryable exception, indicates client error (wrong argument passed to API). See exception message for details.
Example
try:
...
except client.exceptions.IllegalArgumentException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) – Non-retryable exception, indicates client error (wrong argument passed to API). See exception message for details.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Non-retryable exception. Indicates the KMS key usage is incorrect. See exception message for details.
Example
try:
...
except client.exceptions.KMSInvalidKeyUsageException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) – Non-retryable exception. Indicates the KMS key usage is incorrect. See exception message for details.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Retryalble exception. Indicated issues while reading an input stream due to the networking issues or connection drop on the client side.
Example
try:
...
except client.exceptions.NotReadableInputStreamException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) – Retryalble exception. Indicated issues while reading an input stream due to the networking issues or connection drop on the client side.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Non-retryable exception. Attempted to make an operation on non-existing or expired resource.
Example
try:
...
except client.exceptions.ResourceNotFoundException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) – Non-retryable exception. Attempted to make an operation on non-existing or expired resource.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Retryable exception. In general indicates internal failure that can be fixed by retry.
Example
try:
...
except client.exceptions.RetryableException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) – Retryable exception. In general indicates internal failure that can be fixed by retry.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Deprecated. To be removed from the model.
Example
try:
...
except client.exceptions.ServiceInternalException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) – Deprecated. To be removed from the model.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Retryable exception, indicates internal server error.
Example
try:
...
except client.exceptions.ServiceUnavailableException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) – Retryable exception, indicates internal server error.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
Increased rate over throttling limits. Can be retried with exponential backoff.
Example
try:
...
except client.exceptions.ThrottlingException as e:
print(e.response)
The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) – Increased rate over throttling limits. Can be retried with exponential backoff.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
The available paginators are: