Example usage for com.amazonaws.services.route53 AmazonRoute53 deleteHostedZone

List of usage examples for com.amazonaws.services.route53 AmazonRoute53 deleteHostedZone

Introduction

In this page you can find the example usage for com.amazonaws.services.route53 AmazonRoute53 deleteHostedZone.

Prototype

DeleteHostedZoneResult deleteHostedZone(DeleteHostedZoneRequest deleteHostedZoneRequest);

Source Link

Document

Deletes a hosted zone.

Usage

From source file:jp.classmethod.aws.gradle.route53.DeleteHostedZoneTask.java

License:Apache License

@TaskAction
public void createHostedZone() {
    // to enable conventionMappings feature
    String hostedZoneId = getHostedZoneId();

    AmazonRoute53PluginExtension ext = getProject().getExtensions()
            .getByType(AmazonRoute53PluginExtension.class);
    AmazonRoute53 route53 = ext.getClient();

    route53.deleteHostedZone(new DeleteHostedZoneRequest(hostedZoneId));
    getLogger().info("HostedZone {} is deleted successfully.", hostedZoneId);
}