@Generated(value="software.amazon.awssdk:codegen") public interface SageMakerA2IRuntimeClient extends SdkClient
builder()
method.
Amazon Augmented AI (Augmented AI) (Preview) is a service that adds human judgment to any machine learning application. Human reviewers can take over when an AI application can't evaluate data with a high degree of confidence.
From fraudulent bank transaction identification to document processing to image analysis, machine learning models can be trained to make decisions as well as or better than a human. Nevertheless, some decisions require contextual interpretation, such as when you need to decide whether an image is appropriate for a given audience. Content moderation guidelines are nuanced and highly dependent on context, and they vary between countries. When trying to apply AI in these situations, you can be forced to choose between "ML only" systems with unacceptably high error rates or "human only" systems that are expensive and difficult to scale, and that slow down decision making.
This API reference includes information about API actions and data types you can use to interact with Augmented AI programmatically.
You can create a flow definition against the Augmented AI API. Provide the Amazon Resource Name (ARN) of a flow
definition to integrate AI service APIs, such as Textract.AnalyzeDocument and
Rekognition.DetectModerationLabels. These AI services, in turn, invoke the StartHumanLoop API,
which evaluates conditions under which humans will be invoked. If humans are required, Augmented AI creates a human
loop. Results of human work are available asynchronously in Amazon Simple Storage Service (Amazon S3). You can use
Amazon CloudWatch Events to detect human work results.
You can find additional Augmented AI API documentation in the following reference guides: Amazon Rekognition, Amazon SageMaker, and Amazon Textract.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static SageMakerA2IRuntimeClientBuilder |
builder()
Create a builder that can be used to configure and create a
SageMakerA2IRuntimeClient. |
static SageMakerA2IRuntimeClient |
create()
Create a
SageMakerA2IRuntimeClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default DeleteHumanLoopResponse |
deleteHumanLoop(Consumer<DeleteHumanLoopRequest.Builder> deleteHumanLoopRequest)
Deletes the specified human loop for a flow definition.
|
default DeleteHumanLoopResponse |
deleteHumanLoop(DeleteHumanLoopRequest deleteHumanLoopRequest)
Deletes the specified human loop for a flow definition.
|
default DescribeHumanLoopResponse |
describeHumanLoop(Consumer<DescribeHumanLoopRequest.Builder> describeHumanLoopRequest)
Returns information about the specified human loop.
|
default DescribeHumanLoopResponse |
describeHumanLoop(DescribeHumanLoopRequest describeHumanLoopRequest)
Returns information about the specified human loop.
|
default ListHumanLoopsResponse |
listHumanLoops(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest)
Returns information about human loops, given the specified parameters.
|
default ListHumanLoopsResponse |
listHumanLoops(ListHumanLoopsRequest listHumanLoopsRequest)
Returns information about human loops, given the specified parameters.
|
default ListHumanLoopsIterable |
listHumanLoopsPaginator(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest)
Returns information about human loops, given the specified parameters.
|
default ListHumanLoopsIterable |
listHumanLoopsPaginator(ListHumanLoopsRequest listHumanLoopsRequest)
Returns information about human loops, given the specified parameters.
|
static ServiceMetadata |
serviceMetadata() |
default StartHumanLoopResponse |
startHumanLoop(Consumer<StartHumanLoopRequest.Builder> startHumanLoopRequest)
Starts a human loop, provided that at least one activation condition is met.
|
default StartHumanLoopResponse |
startHumanLoop(StartHumanLoopRequest startHumanLoopRequest)
Starts a human loop, provided that at least one activation condition is met.
|
default StopHumanLoopResponse |
stopHumanLoop(Consumer<StopHumanLoopRequest.Builder> stopHumanLoopRequest)
Stops the specified human loop.
|
default StopHumanLoopResponse |
stopHumanLoop(StopHumanLoopRequest stopHumanLoopRequest)
Stops the specified human loop.
|
serviceNameclosestatic final String SERVICE_NAME
static SageMakerA2IRuntimeClient create()
SageMakerA2IRuntimeClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static SageMakerA2IRuntimeClientBuilder builder()
SageMakerA2IRuntimeClient.default DeleteHumanLoopResponse deleteHumanLoop(DeleteHumanLoopRequest deleteHumanLoopRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Deletes the specified human loop for a flow definition.
deleteHumanLoopRequest - ValidationException - Your request was not valid. Check the syntax and try again.ResourceNotFoundException - We were unable to find the requested resource.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteHumanLoopResponse deleteHumanLoop(Consumer<DeleteHumanLoopRequest.Builder> deleteHumanLoopRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Deletes the specified human loop for a flow definition.
This is a convenience which creates an instance of the DeleteHumanLoopRequest.Builder avoiding the need
to create one manually via DeleteHumanLoopRequest.builder()
deleteHumanLoopRequest - A Consumer that will call methods on DeleteHumanLoopRequest.Builder to create a request.ValidationException - Your request was not valid. Check the syntax and try again.ResourceNotFoundException - We were unable to find the requested resource.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DescribeHumanLoopResponse describeHumanLoop(DescribeHumanLoopRequest describeHumanLoopRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Returns information about the specified human loop.
describeHumanLoopRequest - ValidationException - Your request was not valid. Check the syntax and try again.ResourceNotFoundException - We were unable to find the requested resource.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DescribeHumanLoopResponse describeHumanLoop(Consumer<DescribeHumanLoopRequest.Builder> describeHumanLoopRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Returns information about the specified human loop.
This is a convenience which creates an instance of the DescribeHumanLoopRequest.Builder avoiding the need
to create one manually via DescribeHumanLoopRequest.builder()
describeHumanLoopRequest - A Consumer that will call methods on DescribeHumanLoopRequest.Builder to create a request.ValidationException - Your request was not valid. Check the syntax and try again.ResourceNotFoundException - We were unable to find the requested resource.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListHumanLoopsResponse listHumanLoops(ListHumanLoopsRequest listHumanLoopsRequest) throws ValidationException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Returns information about human loops, given the specified parameters.
listHumanLoopsRequest - ValidationException - Your request was not valid. Check the syntax and try again.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListHumanLoopsResponse listHumanLoops(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest) throws ValidationException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Returns information about human loops, given the specified parameters.
This is a convenience which creates an instance of the ListHumanLoopsRequest.Builder avoiding the need to
create one manually via ListHumanLoopsRequest.builder()
listHumanLoopsRequest - A Consumer that will call methods on ListHumanLoopsRequest.Builder to create a request.ValidationException - Your request was not valid. Check the syntax and try again.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListHumanLoopsIterable listHumanLoopsPaginator(ListHumanLoopsRequest listHumanLoopsRequest) throws ValidationException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Returns information about human loops, given the specified parameters.
This is a variant of
listHumanLoops(software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsIterable responses = client.listHumanLoopsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsIterable responses = client
.listHumanLoopsPaginator(request);
for (software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsIterable responses = client.listHumanLoopsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
listHumanLoops(software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsRequest)
operation.
listHumanLoopsRequest - ValidationException - Your request was not valid. Check the syntax and try again.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListHumanLoopsIterable listHumanLoopsPaginator(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest) throws ValidationException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Returns information about human loops, given the specified parameters.
This is a variant of
listHumanLoops(software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsIterable responses = client.listHumanLoopsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsIterable responses = client
.listHumanLoopsPaginator(request);
for (software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsIterable responses = client.listHumanLoopsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
listHumanLoops(software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsRequest)
operation.
This is a convenience which creates an instance of the ListHumanLoopsRequest.Builder avoiding the need to
create one manually via ListHumanLoopsRequest.builder()
listHumanLoopsRequest - A Consumer that will call methods on ListHumanLoopsRequest.Builder to create a request.ValidationException - Your request was not valid. Check the syntax and try again.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StartHumanLoopResponse startHumanLoop(StartHumanLoopRequest startHumanLoopRequest) throws ValidationException, ThrottlingException, ServiceQuotaExceededException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Starts a human loop, provided that at least one activation condition is met.
startHumanLoopRequest - ValidationException - Your request was not valid. Check the syntax and try again.ThrottlingException - Your request has exceeded the allowed amount of requests.ServiceQuotaExceededException - You have exceeded your service quota. To perform the requested action, remove some of the relevant
resources, or request a service quota increase.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StartHumanLoopResponse startHumanLoop(Consumer<StartHumanLoopRequest.Builder> startHumanLoopRequest) throws ValidationException, ThrottlingException, ServiceQuotaExceededException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Starts a human loop, provided that at least one activation condition is met.
This is a convenience which creates an instance of the StartHumanLoopRequest.Builder avoiding the need to
create one manually via StartHumanLoopRequest.builder()
startHumanLoopRequest - A Consumer that will call methods on StartHumanLoopRequest.Builder to create a request.ValidationException - Your request was not valid. Check the syntax and try again.ThrottlingException - Your request has exceeded the allowed amount of requests.ServiceQuotaExceededException - You have exceeded your service quota. To perform the requested action, remove some of the relevant
resources, or request a service quota increase.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StopHumanLoopResponse stopHumanLoop(StopHumanLoopRequest stopHumanLoopRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Stops the specified human loop.
stopHumanLoopRequest - ValidationException - Your request was not valid. Check the syntax and try again.ResourceNotFoundException - We were unable to find the requested resource.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StopHumanLoopResponse stopHumanLoop(Consumer<StopHumanLoopRequest.Builder> stopHumanLoopRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Stops the specified human loop.
This is a convenience which creates an instance of the StopHumanLoopRequest.Builder avoiding the need to
create one manually via StopHumanLoopRequest.builder()
stopHumanLoopRequest - A Consumer that will call methods on StopHumanLoopRequest.Builder to create a request.ValidationException - Your request was not valid. Check the syntax and try again.ResourceNotFoundException - We were unable to find the requested resource.ThrottlingException - Your request has exceeded the allowed amount of requests.InternalServerException - Your request could not be processed.SdkException - Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException - If any client side error occurs such as an IO related failure, failure to get credentials, etc.SageMakerA2IRuntimeException - Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionstatic ServiceMetadata serviceMetadata()
Copyright © 2020. All rights reserved.