Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.network.kotlin.PublicIPPrefixArgs.kt Maven / Gradle / Ivy
Go to download
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin
import com.pulumi.azurenative.network.PublicIPPrefixArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.IPVersion
import com.pulumi.azurenative.network.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.network.kotlin.inputs.ExtendedLocationArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.IpTagArgs
import com.pulumi.azurenative.network.kotlin.inputs.IpTagArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.NatGatewayArgs
import com.pulumi.azurenative.network.kotlin.inputs.NatGatewayArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.PublicIPPrefixSkuArgs
import com.pulumi.azurenative.network.kotlin.inputs.PublicIPPrefixSkuArgsBuilder
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgs
import com.pulumi.azurenative.network.kotlin.inputs.SubResourceArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Public IP prefix resource.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
* Other available API versions: 2019-06-01, 2019-08-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01.
* ## Example Usage
* ### Create public IP prefix allocation method
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var publicIPPrefix = new AzureNative.Network.PublicIPPrefix("publicIPPrefix", new()
* {
* Location = "westus",
* PrefixLength = 30,
* PublicIPAddressVersion = AzureNative.Network.IPVersion.IPv4,
* PublicIpPrefixName = "test-ipprefix",
* ResourceGroupName = "rg1",
* Sku = new AzureNative.Network.Inputs.PublicIPPrefixSkuArgs
* {
* Name = AzureNative.Network.PublicIPPrefixSkuName.Standard,
* Tier = AzureNative.Network.PublicIPPrefixSkuTier.Regional,
* },
* });
* });
* ```
* ```go
* 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.NewPublicIPPrefix(ctx, "publicIPPrefix", &network.PublicIPPrefixArgs{
* Location: pulumi.String("westus"),
* PrefixLength: pulumi.Int(30),
* PublicIPAddressVersion: pulumi.String(network.IPVersionIPv4),
* PublicIpPrefixName: pulumi.String("test-ipprefix"),
* ResourceGroupName: pulumi.String("rg1"),
* Sku: &network.PublicIPPrefixSkuArgs{
* Name: pulumi.String(network.PublicIPPrefixSkuNameStandard),
* Tier: pulumi.String(network.PublicIPPrefixSkuTierRegional),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.network.PublicIPPrefix;
* import com.pulumi.azurenative.network.PublicIPPrefixArgs;
* import com.pulumi.azurenative.network.inputs.PublicIPPrefixSkuArgs;
* 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 publicIPPrefix = new PublicIPPrefix("publicIPPrefix", PublicIPPrefixArgs.builder()
* .location("westus")
* .prefixLength(30)
* .publicIPAddressVersion("IPv4")
* .publicIpPrefixName("test-ipprefix")
* .resourceGroupName("rg1")
* .sku(PublicIPPrefixSkuArgs.builder()
* .name("Standard")
* .tier("Regional")
* .build())
* .build());
* }
* }
* ```
* ### Create public IP prefix defaults
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var publicIPPrefix = new AzureNative.Network.PublicIPPrefix("publicIPPrefix", new()
* {
* Location = "westus",
* PrefixLength = 30,
* PublicIpPrefixName = "test-ipprefix",
* ResourceGroupName = "rg1",
* Sku = new AzureNative.Network.Inputs.PublicIPPrefixSkuArgs
* {
* Name = AzureNative.Network.PublicIPPrefixSkuName.Standard,
* },
* });
* });
* ```
* ```go
* 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.NewPublicIPPrefix(ctx, "publicIPPrefix", &network.PublicIPPrefixArgs{
* Location: pulumi.String("westus"),
* PrefixLength: pulumi.Int(30),
* PublicIpPrefixName: pulumi.String("test-ipprefix"),
* ResourceGroupName: pulumi.String("rg1"),
* Sku: &network.PublicIPPrefixSkuArgs{
* Name: pulumi.String(network.PublicIPPrefixSkuNameStandard),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.network.PublicIPPrefix;
* import com.pulumi.azurenative.network.PublicIPPrefixArgs;
* import com.pulumi.azurenative.network.inputs.PublicIPPrefixSkuArgs;
* 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 publicIPPrefix = new PublicIPPrefix("publicIPPrefix", PublicIPPrefixArgs.builder()
* .location("westus")
* .prefixLength(30)
* .publicIpPrefixName("test-ipprefix")
* .resourceGroupName("rg1")
* .sku(PublicIPPrefixSkuArgs.builder()
* .name("Standard")
* .build())
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:network:PublicIPPrefix test-ipprefix /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}
* ```
* @property customIPPrefix The customIpPrefix that this prefix is associated with.
* @property extendedLocation The extended location of the public ip address.
* @property id Resource ID.
* @property ipTags The list of tags associated with the public IP prefix.
* @property location Resource location.
* @property natGateway NatGateway of Public IP Prefix.
* @property prefixLength The Length of the Public IP Prefix.
* @property publicIPAddressVersion The public IP address version.
* @property publicIpPrefixName The name of the public IP prefix.
* @property resourceGroupName The name of the resource group.
* @property sku The public IP prefix SKU.
* @property tags Resource tags.
* @property zones A list of availability zones denoting the IP allocated for the resource needs to come from.
*/
public data class PublicIPPrefixArgs(
public val customIPPrefix: Output? = null,
public val extendedLocation: Output? = null,
public val id: Output? = null,
public val ipTags: Output>? = null,
public val location: Output? = null,
public val natGateway: Output? = null,
public val prefixLength: Output? = null,
public val publicIPAddressVersion: Output>? = null,
public val publicIpPrefixName: Output? = null,
public val resourceGroupName: Output? = null,
public val sku: Output? = null,
public val tags: Output>? = null,
public val zones: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.PublicIPPrefixArgs =
com.pulumi.azurenative.network.PublicIPPrefixArgs.builder()
.customIPPrefix(customIPPrefix?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.id(id?.applyValue({ args0 -> args0 }))
.ipTags(ipTags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.location(location?.applyValue({ args0 -> args0 }))
.natGateway(natGateway?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.prefixLength(prefixLength?.applyValue({ args0 -> args0 }))
.publicIPAddressVersion(
publicIPAddressVersion?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.publicIpPrefixName(publicIpPrefixName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}
/**
* Builder for [PublicIPPrefixArgs].
*/
@PulumiTagMarker
public class PublicIPPrefixArgsBuilder internal constructor() {
private var customIPPrefix: Output? = null
private var extendedLocation: Output? = null
private var id: Output? = null
private var ipTags: Output>? = null
private var location: Output? = null
private var natGateway: Output? = null
private var prefixLength: Output? = null
private var publicIPAddressVersion: Output>? = null
private var publicIpPrefixName: Output? = null
private var resourceGroupName: Output? = null
private var sku: Output? = null
private var tags: Output>? = null
private var zones: Output>? = null
/**
* @param value The customIpPrefix that this prefix is associated with.
*/
@JvmName("jjktsdyqnegcawyb")
public suspend fun customIPPrefix(`value`: Output) {
this.customIPPrefix = value
}
/**
* @param value The extended location of the public ip address.
*/
@JvmName("endponojolytixie")
public suspend fun extendedLocation(`value`: Output) {
this.extendedLocation = value
}
/**
* @param value Resource ID.
*/
@JvmName("pmyhxxukppfvjpfm")
public suspend fun id(`value`: Output) {
this.id = value
}
/**
* @param value The list of tags associated with the public IP prefix.
*/
@JvmName("odukpqdhpeblgepw")
public suspend fun ipTags(`value`: Output>) {
this.ipTags = value
}
@JvmName("vturdohlwxhypsmf")
public suspend fun ipTags(vararg values: Output) {
this.ipTags = Output.all(values.asList())
}
/**
* @param values The list of tags associated with the public IP prefix.
*/
@JvmName("nxvvcokehybxkasu")
public suspend fun ipTags(values: List>) {
this.ipTags = Output.all(values)
}
/**
* @param value Resource location.
*/
@JvmName("mdklojpvptibybou")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value NatGateway of Public IP Prefix.
*/
@JvmName("erwdogntkwbbnjop")
public suspend fun natGateway(`value`: Output) {
this.natGateway = value
}
/**
* @param value The Length of the Public IP Prefix.
*/
@JvmName("hpglhrxctruujkam")
public suspend fun prefixLength(`value`: Output) {
this.prefixLength = value
}
/**
* @param value The public IP address version.
*/
@JvmName("afvhufhhsqkofijo")
public suspend fun publicIPAddressVersion(`value`: Output>) {
this.publicIPAddressVersion = value
}
/**
* @param value The name of the public IP prefix.
*/
@JvmName("bbfjqeudfasncfhe")
public suspend fun publicIpPrefixName(`value`: Output) {
this.publicIpPrefixName = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("hvfxexpvqmqtmuqq")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The public IP prefix SKU.
*/
@JvmName("meghqarigdgfxify")
public suspend fun sku(`value`: Output) {
this.sku = value
}
/**
* @param value Resource tags.
*/
@JvmName("vxworpxwnmykwlob")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value A list of availability zones denoting the IP allocated for the resource needs to come from.
*/
@JvmName("oryvsbaotswqdkub")
public suspend fun zones(`value`: Output>) {
this.zones = value
}
@JvmName("afccfjbeondennwq")
public suspend fun zones(vararg values: Output) {
this.zones = Output.all(values.asList())
}
/**
* @param values A list of availability zones denoting the IP allocated for the resource needs to come from.
*/
@JvmName("cbxvufmpgbhkefru")
public suspend fun zones(values: List>) {
this.zones = Output.all(values)
}
/**
* @param value The customIpPrefix that this prefix is associated with.
*/
@JvmName("fogokiyrpeojavxq")
public suspend fun customIPPrefix(`value`: SubResourceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.customIPPrefix = mapped
}
/**
* @param argument The customIpPrefix that this prefix is associated with.
*/
@JvmName("gvryujjqgwumnomw")
public suspend fun customIPPrefix(argument: suspend SubResourceArgsBuilder.() -> Unit) {
val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.customIPPrefix = mapped
}
/**
* @param value The extended location of the public ip address.
*/
@JvmName("wwehbfmfxafvcfcw")
public suspend fun extendedLocation(`value`: ExtendedLocationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.extendedLocation = mapped
}
/**
* @param argument The extended location of the public ip address.
*/
@JvmName("tgvoekucdaldgvjm")
public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.extendedLocation = mapped
}
/**
* @param value Resource ID.
*/
@JvmName("jidgxvvbpfcekxje")
public suspend fun id(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.id = mapped
}
/**
* @param value The list of tags associated with the public IP prefix.
*/
@JvmName("ndthnpsdeilcmkvo")
public suspend fun ipTags(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ipTags = mapped
}
/**
* @param argument The list of tags associated with the public IP prefix.
*/
@JvmName("octqndeilopjauqy")
public suspend fun ipTags(argument: List Unit>) {
val toBeMapped = argument.toList().map { IpTagArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.ipTags = mapped
}
/**
* @param argument The list of tags associated with the public IP prefix.
*/
@JvmName("iwbbtqpgdgformtu")
public suspend fun ipTags(vararg argument: suspend IpTagArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { IpTagArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.ipTags = mapped
}
/**
* @param argument The list of tags associated with the public IP prefix.
*/
@JvmName("daroytmkcmndybni")
public suspend fun ipTags(argument: suspend IpTagArgsBuilder.() -> Unit) {
val toBeMapped = listOf(IpTagArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.ipTags = mapped
}
/**
* @param values The list of tags associated with the public IP prefix.
*/
@JvmName("jdsyxhaokjfilppp")
public suspend fun ipTags(vararg values: IpTagArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.ipTags = mapped
}
/**
* @param value Resource location.
*/
@JvmName("ciuxvtcvklhjwgrf")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value NatGateway of Public IP Prefix.
*/
@JvmName("rrealbaakusumrvj")
public suspend fun natGateway(`value`: NatGatewayArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.natGateway = mapped
}
/**
* @param argument NatGateway of Public IP Prefix.
*/
@JvmName("yqmfhbgqaujyfyca")
public suspend fun natGateway(argument: suspend NatGatewayArgsBuilder.() -> Unit) {
val toBeMapped = NatGatewayArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.natGateway = mapped
}
/**
* @param value The Length of the Public IP Prefix.
*/
@JvmName("pnqwnmveccssmrpl")
public suspend fun prefixLength(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.prefixLength = mapped
}
/**
* @param value The public IP address version.
*/
@JvmName("cocpixkitinxfabr")
public suspend fun publicIPAddressVersion(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publicIPAddressVersion = mapped
}
/**
* @param value The public IP address version.
*/
@JvmName("dnuhqtcdpkwdualh")
public fun publicIPAddressVersion(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.publicIPAddressVersion = mapped
}
/**
* @param value The public IP address version.
*/
@JvmName("fomyhahdukjsuhid")
public fun publicIPAddressVersion(`value`: IPVersion) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.publicIPAddressVersion = mapped
}
/**
* @param value The name of the public IP prefix.
*/
@JvmName("tferfjkivoubxqqf")
public suspend fun publicIpPrefixName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publicIpPrefixName = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("iqtxhmxlusfljxwi")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The public IP prefix SKU.
*/
@JvmName("osuphvobvwlxutks")
public suspend fun sku(`value`: PublicIPPrefixSkuArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sku = mapped
}
/**
* @param argument The public IP prefix SKU.
*/
@JvmName("cwqiebnbcnemmfwq")
public suspend fun sku(argument: suspend PublicIPPrefixSkuArgsBuilder.() -> Unit) {
val toBeMapped = PublicIPPrefixSkuArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.sku = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("umkvhgpffpfnptkg")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("ihbtvtkhnmxyltjh")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value A list of availability zones denoting the IP allocated for the resource needs to come from.
*/
@JvmName("fwrsoujabaktnmfj")
public suspend fun zones(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zones = mapped
}
/**
* @param values A list of availability zones denoting the IP allocated for the resource needs to come from.
*/
@JvmName("pvvsxpjvtctxhjvg")
public suspend fun zones(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.zones = mapped
}
internal fun build(): PublicIPPrefixArgs = PublicIPPrefixArgs(
customIPPrefix = customIPPrefix,
extendedLocation = extendedLocation,
id = id,
ipTags = ipTags,
location = location,
natGateway = natGateway,
prefixLength = prefixLength,
publicIPAddressVersion = publicIPAddressVersion,
publicIpPrefixName = publicIpPrefixName,
resourceGroupName = resourceGroupName,
sku = sku,
tags = tags,
zones = zones,
)
}