Show / Hide Table of Contents

Class GetZone

Inheritance
System.Object
GetZone
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Route53
Assembly: Pulumi.Aws.dll
Syntax
public static class GetZone

Methods

View Source

InvokeAsync(GetZoneArgs, InvokeOptions)

aws.route53.Zone provides details about a specific Route 53 Hosted Zone.

This data source allows to find a Hosted Zone ID given Hosted Zone name and certain search criteria.

{{% examples %}}

Example Usage

{{% example %}}

The following example shows how to get a Hosted Zone from its name and from this data how to create a Record Set.

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var selected = Output.Create(Aws.Route53.GetZone.InvokeAsync(new Aws.Route53.GetZoneArgs
    {
        Name = "test.com.",
        PrivateZone = true,
    }));
    var www = new Aws.Route53.Record("www", new Aws.Route53.RecordArgs
    {
        Name = selected.Apply(selected => $"www.{selected.Name}"),
        Records = 
        {
            "10.0.0.1",
        },
        Ttl = "300",
        Type = "A",
        ZoneId = selected.Apply(selected => selected.ZoneId),
    });
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetZoneResult> InvokeAsync(GetZoneArgs args = null, InvokeOptions options = null)
Parameters
Type Name Description
GetZoneArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetZoneResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.