1. Packages
  2. Azure Native v2
  3. API Docs
  4. managednetwork
  5. ScopeAssignment
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.ScopeAssignment

Explore with Pulumi AI

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

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

Example Usage

ScopeAssignmentsPut

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

return await Deployment.RunAsync(() => 
{
    var scopeAssignment = new AzureNative.ManagedNetwork.ScopeAssignment("scopeAssignment", new()
    {
        AssignedManagedNetwork = "/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
        Scope = "subscriptions/subscriptionC",
        ScopeAssignmentName = "subscriptionCAssignment",
    });

});
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.NewScopeAssignment(ctx, "scopeAssignment", &managednetwork.ScopeAssignmentArgs{
			AssignedManagedNetwork: pulumi.String("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"),
			Scope:                  pulumi.String("subscriptions/subscriptionC"),
			ScopeAssignmentName:    pulumi.String("subscriptionCAssignment"),
		})
		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.ScopeAssignment;
import com.pulumi.azurenative.managednetwork.ScopeAssignmentArgs;
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 scopeAssignment = new ScopeAssignment("scopeAssignment", ScopeAssignmentArgs.builder()
            .assignedManagedNetwork("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork")
            .scope("subscriptions/subscriptionC")
            .scopeAssignmentName("subscriptionCAssignment")
            .build());

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

const scopeAssignment = new azure_native.managednetwork.ScopeAssignment("scopeAssignment", {
    assignedManagedNetwork: "/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
    scope: "subscriptions/subscriptionC",
    scopeAssignmentName: "subscriptionCAssignment",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

scope_assignment = azure_native.managednetwork.ScopeAssignment("scopeAssignment",
    assigned_managed_network="/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
    scope="subscriptions/subscriptionC",
    scope_assignment_name="subscriptionCAssignment")
Copy
resources:
  scopeAssignment:
    type: azure-native:managednetwork:ScopeAssignment
    properties:
      assignedManagedNetwork: /subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork
      scope: subscriptions/subscriptionC
      scopeAssignmentName: subscriptionCAssignment
Copy

Create ScopeAssignment Resource

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

Constructor syntax

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

@overload
def ScopeAssignment(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    scope: Optional[str] = None,
                    assigned_managed_network: Optional[str] = None,
                    location: Optional[str] = None,
                    scope_assignment_name: Optional[str] = None)
func NewScopeAssignment(ctx *Context, name string, args ScopeAssignmentArgs, opts ...ResourceOption) (*ScopeAssignment, error)
public ScopeAssignment(string name, ScopeAssignmentArgs args, CustomResourceOptions? opts = null)
public ScopeAssignment(String name, ScopeAssignmentArgs args)
public ScopeAssignment(String name, ScopeAssignmentArgs args, CustomResourceOptions options)
type: azure-native:managednetwork:ScopeAssignment
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. ScopeAssignmentArgs
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. ScopeAssignmentArgs
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. ScopeAssignmentArgs
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. ScopeAssignmentArgs
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. ScopeAssignmentArgs
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 scopeAssignmentResource = new AzureNative.Managednetwork.ScopeAssignment("scopeAssignmentResource", new()
{
    Scope = "string",
    AssignedManagedNetwork = "string",
    Location = "string",
    ScopeAssignmentName = "string",
});
Copy
example, err := managednetwork.NewScopeAssignment(ctx, "scopeAssignmentResource", &managednetwork.ScopeAssignmentArgs{
	Scope:                  "string",
	AssignedManagedNetwork: "string",
	Location:               "string",
	ScopeAssignmentName:    "string",
})
Copy
var scopeAssignmentResource = new ScopeAssignment("scopeAssignmentResource", ScopeAssignmentArgs.builder()
    .scope("string")
    .assignedManagedNetwork("string")
    .location("string")
    .scopeAssignmentName("string")
    .build());
Copy
scope_assignment_resource = azure_native.managednetwork.ScopeAssignment("scopeAssignmentResource",
    scope=string,
    assigned_managed_network=string,
    location=string,
    scope_assignment_name=string)
Copy
const scopeAssignmentResource = new azure_native.managednetwork.ScopeAssignment("scopeAssignmentResource", {
    scope: "string",
    assignedManagedNetwork: "string",
    location: "string",
    scopeAssignmentName: "string",
});
Copy
type: azure-native:managednetwork:ScopeAssignment
properties:
    assignedManagedNetwork: string
    location: string
    scope: string
    scopeAssignmentName: string
Copy

ScopeAssignment 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 ScopeAssignment resource accepts the following input properties:

Scope
This property is required.
Changes to this property will trigger replacement.
string
The base resource of the scope assignment to create. The scope can be any REST resource instance. For example, use 'subscriptions/{subscription-id}' for a subscription, 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
AssignedManagedNetwork string
The managed network ID with scope will be assigned to.
Location Changes to this property will trigger replacement. string
The geo-location where the resource lives
ScopeAssignmentName Changes to this property will trigger replacement. string
The name of the scope assignment to create.
Scope
This property is required.
Changes to this property will trigger replacement.
string
The base resource of the scope assignment to create. The scope can be any REST resource instance. For example, use 'subscriptions/{subscription-id}' for a subscription, 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
AssignedManagedNetwork string
The managed network ID with scope will be assigned to.
Location Changes to this property will trigger replacement. string
The geo-location where the resource lives
ScopeAssignmentName Changes to this property will trigger replacement. string
The name of the scope assignment to create.
scope
This property is required.
Changes to this property will trigger replacement.
String
The base resource of the scope assignment to create. The scope can be any REST resource instance. For example, use 'subscriptions/{subscription-id}' for a subscription, 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
assignedManagedNetwork String
The managed network ID with scope will be assigned to.
location Changes to this property will trigger replacement. String
The geo-location where the resource lives
scopeAssignmentName Changes to this property will trigger replacement. String
The name of the scope assignment to create.
scope
This property is required.
Changes to this property will trigger replacement.
string
The base resource of the scope assignment to create. The scope can be any REST resource instance. For example, use 'subscriptions/{subscription-id}' for a subscription, 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
assignedManagedNetwork string
The managed network ID with scope will be assigned to.
location Changes to this property will trigger replacement. string
The geo-location where the resource lives
scopeAssignmentName Changes to this property will trigger replacement. string
The name of the scope assignment to create.
scope
This property is required.
Changes to this property will trigger replacement.
str
The base resource of the scope assignment to create. The scope can be any REST resource instance. For example, use 'subscriptions/{subscription-id}' for a subscription, 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
assigned_managed_network str
The managed network ID with scope will be assigned to.
location Changes to this property will trigger replacement. str
The geo-location where the resource lives
scope_assignment_name Changes to this property will trigger replacement. str
The name of the scope assignment to create.
scope
This property is required.
Changes to this property will trigger replacement.
String
The base resource of the scope assignment to create. The scope can be any REST resource instance. For example, use 'subscriptions/{subscription-id}' for a subscription, 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
assignedManagedNetwork String
The managed network ID with scope will be assigned to.
location Changes to this property will trigger replacement. String
The geo-location where the resource lives
scopeAssignmentName Changes to this property will trigger replacement. String
The name of the scope assignment to create.

Outputs

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

Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
Provisioning state of the ManagedNetwork resource.
Type string
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource
ProvisioningState string
Provisioning state of the ManagedNetwork resource.
Type string
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
Provisioning state of the ManagedNetwork resource.
type String
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
etag string
A unique read-only string that changes whenever the resource is updated.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource
provisioningState string
Provisioning state of the ManagedNetwork resource.
type string
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
etag str
A unique read-only string that changes whenever the resource is updated.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource
provisioning_state str
Provisioning state of the ManagedNetwork resource.
type str
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource
provisioningState String
Provisioning state of the ManagedNetwork resource.
type String
The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.

Import

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

$ pulumi import azure-native:managednetwork:ScopeAssignment subscriptionCAssignment /{scope}/providers/Microsoft.ManagedNetwork/scopeAssignments/{scopeAssignmentName} 
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
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