com.pulumi.gcp.compute.kotlin.PublicAdvertisedPrefixArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
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.gcp.compute.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.PublicAdvertisedPrefixArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Represents a PublicAdvertisedPrefix for use with bring your own IP addresses (BYOIP).
* To get more information about PublicAdvertisedPrefix, see:
* * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/publicAdvertisedPrefixes)
* * How-to Guides
* * [Using bring your own IP](https://cloud.google.com/vpc/docs/using-bring-your-own-ip)
* ## Example Usage
* ### Public Advertised Prefixes Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const prefixes = new gcp.compute.PublicAdvertisedPrefix("prefixes", {
* name: "my-prefix",
* description: "description",
* dnsVerificationIp: "127.127.0.0",
* ipCidrRange: "127.127.0.0/16",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* prefixes = gcp.compute.PublicAdvertisedPrefix("prefixes",
* name="my-prefix",
* description="description",
* dns_verification_ip="127.127.0.0",
* ip_cidr_range="127.127.0.0/16")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var prefixes = new Gcp.Compute.PublicAdvertisedPrefix("prefixes", new()
* {
* Name = "my-prefix",
* Description = "description",
* DnsVerificationIp = "127.127.0.0",
* IpCidrRange = "127.127.0.0/16",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := compute.NewPublicAdvertisedPrefix(ctx, "prefixes", &compute.PublicAdvertisedPrefixArgs{
* Name: pulumi.String("my-prefix"),
* Description: pulumi.String("description"),
* DnsVerificationIp: pulumi.String("127.127.0.0"),
* IpCidrRange: pulumi.String("127.127.0.0/16"),
* })
* 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.gcp.compute.PublicAdvertisedPrefix;
* import com.pulumi.gcp.compute.PublicAdvertisedPrefixArgs;
* 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 prefixes = new PublicAdvertisedPrefix("prefixes", PublicAdvertisedPrefixArgs.builder()
* .name("my-prefix")
* .description("description")
* .dnsVerificationIp("127.127.0.0")
* .ipCidrRange("127.127.0.0/16")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* prefixes:
* type: gcp:compute:PublicAdvertisedPrefix
* properties:
* name: my-prefix
* description: description
* dnsVerificationIp: 127.127.0.0
* ipCidrRange: 127.127.0.0/16
* ```
*
* ## Import
* PublicAdvertisedPrefix can be imported using any of these accepted formats:
* * `projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}`
* * `{{project}}/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, PublicAdvertisedPrefix can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix default projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix default {{project}}/{{name}}
* ```
* ```sh
* $ pulumi import gcp:compute/publicAdvertisedPrefix:PublicAdvertisedPrefix default {{name}}
* ```
* @property description An optional description of this resource.
* @property dnsVerificationIp The IPv4 address to be used for reverse DNS verification.
* @property ipCidrRange The IPv4 address range, in CIDR format, represented by this public advertised prefix.
* - - -
* @property name Name of the resource. The name must be 1-63 characters long, and
* comply with RFC1035. Specifically, the name must be 1-63 characters
* long and match the regular expression `a-z?`
* which means the first character must be a lowercase letter, and all
* following characters must be a dash, lowercase letter, or digit,
* except the last character, which cannot be a dash.
* @property project The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public data class PublicAdvertisedPrefixArgs(
public val description: Output? = null,
public val dnsVerificationIp: Output? = null,
public val ipCidrRange: Output? = null,
public val name: Output? = null,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.PublicAdvertisedPrefixArgs =
com.pulumi.gcp.compute.PublicAdvertisedPrefixArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.dnsVerificationIp(dnsVerificationIp?.applyValue({ args0 -> args0 }))
.ipCidrRange(ipCidrRange?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [PublicAdvertisedPrefixArgs].
*/
@PulumiTagMarker
public class PublicAdvertisedPrefixArgsBuilder internal constructor() {
private var description: Output? = null
private var dnsVerificationIp: Output? = null
private var ipCidrRange: Output? = null
private var name: Output? = null
private var project: Output? = null
/**
* @param value An optional description of this resource.
*/
@JvmName("ugbcaynlgdwwaloq")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The IPv4 address to be used for reverse DNS verification.
*/
@JvmName("ldhbpaknslyqscgi")
public suspend fun dnsVerificationIp(`value`: Output) {
this.dnsVerificationIp = value
}
/**
* @param value The IPv4 address range, in CIDR format, represented by this public advertised prefix.
* - - -
*/
@JvmName("veqgctaqugdsbydt")
public suspend fun ipCidrRange(`value`: Output) {
this.ipCidrRange = value
}
/**
* @param value Name of the resource. The name must be 1-63 characters long, and
* comply with RFC1035. Specifically, the name must be 1-63 characters
* long and match the regular expression `a-z?`
* which means the first character must be a lowercase letter, and all
* following characters must be a dash, lowercase letter, or digit,
* except the last character, which cannot be a dash.
*/
@JvmName("bdtagtymlpgynlit")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("mkiivddoqlqlmhnf")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value An optional description of this resource.
*/
@JvmName("uaifhgjjtixrrbdb")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The IPv4 address to be used for reverse DNS verification.
*/
@JvmName("gdyhdmebdmsiqixd")
public suspend fun dnsVerificationIp(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.dnsVerificationIp = mapped
}
/**
* @param value The IPv4 address range, in CIDR format, represented by this public advertised prefix.
* - - -
*/
@JvmName("hysfcxkyewbwigmf")
public suspend fun ipCidrRange(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.ipCidrRange = mapped
}
/**
* @param value Name of the resource. The name must be 1-63 characters long, and
* comply with RFC1035. Specifically, the name must be 1-63 characters
* long and match the regular expression `a-z?`
* which means the first character must be a lowercase letter, and all
* following characters must be a dash, lowercase letter, or digit,
* except the last character, which cannot be a dash.
*/
@JvmName("tcbccnprsihdkxub")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
@JvmName("sonlhodbfyyfbdpd")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): PublicAdvertisedPrefixArgs = PublicAdvertisedPrefixArgs(
description = description,
dnsVerificationIp = dnsVerificationIp,
ipCidrRange = ipCidrRange,
name = name,
project = project,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy