{-# 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.IAM.CreateAccountAlias
(
createAccountAlias
, CreateAccountAlias
, caaAccountAlias
, createAccountAliasResponse
, CreateAccountAliasResponse
) where
import Network.AWS.IAM.Types
import Network.AWS.IAM.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype CreateAccountAlias = CreateAccountAlias'
{ _caaAccountAlias :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createAccountAlias
:: Text
-> CreateAccountAlias
createAccountAlias pAccountAlias_ =
CreateAccountAlias' {_caaAccountAlias = pAccountAlias_}
caaAccountAlias :: Lens' CreateAccountAlias Text
caaAccountAlias = lens _caaAccountAlias (\ s a -> s{_caaAccountAlias = a})
instance AWSRequest CreateAccountAlias where
type Rs CreateAccountAlias =
CreateAccountAliasResponse
request = postQuery iam
response = receiveNull CreateAccountAliasResponse'
instance Hashable CreateAccountAlias where
instance NFData CreateAccountAlias where
instance ToHeaders CreateAccountAlias where
toHeaders = const mempty
instance ToPath CreateAccountAlias where
toPath = const "/"
instance ToQuery CreateAccountAlias where
toQuery CreateAccountAlias'{..}
= mconcat
["Action" =: ("CreateAccountAlias" :: ByteString),
"Version" =: ("2010-05-08" :: ByteString),
"AccountAlias" =: _caaAccountAlias]
data CreateAccountAliasResponse =
CreateAccountAliasResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
createAccountAliasResponse
:: CreateAccountAliasResponse
createAccountAliasResponse = CreateAccountAliasResponse'
instance NFData CreateAccountAliasResponse where