{-# 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.APIGateway.DeleteDeployment
(
deleteDeployment
, DeleteDeployment
, ddRestAPIId
, ddDeploymentId
, deleteDeploymentResponse
, DeleteDeploymentResponse
) where
import Network.AWS.APIGateway.Types
import Network.AWS.APIGateway.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteDeployment = DeleteDeployment'
{ _ddRestAPIId :: !Text
, _ddDeploymentId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDeployment
:: Text
-> Text
-> DeleteDeployment
deleteDeployment pRestAPIId_ pDeploymentId_ =
DeleteDeployment'
{_ddRestAPIId = pRestAPIId_, _ddDeploymentId = pDeploymentId_}
ddRestAPIId :: Lens' DeleteDeployment Text
ddRestAPIId = lens _ddRestAPIId (\ s a -> s{_ddRestAPIId = a})
ddDeploymentId :: Lens' DeleteDeployment Text
ddDeploymentId = lens _ddDeploymentId (\ s a -> s{_ddDeploymentId = a})
instance AWSRequest DeleteDeployment where
type Rs DeleteDeployment = DeleteDeploymentResponse
request = delete apiGateway
response = receiveNull DeleteDeploymentResponse'
instance Hashable DeleteDeployment where
instance NFData DeleteDeployment where
instance ToHeaders DeleteDeployment where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath DeleteDeployment where
toPath DeleteDeployment'{..}
= mconcat
["/restapis/", toBS _ddRestAPIId, "/deployments/",
toBS _ddDeploymentId]
instance ToQuery DeleteDeployment where
toQuery = const mempty
data DeleteDeploymentResponse =
DeleteDeploymentResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDeploymentResponse
:: DeleteDeploymentResponse
deleteDeploymentResponse = DeleteDeploymentResponse'
instance NFData DeleteDeploymentResponse where