Skip to content

detach_cluster_node_volume

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

Detaches your Amazon Elastic Block Store (Amazon EBS) volume from a node in your EKS orchestrated SageMaker 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 from which you want to detach the volume.

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

    The unique identifier of your EBS volume that you want to detach. Your volume must be currently attached to the specified node.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def detach_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.detach_cluster_node_volume_response.DetachClusterNodeVolumeResponse":
    """<p> Detaches your Amazon Elastic Block Store (Amazon EBS) volume from a node in your EKS orchestrated SageMaker 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 from which you want to detach the volume. </p>
        volume_id: <p> The unique identifier of your EBS volume that you want to detach. Your volume must be currently attached to the specified node. </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.detach_cluster_node_volume_request.DetachClusterNodeVolumeRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.detach_cluster_node_volume_response.DetachClusterNodeVolumeResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.detach_cluster_node_volume

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DetachClusterNodeVolume")
    )
    input_: capo_sagemaker.types.detach_cluster_node_volume_request.DetachClusterNodeVolumeRequest = {}
    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