@Generated(value="software.amazon.awssdk:codegen") public interface SageMakerA2IRuntimeAsyncClient extends SdkClient
builder()
method.
Amazon Augmented AI is in preview release and is subject to change. We do not recommend using this product in production environments.
Amazon Augmented AI (Amazon A2I) adds the benefit of human judgment to any machine learning application. When an AI application can't evaluate data with a high degree of confidence, human reviewers can take over. This human review is called a human review workflow. To create and start a human review workflow, you need three resources: a worker task template, a flow definition, and a human loop.
For information about these resources and prerequisites for using Amazon A2I, see Get Started with Amazon Augmented AI in the Amazon SageMaker Developer Guide.
This API reference includes information about API actions and data types that you can use to interact with Amazon A2I programmatically. Use this guide to:
Start a human loop with the StartHumanLoop
operation when using Amazon A2I with a custom task
type. To learn more about the difference between custom and built-in task types, see Use Task Types . To learn how
to start a human loop using this API, see Create and Start a Human Loop for a Custom Task Type in the Amazon SageMaker Developer Guide.
Manage your human loops. You can list all human loops that you have created, describe individual human loops, and stop and delete human loops. To learn more, see Monitor and Manage Your Human Loop in the Amazon SageMaker Developer Guide.
Amazon A2I integrates APIs from various AWS services to create and start human review workflows for those services. To learn how Amazon A2I uses these APIs, see Use APIs in Amazon A2I in the Amazon SageMaker Developer Guide.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider . |
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.
|
serviceName
close
static final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider
.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. If a human loop was deleted, it will not be included.
listHumanLoopsRequest
- default CompletableFuture<ListHumanLoopsResponse> listHumanLoops(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest)
Returns information about human loops, given the specified parameters. If a human loop was deleted, it will not be included.
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. If a human loop was deleted, it will not be included.
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.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
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. If a human loop was deleted, it will not be included.
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.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
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.