module Network.AWS.CloudFront.GetCloudFrontOriginAccessIdentityConfig
(
getCloudFrontOriginAccessIdentityConfig
, GetCloudFrontOriginAccessIdentityConfig
, gcfoaicId
, getCloudFrontOriginAccessIdentityConfigResponse
, GetCloudFrontOriginAccessIdentityConfigResponse
, gcfoaicrsCloudFrontOriginAccessIdentityConfig
, gcfoaicrsETag
, gcfoaicrsResponseStatus
) where
import Network.AWS.CloudFront.Types
import Network.AWS.CloudFront.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype GetCloudFrontOriginAccessIdentityConfig = GetCloudFrontOriginAccessIdentityConfig'
{ _gcfoaicId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getCloudFrontOriginAccessIdentityConfig
:: Text
-> GetCloudFrontOriginAccessIdentityConfig
getCloudFrontOriginAccessIdentityConfig pId_ =
GetCloudFrontOriginAccessIdentityConfig'
{ _gcfoaicId = pId_
}
gcfoaicId :: Lens' GetCloudFrontOriginAccessIdentityConfig Text
gcfoaicId = lens _gcfoaicId (\ s a -> s{_gcfoaicId = a});
instance AWSRequest
GetCloudFrontOriginAccessIdentityConfig where
type Rs GetCloudFrontOriginAccessIdentityConfig =
GetCloudFrontOriginAccessIdentityConfigResponse
request = get cloudFront
response
= receiveXML
(\ s h x ->
GetCloudFrontOriginAccessIdentityConfigResponse' <$>
(parseXML x) <*> (h .#? "ETag") <*>
(pure (fromEnum s)))
instance ToHeaders
GetCloudFrontOriginAccessIdentityConfig where
toHeaders = const mempty
instance ToPath
GetCloudFrontOriginAccessIdentityConfig where
toPath GetCloudFrontOriginAccessIdentityConfig'{..}
= mconcat
["/2015-04-17/origin-access-identity/cloudfront/",
toBS _gcfoaicId, "/config"]
instance ToQuery
GetCloudFrontOriginAccessIdentityConfig where
toQuery = const mempty
data GetCloudFrontOriginAccessIdentityConfigResponse = GetCloudFrontOriginAccessIdentityConfigResponse'
{ _gcfoaicrsCloudFrontOriginAccessIdentityConfig :: !(Maybe CloudFrontOriginAccessIdentityConfig)
, _gcfoaicrsETag :: !(Maybe Text)
, _gcfoaicrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getCloudFrontOriginAccessIdentityConfigResponse
:: Int
-> GetCloudFrontOriginAccessIdentityConfigResponse
getCloudFrontOriginAccessIdentityConfigResponse pResponseStatus_ =
GetCloudFrontOriginAccessIdentityConfigResponse'
{ _gcfoaicrsCloudFrontOriginAccessIdentityConfig = Nothing
, _gcfoaicrsETag = Nothing
, _gcfoaicrsResponseStatus = pResponseStatus_
}
gcfoaicrsCloudFrontOriginAccessIdentityConfig :: Lens' GetCloudFrontOriginAccessIdentityConfigResponse (Maybe CloudFrontOriginAccessIdentityConfig)
gcfoaicrsCloudFrontOriginAccessIdentityConfig = lens _gcfoaicrsCloudFrontOriginAccessIdentityConfig (\ s a -> s{_gcfoaicrsCloudFrontOriginAccessIdentityConfig = a});
gcfoaicrsETag :: Lens' GetCloudFrontOriginAccessIdentityConfigResponse (Maybe Text)
gcfoaicrsETag = lens _gcfoaicrsETag (\ s a -> s{_gcfoaicrsETag = a});
gcfoaicrsResponseStatus :: Lens' GetCloudFrontOriginAccessIdentityConfigResponse Int
gcfoaicrsResponseStatus = lens _gcfoaicrsResponseStatus (\ s a -> s{_gcfoaicrsResponseStatus = a});