{-# 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.MediaStore.DeleteCORSPolicy
(
deleteCORSPolicy
, DeleteCORSPolicy
, dcpContainerName
, deleteCORSPolicyResponse
, DeleteCORSPolicyResponse
, dcorsprsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.MediaStore.Types
import Network.AWS.MediaStore.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteCORSPolicy = DeleteCORSPolicy'
{ _dcpContainerName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteCORSPolicy
:: Text
-> DeleteCORSPolicy
deleteCORSPolicy pContainerName_ =
DeleteCORSPolicy' {_dcpContainerName = pContainerName_}
dcpContainerName :: Lens' DeleteCORSPolicy Text
dcpContainerName = lens _dcpContainerName (\ s a -> s{_dcpContainerName = a})
instance AWSRequest DeleteCORSPolicy where
type Rs DeleteCORSPolicy = DeleteCORSPolicyResponse
request = postJSON mediaStore
response
= receiveEmpty
(\ s h x ->
DeleteCORSPolicyResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteCORSPolicy where
instance NFData DeleteCORSPolicy where
instance ToHeaders DeleteCORSPolicy where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("MediaStore_20170901.DeleteCorsPolicy" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteCORSPolicy where
toJSON DeleteCORSPolicy'{..}
= object
(catMaybes
[Just ("ContainerName" .= _dcpContainerName)])
instance ToPath DeleteCORSPolicy where
toPath = const "/"
instance ToQuery DeleteCORSPolicy where
toQuery = const mempty
newtype DeleteCORSPolicyResponse = DeleteCORSPolicyResponse'
{ _dcorsprsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteCORSPolicyResponse
:: Int
-> DeleteCORSPolicyResponse
deleteCORSPolicyResponse pResponseStatus_ =
DeleteCORSPolicyResponse' {_dcorsprsResponseStatus = pResponseStatus_}
dcorsprsResponseStatus :: Lens' DeleteCORSPolicyResponse Int
dcorsprsResponseStatus = lens _dcorsprsResponseStatus (\ s a -> s{_dcorsprsResponseStatus = a})
instance NFData DeleteCORSPolicyResponse where