{-# 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.DeleteSecurityGroup
(
deleteSecurityGroup
, DeleteSecurityGroup
, dsgGroupId
, dsgGroupName
, dsgDryRun
, deleteSecurityGroupResponse
, DeleteSecurityGroupResponse
) 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 DeleteSecurityGroup = DeleteSecurityGroup'
{ _dsgGroupId :: !(Maybe Text)
, _dsgGroupName :: !(Maybe Text)
, _dsgDryRun :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSecurityGroup
:: DeleteSecurityGroup
deleteSecurityGroup =
DeleteSecurityGroup'
{_dsgGroupId = Nothing, _dsgGroupName = Nothing, _dsgDryRun = Nothing}
dsgGroupId :: Lens' DeleteSecurityGroup (Maybe Text)
dsgGroupId = lens _dsgGroupId (\ s a -> s{_dsgGroupId = a})
dsgGroupName :: Lens' DeleteSecurityGroup (Maybe Text)
dsgGroupName = lens _dsgGroupName (\ s a -> s{_dsgGroupName = a})
dsgDryRun :: Lens' DeleteSecurityGroup (Maybe Bool)
dsgDryRun = lens _dsgDryRun (\ s a -> s{_dsgDryRun = a})
instance AWSRequest DeleteSecurityGroup where
type Rs DeleteSecurityGroup =
DeleteSecurityGroupResponse
request = postQuery ec2
response = receiveNull DeleteSecurityGroupResponse'
instance Hashable DeleteSecurityGroup where
instance NFData DeleteSecurityGroup where
instance ToHeaders DeleteSecurityGroup where
toHeaders = const mempty
instance ToPath DeleteSecurityGroup where
toPath = const "/"
instance ToQuery DeleteSecurityGroup where
toQuery DeleteSecurityGroup'{..}
= mconcat
["Action" =: ("DeleteSecurityGroup" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"GroupId" =: _dsgGroupId,
"GroupName" =: _dsgGroupName, "DryRun" =: _dsgDryRun]
data DeleteSecurityGroupResponse =
DeleteSecurityGroupResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteSecurityGroupResponse
:: DeleteSecurityGroupResponse
deleteSecurityGroupResponse = DeleteSecurityGroupResponse'
instance NFData DeleteSecurityGroupResponse where