getZone

suspend fun getZone(argument: GetZonePlainArgs): GetZoneResult

Use this data source to access information about an existing DNS Zone.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.dns.DnsFunctions;
import com.pulumi.azure.dns.inputs.GetZoneArgs;
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) {
final var example = DnsFunctions.getZone(GetZoneArgs.builder()
.name("search-eventhubns")
.resourceGroupName("search-service")
.build());
ctx.export("dnsZoneId", example.applyValue(getZoneResult -> getZoneResult.id()));
}
}

Return

A collection of values returned by getZone.

Parameters

argument

A collection of arguments for invoking getZone.


suspend fun getZone(name: String, resourceGroupName: String? = null): GetZoneResult

Return

A collection of values returned by getZone.

See also

Parameters

name

The name of the DNS Zone.

resourceGroupName

The Name of the Resource Group where the DNS Zone exists. If the Name of the Resource Group is not provided, the first DNS Zone from the list of DNS Zones in your subscription that matches name will be returned.


suspend fun getZone(argument: suspend GetZonePlainArgsBuilder.() -> Unit): GetZoneResult

Return

A collection of values returned by getZone.

See also

Parameters

argument

Builder for com.pulumi.azure.dns.kotlin.inputs.GetZonePlainArgs.