Skip to content

describe_cluster_operation async

describe_cluster_operation(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    cluster_name: Optional[ClusterNameOrArn] = None,
    operation_id: Optional[ClusterOperationId] = None,
) -> DescribeClusterOperationResponse

Retrieves detailed information about a specific operation for a given HyperPod cluster, such as a scaling operation or a deep health check. Use the OperationId returned by the ListClusterOperations operation to identify the operation to describe.

Parameters:

  • cluster_name (Optional[ClusterNameOrArn], default: None ) –

    The name or Amazon Resource Name (ARN) of the HyperPod cluster associated with the operation.

  • operation_id (Optional[ClusterOperationId], default: None ) –

    The unique identifier (UUID) of the operation to describe. This ID can be obtained from the ListClusterOperations operation.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def describe_cluster_operation(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    cluster_name: Optional[
        "capo_sagemaker.types.cluster_name_or_arn.ClusterNameOrArn"
    ] = None,
    operation_id: Optional[
        "capo_sagemaker.types.cluster_operation_id.ClusterOperationId"
    ] = None,
) -> "capo_sagemaker.types.describe_cluster_operation_response.DescribeClusterOperationResponse":
    """<p>Retrieves detailed information about a specific operation for a given HyperPod cluster, such as a scaling operation or a deep health check. Use the <code>OperationId</code> returned by the <code>ListClusterOperations</code> operation to identify the operation to describe.</p>

    Args:
        cluster_name: <p>The name or Amazon Resource Name (ARN) of the HyperPod cluster associated with the operation.</p>
        operation_id: <p>The unique identifier (UUID) of the operation to describe. This ID can be obtained from the <code>ListClusterOperations</code> operation.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.describe_cluster_operation_request.DescribeClusterOperationRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.describe_cluster_operation_response.DescribeClusterOperationResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.describe_cluster_operation

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.describe_cluster_operation.async_describe_cluster_operation(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeClusterOperation")
    )
    input_: capo_sagemaker.types.describe_cluster_operation_request.DescribeClusterOperationRequest = {}
    if cluster_name is not None:
        input_["cluster_name"] = cluster_name
    if operation_id is not None:
        input_["operation_id"] = operation_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output