1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. getNetworkManager

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.network.getNetworkManager

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about a Network Manager.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const current = azure.core.getSubscription({});
const exampleNetworkManager = new azure.network.NetworkManager("example", {
    name: "example-network-manager",
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    scope: {
        subscriptionIds: [current.then(current => current.id)],
    },
    scopeAccesses: [
        "Connectivity",
        "SecurityAdmin",
    ],
    description: "example network manager",
});
const example = azure.network.getNetworkManagerOutput({
    name: exampleNetworkManager.name,
    resourceGroupName: exampleNetworkManager.resourceGroupName,
});
Copy
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
current = azure.core.get_subscription()
example_network_manager = azure.network.NetworkManager("example",
    name="example-network-manager",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    scope={
        "subscription_ids": [current.id],
    },
    scope_accesses=[
        "Connectivity",
        "SecurityAdmin",
    ],
    description="example network manager")
example = azure.network.get_network_manager_output(name=example_network_manager.name,
    resource_group_name=example_network_manager.resource_group_name)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		current, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
		if err != nil {
			return err
		}
		exampleNetworkManager, err := network.NewNetworkManager(ctx, "example", &network.NetworkManagerArgs{
			Name:              pulumi.String("example-network-manager"),
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			Scope: &network.NetworkManagerScopeArgs{
				SubscriptionIds: pulumi.StringArray{
					pulumi.String(current.Id),
				},
			},
			ScopeAccesses: pulumi.StringArray{
				pulumi.String("Connectivity"),
				pulumi.String("SecurityAdmin"),
			},
			Description: pulumi.String("example network manager"),
		})
		if err != nil {
			return err
		}
		_ = network.LookupNetworkManagerOutput(ctx, network.GetNetworkManagerOutputArgs{
			Name:              exampleNetworkManager.Name,
			ResourceGroupName: exampleNetworkManager.ResourceGroupName,
		}, nil)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });

    var current = Azure.Core.GetSubscription.Invoke();

    var exampleNetworkManager = new Azure.Network.NetworkManager("example", new()
    {
        Name = "example-network-manager",
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        Scope = new Azure.Network.Inputs.NetworkManagerScopeArgs
        {
            SubscriptionIds = new[]
            {
                current.Apply(getSubscriptionResult => getSubscriptionResult.Id),
            },
        },
        ScopeAccesses = new[]
        {
            "Connectivity",
            "SecurityAdmin",
        },
        Description = "example network manager",
    });

    var example = Azure.Network.GetNetworkManager.Invoke(new()
    {
        Name = exampleNetworkManager.Name,
        ResourceGroupName = exampleNetworkManager.ResourceGroupName,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
import com.pulumi.azure.network.NetworkManager;
import com.pulumi.azure.network.NetworkManagerArgs;
import com.pulumi.azure.network.inputs.NetworkManagerScopeArgs;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetNetworkManagerArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());

        final var current = CoreFunctions.getSubscription();

        var exampleNetworkManager = new NetworkManager("exampleNetworkManager", NetworkManagerArgs.builder()
            .name("example-network-manager")
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .scope(NetworkManagerScopeArgs.builder()
                .subscriptionIds(current.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
                .build())
            .scopeAccesses(            
                "Connectivity",
                "SecurityAdmin")
            .description("example network manager")
            .build());

        final var example = NetworkFunctions.getNetworkManager(GetNetworkManagerArgs.builder()
            .name(exampleNetworkManager.name())
            .resourceGroupName(exampleNetworkManager.resourceGroupName())
            .build());

    }
}
Copy
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    name: example
    properties:
      name: example-resources
      location: West Europe
  exampleNetworkManager:
    type: azure:network:NetworkManager
    name: example
    properties:
      name: example-network-manager
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      scope:
        subscriptionIds:
          - ${current.id}
      scopeAccesses:
        - Connectivity
        - SecurityAdmin
      description: example network manager
variables:
  current:
    fn::invoke:
      function: azure:core:getSubscription
      arguments: {}
  example:
    fn::invoke:
      function: azure:network:getNetworkManager
      arguments:
        name: ${exampleNetworkManager.name}
        resourceGroupName: ${exampleNetworkManager.resourceGroupName}
Copy

Using getNetworkManager

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 getNetworkManager(args: GetNetworkManagerArgs, opts?: InvokeOptions): Promise<GetNetworkManagerResult>
function getNetworkManagerOutput(args: GetNetworkManagerOutputArgs, opts?: InvokeOptions): Output<GetNetworkManagerResult>
Copy
def get_network_manager(name: Optional[str] = None,
                        resource_group_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetNetworkManagerResult
def get_network_manager_output(name: Optional[pulumi.Input[str]] = None,
                        resource_group_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetNetworkManagerResult]
Copy
func LookupNetworkManager(ctx *Context, args *LookupNetworkManagerArgs, opts ...InvokeOption) (*LookupNetworkManagerResult, error)
func LookupNetworkManagerOutput(ctx *Context, args *LookupNetworkManagerOutputArgs, opts ...InvokeOption) LookupNetworkManagerResultOutput
Copy

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

public static class GetNetworkManager 
{
    public static Task<GetNetworkManagerResult> InvokeAsync(GetNetworkManagerArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkManagerResult> Invoke(GetNetworkManagerInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNetworkManagerResult> getNetworkManager(GetNetworkManagerArgs args, InvokeOptions options)
public static Output<GetNetworkManagerResult> getNetworkManager(GetNetworkManagerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:network/getNetworkManager:getNetworkManager
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the Network Manager.
ResourceGroupName This property is required. string
The Name of the Resource Group where the Network Manager exists.
Name This property is required. string
The name of the Network Manager.
ResourceGroupName This property is required. string
The Name of the Resource Group where the Network Manager exists.
name This property is required. String
The name of the Network Manager.
resourceGroupName This property is required. String
The Name of the Resource Group where the Network Manager exists.
name This property is required. string
The name of the Network Manager.
resourceGroupName This property is required. string
The Name of the Resource Group where the Network Manager exists.
name This property is required. str
The name of the Network Manager.
resource_group_name This property is required. str
The Name of the Resource Group where the Network Manager exists.
name This property is required. String
The name of the Network Manager.
resourceGroupName This property is required. String
The Name of the Resource Group where the Network Manager exists.

getNetworkManager Result

The following output properties are available:

CrossTenantScopes List<GetNetworkManagerCrossTenantScope>
One or more cross_tenant_scopes blocks as defined below.
Description string
A description of the Network Manager.
Id string
The provider-assigned unique ID for this managed resource.
Location string
The Azure Region where the Network Manager exists.
Name string
ResourceGroupName string
ScopeAccesses List<string>
A list of configuration deployment type configured on the Network Manager.
Scopes List<GetNetworkManagerScope>
A scope block as defined below.
Tags Dictionary<string, string>
A mapping of tags assigned to the Network Manager.
CrossTenantScopes []GetNetworkManagerCrossTenantScope
One or more cross_tenant_scopes blocks as defined below.
Description string
A description of the Network Manager.
Id string
The provider-assigned unique ID for this managed resource.
Location string
The Azure Region where the Network Manager exists.
Name string
ResourceGroupName string
ScopeAccesses []string
A list of configuration deployment type configured on the Network Manager.
Scopes []GetNetworkManagerScope
A scope block as defined below.
Tags map[string]string
A mapping of tags assigned to the Network Manager.
crossTenantScopes List<GetNetworkManagerCrossTenantScope>
One or more cross_tenant_scopes blocks as defined below.
description String
A description of the Network Manager.
id String
The provider-assigned unique ID for this managed resource.
location String
The Azure Region where the Network Manager exists.
name String
resourceGroupName String
scopeAccesses List<String>
A list of configuration deployment type configured on the Network Manager.
scopes List<GetNetworkManagerScope>
A scope block as defined below.
tags Map<String,String>
A mapping of tags assigned to the Network Manager.
crossTenantScopes GetNetworkManagerCrossTenantScope[]
One or more cross_tenant_scopes blocks as defined below.
description string
A description of the Network Manager.
id string
The provider-assigned unique ID for this managed resource.
location string
The Azure Region where the Network Manager exists.
name string
resourceGroupName string
scopeAccesses string[]
A list of configuration deployment type configured on the Network Manager.
scopes GetNetworkManagerScope[]
A scope block as defined below.
tags {[key: string]: string}
A mapping of tags assigned to the Network Manager.
cross_tenant_scopes Sequence[GetNetworkManagerCrossTenantScope]
One or more cross_tenant_scopes blocks as defined below.
description str
A description of the Network Manager.
id str
The provider-assigned unique ID for this managed resource.
location str
The Azure Region where the Network Manager exists.
name str
resource_group_name str
scope_accesses Sequence[str]
A list of configuration deployment type configured on the Network Manager.
scopes Sequence[GetNetworkManagerScope]
A scope block as defined below.
tags Mapping[str, str]
A mapping of tags assigned to the Network Manager.
crossTenantScopes List<Property Map>
One or more cross_tenant_scopes blocks as defined below.
description String
A description of the Network Manager.
id String
The provider-assigned unique ID for this managed resource.
location String
The Azure Region where the Network Manager exists.
name String
resourceGroupName String
scopeAccesses List<String>
A list of configuration deployment type configured on the Network Manager.
scopes List<Property Map>
A scope block as defined below.
tags Map<String>
A mapping of tags assigned to the Network Manager.

Supporting Types

GetNetworkManagerCrossTenantScope

ManagementGroups This property is required. List<string>
A list of management groups used as cross tenant scope for the Network Manager.
Subscriptions This property is required. List<string>
A list of subscriptions used as cross tenant scope for the Network Manager.
TenantId This property is required. string
The tenant ID of the cross tenant scope.
ManagementGroups This property is required. []string
A list of management groups used as cross tenant scope for the Network Manager.
Subscriptions This property is required. []string
A list of subscriptions used as cross tenant scope for the Network Manager.
TenantId This property is required. string
The tenant ID of the cross tenant scope.
managementGroups This property is required. List<String>
A list of management groups used as cross tenant scope for the Network Manager.
subscriptions This property is required. List<String>
A list of subscriptions used as cross tenant scope for the Network Manager.
tenantId This property is required. String
The tenant ID of the cross tenant scope.
managementGroups This property is required. string[]
A list of management groups used as cross tenant scope for the Network Manager.
subscriptions This property is required. string[]
A list of subscriptions used as cross tenant scope for the Network Manager.
tenantId This property is required. string
The tenant ID of the cross tenant scope.
management_groups This property is required. Sequence[str]
A list of management groups used as cross tenant scope for the Network Manager.
subscriptions This property is required. Sequence[str]
A list of subscriptions used as cross tenant scope for the Network Manager.
tenant_id This property is required. str
The tenant ID of the cross tenant scope.
managementGroups This property is required. List<String>
A list of management groups used as cross tenant scope for the Network Manager.
subscriptions This property is required. List<String>
A list of subscriptions used as cross tenant scope for the Network Manager.
tenantId This property is required. String
The tenant ID of the cross tenant scope.

GetNetworkManagerScope

ManagementGroupIds This property is required. List<string>
A list of management group IDs used a scope for the Network Manager.
SubscriptionIds This property is required. List<string>
A list of subscription IDs used as the scope for the Network Manager.
ManagementGroupIds This property is required. []string
A list of management group IDs used a scope for the Network Manager.
SubscriptionIds This property is required. []string
A list of subscription IDs used as the scope for the Network Manager.
managementGroupIds This property is required. List<String>
A list of management group IDs used a scope for the Network Manager.
subscriptionIds This property is required. List<String>
A list of subscription IDs used as the scope for the Network Manager.
managementGroupIds This property is required. string[]
A list of management group IDs used a scope for the Network Manager.
subscriptionIds This property is required. string[]
A list of subscription IDs used as the scope for the Network Manager.
management_group_ids This property is required. Sequence[str]
A list of management group IDs used a scope for the Network Manager.
subscription_ids This property is required. Sequence[str]
A list of subscription IDs used as the scope for the Network Manager.
managementGroupIds This property is required. List<String>
A list of management group IDs used a scope for the Network Manager.
subscriptionIds This property is required. List<String>
A list of subscription IDs used as the scope for the Network Manager.

Package Details

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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi