{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
module Aws.Iam.Commands.UpdateGroup
( UpdateGroup(..)
, UpdateGroupResponse(..)
) where
import Aws.Core
import Aws.Iam.Core
import Aws.Iam.Internal
import Control.Applicative
import Data.Text (Text)
import Data.Typeable
import Prelude
data UpdateGroup
= UpdateGroup {
ugGroupName :: Text
, ugNewGroupName :: Maybe Text
, ugNewPath :: Maybe Text
}
deriving (Eq, Ord, Show, Typeable)
instance SignQuery UpdateGroup where
type ServiceConfiguration UpdateGroup = IamConfiguration
signQuery UpdateGroup{..}
= iamAction' "UpdateGroup" [
Just ("GroupName", ugGroupName)
, ("NewGroupName",) <$> ugNewGroupName
, ("NewPath",) <$> ugNewPath
]
data UpdateGroupResponse = UpdateGroupResponse
deriving (Eq, Ord, Show, Typeable)
instance ResponseConsumer UpdateGroup UpdateGroupResponse where
type ResponseMetadata UpdateGroupResponse = IamMetadata
responseConsumer _ _
= iamResponseConsumer (const $ return UpdateGroupResponse)
instance Transaction UpdateGroup UpdateGroupResponse
instance AsMemoryResponse UpdateGroupResponse where
type MemoryResponse UpdateGroupResponse = UpdateGroupResponse
loadToMemory = return