module Network.AWS.EC2.ModifyImageAttribute
(
ModifyImageAttribute
, modifyImageAttribute
, miaAttribute
, miaDescription
, miaDryRun
, miaImageId
, miaLaunchPermission
, miaOperationType
, miaProductCodes
, miaUserGroups
, miaUserIds
, miaValue
, ModifyImageAttributeResponse
, modifyImageAttributeResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data ModifyImageAttribute = ModifyImageAttribute
{ _miaAttribute :: Maybe Text
, _miaDescription :: Maybe AttributeValue
, _miaDryRun :: Maybe Bool
, _miaImageId :: Text
, _miaLaunchPermission :: Maybe LaunchPermissionModifications
, _miaOperationType :: Maybe Text
, _miaProductCodes :: List "ProductCode" Text
, _miaUserGroups :: List "UserGroup" Text
, _miaUserIds :: List "UserId" Text
, _miaValue :: Maybe Text
} deriving (Eq, Show)
modifyImageAttribute :: Text
-> ModifyImageAttribute
modifyImageAttribute p1 = ModifyImageAttribute
{ _miaImageId = p1
, _miaDryRun = Nothing
, _miaAttribute = Nothing
, _miaOperationType = Nothing
, _miaUserIds = mempty
, _miaUserGroups = mempty
, _miaProductCodes = mempty
, _miaValue = Nothing
, _miaLaunchPermission = Nothing
, _miaDescription = Nothing
}
miaAttribute :: Lens' ModifyImageAttribute (Maybe Text)
miaAttribute = lens _miaAttribute (\s a -> s { _miaAttribute = a })
miaDescription :: Lens' ModifyImageAttribute (Maybe AttributeValue)
miaDescription = lens _miaDescription (\s a -> s { _miaDescription = a })
miaDryRun :: Lens' ModifyImageAttribute (Maybe Bool)
miaDryRun = lens _miaDryRun (\s a -> s { _miaDryRun = a })
miaImageId :: Lens' ModifyImageAttribute Text
miaImageId = lens _miaImageId (\s a -> s { _miaImageId = a })
miaLaunchPermission :: Lens' ModifyImageAttribute (Maybe LaunchPermissionModifications)
miaLaunchPermission =
lens _miaLaunchPermission (\s a -> s { _miaLaunchPermission = a })
miaOperationType :: Lens' ModifyImageAttribute (Maybe Text)
miaOperationType = lens _miaOperationType (\s a -> s { _miaOperationType = a })
miaProductCodes :: Lens' ModifyImageAttribute [Text]
miaProductCodes = lens _miaProductCodes (\s a -> s { _miaProductCodes = a }) . _List
miaUserGroups :: Lens' ModifyImageAttribute [Text]
miaUserGroups = lens _miaUserGroups (\s a -> s { _miaUserGroups = a }) . _List
miaUserIds :: Lens' ModifyImageAttribute [Text]
miaUserIds = lens _miaUserIds (\s a -> s { _miaUserIds = a }) . _List
miaValue :: Lens' ModifyImageAttribute (Maybe Text)
miaValue = lens _miaValue (\s a -> s { _miaValue = a })
data ModifyImageAttributeResponse = ModifyImageAttributeResponse
deriving (Eq, Ord, Show, Generic)
modifyImageAttributeResponse :: ModifyImageAttributeResponse
modifyImageAttributeResponse = ModifyImageAttributeResponse
instance ToPath ModifyImageAttribute where
toPath = const "/"
instance ToQuery ModifyImageAttribute where
toQuery ModifyImageAttribute{..} = mconcat
[ "Attribute" =? _miaAttribute
, "Description" =? _miaDescription
, "dryRun" =? _miaDryRun
, "ImageId" =? _miaImageId
, "LaunchPermission" =? _miaLaunchPermission
, "OperationType" =? _miaOperationType
, "ProductCode" `toQueryList` _miaProductCodes
, "UserGroup" `toQueryList` _miaUserGroups
, "UserId" `toQueryList` _miaUserIds
, "Value" =? _miaValue
]
instance ToHeaders ModifyImageAttribute
instance AWSRequest ModifyImageAttribute where
type Sv ModifyImageAttribute = EC2
type Rs ModifyImageAttribute = ModifyImageAttributeResponse
request = post "ModifyImageAttribute"
response = nullResponse ModifyImageAttributeResponse