com.pulumi.aws.route53.Zone Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.route53;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.route53.ZoneArgs;
import com.pulumi.aws.route53.inputs.ZoneState;
import com.pulumi.aws.route53.outputs.ZoneVpc;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages a Route53 Hosted Zone. For managing Domain Name System Security Extensions (DNSSEC), see the `aws.route53.KeySigningKey` and `aws.route53.HostedZoneDnsSec` resources.
*
* ## Example Usage
*
* ### Public Zone
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.route53.Zone;
* import com.pulumi.aws.route53.ZoneArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var primary = new Zone("primary", ZoneArgs.builder()
* .name("example.com")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Public Subdomain Zone
*
* For use in subdomains, note that you need to create a
* `aws.route53.Record` of type `NS` as well as the subdomain
* zone.
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.route53.Zone;
* import com.pulumi.aws.route53.ZoneArgs;
* import com.pulumi.aws.route53.Record;
* import com.pulumi.aws.route53.RecordArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var main = new Zone("main", ZoneArgs.builder()
* .name("example.com")
* .build());
*
* var dev = new Zone("dev", ZoneArgs.builder()
* .name("dev.example.com")
* .tags(Map.of("Environment", "dev"))
* .build());
*
* var dev_ns = new Record("dev-ns", RecordArgs.builder()
* .zoneId(main.zoneId())
* .name("dev.example.com")
* .type("NS")
* .ttl("30")
* .records(dev.nameServers())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Private Zone
*
* > **NOTE:** This provider provides both exclusive VPC associations defined in-line in this resource via `vpc` configuration blocks and a separate ` Zone VPC Association resource. At this time, you cannot use in-line VPC associations in conjunction with any `aws.route53.ZoneAssociation` resources with the same zone ID otherwise it will cause a perpetual difference in plan output. You can optionally use [ `ignoreChanges` ](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) to manage additional associations via the `aws.route53.ZoneAssociation` resource.
*
* > **NOTE:** Private zones require at least one VPC association at all times.
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.route53.Zone;
* import com.pulumi.aws.route53.ZoneArgs;
* import com.pulumi.aws.route53.inputs.ZoneVpcArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var private_ = new Zone("private", ZoneArgs.builder()
* .name("example.com")
* .vpcs(ZoneVpcArgs.builder()
* .vpcId(example.id())
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import Route53 Zones using the zone `id`. For example:
*
* ```sh
* $ pulumi import aws:route53/zone:Zone myzone Z1D633PJN98FT9
* ```
*
*/
@ResourceType(type="aws:route53/zone:Zone")
public class Zone extends com.pulumi.resources.CustomResource {
/**
* The Amazon Resource Name (ARN) of the Hosted Zone.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return The Amazon Resource Name (ARN) of the Hosted Zone.
*
*/
public Output arn() {
return this.arn;
}
/**
* A comment for the hosted zone. Defaults to 'Managed by Pulumi'.
*
*/
@Export(name="comment", refs={String.class}, tree="[0]")
private Output comment;
/**
* @return A comment for the hosted zone. Defaults to 'Managed by Pulumi'.
*
*/
public Output comment() {
return this.comment;
}
/**
* The ID of the reusable delegation set whose NS records you want to assign to the hosted zone. Conflicts with `vpc` as delegation sets can only be used for public zones.
*
*/
@Export(name="delegationSetId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> delegationSetId;
/**
* @return The ID of the reusable delegation set whose NS records you want to assign to the hosted zone. Conflicts with `vpc` as delegation sets can only be used for public zones.
*
*/
public Output> delegationSetId() {
return Codegen.optional(this.delegationSetId);
}
/**
* Whether to destroy all records (possibly managed outside of this provider) in the zone when destroying the zone.
*
*/
@Export(name="forceDestroy", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> forceDestroy;
/**
* @return Whether to destroy all records (possibly managed outside of this provider) in the zone when destroying the zone.
*
*/
public Output> forceDestroy() {
return Codegen.optional(this.forceDestroy);
}
/**
* This is the name of the hosted zone.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return This is the name of the hosted zone.
*
*/
public Output name() {
return this.name;
}
/**
* A list of name servers in associated (or default) delegation set.
* Find more about delegation sets in [AWS docs](https://docs.aws.amazon.com/Route53/latest/APIReference/actions-on-reusable-delegation-sets.html).
*
*/
@Export(name="nameServers", refs={List.class,String.class}, tree="[0,1]")
private Output> nameServers;
/**
* @return A list of name servers in associated (or default) delegation set.
* Find more about delegation sets in [AWS docs](https://docs.aws.amazon.com/Route53/latest/APIReference/actions-on-reusable-delegation-sets.html).
*
*/
public Output> nameServers() {
return this.nameServers;
}
/**
* The Route 53 name server that created the SOA record.
*
*/
@Export(name="primaryNameServer", refs={String.class}, tree="[0]")
private Output primaryNameServer;
/**
* @return The Route 53 name server that created the SOA record.
*
*/
public Output primaryNameServer() {
return this.primaryNameServer;
}
/**
* A mapping of tags to assign to the zone. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A mapping of tags to assign to the zone. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*
* @deprecated
* Please use `tags` instead.
*
*/
@Deprecated /* Please use `tags` instead. */
@Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]")
private Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy