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

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.network.getNetworkManager

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 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,
    });
    
    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)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    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}
    

    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>
    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]
    func LookupNetworkManager(ctx *Context, args *LookupNetworkManagerArgs, opts ...InvokeOption) (*LookupNetworkManagerResult, error)
    func LookupNetworkManagerOutput(ctx *Context, args *LookupNetworkManagerOutputArgs, opts ...InvokeOption) LookupNetworkManagerResultOutput

    > 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)
    }
    public static CompletableFuture<GetNetworkManagerResult> getNetworkManager(GetNetworkManagerArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:network/getNetworkManager:getNetworkManager
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Network Manager.
    ResourceGroupName string
    The Name of the Resource Group where the Network Manager exists.
    Name string
    The name of the Network Manager.
    ResourceGroupName string
    The Name of the Resource Group where the Network Manager exists.
    name String
    The name of the Network Manager.
    resourceGroupName String
    The Name of the Resource Group where the Network Manager exists.
    name string
    The name of the Network Manager.
    resourceGroupName string
    The Name of the Resource Group where the Network Manager exists.
    name str
    The name of the Network Manager.
    resource_group_name str
    The Name of the Resource Group where the Network Manager exists.
    name String
    The name of the Network Manager.
    resourceGroupName 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 List<string>
    A list of management groups used as cross tenant scope for the Network Manager.
    Subscriptions List<string>
    A list of subscriptions used as cross tenant scope for the Network Manager.
    TenantId string
    The tenant ID of the cross tenant scope.
    ManagementGroups []string
    A list of management groups used as cross tenant scope for the Network Manager.
    Subscriptions []string
    A list of subscriptions used as cross tenant scope for the Network Manager.
    TenantId string
    The tenant ID of the cross tenant scope.
    managementGroups List<String>
    A list of management groups used as cross tenant scope for the Network Manager.
    subscriptions List<String>
    A list of subscriptions used as cross tenant scope for the Network Manager.
    tenantId String
    The tenant ID of the cross tenant scope.
    managementGroups string[]
    A list of management groups used as cross tenant scope for the Network Manager.
    subscriptions string[]
    A list of subscriptions used as cross tenant scope for the Network Manager.
    tenantId string
    The tenant ID of the cross tenant scope.
    management_groups Sequence[str]
    A list of management groups used as cross tenant scope for the Network Manager.
    subscriptions Sequence[str]
    A list of subscriptions used as cross tenant scope for the Network Manager.
    tenant_id str
    The tenant ID of the cross tenant scope.
    managementGroups List<String>
    A list of management groups used as cross tenant scope for the Network Manager.
    subscriptions List<String>
    A list of subscriptions used as cross tenant scope for the Network Manager.
    tenantId String
    The tenant ID of the cross tenant scope.

    GetNetworkManagerScope

    ManagementGroupIds List<string>
    A list of management group IDs used a scope for the Network Manager.
    SubscriptionIds List<string>
    A list of subscription IDs used as the scope for the Network Manager.
    ManagementGroupIds []string
    A list of management group IDs used a scope for the Network Manager.
    SubscriptionIds []string
    A list of subscription IDs used as the scope for the Network Manager.
    managementGroupIds List<String>
    A list of management group IDs used a scope for the Network Manager.
    subscriptionIds List<String>
    A list of subscription IDs used as the scope for the Network Manager.
    managementGroupIds string[]
    A list of management group IDs used a scope for the Network Manager.
    subscriptionIds string[]
    A list of subscription IDs used as the scope for the Network Manager.
    management_group_ids Sequence[str]
    A list of management group IDs used a scope for the Network Manager.
    subscription_ids Sequence[str]
    A list of subscription IDs used as the scope for the Network Manager.
    managementGroupIds List<String>
    A list of management group IDs used a scope for the Network Manager.
    subscriptionIds 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.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi