{-# 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.CreateFieldLevelEncryptionConfig
(
createFieldLevelEncryptionConfig
, CreateFieldLevelEncryptionConfig
, cflecFieldLevelEncryptionConfig
, createFieldLevelEncryptionConfigResponse
, CreateFieldLevelEncryptionConfigResponse
, cflecrsETag
, cflecrsLocation
, cflecrsFieldLevelEncryption
, cflecrsResponseStatus
) 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 CreateFieldLevelEncryptionConfig = CreateFieldLevelEncryptionConfig'
{ _cflecFieldLevelEncryptionConfig :: FieldLevelEncryptionConfig
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createFieldLevelEncryptionConfig
:: FieldLevelEncryptionConfig
-> CreateFieldLevelEncryptionConfig
createFieldLevelEncryptionConfig pFieldLevelEncryptionConfig_ =
CreateFieldLevelEncryptionConfig'
{_cflecFieldLevelEncryptionConfig = pFieldLevelEncryptionConfig_}
cflecFieldLevelEncryptionConfig :: Lens' CreateFieldLevelEncryptionConfig FieldLevelEncryptionConfig
cflecFieldLevelEncryptionConfig = lens _cflecFieldLevelEncryptionConfig (\ s a -> s{_cflecFieldLevelEncryptionConfig = a})
instance AWSRequest CreateFieldLevelEncryptionConfig
where
type Rs CreateFieldLevelEncryptionConfig =
CreateFieldLevelEncryptionConfigResponse
request = postXML cloudFront
response
= receiveXML
(\ s h x ->
CreateFieldLevelEncryptionConfigResponse' <$>
(h .#? "ETag") <*> (h .#? "Location") <*>
(parseXML x)
<*> (pure (fromEnum s)))
instance Hashable CreateFieldLevelEncryptionConfig
where
instance NFData CreateFieldLevelEncryptionConfig
where
instance ToElement CreateFieldLevelEncryptionConfig
where
toElement
= mkElement
"{http://cloudfront.amazonaws.com/doc/2017-10-30/}FieldLevelEncryptionConfig"
.
_cflecFieldLevelEncryptionConfig
instance ToHeaders CreateFieldLevelEncryptionConfig
where
toHeaders = const mempty
instance ToPath CreateFieldLevelEncryptionConfig
where
toPath = const "/2017-10-30/field-level-encryption"
instance ToQuery CreateFieldLevelEncryptionConfig
where
toQuery = const mempty
data CreateFieldLevelEncryptionConfigResponse = CreateFieldLevelEncryptionConfigResponse'
{ _cflecrsETag :: !(Maybe Text)
, _cflecrsLocation :: !(Maybe Text)
, _cflecrsFieldLevelEncryption :: !(Maybe FieldLevelEncryption)
, _cflecrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createFieldLevelEncryptionConfigResponse
:: Int
-> CreateFieldLevelEncryptionConfigResponse
createFieldLevelEncryptionConfigResponse pResponseStatus_ =
CreateFieldLevelEncryptionConfigResponse'
{ _cflecrsETag = Nothing
, _cflecrsLocation = Nothing
, _cflecrsFieldLevelEncryption = Nothing
, _cflecrsResponseStatus = pResponseStatus_
}
cflecrsETag :: Lens' CreateFieldLevelEncryptionConfigResponse (Maybe Text)
cflecrsETag = lens _cflecrsETag (\ s a -> s{_cflecrsETag = a})
cflecrsLocation :: Lens' CreateFieldLevelEncryptionConfigResponse (Maybe Text)
cflecrsLocation = lens _cflecrsLocation (\ s a -> s{_cflecrsLocation = a})
cflecrsFieldLevelEncryption :: Lens' CreateFieldLevelEncryptionConfigResponse (Maybe FieldLevelEncryption)
cflecrsFieldLevelEncryption = lens _cflecrsFieldLevelEncryption (\ s a -> s{_cflecrsFieldLevelEncryption = a})
cflecrsResponseStatus :: Lens' CreateFieldLevelEncryptionConfigResponse Int
cflecrsResponseStatus = lens _cflecrsResponseStatus (\ s a -> s{_cflecrsResponseStatus = a})
instance NFData
CreateFieldLevelEncryptionConfigResponse
where