Yandex

v0.10.0 published on Thursday, Nov 18, 2021 by Pulumi

getDnsZone

Get information about a DNS Zone.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(Yandex.GetDnsZone.InvokeAsync(new Yandex.GetDnsZoneArgs
        {
            DnsZoneId = yandex_dns_zone.Zone1.Id,
        }));
        this.Zone = foo.Apply(foo => foo.Zone);
    }

    [Output("zone")]
    public Output<string> Zone { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := yandex.LookupDnsZone(ctx, &GetDnsZoneArgs{
			DnsZoneId: yandex_dns_zone.Zone1.Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("zone", foo.Zone)
		return nil
	})
}
import pulumi
import pulumi_yandex as yandex

foo = yandex.get_dns_zone(dns_zone_id=yandex_dns_zone["zone1"]["id"])
pulumi.export("zone", foo.zone)
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const foo = yandex.getDnsZone({
    dnsZoneId: yandex_dns_zone.zone1.id,
});
export const zone = foo.then(foo => foo.zone);

Using getDnsZone

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDnsZone(args: GetDnsZoneArgs, opts?: InvokeOptions): Promise<GetDnsZoneResult>
function getDnsZoneOutput(args: GetDnsZoneOutputArgs, opts?: InvokeOptions): Output<GetDnsZoneResult>
def get_dns_zone(dns_zone_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetDnsZoneResult
def get_dns_zone_output(dns_zone_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetDnsZoneResult]
func LookupDnsZone(ctx *Context, args *LookupDnsZoneArgs, opts ...InvokeOption) (*LookupDnsZoneResult, error)
func LookupDnsZoneOutput(ctx *Context, args *LookupDnsZoneOutputArgs, opts ...InvokeOption) LookupDnsZoneResultOutput

> Note: This function is named LookupDnsZone in the Go SDK.

public static class GetDnsZone 
{
    public static Task<GetDnsZoneResult> InvokeAsync(GetDnsZoneArgs args, InvokeOptions? opts = null)
    public static Output<GetDnsZoneResult> Invoke(GetDnsZoneInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DnsZoneId string
The ID of the DNS Zone.
DnsZoneId string
The ID of the DNS Zone.
dnsZoneId string
The ID of the DNS Zone.
dns_zone_id str
The ID of the DNS Zone.

getDnsZone Result

The following output properties are available:

CreatedAt string
(Computed) The DNS zone creation timestamp.
Description string
(Computed) Description of the DNS zone.
DnsZoneId string
FolderId string
(Computed) The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Id string
The provider-assigned unique ID for this managed resource.
Labels Dictionary<string, string>
(Computed) A set of key/value label pairs to assign to the DNS zone.
Name string
(Computed) User assigned name of a specific resource. Must be unique within the folder.
PrivateNetworks List<string>
(Computed) For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
Public bool
(Computed) The zone’s visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
Zone string
(Computed) The DNS name of this zone, e.g. “example.com.”. Must ends with dot.
CreatedAt string
(Computed) The DNS zone creation timestamp.
Description string
(Computed) Description of the DNS zone.
DnsZoneId string
FolderId string
(Computed) The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Id string
The provider-assigned unique ID for this managed resource.
Labels map[string]string
(Computed) A set of key/value label pairs to assign to the DNS zone.
Name string
(Computed) User assigned name of a specific resource. Must be unique within the folder.
PrivateNetworks []string
(Computed) For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
Public bool
(Computed) The zone’s visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
Zone string
(Computed) The DNS name of this zone, e.g. “example.com.”. Must ends with dot.
createdAt string
(Computed) The DNS zone creation timestamp.
description string
(Computed) Description of the DNS zone.
dnsZoneId string
folderId string
(Computed) The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
id string
The provider-assigned unique ID for this managed resource.
labels {[key: string]: string}
(Computed) A set of key/value label pairs to assign to the DNS zone.
name string
(Computed) User assigned name of a specific resource. Must be unique within the folder.
privateNetworks string[]
(Computed) For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
public boolean
(Computed) The zone’s visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
zone string
(Computed) The DNS name of this zone, e.g. “example.com.”. Must ends with dot.
created_at str
(Computed) The DNS zone creation timestamp.
description str
(Computed) Description of the DNS zone.
dns_zone_id str
folder_id str
(Computed) The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
id str
The provider-assigned unique ID for this managed resource.
labels Mapping[str, str]
(Computed) A set of key/value label pairs to assign to the DNS zone.
name str
(Computed) User assigned name of a specific resource. Must be unique within the folder.
private_networks Sequence[str]
(Computed) For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
public bool
(Computed) The zone’s visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
zone str
(Computed) The DNS name of this zone, e.g. “example.com.”. Must ends with dot.

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.