{-# 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.EC2.ModifyFpgaImageAttribute
(
modifyFpgaImageAttribute
, ModifyFpgaImageAttribute
, mfiaAttribute
, mfiaUserIds
, mfiaUserGroups
, mfiaLoadPermission
, mfiaName
, mfiaOperationType
, mfiaProductCodes
, mfiaDescription
, mfiaDryRun
, mfiaFpgaImageId
, modifyFpgaImageAttributeResponse
, ModifyFpgaImageAttributeResponse
, mfiarsFpgaImageAttribute
, mfiarsResponseStatus
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data ModifyFpgaImageAttribute = ModifyFpgaImageAttribute'
{ _mfiaAttribute :: !(Maybe FpgaImageAttributeName)
, _mfiaUserIds :: !(Maybe [Text])
, _mfiaUserGroups :: !(Maybe [Text])
, _mfiaLoadPermission :: !(Maybe LoadPermissionModifications)
, _mfiaName :: !(Maybe Text)
, _mfiaOperationType :: !(Maybe OperationType)
, _mfiaProductCodes :: !(Maybe [Text])
, _mfiaDescription :: !(Maybe Text)
, _mfiaDryRun :: !(Maybe Bool)
, _mfiaFpgaImageId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifyFpgaImageAttribute
:: Text
-> ModifyFpgaImageAttribute
modifyFpgaImageAttribute pFpgaImageId_ =
ModifyFpgaImageAttribute'
{ _mfiaAttribute = Nothing
, _mfiaUserIds = Nothing
, _mfiaUserGroups = Nothing
, _mfiaLoadPermission = Nothing
, _mfiaName = Nothing
, _mfiaOperationType = Nothing
, _mfiaProductCodes = Nothing
, _mfiaDescription = Nothing
, _mfiaDryRun = Nothing
, _mfiaFpgaImageId = pFpgaImageId_
}
mfiaAttribute :: Lens' ModifyFpgaImageAttribute (Maybe FpgaImageAttributeName)
mfiaAttribute = lens _mfiaAttribute (\ s a -> s{_mfiaAttribute = a})
mfiaUserIds :: Lens' ModifyFpgaImageAttribute [Text]
mfiaUserIds = lens _mfiaUserIds (\ s a -> s{_mfiaUserIds = a}) . _Default . _Coerce
mfiaUserGroups :: Lens' ModifyFpgaImageAttribute [Text]
mfiaUserGroups = lens _mfiaUserGroups (\ s a -> s{_mfiaUserGroups = a}) . _Default . _Coerce
mfiaLoadPermission :: Lens' ModifyFpgaImageAttribute (Maybe LoadPermissionModifications)
mfiaLoadPermission = lens _mfiaLoadPermission (\ s a -> s{_mfiaLoadPermission = a})
mfiaName :: Lens' ModifyFpgaImageAttribute (Maybe Text)
mfiaName = lens _mfiaName (\ s a -> s{_mfiaName = a})
mfiaOperationType :: Lens' ModifyFpgaImageAttribute (Maybe OperationType)
mfiaOperationType = lens _mfiaOperationType (\ s a -> s{_mfiaOperationType = a})
mfiaProductCodes :: Lens' ModifyFpgaImageAttribute [Text]
mfiaProductCodes = lens _mfiaProductCodes (\ s a -> s{_mfiaProductCodes = a}) . _Default . _Coerce
mfiaDescription :: Lens' ModifyFpgaImageAttribute (Maybe Text)
mfiaDescription = lens _mfiaDescription (\ s a -> s{_mfiaDescription = a})
mfiaDryRun :: Lens' ModifyFpgaImageAttribute (Maybe Bool)
mfiaDryRun = lens _mfiaDryRun (\ s a -> s{_mfiaDryRun = a})
mfiaFpgaImageId :: Lens' ModifyFpgaImageAttribute Text
mfiaFpgaImageId = lens _mfiaFpgaImageId (\ s a -> s{_mfiaFpgaImageId = a})
instance AWSRequest ModifyFpgaImageAttribute where
type Rs ModifyFpgaImageAttribute =
ModifyFpgaImageAttributeResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
ModifyFpgaImageAttributeResponse' <$>
(x .@? "fpgaImageAttribute") <*> (pure (fromEnum s)))
instance Hashable ModifyFpgaImageAttribute where
instance NFData ModifyFpgaImageAttribute where
instance ToHeaders ModifyFpgaImageAttribute where
toHeaders = const mempty
instance ToPath ModifyFpgaImageAttribute where
toPath = const "/"
instance ToQuery ModifyFpgaImageAttribute where
toQuery ModifyFpgaImageAttribute'{..}
= mconcat
["Action" =:
("ModifyFpgaImageAttribute" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"Attribute" =: _mfiaAttribute,
toQuery (toQueryList "UserId" <$> _mfiaUserIds),
toQuery
(toQueryList "UserGroup" <$> _mfiaUserGroups),
"LoadPermission" =: _mfiaLoadPermission,
"Name" =: _mfiaName,
"OperationType" =: _mfiaOperationType,
toQuery
(toQueryList "ProductCode" <$> _mfiaProductCodes),
"Description" =: _mfiaDescription,
"DryRun" =: _mfiaDryRun,
"FpgaImageId" =: _mfiaFpgaImageId]
data ModifyFpgaImageAttributeResponse = ModifyFpgaImageAttributeResponse'
{ _mfiarsFpgaImageAttribute :: !(Maybe FpgaImageAttribute)
, _mfiarsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifyFpgaImageAttributeResponse
:: Int
-> ModifyFpgaImageAttributeResponse
modifyFpgaImageAttributeResponse pResponseStatus_ =
ModifyFpgaImageAttributeResponse'
{ _mfiarsFpgaImageAttribute = Nothing
, _mfiarsResponseStatus = pResponseStatus_
}
mfiarsFpgaImageAttribute :: Lens' ModifyFpgaImageAttributeResponse (Maybe FpgaImageAttribute)
mfiarsFpgaImageAttribute = lens _mfiarsFpgaImageAttribute (\ s a -> s{_mfiarsFpgaImageAttribute = a})
mfiarsResponseStatus :: Lens' ModifyFpgaImageAttributeResponse Int
mfiarsResponseStatus = lens _mfiarsResponseStatus (\ s a -> s{_mfiarsResponseStatus = a})
instance NFData ModifyFpgaImageAttributeResponse
where