Class: Aws::SageMakerRuntime::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::SageMakerRuntime::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-sagemakerruntime/lib/aws-sdk-sagemakerruntime/client.rb
Overview
An API client for SageMakerRuntime. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::SageMakerRuntime::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#invoke_endpoint(params = {}) ⇒ Types::InvokeEndpointOutput
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.
-
#invoke_endpoint_async(params = {}) ⇒ Types::InvokeEndpointAsyncOutput
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 in an asynchronous manner.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
370 371 372 |
# File 'gems/aws-sdk-sagemakerruntime/lib/aws-sdk-sagemakerruntime/client.rb', line 370 def initialize(*args) super end |
Instance Method Details
#invoke_endpoint(params = {}) ⇒ Types::InvokeEndpointOutput
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.
Calls to InvokeEndpoint
are authenticated by using Amazon Web
Services Signature Version 4. For information, see Authenticating
Requests (Amazon Web Services Signature Version 4) in the Amazon
S3 API Reference.
A customer's model containers must respond to requests within 60 seconds. The model itself can have a maximum processing time of 60 seconds before responding to invocations. If your model is going to take 50-60 seconds of processing time, the SDK socket timeout should be set to be 70 seconds.
533 534 535 536 |
# File 'gems/aws-sdk-sagemakerruntime/lib/aws-sdk-sagemakerruntime/client.rb', line 533 def invoke_endpoint(params = {}, = {}) req = build_request(:invoke_endpoint, params) req.send_request() end |
#invoke_endpoint_async(params = {}) ⇒ Types::InvokeEndpointAsyncOutput
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 in an asynchronous manner.
Inference requests sent to this API are enqueued for asynchronous processing. The processing of the inference request may or may not complete before you receive a response from this API. The response from this API will not contain the result of the inference request but contain information about where you can locate it.
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.
Calls to InvokeEndpointAsync
are authenticated by using Amazon Web
Services Signature Version 4. For information, see Authenticating
Requests (Amazon Web Services Signature Version 4) in the Amazon
S3 API Reference.
644 645 646 647 |
# File 'gems/aws-sdk-sagemakerruntime/lib/aws-sdk-sagemakerruntime/client.rb', line 644 def invoke_endpoint_async(params = {}, = {}) req = build_request(:invoke_endpoint_async, params) req.send_request() end |