packages feed

amazonka-sagemaker-runtime 1.6.1 → 2.0

raw patch · 24 files changed

+1427/−606 lines, 24 filesdep +case-insensitivedep ~amazonka-coredep ~amazonka-testdep ~basesetup-changedPVP ok

version bump matches the API change (PVP)

Dependencies added: case-insensitive

Dependency ranges changed: amazonka-core, amazonka-test, base

API changes (from Hackage documentation)

- Network.AWS.SageMakerRuntime: _InternalFailure :: AsError a => Getting (First ServiceError) a ServiceError
- Network.AWS.SageMakerRuntime: _ModelError :: AsError a => Getting (First ServiceError) a ServiceError
- Network.AWS.SageMakerRuntime: _ServiceUnavailable :: AsError a => Getting (First ServiceError) a ServiceError
- Network.AWS.SageMakerRuntime: _ValidationError :: AsError a => Getting (First ServiceError) a ServiceError
- Network.AWS.SageMakerRuntime: sageMakerRuntime :: Service
- Network.AWS.SageMakerRuntime.InvokeEndpoint: data InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: data InvokeEndpointResponse
- Network.AWS.SageMakerRuntime.InvokeEndpoint: ieAccept :: Lens' InvokeEndpoint (Maybe Text)
- Network.AWS.SageMakerRuntime.InvokeEndpoint: ieBody :: Lens' InvokeEndpoint ByteString
- Network.AWS.SageMakerRuntime.InvokeEndpoint: ieContentType :: Lens' InvokeEndpoint (Maybe Text)
- Network.AWS.SageMakerRuntime.InvokeEndpoint: ieEndpointName :: Lens' InvokeEndpoint Text
- Network.AWS.SageMakerRuntime.InvokeEndpoint: iersBody :: Lens' InvokeEndpointResponse ByteString
- Network.AWS.SageMakerRuntime.InvokeEndpoint: iersContentType :: Lens' InvokeEndpointResponse (Maybe Text)
- Network.AWS.SageMakerRuntime.InvokeEndpoint: iersInvokedProductionVariant :: Lens' InvokeEndpointResponse (Maybe Text)
- Network.AWS.SageMakerRuntime.InvokeEndpoint: iersResponseStatus :: Lens' InvokeEndpointResponse Int
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Control.DeepSeq.NFData Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Control.DeepSeq.NFData Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Data.Data.Data Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Data.Data.Data Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Data.Hashable.Class.Hashable Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance GHC.Classes.Eq Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance GHC.Classes.Eq Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance GHC.Generics.Generic Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance GHC.Generics.Generic Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance GHC.Read.Read Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance GHC.Read.Read Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance GHC.Show.Show Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance GHC.Show.Show Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Network.AWS.Data.Body.ToBody Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Network.AWS.Data.Headers.ToHeaders Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Network.AWS.Data.Path.ToPath Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Network.AWS.Data.Query.ToQuery Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: instance Network.AWS.Types.AWSRequest Network.AWS.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: invokeEndpoint :: Text -> ByteString -> InvokeEndpoint
- Network.AWS.SageMakerRuntime.InvokeEndpoint: invokeEndpointResponse :: Int -> ByteString -> InvokeEndpointResponse
- Network.AWS.SageMakerRuntime.Types: _InternalFailure :: AsError a => Getting (First ServiceError) a ServiceError
- Network.AWS.SageMakerRuntime.Types: _ModelError :: AsError a => Getting (First ServiceError) a ServiceError
- Network.AWS.SageMakerRuntime.Types: _ServiceUnavailable :: AsError a => Getting (First ServiceError) a ServiceError
- Network.AWS.SageMakerRuntime.Types: _ValidationError :: AsError a => Getting (First ServiceError) a ServiceError
- Network.AWS.SageMakerRuntime.Types: sageMakerRuntime :: Service
+ Amazonka.SageMakerRuntime: InvokeEndpoint' :: Maybe Text -> Maybe Text -> Maybe (Sensitive Text) -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Text -> Text -> InvokeEndpoint
+ Amazonka.SageMakerRuntime: InvokeEndpointAsync' :: Maybe Text -> Maybe Text -> Maybe (Sensitive Text) -> Maybe Text -> Maybe Natural -> Text -> Text -> InvokeEndpointAsync
+ Amazonka.SageMakerRuntime: InvokeEndpointAsyncResponse' :: Maybe Text -> Maybe Text -> Int -> InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime: InvokeEndpointResponse' :: Maybe Text -> Maybe (Sensitive Text) -> Maybe Text -> Int -> Text -> InvokeEndpointResponse
+ Amazonka.SageMakerRuntime: _InternalDependencyException :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime: _InternalFailure :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime: _ModelError :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime: _ModelNotReadyException :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime: _ServiceUnavailable :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime: _ValidationError :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime: data InvokeEndpoint
+ Amazonka.SageMakerRuntime: data InvokeEndpointAsync
+ Amazonka.SageMakerRuntime: data InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime: data InvokeEndpointResponse
+ Amazonka.SageMakerRuntime: defaultService :: Service
+ Amazonka.SageMakerRuntime: newInvokeEndpoint :: Text -> Text -> InvokeEndpoint
+ Amazonka.SageMakerRuntime: newInvokeEndpointAsync :: Text -> Text -> InvokeEndpointAsync
+ Amazonka.SageMakerRuntime: newInvokeEndpointAsyncResponse :: Int -> InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime: newInvokeEndpointResponse :: Int -> Text -> InvokeEndpointResponse
+ Amazonka.SageMakerRuntime.InvokeEndpoint: InvokeEndpoint' :: Maybe Text -> Maybe Text -> Maybe (Sensitive Text) -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Text -> Text -> InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: InvokeEndpointResponse' :: Maybe Text -> Maybe (Sensitive Text) -> Maybe Text -> Int -> Text -> InvokeEndpointResponse
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:accept:InvokeEndpoint'] :: InvokeEndpoint -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:body:InvokeEndpoint'] :: InvokeEndpoint -> Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:body:InvokeEndpointResponse'] :: InvokeEndpointResponse -> Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:contentType:InvokeEndpoint'] :: InvokeEndpoint -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:contentType:InvokeEndpointResponse'] :: InvokeEndpointResponse -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:customAttributes:InvokeEndpoint'] :: InvokeEndpoint -> Maybe (Sensitive Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:customAttributes:InvokeEndpointResponse'] :: InvokeEndpointResponse -> Maybe (Sensitive Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:enableExplanations:InvokeEndpoint'] :: InvokeEndpoint -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:endpointName:InvokeEndpoint'] :: InvokeEndpoint -> Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:httpStatus:InvokeEndpointResponse'] :: InvokeEndpointResponse -> Int
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:inferenceId:InvokeEndpoint'] :: InvokeEndpoint -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:invokedProductionVariant:InvokeEndpointResponse'] :: InvokeEndpointResponse -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:targetContainerHostname:InvokeEndpoint'] :: InvokeEndpoint -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:targetModel:InvokeEndpoint'] :: InvokeEndpoint -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: [$sel:targetVariant:InvokeEndpoint'] :: InvokeEndpoint -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: data InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: data InvokeEndpointResponse
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance Amazonka.Data.Headers.ToHeaders Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance Amazonka.Data.Path.ToPath Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance Amazonka.Data.Query.ToQuery Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance Amazonka.Types.AWSRequest Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance Control.DeepSeq.NFData Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance Control.DeepSeq.NFData Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance Data.Hashable.Class.Hashable Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance GHC.Classes.Eq Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance GHC.Classes.Eq Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance GHC.Generics.Generic Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance GHC.Generics.Generic Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance GHC.Show.Show Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: instance GHC.Show.Show Amazonka.SageMakerRuntime.InvokeEndpoint.InvokeEndpointResponse
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpointResponse_body :: Lens' InvokeEndpointResponse Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpointResponse_contentType :: Lens' InvokeEndpointResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpointResponse_customAttributes :: Lens' InvokeEndpointResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpointResponse_httpStatus :: Lens' InvokeEndpointResponse Int
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpointResponse_invokedProductionVariant :: Lens' InvokeEndpointResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_accept :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_body :: Lens' InvokeEndpoint Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_contentType :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_customAttributes :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_enableExplanations :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_endpointName :: Lens' InvokeEndpoint Text
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_inferenceId :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_targetContainerHostname :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_targetModel :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: invokeEndpoint_targetVariant :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpoint: newInvokeEndpoint :: Text -> Text -> InvokeEndpoint
+ Amazonka.SageMakerRuntime.InvokeEndpoint: newInvokeEndpointResponse :: Int -> Text -> InvokeEndpointResponse
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: InvokeEndpointAsync' :: Maybe Text -> Maybe Text -> Maybe (Sensitive Text) -> Maybe Text -> Maybe Natural -> Text -> Text -> InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: InvokeEndpointAsyncResponse' :: Maybe Text -> Maybe Text -> Int -> InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:accept:InvokeEndpointAsync'] :: InvokeEndpointAsync -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:contentType:InvokeEndpointAsync'] :: InvokeEndpointAsync -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:customAttributes:InvokeEndpointAsync'] :: InvokeEndpointAsync -> Maybe (Sensitive Text)
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:endpointName:InvokeEndpointAsync'] :: InvokeEndpointAsync -> Text
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:httpStatus:InvokeEndpointAsyncResponse'] :: InvokeEndpointAsyncResponse -> Int
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:inferenceId:InvokeEndpointAsync'] :: InvokeEndpointAsync -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:inferenceId:InvokeEndpointAsyncResponse'] :: InvokeEndpointAsyncResponse -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:inputLocation:InvokeEndpointAsync'] :: InvokeEndpointAsync -> Text
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:outputLocation:InvokeEndpointAsyncResponse'] :: InvokeEndpointAsyncResponse -> Maybe Text
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: [$sel:requestTTLSeconds:InvokeEndpointAsync'] :: InvokeEndpointAsync -> Maybe Natural
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: data InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: data InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance Amazonka.Data.Headers.ToHeaders Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance Amazonka.Data.Path.ToPath Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance Amazonka.Data.Query.ToQuery Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance Amazonka.Types.AWSRequest Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance Control.DeepSeq.NFData Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance Control.DeepSeq.NFData Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance Data.Aeson.Types.ToJSON.ToJSON Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance Data.Hashable.Class.Hashable Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance GHC.Classes.Eq Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance GHC.Classes.Eq Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance GHC.Generics.Generic Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance GHC.Generics.Generic Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance GHC.Read.Read Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance GHC.Show.Show Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: instance GHC.Show.Show Amazonka.SageMakerRuntime.InvokeEndpointAsync.InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsyncResponse_httpStatus :: Lens' InvokeEndpointAsyncResponse Int
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsyncResponse_inferenceId :: Lens' InvokeEndpointAsyncResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsyncResponse_outputLocation :: Lens' InvokeEndpointAsyncResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsync_accept :: Lens' InvokeEndpointAsync (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsync_contentType :: Lens' InvokeEndpointAsync (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsync_customAttributes :: Lens' InvokeEndpointAsync (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsync_endpointName :: Lens' InvokeEndpointAsync Text
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsync_inferenceId :: Lens' InvokeEndpointAsync (Maybe Text)
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsync_inputLocation :: Lens' InvokeEndpointAsync Text
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: invokeEndpointAsync_requestTTLSeconds :: Lens' InvokeEndpointAsync (Maybe Natural)
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: newInvokeEndpointAsync :: Text -> Text -> InvokeEndpointAsync
+ Amazonka.SageMakerRuntime.InvokeEndpointAsync: newInvokeEndpointAsyncResponse :: Int -> InvokeEndpointAsyncResponse
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsyncResponse_httpStatus :: Lens' InvokeEndpointAsyncResponse Int
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsyncResponse_inferenceId :: Lens' InvokeEndpointAsyncResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsyncResponse_outputLocation :: Lens' InvokeEndpointAsyncResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsync_accept :: Lens' InvokeEndpointAsync (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsync_contentType :: Lens' InvokeEndpointAsync (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsync_customAttributes :: Lens' InvokeEndpointAsync (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsync_endpointName :: Lens' InvokeEndpointAsync Text
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsync_inferenceId :: Lens' InvokeEndpointAsync (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsync_inputLocation :: Lens' InvokeEndpointAsync Text
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointAsync_requestTTLSeconds :: Lens' InvokeEndpointAsync (Maybe Natural)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointResponse_body :: Lens' InvokeEndpointResponse Text
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointResponse_contentType :: Lens' InvokeEndpointResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointResponse_customAttributes :: Lens' InvokeEndpointResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointResponse_httpStatus :: Lens' InvokeEndpointResponse Int
+ Amazonka.SageMakerRuntime.Lens: invokeEndpointResponse_invokedProductionVariant :: Lens' InvokeEndpointResponse (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_accept :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_body :: Lens' InvokeEndpoint Text
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_contentType :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_customAttributes :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_enableExplanations :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_endpointName :: Lens' InvokeEndpoint Text
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_inferenceId :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_targetContainerHostname :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_targetModel :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.Lens: invokeEndpoint_targetVariant :: Lens' InvokeEndpoint (Maybe Text)
+ Amazonka.SageMakerRuntime.Types: _InternalDependencyException :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime.Types: _InternalFailure :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime.Types: _ModelError :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime.Types: _ModelNotReadyException :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime.Types: _ServiceUnavailable :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime.Types: _ValidationError :: AsError a => Fold a ServiceError
+ Amazonka.SageMakerRuntime.Types: defaultService :: Service

Files

README.md view
@@ -7,9 +7,8 @@   ## Version--`1.6.1`-+ +`2.0` - Derived from API version @2017-05-13@ of the AWS service descriptions, licensed under Apache 2.0.  ## Description @@ -26,7 +25,7 @@ The provided lenses should be compatible with any of the major lens libraries [lens](http://hackage.haskell.org/package/lens) or [lens-family-core](http://hackage.haskell.org/package/lens-family-core). -See [Network.AWS.SageMakerRuntime](http://hackage.haskell.org/package/amazonka-sagemaker-runtime/docs/Network-AWS-SageMakerRuntime.html)+See [Amazonka.SageMakerRuntime](http://hackage.haskell.org/package/amazonka-sagemaker-runtime/docs/Amazonka-SageMakerRuntime.html) or [the AWS documentation](https://aws.amazon.com/documentation/) to get started.  
− Setup.hs
@@ -1,2 +0,0 @@-import           Distribution.Simple-main = defaultMain
amazonka-sagemaker-runtime.cabal view
@@ -1,86 +1,85 @@-name:                  amazonka-sagemaker-runtime-version:               1.6.1-synopsis:              Amazon SageMaker Runtime SDK.-homepage:              https://github.com/brendanhay/amazonka-bug-reports:           https://github.com/brendanhay/amazonka/issues-license:               MPL-2.0-license-file:          LICENSE-author:                Brendan Hay-maintainer:            Brendan Hay <brendan.g.hay+amazonka@gmail.com>-copyright:             Copyright (c) 2013-2018 Brendan Hay-category:              Network, AWS, Cloud, Distributed Computing-build-type:            Simple-cabal-version:         >= 1.10-extra-source-files:    README.md fixture/*.yaml fixture/*.proto src/.gitkeep+cabal-version:      2.2+name:               amazonka-sagemaker-runtime+version:            2.0+synopsis:           Amazon SageMaker Runtime SDK.+homepage:           https://github.com/brendanhay/amazonka+bug-reports:        https://github.com/brendanhay/amazonka/issues+license:            MPL-2.0+license-file:       LICENSE+author:             Brendan Hay+maintainer:+  Brendan Hay <brendan.g.hay+amazonka@gmail.com>, Jack Kelly <jack@jackkelly.name>++copyright:          Copyright (c) 2013-2023 Brendan Hay+category:           AWS+build-type:         Simple+extra-source-files:+  fixture/*.proto+  fixture/*.yaml+  README.md+  src/.gitkeep+ description:-    The types from this library are intended to be used with-    <http://hackage.haskell.org/package/amazonka amazonka>, which provides-    mechanisms for specifying AuthN/AuthZ information, sending requests,-    and receiving responses.-    .-    Lenses are used for constructing and manipulating types,-    due to the depth of nesting of AWS types and transparency regarding-    de/serialisation into more palatable Haskell values.-    The provided lenses should be compatible with any of the major lens libraries-    such as <http://hackage.haskell.org/package/lens lens> or-    <http://hackage.haskell.org/package/lens-family-core lens-family-core>.-    .-    See "Network.AWS.SageMakerRuntime" or <https://aws.amazon.com/documentation/ the AWS documentation>-    to get started.+  Derived from API version @2017-05-13@ of the AWS service descriptions, licensed under Apache 2.0.+  .+  The types from this library are intended to be used with <http://hackage.haskell.org/package/amazonka amazonka>,+  which provides mechanisms for specifying AuthN/AuthZ information, sending requests, and receiving responses.+  .+  It is recommended to use generic lenses or optics from packages such as <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify optional fields and deconstruct responses.+  .+  Generated lenses can be found in "Amazonka.SageMakerRuntime.Lens" and are+  suitable for use with a lens package such as <http://hackage.haskell.org/package/lens lens> or <http://hackage.haskell.org/package/lens-family-core lens-family-core>.+  .+  See "Amazonka.SageMakerRuntime" and the <https://aws.amazon.com/documentation/ AWS documentation> to get started.  source-repository head-    type:              git-    location:          git://github.com/brendanhay/amazonka.git-    subdir:            amazonka-sagemaker-runtime+  type:     git+  location: git://github.com/brendanhay/amazonka.git+  subdir:   amazonka-sagemaker-runtime  library-    default-language:  Haskell2010-    hs-source-dirs:    src gen--    ghc-options:-        -Wall-        -fwarn-incomplete-uni-patterns-        -fwarn-incomplete-record-updates-        -funbox-strict-fields--    exposed-modules:-          Network.AWS.SageMakerRuntime-        , Network.AWS.SageMakerRuntime.InvokeEndpoint-        , Network.AWS.SageMakerRuntime.Types-        , Network.AWS.SageMakerRuntime.Waiters+  default-language: Haskell2010+  hs-source-dirs:   src gen+  ghc-options:+    -Wall -fwarn-incomplete-uni-patterns+    -fwarn-incomplete-record-updates -funbox-strict-fields -    other-modules:-          Network.AWS.SageMakerRuntime.Types.Product-        , Network.AWS.SageMakerRuntime.Types.Sum+  exposed-modules:+    Amazonka.SageMakerRuntime+    Amazonka.SageMakerRuntime.InvokeEndpoint+    Amazonka.SageMakerRuntime.InvokeEndpointAsync+    Amazonka.SageMakerRuntime.Lens+    Amazonka.SageMakerRuntime.Types+    Amazonka.SageMakerRuntime.Waiters -    build-depends:-          amazonka-core == 1.6.1.*-        , base          >= 4.7     && < 5+  build-depends:+    , amazonka-core  >=2.0  && <2.1+    , base           >=4.12 && <5  test-suite amazonka-sagemaker-runtime-test-    type:              exitcode-stdio-1.0-    default-language:  Haskell2010-    hs-source-dirs:    test-    main-is:           Main.hs--    ghc-options:       -Wall -threaded+  type:             exitcode-stdio-1.0+  default-language: Haskell2010+  hs-source-dirs:   test+  main-is:          Main.hs+  ghc-options:      -Wall -threaded -    -- This section is encoded by the template and any modules added by-    -- hand outside these namespaces will not correctly be added to the-    -- distribution package.-    other-modules:-          Test.AWS.SageMakerRuntime-        , Test.AWS.Gen.SageMakerRuntime-        , Test.AWS.SageMakerRuntime.Internal+  -- This section is encoded by the template and any modules added by+  -- hand outside these namespaces will not correctly be added to the+  -- distribution package.+  other-modules:+    Test.Amazonka.Gen.SageMakerRuntime+    Test.Amazonka.SageMakerRuntime+    Test.Amazonka.SageMakerRuntime.Internal -    build-depends:-          amazonka-core == 1.6.1.*-        , amazonka-test == 1.6.1.*-        , amazonka-sagemaker-runtime-        , base-        , bytestring-        , tasty-        , tasty-hunit-        , text-        , time-        , unordered-containers+  build-depends:+    , amazonka-core               >=2.0 && <2.1+    , amazonka-sagemaker-runtime+    , amazonka-test               >=2.0 && <2.1+    , base+    , bytestring+    , case-insensitive+    , tasty+    , tasty-hunit+    , text+    , time+    , unordered-containers
+ fixture/InvokeEndpointAsync.yaml view
@@ -0,0 +1,10 @@+---+method: POST+headers:+  Authorization:         AWS4-HMAC-SHA256 Credential=access/20091028/us-east-1/runtime.sagemaker/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=?+  Host:                  runtime.sagemaker.us-east-1.amazonaws.com+  Content-Type:          application/x-www-form-urlencoded; charset=utf-8+  X-Amz-Content-SHA256:  abcdef+  X-Amz-Date:            20091028T223200Z+body:+  ''
+ fixture/InvokeEndpointAsyncResponse.proto view
+ gen/Amazonka/SageMakerRuntime.hs view
@@ -0,0 +1,93 @@+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- |+-- Module      : Amazonka.SageMakerRuntime+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Derived from API version @2017-05-13@ of the AWS service descriptions, licensed under Apache 2.0.+--+-- The Amazon SageMaker runtime API.+module Amazonka.SageMakerRuntime+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    -- $errors++    -- ** InternalDependencyException+    _InternalDependencyException,++    -- ** InternalFailure+    _InternalFailure,++    -- ** ModelError+    _ModelError,++    -- ** ModelNotReadyException+    _ModelNotReadyException,++    -- ** ServiceUnavailable+    _ServiceUnavailable,++    -- ** ValidationError+    _ValidationError,++    -- * Waiters+    -- $waiters++    -- * Operations+    -- $operations++    -- ** InvokeEndpoint+    InvokeEndpoint (InvokeEndpoint'),+    newInvokeEndpoint,+    InvokeEndpointResponse (InvokeEndpointResponse'),+    newInvokeEndpointResponse,++    -- ** InvokeEndpointAsync+    InvokeEndpointAsync (InvokeEndpointAsync'),+    newInvokeEndpointAsync,+    InvokeEndpointAsyncResponse (InvokeEndpointAsyncResponse'),+    newInvokeEndpointAsyncResponse,++    -- * Types+  )+where++import Amazonka.SageMakerRuntime.InvokeEndpoint+import Amazonka.SageMakerRuntime.InvokeEndpointAsync+import Amazonka.SageMakerRuntime.Lens+import Amazonka.SageMakerRuntime.Types+import Amazonka.SageMakerRuntime.Waiters++-- $errors+-- Error matchers are designed for use with the functions provided by+-- <http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.+-- This allows catching (and rethrowing) service specific errors returned+-- by 'SageMakerRuntime'.++-- $operations+-- Some AWS operations return results that are incomplete and require subsequent+-- requests in order to obtain the entire result set. The process of sending+-- subsequent requests to continue where a previous request left off is called+-- pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to+-- 1000 objects at a time, and you must send subsequent requests with the+-- appropriate Marker in order to retrieve the next page of results.+--+-- Operations that have an 'AWSPager' instance can transparently perform subsequent+-- requests, correctly setting Markers and other request facets to iterate through+-- the entire result set of a truncated API operation. Operations which support+-- this have an additional note in the documentation.+--+-- Many operations have the ability to filter results on the server side. See the+-- individual operation parameters for details.++-- $waiters+-- Waiters poll by repeatedly sending a request until some remote success condition+-- configured by the 'Wait' specification is fulfilled. The 'Wait' specification+-- determines how many attempts should be made, in addition to delay and retry strategies.
+ gen/Amazonka/SageMakerRuntime/InvokeEndpoint.hs view
@@ -0,0 +1,552 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SageMakerRuntime.InvokeEndpoint+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- 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+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html 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+-- <https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html 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.+--+-- 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.+module Amazonka.SageMakerRuntime.InvokeEndpoint+  ( -- * Creating a Request+    InvokeEndpoint (..),+    newInvokeEndpoint,++    -- * Request Lenses+    invokeEndpoint_accept,+    invokeEndpoint_contentType,+    invokeEndpoint_customAttributes,+    invokeEndpoint_enableExplanations,+    invokeEndpoint_inferenceId,+    invokeEndpoint_targetContainerHostname,+    invokeEndpoint_targetModel,+    invokeEndpoint_targetVariant,+    invokeEndpoint_endpointName,+    invokeEndpoint_body,++    -- * Destructuring the Response+    InvokeEndpointResponse (..),+    newInvokeEndpointResponse,++    -- * Response Lenses+    invokeEndpointResponse_contentType,+    invokeEndpointResponse_customAttributes,+    invokeEndpointResponse_invokedProductionVariant,+    invokeEndpointResponse_httpStatus,+    invokeEndpointResponse_body,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SageMakerRuntime.Types++-- | /See:/ 'newInvokeEndpoint' smart constructor.+data InvokeEndpoint = InvokeEndpoint'+  { -- | The desired MIME type of the inference in the response.+    accept :: Prelude.Maybe Prelude.Text,+    -- | The MIME type of the input data in the request body.+    contentType :: Prelude.Maybe Prelude.Text,+    -- | Provides additional information about a request for an inference+    -- submitted to a model hosted at an Amazon SageMaker endpoint. The+    -- information is an opaque value that is forwarded verbatim. You could use+    -- this value, for example, to provide an ID that you can use to track a+    -- request or to provide other metadata that a service endpoint was+    -- programmed to process. The value must consist of no more than 1024+    -- visible US-ASCII characters as specified in+    -- <https://tools.ietf.org/html/rfc7230#section-3.2.6 Section 3.3.6. Field Value Components>+    -- of the Hypertext Transfer Protocol (HTTP\/1.1).+    --+    -- The code in your model is responsible for setting or updating any custom+    -- attributes in the response. If your code does not set this value in the+    -- response, an empty value is returned. For example, if a custom attribute+    -- represents the trace ID, your model can prepend the custom attribute+    -- with @Trace ID:@ in your post-processing function.+    --+    -- This feature is currently supported in the Amazon Web Services SDKs but+    -- not in the Amazon SageMaker Python SDK.+    customAttributes :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | An optional JMESPath expression used to override the+    -- @EnableExplanations@ parameter of the @ClarifyExplainerConfig@ API. See+    -- the+    -- <https://docs.aws.amazon.com/clarify-online-explainability-create-endpoint.html#clarify-online-exaplainability-create-endpoint-enable EnableExplanations>+    -- section in the developer guide for more information.+    enableExplanations :: Prelude.Maybe Prelude.Text,+    -- | If you provide a value, it is added to the captured data when you enable+    -- data capture on the endpoint. For information about data capture, see+    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-data-capture.html Capture Data>.+    inferenceId :: Prelude.Maybe Prelude.Text,+    -- | If the endpoint hosts multiple containers and is configured to use+    -- direct invocation, this parameter specifies the host name of the+    -- container to invoke.+    targetContainerHostname :: Prelude.Maybe Prelude.Text,+    -- | The model to request for inference when invoking a multi-model endpoint.+    targetModel :: Prelude.Maybe Prelude.Text,+    -- | Specify the production variant to send the inference request to when+    -- invoking an endpoint that is running two or more variants. Note that+    -- this parameter overrides the default behavior for the endpoint, which is+    -- to distribute the invocation traffic based on the variant weights.+    --+    -- For information about how to use variant targeting to perform a\/b+    -- testing, see+    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-ab-testing.html Test models in production>+    targetVariant :: Prelude.Maybe Prelude.Text,+    -- | The name of the endpoint that you specified when you created the+    -- endpoint using the+    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html CreateEndpoint>+    -- API.+    endpointName :: Prelude.Text,+    -- | 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.+    --+    -- For information about the format of the request body, see+    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html Common Data Formats-Inference>.+    body :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InvokeEndpoint' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accept', 'invokeEndpoint_accept' - The desired MIME type of the inference in the response.+--+-- 'contentType', 'invokeEndpoint_contentType' - The MIME type of the input data in the request body.+--+-- 'customAttributes', 'invokeEndpoint_customAttributes' - Provides additional information about a request for an inference+-- submitted to a model hosted at an Amazon SageMaker endpoint. The+-- information is an opaque value that is forwarded verbatim. You could use+-- this value, for example, to provide an ID that you can use to track a+-- request or to provide other metadata that a service endpoint was+-- programmed to process. The value must consist of no more than 1024+-- visible US-ASCII characters as specified in+-- <https://tools.ietf.org/html/rfc7230#section-3.2.6 Section 3.3.6. Field Value Components>+-- of the Hypertext Transfer Protocol (HTTP\/1.1).+--+-- The code in your model is responsible for setting or updating any custom+-- attributes in the response. If your code does not set this value in the+-- response, an empty value is returned. For example, if a custom attribute+-- represents the trace ID, your model can prepend the custom attribute+-- with @Trace ID:@ in your post-processing function.+--+-- This feature is currently supported in the Amazon Web Services SDKs but+-- not in the Amazon SageMaker Python SDK.+--+-- 'enableExplanations', 'invokeEndpoint_enableExplanations' - An optional JMESPath expression used to override the+-- @EnableExplanations@ parameter of the @ClarifyExplainerConfig@ API. See+-- the+-- <https://docs.aws.amazon.com/clarify-online-explainability-create-endpoint.html#clarify-online-exaplainability-create-endpoint-enable EnableExplanations>+-- section in the developer guide for more information.+--+-- 'inferenceId', 'invokeEndpoint_inferenceId' - If you provide a value, it is added to the captured data when you enable+-- data capture on the endpoint. For information about data capture, see+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-data-capture.html Capture Data>.+--+-- 'targetContainerHostname', 'invokeEndpoint_targetContainerHostname' - If the endpoint hosts multiple containers and is configured to use+-- direct invocation, this parameter specifies the host name of the+-- container to invoke.+--+-- 'targetModel', 'invokeEndpoint_targetModel' - The model to request for inference when invoking a multi-model endpoint.+--+-- 'targetVariant', 'invokeEndpoint_targetVariant' - Specify the production variant to send the inference request to when+-- invoking an endpoint that is running two or more variants. Note that+-- this parameter overrides the default behavior for the endpoint, which is+-- to distribute the invocation traffic based on the variant weights.+--+-- For information about how to use variant targeting to perform a\/b+-- testing, see+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-ab-testing.html Test models in production>+--+-- 'endpointName', 'invokeEndpoint_endpointName' - The name of the endpoint that you specified when you created the+-- endpoint using the+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html CreateEndpoint>+-- API.+--+-- 'body', 'invokeEndpoint_body' - 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.+--+-- For information about the format of the request body, see+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html Common Data Formats-Inference>.+newInvokeEndpoint ::+  -- | 'endpointName'+  Prelude.Text ->+  -- | 'body'+  Prelude.Text ->+  InvokeEndpoint+newInvokeEndpoint pEndpointName_ pBody_ =+  InvokeEndpoint'+    { accept = Prelude.Nothing,+      contentType = Prelude.Nothing,+      customAttributes = Prelude.Nothing,+      enableExplanations = Prelude.Nothing,+      inferenceId = Prelude.Nothing,+      targetContainerHostname = Prelude.Nothing,+      targetModel = Prelude.Nothing,+      targetVariant = Prelude.Nothing,+      endpointName = pEndpointName_,+      body = pBody_+    }++-- | The desired MIME type of the inference in the response.+invokeEndpoint_accept :: Lens.Lens' InvokeEndpoint (Prelude.Maybe Prelude.Text)+invokeEndpoint_accept = Lens.lens (\InvokeEndpoint' {accept} -> accept) (\s@InvokeEndpoint' {} a -> s {accept = a} :: InvokeEndpoint)++-- | The MIME type of the input data in the request body.+invokeEndpoint_contentType :: Lens.Lens' InvokeEndpoint (Prelude.Maybe Prelude.Text)+invokeEndpoint_contentType = Lens.lens (\InvokeEndpoint' {contentType} -> contentType) (\s@InvokeEndpoint' {} a -> s {contentType = a} :: InvokeEndpoint)++-- | Provides additional information about a request for an inference+-- submitted to a model hosted at an Amazon SageMaker endpoint. The+-- information is an opaque value that is forwarded verbatim. You could use+-- this value, for example, to provide an ID that you can use to track a+-- request or to provide other metadata that a service endpoint was+-- programmed to process. The value must consist of no more than 1024+-- visible US-ASCII characters as specified in+-- <https://tools.ietf.org/html/rfc7230#section-3.2.6 Section 3.3.6. Field Value Components>+-- of the Hypertext Transfer Protocol (HTTP\/1.1).+--+-- The code in your model is responsible for setting or updating any custom+-- attributes in the response. If your code does not set this value in the+-- response, an empty value is returned. For example, if a custom attribute+-- represents the trace ID, your model can prepend the custom attribute+-- with @Trace ID:@ in your post-processing function.+--+-- This feature is currently supported in the Amazon Web Services SDKs but+-- not in the Amazon SageMaker Python SDK.+invokeEndpoint_customAttributes :: Lens.Lens' InvokeEndpoint (Prelude.Maybe Prelude.Text)+invokeEndpoint_customAttributes = Lens.lens (\InvokeEndpoint' {customAttributes} -> customAttributes) (\s@InvokeEndpoint' {} a -> s {customAttributes = a} :: InvokeEndpoint) Prelude.. Lens.mapping Data._Sensitive++-- | An optional JMESPath expression used to override the+-- @EnableExplanations@ parameter of the @ClarifyExplainerConfig@ API. See+-- the+-- <https://docs.aws.amazon.com/clarify-online-explainability-create-endpoint.html#clarify-online-exaplainability-create-endpoint-enable EnableExplanations>+-- section in the developer guide for more information.+invokeEndpoint_enableExplanations :: Lens.Lens' InvokeEndpoint (Prelude.Maybe Prelude.Text)+invokeEndpoint_enableExplanations = Lens.lens (\InvokeEndpoint' {enableExplanations} -> enableExplanations) (\s@InvokeEndpoint' {} a -> s {enableExplanations = a} :: InvokeEndpoint)++-- | If you provide a value, it is added to the captured data when you enable+-- data capture on the endpoint. For information about data capture, see+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-monitor-data-capture.html Capture Data>.+invokeEndpoint_inferenceId :: Lens.Lens' InvokeEndpoint (Prelude.Maybe Prelude.Text)+invokeEndpoint_inferenceId = Lens.lens (\InvokeEndpoint' {inferenceId} -> inferenceId) (\s@InvokeEndpoint' {} a -> s {inferenceId = a} :: InvokeEndpoint)++-- | If the endpoint hosts multiple containers and is configured to use+-- direct invocation, this parameter specifies the host name of the+-- container to invoke.+invokeEndpoint_targetContainerHostname :: Lens.Lens' InvokeEndpoint (Prelude.Maybe Prelude.Text)+invokeEndpoint_targetContainerHostname = Lens.lens (\InvokeEndpoint' {targetContainerHostname} -> targetContainerHostname) (\s@InvokeEndpoint' {} a -> s {targetContainerHostname = a} :: InvokeEndpoint)++-- | The model to request for inference when invoking a multi-model endpoint.+invokeEndpoint_targetModel :: Lens.Lens' InvokeEndpoint (Prelude.Maybe Prelude.Text)+invokeEndpoint_targetModel = Lens.lens (\InvokeEndpoint' {targetModel} -> targetModel) (\s@InvokeEndpoint' {} a -> s {targetModel = a} :: InvokeEndpoint)++-- | Specify the production variant to send the inference request to when+-- invoking an endpoint that is running two or more variants. Note that+-- this parameter overrides the default behavior for the endpoint, which is+-- to distribute the invocation traffic based on the variant weights.+--+-- For information about how to use variant targeting to perform a\/b+-- testing, see+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/model-ab-testing.html Test models in production>+invokeEndpoint_targetVariant :: Lens.Lens' InvokeEndpoint (Prelude.Maybe Prelude.Text)+invokeEndpoint_targetVariant = Lens.lens (\InvokeEndpoint' {targetVariant} -> targetVariant) (\s@InvokeEndpoint' {} a -> s {targetVariant = a} :: InvokeEndpoint)++-- | The name of the endpoint that you specified when you created the+-- endpoint using the+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html CreateEndpoint>+-- API.+invokeEndpoint_endpointName :: Lens.Lens' InvokeEndpoint Prelude.Text+invokeEndpoint_endpointName = Lens.lens (\InvokeEndpoint' {endpointName} -> endpointName) (\s@InvokeEndpoint' {} a -> s {endpointName = a} :: InvokeEndpoint)++-- | 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.+--+-- For information about the format of the request body, see+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html Common Data Formats-Inference>.+invokeEndpoint_body :: Lens.Lens' InvokeEndpoint Prelude.Text+invokeEndpoint_body = Lens.lens (\InvokeEndpoint' {body} -> body) (\s@InvokeEndpoint' {} a -> s {body = a} :: InvokeEndpoint)++instance Core.AWSRequest InvokeEndpoint where+  type+    AWSResponse InvokeEndpoint =+      InvokeEndpointResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          InvokeEndpointResponse'+            Prelude.<$> (h Data..#? "Content-Type")+            Prelude.<*> (h Data..#? "X-Amzn-SageMaker-Custom-Attributes")+            Prelude.<*> (h Data..#? "x-Amzn-Invoked-Production-Variant")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+            Prelude.<*> (Data.eitherParseJSON x)+      )++instance Prelude.Hashable InvokeEndpoint where+  hashWithSalt _salt InvokeEndpoint' {..} =+    _salt+      `Prelude.hashWithSalt` accept+      `Prelude.hashWithSalt` contentType+      `Prelude.hashWithSalt` customAttributes+      `Prelude.hashWithSalt` enableExplanations+      `Prelude.hashWithSalt` inferenceId+      `Prelude.hashWithSalt` targetContainerHostname+      `Prelude.hashWithSalt` targetModel+      `Prelude.hashWithSalt` targetVariant+      `Prelude.hashWithSalt` endpointName+      `Prelude.hashWithSalt` body++instance Prelude.NFData InvokeEndpoint where+  rnf InvokeEndpoint' {..} =+    Prelude.rnf accept+      `Prelude.seq` Prelude.rnf contentType+      `Prelude.seq` Prelude.rnf customAttributes+      `Prelude.seq` Prelude.rnf enableExplanations+      `Prelude.seq` Prelude.rnf inferenceId+      `Prelude.seq` Prelude.rnf targetContainerHostname+      `Prelude.seq` Prelude.rnf targetModel+      `Prelude.seq` Prelude.rnf targetVariant+      `Prelude.seq` Prelude.rnf endpointName+      `Prelude.seq` Prelude.rnf body++instance Data.ToHeaders InvokeEndpoint where+  toHeaders InvokeEndpoint' {..} =+    Prelude.mconcat+      [ "Accept" Data.=# accept,+        "Content-Type" Data.=# contentType,+        "X-Amzn-SageMaker-Custom-Attributes"+          Data.=# customAttributes,+        "X-Amzn-SageMaker-Enable-Explanations"+          Data.=# enableExplanations,+        "X-Amzn-SageMaker-Inference-Id" Data.=# inferenceId,+        "X-Amzn-SageMaker-Target-Container-Hostname"+          Data.=# targetContainerHostname,+        "X-Amzn-SageMaker-Target-Model" Data.=# targetModel,+        "X-Amzn-SageMaker-Target-Variant"+          Data.=# targetVariant+      ]++instance Data.ToJSON InvokeEndpoint where+  toJSON InvokeEndpoint' {..} = Data.toJSON body++instance Data.ToPath InvokeEndpoint where+  toPath InvokeEndpoint' {..} =+    Prelude.mconcat+      [ "/endpoints/",+        Data.toBS endpointName,+        "/invocations"+      ]++instance Data.ToQuery InvokeEndpoint where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newInvokeEndpointResponse' smart constructor.+data InvokeEndpointResponse = InvokeEndpointResponse'+  { -- | The MIME type of the inference returned in the response body.+    contentType :: Prelude.Maybe Prelude.Text,+    -- | Provides additional information in the response about the inference+    -- returned by a model hosted at an Amazon SageMaker endpoint. The+    -- information is an opaque value that is forwarded verbatim. You could use+    -- this value, for example, to return an ID received in the+    -- @CustomAttributes@ header of a request or other metadata that a service+    -- endpoint was programmed to produce. The value must consist of no more+    -- than 1024 visible US-ASCII characters as specified in+    -- <https://tools.ietf.org/html/rfc7230#section-3.2.6 Section 3.3.6. Field Value Components>+    -- of the Hypertext Transfer Protocol (HTTP\/1.1). If the customer wants+    -- the custom attribute returned, the model must set the custom attribute+    -- to be included on the way back.+    --+    -- The code in your model is responsible for setting or updating any custom+    -- attributes in the response. If your code does not set this value in the+    -- response, an empty value is returned. For example, if a custom attribute+    -- represents the trace ID, your model can prepend the custom attribute+    -- with @Trace ID:@ in your post-processing function.+    --+    -- This feature is currently supported in the Amazon Web Services SDKs but+    -- not in the Amazon SageMaker Python SDK.+    customAttributes :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | Identifies the production variant that was invoked.+    invokedProductionVariant :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int,+    -- | Includes the inference provided by the model.+    --+    -- For information about the format of the response body, see+    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html Common Data Formats-Inference>.+    --+    -- If the explainer is activated, the body includes the explanations+    -- provided by the model. For more information, see the __Response+    -- section__ under+    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response Invoke the Endpoint>+    -- in the Developer Guide.+    body :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InvokeEndpointResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'contentType', 'invokeEndpointResponse_contentType' - The MIME type of the inference returned in the response body.+--+-- 'customAttributes', 'invokeEndpointResponse_customAttributes' - Provides additional information in the response about the inference+-- returned by a model hosted at an Amazon SageMaker endpoint. The+-- information is an opaque value that is forwarded verbatim. You could use+-- this value, for example, to return an ID received in the+-- @CustomAttributes@ header of a request or other metadata that a service+-- endpoint was programmed to produce. The value must consist of no more+-- than 1024 visible US-ASCII characters as specified in+-- <https://tools.ietf.org/html/rfc7230#section-3.2.6 Section 3.3.6. Field Value Components>+-- of the Hypertext Transfer Protocol (HTTP\/1.1). If the customer wants+-- the custom attribute returned, the model must set the custom attribute+-- to be included on the way back.+--+-- The code in your model is responsible for setting or updating any custom+-- attributes in the response. If your code does not set this value in the+-- response, an empty value is returned. For example, if a custom attribute+-- represents the trace ID, your model can prepend the custom attribute+-- with @Trace ID:@ in your post-processing function.+--+-- This feature is currently supported in the Amazon Web Services SDKs but+-- not in the Amazon SageMaker Python SDK.+--+-- 'invokedProductionVariant', 'invokeEndpointResponse_invokedProductionVariant' - Identifies the production variant that was invoked.+--+-- 'httpStatus', 'invokeEndpointResponse_httpStatus' - The response's http status code.+--+-- 'body', 'invokeEndpointResponse_body' - Includes the inference provided by the model.+--+-- For information about the format of the response body, see+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html Common Data Formats-Inference>.+--+-- If the explainer is activated, the body includes the explanations+-- provided by the model. For more information, see the __Response+-- section__ under+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response Invoke the Endpoint>+-- in the Developer Guide.+newInvokeEndpointResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  -- | 'body'+  Prelude.Text ->+  InvokeEndpointResponse+newInvokeEndpointResponse pHttpStatus_ pBody_ =+  InvokeEndpointResponse'+    { contentType =+        Prelude.Nothing,+      customAttributes = Prelude.Nothing,+      invokedProductionVariant = Prelude.Nothing,+      httpStatus = pHttpStatus_,+      body = pBody_+    }++-- | The MIME type of the inference returned in the response body.+invokeEndpointResponse_contentType :: Lens.Lens' InvokeEndpointResponse (Prelude.Maybe Prelude.Text)+invokeEndpointResponse_contentType = Lens.lens (\InvokeEndpointResponse' {contentType} -> contentType) (\s@InvokeEndpointResponse' {} a -> s {contentType = a} :: InvokeEndpointResponse)++-- | Provides additional information in the response about the inference+-- returned by a model hosted at an Amazon SageMaker endpoint. The+-- information is an opaque value that is forwarded verbatim. You could use+-- this value, for example, to return an ID received in the+-- @CustomAttributes@ header of a request or other metadata that a service+-- endpoint was programmed to produce. The value must consist of no more+-- than 1024 visible US-ASCII characters as specified in+-- <https://tools.ietf.org/html/rfc7230#section-3.2.6 Section 3.3.6. Field Value Components>+-- of the Hypertext Transfer Protocol (HTTP\/1.1). If the customer wants+-- the custom attribute returned, the model must set the custom attribute+-- to be included on the way back.+--+-- The code in your model is responsible for setting or updating any custom+-- attributes in the response. If your code does not set this value in the+-- response, an empty value is returned. For example, if a custom attribute+-- represents the trace ID, your model can prepend the custom attribute+-- with @Trace ID:@ in your post-processing function.+--+-- This feature is currently supported in the Amazon Web Services SDKs but+-- not in the Amazon SageMaker Python SDK.+invokeEndpointResponse_customAttributes :: Lens.Lens' InvokeEndpointResponse (Prelude.Maybe Prelude.Text)+invokeEndpointResponse_customAttributes = Lens.lens (\InvokeEndpointResponse' {customAttributes} -> customAttributes) (\s@InvokeEndpointResponse' {} a -> s {customAttributes = a} :: InvokeEndpointResponse) Prelude.. Lens.mapping Data._Sensitive++-- | Identifies the production variant that was invoked.+invokeEndpointResponse_invokedProductionVariant :: Lens.Lens' InvokeEndpointResponse (Prelude.Maybe Prelude.Text)+invokeEndpointResponse_invokedProductionVariant = Lens.lens (\InvokeEndpointResponse' {invokedProductionVariant} -> invokedProductionVariant) (\s@InvokeEndpointResponse' {} a -> s {invokedProductionVariant = a} :: InvokeEndpointResponse)++-- | The response's http status code.+invokeEndpointResponse_httpStatus :: Lens.Lens' InvokeEndpointResponse Prelude.Int+invokeEndpointResponse_httpStatus = Lens.lens (\InvokeEndpointResponse' {httpStatus} -> httpStatus) (\s@InvokeEndpointResponse' {} a -> s {httpStatus = a} :: InvokeEndpointResponse)++-- | Includes the inference provided by the model.+--+-- For information about the format of the response body, see+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html Common Data Formats-Inference>.+--+-- If the explainer is activated, the body includes the explanations+-- provided by the model. For more information, see the __Response+-- section__ under+-- <https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response Invoke the Endpoint>+-- in the Developer Guide.+invokeEndpointResponse_body :: Lens.Lens' InvokeEndpointResponse Prelude.Text+invokeEndpointResponse_body = Lens.lens (\InvokeEndpointResponse' {body} -> body) (\s@InvokeEndpointResponse' {} a -> s {body = a} :: InvokeEndpointResponse)++instance Prelude.NFData InvokeEndpointResponse where+  rnf InvokeEndpointResponse' {..} =+    Prelude.rnf contentType+      `Prelude.seq` Prelude.rnf customAttributes+      `Prelude.seq` Prelude.rnf invokedProductionVariant+      `Prelude.seq` Prelude.rnf httpStatus+      `Prelude.seq` Prelude.rnf body
+ gen/Amazonka/SageMakerRuntime/InvokeEndpointAsync.hs view
@@ -0,0 +1,350 @@+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SageMakerRuntime.InvokeEndpointAsync+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- 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 the 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+-- <https://docs.aws.amazon.com/https:/docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html Authenticating Requests (Amazon Web Services Signature Version 4)>+-- in the /Amazon S3 API Reference/.+module Amazonka.SageMakerRuntime.InvokeEndpointAsync+  ( -- * Creating a Request+    InvokeEndpointAsync (..),+    newInvokeEndpointAsync,++    -- * Request Lenses+    invokeEndpointAsync_accept,+    invokeEndpointAsync_contentType,+    invokeEndpointAsync_customAttributes,+    invokeEndpointAsync_inferenceId,+    invokeEndpointAsync_requestTTLSeconds,+    invokeEndpointAsync_endpointName,+    invokeEndpointAsync_inputLocation,++    -- * Destructuring the Response+    InvokeEndpointAsyncResponse (..),+    newInvokeEndpointAsyncResponse,++    -- * Response Lenses+    invokeEndpointAsyncResponse_inferenceId,+    invokeEndpointAsyncResponse_outputLocation,+    invokeEndpointAsyncResponse_httpStatus,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Request as Request+import qualified Amazonka.Response as Response+import Amazonka.SageMakerRuntime.Types++-- | /See:/ 'newInvokeEndpointAsync' smart constructor.+data InvokeEndpointAsync = InvokeEndpointAsync'+  { -- | The desired MIME type of the inference in the response.+    accept :: Prelude.Maybe Prelude.Text,+    -- | The MIME type of the input data in the request body.+    contentType :: Prelude.Maybe Prelude.Text,+    -- | Provides additional information about a request for an inference+    -- submitted to a model hosted at an Amazon SageMaker endpoint. The+    -- information is an opaque value that is forwarded verbatim. You could use+    -- this value, for example, to provide an ID that you can use to track a+    -- request or to provide other metadata that a service endpoint was+    -- programmed to process. The value must consist of no more than 1024+    -- visible US-ASCII characters as specified in+    -- <https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6 Section 3.3.6. Field Value Components>+    -- of the Hypertext Transfer Protocol (HTTP\/1.1).+    --+    -- The code in your model is responsible for setting or updating any custom+    -- attributes in the response. If your code does not set this value in the+    -- response, an empty value is returned. For example, if a custom attribute+    -- represents the trace ID, your model can prepend the custom attribute+    -- with @Trace ID@: in your post-processing function.+    --+    -- This feature is currently supported in the Amazon Web Services SDKs but+    -- not in the Amazon SageMaker Python SDK.+    customAttributes :: Prelude.Maybe (Data.Sensitive Prelude.Text),+    -- | The identifier for the inference request. Amazon SageMaker will generate+    -- an identifier for you if none is specified.+    inferenceId :: Prelude.Maybe Prelude.Text,+    -- | Maximum age in seconds a request can be in the queue before it is marked+    -- as expired.+    requestTTLSeconds :: Prelude.Maybe Prelude.Natural,+    -- | The name of the endpoint that you specified when you created the+    -- endpoint using the+    -- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html CreateEndpoint>+    -- API.+    endpointName :: Prelude.Text,+    -- | The Amazon S3 URI where the inference request payload is stored.+    inputLocation :: Prelude.Text+  }+  deriving (Prelude.Eq, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InvokeEndpointAsync' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'accept', 'invokeEndpointAsync_accept' - The desired MIME type of the inference in the response.+--+-- 'contentType', 'invokeEndpointAsync_contentType' - The MIME type of the input data in the request body.+--+-- 'customAttributes', 'invokeEndpointAsync_customAttributes' - Provides additional information about a request for an inference+-- submitted to a model hosted at an Amazon SageMaker endpoint. The+-- information is an opaque value that is forwarded verbatim. You could use+-- this value, for example, to provide an ID that you can use to track a+-- request or to provide other metadata that a service endpoint was+-- programmed to process. The value must consist of no more than 1024+-- visible US-ASCII characters as specified in+-- <https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6 Section 3.3.6. Field Value Components>+-- of the Hypertext Transfer Protocol (HTTP\/1.1).+--+-- The code in your model is responsible for setting or updating any custom+-- attributes in the response. If your code does not set this value in the+-- response, an empty value is returned. For example, if a custom attribute+-- represents the trace ID, your model can prepend the custom attribute+-- with @Trace ID@: in your post-processing function.+--+-- This feature is currently supported in the Amazon Web Services SDKs but+-- not in the Amazon SageMaker Python SDK.+--+-- 'inferenceId', 'invokeEndpointAsync_inferenceId' - The identifier for the inference request. Amazon SageMaker will generate+-- an identifier for you if none is specified.+--+-- 'requestTTLSeconds', 'invokeEndpointAsync_requestTTLSeconds' - Maximum age in seconds a request can be in the queue before it is marked+-- as expired.+--+-- 'endpointName', 'invokeEndpointAsync_endpointName' - The name of the endpoint that you specified when you created the+-- endpoint using the+-- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html CreateEndpoint>+-- API.+--+-- 'inputLocation', 'invokeEndpointAsync_inputLocation' - The Amazon S3 URI where the inference request payload is stored.+newInvokeEndpointAsync ::+  -- | 'endpointName'+  Prelude.Text ->+  -- | 'inputLocation'+  Prelude.Text ->+  InvokeEndpointAsync+newInvokeEndpointAsync pEndpointName_ pInputLocation_ =+  InvokeEndpointAsync'+    { accept = Prelude.Nothing,+      contentType = Prelude.Nothing,+      customAttributes = Prelude.Nothing,+      inferenceId = Prelude.Nothing,+      requestTTLSeconds = Prelude.Nothing,+      endpointName = pEndpointName_,+      inputLocation = pInputLocation_+    }++-- | The desired MIME type of the inference in the response.+invokeEndpointAsync_accept :: Lens.Lens' InvokeEndpointAsync (Prelude.Maybe Prelude.Text)+invokeEndpointAsync_accept = Lens.lens (\InvokeEndpointAsync' {accept} -> accept) (\s@InvokeEndpointAsync' {} a -> s {accept = a} :: InvokeEndpointAsync)++-- | The MIME type of the input data in the request body.+invokeEndpointAsync_contentType :: Lens.Lens' InvokeEndpointAsync (Prelude.Maybe Prelude.Text)+invokeEndpointAsync_contentType = Lens.lens (\InvokeEndpointAsync' {contentType} -> contentType) (\s@InvokeEndpointAsync' {} a -> s {contentType = a} :: InvokeEndpointAsync)++-- | Provides additional information about a request for an inference+-- submitted to a model hosted at an Amazon SageMaker endpoint. The+-- information is an opaque value that is forwarded verbatim. You could use+-- this value, for example, to provide an ID that you can use to track a+-- request or to provide other metadata that a service endpoint was+-- programmed to process. The value must consist of no more than 1024+-- visible US-ASCII characters as specified in+-- <https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6 Section 3.3.6. Field Value Components>+-- of the Hypertext Transfer Protocol (HTTP\/1.1).+--+-- The code in your model is responsible for setting or updating any custom+-- attributes in the response. If your code does not set this value in the+-- response, an empty value is returned. For example, if a custom attribute+-- represents the trace ID, your model can prepend the custom attribute+-- with @Trace ID@: in your post-processing function.+--+-- This feature is currently supported in the Amazon Web Services SDKs but+-- not in the Amazon SageMaker Python SDK.+invokeEndpointAsync_customAttributes :: Lens.Lens' InvokeEndpointAsync (Prelude.Maybe Prelude.Text)+invokeEndpointAsync_customAttributes = Lens.lens (\InvokeEndpointAsync' {customAttributes} -> customAttributes) (\s@InvokeEndpointAsync' {} a -> s {customAttributes = a} :: InvokeEndpointAsync) Prelude.. Lens.mapping Data._Sensitive++-- | The identifier for the inference request. Amazon SageMaker will generate+-- an identifier for you if none is specified.+invokeEndpointAsync_inferenceId :: Lens.Lens' InvokeEndpointAsync (Prelude.Maybe Prelude.Text)+invokeEndpointAsync_inferenceId = Lens.lens (\InvokeEndpointAsync' {inferenceId} -> inferenceId) (\s@InvokeEndpointAsync' {} a -> s {inferenceId = a} :: InvokeEndpointAsync)++-- | Maximum age in seconds a request can be in the queue before it is marked+-- as expired.+invokeEndpointAsync_requestTTLSeconds :: Lens.Lens' InvokeEndpointAsync (Prelude.Maybe Prelude.Natural)+invokeEndpointAsync_requestTTLSeconds = Lens.lens (\InvokeEndpointAsync' {requestTTLSeconds} -> requestTTLSeconds) (\s@InvokeEndpointAsync' {} a -> s {requestTTLSeconds = a} :: InvokeEndpointAsync)++-- | The name of the endpoint that you specified when you created the+-- endpoint using the+-- <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html CreateEndpoint>+-- API.+invokeEndpointAsync_endpointName :: Lens.Lens' InvokeEndpointAsync Prelude.Text+invokeEndpointAsync_endpointName = Lens.lens (\InvokeEndpointAsync' {endpointName} -> endpointName) (\s@InvokeEndpointAsync' {} a -> s {endpointName = a} :: InvokeEndpointAsync)++-- | The Amazon S3 URI where the inference request payload is stored.+invokeEndpointAsync_inputLocation :: Lens.Lens' InvokeEndpointAsync Prelude.Text+invokeEndpointAsync_inputLocation = Lens.lens (\InvokeEndpointAsync' {inputLocation} -> inputLocation) (\s@InvokeEndpointAsync' {} a -> s {inputLocation = a} :: InvokeEndpointAsync)++instance Core.AWSRequest InvokeEndpointAsync where+  type+    AWSResponse InvokeEndpointAsync =+      InvokeEndpointAsyncResponse+  request overrides =+    Request.postJSON (overrides defaultService)+  response =+    Response.receiveJSON+      ( \s h x ->+          InvokeEndpointAsyncResponse'+            Prelude.<$> (x Data..?> "InferenceId")+            Prelude.<*> (h Data..#? "X-Amzn-SageMaker-OutputLocation")+            Prelude.<*> (Prelude.pure (Prelude.fromEnum s))+      )++instance Prelude.Hashable InvokeEndpointAsync where+  hashWithSalt _salt InvokeEndpointAsync' {..} =+    _salt+      `Prelude.hashWithSalt` accept+      `Prelude.hashWithSalt` contentType+      `Prelude.hashWithSalt` customAttributes+      `Prelude.hashWithSalt` inferenceId+      `Prelude.hashWithSalt` requestTTLSeconds+      `Prelude.hashWithSalt` endpointName+      `Prelude.hashWithSalt` inputLocation++instance Prelude.NFData InvokeEndpointAsync where+  rnf InvokeEndpointAsync' {..} =+    Prelude.rnf accept+      `Prelude.seq` Prelude.rnf contentType+      `Prelude.seq` Prelude.rnf customAttributes+      `Prelude.seq` Prelude.rnf inferenceId+      `Prelude.seq` Prelude.rnf requestTTLSeconds+      `Prelude.seq` Prelude.rnf endpointName+      `Prelude.seq` Prelude.rnf inputLocation++instance Data.ToHeaders InvokeEndpointAsync where+  toHeaders InvokeEndpointAsync' {..} =+    Prelude.mconcat+      [ "X-Amzn-SageMaker-Accept" Data.=# accept,+        "X-Amzn-SageMaker-Content-Type" Data.=# contentType,+        "X-Amzn-SageMaker-Custom-Attributes"+          Data.=# customAttributes,+        "X-Amzn-SageMaker-Inference-Id" Data.=# inferenceId,+        "X-Amzn-SageMaker-RequestTTLSeconds"+          Data.=# requestTTLSeconds,+        "X-Amzn-SageMaker-InputLocation"+          Data.=# inputLocation,+        "Content-Type"+          Data.=# ("application/x-amz-json-1.1" :: Prelude.ByteString)+      ]++instance Data.ToJSON InvokeEndpointAsync where+  toJSON = Prelude.const (Data.Object Prelude.mempty)++instance Data.ToPath InvokeEndpointAsync where+  toPath InvokeEndpointAsync' {..} =+    Prelude.mconcat+      [ "/endpoints/",+        Data.toBS endpointName,+        "/async-invocations"+      ]++instance Data.ToQuery InvokeEndpointAsync where+  toQuery = Prelude.const Prelude.mempty++-- | /See:/ 'newInvokeEndpointAsyncResponse' smart constructor.+data InvokeEndpointAsyncResponse = InvokeEndpointAsyncResponse'+  { -- | Identifier for an inference request. This will be the same as the+    -- @InferenceId@ specified in the input. Amazon SageMaker will generate an+    -- identifier for you if you do not specify one.+    inferenceId :: Prelude.Maybe Prelude.Text,+    -- | The Amazon S3 URI where the inference response payload is stored.+    outputLocation :: Prelude.Maybe Prelude.Text,+    -- | The response's http status code.+    httpStatus :: Prelude.Int+  }+  deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)++-- |+-- Create a value of 'InvokeEndpointAsyncResponse' with all optional fields omitted.+--+-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.+--+-- The following record fields are available, with the corresponding lenses provided+-- for backwards compatibility:+--+-- 'inferenceId', 'invokeEndpointAsyncResponse_inferenceId' - Identifier for an inference request. This will be the same as the+-- @InferenceId@ specified in the input. Amazon SageMaker will generate an+-- identifier for you if you do not specify one.+--+-- 'outputLocation', 'invokeEndpointAsyncResponse_outputLocation' - The Amazon S3 URI where the inference response payload is stored.+--+-- 'httpStatus', 'invokeEndpointAsyncResponse_httpStatus' - The response's http status code.+newInvokeEndpointAsyncResponse ::+  -- | 'httpStatus'+  Prelude.Int ->+  InvokeEndpointAsyncResponse+newInvokeEndpointAsyncResponse pHttpStatus_ =+  InvokeEndpointAsyncResponse'+    { inferenceId =+        Prelude.Nothing,+      outputLocation = Prelude.Nothing,+      httpStatus = pHttpStatus_+    }++-- | Identifier for an inference request. This will be the same as the+-- @InferenceId@ specified in the input. Amazon SageMaker will generate an+-- identifier for you if you do not specify one.+invokeEndpointAsyncResponse_inferenceId :: Lens.Lens' InvokeEndpointAsyncResponse (Prelude.Maybe Prelude.Text)+invokeEndpointAsyncResponse_inferenceId = Lens.lens (\InvokeEndpointAsyncResponse' {inferenceId} -> inferenceId) (\s@InvokeEndpointAsyncResponse' {} a -> s {inferenceId = a} :: InvokeEndpointAsyncResponse)++-- | The Amazon S3 URI where the inference response payload is stored.+invokeEndpointAsyncResponse_outputLocation :: Lens.Lens' InvokeEndpointAsyncResponse (Prelude.Maybe Prelude.Text)+invokeEndpointAsyncResponse_outputLocation = Lens.lens (\InvokeEndpointAsyncResponse' {outputLocation} -> outputLocation) (\s@InvokeEndpointAsyncResponse' {} a -> s {outputLocation = a} :: InvokeEndpointAsyncResponse)++-- | The response's http status code.+invokeEndpointAsyncResponse_httpStatus :: Lens.Lens' InvokeEndpointAsyncResponse Prelude.Int+invokeEndpointAsyncResponse_httpStatus = Lens.lens (\InvokeEndpointAsyncResponse' {httpStatus} -> httpStatus) (\s@InvokeEndpointAsyncResponse' {} a -> s {httpStatus = a} :: InvokeEndpointAsyncResponse)++instance Prelude.NFData InvokeEndpointAsyncResponse where+  rnf InvokeEndpointAsyncResponse' {..} =+    Prelude.rnf inferenceId+      `Prelude.seq` Prelude.rnf outputLocation+      `Prelude.seq` Prelude.rnf httpStatus
+ gen/Amazonka/SageMakerRuntime/Lens.hs view
@@ -0,0 +1,51 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SageMakerRuntime.Lens+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.SageMakerRuntime.Lens+  ( -- * Operations++    -- ** InvokeEndpoint+    invokeEndpoint_accept,+    invokeEndpoint_contentType,+    invokeEndpoint_customAttributes,+    invokeEndpoint_enableExplanations,+    invokeEndpoint_inferenceId,+    invokeEndpoint_targetContainerHostname,+    invokeEndpoint_targetModel,+    invokeEndpoint_targetVariant,+    invokeEndpoint_endpointName,+    invokeEndpoint_body,+    invokeEndpointResponse_contentType,+    invokeEndpointResponse_customAttributes,+    invokeEndpointResponse_invokedProductionVariant,+    invokeEndpointResponse_httpStatus,+    invokeEndpointResponse_body,++    -- ** InvokeEndpointAsync+    invokeEndpointAsync_accept,+    invokeEndpointAsync_contentType,+    invokeEndpointAsync_customAttributes,+    invokeEndpointAsync_inferenceId,+    invokeEndpointAsync_requestTTLSeconds,+    invokeEndpointAsync_endpointName,+    invokeEndpointAsync_inputLocation,+    invokeEndpointAsyncResponse_inferenceId,+    invokeEndpointAsyncResponse_outputLocation,+    invokeEndpointAsyncResponse_httpStatus,++    -- * Types+  )+where++import Amazonka.SageMakerRuntime.InvokeEndpoint+import Amazonka.SageMakerRuntime.InvokeEndpointAsync
+ gen/Amazonka/SageMakerRuntime/Types.hs view
@@ -0,0 +1,153 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SageMakerRuntime.Types+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.SageMakerRuntime.Types+  ( -- * Service Configuration+    defaultService,++    -- * Errors+    _InternalDependencyException,+    _InternalFailure,+    _ModelError,+    _ModelNotReadyException,+    _ServiceUnavailable,+    _ValidationError,+  )+where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Prelude as Prelude+import qualified Amazonka.Sign.V4 as Sign++-- | API version @2017-05-13@ of the Amazon SageMaker Runtime SDK configuration.+defaultService :: Core.Service+defaultService =+  Core.Service+    { Core.abbrev = "SageMakerRuntime",+      Core.signer = Sign.v4,+      Core.endpointPrefix = "runtime.sagemaker",+      Core.signingName = "sagemaker",+      Core.version = "2017-05-13",+      Core.s3AddressingStyle = Core.S3AddressingStyleAuto,+      Core.endpoint = Core.defaultEndpoint defaultService,+      Core.timeout = Prelude.Just 70,+      Core.check = Core.statusSuccess,+      Core.error = Core.parseJSONError "SageMakerRuntime",+      Core.retry = retry+    }+  where+    retry =+      Core.Exponential+        { Core.base = 5.0e-2,+          Core.growth = 2,+          Core.attempts = 5,+          Core.check = check+        }+    check e+      | Lens.has (Core.hasStatus 502) e =+          Prelude.Just "bad_gateway"+      | Lens.has (Core.hasStatus 504) e =+          Prelude.Just "gateway_timeout"+      | Lens.has (Core.hasStatus 500) e =+          Prelude.Just "general_server_error"+      | Lens.has (Core.hasStatus 509) e =+          Prelude.Just "limit_exceeded"+      | Lens.has+          ( Core.hasCode "RequestThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "request_throttled_exception"+      | Lens.has (Core.hasStatus 503) e =+          Prelude.Just "service_unavailable"+      | Lens.has+          ( Core.hasCode "ThrottledException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttled_exception"+      | Lens.has+          ( Core.hasCode "Throttling"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling"+      | Lens.has+          ( Core.hasCode "ThrottlingException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throttling_exception"+      | Lens.has+          ( Core.hasCode+              "ProvisionedThroughputExceededException"+              Prelude.. Core.hasStatus 400+          )+          e =+          Prelude.Just "throughput_exceeded"+      | Lens.has (Core.hasStatus 429) e =+          Prelude.Just "too_many_requests"+      | Prelude.otherwise = Prelude.Nothing++-- | Your request caused an exception with an internal dependency. Contact+-- customer support.+_InternalDependencyException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalDependencyException =+  Core._MatchServiceError+    defaultService+    "InternalDependencyException"+    Prelude.. Core.hasStatus 530++-- | An internal failure occurred.+_InternalFailure :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_InternalFailure =+  Core._MatchServiceError+    defaultService+    "InternalFailure"+    Prelude.. Core.hasStatus 500++-- | Model (owned by the customer in the container) returned 4xx or 5xx error+-- code.+_ModelError :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ModelError =+  Core._MatchServiceError defaultService "ModelError"+    Prelude.. Core.hasStatus 424++-- | Either a serverless endpoint variant\'s resources are still being+-- provisioned, or a multi-model endpoint is still downloading or loading+-- the target model. Wait and try your request again.+_ModelNotReadyException :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ModelNotReadyException =+  Core._MatchServiceError+    defaultService+    "ModelNotReadyException"+    Prelude.. Core.hasStatus 429++-- | The service is unavailable. Try your call again.+_ServiceUnavailable :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ServiceUnavailable =+  Core._MatchServiceError+    defaultService+    "ServiceUnavailable"+    Prelude.. Core.hasStatus 503++-- | Inspect your request and try again.+_ValidationError :: (Core.AsError a) => Lens.Fold a Core.ServiceError+_ValidationError =+  Core._MatchServiceError+    defaultService+    "ValidationError"+    Prelude.. Core.hasStatus 400
+ gen/Amazonka/SageMakerRuntime/Waiters.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Amazonka.SageMakerRuntime.Waiters+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Amazonka.SageMakerRuntime.Waiters where++import qualified Amazonka.Core as Core+import qualified Amazonka.Core.Lens.Internal as Lens+import qualified Amazonka.Data as Data+import qualified Amazonka.Prelude as Prelude+import Amazonka.SageMakerRuntime.Lens+import Amazonka.SageMakerRuntime.Types
− gen/Network/AWS/SageMakerRuntime.hs
@@ -1,81 +0,0 @@-{-# OPTIONS_GHC -fno-warn-unused-imports    #-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SageMakerRuntime--- 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)------ Amazon SageMaker runtime API.-------module Network.AWS.SageMakerRuntime-    (-    -- * Service Configuration-      sageMakerRuntime--    -- * Errors-    -- $errors--    -- ** ServiceUnavailable-    , _ServiceUnavailable--    -- ** ModelError-    , _ModelError--    -- ** InternalFailure-    , _InternalFailure--    -- ** ValidationError-    , _ValidationError--    -- * Waiters-    -- $waiters--    -- * Operations-    -- $operations--    -- ** InvokeEndpoint-    , module Network.AWS.SageMakerRuntime.InvokeEndpoint--    -- * Types-    ) where--import Network.AWS.SageMakerRuntime.InvokeEndpoint-import Network.AWS.SageMakerRuntime.Types-import Network.AWS.SageMakerRuntime.Waiters--{- $errors-Error matchers are designed for use with the functions provided by-<http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.-This allows catching (and rethrowing) service specific errors returned-by 'SageMakerRuntime'.--}--{- $operations-Some AWS operations return results that are incomplete and require subsequent-requests in order to obtain the entire result set. The process of sending-subsequent requests to continue where a previous request left off is called-pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to-1000 objects at a time, and you must send subsequent requests with the-appropriate Marker in order to retrieve the next page of results.--Operations that have an 'AWSPager' instance can transparently perform subsequent-requests, correctly setting Markers and other request facets to iterate through-the entire result set of a truncated API operation. Operations which support-this have an additional note in the documentation.--Many operations have the ability to filter results on the server side. See the-individual operation parameters for details.--}--{- $waiters-Waiters poll by repeatedly sending a request until some remote success condition-configured by the 'Wait' specification is fulfilled. The 'Wait' specification-determines how many attempts should be made, in addition to delay and retry strategies.--}
− gen/Network/AWS/SageMakerRuntime/InvokeEndpoint.hs
@@ -1,187 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-matches #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SageMakerRuntime.InvokeEndpoint--- 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)------ 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 <http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html 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.----module Network.AWS.SageMakerRuntime.InvokeEndpoint-    (-    -- * Creating a Request-      invokeEndpoint-    , InvokeEndpoint-    -- * Request Lenses-    , ieAccept-    , ieContentType-    , ieEndpointName-    , ieBody--    -- * Destructuring the Response-    , invokeEndpointResponse-    , InvokeEndpointResponse-    -- * Response Lenses-    , iersInvokedProductionVariant-    , iersContentType-    , iersResponseStatus-    , iersBody-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.Request-import Network.AWS.Response-import Network.AWS.SageMakerRuntime.Types-import Network.AWS.SageMakerRuntime.Types.Product---- | /See:/ 'invokeEndpoint' smart constructor.-data InvokeEndpoint = InvokeEndpoint'-  { _ieAccept       :: !(Maybe Text)-  , _ieContentType  :: !(Maybe Text)-  , _ieEndpointName :: !Text-  , _ieBody         :: !ByteString-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | 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 <http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html 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.-invokeEndpoint-    :: Text -- ^ 'ieEndpointName'-    -> ByteString -- ^ 'ieBody'-    -> InvokeEndpoint-invokeEndpoint pEndpointName_ pBody_ =-  InvokeEndpoint'-    { _ieAccept = Nothing-    , _ieContentType = Nothing-    , _ieEndpointName = pEndpointName_-    , _ieBody = pBody_-    }----- | The desired MIME type of the inference in the response.-ieAccept :: Lens' InvokeEndpoint (Maybe Text)-ieAccept = lens _ieAccept (\ s a -> s{_ieAccept = a})---- | The MIME type of the input data in the request body.-ieContentType :: Lens' InvokeEndpoint (Maybe Text)-ieContentType = lens _ieContentType (\ s a -> s{_ieContentType = a})---- | The name of the endpoint that you specified when you created the endpoint using the <http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html CreateEndpoint> API.-ieEndpointName :: Lens' InvokeEndpoint Text-ieEndpointName = lens _ieEndpointName (\ s a -> s{_ieEndpointName = a})---- | 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.-ieBody :: Lens' InvokeEndpoint ByteString-ieBody = lens _ieBody (\ s a -> s{_ieBody = a})--instance AWSRequest InvokeEndpoint where-        type Rs InvokeEndpoint = InvokeEndpointResponse-        request = postBody sageMakerRuntime-        response-          = receiveBytes-              (\ s h x ->-                 InvokeEndpointResponse' <$>-                   (h .#? "x-Amzn-Invoked-Production-Variant") <*>-                     (h .#? "Content-Type")-                     <*> (pure (fromEnum s))-                     <*> (pure x))--instance Hashable InvokeEndpoint where--instance NFData InvokeEndpoint where--instance ToBody InvokeEndpoint where-        toBody = toBody . _ieBody--instance ToHeaders InvokeEndpoint where-        toHeaders InvokeEndpoint'{..}-          = mconcat-              ["Accept" =# _ieAccept,-               "Content-Type" =# _ieContentType]--instance ToPath InvokeEndpoint where-        toPath InvokeEndpoint'{..}-          = mconcat-              ["/endpoints/", toBS _ieEndpointName, "/invocations"]--instance ToQuery InvokeEndpoint where-        toQuery = const mempty---- | /See:/ 'invokeEndpointResponse' smart constructor.-data InvokeEndpointResponse = InvokeEndpointResponse'-  { _iersInvokedProductionVariant :: !(Maybe Text)-  , _iersContentType              :: !(Maybe Text)-  , _iersResponseStatus           :: !Int-  , _iersBody                     :: !ByteString-  } deriving (Eq, Read, Show, Data, Typeable, Generic)----- | 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.-invokeEndpointResponse-    :: Int -- ^ 'iersResponseStatus'-    -> ByteString -- ^ 'iersBody'-    -> InvokeEndpointResponse-invokeEndpointResponse pResponseStatus_ pBody_ =-  InvokeEndpointResponse'-    { _iersInvokedProductionVariant = Nothing-    , _iersContentType = Nothing-    , _iersResponseStatus = pResponseStatus_-    , _iersBody = pBody_-    }----- | Identifies the production variant that was invoked.-iersInvokedProductionVariant :: Lens' InvokeEndpointResponse (Maybe Text)-iersInvokedProductionVariant = lens _iersInvokedProductionVariant (\ s a -> s{_iersInvokedProductionVariant = a})---- | The MIME type of the inference returned in the response body.-iersContentType :: Lens' InvokeEndpointResponse (Maybe Text)-iersContentType = lens _iersContentType (\ s a -> s{_iersContentType = a})---- | -- | The response status code.-iersResponseStatus :: Lens' InvokeEndpointResponse Int-iersResponseStatus = lens _iersResponseStatus (\ s a -> s{_iersResponseStatus = a})---- | Includes the inference provided by the model.-iersBody :: Lens' InvokeEndpointResponse ByteString-iersBody = lens _iersBody (\ s a -> s{_iersBody = a})--instance NFData InvokeEndpointResponse where
− gen/Network/AWS/SageMakerRuntime/Types.hs
@@ -1,99 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SageMakerRuntime.Types--- 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)----module Network.AWS.SageMakerRuntime.Types-    (-    -- * Service Configuration-      sageMakerRuntime--    -- * Errors-    , _ServiceUnavailable-    , _ModelError-    , _InternalFailure-    , _ValidationError-    ) where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.SageMakerRuntime.Types.Product-import Network.AWS.SageMakerRuntime.Types.Sum-import Network.AWS.Sign.V4---- | API version @2017-05-13@ of the Amazon SageMaker Runtime SDK configuration.-sageMakerRuntime :: Service-sageMakerRuntime =-  Service-    { _svcAbbrev = "SageMakerRuntime"-    , _svcSigner = v4-    , _svcPrefix = "runtime.sagemaker"-    , _svcVersion = "2017-05-13"-    , _svcEndpoint = defaultEndpoint sageMakerRuntime-    , _svcTimeout = Just 70-    , _svcCheck = statusSuccess-    , _svcError = parseJSONError "SageMakerRuntime"-    , _svcRetry = retry-    }-  where-    retry =-      Exponential-        { _retryBase = 5.0e-2-        , _retryGrowth = 2-        , _retryAttempts = 5-        , _retryCheck = check-        }-    check e-      | has (hasCode "ThrottledException" . hasStatus 400) e =-        Just "throttled_exception"-      | has (hasStatus 429) e = Just "too_many_requests"-      | has (hasCode "ThrottlingException" . hasStatus 400) e =-        Just "throttling_exception"-      | has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"-      | has (hasStatus 504) e = Just "gateway_timeout"-      | has (hasCode "RequestThrottledException" . hasStatus 400) e =-        Just "request_throttled_exception"-      | has (hasStatus 502) e = Just "bad_gateway"-      | has (hasStatus 503) e = Just "service_unavailable"-      | has (hasStatus 500) e = Just "general_server_error"-      | has (hasStatus 509) e = Just "limit_exceeded"-      | otherwise = Nothing----- | Service is unavailable. Try your call again.-------_ServiceUnavailable :: AsError a => Getting (First ServiceError) a ServiceError-_ServiceUnavailable =-  _MatchServiceError sageMakerRuntime "ServiceUnavailable" . hasStatus 503----- | Model (owned by the customer in the container) returned an error 500.-------_ModelError :: AsError a => Getting (First ServiceError) a ServiceError-_ModelError = _MatchServiceError sageMakerRuntime "ModelError" . hasStatus 424----- | Internal failure occurred.-------_InternalFailure :: AsError a => Getting (First ServiceError) a ServiceError-_InternalFailure =-  _MatchServiceError sageMakerRuntime "InternalFailure" . hasStatus 500----- | Inspect your request and try again.-------_ValidationError :: AsError a => Getting (First ServiceError) a ServiceError-_ValidationError =-  _MatchServiceError sageMakerRuntime "ValidationError" . hasStatus 400-
− gen/Network/AWS/SageMakerRuntime/Types/Product.hs
@@ -1,22 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SageMakerRuntime.Types.Product--- 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)----module Network.AWS.SageMakerRuntime.Types.Product where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.SageMakerRuntime.Types.Sum
− gen/Network/AWS/SageMakerRuntime/Types/Sum.hs
@@ -1,20 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE LambdaCase         #-}-{-# LANGUAGE OverloadedStrings  #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SageMakerRuntime.Types.Sum--- 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)----module Network.AWS.SageMakerRuntime.Types.Sum where--import Network.AWS.Prelude
− gen/Network/AWS/SageMakerRuntime/Waiters.hs
@@ -1,21 +0,0 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeFamilies      #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Network.AWS.SageMakerRuntime.Waiters--- 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)----module Network.AWS.SageMakerRuntime.Waiters where--import Network.AWS.Lens-import Network.AWS.Prelude-import Network.AWS.SageMakerRuntime.Types-import Network.AWS.Waiter
test/Main.hs view
@@ -2,20 +2,22 @@  -- | -- Module      : Main--- Copyright   : (c) 2013-2018 Brendan Hay+-- Copyright   : (c) 2013-2023 Brendan Hay -- License     : Mozilla Public License, v. 2.0.--- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>+-- Maintainer  : Brendan Hay -- Stability   : auto-generated -- Portability : non-portable (GHC extensions)--- module Main (main) where +import Test.Amazonka.SageMakerRuntime+import Test.Amazonka.SageMakerRuntime.Internal import Test.Tasty-import Test.AWS.SageMakerRuntime-import Test.AWS.SageMakerRuntime.Internal  main :: IO ()-main = defaultMain $ testGroup "SageMakerRuntime"-    [ testGroup "tests"    tests-    , testGroup "fixtures" fixtures-    ]+main =+  defaultMain $+    testGroup+      "SageMakerRuntime"+      [ testGroup "tests" tests,+        testGroup "fixtures" fixtures+      ]
− test/Test/AWS/Gen/SageMakerRuntime.hs
@@ -1,57 +0,0 @@-{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-orphans        #-}---- Derived from AWS service descriptions, licensed under Apache 2.0.---- |--- Module      : Test.AWS.Gen.SageMakerRuntime--- 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)----module Test.AWS.Gen.SageMakerRuntime where--import Data.Proxy-import Network.AWS.SageMakerRuntime-import Test.AWS.Fixture-import Test.AWS.Prelude-import Test.AWS.SageMakerRuntime.Internal-import Test.Tasty---- Auto-generated: the actual test selection needs to be manually placed into--- the top-level so that real test data can be incrementally added.------ This commented snippet is what the entire set should look like:---- fixtures :: TestTree--- fixtures =---     [ testGroup "request"---         [ requestInvokeEndpoint $---             invokeEndpoint------           ]----     , testGroup "response"---         [ responseInvokeEndpoint $---             invokeEndpointResponse------           ]---     ]---- Requests--requestInvokeEndpoint :: InvokeEndpoint -> TestTree-requestInvokeEndpoint = req-    "InvokeEndpoint"-    "fixture/InvokeEndpoint.yaml"---- Responses--responseInvokeEndpoint :: InvokeEndpointResponse -> TestTree-responseInvokeEndpoint = res-    "InvokeEndpointResponse"-    "fixture/InvokeEndpointResponse.proto"-    sageMakerRuntime-    (Proxy :: Proxy InvokeEndpoint)
− test/Test/AWS/SageMakerRuntime.hs
@@ -1,20 +0,0 @@--- |--- Module      : Test.AWS.SageMakerRuntime--- 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)----module Test.AWS.SageMakerRuntime-    ( tests-    , fixtures-    ) where--import Test.Tasty (TestTree)--tests :: [TestTree]-tests = []--fixtures :: [TestTree]-fixtures = []
− test/Test/AWS/SageMakerRuntime/Internal.hs
@@ -1,9 +0,0 @@--- |--- Module      : Test.AWS.SageMakerRuntime.Internal--- 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)----module Test.AWS.SageMakerRuntime.Internal where
+ test/Test/Amazonka/Gen/SageMakerRuntime.hs view
@@ -0,0 +1,78 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}++-- Derived from AWS service descriptions, licensed under Apache 2.0.++-- |+-- Module      : Test.Amazonka.Gen.SageMakerRuntime+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.Gen.SageMakerRuntime where++import Amazonka.SageMakerRuntime+import qualified Data.Proxy as Proxy+import Test.Amazonka.Fixture+import Test.Amazonka.Prelude+import Test.Amazonka.SageMakerRuntime.Internal+import Test.Tasty++-- Auto-generated: the actual test selection needs to be manually placed into+-- the top-level so that real test data can be incrementally added.+--+-- This commented snippet is what the entire set should look like:++-- fixtures :: TestTree+-- fixtures =+--     [ testGroup "request"+--         [ requestInvokeEndpoint $+--             newInvokeEndpoint+--+--         , requestInvokeEndpointAsync $+--             newInvokeEndpointAsync+--+--           ]++--     , testGroup "response"+--         [ responseInvokeEndpoint $+--             newInvokeEndpointResponse+--+--         , responseInvokeEndpointAsync $+--             newInvokeEndpointAsyncResponse+--+--           ]+--     ]++-- Requests++requestInvokeEndpoint :: InvokeEndpoint -> TestTree+requestInvokeEndpoint =+  req+    "InvokeEndpoint"+    "fixture/InvokeEndpoint.yaml"++requestInvokeEndpointAsync :: InvokeEndpointAsync -> TestTree+requestInvokeEndpointAsync =+  req+    "InvokeEndpointAsync"+    "fixture/InvokeEndpointAsync.yaml"++-- Responses++responseInvokeEndpoint :: InvokeEndpointResponse -> TestTree+responseInvokeEndpoint =+  res+    "InvokeEndpointResponse"+    "fixture/InvokeEndpointResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy InvokeEndpoint)++responseInvokeEndpointAsync :: InvokeEndpointAsyncResponse -> TestTree+responseInvokeEndpointAsync =+  res+    "InvokeEndpointAsyncResponse"+    "fixture/InvokeEndpointAsyncResponse.proto"+    defaultService+    (Proxy.Proxy :: Proxy.Proxy InvokeEndpointAsync)
+ test/Test/Amazonka/SageMakerRuntime.hs view
@@ -0,0 +1,20 @@+-- |+-- Module      : Test.Amazonka.SageMakerRuntime+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.SageMakerRuntime+  ( tests,+    fixtures,+  )+where++import Test.Tasty (TestTree)++tests :: [TestTree]+tests = []++fixtures :: [TestTree]+fixtures = []
+ test/Test/Amazonka/SageMakerRuntime/Internal.hs view
@@ -0,0 +1,8 @@+-- |+-- Module      : Test.Amazonka.SageMakerRuntime.Internal+-- Copyright   : (c) 2013-2023 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Test.Amazonka.SageMakerRuntime.Internal where