1. Packages
  2. Azure Classic
  3. API Docs
  4. privatedns
  5. getZoneVirtualNetworkLink

We recommend using Azure Native.

Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi

azure.privatedns.getZoneVirtualNetworkLink

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi

    Use this data source to access information about an existing Private DNS zone Virtual Network Link. These Links enable DNS resolution and registration inside Azure Virtual Networks using Azure Private DNS.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.privatedns.getZoneVirtualNetworkLink({
        name: "test",
        resourceGroupName: "test-rg",
        privateDnsZoneName: "test-zone",
    });
    export const privateDnsARecordId = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.privatedns.get_zone_virtual_network_link(name="test",
        resource_group_name="test-rg",
        private_dns_zone_name="test-zone")
    pulumi.export("privateDnsARecordId", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatedns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := privatedns.LookupZoneVirtualNetworkLink(ctx, &privatedns.LookupZoneVirtualNetworkLinkArgs{
    			Name:               "test",
    			ResourceGroupName:  "test-rg",
    			PrivateDnsZoneName: "test-zone",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("privateDnsARecordId", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.PrivateDns.GetZoneVirtualNetworkLink.Invoke(new()
        {
            Name = "test",
            ResourceGroupName = "test-rg",
            PrivateDnsZoneName = "test-zone",
        });
    
        return new Dictionary<string, object?>
        {
            ["privateDnsARecordId"] = example.Apply(getZoneVirtualNetworkLinkResult => getZoneVirtualNetworkLinkResult.Id),
        };
    });
    
    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.GetZoneVirtualNetworkLinkArgs;
    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.getZoneVirtualNetworkLink(GetZoneVirtualNetworkLinkArgs.builder()
                .name("test")
                .resourceGroupName("test-rg")
                .privateDnsZoneName("test-zone")
                .build());
    
            ctx.export("privateDnsARecordId", example.applyValue(getZoneVirtualNetworkLinkResult -> getZoneVirtualNetworkLinkResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:privatedns:getZoneVirtualNetworkLink
          Arguments:
            name: test
            resourceGroupName: test-rg
            privateDnsZoneName: test-zone
    outputs:
      privateDnsARecordId: ${example.id}
    

    Using getZoneVirtualNetworkLink

    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 getZoneVirtualNetworkLink(args: GetZoneVirtualNetworkLinkArgs, opts?: InvokeOptions): Promise<GetZoneVirtualNetworkLinkResult>
    function getZoneVirtualNetworkLinkOutput(args: GetZoneVirtualNetworkLinkOutputArgs, opts?: InvokeOptions): Output<GetZoneVirtualNetworkLinkResult>
    def get_zone_virtual_network_link(name: Optional[str] = None,
                                      private_dns_zone_name: Optional[str] = None,
                                      resource_group_name: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetZoneVirtualNetworkLinkResult
    def get_zone_virtual_network_link_output(name: Optional[pulumi.Input[str]] = None,
                                      private_dns_zone_name: Optional[pulumi.Input[str]] = None,
                                      resource_group_name: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetZoneVirtualNetworkLinkResult]
    func LookupZoneVirtualNetworkLink(ctx *Context, args *LookupZoneVirtualNetworkLinkArgs, opts ...InvokeOption) (*LookupZoneVirtualNetworkLinkResult, error)
    func LookupZoneVirtualNetworkLinkOutput(ctx *Context, args *LookupZoneVirtualNetworkLinkOutputArgs, opts ...InvokeOption) LookupZoneVirtualNetworkLinkResultOutput

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

    public static class GetZoneVirtualNetworkLink 
    {
        public static Task<GetZoneVirtualNetworkLinkResult> InvokeAsync(GetZoneVirtualNetworkLinkArgs args, InvokeOptions? opts = null)
        public static Output<GetZoneVirtualNetworkLinkResult> Invoke(GetZoneVirtualNetworkLinkInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetZoneVirtualNetworkLinkResult> getZoneVirtualNetworkLink(GetZoneVirtualNetworkLinkArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:privatedns/getZoneVirtualNetworkLink:getZoneVirtualNetworkLink
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Private DNS Zone Virtual Network Link.
    PrivateDnsZoneName string
    The name of the Private DNS zone (without a terminating dot).
    ResourceGroupName string
    Specifies the resource group where the Private DNS Zone exists.
    Name string
    The name of the Private DNS Zone Virtual Network Link.
    PrivateDnsZoneName string
    The name of the Private DNS zone (without a terminating dot).
    ResourceGroupName string
    Specifies the resource group where the Private DNS Zone exists.
    name String
    The name of the Private DNS Zone Virtual Network Link.
    privateDnsZoneName String
    The name of the Private DNS zone (without a terminating dot).
    resourceGroupName String
    Specifies the resource group where the Private DNS Zone exists.
    name string
    The name of the Private DNS Zone Virtual Network Link.
    privateDnsZoneName string
    The name of the Private DNS zone (without a terminating dot).
    resourceGroupName string
    Specifies the resource group where the Private DNS Zone exists.
    name str
    The name of the Private DNS Zone Virtual Network Link.
    private_dns_zone_name str
    The name of the Private DNS zone (without a terminating dot).
    resource_group_name str
    Specifies the resource group where the Private DNS Zone exists.
    name String
    The name of the Private DNS Zone Virtual Network Link.
    privateDnsZoneName String
    The name of the Private DNS zone (without a terminating dot).
    resourceGroupName String
    Specifies the resource group where the Private DNS Zone exists.

    getZoneVirtualNetworkLink Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PrivateDnsZoneName string
    RegistrationEnabled bool
    Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
    ResourceGroupName string
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    VirtualNetworkId string
    The ID of the Virtual Network that is linked to the DNS Zone.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PrivateDnsZoneName string
    RegistrationEnabled bool
    Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
    ResourceGroupName string
    Tags map[string]string
    A mapping of tags to assign to the resource.
    VirtualNetworkId string
    The ID of the Virtual Network that is linked to the DNS Zone.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    privateDnsZoneName String
    registrationEnabled Boolean
    Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
    resourceGroupName String
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    virtualNetworkId String
    The ID of the Virtual Network that is linked to the DNS Zone.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    privateDnsZoneName string
    registrationEnabled boolean
    Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
    resourceGroupName string
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    virtualNetworkId string
    The ID of the Virtual Network that is linked to the DNS Zone.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    private_dns_zone_name str
    registration_enabled bool
    Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
    resource_group_name str
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    virtual_network_id str
    The ID of the Virtual Network that is linked to the DNS Zone.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    privateDnsZoneName String
    registrationEnabled Boolean
    Whether the auto-registration of virtual machine records in the virtual network in the Private DNS zone is enabled or not.
    resourceGroupName String
    tags Map<String>
    A mapping of tags to assign to the resource.
    virtualNetworkId String
    The ID of the Virtual Network that is linked to the DNS Zone.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.84.0 published on Tuesday, Jul 16, 2024 by Pulumi