Skip to content

attach_cluster_node_volume

attach_cluster_node_volume(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    cluster_arn: Optional[ClusterArn] = None,
    node_id: Optional[ClusterNodeId] = None,
    volume_id: Optional[VolumeId] = None,
) -> AttachClusterNodeVolumeResponse

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.

Parameters:

  • cluster_arn (Optional[ClusterArn], default: None ) –

    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.

  • node_id (Optional[ClusterNodeId], default: None ) –

    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).

  • volume_id (Optional[VolumeId], default: None ) –

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

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def attach_cluster_node_volume(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    cluster_arn: Optional["capo_sagemaker.types.cluster_arn.ClusterArn"] = None,
    node_id: Optional["capo_sagemaker.types.cluster_node_id.ClusterNodeId"] = None,
    volume_id: Optional["capo_sagemaker.types.volume_id.VolumeId"] = None,
) -> "capo_sagemaker.types.attach_cluster_node_volume_response.AttachClusterNodeVolumeResponse":
    """<p> Attaches your Amazon Elastic Block Store (Amazon EBS) volume to a node in your EKS orchestrated HyperPod cluster. </p> <p> 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. </p>

    Args:
        cluster_arn: <p> 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 <code>InService</code> state. </p>
        node_id: <p> 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). </p>
        volume_id: <p> The unique identifier of your EBS volume to attach. The volume must be in the <code>available</code> state. </p>

    Raises:
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.attach_cluster_node_volume_request.AttachClusterNodeVolumeRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.attach_cluster_node_volume_response.AttachClusterNodeVolumeResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.attach_cluster_node_volume

        output, http_response = (
            capo_sagemaker._operations.sage_maker.attach_cluster_node_volume.attach_cluster_node_volume(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AttachClusterNodeVolume")
    )
    input_: capo_sagemaker.types.attach_cluster_node_volume_request.AttachClusterNodeVolumeRequest = {}
    if cluster_arn is not None:
        input_["cluster_arn"] = cluster_arn
    if node_id is not None:
        input_["node_id"] = node_id
    if volume_id is not None:
        input_["volume_id"] = volume_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output