updateJob method

Future<void> updateJob({
  1. required String jobId,
  2. String? addressId,
  3. String? description,
  4. String? forwardingAddressId,
  5. Notification? notification,
  6. OnDeviceServiceConfiguration? onDeviceServiceConfiguration,
  7. PickupDetails? pickupDetails,
  8. JobResource? resources,
  9. String? roleARN,
  10. ShippingOption? shippingOption,
  11. SnowballCapacity? snowballCapacityPreference,
})

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.

May throw ClusterLimitExceededException. May throw Ec2RequestFailedException. May throw InvalidInputCombinationException. May throw InvalidJobStateException. May throw InvalidResourceException. May throw KMSRequestFailedException.

Parameter jobId : The job ID of the job that you want to update, for example JID123e4567-e89b-12d3-a456-426655440000.

Parameter addressId : The ID of the updated Address object.

Parameter description : The updated description of this job's JobMetadata object.

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

Parameter notification : The new or updated Notification object.

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 supports Amazon S3 and NFS (Network File System) and the Amazon Web Services Storage Gateway service Tape Gateway type.

Parameter resources : The updated JobResource object, or the updated JobResource object.

Parameter roleARN : The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role ARN, use the CreateRoleIdentity and Access Management (IAM) API action.

Parameter shippingOption : The updated shipping option value of this job's ShippingDetails object.

Parameter snowballCapacityPreference : The updated SnowballCapacityPreference of this job's JobMetadata object. The 50 TB Snowballs are only available in the US regions.

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.

Implementation

Future<void> updateJob({
  required String jobId,
  String? addressId,
  String? description,
  String? forwardingAddressId,
  Notification? notification,
  OnDeviceServiceConfiguration? onDeviceServiceConfiguration,
  PickupDetails? pickupDetails,
  JobResource? resources,
  String? roleARN,
  ShippingOption? shippingOption,
  SnowballCapacity? snowballCapacityPreference,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSIESnowballJobManagementService.UpdateJob'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'JobId': jobId,
      if (addressId != null) 'AddressId': addressId,
      if (description != null) 'Description': description,
      if (forwardingAddressId != null)
        'ForwardingAddressId': forwardingAddressId,
      if (notification != null) 'Notification': notification,
      if (onDeviceServiceConfiguration != null)
        'OnDeviceServiceConfiguration': onDeviceServiceConfiguration,
      if (pickupDetails != null) 'PickupDetails': pickupDetails,
      if (resources != null) 'Resources': resources,
      if (roleARN != null) 'RoleARN': roleARN,
      if (shippingOption != null) 'ShippingOption': shippingOption.value,
      if (snowballCapacityPreference != null)
        'SnowballCapacityPreference': snowballCapacityPreference.value,
    },
  );
}