You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::SageMakerRuntime::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-sagemakerruntime/lib/aws-sdk-sagemakerruntime/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#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(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



153
154
155
# File 'gems/aws-sdk-sagemakerruntime/lib/aws-sdk-sagemakerruntime/client.rb', line 153

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.

Examples:

Request syntax with placeholder values


resp = client.invoke_endpoint({
  endpoint_name: "EndpointName", # required
  body: "data", # required
  content_type: "Header",
  accept: "Header",
})

Response structure


resp.body #=> String
resp.content_type #=> String
resp.invoked_production_variant #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :endpoint_name (required, String)

    The name of the endpoint that you specified when you created the endpoint using the CreateEndpoint API.

  • :body (required, String, IO)

    Provides input data, in the format specified in the ContentType request header. Amazon SageMaker passes all of the data in the body to the model.

  • :content_type (String)

    The MIME type of the input data in the request body.

  • :accept (String)

    The desired MIME type of the inference in the response.

Returns:

See Also:



218
219
220
221
# File 'gems/aws-sdk-sagemakerruntime/lib/aws-sdk-sagemakerruntime/client.rb', line 218

def invoke_endpoint(params = {}, options = {})
  req = build_request(:invoke_endpoint, params)
  req.send_request(options)
end