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

We recommend using Azure Native.

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

azure.network.getNetworkManagerNetworkGroup

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 Network Group.

    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 exampleNetworkManagerNetworkGroup = new azure.network.NetworkManagerNetworkGroup("example", {
        name: "example-group",
        networkManagerId: exampleNetworkManager.id,
    });
    const example = azure.network.getNetworkManagerNetworkGroupOutput({
        name: exampleNetworkManagerNetworkGroup.name,
        networkManagerId: exampleNetworkManager.id,
    });
    
    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_network_manager_network_group = azure.network.NetworkManagerNetworkGroup("example",
        name="example-group",
        network_manager_id=example_network_manager.id)
    example = azure.network.get_network_manager_network_group_output(name=example_network_manager_network_group.name,
        network_manager_id=example_network_manager.id)
    
    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
    		}
    		exampleNetworkManagerNetworkGroup, err := network.NewNetworkManagerNetworkGroup(ctx, "example", &network.NetworkManagerNetworkGroupArgs{
    			Name:             pulumi.String("example-group"),
    			NetworkManagerId: exampleNetworkManager.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_ = network.LookupNetworkManagerNetworkGroupOutput(ctx, network.GetNetworkManagerNetworkGroupOutputArgs{
    			Name:             exampleNetworkManagerNetworkGroup.Name,
    			NetworkManagerId: exampleNetworkManager.ID(),
    		}, 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 exampleNetworkManagerNetworkGroup = new Azure.Network.NetworkManagerNetworkGroup("example", new()
        {
            Name = "example-group",
            NetworkManagerId = exampleNetworkManager.Id,
        });
    
        var example = Azure.Network.GetNetworkManagerNetworkGroup.Invoke(new()
        {
            Name = exampleNetworkManagerNetworkGroup.Name,
            NetworkManagerId = exampleNetworkManager.Id,
        });
    
    });
    
    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.NetworkManagerNetworkGroup;
    import com.pulumi.azure.network.NetworkManagerNetworkGroupArgs;
    import com.pulumi.azure.network.NetworkFunctions;
    import com.pulumi.azure.network.inputs.GetNetworkManagerNetworkGroupArgs;
    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());
    
            var exampleNetworkManagerNetworkGroup = new NetworkManagerNetworkGroup("exampleNetworkManagerNetworkGroup", NetworkManagerNetworkGroupArgs.builder()
                .name("example-group")
                .networkManagerId(exampleNetworkManager.id())
                .build());
    
            final var example = NetworkFunctions.getNetworkManagerNetworkGroup(GetNetworkManagerNetworkGroupArgs.builder()
                .name(exampleNetworkManagerNetworkGroup.name())
                .networkManagerId(exampleNetworkManager.id())
                .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
      exampleNetworkManagerNetworkGroup:
        type: azure:network:NetworkManagerNetworkGroup
        name: example
        properties:
          name: example-group
          networkManagerId: ${exampleNetworkManager.id}
    variables:
      current:
        fn::invoke:
          Function: azure:core:getSubscription
          Arguments: {}
      example:
        fn::invoke:
          Function: azure:network:getNetworkManagerNetworkGroup
          Arguments:
            name: ${exampleNetworkManagerNetworkGroup.name}
            networkManagerId: ${exampleNetworkManager.id}
    

    Using getNetworkManagerNetworkGroup

    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 getNetworkManagerNetworkGroup(args: GetNetworkManagerNetworkGroupArgs, opts?: InvokeOptions): Promise<GetNetworkManagerNetworkGroupResult>
    function getNetworkManagerNetworkGroupOutput(args: GetNetworkManagerNetworkGroupOutputArgs, opts?: InvokeOptions): Output<GetNetworkManagerNetworkGroupResult>
    def get_network_manager_network_group(name: Optional[str] = None,
                                          network_manager_id: Optional[str] = None,
                                          opts: Optional[InvokeOptions] = None) -> GetNetworkManagerNetworkGroupResult
    def get_network_manager_network_group_output(name: Optional[pulumi.Input[str]] = None,
                                          network_manager_id: Optional[pulumi.Input[str]] = None,
                                          opts: Optional[InvokeOptions] = None) -> Output[GetNetworkManagerNetworkGroupResult]
    func LookupNetworkManagerNetworkGroup(ctx *Context, args *LookupNetworkManagerNetworkGroupArgs, opts ...InvokeOption) (*LookupNetworkManagerNetworkGroupResult, error)
    func LookupNetworkManagerNetworkGroupOutput(ctx *Context, args *LookupNetworkManagerNetworkGroupOutputArgs, opts ...InvokeOption) LookupNetworkManagerNetworkGroupResultOutput

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

    public static class GetNetworkManagerNetworkGroup 
    {
        public static Task<GetNetworkManagerNetworkGroupResult> InvokeAsync(GetNetworkManagerNetworkGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkManagerNetworkGroupResult> Invoke(GetNetworkManagerNetworkGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkManagerNetworkGroupResult> getNetworkManagerNetworkGroup(GetNetworkManagerNetworkGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:network/getNetworkManagerNetworkGroup:getNetworkManagerNetworkGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Specifies the name of the Network Manager Network Group.
    NetworkManagerId string
    Specifies the ID of the Network Manager.
    Name string
    Specifies the name of the Network Manager Network Group.
    NetworkManagerId string
    Specifies the ID of the Network Manager.
    name String
    Specifies the name of the Network Manager Network Group.
    networkManagerId String
    Specifies the ID of the Network Manager.
    name string
    Specifies the name of the Network Manager Network Group.
    networkManagerId string
    Specifies the ID of the Network Manager.
    name str
    Specifies the name of the Network Manager Network Group.
    network_manager_id str
    Specifies the ID of the Network Manager.
    name String
    Specifies the name of the Network Manager Network Group.
    networkManagerId String
    Specifies the ID of the Network Manager.

    getNetworkManagerNetworkGroup Result

    The following output properties are available:

    Description string
    A description of the Network Manager Network Group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    NetworkManagerId string
    Description string
    A description of the Network Manager Network Group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    NetworkManagerId string
    description String
    A description of the Network Manager Network Group.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    networkManagerId String
    description string
    A description of the Network Manager Network Group.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    networkManagerId string
    description str
    A description of the Network Manager Network Group.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    network_manager_id str
    description String
    A description of the Network Manager Network Group.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    networkManagerId String

    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