{-# 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.GameLift.DeleteScalingPolicy
(
deleteScalingPolicy
, DeleteScalingPolicy
, dspName
, dspFleetId
, deleteScalingPolicyResponse
, DeleteScalingPolicyResponse
) where
import Network.AWS.GameLift.Types
import Network.AWS.GameLift.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteScalingPolicy = DeleteScalingPolicy'
{ _dspName :: !Text
, _dspFleetId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteScalingPolicy
:: Text
-> Text
-> DeleteScalingPolicy
deleteScalingPolicy pName_ pFleetId_ =
DeleteScalingPolicy'
{ _dspName = pName_
, _dspFleetId = pFleetId_
}
dspName :: Lens' DeleteScalingPolicy Text
dspName = lens _dspName (\ s a -> s{_dspName = a});
dspFleetId :: Lens' DeleteScalingPolicy Text
dspFleetId = lens _dspFleetId (\ s a -> s{_dspFleetId = a});
instance AWSRequest DeleteScalingPolicy where
type Rs DeleteScalingPolicy =
DeleteScalingPolicyResponse
request = postJSON gameLift
response = receiveNull DeleteScalingPolicyResponse'
instance Hashable DeleteScalingPolicy
instance NFData DeleteScalingPolicy
instance ToHeaders DeleteScalingPolicy where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("GameLift.DeleteScalingPolicy" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteScalingPolicy where
toJSON DeleteScalingPolicy'{..}
= object
(catMaybes
[Just ("Name" .= _dspName),
Just ("FleetId" .= _dspFleetId)])
instance ToPath DeleteScalingPolicy where
toPath = const "/"
instance ToQuery DeleteScalingPolicy where
toQuery = const mempty
data DeleteScalingPolicyResponse =
DeleteScalingPolicyResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteScalingPolicyResponse
:: DeleteScalingPolicyResponse
deleteScalingPolicyResponse = DeleteScalingPolicyResponse'
instance NFData DeleteScalingPolicyResponse