GetPublicIpPrefix

Use this data source to access information about an existing Public IP Prefix.

Example Usage

Reference An Existing)

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Network.GetPublicIpPrefix.InvokeAsync(new Azure.Network.GetPublicIpPrefixArgs
        {
            Name = "name_of_public_ip",
            ResourceGroupName = "name_of_resource_group",
        }));
        this.PublicIpPrefix = example.Apply(example => example.IpPrefix);
    }

    [Output("publicIpPrefix")]
    public Output<string> PublicIpPrefix { get; set; }
}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := network.LookupPublicIpPrefix(ctx, &network.LookupPublicIpPrefixArgs{
            Name:              "name_of_public_ip",
            ResourceGroupName: "name_of_resource_group",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("publicIpPrefix", example.IpPrefix)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.network.get_public_ip_prefix(name="name_of_public_ip",
    resource_group_name="name_of_resource_group")
pulumi.export("publicIpPrefix", example.ip_prefix)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.network.getPublicIpPrefix({
    name: "name_of_public_ip",
    resourceGroupName: "name_of_resource_group",
});
export const publicIpPrefix = example.then(example => example.ipPrefix);

Using GetPublicIpPrefix

function getPublicIpPrefix(args: GetPublicIpPrefixArgs, opts?: InvokeOptions): Promise<GetPublicIpPrefixResult>
function  get_public_ip_prefix(name=None, resource_group_name=None, zones=None, opts=None)
func LookupPublicIpPrefix(ctx *Context, args *LookupPublicIpPrefixArgs, opts ...InvokeOption) (*LookupPublicIpPrefixResult, error)

Note: This function is named LookupPublicIpPrefix in the Go SDK.

public static class GetPublicIpPrefix {
    public static Task<GetPublicIpPrefixResult> InvokeAsync(GetPublicIpPrefixArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

Specifies the name of the public IP prefix.

ResourceGroupName string

Specifies the name of the resource group.

Zones List<string>
Name string

Specifies the name of the public IP prefix.

ResourceGroupName string

Specifies the name of the resource group.

Zones []string
name string

Specifies the name of the public IP prefix.

resourceGroupName string

Specifies the name of the resource group.

zones string[]
name str

Specifies the name of the public IP prefix.

resource_group_name str

Specifies the name of the resource group.

zones List[str]

GetPublicIpPrefix Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

IpPrefix string
Location string

The supported Azure location where the resource exists.

Name string

The name of the Public IP prefix resource.

PrefixLength int

The number of bits of the prefix.

ResourceGroupName string

The name of the resource group in which to create the public IP.

Sku string

The SKU of the Public IP Prefix.

Tags Dictionary<string, string>

A mapping of tags to assigned to the resource.

Zones List<string>
Id string

The provider-assigned unique ID for this managed resource.

IpPrefix string
Location string

The supported Azure location where the resource exists.

Name string

The name of the Public IP prefix resource.

PrefixLength int

The number of bits of the prefix.

ResourceGroupName string

The name of the resource group in which to create the public IP.

Sku string

The SKU of the Public IP Prefix.

Tags map[string]string

A mapping of tags to assigned to the resource.

Zones []string
id string

The provider-assigned unique ID for this managed resource.

ipPrefix string
location string

The supported Azure location where the resource exists.

name string

The name of the Public IP prefix resource.

prefixLength number

The number of bits of the prefix.

resourceGroupName string

The name of the resource group in which to create the public IP.

sku string

The SKU of the Public IP Prefix.

tags {[key: string]: string}

A mapping of tags to assigned to the resource.

zones string[]
id str

The provider-assigned unique ID for this managed resource.

ip_prefix str
location str

The supported Azure location where the resource exists.

name str

The name of the Public IP prefix resource.

prefix_length float

The number of bits of the prefix.

resource_group_name str

The name of the resource group in which to create the public IP.

sku str

The SKU of the Public IP Prefix.

tags Dict[str, str]

A mapping of tags to assigned to the resource.

zones List[str]

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.