1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. getPublicIPPrefix
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.network.getPublicIPPrefix

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

Gets the specified public IP prefix in a specified resource group.

Uses Azure REST API version 2024-05-01.

Other available API versions: 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-03-01, 2020-04-01, 2020-05-01, 2020-06-01, 2020-07-01, 2020-08-01, 2020-11-01, 2021-02-01, 2021-03-01, 2021-05-01, 2021-08-01, 2022-01-01, 2022-05-01, 2022-07-01, 2022-09-01, 2022-11-01, 2023-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native network [ApiVersion]. See the version guide for details.

Using getPublicIPPrefix

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 getPublicIPPrefix(args: GetPublicIPPrefixArgs, opts?: InvokeOptions): Promise<GetPublicIPPrefixResult>
function getPublicIPPrefixOutput(args: GetPublicIPPrefixOutputArgs, opts?: InvokeOptions): Output<GetPublicIPPrefixResult>
Copy
def get_public_ip_prefix(expand: Optional[str] = None,
                         public_ip_prefix_name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetPublicIPPrefixResult
def get_public_ip_prefix_output(expand: Optional[pulumi.Input[str]] = None,
                         public_ip_prefix_name: Optional[pulumi.Input[str]] = None,
                         resource_group_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetPublicIPPrefixResult]
Copy
func LookupPublicIPPrefix(ctx *Context, args *LookupPublicIPPrefixArgs, opts ...InvokeOption) (*LookupPublicIPPrefixResult, error)
func LookupPublicIPPrefixOutput(ctx *Context, args *LookupPublicIPPrefixOutputArgs, opts ...InvokeOption) LookupPublicIPPrefixResultOutput
Copy

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

public static class GetPublicIPPrefix 
{
    public static Task<GetPublicIPPrefixResult> InvokeAsync(GetPublicIPPrefixArgs args, InvokeOptions? opts = null)
    public static Output<GetPublicIPPrefixResult> Invoke(GetPublicIPPrefixInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPublicIPPrefixResult> getPublicIPPrefix(GetPublicIPPrefixArgs args, InvokeOptions options)
public static Output<GetPublicIPPrefixResult> getPublicIPPrefix(GetPublicIPPrefixArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:network:getPublicIPPrefix
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

PublicIpPrefixName
This property is required.
Changes to this property will trigger replacement.
string
The name of the public IP prefix.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Expand string
Expands referenced resources.
PublicIpPrefixName
This property is required.
Changes to this property will trigger replacement.
string
The name of the public IP prefix.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
Expand string
Expands referenced resources.
publicIpPrefixName
This property is required.
Changes to this property will trigger replacement.
String
The name of the public IP prefix.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
expand String
Expands referenced resources.
publicIpPrefixName
This property is required.
Changes to this property will trigger replacement.
string
The name of the public IP prefix.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
expand string
Expands referenced resources.
public_ip_prefix_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the public IP prefix.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
expand str
Expands referenced resources.
publicIpPrefixName
This property is required.
Changes to this property will trigger replacement.
String
The name of the public IP prefix.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
expand String
Expands referenced resources.

getPublicIPPrefix Result

The following output properties are available:

AzureApiVersion string
The Azure API version of the resource.
Etag string
A unique read-only string that changes whenever the resource is updated.
IpPrefix string
The allocated Prefix.
LoadBalancerFrontendIpConfiguration Pulumi.AzureNative.Network.Outputs.SubResourceResponse
The reference to load balancer frontend IP configuration associated with the public IP prefix.
Name string
Resource name.
ProvisioningState string
The provisioning state of the public IP prefix resource.
PublicIPAddresses List<Pulumi.AzureNative.Network.Outputs.ReferencedPublicIpAddressResponse>
The list of all referenced PublicIPAddresses.
ResourceGuid string
The resource GUID property of the public IP prefix resource.
Type string
Resource type.
CustomIPPrefix Pulumi.AzureNative.Network.Outputs.SubResourceResponse
The customIpPrefix that this prefix is associated with.
ExtendedLocation Pulumi.AzureNative.Network.Outputs.ExtendedLocationResponse
The extended location of the public ip address.
Id string
Resource ID.
IpTags List<Pulumi.AzureNative.Network.Outputs.IpTagResponse>
The list of tags associated with the public IP prefix.
Location string
Resource location.
NatGateway Pulumi.AzureNative.Network.Outputs.NatGatewayResponse
NatGateway of Public IP Prefix.
PrefixLength int
The Length of the Public IP Prefix.
PublicIPAddressVersion string
The public IP address version.
Sku Pulumi.AzureNative.Network.Outputs.PublicIPPrefixSkuResponse
The public IP prefix SKU.
Tags Dictionary<string, string>
Resource tags.
Zones List<string>
A list of availability zones denoting the IP allocated for the resource needs to come from.
AzureApiVersion string
The Azure API version of the resource.
Etag string
A unique read-only string that changes whenever the resource is updated.
IpPrefix string
The allocated Prefix.
LoadBalancerFrontendIpConfiguration SubResourceResponse
The reference to load balancer frontend IP configuration associated with the public IP prefix.
Name string
Resource name.
ProvisioningState string
The provisioning state of the public IP prefix resource.
PublicIPAddresses []ReferencedPublicIpAddressResponse
The list of all referenced PublicIPAddresses.
ResourceGuid string
The resource GUID property of the public IP prefix resource.
Type string
Resource type.
CustomIPPrefix SubResourceResponse
The customIpPrefix that this prefix is associated with.
ExtendedLocation ExtendedLocationResponse
The extended location of the public ip address.
Id string
Resource ID.
IpTags []IpTagResponse
The list of tags associated with the public IP prefix.
Location string
Resource location.
NatGateway NatGatewayResponse
NatGateway of Public IP Prefix.
PrefixLength int
The Length of the Public IP Prefix.
PublicIPAddressVersion string
The public IP address version.
Sku PublicIPPrefixSkuResponse
The public IP prefix SKU.
Tags map[string]string
Resource tags.
Zones []string
A list of availability zones denoting the IP allocated for the resource needs to come from.
azureApiVersion String
The Azure API version of the resource.
etag String
A unique read-only string that changes whenever the resource is updated.
ipPrefix String
The allocated Prefix.
loadBalancerFrontendIpConfiguration SubResourceResponse
The reference to load balancer frontend IP configuration associated with the public IP prefix.
name String
Resource name.
provisioningState String
The provisioning state of the public IP prefix resource.
publicIPAddresses List<ReferencedPublicIpAddressResponse>
The list of all referenced PublicIPAddresses.
resourceGuid String
The resource GUID property of the public IP prefix resource.
type String
Resource type.
customIPPrefix SubResourceResponse
The customIpPrefix that this prefix is associated with.
extendedLocation ExtendedLocationResponse
The extended location of the public ip address.
id String
Resource ID.
ipTags List<IpTagResponse>
The list of tags associated with the public IP prefix.
location String
Resource location.
natGateway NatGatewayResponse
NatGateway of Public IP Prefix.
prefixLength Integer
The Length of the Public IP Prefix.
publicIPAddressVersion String
The public IP address version.
sku PublicIPPrefixSkuResponse
The public IP prefix SKU.
tags Map<String,String>
Resource tags.
zones List<String>
A list of availability zones denoting the IP allocated for the resource needs to come from.
azureApiVersion string
The Azure API version of the resource.
etag string
A unique read-only string that changes whenever the resource is updated.
ipPrefix string
The allocated Prefix.
loadBalancerFrontendIpConfiguration SubResourceResponse
The reference to load balancer frontend IP configuration associated with the public IP prefix.
name string
Resource name.
provisioningState string
The provisioning state of the public IP prefix resource.
publicIPAddresses ReferencedPublicIpAddressResponse[]
The list of all referenced PublicIPAddresses.
resourceGuid string
The resource GUID property of the public IP prefix resource.
type string
Resource type.
customIPPrefix SubResourceResponse
The customIpPrefix that this prefix is associated with.
extendedLocation ExtendedLocationResponse
The extended location of the public ip address.
id string
Resource ID.
ipTags IpTagResponse[]
The list of tags associated with the public IP prefix.
location string
Resource location.
natGateway NatGatewayResponse
NatGateway of Public IP Prefix.
prefixLength number
The Length of the Public IP Prefix.
publicIPAddressVersion string
The public IP address version.
sku PublicIPPrefixSkuResponse
The public IP prefix SKU.
tags {[key: string]: string}
Resource tags.
zones string[]
A list of availability zones denoting the IP allocated for the resource needs to come from.
azure_api_version str
The Azure API version of the resource.
etag str
A unique read-only string that changes whenever the resource is updated.
ip_prefix str
The allocated Prefix.
load_balancer_frontend_ip_configuration SubResourceResponse
The reference to load balancer frontend IP configuration associated with the public IP prefix.
name str
Resource name.
provisioning_state str
The provisioning state of the public IP prefix resource.
public_ip_addresses Sequence[ReferencedPublicIpAddressResponse]
The list of all referenced PublicIPAddresses.
resource_guid str
The resource GUID property of the public IP prefix resource.
type str
Resource type.
custom_ip_prefix SubResourceResponse
The customIpPrefix that this prefix is associated with.
extended_location ExtendedLocationResponse
The extended location of the public ip address.
id str
Resource ID.
ip_tags Sequence[IpTagResponse]
The list of tags associated with the public IP prefix.
location str
Resource location.
nat_gateway NatGatewayResponse
NatGateway of Public IP Prefix.
prefix_length int
The Length of the Public IP Prefix.
public_ip_address_version str
The public IP address version.
sku PublicIPPrefixSkuResponse
The public IP prefix SKU.
tags Mapping[str, str]
Resource tags.
zones Sequence[str]
A list of availability zones denoting the IP allocated for the resource needs to come from.
azureApiVersion String
The Azure API version of the resource.
etag String
A unique read-only string that changes whenever the resource is updated.
ipPrefix String
The allocated Prefix.
loadBalancerFrontendIpConfiguration Property Map
The reference to load balancer frontend IP configuration associated with the public IP prefix.
name String
Resource name.
provisioningState String
The provisioning state of the public IP prefix resource.
publicIPAddresses List<Property Map>
The list of all referenced PublicIPAddresses.
resourceGuid String
The resource GUID property of the public IP prefix resource.
type String
Resource type.
customIPPrefix Property Map
The customIpPrefix that this prefix is associated with.
extendedLocation Property Map
The extended location of the public ip address.
id String
Resource ID.
ipTags List<Property Map>
The list of tags associated with the public IP prefix.
location String
Resource location.
natGateway Property Map
NatGateway of Public IP Prefix.
prefixLength Number
The Length of the Public IP Prefix.
publicIPAddressVersion String
The public IP address version.
sku Property Map
The public IP prefix SKU.
tags Map<String>
Resource tags.
zones List<String>
A list of availability zones denoting the IP allocated for the resource needs to come from.

Supporting Types

ExtendedLocationResponse

Name string
The name of the extended location.
Type string
The type of the extended location.
Name string
The name of the extended location.
Type string
The type of the extended location.
name String
The name of the extended location.
type String
The type of the extended location.
name string
The name of the extended location.
type string
The type of the extended location.
name str
The name of the extended location.
type str
The type of the extended location.
name String
The name of the extended location.
type String
The type of the extended location.

IpTagResponse

IpTagType string
The IP tag type. Example: FirstPartyUsage.
Tag string
The value of the IP tag associated with the public IP. Example: SQL.
IpTagType string
The IP tag type. Example: FirstPartyUsage.
Tag string
The value of the IP tag associated with the public IP. Example: SQL.
ipTagType String
The IP tag type. Example: FirstPartyUsage.
tag String
The value of the IP tag associated with the public IP. Example: SQL.
ipTagType string
The IP tag type. Example: FirstPartyUsage.
tag string
The value of the IP tag associated with the public IP. Example: SQL.
ip_tag_type str
The IP tag type. Example: FirstPartyUsage.
tag str
The value of the IP tag associated with the public IP. Example: SQL.
ipTagType String
The IP tag type. Example: FirstPartyUsage.
tag String
The value of the IP tag associated with the public IP. Example: SQL.

NatGatewayResponse

Etag This property is required. string
A unique read-only string that changes whenever the resource is updated.
Name This property is required. string
Resource name.
ProvisioningState This property is required. string
The provisioning state of the NAT gateway resource.
ResourceGuid This property is required. string
The resource GUID property of the NAT gateway resource.
Subnets This property is required. List<Pulumi.AzureNative.Network.Inputs.SubResourceResponse>
An array of references to the subnets using this nat gateway resource.
Type This property is required. string
Resource type.
Id string
Resource ID.
IdleTimeoutInMinutes int
The idle timeout of the nat gateway.
Location string
Resource location.
PublicIpAddresses List<Pulumi.AzureNative.Network.Inputs.SubResourceResponse>
An array of public ip addresses associated with the nat gateway resource.
PublicIpPrefixes List<Pulumi.AzureNative.Network.Inputs.SubResourceResponse>
An array of public ip prefixes associated with the nat gateway resource.
Sku Pulumi.AzureNative.Network.Inputs.NatGatewaySkuResponse
The nat gateway SKU.
Tags Dictionary<string, string>
Resource tags.
Zones List<string>
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
Etag This property is required. string
A unique read-only string that changes whenever the resource is updated.
Name This property is required. string
Resource name.
ProvisioningState This property is required. string
The provisioning state of the NAT gateway resource.
ResourceGuid This property is required. string
The resource GUID property of the NAT gateway resource.
Subnets This property is required. []SubResourceResponse
An array of references to the subnets using this nat gateway resource.
Type This property is required. string
Resource type.
Id string
Resource ID.
IdleTimeoutInMinutes int
The idle timeout of the nat gateway.
Location string
Resource location.
PublicIpAddresses []SubResourceResponse
An array of public ip addresses associated with the nat gateway resource.
PublicIpPrefixes []SubResourceResponse
An array of public ip prefixes associated with the nat gateway resource.
Sku NatGatewaySkuResponse
The nat gateway SKU.
Tags map[string]string
Resource tags.
Zones []string
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
etag This property is required. String
A unique read-only string that changes whenever the resource is updated.
name This property is required. String
Resource name.
provisioningState This property is required. String
The provisioning state of the NAT gateway resource.
resourceGuid This property is required. String
The resource GUID property of the NAT gateway resource.
subnets This property is required. List<SubResourceResponse>
An array of references to the subnets using this nat gateway resource.
type This property is required. String
Resource type.
id String
Resource ID.
idleTimeoutInMinutes Integer
The idle timeout of the nat gateway.
location String
Resource location.
publicIpAddresses List<SubResourceResponse>
An array of public ip addresses associated with the nat gateway resource.
publicIpPrefixes List<SubResourceResponse>
An array of public ip prefixes associated with the nat gateway resource.
sku NatGatewaySkuResponse
The nat gateway SKU.
tags Map<String,String>
Resource tags.
zones List<String>
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
etag This property is required. string
A unique read-only string that changes whenever the resource is updated.
name This property is required. string
Resource name.
provisioningState This property is required. string
The provisioning state of the NAT gateway resource.
resourceGuid This property is required. string
The resource GUID property of the NAT gateway resource.
subnets This property is required. SubResourceResponse[]
An array of references to the subnets using this nat gateway resource.
type This property is required. string
Resource type.
id string
Resource ID.
idleTimeoutInMinutes number
The idle timeout of the nat gateway.
location string
Resource location.
publicIpAddresses SubResourceResponse[]
An array of public ip addresses associated with the nat gateway resource.
publicIpPrefixes SubResourceResponse[]
An array of public ip prefixes associated with the nat gateway resource.
sku NatGatewaySkuResponse
The nat gateway SKU.
tags {[key: string]: string}
Resource tags.
zones string[]
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
etag This property is required. str
A unique read-only string that changes whenever the resource is updated.
name This property is required. str
Resource name.
provisioning_state This property is required. str
The provisioning state of the NAT gateway resource.
resource_guid This property is required. str
The resource GUID property of the NAT gateway resource.
subnets This property is required. Sequence[SubResourceResponse]
An array of references to the subnets using this nat gateway resource.
type This property is required. str
Resource type.
id str
Resource ID.
idle_timeout_in_minutes int
The idle timeout of the nat gateway.
location str
Resource location.
public_ip_addresses Sequence[SubResourceResponse]
An array of public ip addresses associated with the nat gateway resource.
public_ip_prefixes Sequence[SubResourceResponse]
An array of public ip prefixes associated with the nat gateway resource.
sku NatGatewaySkuResponse
The nat gateway SKU.
tags Mapping[str, str]
Resource tags.
zones Sequence[str]
A list of availability zones denoting the zone in which Nat Gateway should be deployed.
etag This property is required. String
A unique read-only string that changes whenever the resource is updated.
name This property is required. String
Resource name.
provisioningState This property is required. String
The provisioning state of the NAT gateway resource.
resourceGuid This property is required. String
The resource GUID property of the NAT gateway resource.
subnets This property is required. List<Property Map>
An array of references to the subnets using this nat gateway resource.
type This property is required. String
Resource type.
id String
Resource ID.
idleTimeoutInMinutes Number
The idle timeout of the nat gateway.
location String
Resource location.
publicIpAddresses List<Property Map>
An array of public ip addresses associated with the nat gateway resource.
publicIpPrefixes List<Property Map>
An array of public ip prefixes associated with the nat gateway resource.
sku Property Map
The nat gateway SKU.
tags Map<String>
Resource tags.
zones List<String>
A list of availability zones denoting the zone in which Nat Gateway should be deployed.

NatGatewaySkuResponse

Name string
Name of Nat Gateway SKU.
Name string
Name of Nat Gateway SKU.
name String
Name of Nat Gateway SKU.
name string
Name of Nat Gateway SKU.
name str
Name of Nat Gateway SKU.
name String
Name of Nat Gateway SKU.

PublicIPPrefixSkuResponse

Name string
Name of a public IP prefix SKU.
Tier string
Tier of a public IP prefix SKU.
Name string
Name of a public IP prefix SKU.
Tier string
Tier of a public IP prefix SKU.
name String
Name of a public IP prefix SKU.
tier String
Tier of a public IP prefix SKU.
name string
Name of a public IP prefix SKU.
tier string
Tier of a public IP prefix SKU.
name str
Name of a public IP prefix SKU.
tier str
Tier of a public IP prefix SKU.
name String
Name of a public IP prefix SKU.
tier String
Tier of a public IP prefix SKU.

ReferencedPublicIpAddressResponse

Id string
The PublicIPAddress Reference.
Id string
The PublicIPAddress Reference.
id String
The PublicIPAddress Reference.
id string
The PublicIPAddress Reference.
id str
The PublicIPAddress Reference.
id String
The PublicIPAddress Reference.

SubResourceResponse

Id string
Resource ID.
Id string
Resource ID.
id String
Resource ID.
id string
Resource ID.
id str
Resource ID.
id String
Resource ID.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi