Skip to main content

human_loops

Creates, updates, deletes, gets or lists a human_loops resource.

Overview

Namehuman_loops
TypeResource
Idaws.sagemaker_a2i_runtime.human_loops

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The creation time when Amazon Augmented AI created the human loop.
failure_codestringA failure code that identifies the type of failure. Possible values: ValidationError, Expired, InternalError
failure_reasonstringThe reason why a human loop failed. The failure reason is returned when the status of the human loop is Failed.
flow_definition_arnstringThe Amazon Resource Name (ARN) of the flow definition. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:flow-definition/.*</code>)
human_loop_arnstringThe Amazon Resource Name (ARN) of the human loop. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:human-loop/.*</code>)
human_loop_namestringThe name of the human loop. The name must be lowercase, unique within the Region in your account, and can have up to 63 characters. Valid characters: a-z, 0-9, and - (hyphen). (pattern: <code>^[a-z0-9](-[a-z0-9])$</code>)
human_loop_outputobjectAn object that contains information about the output of the human loop.
human_loop_statusstringThe status of the human loop. (InProgress, Failed, Completed, Stopped, Stopping)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_human_loopselecthuman_loop_name, regionReturns information about the specified human loop. If the human loop was deleted, this operation will return a ResourceNotFoundException error.
list_human_loopsselectFlowDefinitionArn, regionCreationTimeAfter, CreationTimeBefore, SortOrder, NextToken, MaxResultsReturns information about human loops, given the specified parameters. If a human loop was deleted, it will not be included.
delete_human_loopdeletehuman_loop_name, regionDeletes the specified human loop for a flow definition. If the human loop was deleted, this operation will return a ResourceNotFoundException.
start_human_loopexecregion, HumanLoopName, FlowDefinitionArn, HumanLoopInputStarts a human loop, provided that at least one activation condition is met.
stop_human_loopexecregion, HumanLoopNameStops the specified human loop.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
FlowDefinitionArnstringThe Amazon Resource Name (ARN) of a flow definition.
human_loop_namestringThe name of the human loop that you want to delete.
regionstringAWS region (default: us-east-1)
CreationTimeAfterstring (date-time)(Optional) The timestamp of the date when you want the human loops to begin in ISO 8601 format. For example, 2020-02-24.
CreationTimeBeforestring (date-time)(Optional) The timestamp of the date before which you want the human loops to begin in ISO 8601 format. For example, 2020-02-24.
MaxResultsintegerThe 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.
NextTokenstringA token to display the next page of results.
SortOrderstringOptional. The order for displaying results. Valid values: Ascending and Descending.

SELECT examples

Returns information about the specified human loop. If the human loop was deleted, this operation will return a ResourceNotFoundException error.

SELECT
creation_time,
failure_code,
failure_reason,
flow_definition_arn,
human_loop_arn,
human_loop_name,
human_loop_output,
human_loop_status
FROM aws.sagemaker_a2i_runtime.human_loops
WHERE human_loop_name = '{{ human_loop_name }}' -- required
AND region = '{{ region }}' -- required
;

DELETE examples

Deletes the specified human loop for a flow definition. If the human loop was deleted, this operation will return a ResourceNotFoundException.

DELETE FROM aws.sagemaker_a2i_runtime.human_loops
WHERE human_loop_name = '{{ human_loop_name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Starts a human loop, provided that at least one activation condition is met.

EXEC aws.sagemaker_a2i_runtime.human_loops.start_human_loop
@region='{{ region }}' --required
@@json=
'{
"HumanLoopName": "{{ HumanLoopName }}",
"FlowDefinitionArn": "{{ FlowDefinitionArn }}",
"HumanLoopInput": "{{ HumanLoopInput }}",
"DataAttributes": "{{ DataAttributes }}"
}'
;