GetPublicIP
Use this data source to access information about an existing Public IP Address.
Example Usage
Reference An Existing)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Network.GetPublicIP.InvokeAsync(new Azure.Network.GetPublicIPArgs
{
Name = "name_of_public_ip",
ResourceGroupName = "name_of_resource_group",
}));
this.DomainNameLabel = example.Apply(example => example.DomainNameLabel);
this.PublicIpAddress = example.Apply(example => example.IpAddress);
}
[Output("domainNameLabel")]
public Output<string> DomainNameLabel { get; set; }
[Output("publicIpAddress")]
public Output<string> PublicIpAddress { 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.GetPublicIP(ctx, &network.GetPublicIPArgs{
Name: "name_of_public_ip",
ResourceGroupName: "name_of_resource_group",
}, nil)
if err != nil {
return err
}
ctx.Export("domainNameLabel", example.DomainNameLabel)
ctx.Export("publicIpAddress", example.IpAddress)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.network.get_public_ip(name="name_of_public_ip",
resource_group_name="name_of_resource_group")
pulumi.export("domainNameLabel", example.domain_name_label)
pulumi.export("publicIpAddress", example.ip_address)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getPublicIP({
name: "name_of_public_ip",
resourceGroupName: "name_of_resource_group",
});
export const domainNameLabel = example.then(example => example.domainNameLabel);
export const publicIpAddress = example.then(example => example.ipAddress);Using GetPublicIP
function getPublicIP(args: GetPublicIPArgs, opts?: InvokeOptions): Promise<GetPublicIPResult>function get_public_ip(name=None, resource_group_name=None, tags=None, zones=None, opts=None)func GetPublicIP(ctx *Context, args *GetPublicIPArgs, opts ...InvokeOption) (*GetPublicIPResult, error)public static class GetPublicIP {
public static Task<GetPublicIPResult> InvokeAsync(GetPublicIPArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
Specifies the name of the public IP address.
- Resource
Group stringName Specifies the name of the resource group.
- Dictionary<string, string>
A mapping of tags to assigned to the resource.
- Zones List<string>
GetPublicIP Result
The following output properties are available:
- Allocation
Method string - Domain
Name stringLabel The label for the Domain Name.
- Fqdn string
Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
- Id string
The provider-assigned unique ID for this managed resource.
- Idle
Timeout intIn Minutes Specifies the timeout for the TCP idle connection.
- Ip
Address string The IP address value that was allocated.
- Ip
Version string The IP version being used, for example
IPv4orIPv6.- Location string
- Name string
- Resource
Group stringName - Reverse
Fqdn string - Sku string
- Zones List<string>
- Dictionary<string, string>
A mapping of tags to assigned to the resource.
- Allocation
Method string - Domain
Name stringLabel The label for the Domain Name.
- Fqdn string
Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
- Id string
The provider-assigned unique ID for this managed resource.
- Idle
Timeout intIn Minutes Specifies the timeout for the TCP idle connection.
- Ip
Address string The IP address value that was allocated.
- Ip
Version string The IP version being used, for example
IPv4orIPv6.- Location string
- Name string
- Resource
Group stringName - Reverse
Fqdn string - Sku string
- Zones []string
- map[string]string
A mapping of tags to assigned to the resource.
- allocation
Method string - domain
Name stringLabel The label for the Domain Name.
- fqdn string
Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
- id string
The provider-assigned unique ID for this managed resource.
- idle
Timeout numberIn Minutes Specifies the timeout for the TCP idle connection.
- ip
Address string The IP address value that was allocated.
- ip
Version string The IP version being used, for example
IPv4orIPv6.- location string
- name string
- resource
Group stringName - reverse
Fqdn string - sku string
- zones string[]
- {[key: string]: string}
A mapping of tags to assigned to the resource.
- allocation_
method str - domain_
name_ strlabel The label for the Domain Name.
- fqdn str
Fully qualified domain name of the A DNS record associated with the public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone.
- id str
The provider-assigned unique ID for this managed resource.
- idle_
timeout_ floatin_ minutes Specifies the timeout for the TCP idle connection.
- ip_
address str The IP address value that was allocated.
- ip_
version str The IP version being used, for example
IPv4orIPv6.- location str
- name str
- resource_
group_ strname - reverse_
fqdn str - sku str
- zones List[str]
- Dict[str, str]
A mapping of tags to assigned to the resource.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.