public class AmazonSageMakerRuntimeAsyncClient extends AmazonSageMakerRuntimeClient implements AmazonSageMakerRuntimeAsync
The Amazon SageMaker runtime API.
LOGGING_AWS_REQUEST_METRIC
Constructor and Description |
---|
AmazonSageMakerRuntimeAsyncClient()
Deprecated.
|
AmazonSageMakerRuntimeAsyncClient(AWSCredentials awsCredentials)
Constructs a new asynchronous client to invoke service methods on Amazon
SageMaker Runtime Service using the specified AWS account credentials.
|
AmazonSageMakerRuntimeAsyncClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration,
java.util.concurrent.ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon
SageMaker Runtime Service using the specified AWS account credentials,
executor service, and client configuration options.
|
AmazonSageMakerRuntimeAsyncClient(AWSCredentials awsCredentials,
java.util.concurrent.ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon
SageMaker Runtime Service using the specified AWS account credentials and
executor service.
|
AmazonSageMakerRuntimeAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new asynchronous client to invoke service methods on Amazon
SageMaker Runtime Service using the specified AWS account credentials
provider.
|
AmazonSageMakerRuntimeAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on Amazon
SageMaker Runtime Service using the specified AWS account credentials
provider and client configuration options.
|
AmazonSageMakerRuntimeAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
java.util.concurrent.ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon
SageMaker Runtime Service using the specified AWS account credentials
provider, executor service, and client configuration options.
|
AmazonSageMakerRuntimeAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
java.util.concurrent.ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon
SageMaker Runtime Service using the specified AWS account credentials
provider and executor service.
|
AmazonSageMakerRuntimeAsyncClient(ClientConfiguration clientConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.util.concurrent.ExecutorService |
getExecutorService()
Returns the executor service used by this async client to execute
requests.
|
java.util.concurrent.Future<InvokeEndpointResult> |
invokeEndpointAsync(InvokeEndpointRequest invokeEndpointRequest)
After you deploy a model into production using Amazon SageMaker hosting
services, your client applications use this API to get inferences from
the model hosted at the specified endpoint.
|
java.util.concurrent.Future<InvokeEndpointResult> |
invokeEndpointAsync(InvokeEndpointRequest invokeEndpointRequest,
AsyncHandler<InvokeEndpointRequest,InvokeEndpointResult> asyncHandler)
After you deploy a model into production using Amazon SageMaker hosting
services, your client applications use this API to get inferences from
the model hosted at the specified endpoint.
|
void |
shutdown()
Shuts down the client, releasing all managed resources.
|
getCachedResponseMetadata, invokeEndpoint
addRequestHandler, addRequestHandler, getEndpoint, getEndpointPrefix, getRegions, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerRegionOverride, getTimeOffset, removeRequestHandler, removeRequestHandler, setConfiguration, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCachedResponseMetadata, invokeEndpoint, setEndpoint, setRegion
@Deprecated public AmazonSageMakerRuntimeAsyncClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
@Deprecated public AmazonSageMakerRuntimeAsyncClient(ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
clientConfiguration
- The client configuration options controlling
how this client connects to Amazon SageMaker Runtime Service
(ex: proxy settings, retry counts, etc.).DefaultAWSCredentialsProviderChain
public AmazonSageMakerRuntimeAsyncClient(AWSCredentials awsCredentials)
All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.
awsCredentials
- The AWS credentials (access key ID and secret key)
to use when authenticating with AWS services.public AmazonSageMakerRuntimeAsyncClient(AWSCredentials awsCredentials, java.util.concurrent.ExecutorService executorService)
All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.
awsCredentials
- The AWS credentials (access key ID and secret key)
to use when authenticating with AWS services.executorService
- The executor service by which all asynchronous
requests will be executed.public AmazonSageMakerRuntimeAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, java.util.concurrent.ExecutorService executorService)
All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.
awsCredentials
- The AWS credentials (access key ID and secret key)
to use when authenticating with AWS services.clientConfiguration
- Client configuration options (ex: max retry
limit, proxy settings, etc).executorService
- The executor service by which all asynchronous
requests will be executed.public AmazonSageMakerRuntimeAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.
awsCredentialsProvider
- The AWS credentials provider which will
provide credentials to authenticate requests with AWS
services.public AmazonSageMakerRuntimeAsyncClient(AWSCredentialsProvider awsCredentialsProvider, java.util.concurrent.ExecutorService executorService)
All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.
awsCredentialsProvider
- The AWS credentials provider which will
provide credentials to authenticate requests with AWS
services.executorService
- The executor service by which all asynchronous
requests will be executed.public AmazonSageMakerRuntimeAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.
awsCredentialsProvider
- The AWS credentials provider which will
provide credentials to authenticate requests with AWS
services.clientConfiguration
- Client configuration options (ex: max retry
limit, proxy settings, etc).public AmazonSageMakerRuntimeAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, java.util.concurrent.ExecutorService executorService)
All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.
awsCredentialsProvider
- The AWS credentials provider which will
provide credentials to authenticate requests with AWS
services.clientConfiguration
- Client configuration options (ex: max retry
limit, proxy settings, etc).executorService
- The executor service by which all asynchronous
requests will be executed.public java.util.concurrent.ExecutorService getExecutorService()
public void shutdown()
shutdown
in interface AmazonSageMakerRuntime
shutdown
in class AmazonWebServiceClient
public java.util.concurrent.Future<InvokeEndpointResult> invokeEndpointAsync(InvokeEndpointRequest invokeEndpointRequest) throws AmazonServiceException, AmazonClientException
After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint.
For an overview of Amazon SageMaker, see How It Works.
Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax.
Cals to InvokeEndpoint
are authenticated by using AWS
Signature Version 4. For information, see Authenticating Requests (AWS Signature Version 4) in the Amazon
S3 API Reference.
Endpoints are scoped to an individual account, and are not public. The URL does not contain the account ID, but Amazon SageMaker determines the account ID from the authentication token that is supplied by the caller.
invokeEndpointAsync
in interface AmazonSageMakerRuntimeAsync
invokeEndpointRequest
- InternalFailureException
ServiceUnavailableException
ValidationErrorException
ModelErrorException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
SageMaker Runtime Service indicating either a problem with
the data in the request, or a server side issue.public java.util.concurrent.Future<InvokeEndpointResult> invokeEndpointAsync(InvokeEndpointRequest invokeEndpointRequest, AsyncHandler<InvokeEndpointRequest,InvokeEndpointResult> asyncHandler) throws AmazonServiceException, AmazonClientException
After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint.
For an overview of Amazon SageMaker, see How It Works.
Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax.
Cals to InvokeEndpoint
are authenticated by using AWS
Signature Version 4. For information, see Authenticating Requests (AWS Signature Version 4) in the Amazon
S3 API Reference.
Endpoints are scoped to an individual account, and are not public. The URL does not contain the account ID, but Amazon SageMaker determines the account ID from the authentication token that is supplied by the caller.
invokeEndpointAsync
in interface AmazonSageMakerRuntimeAsync
invokeEndpointRequest
- asyncHandler
- Asynchronous callback handler for events in the
life-cycle of the request. Users could provide the
implementation of the four callback methods in this interface
to process the operation result or handle the exception.InternalFailureException
ServiceUnavailableException
ValidationErrorException
ModelErrorException
AmazonClientException
- If any internal errors are encountered
inside the client while attempting to make the request or
handle the response. For example if a network connection is
not available.AmazonServiceException
- If an error response is returned by Amazon
SageMaker Runtime Service indicating either a problem with
the data in the request, or a server side issue.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.