{-# 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.CodeDeploy.DeleteDeploymentConfig
(
deleteDeploymentConfig
, DeleteDeploymentConfig
, ddcDeploymentConfigName
, deleteDeploymentConfigResponse
, DeleteDeploymentConfigResponse
) where
import Network.AWS.CodeDeploy.Types
import Network.AWS.CodeDeploy.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteDeploymentConfig = DeleteDeploymentConfig'
{ _ddcDeploymentConfigName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDeploymentConfig
:: Text
-> DeleteDeploymentConfig
deleteDeploymentConfig pDeploymentConfigName_ =
DeleteDeploymentConfig' {_ddcDeploymentConfigName = pDeploymentConfigName_}
ddcDeploymentConfigName :: Lens' DeleteDeploymentConfig Text
ddcDeploymentConfigName = lens _ddcDeploymentConfigName (\ s a -> s{_ddcDeploymentConfigName = a})
instance AWSRequest DeleteDeploymentConfig where
type Rs DeleteDeploymentConfig =
DeleteDeploymentConfigResponse
request = postJSON codeDeploy
response
= receiveNull DeleteDeploymentConfigResponse'
instance Hashable DeleteDeploymentConfig where
instance NFData DeleteDeploymentConfig where
instance ToHeaders DeleteDeploymentConfig where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CodeDeploy_20141006.DeleteDeploymentConfig" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteDeploymentConfig where
toJSON DeleteDeploymentConfig'{..}
= object
(catMaybes
[Just
("deploymentConfigName" .=
_ddcDeploymentConfigName)])
instance ToPath DeleteDeploymentConfig where
toPath = const "/"
instance ToQuery DeleteDeploymentConfig where
toQuery = const mempty
data DeleteDeploymentConfigResponse =
DeleteDeploymentConfigResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteDeploymentConfigResponse
:: DeleteDeploymentConfigResponse
deleteDeploymentConfigResponse = DeleteDeploymentConfigResponse'
instance NFData DeleteDeploymentConfigResponse where