module Network.AWS.Redshift.RotateEncryptionKey
(
RotateEncryptionKey
, rotateEncryptionKey
, rekClusterIdentifier
, RotateEncryptionKeyResponse
, rotateEncryptionKeyResponse
, rekrCluster
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.Redshift.Types
import qualified GHC.Exts
newtype RotateEncryptionKey = RotateEncryptionKey
{ _rekClusterIdentifier :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
rotateEncryptionKey :: Text
-> RotateEncryptionKey
rotateEncryptionKey p1 = RotateEncryptionKey
{ _rekClusterIdentifier = p1
}
rekClusterIdentifier :: Lens' RotateEncryptionKey Text
rekClusterIdentifier =
lens _rekClusterIdentifier (\s a -> s { _rekClusterIdentifier = a })
newtype RotateEncryptionKeyResponse = RotateEncryptionKeyResponse
{ _rekrCluster :: Maybe Cluster
} deriving (Eq, Show)
rotateEncryptionKeyResponse :: RotateEncryptionKeyResponse
rotateEncryptionKeyResponse = RotateEncryptionKeyResponse
{ _rekrCluster = Nothing
}
rekrCluster :: Lens' RotateEncryptionKeyResponse (Maybe Cluster)
rekrCluster = lens _rekrCluster (\s a -> s { _rekrCluster = a })
instance ToPath RotateEncryptionKey where
toPath = const "/"
instance ToQuery RotateEncryptionKey where
toQuery RotateEncryptionKey{..} = mconcat
[ "ClusterIdentifier" =? _rekClusterIdentifier
]
instance ToHeaders RotateEncryptionKey
instance AWSRequest RotateEncryptionKey where
type Sv RotateEncryptionKey = Redshift
type Rs RotateEncryptionKey = RotateEncryptionKeyResponse
request = post "RotateEncryptionKey"
response = xmlResponse
instance FromXML RotateEncryptionKeyResponse where
parseXML = withElement "RotateEncryptionKeyResult" $ \x -> RotateEncryptionKeyResponse
<$> x .@? "Cluster"