{-# 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.CloudFront.DeleteCloudFrontOriginAccessIdentity
(
deleteCloudFrontOriginAccessIdentity
, DeleteCloudFrontOriginAccessIdentity
, dcfoaiIfMatch
, dcfoaiId
, deleteCloudFrontOriginAccessIdentityResponse
, DeleteCloudFrontOriginAccessIdentityResponse
) where
import Network.AWS.CloudFront.Types
import Network.AWS.CloudFront.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteCloudFrontOriginAccessIdentity = DeleteCloudFrontOriginAccessIdentity'
{ _dcfoaiIfMatch :: !(Maybe Text)
, _dcfoaiId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteCloudFrontOriginAccessIdentity
:: Text
-> DeleteCloudFrontOriginAccessIdentity
deleteCloudFrontOriginAccessIdentity pId_ =
DeleteCloudFrontOriginAccessIdentity'
{_dcfoaiIfMatch = Nothing, _dcfoaiId = pId_}
dcfoaiIfMatch :: Lens' DeleteCloudFrontOriginAccessIdentity (Maybe Text)
dcfoaiIfMatch = lens _dcfoaiIfMatch (\ s a -> s{_dcfoaiIfMatch = a})
dcfoaiId :: Lens' DeleteCloudFrontOriginAccessIdentity Text
dcfoaiId = lens _dcfoaiId (\ s a -> s{_dcfoaiId = a})
instance AWSRequest
DeleteCloudFrontOriginAccessIdentity
where
type Rs DeleteCloudFrontOriginAccessIdentity =
DeleteCloudFrontOriginAccessIdentityResponse
request = delete cloudFront
response
= receiveNull
DeleteCloudFrontOriginAccessIdentityResponse'
instance Hashable
DeleteCloudFrontOriginAccessIdentity
where
instance NFData DeleteCloudFrontOriginAccessIdentity
where
instance ToHeaders
DeleteCloudFrontOriginAccessIdentity
where
toHeaders DeleteCloudFrontOriginAccessIdentity'{..}
= mconcat ["If-Match" =# _dcfoaiIfMatch]
instance ToPath DeleteCloudFrontOriginAccessIdentity
where
toPath DeleteCloudFrontOriginAccessIdentity'{..}
= mconcat
["/2017-10-30/origin-access-identity/cloudfront/",
toBS _dcfoaiId]
instance ToQuery DeleteCloudFrontOriginAccessIdentity
where
toQuery = const mempty
data DeleteCloudFrontOriginAccessIdentityResponse =
DeleteCloudFrontOriginAccessIdentityResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteCloudFrontOriginAccessIdentityResponse
:: DeleteCloudFrontOriginAccessIdentityResponse
deleteCloudFrontOriginAccessIdentityResponse =
DeleteCloudFrontOriginAccessIdentityResponse'
instance NFData
DeleteCloudFrontOriginAccessIdentityResponse
where