PublicIPAddressArgs

data class PublicIPAddressArgs(val ddosSettings: Output<DdosSettingsArgs>? = null, val deleteOption: Output<Either<String, DeleteOptions>>? = null, val dnsSettings: Output<PublicIPAddressDnsSettingsArgs>? = null, val extendedLocation: Output<ExtendedLocationArgs>? = null, val id: Output<String>? = null, val idleTimeoutInMinutes: Output<Int>? = null, val ipAddress: Output<String>? = null, val ipTags: Output<List<IpTagArgs>>? = null, val linkedPublicIPAddress: Output<PublicIPAddressArgs>? = null, val location: Output<String>? = null, val migrationPhase: Output<Either<String, PublicIPAddressMigrationPhase>>? = null, val natGateway: Output<NatGatewayArgs>? = null, val publicIPAddressVersion: Output<Either<String, IPVersion>>? = null, val publicIPAllocationMethod: Output<Either<String, IPAllocationMethod>>? = null, val publicIPPrefix: Output<SubResourceArgs>? = null, val publicIpAddressName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val servicePublicIPAddress: Output<PublicIPAddressArgs>? = null, val sku: Output<PublicIPAddressSkuArgs>? = null, val tags: Output<Map<String, String>>? = null, val zones: Output<List<String>>? = null) : ConvertibleToJava<PublicIPAddressArgs>

Public IP address resource. Uses Azure REST API version 2024-05-01. In version 2.x of the Azure Native provider, it used API version 2023-02-01. Other available API versions: 2018-06-01, 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/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create public IP address DNS

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var publicIPAddress = new AzureNative.Network.PublicIPAddress("publicIPAddress", new()
{
DnsSettings = new AzureNative.Network.Inputs.PublicIPAddressDnsSettingsArgs
{
DomainNameLabel = "dnslbl",
},
Location = "eastus",
PublicIpAddressName = "test-ip",
ResourceGroupName = "rg1",
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewPublicIPAddress(ctx, "publicIPAddress", &network.PublicIPAddressArgs{
DnsSettings: &network.PublicIPAddressDnsSettingsArgs{
DomainNameLabel: pulumi.String("dnslbl"),
},
Location: pulumi.String("eastus"),
PublicIpAddressName: pulumi.String("test-ip"),
ResourceGroupName: pulumi.String("rg1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.PublicIPAddress;
import com.pulumi.azurenative.network.PublicIPAddressArgs;
import com.pulumi.azurenative.network.inputs.PublicIPAddressDnsSettingsArgs;
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) {
var publicIPAddress = new PublicIPAddress("publicIPAddress", PublicIPAddressArgs.builder()
.dnsSettings(PublicIPAddressDnsSettingsArgs.builder()
.domainNameLabel("dnslbl")
.build())
.location("eastus")
.publicIpAddressName("test-ip")
.resourceGroupName("rg1")
.build());
}
}

Create public IP address DNS with Domain Name Label Scope

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var publicIPAddress = new AzureNative.Network.PublicIPAddress("publicIPAddress", new()
{
DnsSettings = new AzureNative.Network.Inputs.PublicIPAddressDnsSettingsArgs
{
DomainNameLabel = "dnslbl",
DomainNameLabelScope = AzureNative.Network.PublicIpAddressDnsSettingsDomainNameLabelScope.TenantReuse,
},
Location = "eastus",
PublicIpAddressName = "test-ip",
ResourceGroupName = "rg1",
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewPublicIPAddress(ctx, "publicIPAddress", &network.PublicIPAddressArgs{
DnsSettings: &network.PublicIPAddressDnsSettingsArgs{
DomainNameLabel: pulumi.String("dnslbl"),
DomainNameLabelScope: network.PublicIpAddressDnsSettingsDomainNameLabelScopeTenantReuse,
},
Location: pulumi.String("eastus"),
PublicIpAddressName: pulumi.String("test-ip"),
ResourceGroupName: pulumi.String("rg1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.PublicIPAddress;
import com.pulumi.azurenative.network.PublicIPAddressArgs;
import com.pulumi.azurenative.network.inputs.PublicIPAddressDnsSettingsArgs;
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) {
var publicIPAddress = new PublicIPAddress("publicIPAddress", PublicIPAddressArgs.builder()
.dnsSettings(PublicIPAddressDnsSettingsArgs.builder()
.domainNameLabel("dnslbl")
.domainNameLabelScope("TenantReuse")
.build())
.location("eastus")
.publicIpAddressName("test-ip")
.resourceGroupName("rg1")
.build());
}
}

Create public IP address allocation method

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var publicIPAddress = new AzureNative.Network.PublicIPAddress("publicIPAddress", new()
{
IdleTimeoutInMinutes = 10,
Location = "eastus",
PublicIPAddressVersion = AzureNative.Network.IPVersion.IPv4,
PublicIPAllocationMethod = AzureNative.Network.IPAllocationMethod.Static,
PublicIpAddressName = "test-ip",
ResourceGroupName = "rg1",
Sku = new AzureNative.Network.Inputs.PublicIPAddressSkuArgs
{
Name = AzureNative.Network.PublicIPAddressSkuName.Standard,
Tier = AzureNative.Network.PublicIPAddressSkuTier.Global,
},
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewPublicIPAddress(ctx, "publicIPAddress", &network.PublicIPAddressArgs{
IdleTimeoutInMinutes: pulumi.Int(10),
Location: pulumi.String("eastus"),
PublicIPAddressVersion: pulumi.String(network.IPVersionIPv4),
PublicIPAllocationMethod: pulumi.String(network.IPAllocationMethodStatic),
PublicIpAddressName: pulumi.String("test-ip"),
ResourceGroupName: pulumi.String("rg1"),
Sku: &network.PublicIPAddressSkuArgs{
Name: pulumi.String(network.PublicIPAddressSkuNameStandard),
Tier: pulumi.String(network.PublicIPAddressSkuTierGlobal),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.PublicIPAddress;
import com.pulumi.azurenative.network.PublicIPAddressArgs;
import com.pulumi.azurenative.network.inputs.PublicIPAddressSkuArgs;
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) {
var publicIPAddress = new PublicIPAddress("publicIPAddress", PublicIPAddressArgs.builder()
.idleTimeoutInMinutes(10)
.location("eastus")
.publicIPAddressVersion("IPv4")
.publicIPAllocationMethod("Static")
.publicIpAddressName("test-ip")
.resourceGroupName("rg1")
.sku(PublicIPAddressSkuArgs.builder()
.name("Standard")
.tier("Global")
.build())
.build());
}
}

Create public IP address defaults

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var publicIPAddress = new AzureNative.Network.PublicIPAddress("publicIPAddress", new()
{
Location = "eastus",
PublicIpAddressName = "test-ip",
ResourceGroupName = "rg1",
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := network.NewPublicIPAddress(ctx, "publicIPAddress", &network.PublicIPAddressArgs{
Location: pulumi.String("eastus"),
PublicIpAddressName: pulumi.String("test-ip"),
ResourceGroupName: pulumi.String("rg1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.PublicIPAddress;
import com.pulumi.azurenative.network.PublicIPAddressArgs;
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) {
var publicIPAddress = new PublicIPAddress("publicIPAddress", PublicIPAddressArgs.builder()
.location("eastus")
.publicIpAddressName("test-ip")
.resourceGroupName("rg1")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:PublicIPAddress testDNS-ip /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}

Constructors

Link copied to clipboard
constructor(ddosSettings: Output<DdosSettingsArgs>? = null, deleteOption: Output<Either<String, DeleteOptions>>? = null, dnsSettings: Output<PublicIPAddressDnsSettingsArgs>? = null, extendedLocation: Output<ExtendedLocationArgs>? = null, id: Output<String>? = null, idleTimeoutInMinutes: Output<Int>? = null, ipAddress: Output<String>? = null, ipTags: Output<List<IpTagArgs>>? = null, linkedPublicIPAddress: Output<PublicIPAddressArgs>? = null, location: Output<String>? = null, migrationPhase: Output<Either<String, PublicIPAddressMigrationPhase>>? = null, natGateway: Output<NatGatewayArgs>? = null, publicIPAddressVersion: Output<Either<String, IPVersion>>? = null, publicIPAllocationMethod: Output<Either<String, IPAllocationMethod>>? = null, publicIPPrefix: Output<SubResourceArgs>? = null, publicIpAddressName: Output<String>? = null, resourceGroupName: Output<String>? = null, servicePublicIPAddress: Output<PublicIPAddressArgs>? = null, sku: Output<PublicIPAddressSkuArgs>? = null, tags: Output<Map<String, String>>? = null, zones: Output<List<String>>? = null)

Properties

Link copied to clipboard
val ddosSettings: Output<DdosSettingsArgs>? = null

The DDoS protection custom policy associated with the public IP address.

Link copied to clipboard
val deleteOption: Output<Either<String, DeleteOptions>>? = null

Specify what happens to the public IP address when the VM using it is deleted

Link copied to clipboard

The FQDN of the DNS record associated with the public IP address.

Link copied to clipboard

The extended location of the public ip address.

Link copied to clipboard
val id: Output<String>? = null

Resource ID.

Link copied to clipboard
val idleTimeoutInMinutes: Output<Int>? = null

The idle timeout of the public IP address.

Link copied to clipboard
val ipAddress: Output<String>? = null

The IP address associated with the public IP address resource.

Link copied to clipboard
val ipTags: Output<List<IpTagArgs>>? = null

The list of tags associated with the public IP address.

Link copied to clipboard

The linked public IP address of the public IP address resource.

Link copied to clipboard
val location: Output<String>? = null

Resource location.

Link copied to clipboard

Migration phase of Public IP Address.

Link copied to clipboard
val natGateway: Output<NatGatewayArgs>? = null

The NatGateway for the Public IP address.

Link copied to clipboard
val publicIpAddressName: Output<String>? = null

The name of the public IP address.

Link copied to clipboard
val publicIPAddressVersion: Output<Either<String, IPVersion>>? = null

The public IP address version.

Link copied to clipboard
val publicIPAllocationMethod: Output<Either<String, IPAllocationMethod>>? = null

The public IP address allocation method.

Link copied to clipboard
val publicIPPrefix: Output<SubResourceArgs>? = null

The Public IP Prefix this Public IP Address should be allocated from.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard

The service public IP address of the public IP address resource.

Link copied to clipboard
val sku: Output<PublicIPAddressSkuArgs>? = null

The public IP address SKU.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val zones: Output<List<String>>? = null

A list of availability zones denoting the IP allocated for the resource needs to come from.

Functions

Link copied to clipboard
open override fun toJava(): PublicIPAddressArgs