module Aws.Route53.Commands.DeleteHostedZone where
import Aws.Core
import Aws.Route53.Core
import qualified Data.Text.Encoding as T
data DeleteHostedZone = DeleteHostedZone
{ dhzHostedZoneId :: HostedZoneId
} deriving (Show)
data DeleteHostedZoneResponse = DeleteHostedZoneResponse
{ dhzrChangeInfo :: ChangeInfo
} deriving (Show)
deleteHostedZone :: HostedZoneId -> DeleteHostedZone
deleteHostedZone hostedZoneId = DeleteHostedZone hostedZoneId
instance SignQuery DeleteHostedZone where
type ServiceConfiguration DeleteHostedZone = Route53Configuration
signQuery DeleteHostedZone{..} = route53SignQuery method resource query body
where
method = Delete
resource = T.encodeUtf8 . qualifiedIdText $ dhzHostedZoneId
query = []
body = Nothing
instance ResponseConsumer r DeleteHostedZoneResponse where
type ResponseMetadata DeleteHostedZoneResponse = Route53Metadata
responseConsumer _ = route53ResponseConsumer parse
where
parse cursor = do
route53CheckResponseType () "DeleteHostedZoneResponse" cursor
changeInfo <- r53Parse cursor
return $ DeleteHostedZoneResponse changeInfo
instance Transaction DeleteHostedZone DeleteHostedZoneResponse