module Network.AWS.CloudFront.GetCloudFrontOriginAccessIdentity
(
getCloudFrontOriginAccessIdentity
, GetCloudFrontOriginAccessIdentity
, gcfoaiId
, getCloudFrontOriginAccessIdentityResponse
, GetCloudFrontOriginAccessIdentityResponse
, gcfoairsETag
, gcfoairsCloudFrontOriginAccessIdentity
, gcfoairsResponseStatus
) 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
newtype GetCloudFrontOriginAccessIdentity = GetCloudFrontOriginAccessIdentity'
{ _gcfoaiId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getCloudFrontOriginAccessIdentity
:: Text
-> GetCloudFrontOriginAccessIdentity
getCloudFrontOriginAccessIdentity pId_ =
GetCloudFrontOriginAccessIdentity'
{ _gcfoaiId = pId_
}
gcfoaiId :: Lens' GetCloudFrontOriginAccessIdentity Text
gcfoaiId = lens _gcfoaiId (\ s a -> s{_gcfoaiId = a});
instance AWSRequest GetCloudFrontOriginAccessIdentity
where
type Rs GetCloudFrontOriginAccessIdentity =
GetCloudFrontOriginAccessIdentityResponse
request = get cloudFront
response
= receiveXML
(\ s h x ->
GetCloudFrontOriginAccessIdentityResponse' <$>
(h .#? "ETag") <*> (parseXML x) <*>
(pure (fromEnum s)))
instance Hashable GetCloudFrontOriginAccessIdentity
instance ToHeaders GetCloudFrontOriginAccessIdentity
where
toHeaders = const mempty
instance ToPath GetCloudFrontOriginAccessIdentity
where
toPath GetCloudFrontOriginAccessIdentity'{..}
= mconcat
["/2016-01-28/origin-access-identity/cloudfront/",
toBS _gcfoaiId]
instance ToQuery GetCloudFrontOriginAccessIdentity
where
toQuery = const mempty
data GetCloudFrontOriginAccessIdentityResponse = GetCloudFrontOriginAccessIdentityResponse'
{ _gcfoairsETag :: !(Maybe Text)
, _gcfoairsCloudFrontOriginAccessIdentity :: !(Maybe CloudFrontOriginAccessIdentity)
, _gcfoairsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getCloudFrontOriginAccessIdentityResponse
:: Int
-> GetCloudFrontOriginAccessIdentityResponse
getCloudFrontOriginAccessIdentityResponse pResponseStatus_ =
GetCloudFrontOriginAccessIdentityResponse'
{ _gcfoairsETag = Nothing
, _gcfoairsCloudFrontOriginAccessIdentity = Nothing
, _gcfoairsResponseStatus = pResponseStatus_
}
gcfoairsETag :: Lens' GetCloudFrontOriginAccessIdentityResponse (Maybe Text)
gcfoairsETag = lens _gcfoairsETag (\ s a -> s{_gcfoairsETag = a});
gcfoairsCloudFrontOriginAccessIdentity :: Lens' GetCloudFrontOriginAccessIdentityResponse (Maybe CloudFrontOriginAccessIdentity)
gcfoairsCloudFrontOriginAccessIdentity = lens _gcfoairsCloudFrontOriginAccessIdentity (\ s a -> s{_gcfoairsCloudFrontOriginAccessIdentity = a});
gcfoairsResponseStatus :: Lens' GetCloudFrontOriginAccessIdentityResponse Int
gcfoairsResponseStatus = lens _gcfoairsResponseStatus (\ s a -> s{_gcfoairsResponseStatus = a});