Table of Contents
Snowball.Client¶A low-level client representing Amazon Import/Export Snowball:
client = session.create_client('snowball')
These are the available methods:
can_paginate()cancel_cluster()cancel_job()create_address()create_cluster()create_job()describe_address()describe_addresses()describe_cluster()describe_job()generate_presigned_url()get_job_manifest()get_job_unlock_code()get_paginator()get_snowball_usage()get_waiter()list_cluster_jobs()list_clusters()list_jobs()update_cluster()update_job()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. |
cancel_cluster(**kwargs)¶Cancels a cluster job. You can only cancel a cluster job while it’s in the AwaitingQuorum status. You’ll have at least an hour after creating a cluster job to cancel it.
See also: AWS API Documentation
Request Syntax
response = client.cancel_cluster(
ClusterId='string'
)
| Parameters: | ClusterId (string) – [REQUIRED] The 39-character ID for the cluster that you want to cancel, for example |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
Examples
This operation cancels a cluster job. You can only cancel a cluster job while it’s in the AwaitingQuorum status.
response = client.cancel_cluster(
ClusterId='CID123e4567-e89b-12d3-a456-426655440000',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
cancel_job(**kwargs)¶Cancels the specified job. You can only cancel a job before its JobState value changes to PreparingAppliance . Requesting the ListJobs or DescribeJob action will return a job’s JobState as part of the response element data returned.
See also: AWS API Documentation
Request Syntax
response = client.cancel_job(
JobId='string'
)
| Parameters: | JobId (string) – [REQUIRED] The 39-character job ID for the job that you want to cancel, for example |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
Examples
This operation cancels a job. You can only cancel a job before its JobState value changes to PreparingAppliance.
response = client.cancel_job(
JobId='JID123e4567-e89b-12d3-a456-426655440000',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
create_address(**kwargs)¶Creates an address for a Snowball to be shipped to. In most regions, addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown.
See also: AWS API Documentation
Request Syntax
response = client.create_address(
Address={
'AddressId': 'string',
'Name': 'string',
'Company': 'string',
'Street1': 'string',
'Street2': 'string',
'Street3': 'string',
'City': 'string',
'StateOrProvince': 'string',
'PrefectureOrDistrict': 'string',
'Landmark': 'string',
'Country': 'string',
'PostalCode': 'string',
'PhoneNumber': 'string',
'IsRestricted': True|False
}
)
| Parameters: | Address (dict) – [REQUIRED] The address that you want the Snowball shipped to.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'AddressId': 'string'
}
Response Structure
|
Examples
This operation creates an address for a job. Addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown.
response = client.create_address(
Address={
'City': 'Seattle',
'Company': 'My Company's Name',
'Country': 'USA',
'Name': 'My Name',
'PhoneNumber': '425-555-5555',
'PostalCode': '98101',
'StateOrProvince': 'WA',
'Street1': '123 Main Street',
},
)
print(response)
Expected Output:
{
'AddressId': 'ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
'ResponseMetadata': {
'...': '...',
},
}
create_cluster(**kwargs)¶Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.
See also: AWS API Documentation
Request Syntax
response = client.create_cluster(
JobType='IMPORT'|'EXPORT'|'LOCAL_USE',
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
Description='string',
AddressId='string',
KmsKeyARN='string',
RoleARN='string',
SnowballType='STANDARD'|'EDGE',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
ForwardingAddressId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ClusterId': 'string'
}
Response Structure
|
Examples
Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.
response = client.create_cluster(
AddressId='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
Description='MyCluster',
JobType='LOCAL_USE',
KmsKeyARN='arn:aws:kms:us-east-1:123456789012:key/abcd1234-12ab-34cd-56ef-123456123456',
Notification={
'JobStatesToNotify': [
],
'NotifyAll': False,
},
Resources={
'S3Resources': [
{
'BucketArn': 'arn:aws:s3:::MyBucket',
'KeyRange': {
},
},
],
},
RoleARN='arn:aws:iam::123456789012:role/snowball-import-S3-role',
ShippingOption='SECOND_DAY',
SnowballType='EDGE',
)
print(response)
Expected Output:
{
'ClusterId': 'CID123e4567-e89b-12d3-a456-426655440000',
'ResponseMetadata': {
'...': '...',
},
}
create_job(**kwargs)¶Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you’re creating a job for a node in a cluster, you only need to provide the clusterId value; the other job attributes are inherited from the cluster.
See also: AWS API Documentation
Request Syntax
response = client.create_job(
JobType='IMPORT'|'EXPORT'|'LOCAL_USE',
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
Description='string',
AddressId='string',
KmsKeyARN='string',
RoleARN='string',
SnowballCapacityPreference='T50'|'T80'|'T100'|'NoPreference',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
ClusterId='string',
SnowballType='STANDARD'|'EDGE',
ForwardingAddressId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'JobId': 'string'
}
Response Structure
|
Examples
Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you’re creating a job for a node in a cluster, you only need to provide the clusterId value; the other job attributes are inherited from the cluster.
response = client.create_job(
AddressId='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
Description='My Job',
JobType='IMPORT',
KmsKeyARN='arn:aws:kms:us-east-1:123456789012:key/abcd1234-12ab-34cd-56ef-123456123456',
Notification={
'JobStatesToNotify': [
],
'NotifyAll': False,
},
Resources={
'S3Resources': [
{
'BucketArn': 'arn:aws:s3:::MyBucket',
'KeyRange': {
},
},
],
},
RoleARN='arn:aws:iam::123456789012:role/snowball-import-S3-role',
ShippingOption='SECOND_DAY',
SnowballCapacityPreference='T80',
SnowballType='STANDARD',
)
print(response)
Expected Output:
{
'JobId': 'JID123e4567-e89b-12d3-a456-426655440000',
'ResponseMetadata': {
'...': '...',
},
}
describe_address(**kwargs)¶Takes an AddressId and returns specific details about that address in the form of an Address object.
See also: AWS API Documentation
Request Syntax
response = client.describe_address(
AddressId='string'
)
| Parameters: | AddressId (string) – [REQUIRED] The automatically generated ID for a specific address. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Address': {
'AddressId': 'string',
'Name': 'string',
'Company': 'string',
'Street1': 'string',
'Street2': 'string',
'Street3': 'string',
'City': 'string',
'StateOrProvince': 'string',
'PrefectureOrDistrict': 'string',
'Landmark': 'string',
'Country': 'string',
'PostalCode': 'string',
'PhoneNumber': 'string',
'IsRestricted': True|False
}
}
Response Structure
|
Examples
This operation describes an address for a job.
response = client.describe_address(
AddressId='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
)
print(response)
Expected Output:
{
'Address': {
'AddressId': 'ADID5643ec50-3eec-4eb3-9be6-9374c10eb51b',
'City': 'Seattle',
'Company': 'My Company',
'Country': 'US',
'Name': 'My Name',
'PhoneNumber': '425-555-5555',
'PostalCode': '98101',
'StateOrProvince': 'WA',
'Street1': '123 Main Street',
},
'ResponseMetadata': {
'...': '...',
},
}
describe_addresses(**kwargs)¶Returns a specified number of ADDRESS objects. Calling this API in one of the US regions will return addresses from the list of all addresses associated with this account in all US regions.
See also: AWS API Documentation
Request Syntax
response = client.describe_addresses(
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Addresses': [
{
'AddressId': 'string',
'Name': 'string',
'Company': 'string',
'Street1': 'string',
'Street2': 'string',
'Street3': 'string',
'City': 'string',
'StateOrProvince': 'string',
'PrefectureOrDistrict': 'string',
'Landmark': 'string',
'Country': 'string',
'PostalCode': 'string',
'PhoneNumber': 'string',
'IsRestricted': True|False
},
],
'NextToken': 'string'
}
Response Structure
|
Examples
This operation describes all the addresses that you’ve created for AWS Snowball. Calling this API in one of the US regions will return addresses from the list of all addresses associated with this account in all US regions.
response = client.describe_addresses(
)
print(response)
Expected Output:
{
'Addresses': [
{
'AddressId': 'ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
'City': 'Seattle',
'Company': 'My Company',
'Country': 'US',
'Name': 'My Name',
'PhoneNumber': '425-555-5555',
'PostalCode': '98101',
'StateOrProvince': 'WA',
'Street1': '123 Main Street',
},
],
'ResponseMetadata': {
'...': '...',
},
}
describe_cluster(**kwargs)¶Returns information about a specific cluster including shipping information, cluster status, and other important metadata.
See also: AWS API Documentation
Request Syntax
response = client.describe_cluster(
ClusterId='string'
)
| Parameters: | ClusterId (string) – [REQUIRED] The automatically generated ID for a cluster. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'ClusterMetadata': {
'ClusterId': 'string',
'Description': 'string',
'KmsKeyARN': 'string',
'RoleARN': 'string',
'ClusterState': 'AwaitingQuorum'|'Pending'|'InUse'|'Complete'|'Cancelled',
'JobType': 'IMPORT'|'EXPORT'|'LOCAL_USE',
'SnowballType': 'STANDARD'|'EDGE',
'CreationDate': datetime(2015, 1, 1),
'Resources': {
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
'AddressId': 'string',
'ShippingOption': 'SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
'Notification': {
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
'ForwardingAddressId': 'string'
}
}
Response Structure
|
Examples
Returns information about a specific cluster including shipping information, cluster status, and other important metadata.
response = client.describe_cluster(
ClusterId='CID123e4567-e89b-12d3-a456-426655440000',
)
print(response)
Expected Output:
{
'ClusterMetadata': {
'AddressId': 'ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
'ClusterId': 'CID123e4567-e89b-12d3-a456-426655440000',
'ClusterState': 'Pending',
'CreationDate': datetime(2016, 11, 30, 3, 11, 57, 2, 335, 0),
'Description': 'MyCluster',
'JobType': 'LOCAL_USE',
'KmsKeyARN': 'arn:aws:kms:us-east-1:123456789012:key/abcd1234-12ab-34cd-56ef-123456123456',
'Notification': {
'JobStatesToNotify': [
],
'NotifyAll': False,
},
'Resources': {
'S3Resources': [
{
'BucketArn': 'arn:aws:s3:::MyBucket',
'KeyRange': {
},
},
],
},
'RoleARN': 'arn:aws:iam::123456789012:role/snowball-import-S3-role',
'ShippingOption': 'SECOND_DAY',
},
'ResponseMetadata': {
'...': '...',
},
}
describe_job(**kwargs)¶Returns information about a specific job including shipping information, job status, and other important metadata.
See also: AWS API Documentation
Request Syntax
response = client.describe_job(
JobId='string'
)
| Parameters: | JobId (string) – [REQUIRED] The automatically generated ID for a job, for example |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'JobMetadata': {
'JobId': 'string',
'JobState': 'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
'JobType': 'IMPORT'|'EXPORT'|'LOCAL_USE',
'SnowballType': 'STANDARD'|'EDGE',
'CreationDate': datetime(2015, 1, 1),
'Resources': {
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
'Description': 'string',
'KmsKeyARN': 'string',
'RoleARN': 'string',
'AddressId': 'string',
'ShippingDetails': {
'ShippingOption': 'SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
'InboundShipment': {
'Status': 'string',
'TrackingNumber': 'string'
},
'OutboundShipment': {
'Status': 'string',
'TrackingNumber': 'string'
}
},
'SnowballCapacityPreference': 'T50'|'T80'|'T100'|'NoPreference',
'Notification': {
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
'DataTransferProgress': {
'BytesTransferred': 123,
'ObjectsTransferred': 123,
'TotalBytes': 123,
'TotalObjects': 123
},
'JobLogInfo': {
'JobCompletionReportURI': 'string',
'JobSuccessLogURI': 'string',
'JobFailureLogURI': 'string'
},
'ClusterId': 'string',
'ForwardingAddressId': 'string'
},
'SubJobMetadata': [
{
'JobId': 'string',
'JobState': 'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
'JobType': 'IMPORT'|'EXPORT'|'LOCAL_USE',
'SnowballType': 'STANDARD'|'EDGE',
'CreationDate': datetime(2015, 1, 1),
'Resources': {
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
'Description': 'string',
'KmsKeyARN': 'string',
'RoleARN': 'string',
'AddressId': 'string',
'ShippingDetails': {
'ShippingOption': 'SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
'InboundShipment': {
'Status': 'string',
'TrackingNumber': 'string'
},
'OutboundShipment': {
'Status': 'string',
'TrackingNumber': 'string'
}
},
'SnowballCapacityPreference': 'T50'|'T80'|'T100'|'NoPreference',
'Notification': {
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
'DataTransferProgress': {
'BytesTransferred': 123,
'ObjectsTransferred': 123,
'TotalBytes': 123,
'TotalObjects': 123
},
'JobLogInfo': {
'JobCompletionReportURI': 'string',
'JobSuccessLogURI': 'string',
'JobFailureLogURI': 'string'
},
'ClusterId': 'string',
'ForwardingAddressId': 'string'
},
]
}
Response Structure
|
Examples
This operation describes a job you’ve created for AWS Snowball.
response = client.describe_job(
JobId='JID123e4567-e89b-12d3-a456-426655440000',
)
print(response)
Expected Output:
{
'JobMetadata': {
'AddressId': 'ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
'CreationDate': datetime(2016, 10, 5, 0, 9, 24, 2, 279, 0),
'Description': 'My Job',
'JobId': 'JID123e4567-e89b-12d3-a456-426655440000',
'JobState': 'New',
'JobType': 'IMPORT',
'KmsKeyARN': 'arn:aws:kms:us-east-1:123456789012:key/abcd1234-12ab-34cd-56ef-123456123456',
'Notification': {
'JobStatesToNotify': [
],
'NotifyAll': False,
},
'Resources': {
'S3Resources': [
{
'BucketArn': 'arn:aws:s3:::MyBucket',
'KeyRange': {
},
},
],
},
'RoleARN': 'arn:aws:iam::123456789012:role/snowball-import-S3-role',
'ShippingDetails': {
'ShippingOption': 'SECOND_DAY',
},
'SnowballCapacityPreference': 'T80',
'SnowballType': 'STANDARD',
},
'ResponseMetadata': {
'...': '...',
},
}
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_job_manifest(**kwargs)¶Returns a link to an Amazon S3 presigned URL for the manifest file associated with the specified JobId value. You can access the manifest file for up to 60 minutes after this request has been made. To access the manifest file after 60 minutes have passed, you’ll have to make another call to the GetJobManifest action.
The manifest is an encrypted file that you can download after your job enters the WithCustomer status. The manifest is decrypted by using the UnlockCode code value, when you pass both values to the Snowball through the Snowball client when the client is started for the first time.
As a best practice, we recommend that you don’t save a copy of an UnlockCode value in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.
The credentials of a given job, including its manifest file and unlock code, expire 90 days after the job is created.
See also: AWS API Documentation
Request Syntax
response = client.get_job_manifest(
JobId='string'
)
| Parameters: | JobId (string) – [REQUIRED] The ID for a job that you want to get the manifest file for, for example |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'ManifestURI': 'string'
}
Response Structure
|
Examples
Returns a link to an Amazon S3 presigned URL for the manifest file associated with the specified JobId value. You can access the manifest file for up to 60 minutes after this request has been made. To access the manifest file after 60 minutes have passed, you’ll have to make another call to the GetJobManifest action.
The manifest is an encrypted file that you can download after your job enters the WithCustomer status. The manifest is decrypted by using the UnlockCode code value, when you pass both values to the Snowball through the Snowball client when the client is started for the first time.
As a best practice, we recommend that you don’t save a copy of an UnlockCode value in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.
response = client.get_job_manifest( JobId='JID123e4567-e89b-12d3-a456-426655440000', ) print(response)Expected Output:
{ 'ManifestURI': 'https://awsie-frosty-manifests-prod.s3.amazonaws.com/JID123e4567-e89b-12d3-a456-426655440000_manifest.bin?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20161224T005115Z&X-Amz-SignedHeaders=...', 'ResponseMetadata': { '...': '...', }, }
get_job_unlock_code(**kwargs)¶Returns the UnlockCode code value for the specified job. A particular UnlockCode value can be accessed for up to 90 days after the associated job has been created.
The UnlockCode value is a 29-character code with 25 alphanumeric characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed along with the manifest to the Snowball through the Snowball client when the client is started for the first time.
As a best practice, we recommend that you don’t save a copy of the UnlockCode in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.
See also: AWS API Documentation
Request Syntax
response = client.get_job_unlock_code(
JobId='string'
)
| Parameters: | JobId (string) – [REQUIRED] The ID for the job that you want to get the |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'UnlockCode': 'string'
}
Response Structure
|
Examples
Returns the UnlockCode code value for the specified job. A particular UnlockCode value can be accessed for up to 90 days after the associated job has been created.
The UnlockCode value is a 29-character code with 25 alphanumeric characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed along with the manifest to the Snowball through the Snowball client when the client is started for the first time.
response = client.get_job_unlock_code( JobId='JID123e4567-e89b-12d3-a456-426655440000', ) print(response)Expected Output:
{ 'UnlockCode': '12345-abcde-56789-fghij-01234', 'ResponseMetadata': { '...': '...', }, }
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_snowball_usage()¶Returns information about the Snowball service limit for your account, and also the number of Snowballs your account has in use.
The default service limit for the number of Snowballs that you can have at one time is 1. If you want to increase your service limit, contact AWS Support.
See also: AWS API Documentation
Request Syntax
response = client.get_snowball_usage()
| Return type: | dict |
|---|---|
| Returns: | Response Syntax{
'SnowballLimit': 123,
'SnowballsInUse': 123
}
Response Structure
|
Examples
Returns information about the Snowball service limit for your account, and also the number of Snowballs your account has in use.
response = client.get_snowball_usage( ) print(response)Expected Output:
{ 'SnowballLimit': 1, 'SnowballsInUse': 0, 'ResponseMetadata': { '...': '...', }, }
get_waiter(waiter_name)¶list_cluster_jobs(**kwargs)¶Returns an array of JobListEntry objects of the specified length. Each JobListEntry object is for a job in the specified cluster and contains a job’s state, a job’s ID, and other information.
See also: AWS API Documentation
Request Syntax
response = client.list_cluster_jobs(
ClusterId='string',
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'JobListEntries': [
{
'JobId': 'string',
'JobState': 'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
'IsMaster': True|False,
'JobType': 'IMPORT'|'EXPORT'|'LOCAL_USE',
'SnowballType': 'STANDARD'|'EDGE',
'CreationDate': datetime(2015, 1, 1),
'Description': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
Examples
Returns an array of JobListEntry objects of the specified length. Each JobListEntry object is for a job in the specified cluster and contains a job’s state, a job’s ID, and other information.
response = client.list_cluster_jobs(
ClusterId='CID123e4567-e89b-12d3-a456-426655440000',
)
print(response)
Expected Output:
{
'JobListEntries': [
{
'CreationDate': datetime(2016, 11, 30, 3, 12, 4, 2, 335, 0),
'Description': 'MyClustrer-node-001',
'IsMaster': False,
'JobId': 'JID123e4567-e89b-12d3-a456-426655440000',
'JobState': 'New',
'JobType': 'LOCAL_USE',
'SnowballType': 'EDGE',
},
{
'CreationDate': datetime(2016, 11, 30, 3, 12, 5, 2, 335, 0),
'Description': 'MyClustrer-node-002',
'IsMaster': False,
'JobId': 'JID123e4567-e89b-12d3-a456-426655440001',
'JobState': 'New',
'JobType': 'LOCAL_USE',
'SnowballType': 'EDGE',
},
{
'CreationDate': datetime(2016, 11, 30, 3, 12, 5, 2, 335, 0),
'Description': 'MyClustrer-node-003',
'IsMaster': False,
'JobId': 'JID123e4567-e89b-12d3-a456-426655440002',
'JobState': 'New',
'JobType': 'LOCAL_USE',
'SnowballType': 'EDGE',
},
{
'CreationDate': datetime(2016, 11, 30, 3, 12, 5, 2, 335, 0),
'Description': 'MyClustrer-node-004',
'IsMaster': False,
'JobId': 'JID123e4567-e89b-12d3-a456-426655440003',
'JobState': 'New',
'JobType': 'LOCAL_USE',
'SnowballType': 'EDGE',
},
{
'CreationDate': datetime(2016, 11, 30, 3, 12, 5, 2, 335, 0),
'Description': 'MyClustrer-node-005',
'IsMaster': False,
'JobId': 'JID123e4567-e89b-12d3-a456-426655440004',
'JobState': 'New',
'JobType': 'LOCAL_USE',
'SnowballType': 'EDGE',
},
],
'ResponseMetadata': {
'...': '...',
},
}
list_clusters(**kwargs)¶Returns an array of ClusterListEntry objects of the specified length. Each ClusterListEntry object contains a cluster’s state, a cluster’s ID, and other important status information.
See also: AWS API Documentation
Request Syntax
response = client.list_clusters(
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ClusterListEntries': [
{
'ClusterId': 'string',
'ClusterState': 'AwaitingQuorum'|'Pending'|'InUse'|'Complete'|'Cancelled',
'CreationDate': datetime(2015, 1, 1),
'Description': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
Examples
Returns an array of ClusterListEntry objects of the specified length. Each ClusterListEntry object contains a cluster’s state, a cluster’s ID, and other important status information.
response = client.list_clusters(
)
print(response)
Expected Output:
{
'ClusterListEntries': [
{
'ClusterId': 'CID123e4567-e89b-12d3-a456-426655440000',
'ClusterState': 'Pending',
'CreationDate': datetime(2016, 11, 30, 3, 11, 57, 2, 335, 0),
'Description': 'MyCluster',
},
],
'ResponseMetadata': {
'...': '...',
},
}
list_jobs(**kwargs)¶Returns an array of JobListEntry objects of the specified length. Each JobListEntry object contains a job’s state, a job’s ID, and a value that indicates whether the job is a job part, in the case of export jobs. Calling this API action in one of the US regions will return jobs from the list of all jobs associated with this account in all US regions.
See also: AWS API Documentation
Request Syntax
response = client.list_jobs(
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'JobListEntries': [
{
'JobId': 'string',
'JobState': 'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
'IsMaster': True|False,
'JobType': 'IMPORT'|'EXPORT'|'LOCAL_USE',
'SnowballType': 'STANDARD'|'EDGE',
'CreationDate': datetime(2015, 1, 1),
'Description': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
Examples
Returns an array of JobListEntry objects of the specified length. Each JobListEntry object contains a job’s state, a job’s ID, and a value that indicates whether the job is a job part, in the case of export jobs. Calling this API action in one of the US regions will return jobs from the list of all jobs associated with this account in all US regions.
response = client.list_jobs(
)
print(response)
Expected Output:
{
'JobListEntries': [
{
'CreationDate': datetime(2016, 4, 14, 23, 56, 26, 3, 105, 0),
'Description': 'MyJob',
'IsMaster': False,
'JobId': 'JID123e4567-e89b-12d3-a456-426655440000',
'JobState': 'New',
'JobType': 'IMPORT',
'SnowballType': 'STANDARD',
},
],
'ResponseMetadata': {
'...': '...',
},
}
update_cluster(**kwargs)¶While a cluster’s ClusterState value is in the AwaitingQuorum state, you can update some of the information associated with a cluster. Once the cluster changes to a different job state, usually 60 minutes after the cluster being created, this action is no longer available.
See also: AWS API Documentation
Request Syntax
response = client.update_cluster(
ClusterId='string',
RoleARN='string',
Description='string',
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
AddressId='string',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
ForwardingAddressId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
Examples
This action allows you to update certain parameters for a cluster. Once the cluster changes to a different state, usually within 60 minutes of it being created, this action is no longer available.
response = client.update_cluster(
AddressId='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
ClusterId='CID123e4567-e89b-12d3-a456-426655440000',
Description='Updated the address to send this to image processing - RJ',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
update_job(**kwargs)¶While a job’s JobState value is New , you can update some of the information associated with a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.
See also: AWS API Documentation
Request Syntax
response = client.update_job(
JobId='string',
RoleARN='string',
Notification={
'SnsTopicARN': 'string',
'JobStatesToNotify': [
'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
],
'NotifyAll': True|False
},
Resources={
'S3Resources': [
{
'BucketArn': 'string',
'KeyRange': {
'BeginMarker': 'string',
'EndMarker': 'string'
}
},
],
'LambdaResources': [
{
'LambdaArn': 'string',
'EventTriggers': [
{
'EventResourceARN': 'string'
},
]
},
]
},
AddressId='string',
ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD',
Description='string',
SnowballCapacityPreference='T50'|'T80'|'T100'|'NoPreference',
ForwardingAddressId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
Examples
This action allows you to update certain parameters for a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.
response = client.update_job(
AddressId='ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b',
Description='Upgraded to Edge, shipped to Finance Dept, and requested faster shipping speed - TS.',
JobId='JID123e4567-e89b-12d3-a456-426655440000',
ShippingOption='NEXT_DAY',
SnowballCapacityPreference='T100',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
The available paginators are:
Snowball.Paginator.DescribeAddresses¶paginator = client.get_paginator('describe_addresses')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Snowball.Client.describe_addresses().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Addresses': [
{
'AddressId': 'string',
'Name': 'string',
'Company': 'string',
'Street1': 'string',
'Street2': 'string',
'Street3': 'string',
'City': 'string',
'StateOrProvince': 'string',
'PrefectureOrDistrict': 'string',
'Landmark': 'string',
'Country': 'string',
'PostalCode': 'string',
'PhoneNumber': 'string',
'IsRestricted': True|False
},
],
}
Response Structure
|
Snowball.Paginator.ListJobs¶paginator = client.get_paginator('list_jobs')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from Snowball.Client.list_jobs().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'JobListEntries': [
{
'JobId': 'string',
'JobState': 'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending',
'IsMaster': True|False,
'JobType': 'IMPORT'|'EXPORT'|'LOCAL_USE',
'SnowballType': 'STANDARD'|'EDGE',
'CreationDate': datetime(2015, 1, 1),
'Description': 'string'
},
],
}
Response Structure
|