1. Packages
  2. Azure Native v2
  3. API Docs
  4. managednetwork
  5. ManagedNetworkPeeringPolicy
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.managednetwork.ManagedNetworkPeeringPolicy

Explore with Pulumi AI

The Managed Network Peering Policy resource Azure REST API version: 2019-06-01-preview. Prior API version in Azure Native 1.x: 2019-06-01-preview.

Example Usage

ManagedNetworkPeeringPoliciesPut

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var managedNetworkPeeringPolicy = new AzureNative.ManagedNetwork.ManagedNetworkPeeringPolicy("managedNetworkPeeringPolicy", new()
    {
        ManagedNetworkName = "myManagedNetwork",
        ManagedNetworkPeeringPolicyName = "myHubAndSpoke",
        Properties = new AzureNative.ManagedNetwork.Inputs.ManagedNetworkPeeringPolicyPropertiesArgs
        {
            Hub = new AzureNative.ManagedNetwork.Inputs.ResourceIdArgs
            {
                Id = "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet",
            },
            Spokes = new[]
            {
                new AzureNative.ManagedNetwork.Inputs.ResourceIdArgs
                {
                    Id = "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1",
                },
            },
            Type = AzureNative.ManagedNetwork.Type.HubAndSpokeTopology,
        },
        ResourceGroupName = "myResourceGroup",
    });

});
Copy
package main

import (
	managednetwork "github.com/pulumi/pulumi-azure-native-sdk/managednetwork/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := managednetwork.NewManagedNetworkPeeringPolicy(ctx, "managedNetworkPeeringPolicy", &managednetwork.ManagedNetworkPeeringPolicyArgs{
			ManagedNetworkName:              pulumi.String("myManagedNetwork"),
			ManagedNetworkPeeringPolicyName: pulumi.String("myHubAndSpoke"),
			Properties: &managednetwork.ManagedNetworkPeeringPolicyPropertiesArgs{
				Hub: &managednetwork.ResourceIdArgs{
					Id: pulumi.String("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"),
				},
				Spokes: managednetwork.ResourceIdArray{
					&managednetwork.ResourceIdArgs{
						Id: pulumi.String("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1"),
					},
				},
				Type: pulumi.String(managednetwork.TypeHubAndSpokeTopology),
			},
			ResourceGroupName: pulumi.String("myResourceGroup"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.managednetwork.ManagedNetworkPeeringPolicy;
import com.pulumi.azurenative.managednetwork.ManagedNetworkPeeringPolicyArgs;
import com.pulumi.azurenative.managednetwork.inputs.ManagedNetworkPeeringPolicyPropertiesArgs;
import com.pulumi.azurenative.managednetwork.inputs.ResourceIdArgs;
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 managedNetworkPeeringPolicy = new ManagedNetworkPeeringPolicy("managedNetworkPeeringPolicy", ManagedNetworkPeeringPolicyArgs.builder()
            .managedNetworkName("myManagedNetwork")
            .managedNetworkPeeringPolicyName("myHubAndSpoke")
            .properties(ManagedNetworkPeeringPolicyPropertiesArgs.builder()
                .hub(ResourceIdArgs.builder()
                    .id("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet")
                    .build())
                .spokes(ResourceIdArgs.builder()
                    .id("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1")
                    .build())
                .type("HubAndSpokeTopology")
                .build())
            .resourceGroupName("myResourceGroup")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const managedNetworkPeeringPolicy = new azure_native.managednetwork.ManagedNetworkPeeringPolicy("managedNetworkPeeringPolicy", {
    managedNetworkName: "myManagedNetwork",
    managedNetworkPeeringPolicyName: "myHubAndSpoke",
    properties: {
        hub: {
            id: "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet",
        },
        spokes: [{
            id: "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1",
        }],
        type: azure_native.managednetwork.Type.HubAndSpokeTopology,
    },
    resourceGroupName: "myResourceGroup",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

managed_network_peering_policy = azure_native.managednetwork.ManagedNetworkPeeringPolicy("managedNetworkPeeringPolicy",
    managed_network_name="myManagedNetwork",
    managed_network_peering_policy_name="myHubAndSpoke",
    properties={
        "hub": {
            "id": "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet",
        },
        "spokes": [{
            "id": "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1",
        }],
        "type": azure_native.managednetwork.Type.HUB_AND_SPOKE_TOPOLOGY,
    },
    resource_group_name="myResourceGroup")
Copy
resources:
  managedNetworkPeeringPolicy:
    type: azure-native:managednetwork:ManagedNetworkPeeringPolicy
    properties:
      managedNetworkName: myManagedNetwork
      managedNetworkPeeringPolicyName: myHubAndSpoke
      properties:
        hub:
          id: /subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet
        spokes:
          - id: /subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1
        type: HubAndSpokeTopology
      resourceGroupName: myResourceGroup
Copy

Create ManagedNetworkPeeringPolicy Resource

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

Constructor syntax

new ManagedNetworkPeeringPolicy(name: string, args: ManagedNetworkPeeringPolicyArgs, opts?: CustomResourceOptions);
@overload
def ManagedNetworkPeeringPolicy(resource_name: str,
                                args: ManagedNetworkPeeringPolicyArgs,
                                opts: Optional[ResourceOptions] = None)

@overload
def ManagedNetworkPeeringPolicy(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                managed_network_name: Optional[str] = None,
                                resource_group_name: Optional[str] = None,
                                location: Optional[str] = None,
                                managed_network_peering_policy_name: Optional[str] = None,
                                properties: Optional[ManagedNetworkPeeringPolicyPropertiesArgs] = None)
func NewManagedNetworkPeeringPolicy(ctx *Context, name string, args ManagedNetworkPeeringPolicyArgs, opts ...ResourceOption) (*ManagedNetworkPeeringPolicy, error)
public ManagedNetworkPeeringPolicy(string name, ManagedNetworkPeeringPolicyArgs args, CustomResourceOptions? opts = null)
public ManagedNetworkPeeringPolicy(String name, ManagedNetworkPeeringPolicyArgs args)
public ManagedNetworkPeeringPolicy(String name, ManagedNetworkPeeringPolicyArgs args, CustomResourceOptions options)
type: azure-native:managednetwork:ManagedNetworkPeeringPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ManagedNetworkPeeringPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ManagedNetworkPeeringPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ManagedNetworkPeeringPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ManagedNetworkPeeringPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ManagedNetworkPeeringPolicyArgs
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 managedNetworkPeeringPolicyResource = new AzureNative.Managednetwork.ManagedNetworkPeeringPolicy("managedNetworkPeeringPolicyResource", new()
{
    ManagedNetworkName = "string",
    ResourceGroupName = "string",
    Location = "string",
    ManagedNetworkPeeringPolicyName = "string",
    Properties = 
    {
        { "type", "string" },
        { "hub", 
        {
            { "id", "string" },
        } },
        { "mesh", new[]
        {
            
            {
                { "id", "string" },
            },
        } },
        { "spokes", new[]
        {
            
            {
                { "id", "string" },
            },
        } },
    },
});
Copy
example, err := managednetwork.NewManagedNetworkPeeringPolicy(ctx, "managedNetworkPeeringPolicyResource", &managednetwork.ManagedNetworkPeeringPolicyArgs{
	ManagedNetworkName:              "string",
	ResourceGroupName:               "string",
	Location:                        "string",
	ManagedNetworkPeeringPolicyName: "string",
	Properties: map[string]interface{}{
		"type": "string",
		"hub": map[string]interface{}{
			"id": "string",
		},
		"mesh": []map[string]interface{}{
			map[string]interface{}{
				"id": "string",
			},
		},
		"spokes": []map[string]interface{}{
			map[string]interface{}{
				"id": "string",
			},
		},
	},
})
Copy
var managedNetworkPeeringPolicyResource = new ManagedNetworkPeeringPolicy("managedNetworkPeeringPolicyResource", ManagedNetworkPeeringPolicyArgs.builder()
    .managedNetworkName("string")
    .resourceGroupName("string")
    .location("string")
    .managedNetworkPeeringPolicyName("string")
    .properties(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .build());
Copy
managed_network_peering_policy_resource = azure_native.managednetwork.ManagedNetworkPeeringPolicy("managedNetworkPeeringPolicyResource",
    managed_network_name=string,
    resource_group_name=string,
    location=string,
    managed_network_peering_policy_name=string,
    properties={
        type: string,
        hub: {
            id: string,
        },
        mesh: [{
            id: string,
        }],
        spokes: [{
            id: string,
        }],
    })
Copy
const managedNetworkPeeringPolicyResource = new azure_native.managednetwork.ManagedNetworkPeeringPolicy("managedNetworkPeeringPolicyResource", {
    managedNetworkName: "string",
    resourceGroupName: "string",
    location: "string",
    managedNetworkPeeringPolicyName: "string",
    properties: {
        type: "string",
        hub: {
            id: "string",
        },
        mesh: [{
            id: "string",
        }],
        spokes: [{
            id: "string",
        }],
    },
});
Copy
type: azure-native:managednetwork:ManagedNetworkPeeringPolicy
properties:
    location: string
    managedNetworkName: string
    managedNetworkPeeringPolicyName: string
    properties:
        hub:
            id: string
        mesh:
            - id: string
        spokes:
            - id: string
        type: string
    resourceGroupName: string
Copy

ManagedNetworkPeeringPolicy Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ManagedNetworkPeeringPolicy resource accepts the following input properties:

ManagedNetworkName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Managed Network.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Location Changes to this property will trigger replacement. string
The geo-location where the resource lives
ManagedNetworkPeeringPolicyName Changes to this property will trigger replacement. string
The name of the Managed Network Peering Policy.
Properties Pulumi.AzureNative.ManagedNetwork.Inputs.ManagedNetworkPeeringPolicyProperties
Gets or sets the properties of a Managed Network Policy
ManagedNetworkName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Managed Network.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Location Changes to this property will trigger replacement. string
The geo-location where the resource lives
ManagedNetworkPeeringPolicyName Changes to this property will trigger replacement. string
The name of the Managed Network Peering Policy.
Properties ManagedNetworkPeeringPolicyPropertiesArgs
Gets or sets the properties of a Managed Network Policy
managedNetworkName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Managed Network.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
location Changes to this property will trigger replacement. String
The geo-location where the resource lives
managedNetworkPeeringPolicyName Changes to this property will trigger replacement. String
The name of the Managed Network Peering Policy.
properties ManagedNetworkPeeringPolicyProperties
Gets or sets the properties of a Managed Network Policy
managedNetworkName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Managed Network.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
location Changes to this property will trigger replacement. string
The geo-location where the resource lives
managedNetworkPeeringPolicyName Changes to this property will trigger replacement. string
The name of the Managed Network Peering Policy.
properties ManagedNetworkPeeringPolicyProperties
Gets or sets the properties of a Managed Network Policy
managed_network_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Managed Network.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
location Changes to this property will trigger replacement. str
The geo-location where the resource lives
managed_network_peering_policy_name Changes to this property will trigger replacement. str
The name of the Managed Network Peering Policy.
properties ManagedNetworkPeeringPolicyPropertiesArgs
Gets or sets the properties of a Managed Network Policy
managedNetworkName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Managed Network.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
location Changes to this property will trigger replacement. String
The geo-location where the resource lives
managedNetworkPeeringPolicyName Changes to this property will trigger replacement. String
The name of the Managed Network Peering Policy.
properties Property Map
Gets or sets the properties of a Managed Network Policy

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Type string
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
Type string
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
type String
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
type string
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
type str
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
type String
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.

Supporting Types

ManagedNetworkPeeringPolicyProperties
, ManagedNetworkPeeringPolicyPropertiesArgs

Type This property is required. string | Pulumi.AzureNative.ManagedNetwork.Type
Gets or sets the connectivity type of a network structure policy
Hub Pulumi.AzureNative.ManagedNetwork.Inputs.ResourceId
Gets or sets the hub virtual network ID
Mesh List<Pulumi.AzureNative.ManagedNetwork.Inputs.ResourceId>
Gets or sets the mesh group IDs
Spokes List<Pulumi.AzureNative.ManagedNetwork.Inputs.ResourceId>
Gets or sets the spokes group IDs
Type This property is required. string | Type
Gets or sets the connectivity type of a network structure policy
Hub ResourceId
Gets or sets the hub virtual network ID
Mesh []ResourceId
Gets or sets the mesh group IDs
Spokes []ResourceId
Gets or sets the spokes group IDs
type This property is required. String | Type
Gets or sets the connectivity type of a network structure policy
hub ResourceId
Gets or sets the hub virtual network ID
mesh List<ResourceId>
Gets or sets the mesh group IDs
spokes List<ResourceId>
Gets or sets the spokes group IDs
type This property is required. string | Type
Gets or sets the connectivity type of a network structure policy
hub ResourceId
Gets or sets the hub virtual network ID
mesh ResourceId[]
Gets or sets the mesh group IDs
spokes ResourceId[]
Gets or sets the spokes group IDs
type This property is required. str | Type
Gets or sets the connectivity type of a network structure policy
hub ResourceId
Gets or sets the hub virtual network ID
mesh Sequence[ResourceId]
Gets or sets the mesh group IDs
spokes Sequence[ResourceId]
Gets or sets the spokes group IDs
type This property is required. String | "HubAndSpokeTopology" | "MeshTopology"
Gets or sets the connectivity type of a network structure policy
hub Property Map
Gets or sets the hub virtual network ID
mesh List<Property Map>
Gets or sets the mesh group IDs
spokes List<Property Map>
Gets or sets the spokes group IDs

ManagedNetworkPeeringPolicyPropertiesResponse
, ManagedNetworkPeeringPolicyPropertiesResponseArgs

Etag This property is required. string
A unique read-only string that changes whenever the resource is updated.
ProvisioningState This property is required. string
Provisioning state of the ManagedNetwork resource.
Type This property is required. string
Gets or sets the connectivity type of a network structure policy
Hub Pulumi.AzureNative.ManagedNetwork.Inputs.ResourceIdResponse
Gets or sets the hub virtual network ID
Mesh List<Pulumi.AzureNative.ManagedNetwork.Inputs.ResourceIdResponse>
Gets or sets the mesh group IDs
Spokes List<Pulumi.AzureNative.ManagedNetwork.Inputs.ResourceIdResponse>
Gets or sets the spokes group IDs
Etag This property is required. string
A unique read-only string that changes whenever the resource is updated.
ProvisioningState This property is required. string
Provisioning state of the ManagedNetwork resource.
Type This property is required. string
Gets or sets the connectivity type of a network structure policy
Hub ResourceIdResponse
Gets or sets the hub virtual network ID
Mesh []ResourceIdResponse
Gets or sets the mesh group IDs
Spokes []ResourceIdResponse
Gets or sets the spokes group IDs
etag This property is required. String
A unique read-only string that changes whenever the resource is updated.
provisioningState This property is required. String
Provisioning state of the ManagedNetwork resource.
type This property is required. String
Gets or sets the connectivity type of a network structure policy
hub ResourceIdResponse
Gets or sets the hub virtual network ID
mesh List<ResourceIdResponse>
Gets or sets the mesh group IDs
spokes List<ResourceIdResponse>
Gets or sets the spokes group IDs
etag This property is required. string
A unique read-only string that changes whenever the resource is updated.
provisioningState This property is required. string
Provisioning state of the ManagedNetwork resource.
type This property is required. string
Gets or sets the connectivity type of a network structure policy
hub ResourceIdResponse
Gets or sets the hub virtual network ID
mesh ResourceIdResponse[]
Gets or sets the mesh group IDs
spokes ResourceIdResponse[]
Gets or sets the spokes group IDs
etag This property is required. str
A unique read-only string that changes whenever the resource is updated.
provisioning_state This property is required. str
Provisioning state of the ManagedNetwork resource.
type This property is required. str
Gets or sets the connectivity type of a network structure policy
hub ResourceIdResponse
Gets or sets the hub virtual network ID
mesh Sequence[ResourceIdResponse]
Gets or sets the mesh group IDs
spokes Sequence[ResourceIdResponse]
Gets or sets the spokes group IDs
etag This property is required. String
A unique read-only string that changes whenever the resource is updated.
provisioningState This property is required. String
Provisioning state of the ManagedNetwork resource.
type This property is required. String
Gets or sets the connectivity type of a network structure policy
hub Property Map
Gets or sets the hub virtual network ID
mesh List<Property Map>
Gets or sets the mesh group IDs
spokes List<Property Map>
Gets or sets the spokes group IDs

ResourceId
, ResourceIdArgs

Id string
Resource Id
Id string
Resource Id
id String
Resource Id
id string
Resource Id
id str
Resource Id
id String
Resource Id

ResourceIdResponse
, ResourceIdResponseArgs

Id string
Resource Id
Id string
Resource Id
id String
Resource Id
id string
Resource Id
id str
Resource Id
id String
Resource Id

Type
, TypeArgs

HubAndSpokeTopology
HubAndSpokeTopology
MeshTopology
MeshTopology
TypeHubAndSpokeTopology
HubAndSpokeTopology
TypeMeshTopology
MeshTopology
HubAndSpokeTopology
HubAndSpokeTopology
MeshTopology
MeshTopology
HubAndSpokeTopology
HubAndSpokeTopology
MeshTopology
MeshTopology
HUB_AND_SPOKE_TOPOLOGY
HubAndSpokeTopology
MESH_TOPOLOGY
MeshTopology
"HubAndSpokeTopology"
HubAndSpokeTopology
"MeshTopology"
MeshTopology

Import

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

$ pulumi import azure-native:managednetwork:ManagedNetworkPeeringPolicy myHubAndSpoke /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetwork/managedNetworks/{managedNetworkName}/managedNetworkPeeringPolicies/{managedNetworkPeeringPolicyName} 
Copy

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

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0