createCluster method

Future<CreateClusterResult> createCluster({
  1. required String addressId,
  2. required JobType jobType,
  3. required ShippingOption shippingOption,
  4. required SnowballType snowballType,
  5. String? description,
  6. bool? forceCreateJobs,
  7. String? forwardingAddressId,
  8. int? initialClusterSize,
  9. String? kmsKeyARN,
  10. List<String>? longTermPricingIds,
  11. Notification? notification,
  12. OnDeviceServiceConfiguration? onDeviceServiceConfiguration,
  13. RemoteManagement? remoteManagement,
  14. JobResource? resources,
  15. String? roleARN,
  16. SnowballCapacity? snowballCapacityPreference,
  17. TaxDocuments? taxDocuments,
})

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.

May throw Ec2RequestFailedException. May throw InvalidInputCombinationException. May throw InvalidResourceException. May throw KMSRequestFailedException.

Parameter addressId : The ID for the address that you want the cluster shipped to.

Parameter jobType : 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.

Parameter shippingOption : 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.

Parameter snowballType : The type of Snow Family devices to use for this cluster. 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.

Parameter description : An optional description of this specific cluster, for example Environmental Data Cluster-01.

Parameter forceCreateJobs : 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.

Parameter forwardingAddressId : The forwarding address ID for a cluster. This field is not supported in most regions.

Parameter initialClusterSize : If provided, each job will be automatically created and associated with the new cluster. If not provided, will be treated as 0.

Parameter kmsKeyARN : 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).

Parameter longTermPricingIds : Lists long-term pricing id that will be used to associate with jobs automatically created for the new cluster.

Parameter notification : The Amazon Simple Notification Service (Amazon SNS) notification settings for this cluster.

Parameter onDeviceServiceConfiguration : 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).

Parameter remoteManagement : 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.

Parameter resources : The resources associated with the cluster job. These resources include Amazon S3 buckets and optional Lambda functions written in the Python language.

Parameter roleARN : 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).

Parameter snowballCapacityPreference : 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.

Parameter taxDocuments : The tax documents required in your Amazon Web Services Region.

Implementation

Future<CreateClusterResult> createCluster({
  required String addressId,
  required JobType jobType,
  required ShippingOption shippingOption,
  required SnowballType snowballType,
  String? description,
  bool? forceCreateJobs,
  String? forwardingAddressId,
  int? initialClusterSize,
  String? kmsKeyARN,
  List<String>? longTermPricingIds,
  Notification? notification,
  OnDeviceServiceConfiguration? onDeviceServiceConfiguration,
  RemoteManagement? remoteManagement,
  JobResource? resources,
  String? roleARN,
  SnowballCapacity? snowballCapacityPreference,
  TaxDocuments? taxDocuments,
}) async {
  _s.validateNumRange(
    'initialClusterSize',
    initialClusterSize,
    0,
    16,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSIESnowballJobManagementService.CreateCluster'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AddressId': addressId,
      'JobType': jobType.value,
      'ShippingOption': shippingOption.value,
      'SnowballType': snowballType.value,
      if (description != null) 'Description': description,
      if (forceCreateJobs != null) 'ForceCreateJobs': forceCreateJobs,
      if (forwardingAddressId != null)
        'ForwardingAddressId': forwardingAddressId,
      if (initialClusterSize != null)
        'InitialClusterSize': initialClusterSize,
      if (kmsKeyARN != null) 'KmsKeyARN': kmsKeyARN,
      if (longTermPricingIds != null)
        'LongTermPricingIds': longTermPricingIds,
      if (notification != null) 'Notification': notification,
      if (onDeviceServiceConfiguration != null)
        'OnDeviceServiceConfiguration': onDeviceServiceConfiguration,
      if (remoteManagement != null)
        'RemoteManagement': remoteManagement.value,
      if (resources != null) 'Resources': resources,
      if (roleARN != null) 'RoleARN': roleARN,
      if (snowballCapacityPreference != null)
        'SnowballCapacityPreference': snowballCapacityPreference.value,
      if (taxDocuments != null) 'TaxDocuments': taxDocuments,
    },
  );

  return CreateClusterResult.fromJson(jsonResponse.body);
}