module Network.AWS.Route53.DisassociateVPCFromHostedZone
(
DisassociateVPCFromHostedZone
, disassociateVPCFromHostedZone
, dvpcfhzComment
, dvpcfhzHostedZoneId
, dvpcfhzVPC
, DisassociateVPCFromHostedZoneResponse
, disassociateVPCFromHostedZoneResponse
, dvpcfhzrChangeInfo
) where
import Network.AWS.Prelude
import Network.AWS.Request.RestXML
import Network.AWS.Route53.Types
import qualified GHC.Exts
data DisassociateVPCFromHostedZone = DisassociateVPCFromHostedZone
{ _dvpcfhzComment :: Maybe Text
, _dvpcfhzHostedZoneId :: Text
, _dvpcfhzVPC :: VPC
} deriving (Eq, Show)
disassociateVPCFromHostedZone :: Text
-> VPC
-> DisassociateVPCFromHostedZone
disassociateVPCFromHostedZone p1 p2 = DisassociateVPCFromHostedZone
{ _dvpcfhzHostedZoneId = p1
, _dvpcfhzVPC = p2
, _dvpcfhzComment = Nothing
}
dvpcfhzComment :: Lens' DisassociateVPCFromHostedZone (Maybe Text)
dvpcfhzComment = lens _dvpcfhzComment (\s a -> s { _dvpcfhzComment = a })
dvpcfhzHostedZoneId :: Lens' DisassociateVPCFromHostedZone Text
dvpcfhzHostedZoneId =
lens _dvpcfhzHostedZoneId (\s a -> s { _dvpcfhzHostedZoneId = a })
dvpcfhzVPC :: Lens' DisassociateVPCFromHostedZone VPC
dvpcfhzVPC = lens _dvpcfhzVPC (\s a -> s { _dvpcfhzVPC = a })
newtype DisassociateVPCFromHostedZoneResponse = DisassociateVPCFromHostedZoneResponse
{ _dvpcfhzrChangeInfo :: ChangeInfo
} deriving (Eq, Show)
disassociateVPCFromHostedZoneResponse :: ChangeInfo
-> DisassociateVPCFromHostedZoneResponse
disassociateVPCFromHostedZoneResponse p1 = DisassociateVPCFromHostedZoneResponse
{ _dvpcfhzrChangeInfo = p1
}
dvpcfhzrChangeInfo :: Lens' DisassociateVPCFromHostedZoneResponse ChangeInfo
dvpcfhzrChangeInfo =
lens _dvpcfhzrChangeInfo (\s a -> s { _dvpcfhzrChangeInfo = a })
instance ToPath DisassociateVPCFromHostedZone where
toPath DisassociateVPCFromHostedZone{..} = mconcat
[ "/2013-04-01/hostedzone/"
, toText _dvpcfhzHostedZoneId
, "/disassociatevpc"
]
instance ToQuery DisassociateVPCFromHostedZone where
toQuery = const mempty
instance ToHeaders DisassociateVPCFromHostedZone
instance ToXMLRoot DisassociateVPCFromHostedZone where
toXMLRoot DisassociateVPCFromHostedZone{..} = namespaced ns "DisassociateVPCFromHostedZone"
[ "VPC" =@ _dvpcfhzVPC
, "Comment" =@ _dvpcfhzComment
]
instance ToXML DisassociateVPCFromHostedZone
instance AWSRequest DisassociateVPCFromHostedZone where
type Sv DisassociateVPCFromHostedZone = Route53
type Rs DisassociateVPCFromHostedZone = DisassociateVPCFromHostedZoneResponse
request = post
response = xmlResponse
instance FromXML DisassociateVPCFromHostedZoneResponse where
parseXML x = DisassociateVPCFromHostedZoneResponse
<$> x .@ "ChangeInfo"