Attaches an elastic network interface (ENI) to a node in a HyperPod cluster.
To use this operation, you must have the sagemaker:AttachClusterNodeNetworkInterface permission.
Parameters:
-
cluster_name
(Optional[ClusterNameOrArn], default:
None
)
–
The name or Amazon Resource Name (ARN) of the SageMaker HyperPod cluster that contains the target node.
-
node_id
(Optional[ClusterNodeId], default:
None
)
–
The unique identifier of the cluster node to which you want to attach the network interface. The node must belong to your specified HyperPod cluster and cannot be part of a Restricted Instance Group (RIG).
-
network_interface_id
(Optional[ClusterNetworkInterfaceId], default:
None
)
–
The unique identifier of the elastic network interface (ENI) to attach.
Raises:
Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
| async def attach_cluster_node_network_interface(
self,
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = None,
cluster_name: Optional[
"capo_sagemaker.types.cluster_name_or_arn.ClusterNameOrArn"
] = None,
node_id: Optional["capo_sagemaker.types.cluster_node_id.ClusterNodeId"] = None,
network_interface_id: Optional[
"capo_sagemaker.types.cluster_network_interface_id.ClusterNetworkInterfaceId"
] = None,
) -> "capo_sagemaker.types.attach_cluster_node_network_interface_response.AttachClusterNodeNetworkInterfaceResponse":
"""<p> Attaches an elastic network interface (ENI) to a node in a HyperPod cluster. </p> <p> To use this operation, you must have the <code>sagemaker:AttachClusterNodeNetworkInterface</code> permission. </p>
Args:
cluster_name: <p> The name or Amazon Resource Name (ARN) of the SageMaker HyperPod cluster that contains the target node. </p>
node_id: <p> The unique identifier of the cluster node to which you want to attach the network interface. The node must belong to your specified HyperPod cluster and cannot be part of a Restricted Instance Group (RIG). </p>
network_interface_id: <p> The unique identifier of the elastic network interface (ENI) to attach. </p>
Raises:
capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sagemaker.types.attach_cluster_node_network_interface_request.AttachClusterNodeNetworkInterfaceRequest]",
) -> AsyncOperationResponse[
"capo_sagemaker.types.attach_cluster_node_network_interface_response.AttachClusterNodeNetworkInterfaceResponse"
]:
import capo_sagemaker._operations.sage_maker.attach_cluster_node_network_interface
(
output,
http_response,
) = await capo_sagemaker._operations.sage_maker.attach_cluster_node_network_interface.async_attach_cluster_node_network_interface(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AttachClusterNodeNetworkInterface")
)
input_: capo_sagemaker.types.attach_cluster_node_network_interface_request.AttachClusterNodeNetworkInterfaceRequest = {}
if cluster_name is not None:
input_["cluster_name"] = cluster_name
if node_id is not None:
input_["node_id"] = node_id
if network_interface_id is not None:
input_["network_interface_id"] = network_interface_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|