module Network.AWS.CloudFront.GetCloudFrontOriginAccessIdentityConfig
(
GetCloudFrontOriginAccessIdentityConfig
, getCloudFrontOriginAccessIdentityConfig
, gcfoaicId
, GetCloudFrontOriginAccessIdentityConfigResponse
, getCloudFrontOriginAccessIdentityConfigResponse
, gcfoaicrCloudFrontOriginAccessIdentityConfig
, gcfoaicrETag
) where
import Network.AWS.Prelude
import Network.AWS.Request.RestXML
import Network.AWS.CloudFront.Types
import qualified GHC.Exts
newtype GetCloudFrontOriginAccessIdentityConfig = GetCloudFrontOriginAccessIdentityConfig
{ _gcfoaicId :: Text
} deriving (Eq, Ord, Read, Show, Monoid, IsString)
getCloudFrontOriginAccessIdentityConfig :: Text
-> GetCloudFrontOriginAccessIdentityConfig
getCloudFrontOriginAccessIdentityConfig p1 = GetCloudFrontOriginAccessIdentityConfig
{ _gcfoaicId = p1
}
gcfoaicId :: Lens' GetCloudFrontOriginAccessIdentityConfig Text
gcfoaicId = lens _gcfoaicId (\s a -> s { _gcfoaicId = a })
data GetCloudFrontOriginAccessIdentityConfigResponse = GetCloudFrontOriginAccessIdentityConfigResponse
{ _gcfoaicrCloudFrontOriginAccessIdentityConfig :: Maybe CloudFrontOriginAccessIdentityConfig
, _gcfoaicrETag :: Maybe Text
} deriving (Eq, Read, Show)
getCloudFrontOriginAccessIdentityConfigResponse :: GetCloudFrontOriginAccessIdentityConfigResponse
getCloudFrontOriginAccessIdentityConfigResponse = GetCloudFrontOriginAccessIdentityConfigResponse
{ _gcfoaicrCloudFrontOriginAccessIdentityConfig = Nothing
, _gcfoaicrETag = Nothing
}
gcfoaicrCloudFrontOriginAccessIdentityConfig :: Lens' GetCloudFrontOriginAccessIdentityConfigResponse (Maybe CloudFrontOriginAccessIdentityConfig)
gcfoaicrCloudFrontOriginAccessIdentityConfig =
lens _gcfoaicrCloudFrontOriginAccessIdentityConfig
(\s a -> s { _gcfoaicrCloudFrontOriginAccessIdentityConfig = a })
gcfoaicrETag :: Lens' GetCloudFrontOriginAccessIdentityConfigResponse (Maybe Text)
gcfoaicrETag = lens _gcfoaicrETag (\s a -> s { _gcfoaicrETag = a })
instance ToPath GetCloudFrontOriginAccessIdentityConfig where
toPath GetCloudFrontOriginAccessIdentityConfig{..} = mconcat
[ "/2014-11-06/origin-access-identity/cloudfront/"
, toText _gcfoaicId
, "/config"
]
instance ToQuery GetCloudFrontOriginAccessIdentityConfig where
toQuery = const mempty
instance ToHeaders GetCloudFrontOriginAccessIdentityConfig
instance ToXMLRoot GetCloudFrontOriginAccessIdentityConfig where
toXMLRoot = const (namespaced ns "GetCloudFrontOriginAccessIdentityConfig" [])
instance ToXML GetCloudFrontOriginAccessIdentityConfig
instance AWSRequest GetCloudFrontOriginAccessIdentityConfig where
type Sv GetCloudFrontOriginAccessIdentityConfig = CloudFront
type Rs GetCloudFrontOriginAccessIdentityConfig = GetCloudFrontOriginAccessIdentityConfigResponse
request = get
response = xmlHeaderResponse $ \h x -> GetCloudFrontOriginAccessIdentityConfigResponse
<$> x .@? "CloudFrontOriginAccessIdentityConfig"
<*> h ~:? "ETag"