@Generated(value="software.amazon.awssdk:codegen") public interface SageMakerA2IRuntimeClient 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 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.
|
serviceName
close
static final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider
.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
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
default 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
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
default DescribeHumanLoopResponse describeHumanLoop(DescribeHumanLoopRequest describeHumanLoopRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Returns information about the specified human loop.
describeHumanLoopRequest
- ValidationException
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
default 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
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
default ListHumanLoopsResponse listHumanLoops(ListHumanLoopsRequest listHumanLoopsRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Returns information about human loops, given the specified parameters. If a human loop was deleted, it will not be included.
listHumanLoopsRequest
- ValidationException
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
default ListHumanLoopsResponse listHumanLoops(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
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.ValidationException
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
default ListHumanLoopsIterable listHumanLoopsPaginator(ListHumanLoopsRequest listHumanLoopsRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
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 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(....);
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
- ValidationException
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
default ListHumanLoopsIterable listHumanLoopsPaginator(Consumer<ListHumanLoopsRequest.Builder> listHumanLoopsRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
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 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(....);
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.ValidationException
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
default StartHumanLoopResponse startHumanLoop(StartHumanLoopRequest startHumanLoopRequest) throws ValidationException, ThrottlingException, ServiceQuotaExceededException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Starts a human loop, provided that at least one activation condition is met.
startHumanLoopRequest
- 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. Delete some resources or request an increase in your service quota.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.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.AwsServiceException
default StartHumanLoopResponse startHumanLoop(Consumer<StartHumanLoopRequest.Builder> startHumanLoopRequest) throws ValidationException, ThrottlingException, ServiceQuotaExceededException, InternalServerException, ConflictException, 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
- 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. Delete some resources or request an increase in your service quota.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.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.AwsServiceException
default StopHumanLoopResponse stopHumanLoop(StopHumanLoopRequest stopHumanLoopRequest) throws ValidationException, ResourceNotFoundException, ThrottlingException, InternalServerException, AwsServiceException, SdkClientException, SageMakerA2IRuntimeException
Stops the specified human loop.
stopHumanLoopRequest
- ValidationException
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
default 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
- The request isn't valid. Check the syntax and try again.ResourceNotFoundException
- We couldn't find the requested resource.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.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.AwsServiceException
static ServiceMetadata serviceMetadata()