Skip to content

list_ai_workload_configs

list_ai_workload_configs(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    name_contains: Optional[NameContains] = None,
    creation_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
    sort_by: Optional[ListAIWorkloadConfigsSortBy] = None,
    sort_order: Optional[SortOrder] = None,
) -> ListAIWorkloadConfigsResponse

Returns a list of AI workload configurations in your account. You can filter the results by name and creation time, and sort the results. The response is paginated.

Parameters:

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

    The maximum number of AI workload configurations to return in the response.

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

    If the previous call to ListAIWorkloadConfigs didn't return the full set of configurations, the call returns a token for getting the next set of configurations.

  • name_contains (Optional[NameContains], default: None ) –

    A string in the configuration name. This filter returns only configurations whose name contains the specified string.

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

    A filter that returns only configurations created after the specified time.

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

    A filter that returns only configurations created before the specified time.

  • sort_by (Optional[ListAIWorkloadConfigsSortBy], default: None ) –

    The field to sort results by. The default is CreationTime.

  • sort_order (Optional[SortOrder], default: None ) –

    The sort order for results. The default is Descending.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def list_ai_workload_configs(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    name_contains: Optional[
        "capo_sagemaker.types.name_contains.NameContains"
    ] = None,
    creation_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    sort_by: Optional[
        "capo_sagemaker.types.list_ai_workload_configs_sort_by.ListAIWorkloadConfigsSortBy"
    ] = None,
    sort_order: Optional["capo_sagemaker.types.sort_order.SortOrder"] = None,
) -> "capo_sagemaker.types.list_ai_workload_configs_response.ListAIWorkloadConfigsResponse":
    """<p>Returns a list of AI workload configurations in your account. You can filter the results by name and creation time, and sort the results. The response is paginated.</p>

    Args:
        max_results: <p>The maximum number of AI workload configurations to return in the response.</p>
        next_token: <p>If the previous call to <code>ListAIWorkloadConfigs</code> didn't return the full set of configurations, the call returns a token for getting the next set of configurations.</p>
        name_contains: <p>A string in the configuration name. This filter returns only configurations whose name contains the specified string.</p>
        creation_time_after: <p>A filter that returns only configurations created after the specified time.</p>
        creation_time_before: <p>A filter that returns only configurations created before the specified time.</p>
        sort_by: <p>The field to sort results by. The default is <code>CreationTime</code>.</p>
        sort_order: <p>The sort order for results. The default is <code>Descending</code>.</p>

    Raises:
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.list_ai_workload_configs_request.ListAIWorkloadConfigsRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.list_ai_workload_configs_response.ListAIWorkloadConfigsResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_ai_workload_configs

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAIWorkloadConfigs")
    )
    input_: capo_sagemaker.types.list_ai_workload_configs_request.ListAIWorkloadConfigsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if name_contains is not None:
        input_["name_contains"] = name_contains
    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
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order

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