updateCluster method
- required String clusterId,
- String? addressId,
- String? description,
- String? forwardingAddressId,
- Notification? notification,
- JobResource? resources,
- String? roleARN,
- ShippingOption? shippingOption,
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.
May throw InvalidResourceException. May throw InvalidJobStateException. May throw KMSRequestFailedException. May throw InvalidInputCombinationException. May throw Ec2RequestFailedException.
Parameter clusterId
:
The cluster ID of the cluster that you want to update, for example
CID123e4567-e89b-12d3-a456-426655440000
.
Parameter addressId
:
The ID of the updated Address object.
Parameter description
:
The updated description of this cluster.
Parameter forwardingAddressId
:
The updated ID for the forwarding address for a cluster. This field is not
supported in most regions.
Parameter notification
:
The new or updated Notification object.
Parameter resources
:
The updated arrays of JobResource objects that can include updated
S3Resource objects or LambdaResource objects.
Parameter roleARN
:
The new role Amazon Resource Name (ARN) that you want to associate with
this cluster. To create a role ARN, use the CreateRole
API action in AWS Identity and Access Management (IAM).
Parameter shippingOption
:
The updated shipping option value of this cluster's ShippingDetails
object.
Implementation
Future<void> updateCluster({
required String clusterId,
String? addressId,
String? description,
String? forwardingAddressId,
Notification? notification,
JobResource? resources,
String? roleARN,
ShippingOption? shippingOption,
}) async {
ArgumentError.checkNotNull(clusterId, 'clusterId');
_s.validateStringLength(
'clusterId',
clusterId,
39,
39,
isRequired: true,
);
_s.validateStringLength(
'addressId',
addressId,
40,
40,
);
_s.validateStringLength(
'description',
description,
1,
1152921504606846976,
);
_s.validateStringLength(
'forwardingAddressId',
forwardingAddressId,
40,
40,
);
_s.validateStringLength(
'roleARN',
roleARN,
0,
255,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSIESnowballJobManagementService.UpdateCluster'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClusterId': clusterId,
if (addressId != null) 'AddressId': addressId,
if (description != null) 'Description': description,
if (forwardingAddressId != null)
'ForwardingAddressId': forwardingAddressId,
if (notification != null) 'Notification': notification,
if (resources != null) 'Resources': resources,
if (roleARN != null) 'RoleARN': roleARN,
if (shippingOption != null) 'ShippingOption': shippingOption.toValue(),
},
);
}