We recommend using Azure Native.
Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi
azure.network.getPublicIPs
Explore with Pulumi AI
We recommend using Azure Native.
Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi
Use this data source to access information about a set of existing Public IP Addresses.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getPublicIPs({
resourceGroupName: "pip-test",
attachmentStatus: "Attached",
});
import pulumi
import pulumi_azure as azure
example = azure.network.get_public_i_ps(resource_group_name="pip-test",
attachment_status="Attached")
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{
ResourceGroupName: "pip-test",
AttachmentStatus: pulumi.StringRef("Attached"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Network.GetPublicIPs.Invoke(new()
{
ResourceGroupName = "pip-test",
AttachmentStatus = "Attached",
});
});
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()
.resourceGroupName("pip-test")
.attachmentStatus("Attached")
.build());
}
}
variables:
example:
fn::invoke:
Function: azure:network:getPublicIPs
Arguments:
resourceGroupName: pip-test
attachmentStatus: Attached
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:
- Resource
Group stringName - Specifies the name of the resource group.
- Allocation
Type string - The Allocation Type for the Public IP Address. Possible values include
Static
orDynamic
. - Attachment
Status string - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached
) or unattached (Unattached
). - Name
Prefix string - A prefix match used for the IP Addresses
name
field, case sensitive.
- Resource
Group stringName - Specifies the name of the resource group.
- Allocation
Type string - The Allocation Type for the Public IP Address. Possible values include
Static
orDynamic
. - Attachment
Status string - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached
) or unattached (Unattached
). - Name
Prefix string - A prefix match used for the IP Addresses
name
field, case sensitive.
- resource
Group StringName - Specifies the name of the resource group.
- allocation
Type String - The Allocation Type for the Public IP Address. Possible values include
Static
orDynamic
. - attachment
Status String - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached
) or unattached (Unattached
). - name
Prefix String - A prefix match used for the IP Addresses
name
field, case sensitive.
- resource
Group stringName - Specifies the name of the resource group.
- allocation
Type string - The Allocation Type for the Public IP Address. Possible values include
Static
orDynamic
. - attachment
Status string - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached
) or unattached (Unattached
). - name
Prefix string - A prefix match used for the IP Addresses
name
field, case sensitive.
- resource_
group_ strname - Specifies the name of the resource group.
- allocation_
type str - The Allocation Type for the Public IP Address. Possible values include
Static
orDynamic
. - 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.
- resource
Group StringName - Specifies the name of the resource group.
- allocation
Type String - The Allocation Type for the Public IP Address. Possible values include
Static
orDynamic
. - attachment
Status String - Filter to include IP Addresses which are attached to a device, such as a VM/LB (
Attached
) or unattached (Unattached
). - name
Prefix 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.
- Public
Ips List<GetPublic IPs Public Ip> - A List of
public_ips
blocks as defined below filtered by the criteria above. - Resource
Group stringName - Allocation
Type string - Attachment
Status string - Name
Prefix string
- Id string
- The provider-assigned unique ID for this managed resource.
- Public
Ips []GetPublic IPs Public Ip - A List of
public_ips
blocks as defined below filtered by the criteria above. - Resource
Group stringName - Allocation
Type string - Attachment
Status string - Name
Prefix string
- id String
- The provider-assigned unique ID for this managed resource.
- public
Ips List<GetPublic IPs Public Ip> - A List of
public_ips
blocks as defined below filtered by the criteria above. - resource
Group StringName - allocation
Type String - attachment
Status String - name
Prefix String
- id string
- The provider-assigned unique ID for this managed resource.
- public
Ips GetPublic IPs Public Ip[] - A List of
public_ips
blocks as defined below filtered by the criteria above. - resource
Group stringName - allocation
Type string - attachment
Status string - name
Prefix string
- id str
- The provider-assigned unique ID for this managed resource.
- public_
ips Sequence[GetPublic IPs Public Ip] - A List of
public_ips
blocks as defined below filtered by the criteria above. - resource_
group_ strname - allocation_
type str - attachment_
status str - name_
prefix str
- id String
- The provider-assigned unique ID for this managed resource.
- public
Ips List<Property Map> - A List of
public_ips
blocks as defined below filtered by the criteria above. - resource
Group StringName - allocation
Type String - attachment
Status String - name
Prefix String
Supporting Types
GetPublicIPsPublicIp
- Domain
Name stringLabel - 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
- Ip
Address string - The IP address of the Public IP Address
- Name string
- The Name of the Public IP Address
- Domain
Name stringLabel - 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
- Ip
Address string - The IP address of the Public IP Address
- Name string
- The Name of the Public IP Address
- domain
Name StringLabel - 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
- ip
Address String - The IP address of the Public IP Address
- name String
- The Name of the Public IP Address
- domain
Name stringLabel - 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
- ip
Address string - The IP address of the Public IP Address
- name string
- The Name of the Public IP Address
- domain_
name_ strlabel - 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
- domain
Name StringLabel - 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
- ip
Address 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.
We recommend using Azure Native.
Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi