azure logo
Azure Classic v5.43.0, May 6 23

azure.network.getPublicIPs

Explore with Pulumi AI

Use this data source to access information about a set of existing Public IP Addresses.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var example = Azure.Network.GetPublicIPs.Invoke(new()
    {
        AttachmentStatus = "Attached",
        ResourceGroupName = "pip-test",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.GetPublicIPs(ctx, &network.GetPublicIPsArgs{
			AttachmentStatus:  pulumi.StringRef("Attached"),
			ResourceGroupName: "pip-test",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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.GetPublicIPsArgs;
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.getPublicIPs(GetPublicIPsArgs.builder()
            .attachmentStatus("Attached")
            .resourceGroupName("pip-test")
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example = azure.network.get_public_i_ps(attachment_status="Attached",
    resource_group_name="pip-test")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.network.getPublicIPs({
    attachmentStatus: "Attached",
    resourceGroupName: "pip-test",
});
variables:
  example:
    fn::invoke:
      Function: azure:network:getPublicIPs
      Arguments:
        attachmentStatus: Attached
        resourceGroupName: pip-test

Using getPublicIPs

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 getPublicIPs(args: GetPublicIPsArgs, opts?: InvokeOptions): Promise<GetPublicIPsResult>
function getPublicIPsOutput(args: GetPublicIPsOutputArgs, opts?: InvokeOptions): Output<GetPublicIPsResult>
def get_public_i_ps(allocation_type: Optional[str] = None,
                    attachment_status: Optional[str] = None,
                    name_prefix: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetPublicIPsResult
def get_public_i_ps_output(allocation_type: Optional[pulumi.Input[str]] = None,
                    attachment_status: Optional[pulumi.Input[str]] = None,
                    name_prefix: Optional[pulumi.Input[str]] = None,
                    resource_group_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetPublicIPsResult]
func GetPublicIPs(ctx *Context, args *GetPublicIPsArgs, opts ...InvokeOption) (*GetPublicIPsResult, error)
func GetPublicIPsOutput(ctx *Context, args *GetPublicIPsOutputArgs, opts ...InvokeOption) GetPublicIPsResultOutput

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

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

The following arguments are supported:

ResourceGroupName string

Specifies the name of the resource group.

AllocationType string

The Allocation Type for the Public IP Address. Possible values include Static or Dynamic.

AttachmentStatus string

Filter to include IP Addresses which are attached to a device, such as a VM/LB (Attached) or unattached (Unattached).

NamePrefix string

A prefix match used for the IP Addresses name field, case sensitive.

ResourceGroupName string

Specifies the name of the resource group.

AllocationType string

The Allocation Type for the Public IP Address. Possible values include Static or Dynamic.

AttachmentStatus string

Filter to include IP Addresses which are attached to a device, such as a VM/LB (Attached) or unattached (Unattached).

NamePrefix string

A prefix match used for the IP Addresses name field, case sensitive.

resourceGroupName String

Specifies the name of the resource group.

allocationType String

The Allocation Type for the Public IP Address. Possible values include Static or Dynamic.

attachmentStatus String

Filter to include IP Addresses which are attached to a device, such as a VM/LB (Attached) or unattached (Unattached).

namePrefix String

A prefix match used for the IP Addresses name field, case sensitive.

resourceGroupName string

Specifies the name of the resource group.

allocationType string

The Allocation Type for the Public IP Address. Possible values include Static or Dynamic.

attachmentStatus string

Filter to include IP Addresses which are attached to a device, such as a VM/LB (Attached) or unattached (Unattached).

namePrefix string

A prefix match used for the IP Addresses name field, case sensitive.

resource_group_name str

Specifies the name of the resource group.

allocation_type str

The Allocation Type for the Public IP Address. Possible values include Static or Dynamic.

attachment_status str

Filter to include IP Addresses which are attached to a device, such as a VM/LB (Attached) or unattached (Unattached).

name_prefix str

A prefix match used for the IP Addresses name field, case sensitive.

resourceGroupName String

Specifies the name of the resource group.

allocationType String

The Allocation Type for the Public IP Address. Possible values include Static or Dynamic.

attachmentStatus String

Filter to include IP Addresses which are attached to a device, such as a VM/LB (Attached) or unattached (Unattached).

namePrefix String

A prefix match used for the IP Addresses name field, case sensitive.

getPublicIPs Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

PublicIps List<GetPublicIPsPublicIp>

A List of public_ips blocks as defined below filtered by the criteria above.

ResourceGroupName string
AllocationType string
AttachmentStatus string
NamePrefix string
Id string

The provider-assigned unique ID for this managed resource.

PublicIps []GetPublicIPsPublicIp

A List of public_ips blocks as defined below filtered by the criteria above.

ResourceGroupName string
AllocationType string
AttachmentStatus string
NamePrefix string
id String

The provider-assigned unique ID for this managed resource.

publicIps List<GetPublicIPsPublicIp>

A List of public_ips blocks as defined below filtered by the criteria above.

resourceGroupName String
allocationType String
attachmentStatus String
namePrefix String
id string

The provider-assigned unique ID for this managed resource.

publicIps GetPublicIPsPublicIp[]

A List of public_ips blocks as defined below filtered by the criteria above.

resourceGroupName string
allocationType string
attachmentStatus string
namePrefix string
id str

The provider-assigned unique ID for this managed resource.

public_ips Sequence[GetPublicIPsPublicIp]

A List of public_ips blocks as defined below filtered by the criteria above.

resource_group_name str
allocation_type str
attachment_status str
name_prefix str
id String

The provider-assigned unique ID for this managed resource.

publicIps List<Property Map>

A List of public_ips blocks as defined below filtered by the criteria above.

resourceGroupName String
allocationType String
attachmentStatus String
namePrefix String

Supporting Types

GetPublicIPsPublicIp

DomainNameLabel string

The Domain Name Label of the Public IP Address

Fqdn string

The FQDN of the Public IP Address

Id string

The ID of the Public IP Address

IpAddress string

The IP address of the Public IP Address

Name string

The Name of the Public IP Address

DomainNameLabel string

The Domain Name Label of the Public IP Address

Fqdn string

The FQDN of the Public IP Address

Id string

The ID of the Public IP Address

IpAddress string

The IP address of the Public IP Address

Name string

The Name of the Public IP Address

domainNameLabel String

The Domain Name Label of the Public IP Address

fqdn String

The FQDN of the Public IP Address

id String

The ID of the Public IP Address

ipAddress String

The IP address of the Public IP Address

name String

The Name of the Public IP Address

domainNameLabel string

The Domain Name Label of the Public IP Address

fqdn string

The FQDN of the Public IP Address

id string

The ID of the Public IP Address

ipAddress string

The IP address of the Public IP Address

name string

The Name of the Public IP Address

domain_name_label str

The Domain Name Label of the Public IP Address

fqdn str

The FQDN of the Public IP Address

id str

The ID of the Public IP Address

ip_address str

The IP address of the Public IP Address

name str

The Name of the Public IP Address

domainNameLabel String

The Domain Name Label of the Public IP Address

fqdn String

The FQDN of the Public IP Address

id String

The ID of the Public IP Address

ipAddress String

The IP address of the Public IP Address

name String

The Name of the Public IP Address

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.