SDK for PHP 3.x

Client: Aws\AugmentedAIRuntime\AugmentedAIRuntimeClient
Service ID: sagemaker-a2i-runtime
Version: 2019-11-07

This page describes the parameters and results for the operations of the Amazon Augmented AI Runtime (2019-11-07), and shows how to use the Aws\AugmentedAIRuntime\AugmentedAIRuntimeClient object to call the described operations. This documentation is specific to the 2019-11-07 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

DeleteHumanLoop ( array $params = [] )
Deletes the specified human loop for a flow definition.
DescribeHumanLoop ( array $params = [] )
Returns information about the specified human loop.
ListHumanLoops ( array $params = [] )
Returns information about human loops, given the specified parameters.
StartHumanLoop ( array $params = [] )
Starts a human loop, provided that at least one activation condition is met.
StopHumanLoop ( array $params = [] )
Stops the specified human loop.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListHumanLoops

Operations

DeleteHumanLoop

$result = $client->deleteHumanLoop([/* ... */]);
$promise = $client->deleteHumanLoopAsync([/* ... */]);

Deletes the specified human loop for a flow definition.

If the human loop was deleted, this operation will return a ResourceNotFoundException.

Parameter Syntax

$result = $client->deleteHumanLoop([
    'HumanLoopName' => '<string>', // REQUIRED
]);

Parameter Details

Members
HumanLoopName
Required: Yes
Type: string

The name of the human loop that you want to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

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

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.

InternalServerException:

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

DescribeHumanLoop

$result = $client->describeHumanLoop([/* ... */]);
$promise = $client->describeHumanLoopAsync([/* ... */]);

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

Parameter Syntax

$result = $client->describeHumanLoop([
    'HumanLoopName' => '<string>', // REQUIRED
]);

Parameter Details

Members
HumanLoopName
Required: Yes
Type: string

The name of the human loop that you want information about.

Result Syntax

[
    'CreationTime' => <DateTime>,
    'FailureCode' => '<string>',
    'FailureReason' => '<string>',
    'FlowDefinitionArn' => '<string>',
    'HumanLoopArn' => '<string>',
    'HumanLoopName' => '<string>',
    'HumanLoopOutput' => [
        'OutputS3Uri' => '<string>',
    ],
    'HumanLoopStatus' => 'InProgress|Failed|Completed|Stopped|Stopping',
]

Result Details

Members
CreationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The creation time when Amazon Augmented AI created the human loop.

FailureCode
Type: string

A failure code that identifies the type of failure.

Possible values: ValidationError, Expired, InternalError

FailureReason
Type: string

The reason why a human loop failed. The failure reason is returned when the status of the human loop is Failed.

FlowDefinitionArn
Required: Yes
Type: string

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

HumanLoopArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the human loop.

HumanLoopName
Required: Yes
Type: 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).

HumanLoopOutput
Type: HumanLoopOutput structure

An object that contains information about the output of the human loop.

HumanLoopStatus
Required: Yes
Type: string

The status of the human loop.

Errors

ValidationException:

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

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.

InternalServerException:

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

ListHumanLoops

$result = $client->listHumanLoops([/* ... */]);
$promise = $client->listHumanLoopsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->listHumanLoops([
    'CreationTimeAfter' => <integer || string || DateTime>,
    'CreationTimeBefore' => <integer || string || DateTime>,
    'FlowDefinitionArn' => '<string>', // REQUIRED
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'SortOrder' => 'Ascending|Descending',
]);

Parameter Details

Members
CreationTimeAfter
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

CreationTimeBefore
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

FlowDefinitionArn
Required: Yes
Type: string

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

MaxResults
Type: int

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
Type: string

A token to display the next page of results.

SortOrder
Type: string

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

Result Syntax

[
    'HumanLoopSummaries' => [
        [
            'CreationTime' => <DateTime>,
            'FailureReason' => '<string>',
            'FlowDefinitionArn' => '<string>',
            'HumanLoopName' => '<string>',
            'HumanLoopStatus' => 'InProgress|Failed|Completed|Stopped|Stopping',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
HumanLoopSummaries
Required: Yes
Type: Array of HumanLoopSummary structures

An array of objects that contain information about the human loops.

NextToken
Type: string

A token to display the next page of results.

Errors

ValidationException:

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

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.

InternalServerException:

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

StartHumanLoop

$result = $client->startHumanLoop([/* ... */]);
$promise = $client->startHumanLoopAsync([/* ... */]);

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

Parameter Syntax

$result = $client->startHumanLoop([
    'DataAttributes' => [
        'ContentClassifiers' => ['<string>', ...], // REQUIRED
    ],
    'FlowDefinitionArn' => '<string>', // REQUIRED
    'HumanLoopInput' => [ // REQUIRED
        'InputContent' => '<string>', // REQUIRED
    ],
    'HumanLoopName' => '<string>', // REQUIRED
]);

Parameter Details

Members
DataAttributes
Type: HumanLoopDataAttributes structure

Attributes of the specified data. Use DataAttributes to specify if your data is free of personally identifiable information and/or free of adult content.

FlowDefinitionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the flow definition associated with this human loop.

HumanLoopInput
Required: Yes
Type: HumanLoopInput structure

An object that contains information about the human loop.

HumanLoopName
Required: Yes
Type: string

The name of the human loop.

Result Syntax

[
    'HumanLoopArn' => '<string>',
]

Result Details

Members
HumanLoopArn
Type: string

The Amazon Resource Name (ARN) of the human loop.

Errors

ValidationException:

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

ThrottlingException:

You exceeded the maximum number of requests.

ServiceQuotaExceededException:

You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your AWS account. For a list of Amazon A2I service quotes, see Amazon Augmented AI Service Quotes. Delete some resources or request an increase in your service quota. You can request a quota increase using Service Quotas or the AWS Support Center. To request an increase, see AWS Service Quotas in the AWS General Reference.

InternalServerException:

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

ConflictException:

Your request has the same name as another active human loop but has different input data. You cannot start two human loops with the same name and different input data.

StopHumanLoop

$result = $client->stopHumanLoop([/* ... */]);
$promise = $client->stopHumanLoopAsync([/* ... */]);

Stops the specified human loop.

Parameter Syntax

$result = $client->stopHumanLoop([
    'HumanLoopName' => '<string>', // REQUIRED
]);

Parameter Details

Members
HumanLoopName
Required: Yes
Type: string

The name of the human loop that you want to stop.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ValidationException:

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

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.

InternalServerException:

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

Shapes

ConflictException

Description

Your request has the same name as another active human loop but has different input data. You cannot start two human loops with the same name and different input data.

Members
Message
Type: string

HumanLoopDataAttributes

Description

Attributes of the data specified by the customer. Use these to describe the data to be labeled.

Members
ContentClassifiers
Required: Yes
Type: Array of strings

Declares that your content is free of personally identifiable information or adult content.

Amazon SageMaker can restrict the Amazon Mechanical Turk workers who can view your task based on this information.

HumanLoopInput

Description

An object containing the human loop input in JSON format.

Members
InputContent
Required: Yes
Type: string

Serialized input from the human loop. The input must be a string representation of a file in JSON format.

HumanLoopOutput

Description

Information about where the human output will be stored.

Members
OutputS3Uri
Required: Yes
Type: string

The location of the Amazon S3 object where Amazon Augmented AI stores your human loop output.

HumanLoopSummary

Description

Summary information about the human loop.

Members
CreationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

When Amazon Augmented AI created the human loop.

FailureReason
Type: string

The reason why the human loop failed. A failure reason is returned when the status of the human loop is Failed.

FlowDefinitionArn
Type: string

The Amazon Resource Name (ARN) of the flow definition used to configure the human loop.

HumanLoopName
Type: string

The name of the human loop.

HumanLoopStatus
Type: string

The status of the human loop.

InternalServerException

Description

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

Members
Message
Type: string

ResourceNotFoundException

Description

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.

Members
Message
Type: string

ServiceQuotaExceededException

Description

You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your AWS account. For a list of Amazon A2I service quotes, see Amazon Augmented AI Service Quotes. Delete some resources or request an increase in your service quota. You can request a quota increase using Service Quotas or the AWS Support Center. To request an increase, see AWS Service Quotas in the AWS General Reference.

Members
Message
Type: string

ThrottlingException

Description

You exceeded the maximum number of requests.

Members
Message
Type: string

ValidationException

Description

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

Members
Message
Type: string