public class AmazonSageMakerRuntimeClient extends AmazonWebServiceClient implements AmazonSageMakerRuntime
The Amazon SageMaker runtime API.
LOGGING_AWS_REQUEST_METRIC
Constructor and Description |
---|
AmazonSageMakerRuntimeClient()
Deprecated.
|
AmazonSageMakerRuntimeClient(AWSCredentials awsCredentials)
Constructs a new client to invoke service methods on
AmazonSageMakerRuntime using the specified AWS account credentials.
|
AmazonSageMakerRuntimeClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on
AmazonSageMakerRuntime using the specified AWS account credentials and
client configuration options.
|
AmazonSageMakerRuntimeClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new client to invoke service methods on
AmazonSageMakerRuntime using the specified AWS account credentials
provider.
|
AmazonSageMakerRuntimeClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on
AmazonSageMakerRuntime using the specified AWS account credentials
provider and client configuration options.
|
AmazonSageMakerRuntimeClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
HttpClient httpClient)
Constructs a new client to invoke service methods on
AmazonSageMakerRuntime using the specified AWS account credentials
provider, client configuration options and request metric collector.
|
AmazonSageMakerRuntimeClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
com.amazonaws.metrics.RequestMetricCollector requestMetricCollector)
Deprecated.
|
AmazonSageMakerRuntimeClient(ClientConfiguration clientConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Deprecated.
ResponseMetadata cache can hold up to 50 requests and
responses in memory and will cause memory issue. This method
now always returns null.
|
InvokeEndpointResult |
invokeEndpoint(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.
|
addRequestHandler, addRequestHandler, getEndpoint, getEndpointPrefix, getRegions, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerRegionOverride, getTimeOffset, removeRequestHandler, removeRequestHandler, setConfiguration, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setEndpoint, setRegion, shutdown
@Deprecated public AmazonSageMakerRuntimeClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
@Deprecated public AmazonSageMakerRuntimeClient(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 AmazonSageMakerRuntime (ex: proxy
settings, retry counts, etc.).DefaultAWSCredentialsProviderChain
public AmazonSageMakerRuntimeClient(AWSCredentials awsCredentials)
The client requests are authenticated using the AWSCredentials
provided in this constructor. Static AWSCredentials can be passed for
quick testing. However, it is strongly recommended to use Amazon Cognito
vended temporary credentials for use in production. This can be achieved
by using AWSMobileClient
. Please see
https://aws-amplify.github.io/docs/android/authentication for
instructions on how to enable AWSMobileClient
.
{@code AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback() {
awsCredentials
- The AWS credentials (access key ID and secret key)
to use when authenticating with AWS services.public AmazonSageMakerRuntimeClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
The client requests are authenticated using the AWSCredentials
provided in this constructor. Static AWSCredentials can be passed for
quick testing. However, it is strongly recommended to use Amazon Cognito
vended temporary credentials for use in production. This can be achieved
by using AWSMobileClient
. Please see
https://aws-amplify.github.io/docs/android/authentication for
instructions on how to enable AWSMobileClient
.
{@code AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback() {
awsCredentials
- The AWS credentials (access key ID and secret key)
to use when authenticating with AWS services.clientConfiguration
- The client configuration options controlling
how this client connects to AmazonSageMakerRuntime (ex: proxy
settings, retry counts, etc.).public AmazonSageMakerRuntimeClient(AWSCredentialsProvider awsCredentialsProvider)
The client requests are authenticated using the AWSCredentials
provided by the AWSCredentialsProvider
. Static AWSCredentials can
be passed for quick testing. However, it is strongly recommended to use
Amazon Cognito vended temporary credentials for use in production. This
can be achieved by using AWSMobileClient
. Please see
https://aws-amplify.github.io/docs/android/authentication for
instructions on how to enable AWSMobileClient
.
{@code AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback() {
awsCredentialsProvider
- The AWS credentials provider which will
provide credentials to authenticate requests with AWS
services.public AmazonSageMakerRuntimeClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
The client requests are authenticated using the AWSCredentials
provided by the AWSCredentialsProvider
. Static AWSCredentials can
be passed for quick testing. However, it is strongly recommended to use
Amazon Cognito vended temporary credentials for use in production. This
can be achieved by using AWSMobileClient
. Please see
https://aws-amplify.github.io/docs/android/authentication for
instructions on how to enable AWSMobileClient
.
{@code AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback() {
awsCredentialsProvider
- The AWS credentials provider which will
provide credentials to authenticate requests with AWS
services.clientConfiguration
- The client configuration options controlling
how this client connects to AmazonSageMakerRuntime (ex: proxy
settings, retry counts, etc.).@Deprecated public AmazonSageMakerRuntimeClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, com.amazonaws.metrics.RequestMetricCollector requestMetricCollector)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will
provide credentials to authenticate requests with AWS
services.clientConfiguration
- The client configuration options controlling
how this client connects to AmazonSageMakerRuntime (ex: proxy
settings, retry counts, etc.).requestMetricCollector
- optional request metric collectorpublic AmazonSageMakerRuntimeClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, HttpClient httpClient)
The client requests are authenticated using the AWSCredentials
provided by the AWSCredentialsProvider
. Static AWSCredentials can
be passed for quick testing. However, it is strongly recommended to use
Amazon Cognito vended temporary credentials for use in production. This
can be achieved by using AWSMobileClient
. Please see
https://aws-amplify.github.io/docs/android/authentication for
instructions on how to enable AWSMobileClient
.
{@code AWSMobileClient.getInstance.initialize(getApplicationContext(), new Callback() {
awsCredentialsProvider
- The AWS credentials provider which will
provide credentials to authenticate requests with AWS
services.clientConfiguration
- The client configuration options controlling
how this client connects to AmazonSageMakerRuntime (ex: proxy
settings, retry counts, etc.).httpClient
- A http clientpublic InvokeEndpointResult invokeEndpoint(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.
invokeEndpoint
in interface AmazonSageMakerRuntime
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.@Deprecated public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.
getCachedResponseMetadata
in interface AmazonSageMakerRuntime
request
- The originally executed requestCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.