Skip to content

list_human_loops

list_human_loops(
    *,
    config_overrides: Optional[SageMakerA2IRuntimeClientConfig] = None,
    creation_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
    flow_definition_arn: Optional[FlowDefinitionArn] = None,
    sort_order: Optional[SortOrder] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListHumanLoopsResponse

Returns information about human loops, given the specified parameters. If a human loop was deleted, it will not be included.

Parameters:

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

    (Optional) The timestamp of the date when you want the human loops to begin in ISO 8601 format. For example, 2020-02-24.

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

    (Optional) The timestamp of the date before which you want the human loops to begin in ISO 8601 format. For example, 2020-02-24.

  • flow_definition_arn (Optional[FlowDefinitionArn], default: None ) –

    The Amazon Resource Name (ARN) of a flow definition.

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

    Optional. The order for displaying results. Valid values: Ascending and Descending.

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

    A token to display the next page of results.

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

    The total number of items to return. If the total number of available items is more than the value specified in MaxResults, then a NextToken is returned in the output. You can use this token to display the next page of results.

Raises:

  • InternalServerException –

    We couldn't process your request because of an issue with the server. Try again later.

  • ResourceNotFoundException –

    We couldn't find the requested resource. Check that your resources exists and were created in the same AWS Region as your request, and try your request again.

  • ThrottlingException –

    You exceeded the maximum number of requests.

  • ValidationException –

    The request isn't valid. Check the syntax and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_sagemaker_a2i_runtime/_services/sage_maker_a2_i_runtime.py
def list_human_loops(
    self,
    *,
    config_overrides: Optional[SageMakerA2IRuntimeClientConfig] = None,
    creation_time_after: Optional[
        "capo_sagemaker_a2i_runtime.types.timestamp.Timestamp"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker_a2i_runtime.types.timestamp.Timestamp"
    ] = None,
    flow_definition_arn: Optional[
        "capo_sagemaker_a2i_runtime.types.flow_definition_arn.FlowDefinitionArn"
    ] = None,
    sort_order: Optional[
        "capo_sagemaker_a2i_runtime.types.sort_order.SortOrder"
    ] = None,
    next_token: Optional[
        "capo_sagemaker_a2i_runtime.types.next_token.NextToken"
    ] = None,
    max_results: Optional[
        "capo_sagemaker_a2i_runtime.types.max_results.MaxResults"
    ] = None,
) -> "capo_sagemaker_a2i_runtime.types.list_human_loops_response.ListHumanLoopsResponse":
    """<p>Returns information about human loops, given the specified parameters. If a human loop was deleted, it will not be included.</p>

    Args:
        creation_time_after: <p>(Optional) The timestamp of the date when you want the human loops to begin in ISO 8601 format. For example, <code>2020-02-24</code>.</p>
        creation_time_before: <p>(Optional) The timestamp of the date before which you want the human loops to begin in ISO 8601 format. For example, <code>2020-02-24</code>.</p>
        flow_definition_arn: <p>The Amazon Resource Name (ARN) of a flow definition.</p>
        sort_order: <p>Optional. The order for displaying results. Valid values: <code>Ascending</code> and <code>Descending</code>.</p>
        next_token: <p>A token to display the next page of results.</p>
        max_results: <p>The total number of items to return. If the total number of available items is more than the value specified in <code>MaxResults</code>, then a <code>NextToken</code> is returned in the output. You can use this token to display the next page of results. </p>

    Raises:
        capo_sagemaker_a2i_runtime.errors.internal_server_exception.InternalServerException: <p>We couldn't process your request because of an issue with the server. Try again later.</p>
        capo_sagemaker_a2i_runtime.errors.resource_not_found_exception.ResourceNotFoundException: <p>We couldn't find the requested resource. Check that your resources exists and were created in the same AWS Region as your request, and try your request again. </p>
        capo_sagemaker_a2i_runtime.errors.throttling_exception.ThrottlingException: <p>You exceeded the maximum number of requests.</p>
        capo_sagemaker_a2i_runtime.errors.validation_exception.ValidationException: <p>The request isn't valid. Check the syntax and try again.</p>
        capo_sagemaker_a2i_runtime.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker_a2i_runtime.types.list_human_loops_request.ListHumanLoopsRequest]",
    ) -> OperationResponse[
        "capo_sagemaker_a2i_runtime.types.list_human_loops_response.ListHumanLoopsResponse"
    ]:
        import capo_sagemaker_a2i_runtime._operations.amazon_sage_maker_a2_i_runtime.list_human_loops

        output, http_response = (
            capo_sagemaker_a2i_runtime._operations.amazon_sage_maker_a2_i_runtime.list_human_loops.list_human_loops(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListHumanLoops")
    )
    input_: capo_sagemaker_a2i_runtime.types.list_human_loops_request.ListHumanLoopsRequest = {}
    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 flow_definition_arn is not None:
        input_["flow_definition_arn"] = flow_definition_arn
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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