attachClusterNodeVolume method

Future<AttachClusterNodeVolumeResponse> attachClusterNodeVolume({
  1. required String clusterArn,
  2. required String nodeId,
  3. required String volumeId,
})

Attaches your Amazon Elastic Block Store (Amazon EBS) volume to a node in your EKS orchestrated HyperPod cluster.

This API works with the Amazon Elastic Block Store (Amazon EBS) Container Storage Interface (CSI) driver to manage the lifecycle of persistent storage in your HyperPod EKS clusters.

May throw ResourceNotFound.

Parameter clusterArn : The Amazon Resource Name (ARN) of your SageMaker HyperPod cluster containing the target node. Your cluster must use EKS as the orchestration and be in the InService state.

Parameter nodeId : The unique identifier of the cluster node to which you want to attach the volume. The node must belong to your specified HyperPod cluster and cannot be part of a Restricted Instance Group (RIG).

Parameter volumeId : The unique identifier of your EBS volume to attach. The volume must be in the available state.

Implementation

Future<AttachClusterNodeVolumeResponse> attachClusterNodeVolume({
  required String clusterArn,
  required String nodeId,
  required String volumeId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.AttachClusterNodeVolume'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ClusterArn': clusterArn,
      'NodeId': nodeId,
      'VolumeId': volumeId,
    },
  );

  return AttachClusterNodeVolumeResponse.fromJson(jsonResponse.body);
}