get Zone
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()));
}
}
Content copied to clipboard
Return
A collection of values returned by getZone.
Parameters
argument
A collection of arguments for invoking getZone.
Return
A collection of values returned by getZone.
See also
Parameters
name
The name of the DNS Zone.
resource Group Name
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.
Return
A collection of values returned by getZone.
See also
Parameters
argument
Builder for com.pulumi.azure.dns.kotlin.inputs.GetZonePlainArgs.