@Generated(value="software.amazon.awssdk:codegen") public interface SageMakerA2IRuntimeAsyncClient 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 SageMakerA2IRuntimeAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
SageMakerA2IRuntimeAsyncClient. |
static SageMakerA2IRuntimeAsyncClient |
create()
Create a
SageMakerA2IRuntimeAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CompletableFuture<DeleteHumanLoopResponse> |
deleteHumanLoop(Consumer<DeleteHumanLoopRequest.Builder> deleteHumanLoopRequest)
Deletes the specified human loop for a flow definition.
|
default CompletableFuture<DeleteHumanLoopResponse> |
deleteHumanLoop(DeleteHumanLoopRequest deleteHumanLoopRequest)
Deletes the specified human loop for a flow definition.
|
default CompletableFuture<DescribeHumanLoopResponse> |
describeHumanLoop(Consumer<DescribeHumanLoopRequest.Builder> describeHumanLoopRequest)
Returns information about the specified human loop.
|
default CompletableFuture<DescribeHumanLoopResponse> |
describeHumanLoop(DescribeHumanLoopRequest describeHumanLoopRequest)
Returns information about the specified human loop.
|
default CompletableFuture<ListHumanLoopsResponse> |
listHumanLoops(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest)
Returns information about human loops, given the specified parameters.
|
default CompletableFuture<ListHumanLoopsResponse> |
listHumanLoops(ListHumanLoopsRequest listHumanLoopsRequest)
Returns information about human loops, given the specified parameters.
|
default ListHumanLoopsPublisher |
listHumanLoopsPaginator(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest)
Returns information about human loops, given the specified parameters.
|
default ListHumanLoopsPublisher |
listHumanLoopsPaginator(ListHumanLoopsRequest listHumanLoopsRequest)
Returns information about human loops, given the specified parameters.
|
default CompletableFuture<StartHumanLoopResponse> |
startHumanLoop(Consumer<StartHumanLoopRequest.Builder> startHumanLoopRequest)
Starts a human loop, provided that at least one activation condition is met.
|
default CompletableFuture<StartHumanLoopResponse> |
startHumanLoop(StartHumanLoopRequest startHumanLoopRequest)
Starts a human loop, provided that at least one activation condition is met.
|
default CompletableFuture<StopHumanLoopResponse> |
stopHumanLoop(Consumer<StopHumanLoopRequest.Builder> stopHumanLoopRequest)
Stops the specified human loop.
|
default CompletableFuture<StopHumanLoopResponse> |
stopHumanLoop(StopHumanLoopRequest stopHumanLoopRequest)
Stops the specified human loop.
|
serviceNameclosestatic final String SERVICE_NAME
static SageMakerA2IRuntimeAsyncClient create()
SageMakerA2IRuntimeAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static SageMakerA2IRuntimeAsyncClientBuilder builder()
SageMakerA2IRuntimeAsyncClient.default CompletableFuture<DeleteHumanLoopResponse> deleteHumanLoop(DeleteHumanLoopRequest deleteHumanLoopRequest)
Deletes the specified human loop for a flow definition.
deleteHumanLoopRequest - default CompletableFuture<DeleteHumanLoopResponse> deleteHumanLoop(Consumer<DeleteHumanLoopRequest.Builder> deleteHumanLoopRequest)
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.default CompletableFuture<DescribeHumanLoopResponse> describeHumanLoop(DescribeHumanLoopRequest describeHumanLoopRequest)
Returns information about the specified human loop.
describeHumanLoopRequest - default CompletableFuture<DescribeHumanLoopResponse> describeHumanLoop(Consumer<DescribeHumanLoopRequest.Builder> describeHumanLoopRequest)
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.default CompletableFuture<ListHumanLoopsResponse> listHumanLoops(ListHumanLoopsRequest listHumanLoopsRequest)
Returns information about human loops, given the specified parameters.
listHumanLoopsRequest - default CompletableFuture<ListHumanLoopsResponse> listHumanLoops(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest)
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.default ListHumanLoopsPublisher listHumanLoopsPaginator(ListHumanLoopsRequest listHumanLoopsRequest)
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 publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsPublisher publisher = client.listHumanLoopsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsPublisher publisher = client.listHumanLoopsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
listHumanLoops(software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsRequest)
operation.
listHumanLoopsRequest - default ListHumanLoopsPublisher listHumanLoopsPaginator(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest)
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 publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsPublisher publisher = client.listHumanLoopsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.sagemakera2iruntime.paginators.ListHumanLoopsPublisher publisher = client.listHumanLoopsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.sagemakera2iruntime.model.ListHumanLoopsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
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.default CompletableFuture<StartHumanLoopResponse> startHumanLoop(StartHumanLoopRequest startHumanLoopRequest)
Starts a human loop, provided that at least one activation condition is met.
startHumanLoopRequest - default CompletableFuture<StartHumanLoopResponse> startHumanLoop(Consumer<StartHumanLoopRequest.Builder> startHumanLoopRequest)
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.default CompletableFuture<StopHumanLoopResponse> stopHumanLoop(StopHumanLoopRequest stopHumanLoopRequest)
Stops the specified human loop.
stopHumanLoopRequest - default CompletableFuture<StopHumanLoopResponse> stopHumanLoop(Consumer<StopHumanLoopRequest.Builder> stopHumanLoopRequest)
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.Copyright © 2020. All rights reserved.