Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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
- invokeEndpoint :: Text -> ByteString -> InvokeEndpoint
- data InvokeEndpoint
- ieAccept :: Lens' InvokeEndpoint (Maybe Text)
- ieContentType :: Lens' InvokeEndpoint (Maybe Text)
- ieEndpointName :: Lens' InvokeEndpoint Text
- ieBody :: Lens' InvokeEndpoint ByteString
- invokeEndpointResponse :: Int -> ByteString -> InvokeEndpointResponse
- data InvokeEndpointResponse
- iersInvokedProductionVariant :: Lens' InvokeEndpointResponse (Maybe Text)
- iersContentType :: Lens' InvokeEndpointResponse (Maybe Text)
- iersResponseStatus :: Lens' InvokeEndpointResponse Int
- iersBody :: Lens' InvokeEndpointResponse ByteString
Creating a Request
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 theContentType
request header. Amazon SageMaker passes all of the data in the body to the model.
data InvokeEndpoint Source #
See: invokeEndpoint
smart constructor.
Instances
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:
iersInvokedProductionVariant
- Identifies the production variant that was invoked.iersContentType
- The MIME type of the inference returned in the response body.iersResponseStatus
- -- | The response status code.iersBody
- Includes the inference provided by the model.
data InvokeEndpointResponse Source #
See: invokeEndpointResponse
smart constructor.
Instances
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.