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

We recommend using Azure Native.

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

azure.network.getIpGroups

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 existing IP Groups.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.network.getIpGroups({
        name: "existing",
        resourceGroupName: "existing",
    });
    export const ids = example.then(example => example.ids);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.network.get_ip_groups(name="existing",
        resource_group_name="existing")
    pulumi.export("ids", example.ids)
    
    package main
    
    import (
    	"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 {
    		example, err := network.GetIpGroups(ctx, &network.GetIpGroupsArgs{
    			Name:              "existing",
    			ResourceGroupName: "existing",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("ids", example.Ids)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Network.GetIpGroups.Invoke(new()
        {
            Name = "existing",
            ResourceGroupName = "existing",
        });
    
        return new Dictionary<string, object?>
        {
            ["ids"] = example.Apply(getIpGroupsResult => getIpGroupsResult.Ids),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.network.NetworkFunctions;
    import com.pulumi.azure.network.inputs.GetIpGroupsArgs;
    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) {
            final var example = NetworkFunctions.getIpGroups(GetIpGroupsArgs.builder()
                .name("existing")
                .resourceGroupName("existing")
                .build());
    
            ctx.export("ids", example.applyValue(getIpGroupsResult -> getIpGroupsResult.ids()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:network:getIpGroups
          Arguments:
            name: existing
            resourceGroupName: existing
    outputs:
      ids: ${example.ids}
    

    Using getIpGroups

    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 getIpGroups(args: GetIpGroupsArgs, opts?: InvokeOptions): Promise<GetIpGroupsResult>
    function getIpGroupsOutput(args: GetIpGroupsOutputArgs, opts?: InvokeOptions): Output<GetIpGroupsResult>
    def get_ip_groups(name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetIpGroupsResult
    def get_ip_groups_output(name: Optional[pulumi.Input[str]] = None,
                      resource_group_name: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetIpGroupsResult]
    func GetIpGroups(ctx *Context, args *GetIpGroupsArgs, opts ...InvokeOption) (*GetIpGroupsResult, error)
    func GetIpGroupsOutput(ctx *Context, args *GetIpGroupsOutputArgs, opts ...InvokeOption) GetIpGroupsResultOutput

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

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

    The following arguments are supported:

    Name string
    A substring to match some number of IP Groups.
    ResourceGroupName string
    The name of the Resource Group where the IP Groups exist.
    Name string
    A substring to match some number of IP Groups.
    ResourceGroupName string
    The name of the Resource Group where the IP Groups exist.
    name String
    A substring to match some number of IP Groups.
    resourceGroupName String
    The name of the Resource Group where the IP Groups exist.
    name string
    A substring to match some number of IP Groups.
    resourceGroupName string
    The name of the Resource Group where the IP Groups exist.
    name str
    A substring to match some number of IP Groups.
    resource_group_name str
    The name of the Resource Group where the IP Groups exist.
    name String
    A substring to match some number of IP Groups.
    resourceGroupName String
    The name of the Resource Group where the IP Groups exist.

    getIpGroups Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of IP Group IDs.
    Location string
    Name string
    Names List<string>
    A list of IP Group Names.
    ResourceGroupName string
    Tags Dictionary<string, string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of IP Group IDs.
    Location string
    Name string
    Names []string
    A list of IP Group Names.
    ResourceGroupName string
    Tags map[string]string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of IP Group IDs.
    location String
    name String
    names List<String>
    A list of IP Group Names.
    resourceGroupName String
    tags Map<String,String>
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of IP Group IDs.
    location string
    name string
    names string[]
    A list of IP Group Names.
    resourceGroupName string
    tags {[key: string]: string}
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of IP Group IDs.
    location str
    name str
    names Sequence[str]
    A list of IP Group Names.
    resource_group_name str
    tags Mapping[str, str]
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of IP Group IDs.
    location String
    name String
    names List<String>
    A list of IP Group Names.
    resourceGroupName String
    tags Map<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