Skip to content

list_cluster_extensions async

list_cluster_extensions(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    cluster_arn: Optional[ClusterArn] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    creation_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
) -> ListClusterExtensionsResponse

Lists the extensions installed on a SageMaker HyperPod cluster.

Parameters:

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

    The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster whose extensions you want to list.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of extensions to return in the response. If you don't specify a value, SageMaker HyperPod returns up to 100 extensions.

  • next_token (Optional[NextToken], default: None ) –

    If the result of the previous ListClusterExtensions request was truncated, the response includes a NextToken. To retrieve the next set of extensions, use the token in the next request. When you use the CreationTimeAfter or CreationTimeBefore filters, a response can contain fewer extensions than MaxResults, or none, and still include a NextToken. Continue until the response doesn't include a NextToken.

  • creation_time_after (Optional[Timestamp], default: None ) –

    A filter that returns extensions created at or after the specified time. Timestamps are formatted according to the ISO 8601 standard.

  • creation_time_before (Optional[Timestamp], default: None ) –

    A filter that returns extensions created at or before the specified time. The acceptable formats are the same as the timestamp formats for CreationTimeAfter.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def list_cluster_extensions(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    cluster_arn: Optional["capo_sagemaker.types.cluster_arn.ClusterArn"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    creation_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
) -> "capo_sagemaker.types.list_cluster_extensions_response.ListClusterExtensionsResponse":
    """<p>Lists the extensions installed on a SageMaker HyperPod cluster.</p>

    Args:
        cluster_arn: <p>The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster whose extensions you want to list.</p>
        max_results: <p>The maximum number of extensions to return in the response. If you don't specify a value, SageMaker HyperPod returns up to 100 extensions.</p>
        next_token: <p>If the result of the previous <code>ListClusterExtensions</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of extensions, use the token in the next request. When you use the <code>CreationTimeAfter</code> or <code>CreationTimeBefore</code> filters, a response can contain fewer extensions than <code>MaxResults</code>, or none, and still include a <code>NextToken</code>. Continue until the response doesn't include a <code>NextToken</code>.</p>
        creation_time_after: <p>A filter that returns extensions created at or after the specified time. Timestamps are formatted according to the ISO 8601 standard.</p>
        creation_time_before: <p>A filter that returns extensions created at or before the specified time. The acceptable formats are the same as the timestamp formats for <code>CreationTimeAfter</code>.</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.list_cluster_extensions_request.ListClusterExtensionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.list_cluster_extensions_response.ListClusterExtensionsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_cluster_extensions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListClusterExtensions")
    )
    input_: capo_sagemaker.types.list_cluster_extensions_request.ListClusterExtensionsRequest = {}
    if cluster_arn is not None:
        input_["cluster_arn"] = cluster_arn
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if creation_time_after is not None:
        input_["creation_time_after"] = creation_time_after
    if creation_time_before is not None:
        input_["creation_time_before"] = creation_time_before

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