amazonka-sagemaker-runtime-1.6.0: Amazon SageMaker Runtime SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.SageMakerRuntime.InvokeEndpoint

Contents

Description

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.

Synopsis

Creating a Request

invokeEndpoint Source #

Creates a value of InvokeEndpoint with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • ieAccept - The desired MIME type of the inference in the response.
  • ieContentType - The MIME type of the input data in the request body.
  • ieEndpointName - The name of the endpoint that you specified when you created the endpoint using the CreateEndpoint API.
  • ieBody - 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.

data InvokeEndpoint Source #

See: invokeEndpoint smart constructor.

Instances

Eq InvokeEndpoint Source # 
Data InvokeEndpoint Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InvokeEndpoint -> c InvokeEndpoint #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InvokeEndpoint #

toConstr :: InvokeEndpoint -> Constr #

dataTypeOf :: InvokeEndpoint -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c InvokeEndpoint) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InvokeEndpoint) #

gmapT :: (forall b. Data b => b -> b) -> InvokeEndpoint -> InvokeEndpoint #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InvokeEndpoint -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InvokeEndpoint -> r #

gmapQ :: (forall d. Data d => d -> u) -> InvokeEndpoint -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> InvokeEndpoint -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InvokeEndpoint -> m InvokeEndpoint #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InvokeEndpoint -> m InvokeEndpoint #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InvokeEndpoint -> m InvokeEndpoint #

Read InvokeEndpoint Source # 
Show InvokeEndpoint Source # 
Generic InvokeEndpoint Source # 

Associated Types

type Rep InvokeEndpoint :: * -> * #

Hashable InvokeEndpoint Source # 
NFData InvokeEndpoint Source # 

Methods

rnf :: InvokeEndpoint -> () #

AWSRequest InvokeEndpoint Source # 
ToBody InvokeEndpoint Source # 
ToHeaders InvokeEndpoint Source # 
ToPath InvokeEndpoint Source # 
ToQuery InvokeEndpoint Source # 
type Rep InvokeEndpoint Source # 
type Rep InvokeEndpoint = D1 * (MetaData "InvokeEndpoint" "Network.AWS.SageMakerRuntime.InvokeEndpoint" "amazonka-sagemaker-runtime-1.6.0-7TCucxy2RauBXhfkmSNsvw" False) (C1 * (MetaCons "InvokeEndpoint'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_ieAccept") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_ieContentType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_ieEndpointName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_ieBody") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * ByteString)))))
type Rs InvokeEndpoint Source # 

Request Lenses

ieAccept :: Lens' InvokeEndpoint (Maybe Text) Source #

The desired MIME type of the inference in the response.

ieContentType :: Lens' InvokeEndpoint (Maybe Text) Source #

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

ieEndpointName :: Lens' InvokeEndpoint Text Source #

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

ieBody :: Lens' InvokeEndpoint ByteString Source #

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.

Destructuring the Response

invokeEndpointResponse Source #

Creates a value of InvokeEndpointResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data InvokeEndpointResponse Source #

See: invokeEndpointResponse smart constructor.

Instances

Eq InvokeEndpointResponse Source # 
Data InvokeEndpointResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InvokeEndpointResponse -> c InvokeEndpointResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InvokeEndpointResponse #

toConstr :: InvokeEndpointResponse -> Constr #

dataTypeOf :: InvokeEndpointResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c InvokeEndpointResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InvokeEndpointResponse) #

gmapT :: (forall b. Data b => b -> b) -> InvokeEndpointResponse -> InvokeEndpointResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InvokeEndpointResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InvokeEndpointResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> InvokeEndpointResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> InvokeEndpointResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InvokeEndpointResponse -> m InvokeEndpointResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InvokeEndpointResponse -> m InvokeEndpointResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InvokeEndpointResponse -> m InvokeEndpointResponse #

Read InvokeEndpointResponse Source # 
Show InvokeEndpointResponse Source # 
Generic InvokeEndpointResponse Source # 
NFData InvokeEndpointResponse Source # 

Methods

rnf :: InvokeEndpointResponse -> () #

type Rep InvokeEndpointResponse Source # 
type Rep InvokeEndpointResponse = D1 * (MetaData "InvokeEndpointResponse" "Network.AWS.SageMakerRuntime.InvokeEndpoint" "amazonka-sagemaker-runtime-1.6.0-7TCucxy2RauBXhfkmSNsvw" False) (C1 * (MetaCons "InvokeEndpointResponse'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_iersInvokedProductionVariant") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_iersContentType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_iersResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "_iersBody") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * ByteString)))))

Response Lenses

iersInvokedProductionVariant :: Lens' InvokeEndpointResponse (Maybe Text) Source #

Identifies the production variant that was invoked.

iersContentType :: Lens' InvokeEndpointResponse (Maybe Text) Source #

The MIME type of the inference returned in the response body.

iersResponseStatus :: Lens' InvokeEndpointResponse Int Source #

  • - | The response status code.

iersBody :: Lens' InvokeEndpointResponse ByteString Source #

Includes the inference provided by the model.