AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

.NET Framework 4.5
 
This action deletes a hosted zone. To delete a hosted zone, send a DELETE request to the /Route 53 API version/hostedzone/hosted zone ID resource.

For more information about deleting a hosted zone, see Deleting a Hosted Zone in the Amazon Route 53 Developer Guide.

You can delete a hosted zone only if there are no resource record sets other than the default SOA record and NS resource record sets. If your hosted zone contains other resource record sets, you must delete them before you can delete your hosted zone. If you try to delete a hosted zone that contains other resource record sets, Amazon Route 53 will deny your request with a HostedZoneNotEmpty error. For information about deleting records from your hosted zone, see ChangeResourceRecordSets.

Namespace: Amazon.Route53
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public virtual DeleteHostedZoneResponse DeleteHostedZone(
         DeleteHostedZoneRequest request
)

Parameters

request
Type: Amazon.Route53.Model.DeleteHostedZoneRequest

Container for the necessary parameters to execute the DeleteHostedZone service method.

Return Value
Type: Amazon.Route53.Model.DeleteHostedZoneResponse
The response from the DeleteHostedZone service method, as returned by Route53.

Exceptions

ExceptionCondition
HostedZoneNotEmptyException The hosted zone contains resource record sets in addition to the default NS and SOA resource record sets. Before you can delete the hosted zone, you must delete the additional resource record sets.
InvalidInputException Some value specified in the request is invalid or the XML document is malformed.
NoSuchHostedZoneException
PriorRequestNotCompleteException The request was rejected because Amazon Route 53 was still processing a prior request.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5