{-# 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.XRay.GetEncryptionConfig
(
getEncryptionConfig
, GetEncryptionConfig
, getEncryptionConfigResponse
, GetEncryptionConfigResponse
, gecrsEncryptionConfig
, gecrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.XRay.Types
import Network.AWS.XRay.Types.Product
data GetEncryptionConfig =
GetEncryptionConfig'
deriving (Eq, Read, Show, Data, Typeable, Generic)
getEncryptionConfig
:: GetEncryptionConfig
getEncryptionConfig = GetEncryptionConfig'
instance AWSRequest GetEncryptionConfig where
type Rs GetEncryptionConfig =
GetEncryptionConfigResponse
request = postJSON xRay
response
= receiveJSON
(\ s h x ->
GetEncryptionConfigResponse' <$>
(x .?> "EncryptionConfig") <*> (pure (fromEnum s)))
instance Hashable GetEncryptionConfig where
instance NFData GetEncryptionConfig where
instance ToHeaders GetEncryptionConfig where
toHeaders = const mempty
instance ToJSON GetEncryptionConfig where
toJSON = const (Object mempty)
instance ToPath GetEncryptionConfig where
toPath = const "/EncryptionConfig"
instance ToQuery GetEncryptionConfig where
toQuery = const mempty
data GetEncryptionConfigResponse = GetEncryptionConfigResponse'
{ _gecrsEncryptionConfig :: !(Maybe EncryptionConfig)
, _gecrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getEncryptionConfigResponse
:: Int
-> GetEncryptionConfigResponse
getEncryptionConfigResponse pResponseStatus_ =
GetEncryptionConfigResponse'
{_gecrsEncryptionConfig = Nothing, _gecrsResponseStatus = pResponseStatus_}
gecrsEncryptionConfig :: Lens' GetEncryptionConfigResponse (Maybe EncryptionConfig)
gecrsEncryptionConfig = lens _gecrsEncryptionConfig (\ s a -> s{_gecrsEncryptionConfig = a})
gecrsResponseStatus :: Lens' GetEncryptionConfigResponse Int
gecrsResponseStatus = lens _gecrsResponseStatus (\ s a -> s{_gecrsResponseStatus = a})
instance NFData GetEncryptionConfigResponse where