Snowball.Client.
create_job
(**kwargs)¶Creates a job to import or export data between Amazon S3 and your on-premises data center. Your Amazon Web Services account must have the right trust policies and permissions in place to create a job for a Snow device. 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.
Note
Only the Snowball; Edge device type is supported when ordering clustered jobs.
The device capacity is optional.
Availability of device types differ by Amazon Web Services Region. For more information about Region availability, see Amazon Web Services Regional Services.
Snow Family devices and their capacities.
Snow Family device type: SNC1_SSD
Snow Family device type: SNC1_HDD
Device type: EDGE_S
Device type: EDGE_CG
Device type: EDGE_C
Device type: EDGE
Device type: STANDARD
Note
This device is only available in the Ningxia, Beijing, and Singapore Amazon Web Services Region
Device type: STANDARD
Note
This device is only available in the Ningxia, Beijing, and Singapore Amazon Web Services Region.
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'
},
'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'
}
},
Description='string',
AddressId='string',
KmsKeyARN='string',
RoleARN='string',
SnowballCapacityPreference='T50'|'T80'|'T100'|'T42'|'T98'|'T8'|'T14'|'T32'|'NoPreference',
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
},
ClusterId='string',
SnowballType='STANDARD'|'EDGE'|'EDGE_C'|'EDGE_CG'|'EDGE_S'|'SNC1_HDD'|'SNC1_SSD'|'V3_5C',
ForwardingAddressId='string',
TaxDocuments={
'IND': {
'GSTIN': 'string'
}
},
DeviceConfiguration={
'SnowconeDeviceConfiguration': {
'WirelessConnection': {
'IsWifiEnabled': True|False
}
}
},
RemoteManagement='INSTALLED_ONLY'|'INSTALLED_AUTOSTART',
LongTermPricingId='string'
)
Defines the Amazon S3 buckets associated with this job.
With IMPORT
jobs, you specify the bucket or buckets that your transferred data will be imported into.
With EXPORT
jobs, you specify the bucket or buckets that your transferred data will be exported from. Optionally, you can also specify a KeyRange
value. If you choose to export a range, you define the length of the range by providing either an inclusive BeginMarker
value, an inclusive EndMarker
value, or both. Ranges are UTF-8 binary sorted.
An array of S3Resource
objects.
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 optional KeyRange
value. The length of the range is defined at job creation, and has either an inclusive BeginMarker
, an inclusive EndMarker
, or both. Ranges are UTF-8 binary sorted.
The Amazon Resource Name (ARN) of an Amazon S3 bucket.
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 inclusive BeginMarker
, an inclusive EndMarker
, or both. Ranges are UTF-8 binary sorted.
The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.
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).
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).
Specifies the name of the service on the Snow Family device that your transferred data will be exported from or imported into.
Specifies whether the data is being imported or exported. You can import or export the data, or use it locally on the device.
The Python-language Lambda functions for this job.
Identifies
An Amazon Resource Name (ARN) that represents an Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.
The array of ARNs for S3Resource objects to trigger the LambdaResource objects associated with this job.
The container for the EventTriggerDefinition$EventResourceARN.
The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an Lambda function's event trigger associated with this job.
The Amazon Machine Images (AMIs) associated with this job.
A JSON-formatted object that contains the IDs for an Amazon Machine Image (AMI), including the Amazon EC2 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.
The ID of the AMI in Amazon EC2.
The ID of the AMI on the Snow device.
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) and the Amazon Web Services Storage Gateway service Tape Gateway type.
Represents the NFS (Network File System) service on a Snow Family device.
The maximum NFS storage for one Snow Family device.
The scale unit of the NFS storage on the device.
Valid values: TB.
Represents the Storage Gateway service Tape Gateway type on a Snow Family device.
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.
The scale unit of the virtual tapes on the device.
The configuration of EKS Anywhere on the Snow Family device.
The Kubernetes version for EKS Anywhere on the Snow Family device.
The version of EKS Anywhere on the Snow Family device.
Important Photos 2016-08-11
.KmsKeyARN
that you want to associate with this job. KmsKeyARN
s are created using the CreateKey Key Management Service (KMS) API action.RoleARN
that you want to associate with this job. RoleArn
s are created using the CreateRole Identity and Access Management (IAM) API action.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 .
The shipping speed for this job. This speed doesn't dictate how soon you'll get the Snow device, rather it represents how quickly the Snow device moves to its destination while in transit. Regional shipping speeds are as follows:
Defines the Amazon Simple Notification Service (Amazon SNS) notification settings for this job.
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.
The list of job states that will trigger a notification for this job.
Any change in job state will trigger a notification for this job.
clusterId
value. The other job attributes are inherited from the cluster.The type of Snow Family devices to use for this job.
Note
For cluster jobs, Amazon Web Services Snow Family currently supports only the EDGE
device type.
The type of Amazon Web Services Snow device to use for this job. Currently, the only supported device type for cluster jobs is EDGE
.
For more information, see Snowball Edge Device Options in the Snowball Edge Developer Guide.
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 .
The tax documents required in your Amazon Web Services Region.
The tax documents required in Amazon Web Services Region in India.
The Goods and Services Tax (GST) documents required in Amazon Web Services Region in India.
Defines the device configuration for an Snowcone job.
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 .
Returns information about the device configuration for an Snowcone job.
Configures the wireless connection for the Snowcone device.
Enables the Wi-Fi adapter on an Snowcone device.
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.dict
Response Syntax
{
'JobId': 'string'
}
Response Structure
(dict) --
JobId (string) --
The automatically generated ID for a job, for example JID123e4567-e89b-12d3-a456-426655440000
.
Exceptions
Snowball.Client.exceptions.InvalidResourceException
Snowball.Client.exceptions.KMSRequestFailedException
Snowball.Client.exceptions.InvalidInputCombinationException
Snowball.Client.exceptions.ClusterLimitExceededException
Snowball.Client.exceptions.Ec2RequestFailedException
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': {
'...': '...',
},
}