amazonka-gamelift-1.4.3: gen/Network/AWS/GameLift/DeleteAlias.hs
{-# 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 #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.GameLift.DeleteAlias
-- Copyright : (c) 2013-2016 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes an alias. This action removes all record of the alias; game clients attempting to access a game server using the deleted alias receive an error. To delete an alias, specify the alias ID to be deleted.
module Network.AWS.GameLift.DeleteAlias
(
-- * Creating a Request
deleteAlias
, DeleteAlias
-- * Request Lenses
, daAliasId
-- * Destructuring the Response
, deleteAliasResponse
, DeleteAliasResponse
) 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
-- | Represents the input for a request action.
--
-- /See:/ 'deleteAlias' smart constructor.
newtype DeleteAlias = DeleteAlias'
{ _daAliasId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
-- | Creates a value of 'DeleteAlias' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'daAliasId'
deleteAlias
:: Text -- ^ 'daAliasId'
-> DeleteAlias
deleteAlias pAliasId_ =
DeleteAlias'
{ _daAliasId = pAliasId_
}
-- | Unique identifier for a fleet alias. Specify the alias you want to delete.
daAliasId :: Lens' DeleteAlias Text
daAliasId = lens _daAliasId (\ s a -> s{_daAliasId = a});
instance AWSRequest DeleteAlias where
type Rs DeleteAlias = DeleteAliasResponse
request = postJSON gameLift
response = receiveNull DeleteAliasResponse'
instance Hashable DeleteAlias
instance NFData DeleteAlias
instance ToHeaders DeleteAlias where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("GameLift.DeleteAlias" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteAlias where
toJSON DeleteAlias'{..}
= object (catMaybes [Just ("AliasId" .= _daAliasId)])
instance ToPath DeleteAlias where
toPath = const "/"
instance ToQuery DeleteAlias where
toQuery = const mempty
-- | /See:/ 'deleteAliasResponse' smart constructor.
data DeleteAliasResponse =
DeleteAliasResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
-- | Creates a value of 'DeleteAliasResponse' with the minimum fields required to make a request.
--
deleteAliasResponse
:: DeleteAliasResponse
deleteAliasResponse = DeleteAliasResponse'
instance NFData DeleteAliasResponse