get Dns Zone
Use this data source to access information about an existing Private DNS Zone.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.privatedns.PrivatednsFunctions;
import com.pulumi.azure.privatedns.inputs.GetDnsZoneArgs;
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 = PrivatednsFunctions.getDnsZone(GetDnsZoneArgs.builder()
.name("contoso.internal")
.resourceGroupName("contoso-dns")
.build());
ctx.export("privateDnsZoneId", example.applyValue(getDnsZoneResult -> getDnsZoneResult.id()));
}
}
Content copied to clipboard
Return
A collection of values returned by getDnsZone.
Parameters
argument
A collection of arguments for invoking getDnsZone.
suspend fun getDnsZone(name: String, resourceGroupName: String? = null, tags: Map<String, String>? = null): GetDnsZoneResult
Return
A collection of values returned by getDnsZone.
See also
Parameters
name
The name of the Private DNS Zone.
resource Group Name
The Name of the Resource Group where the Private DNS Zone exists. If the Name of the Resource Group is not provided, the first Private DNS Zone from the list of Private DNS Zones in your subscription that matches name
will be returned.
tags
A mapping of tags for the zone.
Return
A collection of values returned by getDnsZone.
See also
Parameters
argument
Builder for com.pulumi.azure.privatedns.kotlin.inputs.GetDnsZonePlainArgs.