Snowball / Client / create_cluster
create_cluster#
- Snowball.Client.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' }, 'TargetOnDeviceServices': [ { 'ServiceName': 'NFS_ON_DEVICE_SERVICE'|'S3_ON_DEVICE_SERVICE', 'TransferOption': 'IMPORT'|'EXPORT'|'LOCAL_USE' }, ] }, ], 'LambdaResources': [ { 'LambdaArn': 'string', 'EventTriggers': [ { 'EventResourceARN': 'string' }, ] }, ], 'Ec2AmiResources': [ { 'AmiId': 'string', 'SnowballAmiId': 'string' }, ] }, OnDeviceServiceConfiguration={ 'NFSOnDeviceService': { 'StorageLimit': 123, 'StorageUnit': 'TB' }, 'TGWOnDeviceService': { 'StorageLimit': 123, 'StorageUnit': 'TB' }, 'EKSOnDeviceService': { 'KubernetesVersion': 'string', 'EKSAnywhereVersion': 'string' }, 'S3OnDeviceService': { 'StorageLimit': 123.0, 'StorageUnit': 'TB', 'ServiceSize': 123, 'FaultTolerance': 123 } }, Description='string', AddressId='string', KmsKeyARN='string', RoleARN='string', SnowballType='STANDARD'|'EDGE'|'EDGE_C'|'EDGE_CG'|'EDGE_S'|'SNC1_HDD'|'SNC1_SSD'|'V3_5C'|'V3_5S'|'RACK_5U_C', ShippingOption='SECOND_DAY'|'NEXT_DAY'|'EXPRESS'|'STANDARD', Notification={ 'SnsTopicARN': 'string', 'JobStatesToNotify': [ 'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWSSortingFacility'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending', ], 'NotifyAll': True|False, 'DevicePickupSnsTopicARN': 'string' }, ForwardingAddressId='string', TaxDocuments={ 'IND': { 'GSTIN': 'string' } }, RemoteManagement='INSTALLED_ONLY'|'INSTALLED_AUTOSTART'|'NOT_INSTALLED', InitialClusterSize=123, ForceCreateJobs=True|False, LongTermPricingIds=[ 'string', ], SnowballCapacityPreference='T50'|'T80'|'T100'|'T42'|'T98'|'T8'|'T14'|'T32'|'NoPreference'|'T240'|'T13' )
- Parameters:
JobType (string) –
[REQUIRED]
The type of job for this cluster. Currently, the only job type supported for clusters is
LOCAL_USE
.For more information, see “https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html” (Snow Family Devices and Capacity) in the Snowcone User Guide or “https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html” (Snow Family Devices and Capacity) in the Snowcone User Guide.
Resources (dict) –
The resources associated with the cluster job. These resources include Amazon S3 buckets and optional Lambda functions written in the Python language.
S3Resources (list) –
An array of
S3Resource
objects.(dict) –
Each
S3Resource
object represents an Amazon S3 bucket that your transferred data will be exported from or imported into. For export jobs, this object can have an optionalKeyRange
value. The length of the range is defined at job creation, and has either an inclusiveBeginMarker
, an inclusiveEndMarker
, or both. Ranges are UTF-8 binary sorted.BucketArn (string) –
The Amazon Resource Name (ARN) of an Amazon S3 bucket.
KeyRange (dict) –
For export jobs, you can provide an optional
KeyRange
within a specific Amazon S3 bucket. The length of the range is defined at job creation, and has either an inclusiveBeginMarker
, an inclusiveEndMarker
, or both. Ranges are UTF-8 binary sorted.BeginMarker (string) –
The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
EndMarker (string) –
The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
TargetOnDeviceServices (list) –
Specifies the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family supports Amazon S3 and NFS (Network File System).
(dict) –
An object that represents the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family supports Amazon S3 and NFS (Network File System).
ServiceName (string) –
Specifies the name of the service on the Snow Family device that your transferred data will be exported from or imported into.
TransferOption (string) –
Specifies whether the data is being imported or exported. You can import or export the data, or use it locally on the device.
LambdaResources (list) –
The Python-language Lambda functions for this job.
(dict) –
Identifies
LambdaArn (string) –
An Amazon Resource Name (ARN) that represents an Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.
EventTriggers (list) –
The array of ARNs for S3Resource objects to trigger the LambdaResource objects associated with this job.
(dict) –
The container for the EventTriggerDefinition$EventResourceARN.
EventResourceARN (string) –
The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an Lambda function’s event trigger associated with this job.
Ec2AmiResources (list) –
The Amazon Machine Images (AMIs) associated with this job.
(dict) –
A JSON-formatted object that contains the IDs for an Amazon Machine Image (AMI), including the Amazon EC2-compatible AMI ID and the Snow device AMI ID. Each AMI has these two IDs to simplify identifying the AMI in both the Amazon Web Services Cloud and on the device.
AmiId (string) – [REQUIRED]
The ID of the AMI in Amazon EC2.
SnowballAmiId (string) –
The ID of the AMI on the Snow device.
OnDeviceServiceConfiguration (dict) –
Specifies the service or services on the Snow Family device that your transferred data will be exported from or imported into. Amazon Web Services Snow Family device clusters support Amazon S3 and NFS (Network File System).
NFSOnDeviceService (dict) –
Represents the NFS (Network File System) service on a Snow Family device.
StorageLimit (integer) –
The maximum NFS storage for one Snow Family device.
StorageUnit (string) –
The scale unit of the NFS storage on the device.
Valid values: TB.
TGWOnDeviceService (dict) –
Represents the Storage Gateway service Tape Gateway type on a Snow Family device.
StorageLimit (integer) –
The maximum number of virtual tapes to store on one Snow Family device. Due to physical resource limitations, this value must be set to 80 for Snowball Edge.
StorageUnit (string) –
The scale unit of the virtual tapes on the device.
EKSOnDeviceService (dict) –
The configuration of EKS Anywhere on the Snow Family device.
KubernetesVersion (string) –
The Kubernetes version for EKS Anywhere on the Snow Family device.
EKSAnywhereVersion (string) –
The optional version of EKS Anywhere on the Snow Family device.
S3OnDeviceService (dict) –
Configuration for Amazon S3 compatible storage on Snow family devices.
StorageLimit (float) –
If the specified storage limit value matches storage limit of one of the defined configurations, that configuration will be used. If the specified storage limit value does not match any defined configuration, the request will fail. If more than one configuration has the same storage limit as specified, the other input need to be provided.
StorageUnit (string) –
Storage unit. Currently the only supported unit is TB.
ServiceSize (integer) –
Applicable when creating a cluster. Specifies how many nodes are needed for Amazon S3 compatible storage on Snow family devices. If specified, the other input can be omitted.
FaultTolerance (integer) –
>Fault tolerance level of the cluster. This indicates the number of nodes that can go down without degrading the performance of the cluster. This additional input helps when the specified
StorageLimit
matches more than one Amazon S3 compatible storage on Snow family devices service configuration.
Description (string) – An optional description of this specific cluster, for example
Environmental Data Cluster-01
.AddressId (string) –
[REQUIRED]
The ID for the address that you want the cluster shipped to.
KmsKeyARN (string) – The
KmsKeyARN
value that you want to associate with this cluster.KmsKeyARN
values are created by using the CreateKey API action in Key Management Service (KMS).RoleARN (string) – The
RoleARN
that you want to associate with this cluster.RoleArn
values are created by using the CreateRole API action in Identity and Access Management (IAM).SnowballType (string) –
[REQUIRED]
The type of Snow Family devices to use for this cluster.
Note
For cluster jobs, Amazon Web Services Snow Family currently supports only the
EDGE
device type.For more information, see “https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html” (Snow Family Devices and Capacity) in the Snowcone User Guide or “https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html” (Snow Family Devices and Capacity) in the Snowcone User Guide.
ShippingOption (string) –
[REQUIRED]
The shipping speed for each node in this cluster. This speed doesn’t dictate how soon you’ll get each Snowball Edge device, rather it represents how quickly each device moves to its destination while in transit. Regional shipping speeds are as follows:
In Australia, you have access to express shipping. Typically, Snow devices shipped express are delivered in about a day.
In the European Union (EU), you have access to express shipping. Typically, Snow devices shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.
In India, Snow devices are delivered in one to seven days.
In the United States of America (US), you have access to one-day shipping and two-day shipping.
In Australia, you have access to express shipping. Typically, devices shipped express are delivered in about a day.
In the European Union (EU), you have access to express shipping. Typically, Snow devices shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.
In India, Snow devices are delivered in one to seven days.
In the US, you have access to one-day shipping and two-day shipping.
Notification (dict) –
The Amazon Simple Notification Service (Amazon SNS) notification settings for this cluster.
SnsTopicARN (string) –
The new SNS
TopicArn
that you want to associate with this job. You can create Amazon Resource Names (ARNs) for topics by using the CreateTopic Amazon SNS API action.You can subscribe email addresses to an Amazon SNS topic through the Amazon Web Services Management Console, or by using the Subscribe Amazon Simple Notification Service (Amazon SNS) API action.
JobStatesToNotify (list) –
The list of job states that will trigger a notification for this job.
(string) –
NotifyAll (boolean) –
Any change in job state will trigger a notification for this job.
DevicePickupSnsTopicARN (string) –
Used to send SNS notifications for the person picking up the device (identified during job creation).
ForwardingAddressId (string) – The forwarding address ID for a cluster. This field is not supported in most regions.
TaxDocuments (dict) –
The tax documents required in your Amazon Web Services Region.
IND (dict) –
The tax documents required in Amazon Web Services Region in India.
GSTIN (string) –
The Goods and Services Tax (GST) documents required in Amazon Web Services Region in India.
RemoteManagement (string) – Allows you to securely operate and manage Snow devices in a cluster remotely from outside of your internal network. When set to
INSTALLED_AUTOSTART
, remote management will automatically be available when the device arrives at your location. Otherwise, you need to use the Snowball Client to manage the device.InitialClusterSize (integer) – If provided, each job will be automatically created and associated with the new cluster. If not provided, will be treated as 0.
ForceCreateJobs (boolean) – Force to create cluster when user attempts to overprovision or underprovision a cluster. A cluster is overprovisioned or underprovisioned if the initial size of the cluster is more (overprovisioned) or less (underprovisioned) than what needed to meet capacity requirement specified with
OnDeviceServiceConfiguration
.LongTermPricingIds (list) –
Lists long-term pricing id that will be used to associate with jobs automatically created for the new cluster.
(string) –
SnowballCapacityPreference (string) –
If your job is being created in one of the US regions, you have the option of specifying what size Snow device you’d like for this job. In all other regions, Snowballs come with 80 TB in storage capacity.
For more information, see “https://docs.aws.amazon.com/snowball/latest/snowcone-guide/snow-device-types.html” (Snow Family Devices and Capacity) in the Snowcone User Guide or “https://docs.aws.amazon.com/snowball/latest/developer-guide/snow-device-types.html” (Snow Family Devices and Capacity) in the Snowcone User Guide.
- Return type:
dict
- Returns:
Response Syntax
{ 'ClusterId': 'string', 'JobListEntries': [ { 'JobId': 'string', 'JobState': 'New'|'PreparingAppliance'|'PreparingShipment'|'InTransitToCustomer'|'WithCustomer'|'InTransitToAWS'|'WithAWSSortingFacility'|'WithAWS'|'InProgress'|'Complete'|'Cancelled'|'Listing'|'Pending', 'IsMaster': True|False, 'JobType': 'IMPORT'|'EXPORT'|'LOCAL_USE', 'SnowballType': 'STANDARD'|'EDGE'|'EDGE_C'|'EDGE_CG'|'EDGE_S'|'SNC1_HDD'|'SNC1_SSD'|'V3_5C'|'V3_5S'|'RACK_5U_C', 'CreationDate': datetime(2015, 1, 1), 'Description': 'string' }, ] }
Response Structure
(dict) –
ClusterId (string) –
The automatically generated ID for a cluster.
JobListEntries (list) –
List of jobs created for this cluster. For syntax, see ListJobsResult$JobListEntries in this guide.
(dict) –
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 an export job.JobId (string) –
The automatically generated ID for a job, for example
JID123e4567-e89b-12d3-a456-426655440000
.JobState (string) –
The current state of this job.
IsMaster (boolean) –
A value that indicates that this job is a main job. A main job represents a successful request to create an export job. Main jobs aren’t associated with any Snowballs. Instead, each main job will have at least one job part, and each job part is associated with a Snowball. It might take some time before the job parts associated with a particular main job are listed, because they are created after the main job is created.
JobType (string) –
The type of job.
SnowballType (string) –
The type of device used with this job.
CreationDate (datetime) –
The creation date for this job.
Description (string) –
The optional description of this specific job, for example
Important Photos 2016-08-11
.
Exceptions
Snowball.Client.exceptions.InvalidResourceException
Snowball.Client.exceptions.KMSRequestFailedException
Snowball.Client.exceptions.InvalidInputCombinationException
Snowball.Client.exceptions.Ec2RequestFailedException
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': { '...': '...', }, }