All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.compute.kotlin.PublicDelegatedPrefixArgs.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.

There is a newer version: 8.12.0.0
Show newest version
@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.PublicDelegatedPrefixArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Represents a PublicDelegatedPrefix for use with bring your own IP addresses (BYOIP).
 * To get more information about PublicDelegatedPrefix, see:
 * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/v1/publicDelegatedPrefixes)
 * * How-to Guides
 *     * [Using bring your own IP](https://cloud.google.com/vpc/docs/using-bring-your-own-ip)
 * ## Example Usage
 * ### Public Delegated Prefixes Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const advertised = new gcp.compute.PublicAdvertisedPrefix("advertised", {
 *     name: "my-prefix",
 *     description: "description",
 *     dnsVerificationIp: "127.127.0.0",
 *     ipCidrRange: "127.127.0.0/16",
 * });
 * const prefixes = new gcp.compute.PublicDelegatedPrefix("prefixes", {
 *     name: "my-prefix",
 *     region: "us-central1",
 *     description: "my description",
 *     ipCidrRange: "127.127.0.0/24",
 *     parentPrefix: advertised.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * advertised = gcp.compute.PublicAdvertisedPrefix("advertised",
 *     name="my-prefix",
 *     description="description",
 *     dns_verification_ip="127.127.0.0",
 *     ip_cidr_range="127.127.0.0/16")
 * prefixes = gcp.compute.PublicDelegatedPrefix("prefixes",
 *     name="my-prefix",
 *     region="us-central1",
 *     description="my description",
 *     ip_cidr_range="127.127.0.0/24",
 *     parent_prefix=advertised.id)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var advertised = new Gcp.Compute.PublicAdvertisedPrefix("advertised", new()
 *     {
 *         Name = "my-prefix",
 *         Description = "description",
 *         DnsVerificationIp = "127.127.0.0",
 *         IpCidrRange = "127.127.0.0/16",
 *     });
 *     var prefixes = new Gcp.Compute.PublicDelegatedPrefix("prefixes", new()
 *     {
 *         Name = "my-prefix",
 *         Region = "us-central1",
 *         Description = "my description",
 *         IpCidrRange = "127.127.0.0/24",
 *         ParentPrefix = advertised.Id,
 *     });
 * });
 * ```
 * ```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 {
 * 		advertised, err := compute.NewPublicAdvertisedPrefix(ctx, "advertised", &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
 * 		}
 * 		_, err = compute.NewPublicDelegatedPrefix(ctx, "prefixes", &compute.PublicDelegatedPrefixArgs{
 * 			Name:         pulumi.String("my-prefix"),
 * 			Region:       pulumi.String("us-central1"),
 * 			Description:  pulumi.String("my description"),
 * 			IpCidrRange:  pulumi.String("127.127.0.0/24"),
 * 			ParentPrefix: advertised.ID(),
 * 		})
 * 		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 com.pulumi.gcp.compute.PublicDelegatedPrefix;
 * import com.pulumi.gcp.compute.PublicDelegatedPrefixArgs;
 * 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 advertised = new PublicAdvertisedPrefix("advertised", PublicAdvertisedPrefixArgs.builder()
 *             .name("my-prefix")
 *             .description("description")
 *             .dnsVerificationIp("127.127.0.0")
 *             .ipCidrRange("127.127.0.0/16")
 *             .build());
 *         var prefixes = new PublicDelegatedPrefix("prefixes", PublicDelegatedPrefixArgs.builder()
 *             .name("my-prefix")
 *             .region("us-central1")
 *             .description("my description")
 *             .ipCidrRange("127.127.0.0/24")
 *             .parentPrefix(advertised.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   advertised:
 *     type: gcp:compute:PublicAdvertisedPrefix
 *     properties:
 *       name: my-prefix
 *       description: description
 *       dnsVerificationIp: 127.127.0.0
 *       ipCidrRange: 127.127.0.0/16
 *   prefixes:
 *     type: gcp:compute:PublicDelegatedPrefix
 *     properties:
 *       name: my-prefix
 *       region: us-central1
 *       description: my description
 *       ipCidrRange: 127.127.0.0/24
 *       parentPrefix: ${advertised.id}
 * ```
 * 
 * ## Import
 * PublicDelegatedPrefix can be imported using any of these accepted formats:
 * * `projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}`
 * * `{{project}}/{{region}}/{{name}}`
 * * `{{region}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, PublicDelegatedPrefix can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:compute/publicDelegatedPrefix:PublicDelegatedPrefix default projects/{{project}}/regions/{{region}}/publicDelegatedPrefixes/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/publicDelegatedPrefix:PublicDelegatedPrefix default {{project}}/{{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/publicDelegatedPrefix:PublicDelegatedPrefix default {{region}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:compute/publicDelegatedPrefix:PublicDelegatedPrefix default {{name}}
 * ```
 * @property description An optional description of this resource.
 * @property ipCidrRange The IPv4 address range, in CIDR format, represented by this public advertised prefix.
 * - - -
 * @property isLiveMigration If true, the prefix will be live migrated.
 * @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 parentPrefix The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property region A region where the prefix will reside.
 */
public data class PublicDelegatedPrefixArgs(
    public val description: Output? = null,
    public val ipCidrRange: Output? = null,
    public val isLiveMigration: Output? = null,
    public val name: Output? = null,
    public val parentPrefix: Output? = null,
    public val project: Output? = null,
    public val region: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.PublicDelegatedPrefixArgs =
        com.pulumi.gcp.compute.PublicDelegatedPrefixArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .ipCidrRange(ipCidrRange?.applyValue({ args0 -> args0 }))
            .isLiveMigration(isLiveMigration?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .parentPrefix(parentPrefix?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .region(region?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PublicDelegatedPrefixArgs].
 */
@PulumiTagMarker
public class PublicDelegatedPrefixArgsBuilder internal constructor() {
    private var description: Output? = null

    private var ipCidrRange: Output? = null

    private var isLiveMigration: Output? = null

    private var name: Output? = null

    private var parentPrefix: Output? = null

    private var project: Output? = null

    private var region: Output? = null

    /**
     * @param value An optional description of this resource.
     */
    @JvmName("ybtksexdtyqvkgtf")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The IPv4 address range, in CIDR format, represented by this public advertised prefix.
     * - - -
     */
    @JvmName("dhvhvhdhvarakrsj")
    public suspend fun ipCidrRange(`value`: Output) {
        this.ipCidrRange = value
    }

    /**
     * @param value If true, the prefix will be live migrated.
     */
    @JvmName("ulmpopedirpsqeqk")
    public suspend fun isLiveMigration(`value`: Output) {
        this.isLiveMigration = 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("ejsbwsnrigtcqsem")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.
     */
    @JvmName("grywbmcctlxrfmhy")
    public suspend fun parentPrefix(`value`: Output) {
        this.parentPrefix = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("ucssuyodtwmetlag")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value A region where the prefix will reside.
     */
    @JvmName("wuvwqspjclwvalbi")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value An optional description of this resource.
     */
    @JvmName("cfwpcryglumkavfi")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The IPv4 address range, in CIDR format, represented by this public advertised prefix.
     * - - -
     */
    @JvmName("mlwrjuxdwxmbrofc")
    public suspend fun ipCidrRange(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipCidrRange = mapped
    }

    /**
     * @param value If true, the prefix will be live migrated.
     */
    @JvmName("qxhohgdgaifbyhcs")
    public suspend fun isLiveMigration(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isLiveMigration = 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("hrxuufvwdsixwwta")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.
     */
    @JvmName("bwxdicydriqdxukx")
    public suspend fun parentPrefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentPrefix = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("poijojfwpsggdeof")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value A region where the prefix will reside.
     */
    @JvmName("lvigbhmauadloimg")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    internal fun build(): PublicDelegatedPrefixArgs = PublicDelegatedPrefixArgs(
        description = description,
        ipCidrRange = ipCidrRange,
        isLiveMigration = isLiveMigration,
        name = name,
        parentPrefix = parentPrefix,
        project = project,
        region = region,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy