updateCluster method
- required String clusterName,
- ClusterAutoScalingConfig? autoScaling,
- String? clusterRole,
- List<
ClusterInstanceGroupSpecification> ? instanceGroups, - List<
String> ? instanceGroupsToDelete, - ClusterNodeProvisioningMode? nodeProvisioningMode,
- ClusterNodeRecovery? nodeRecovery,
- ClusterOrchestrator? orchestrator,
- List<
ClusterRestrictedInstanceGroupSpecification> ? restrictedInstanceGroups, - ClusterRestrictedInstanceGroupsConfig? restrictedInstanceGroupsConfig,
- ClusterTieredStorageConfig? tieredStorageConfig,
Updates a SageMaker HyperPod cluster.
May throw ConflictException.
May throw ResourceLimitExceeded.
May throw ResourceNotFound.
Parameter clusterName :
Specify the name of the SageMaker HyperPod cluster you want to update.
Parameter autoScaling :
Updates the autoscaling configuration for the cluster. Use to enable or
disable automatic node scaling.
Parameter clusterRole :
The Amazon Resource Name (ARN) of the IAM role that HyperPod assumes for
cluster autoscaling operations. Cannot be updated while autoscaling is
enabled.
Parameter instanceGroups :
Specify the instance groups to update.
Parameter instanceGroupsToDelete :
Specify the names of the instance groups to delete. Use a single
, as the separator between multiple names.
Parameter nodeProvisioningMode :
Determines how instance provisioning is handled during cluster operations.
In Continuous mode, the cluster provisions available
instances incrementally and retries until the target count is reached. The
cluster becomes operational once cluster-level resources are ready. Use
CurrentCount and TargetCount in
DescribeCluster to track provisioning progress.
Parameter nodeRecovery :
The node recovery mode to be applied to the SageMaker HyperPod cluster.
Parameter restrictedInstanceGroups :
The specialized instance groups for training models like Amazon Nova to be
created in the SageMaker HyperPod cluster.
Parameter restrictedInstanceGroupsConfig :
The configuration for the restricted instance groups (RIG) in the
SageMaker HyperPod cluster.
Parameter tieredStorageConfig :
Updates the configuration for managed tier checkpointing on the HyperPod
cluster. For example, you can enable or disable the feature and modify the
percentage of cluster memory allocated for checkpoint storage.
Implementation
Future<UpdateClusterResponse> updateCluster({
required String clusterName,
ClusterAutoScalingConfig? autoScaling,
String? clusterRole,
List<ClusterInstanceGroupSpecification>? instanceGroups,
List<String>? instanceGroupsToDelete,
ClusterNodeProvisioningMode? nodeProvisioningMode,
ClusterNodeRecovery? nodeRecovery,
ClusterOrchestrator? orchestrator,
List<ClusterRestrictedInstanceGroupSpecification>? restrictedInstanceGroups,
ClusterRestrictedInstanceGroupsConfig? restrictedInstanceGroupsConfig,
ClusterTieredStorageConfig? tieredStorageConfig,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.UpdateCluster'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ClusterName': clusterName,
if (autoScaling != null) 'AutoScaling': autoScaling,
if (clusterRole != null) 'ClusterRole': clusterRole,
if (instanceGroups != null) 'InstanceGroups': instanceGroups,
if (instanceGroupsToDelete != null)
'InstanceGroupsToDelete': instanceGroupsToDelete,
if (nodeProvisioningMode != null)
'NodeProvisioningMode': nodeProvisioningMode.value,
if (nodeRecovery != null) 'NodeRecovery': nodeRecovery.value,
if (orchestrator != null) 'Orchestrator': orchestrator,
if (restrictedInstanceGroups != null)
'RestrictedInstanceGroups': restrictedInstanceGroups,
if (restrictedInstanceGroupsConfig != null)
'RestrictedInstanceGroupsConfig': restrictedInstanceGroupsConfig,
if (tieredStorageConfig != null)
'TieredStorageConfig': tieredStorageConfig,
},
);
return UpdateClusterResponse.fromJson(jsonResponse.body);
}