get Public IPs
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",
});
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.network.get_public_i_ps(resource_group_name="pip-test",
attachment_status="Attached")
Content copied to clipboard
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",
});
});
Content copied to clipboard
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 {
_, err := network.GetPublicIPs(ctx, &network.GetPublicIPsArgs{
ResourceGroupName: "pip-test",
AttachmentStatus: pulumi.StringRef("Attached"),
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:network:getPublicIPs
arguments:
resourceGroupName: pip-test
attachmentStatus: Attached
Content copied to clipboard
Return
A collection of values returned by getPublicIPs.
Parameters
argument
A collection of arguments for invoking getPublicIPs.
suspend fun getPublicIPs(allocationType: String? = null, attachmentStatus: String? = null, namePrefix: String? = null, resourceGroupName: String): GetPublicIPsResult
Return
A collection of values returned by getPublicIPs.
Parameters
allocation Type
The Allocation Type for the Public IP Address. Possible values include Static
or Dynamic
.
attachment Status
Filter to include IP Addresses which are attached to a device, such as a VM/LB (Attached
) or unattached (Unattached
).
name Prefix
A prefix match used for the IP Addresses name
field, case sensitive.
resource Group Name
Specifies the name of the resource group.
See also
suspend fun getPublicIPs(argument: suspend GetPublicIPsPlainArgsBuilder.() -> Unit): GetPublicIPsResult
Return
A collection of values returned by getPublicIPs.
Parameters
argument
Builder for com.pulumi.azure.network.kotlin.inputs.GetPublicIPsPlainArgs.