{-# 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 #-}
module Network.AWS.SageMaker.DeleteEndpoint
(
deleteEndpoint
, DeleteEndpoint
, deEndpointName
, deleteEndpointResponse
, DeleteEndpointResponse
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SageMaker.Types
import Network.AWS.SageMaker.Types.Product
newtype DeleteEndpoint = DeleteEndpoint'
{ _deEndpointName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteEndpoint
:: Text
-> DeleteEndpoint
deleteEndpoint pEndpointName_ =
DeleteEndpoint' {_deEndpointName = pEndpointName_}
deEndpointName :: Lens' DeleteEndpoint Text
deEndpointName = lens _deEndpointName (\ s a -> s{_deEndpointName = a})
instance AWSRequest DeleteEndpoint where
type Rs DeleteEndpoint = DeleteEndpointResponse
request = postJSON sageMaker
response = receiveNull DeleteEndpointResponse'
instance Hashable DeleteEndpoint where
instance NFData DeleteEndpoint where
instance ToHeaders DeleteEndpoint where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("SageMaker.DeleteEndpoint" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteEndpoint where
toJSON DeleteEndpoint'{..}
= object
(catMaybes
[Just ("EndpointName" .= _deEndpointName)])
instance ToPath DeleteEndpoint where
toPath = const "/"
instance ToQuery DeleteEndpoint where
toQuery = const mempty
data DeleteEndpointResponse =
DeleteEndpointResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteEndpointResponse
:: DeleteEndpointResponse
deleteEndpointResponse = DeleteEndpointResponse'
instance NFData DeleteEndpointResponse where