azure-native.network.VirtualNetworkLink
Explore with Pulumi AI
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
PUT Private DNS Zone Virtual Network Link
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:
- Private
Zone stringName - The name of the Private DNS zone (without a terminating dot).
- Resource
Group stringName - The name of the resource group.
- Location string
- 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?
- Dictionary<string, string>
- Resource tags.
- Virtual
Network Pulumi.Azure Native. Network. Inputs. Sub Resource - The reference of the virtual network.
- Virtual
Network stringLink Name - The name of the virtual network link.
- Private
Zone stringName - The name of the Private DNS zone (without a terminating dot).
- Resource
Group stringName - The name of the resource group.
- Location string
- 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?
- map[string]string
- Resource tags.
- Virtual
Network SubResource Args - The reference of the virtual network.
- Virtual
Network stringLink Name - The name of the virtual network link.
- private
Zone StringName - The name of the Private DNS zone (without a terminating dot).
- resource
Group StringName - The name of the resource group.
- location String
- The Azure Region where the resource lives
- registration
Enabled Boolean - Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
- Map<String,String>
- Resource tags.
- virtual
Network SubResource - The reference of the virtual network.
- virtual
Network StringLink Name - The name of the virtual network link.
- private
Zone stringName - The name of the Private DNS zone (without a terminating dot).
- resource
Group stringName - The name of the resource group.
- location string
- The Azure Region where the resource lives
- registration
Enabled boolean - Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
- {[key: string]: string}
- Resource tags.
- virtual
Network SubResource - The reference of the virtual network.
- virtual
Network stringLink Name - The name of the virtual network link.
- private_
zone_ strname - The name of the Private DNS zone (without a terminating dot).
- resource_
group_ strname - 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?
- Mapping[str, str]
- Resource tags.
- virtual_
network SubResource Args - The reference of the virtual network.
- virtual_
network_ strlink_ name - The name of the virtual network link.
- private
Zone StringName - The name of the Private DNS zone (without a terminating dot).
- resource
Group StringName - The name of the resource group.
- location String
- The Azure Region where the resource lives
- registration
Enabled Boolean - Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled?
- Map<String>
- Resource tags.
- virtual
Network Property Map - The reference of the virtual network.
- virtual
Network StringLink Name - 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
- Provisioning
State 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'.
- Virtual
Network stringLink State - 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
- Provisioning
State 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'.
- Virtual
Network stringLink State - 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
- provisioning
State 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'.
- virtual
Network StringLink State - 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
- provisioning
State 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'.
- virtual
Network stringLink State - 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_ strlink_ state - 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
- provisioning
State 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'.
- virtual
Network StringLink State - 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