module Network.AWS.Route53.AssociateVPCWithHostedZone
(
AssociateVPCWithHostedZone
, associateVPCWithHostedZone
, avpcwhzComment
, avpcwhzHostedZoneId
, avpcwhzVPC
, AssociateVPCWithHostedZoneResponse
, associateVPCWithHostedZoneResponse
, avpcwhzrChangeInfo
) where
import Network.AWS.Prelude
import Network.AWS.Request.RestXML
import Network.AWS.Route53.Types
import qualified GHC.Exts
data AssociateVPCWithHostedZone = AssociateVPCWithHostedZone
{ _avpcwhzComment :: Maybe Text
, _avpcwhzHostedZoneId :: Text
, _avpcwhzVPC :: VPC
} deriving (Eq, Show)
associateVPCWithHostedZone :: Text
-> VPC
-> AssociateVPCWithHostedZone
associateVPCWithHostedZone p1 p2 = AssociateVPCWithHostedZone
{ _avpcwhzHostedZoneId = p1
, _avpcwhzVPC = p2
, _avpcwhzComment = Nothing
}
avpcwhzComment :: Lens' AssociateVPCWithHostedZone (Maybe Text)
avpcwhzComment = lens _avpcwhzComment (\s a -> s { _avpcwhzComment = a })
avpcwhzHostedZoneId :: Lens' AssociateVPCWithHostedZone Text
avpcwhzHostedZoneId =
lens _avpcwhzHostedZoneId (\s a -> s { _avpcwhzHostedZoneId = a })
avpcwhzVPC :: Lens' AssociateVPCWithHostedZone VPC
avpcwhzVPC = lens _avpcwhzVPC (\s a -> s { _avpcwhzVPC = a })
newtype AssociateVPCWithHostedZoneResponse = AssociateVPCWithHostedZoneResponse
{ _avpcwhzrChangeInfo :: ChangeInfo
} deriving (Eq, Show)
associateVPCWithHostedZoneResponse :: ChangeInfo
-> AssociateVPCWithHostedZoneResponse
associateVPCWithHostedZoneResponse p1 = AssociateVPCWithHostedZoneResponse
{ _avpcwhzrChangeInfo = p1
}
avpcwhzrChangeInfo :: Lens' AssociateVPCWithHostedZoneResponse ChangeInfo
avpcwhzrChangeInfo =
lens _avpcwhzrChangeInfo (\s a -> s { _avpcwhzrChangeInfo = a })
instance ToPath AssociateVPCWithHostedZone where
toPath AssociateVPCWithHostedZone{..} = mconcat
[ "/2013-04-01/hostedzone/"
, toText _avpcwhzHostedZoneId
, "/associatevpc"
]
instance ToQuery AssociateVPCWithHostedZone where
toQuery = const mempty
instance ToHeaders AssociateVPCWithHostedZone
instance ToXMLRoot AssociateVPCWithHostedZone where
toXMLRoot AssociateVPCWithHostedZone{..} = namespaced ns "AssociateVPCWithHostedZone"
[ "VPC" =@ _avpcwhzVPC
, "Comment" =@ _avpcwhzComment
]
instance ToXML AssociateVPCWithHostedZone
instance AWSRequest AssociateVPCWithHostedZone where
type Sv AssociateVPCWithHostedZone = Route53
type Rs AssociateVPCWithHostedZone = AssociateVPCWithHostedZoneResponse
request = post
response = xmlResponse
instance FromXML AssociateVPCWithHostedZoneResponse where
parseXML x = AssociateVPCWithHostedZoneResponse
<$> x .@ "ChangeInfo"