Table of Contents
A low-level client representing Amazon Augmented AI Runtime:
import boto3
client = boto3.client('sagemaker-a2i-runtime')
These are the available methods:
Check if an operation can be paginated.
Deletes the specified human loop for a flow definition.
See also: AWS API Documentation
Request Syntax
response = client.delete_human_loop(
HumanLoopName='string'
)
[REQUIRED]
The name of the human loop you want to delete.
{}
Response Structure
Returns information about the specified human loop.
See also: AWS API Documentation
Request Syntax
response = client.describe_human_loop(
HumanLoopName='string'
)
[REQUIRED]
The name of the human loop.
{
'CreationTimestamp': datetime(2015, 1, 1),
'FailureReason': 'string',
'FailureCode': 'string',
'HumanLoopStatus': 'InProgress'|'Failed'|'Completed'|'Stopped'|'Stopping',
'HumanLoopName': 'string',
'HumanLoopArn': 'string',
'FlowDefinitionArn': 'string',
'HumanLoopInput': {
'InputContent': 'string'
},
'HumanLoopOutput': {
'OutputS3Uri': 'string'
}
}
Response Structure
The timestamp when Amazon Augmented AI created the human loop.
The reason why a human loop has failed. The failure reason is returned when the human loop status is Failed .
A failure code denoting a specific type of failure.
The status of the human loop. Valid values:
The name of the human loop.
The Amazon Resource Name (ARN) of the human loop.
The Amazon Resource Name (ARN) of the flow definition.
An object containing information about the human loop input.
Serialized input from the human loop.
An object containing information about the output of the human loop.
The location of the Amazon S3 object where Amazon Augmented AI stores your human loop output. The output is stored at the following location: s3://S3OutputPath/HumanLoopName/CreationTime/output.json .
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns an object that can wait for some condition.
Returns information about human loops, given the specified parameters.
See also: AWS API Documentation
Request Syntax
response = client.list_human_loops(
CreationTimeAfter=datetime(2015, 1, 1),
CreationTimeBefore=datetime(2015, 1, 1),
SortOrder='Ascending'|'Descending',
NextToken='string',
MaxResults=123
)
dict
Response Syntax
{
'HumanLoopSummaries': [
{
'HumanLoopName': 'string',
'HumanLoopStatus': 'InProgress'|'Failed'|'Completed'|'Stopped'|'Stopping',
'CreationTime': datetime(2015, 1, 1),
'FailureReason': 'string',
'FlowDefinitionArn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
HumanLoopSummaries (list) --
An array of objects containing information about the human loops.
(dict) --
Summary information about the human loop.
HumanLoopName (string) --
The name of the human loop.
HumanLoopStatus (string) --
The status of the human loop. Valid values:
CreationTime (datetime) --
When Amazon Augmented AI created the human loop.
FailureReason (string) --
The reason why the human loop failed. A failure reason is returned only when the status of the human loop is Failed .
FlowDefinitionArn (string) --
The Amazon Resource Name (ARN) of the flow definition.
NextToken (string) --
A token to resume pagination.
Starts a human loop, provided that at least one activation condition is met.
See also: AWS API Documentation
Request Syntax
response = client.start_human_loop(
HumanLoopName='string',
FlowDefinitionArn='string',
HumanLoopInput={
'InputContent': 'string'
},
DataAttributes={
'ContentClassifiers': [
'FreeOfPersonallyIdentifiableInformation'|'FreeOfAdultContent',
]
}
)
[REQUIRED]
The name of the human loop.
[REQUIRED]
The Amazon Resource Name (ARN) of the flow definition.
[REQUIRED]
An object containing information about the human loop.
Serialized input from the human loop.
Attributes of the data specified by the customer.
Declares that your content is free of personally identifiable information or adult content. Amazon SageMaker may restrict the Amazon Mechanical Turk workers that can view your task based on this information.
dict
Response Syntax
{
'HumanLoopArn': 'string',
'HumanLoopActivationResults': {
'HumanLoopActivationReason': {
'ConditionsMatched': True|False
},
'HumanLoopActivationConditionsEvaluationResults': 'string'
}
}
Response Structure
(dict) --
HumanLoopArn (string) --
The Amazon Resource Name (ARN) of the human loop.
HumanLoopActivationResults (dict) --
An object containing information about the human loop activation.
HumanLoopActivationReason (dict) --
An object containing information about why a human loop was triggered.
ConditionsMatched (boolean) --
True if the specified conditions were matched to trigger the human loop.
HumanLoopActivationConditionsEvaluationResults (string) --
A copy of the human loop activation conditions of the flow definition, augmented with the results of evaluating those conditions on the input provided to the StartHumanLoop operation.
Stops the specified human loop.
See also: AWS API Documentation
Request Syntax
response = client.stop_human_loop(
HumanLoopName='string'
)
[REQUIRED]
The name of the human loop you want to stop.
{}
Response Structure
The available paginators are:
paginator = client.get_paginator('list_human_loops')
Creates an iterator that will paginate through responses from AugmentedAIRuntime.Client.list_human_loops().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
CreationTimeAfter=datetime(2015, 1, 1),
CreationTimeBefore=datetime(2015, 1, 1),
SortOrder='Ascending'|'Descending',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'HumanLoopSummaries': [
{
'HumanLoopName': 'string',
'HumanLoopStatus': 'InProgress'|'Failed'|'Completed'|'Stopped'|'Stopping',
'CreationTime': datetime(2015, 1, 1),
'FailureReason': 'string',
'FlowDefinitionArn': 'string'
},
],
}
Response Structure
(dict) --
HumanLoopSummaries (list) --
An array of objects containing information about the human loops.
(dict) --
Summary information about the human loop.
HumanLoopName (string) --
The name of the human loop.
HumanLoopStatus (string) --
The status of the human loop. Valid values:
CreationTime (datetime) --
When Amazon Augmented AI created the human loop.
FailureReason (string) --
The reason why the human loop failed. A failure reason is returned only when the status of the human loop is Failed .
FlowDefinitionArn (string) --
The Amazon Resource Name (ARN) of the flow definition.