module Network.AWS.EC2.CreatePlacementGroup
(
CreatePlacementGroup
, createPlacementGroup
, cpgDryRun
, cpgGroupName
, cpgStrategy
, CreatePlacementGroupResponse
, createPlacementGroupResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data CreatePlacementGroup = CreatePlacementGroup
{ _cpgDryRun :: Maybe Bool
, _cpgGroupName :: Text
, _cpgStrategy :: PlacementStrategy
} deriving (Eq, Show)
createPlacementGroup :: Text
-> PlacementStrategy
-> CreatePlacementGroup
createPlacementGroup p1 p2 = CreatePlacementGroup
{ _cpgGroupName = p1
, _cpgStrategy = p2
, _cpgDryRun = Nothing
}
cpgDryRun :: Lens' CreatePlacementGroup (Maybe Bool)
cpgDryRun = lens _cpgDryRun (\s a -> s { _cpgDryRun = a })
cpgGroupName :: Lens' CreatePlacementGroup Text
cpgGroupName = lens _cpgGroupName (\s a -> s { _cpgGroupName = a })
cpgStrategy :: Lens' CreatePlacementGroup PlacementStrategy
cpgStrategy = lens _cpgStrategy (\s a -> s { _cpgStrategy = a })
data CreatePlacementGroupResponse = CreatePlacementGroupResponse
deriving (Eq, Ord, Show, Generic)
createPlacementGroupResponse :: CreatePlacementGroupResponse
createPlacementGroupResponse = CreatePlacementGroupResponse
instance ToPath CreatePlacementGroup where
toPath = const "/"
instance ToQuery CreatePlacementGroup where
toQuery CreatePlacementGroup{..} = mconcat
[ "dryRun" =? _cpgDryRun
, "groupName" =? _cpgGroupName
, "strategy" =? _cpgStrategy
]
instance ToHeaders CreatePlacementGroup
instance AWSRequest CreatePlacementGroup where
type Sv CreatePlacementGroup = EC2
type Rs CreatePlacementGroup = CreatePlacementGroupResponse
request = post "CreatePlacementGroup"
response = nullResponse CreatePlacementGroupResponse