module Network.AWS.Route53.AssociateVPCWithHostedZone
(
associateVPCWithHostedZone
, AssociateVPCWithHostedZone
, avwhzComment
, avwhzHostedZoneId
, avwhzVPC
, associateVPCWithHostedZoneResponse
, AssociateVPCWithHostedZoneResponse
, avwhzrsResponseStatus
, avwhzrsChangeInfo
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.Route53.Types
import Network.AWS.Route53.Types.Product
data AssociateVPCWithHostedZone = AssociateVPCWithHostedZone'
{ _avwhzComment :: !(Maybe Text)
, _avwhzHostedZoneId :: !Text
, _avwhzVPC :: !VPC
} deriving (Eq,Read,Show,Data,Typeable,Generic)
associateVPCWithHostedZone
:: Text
-> VPC
-> AssociateVPCWithHostedZone
associateVPCWithHostedZone pHostedZoneId_ pVPC_ =
AssociateVPCWithHostedZone'
{ _avwhzComment = Nothing
, _avwhzHostedZoneId = pHostedZoneId_
, _avwhzVPC = pVPC_
}
avwhzComment :: Lens' AssociateVPCWithHostedZone (Maybe Text)
avwhzComment = lens _avwhzComment (\ s a -> s{_avwhzComment = a});
avwhzHostedZoneId :: Lens' AssociateVPCWithHostedZone Text
avwhzHostedZoneId = lens _avwhzHostedZoneId (\ s a -> s{_avwhzHostedZoneId = a});
avwhzVPC :: Lens' AssociateVPCWithHostedZone VPC
avwhzVPC = lens _avwhzVPC (\ s a -> s{_avwhzVPC = a});
instance AWSRequest AssociateVPCWithHostedZone where
type Rs AssociateVPCWithHostedZone =
AssociateVPCWithHostedZoneResponse
request = postXML route53
response
= receiveXML
(\ s h x ->
AssociateVPCWithHostedZoneResponse' <$>
(pure (fromEnum s)) <*> (x .@ "ChangeInfo"))
instance ToElement AssociateVPCWithHostedZone where
toElement
= mkElement
"{https://route53.amazonaws.com/doc/2013-04-01/}AssociateVPCWithHostedZoneRequest"
instance ToHeaders AssociateVPCWithHostedZone where
toHeaders = const mempty
instance ToPath AssociateVPCWithHostedZone where
toPath AssociateVPCWithHostedZone'{..}
= mconcat
["/2013-04-01/hostedzone/", toBS _avwhzHostedZoneId,
"/associatevpc"]
instance ToQuery AssociateVPCWithHostedZone where
toQuery = const mempty
instance ToXML AssociateVPCWithHostedZone where
toXML AssociateVPCWithHostedZone'{..}
= mconcat
["Comment" @= _avwhzComment, "VPC" @= _avwhzVPC]
data AssociateVPCWithHostedZoneResponse = AssociateVPCWithHostedZoneResponse'
{ _avwhzrsResponseStatus :: !Int
, _avwhzrsChangeInfo :: !ChangeInfo
} deriving (Eq,Read,Show,Data,Typeable,Generic)
associateVPCWithHostedZoneResponse
:: Int
-> ChangeInfo
-> AssociateVPCWithHostedZoneResponse
associateVPCWithHostedZoneResponse pResponseStatus_ pChangeInfo_ =
AssociateVPCWithHostedZoneResponse'
{ _avwhzrsResponseStatus = pResponseStatus_
, _avwhzrsChangeInfo = pChangeInfo_
}
avwhzrsResponseStatus :: Lens' AssociateVPCWithHostedZoneResponse Int
avwhzrsResponseStatus = lens _avwhzrsResponseStatus (\ s a -> s{_avwhzrsResponseStatus = a});
avwhzrsChangeInfo :: Lens' AssociateVPCWithHostedZoneResponse ChangeInfo
avwhzrsChangeInfo = lens _avwhzrsChangeInfo (\ s a -> s{_avwhzrsChangeInfo = a});