{-# 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.Route53.DeleteVPCAssociationAuthorization
(
deleteVPCAssociationAuthorization
, DeleteVPCAssociationAuthorization
, dvaaHostedZoneId
, dvaaVPC
, deleteVPCAssociationAuthorizationResponse
, DeleteVPCAssociationAuthorizationResponse
, dvaarsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53.Types
import Network.AWS.Route53.Types.Product
data DeleteVPCAssociationAuthorization = DeleteVPCAssociationAuthorization'
{ _dvaaHostedZoneId :: !ResourceId
, _dvaaVPC :: !VPC
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCAssociationAuthorization
:: ResourceId
-> VPC
-> DeleteVPCAssociationAuthorization
deleteVPCAssociationAuthorization pHostedZoneId_ pVPC_ =
DeleteVPCAssociationAuthorization'
{_dvaaHostedZoneId = pHostedZoneId_, _dvaaVPC = pVPC_}
dvaaHostedZoneId :: Lens' DeleteVPCAssociationAuthorization ResourceId
dvaaHostedZoneId = lens _dvaaHostedZoneId (\ s a -> s{_dvaaHostedZoneId = a})
dvaaVPC :: Lens' DeleteVPCAssociationAuthorization VPC
dvaaVPC = lens _dvaaVPC (\ s a -> s{_dvaaVPC = a})
instance AWSRequest DeleteVPCAssociationAuthorization
where
type Rs DeleteVPCAssociationAuthorization =
DeleteVPCAssociationAuthorizationResponse
request = postXML route53
response
= receiveEmpty
(\ s h x ->
DeleteVPCAssociationAuthorizationResponse' <$>
(pure (fromEnum s)))
instance Hashable DeleteVPCAssociationAuthorization
where
instance NFData DeleteVPCAssociationAuthorization
where
instance ToElement DeleteVPCAssociationAuthorization
where
toElement
= mkElement
"{https://route53.amazonaws.com/doc/2013-04-01/}DeleteVPCAssociationAuthorizationRequest"
instance ToHeaders DeleteVPCAssociationAuthorization
where
toHeaders = const mempty
instance ToPath DeleteVPCAssociationAuthorization
where
toPath DeleteVPCAssociationAuthorization'{..}
= mconcat
["/2013-04-01/hostedzone/", toBS _dvaaHostedZoneId,
"/deauthorizevpcassociation"]
instance ToQuery DeleteVPCAssociationAuthorization
where
toQuery = const mempty
instance ToXML DeleteVPCAssociationAuthorization
where
toXML DeleteVPCAssociationAuthorization'{..}
= mconcat ["VPC" @= _dvaaVPC]
newtype DeleteVPCAssociationAuthorizationResponse = DeleteVPCAssociationAuthorizationResponse'
{ _dvaarsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteVPCAssociationAuthorizationResponse
:: Int
-> DeleteVPCAssociationAuthorizationResponse
deleteVPCAssociationAuthorizationResponse pResponseStatus_ =
DeleteVPCAssociationAuthorizationResponse'
{_dvaarsResponseStatus = pResponseStatus_}
dvaarsResponseStatus :: Lens' DeleteVPCAssociationAuthorizationResponse Int
dvaarsResponseStatus = lens _dvaarsResponseStatus (\ s a -> s{_dvaarsResponseStatus = a})
instance NFData
DeleteVPCAssociationAuthorizationResponse
where