ZoneArgs

data class ZoneArgs(val location: Output<String>? = null, val registrationVirtualNetworks: Output<List<SubResourceArgs>>? = null, val resolutionVirtualNetworks: Output<List<SubResourceArgs>>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val zoneName: Output<String>? = null, val zoneType: Output<ZoneType>? = null) : ConvertibleToJava<ZoneArgs>

Describes a DNS zone. Uses Azure REST API version 2023-07-01-preview. Other available API versions: 2015-05-04-preview, 2016-04-01, 2017-09-01, 2017-10-01, 2018-03-01-preview, 2018-05-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native dns [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create zone

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var zone = new AzureNative.Dns.Zone("zone", new()
{
Location = "Global",
ResourceGroupName = "rg1",
Tags =
{
{ "key1", "value1" },
},
ZoneName = "zone1",
});
});
package main
import (
dns "github.com/pulumi/pulumi-azure-native-sdk/dns/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dns.NewZone(ctx, "zone", &dns.ZoneArgs{
Location: pulumi.String("Global"),
ResourceGroupName: pulumi.String("rg1"),
Tags: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
ZoneName: pulumi.String("zone1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.dns.Zone;
import com.pulumi.azurenative.dns.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 zone = new Zone("zone", ZoneArgs.builder()
.location("Global")
.resourceGroupName("rg1")
.tags(Map.of("key1", "value1"))
.zoneName("zone1")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:dns:Zone zone1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}

Constructors

Link copied to clipboard
constructor(location: Output<String>? = null, registrationVirtualNetworks: Output<List<SubResourceArgs>>? = null, resolutionVirtualNetworks: Output<List<SubResourceArgs>>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, zoneName: Output<String>? = null, zoneType: Output<ZoneType>? = null)

Properties

Link copied to clipboard
val location: Output<String>? = null

Resource location.

Link copied to clipboard

A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.

Link copied to clipboard

A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val zoneName: Output<String>? = null

The name of the DNS zone (without a terminating dot).

Link copied to clipboard
val zoneType: Output<ZoneType>? = null

The type of this DNS zone (Public or Private).

Functions

Link copied to clipboard
open override fun toJava(): ZoneArgs