1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. VirtualNetworkLink
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.network.VirtualNetworkLink

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

    Describes a link to virtual network for a Private DNS zone. Azure REST API version: 2020-06-01. Prior API version in Azure Native 1.x: 2020-06-01.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualNetworkLink = new AzureNative.Network.VirtualNetworkLink("virtualNetworkLink", new()
        {
            Location = "Global",
            PrivateZoneName = "privatezone1.com",
            RegistrationEnabled = false,
            ResourceGroupName = "resourceGroup1",
            Tags = 
            {
                { "key1", "value1" },
            },
            VirtualNetwork = new AzureNative.Network.Inputs.SubResourceArgs
            {
                Id = "/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName",
            },
            VirtualNetworkLinkName = "virtualNetworkLink1",
        });
    
    });
    
    package main
    
    import (
    	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := network.NewVirtualNetworkLink(ctx, "virtualNetworkLink", &network.VirtualNetworkLinkArgs{
    			Location:            pulumi.String("Global"),
    			PrivateZoneName:     pulumi.String("privatezone1.com"),
    			RegistrationEnabled: pulumi.Bool(false),
    			ResourceGroupName:   pulumi.String("resourceGroup1"),
    			Tags: pulumi.StringMap{
    				"key1": pulumi.String("value1"),
    			},
    			VirtualNetwork: &network.SubResourceArgs{
    				Id: pulumi.String("/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName"),
    			},
    			VirtualNetworkLinkName: pulumi.String("virtualNetworkLink1"),
    		})
    		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.network.VirtualNetworkLink;
    import com.pulumi.azurenative.network.VirtualNetworkLinkArgs;
    import com.pulumi.azurenative.network.inputs.SubResourceArgs;
    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 virtualNetworkLink = new VirtualNetworkLink("virtualNetworkLink", VirtualNetworkLinkArgs.builder()
                .location("Global")
                .privateZoneName("privatezone1.com")
                .registrationEnabled(false)
                .resourceGroupName("resourceGroup1")
                .tags(Map.of("key1", "value1"))
                .virtualNetwork(SubResourceArgs.builder()
                    .id("/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName")
                    .build())
                .virtualNetworkLinkName("virtualNetworkLink1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_network_link = azure_native.network.VirtualNetworkLink("virtualNetworkLink",
        location="Global",
        private_zone_name="privatezone1.com",
        registration_enabled=False,
        resource_group_name="resourceGroup1",
        tags={
            "key1": "value1",
        },
        virtual_network=azure_native.network.SubResourceArgs(
            id="/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName",
        ),
        virtual_network_link_name="virtualNetworkLink1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualNetworkLink = new azure_native.network.VirtualNetworkLink("virtualNetworkLink", {
        location: "Global",
        privateZoneName: "privatezone1.com",
        registrationEnabled: false,
        resourceGroupName: "resourceGroup1",
        tags: {
            key1: "value1",
        },
        virtualNetwork: {
            id: "/subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName",
        },
        virtualNetworkLinkName: "virtualNetworkLink1",
    });
    
    resources:
      virtualNetworkLink:
        type: azure-native:network:VirtualNetworkLink
        properties:
          location: Global
          privateZoneName: privatezone1.com
          registrationEnabled: false
          resourceGroupName: resourceGroup1
          tags:
            key1: value1
          virtualNetwork:
            id: /subscriptions/virtualNetworkSubscriptionId/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/virtualNetworkName
          virtualNetworkLinkName: virtualNetworkLink1
    

    Create VirtualNetworkLink Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VirtualNetworkLink(name: string, args: VirtualNetworkLinkArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualNetworkLink(resource_name: str,
                           args: VirtualNetworkLinkArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualNetworkLink(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           private_zone_name: Optional[str] = None,
                           resource_group_name: Optional[str] = None,
                           location: Optional[str] = None,
                           registration_enabled: Optional[bool] = None,
                           tags: Optional[Mapping[str, str]] = None,
                           virtual_network: Optional[SubResourceArgs] = None,
                           virtual_network_link_name: Optional[str] = None)
    func NewVirtualNetworkLink(ctx *Context, name string, args VirtualNetworkLinkArgs, opts ...ResourceOption) (*VirtualNetworkLink, error)
    public VirtualNetworkLink(string name, VirtualNetworkLinkArgs args, CustomResourceOptions? opts = null)
    public VirtualNetworkLink(String name, VirtualNetworkLinkArgs args)
    public VirtualNetworkLink(String name, VirtualNetworkLinkArgs args, CustomResourceOptions options)
    
    type: azure-native:network:VirtualNetworkLink
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VirtualNetworkLinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VirtualNetworkLinkArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VirtualNetworkLinkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VirtualNetworkLinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VirtualNetworkLinkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var virtualNetworkLinkResource = new AzureNative.Network.VirtualNetworkLink("virtualNetworkLinkResource", new()
    {
        PrivateZoneName = "string",
        ResourceGroupName = "string",
        Location = "string",
        RegistrationEnabled = false,
        Tags = 
        {
            { "string", "string" },
        },
        VirtualNetwork = new AzureNative.Network.Inputs.SubResourceArgs
        {
            Id = "string",
        },
        VirtualNetworkLinkName = "string",
    });
    
    example, err := network.NewVirtualNetworkLink(ctx, "virtualNetworkLinkResource", &network.VirtualNetworkLinkArgs{
    PrivateZoneName: pulumi.String("string"),
    ResourceGroupName: pulumi.String("string"),
    Location: pulumi.String("string"),
    RegistrationEnabled: pulumi.Bool(false),
    Tags: pulumi.StringMap{
    "string": pulumi.String("string"),
    },
    VirtualNetwork: &network.SubResourceArgs{
    Id: pulumi.String("string"),
    },
    VirtualNetworkLinkName: pulumi.String("string"),
    })
    
    var virtualNetworkLinkResource = new VirtualNetworkLink("virtualNetworkLinkResource", VirtualNetworkLinkArgs.builder()
        .privateZoneName("string")
        .resourceGroupName("string")
        .location("string")
        .registrationEnabled(false)
        .tags(Map.of("string", "string"))
        .virtualNetwork(SubResourceArgs.builder()
            .id("string")
            .build())
        .virtualNetworkLinkName("string")
        .build());
    
    virtual_network_link_resource = azure_native.network.VirtualNetworkLink("virtualNetworkLinkResource",
        private_zone_name="string",
        resource_group_name="string",
        location="string",
        registration_enabled=False,
        tags={
            "string": "string",
        },
        virtual_network=azure_native.network.SubResourceArgs(
            id="string",
        ),
        virtual_network_link_name="string")
    
    const virtualNetworkLinkResource = new azure_native.network.VirtualNetworkLink("virtualNetworkLinkResource", {
        privateZoneName: "string",
        resourceGroupName: "string",
        location: "string",
        registrationEnabled: false,
        tags: {
            string: "string",
        },
        virtualNetwork: {
            id: "string",
        },
        virtualNetworkLinkName: "string",
    });
    
    type: azure-native:network:VirtualNetworkLink
    properties:
        location: string
        privateZoneName: string
        registrationEnabled: false
        resourceGroupName: string
        tags:
            string: string
        virtualNetwork:
            id: string
        virtualNetworkLinkName: string
    

    VirtualNetworkLink Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The VirtualNetworkLink resource accepts the following input properties:

    PrivateZoneName string
    The name of the Private DNS zone (without a terminating dot).
    ResourceGroupName string
    The name of the resource group.
    Location string
    The Azure Region where the resource lives
    RegistrationEnabled bool
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
    Tags Dictionary<string, string>
    Resource tags.
    VirtualNetwork Pulumi.AzureNative.Network.Inputs.SubResource
    The reference of the virtual network.
    VirtualNetworkLinkName string
    The name of the virtual network link.
    PrivateZoneName string
    The name of the Private DNS zone (without a terminating dot).
    ResourceGroupName string
    The name of the resource group.
    Location string
    The Azure Region where the resource lives
    RegistrationEnabled bool
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
    Tags map[string]string
    Resource tags.
    VirtualNetwork SubResourceArgs
    The reference of the virtual network.
    VirtualNetworkLinkName string
    The name of the virtual network link.
    privateZoneName String
    The name of the Private DNS zone (without a terminating dot).
    resourceGroupName String
    The name of the resource group.
    location String
    The Azure Region where the resource lives
    registrationEnabled Boolean
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
    tags Map<String,String>
    Resource tags.
    virtualNetwork SubResource
    The reference of the virtual network.
    virtualNetworkLinkName String
    The name of the virtual network link.
    privateZoneName string
    The name of the Private DNS zone (without a terminating dot).
    resourceGroupName string
    The name of the resource group.
    location string
    The Azure Region where the resource lives
    registrationEnabled boolean
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
    tags {[key: string]: string}
    Resource tags.
    virtualNetwork SubResource
    The reference of the virtual network.
    virtualNetworkLinkName string
    The name of the virtual network link.
    private_zone_name str
    The name of the Private DNS zone (without a terminating dot).
    resource_group_name str
    The name of the resource group.
    location str
    The Azure Region where the resource lives
    registration_enabled bool
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
    tags Mapping[str, str]
    Resource tags.
    virtual_network SubResourceArgs
    The reference of the virtual network.
    virtual_network_link_name str
    The name of the virtual network link.
    privateZoneName String
    The name of the Private DNS zone (without a terminating dot).
    resourceGroupName String
    The name of the resource group.
    location String
    The Azure Region where the resource lives
    registrationEnabled Boolean
    Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
    tags Map<String>
    Resource tags.
    virtualNetwork Property Map
    The reference of the virtual network.
    virtualNetworkLinkName String
    The name of the virtual network link.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VirtualNetworkLink resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    ProvisioningState string
    The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
    Type string
    The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
    VirtualNetworkLinkState string
    The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
    Etag string
    The ETag of the virtual network link.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the resource
    ProvisioningState string
    The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
    Type string
    The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
    VirtualNetworkLinkState string
    The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
    Etag string
    The ETag of the virtual network link.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    provisioningState String
    The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
    type String
    The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
    virtualNetworkLinkState String
    The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
    etag String
    The ETag of the virtual network link.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the resource
    provisioningState string
    The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
    type string
    The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
    virtualNetworkLinkState string
    The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
    etag string
    The ETag of the virtual network link.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the resource
    provisioning_state str
    The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
    type str
    The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
    virtual_network_link_state str
    The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
    etag str
    The ETag of the virtual network link.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the resource
    provisioningState String
    The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored.
    type String
    The type of the resource. Example - 'Microsoft.Network/privateDnsZones'.
    virtualNetworkLinkState String
    The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored.
    etag String
    The ETag of the virtual network link.

    Supporting Types

    SubResource, SubResourceArgs

    Id string
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    Id string
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id String
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id string
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id str
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
    id String
    Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.

    SubResourceResponse, SubResourceResponseArgs

    Id string
    Resource ID.
    Id string
    Resource ID.
    id String
    Resource ID.
    id string
    Resource ID.
    id str
    Resource ID.
    id String
    Resource ID.

    Import

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

    $ pulumi import azure-native:network:VirtualNetworkLink virtualNetworkLink1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi