module Network.AWS.Route53.CreateVPCAssociationAuthorization
(
createVPCAssociationAuthorization
, CreateVPCAssociationAuthorization
, cvaaHostedZoneId
, cvaaVPC
, createVPCAssociationAuthorizationResponse
, CreateVPCAssociationAuthorizationResponse
, cvaarsResponseStatus
, cvaarsHostedZoneId
, cvaarsVPC
) 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 CreateVPCAssociationAuthorization = CreateVPCAssociationAuthorization'
{ _cvaaHostedZoneId :: !ResourceId
, _cvaaVPC :: !VPC
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createVPCAssociationAuthorization
:: ResourceId
-> VPC
-> CreateVPCAssociationAuthorization
createVPCAssociationAuthorization pHostedZoneId_ pVPC_ =
CreateVPCAssociationAuthorization'
{_cvaaHostedZoneId = pHostedZoneId_, _cvaaVPC = pVPC_}
cvaaHostedZoneId :: Lens' CreateVPCAssociationAuthorization ResourceId
cvaaHostedZoneId = lens _cvaaHostedZoneId (\ s a -> s{_cvaaHostedZoneId = a});
cvaaVPC :: Lens' CreateVPCAssociationAuthorization VPC
cvaaVPC = lens _cvaaVPC (\ s a -> s{_cvaaVPC = a});
instance AWSRequest CreateVPCAssociationAuthorization
where
type Rs CreateVPCAssociationAuthorization =
CreateVPCAssociationAuthorizationResponse
request = postXML route53
response
= receiveXML
(\ s h x ->
CreateVPCAssociationAuthorizationResponse' <$>
(pure (fromEnum s)) <*> (x .@ "HostedZoneId") <*>
(x .@ "VPC"))
instance Hashable CreateVPCAssociationAuthorization
where
instance NFData CreateVPCAssociationAuthorization
where
instance ToElement CreateVPCAssociationAuthorization
where
toElement
= mkElement
"{https://route53.amazonaws.com/doc/2013-04-01/}CreateVPCAssociationAuthorizationRequest"
instance ToHeaders CreateVPCAssociationAuthorization
where
toHeaders = const mempty
instance ToPath CreateVPCAssociationAuthorization
where
toPath CreateVPCAssociationAuthorization'{..}
= mconcat
["/2013-04-01/hostedzone/", toBS _cvaaHostedZoneId,
"/authorizevpcassociation"]
instance ToQuery CreateVPCAssociationAuthorization
where
toQuery = const mempty
instance ToXML CreateVPCAssociationAuthorization
where
toXML CreateVPCAssociationAuthorization'{..}
= mconcat ["VPC" @= _cvaaVPC]
data CreateVPCAssociationAuthorizationResponse = CreateVPCAssociationAuthorizationResponse'
{ _cvaarsResponseStatus :: !Int
, _cvaarsHostedZoneId :: !ResourceId
, _cvaarsVPC :: !VPC
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createVPCAssociationAuthorizationResponse
:: Int
-> ResourceId
-> VPC
-> CreateVPCAssociationAuthorizationResponse
createVPCAssociationAuthorizationResponse pResponseStatus_ pHostedZoneId_ pVPC_ =
CreateVPCAssociationAuthorizationResponse'
{ _cvaarsResponseStatus = pResponseStatus_
, _cvaarsHostedZoneId = pHostedZoneId_
, _cvaarsVPC = pVPC_
}
cvaarsResponseStatus :: Lens' CreateVPCAssociationAuthorizationResponse Int
cvaarsResponseStatus = lens _cvaarsResponseStatus (\ s a -> s{_cvaarsResponseStatus = a});
cvaarsHostedZoneId :: Lens' CreateVPCAssociationAuthorizationResponse ResourceId
cvaarsHostedZoneId = lens _cvaarsHostedZoneId (\ s a -> s{_cvaarsHostedZoneId = a});
cvaarsVPC :: Lens' CreateVPCAssociationAuthorizationResponse VPC
cvaarsVPC = lens _cvaarsVPC (\ s a -> s{_cvaarsVPC = a});
instance NFData
CreateVPCAssociationAuthorizationResponse
where