human_loops
Creates, updates, deletes, gets or lists a human_loops resource.
Overview
| Name | human_loops |
| Type | Resource |
| Id | aws.sagemaker_a2i_runtime.human_loops |
Fields
The following fields are returned by SELECT queries:
- describe_human_loop
- list_human_loops
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The creation time when Amazon Augmented AI created the human loop. |
failure_code | string | A failure code that identifies the type of failure. Possible values: ValidationError, Expired, InternalError |
failure_reason | string | The reason why a human loop failed. The failure reason is returned when the status of the human loop is Failed. |
flow_definition_arn | string | The 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_arn | string | The 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_name | string | The 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_output | object | An object that contains information about the output of the human loop. |
human_loop_status | string | The status of the human loop. (InProgress, Failed, Completed, Stopped, Stopping) |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | When Amazon Augmented AI created the human loop. |
failure_reason | string | The reason why the human loop failed. A failure reason is returned when the status of the human loop is Failed. |
flow_definition_arn | string | The Amazon Resource Name (ARN) of the flow definition used to configure the human loop. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:flow-definition/.*</code>) |
human_loop_name | string | The name of the human loop. (pattern: <code>^[a-z0-9](-[a-z0-9])$</code>) |
human_loop_status | string | The status of the human loop. (InProgress, Failed, Completed, Stopped, Stopping) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_human_loop | select | human_loop_name, region | Returns information about the specified human loop. If the human loop was deleted, this operation will return a ResourceNotFoundException error. | |
list_human_loops | select | FlowDefinitionArn, region | CreationTimeAfter, CreationTimeBefore, SortOrder, NextToken, MaxResults | Returns information about human loops, given the specified parameters. If a human loop was deleted, it will not be included. |
delete_human_loop | delete | human_loop_name, region | Deletes the specified human loop for a flow definition. If the human loop was deleted, this operation will return a ResourceNotFoundException. | |
start_human_loop | exec | region, HumanLoopName, FlowDefinitionArn, HumanLoopInput | Starts a human loop, provided that at least one activation condition is met. | |
stop_human_loop | exec | region, HumanLoopName | Stops 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.
| Name | Datatype | Description |
|---|---|---|
FlowDefinitionArn | string | The Amazon Resource Name (ARN) of a flow definition. |
human_loop_name | string | The name of the human loop that you want to delete. |
region | string | AWS region (default: us-east-1) |
CreationTimeAfter | string (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. |
CreationTimeBefore | string (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. |
MaxResults | integer | 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. |
NextToken | string | A token to display the next page of results. |
SortOrder | string | Optional. The order for displaying results. Valid values: Ascending and Descending. |
SELECT examples
- describe_human_loop
- list_human_loops
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
;
Returns information about human loops, given the specified parameters. If a human loop was deleted, it will not be included.
SELECT
creation_time,
failure_reason,
flow_definition_arn,
human_loop_name,
human_loop_status
FROM aws.sagemaker_a2i_runtime.human_loops
WHERE FlowDefinitionArn = '{{ FlowDefinitionArn }}' -- required
AND region = '{{ region }}' -- required
AND CreationTimeAfter = '{{ CreationTimeAfter }}'
AND CreationTimeBefore = '{{ CreationTimeBefore }}'
AND SortOrder = '{{ SortOrder }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;
DELETE examples
- delete_human_loop
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
- start_human_loop
- stop_human_loop
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 }}"
}'
;
Stops the specified human loop.
EXEC aws.sagemaker_a2i_runtime.human_loops.stop_human_loop
@region='{{ region }}' --required
@@json=
'{
"HumanLoopName": "{{ HumanLoopName }}"
}'
;