{-# 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.FMS.DeletePolicy
(
deletePolicy
, DeletePolicy
, dpPolicyId
, deletePolicyResponse
, DeletePolicyResponse
) where
import Network.AWS.FMS.Types
import Network.AWS.FMS.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeletePolicy = DeletePolicy'
{ _dpPolicyId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deletePolicy
:: Text
-> DeletePolicy
deletePolicy pPolicyId_ = DeletePolicy' {_dpPolicyId = pPolicyId_}
dpPolicyId :: Lens' DeletePolicy Text
dpPolicyId = lens _dpPolicyId (\ s a -> s{_dpPolicyId = a})
instance AWSRequest DeletePolicy where
type Rs DeletePolicy = DeletePolicyResponse
request = postJSON fms
response = receiveNull DeletePolicyResponse'
instance Hashable DeletePolicy where
instance NFData DeletePolicy where
instance ToHeaders DeletePolicy where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSFMS_20180101.DeletePolicy" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeletePolicy where
toJSON DeletePolicy'{..}
= object
(catMaybes [Just ("PolicyId" .= _dpPolicyId)])
instance ToPath DeletePolicy where
toPath = const "/"
instance ToQuery DeletePolicy where
toQuery = const mempty
data DeletePolicyResponse =
DeletePolicyResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deletePolicyResponse
:: DeletePolicyResponse
deletePolicyResponse = DeletePolicyResponse'
instance NFData DeletePolicyResponse where