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

com.pulumi.gcp.edgenetwork.kotlin.NetworkArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.edgenetwork.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.edgenetwork.NetworkArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A Distributed Cloud Edge network, which provides L3 isolation within a zone.
 * To get more information about Network, see:
 * * [API documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/network/rest/v1/projects.locations.zones.networks)
 * * How-to Guides
 *     * [Create and manage networks](https://cloud.google.com/distributed-cloud/edge/latest/docs/networks#api)
 * ## Example Usage
 * ### Edgenetwork Network
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const exampleNetwork = new gcp.edgenetwork.Network("example_network", {
 *     networkId: "example-network",
 *     location: "us-west1",
 *     zone: "",
 *     description: "Example network.",
 *     mtu: 9000,
 *     labels: {
 *         environment: "dev",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * example_network = gcp.edgenetwork.Network("example_network",
 *     network_id="example-network",
 *     location="us-west1",
 *     zone="",
 *     description="Example network.",
 *     mtu=9000,
 *     labels={
 *         "environment": "dev",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var exampleNetwork = new Gcp.EdgeNetwork.Network("example_network", new()
 *     {
 *         NetworkId = "example-network",
 *         Location = "us-west1",
 *         Zone = "",
 *         Description = "Example network.",
 *         Mtu = 9000,
 *         Labels =
 *         {
 *             { "environment", "dev" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/edgenetwork"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := edgenetwork.NewNetwork(ctx, "example_network", &edgenetwork.NetworkArgs{
 * 			NetworkId:   pulumi.String("example-network"),
 * 			Location:    pulumi.String("us-west1"),
 * 			Zone:        pulumi.String(""),
 * 			Description: pulumi.String("Example network."),
 * 			Mtu:         pulumi.Int(9000),
 * 			Labels: pulumi.StringMap{
 * 				"environment": pulumi.String("dev"),
 * 			},
 * 		})
 * 		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.edgenetwork.Network;
 * import com.pulumi.gcp.edgenetwork.NetworkArgs;
 * 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 exampleNetwork = new Network("exampleNetwork", NetworkArgs.builder()
 *             .networkId("example-network")
 *             .location("us-west1")
 *             .zone("")
 *             .description("Example network.")
 *             .mtu(9000)
 *             .labels(Map.of("environment", "dev"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   exampleNetwork:
 *     type: gcp:edgenetwork:Network
 *     name: example_network
 *     properties:
 *       networkId: example-network
 *       location: us-west1
 *       zone:
 *       description: Example network.
 *       mtu: 9000
 *       labels:
 *         environment: dev
 * ```
 * 
 * ## Import
 * Network can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}`
 * * `{{project}}/{{location}}/{{zone}}/{{network_id}}`
 * * `{{location}}/{{zone}}/{{network_id}}`
 * * `{{location}}/{{network_id}}`
 * * `{{name}}`
 * When using the `pulumi import` command, Network can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:edgenetwork/network:Network default projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:edgenetwork/network:Network default {{project}}/{{location}}/{{zone}}/{{network_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:edgenetwork/network:Network default {{location}}/{{zone}}/{{network_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:edgenetwork/network:Network default {{location}}/{{network_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:edgenetwork/network:Network default {{name}}
 * ```
 * @property description A free-text description of the resource. Max length 1024 characters.
 * @property labels Labels associated with this resource.
 * @property location The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
 * @property mtu IP (L3) MTU value of the network. Default value is `1500`. Possible values are: `1500`, `9000`.
 * @property networkId A unique ID that identifies this network.
 * - - -
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property zone The name of the target Distributed Cloud Edge zone.
 */
public data class NetworkArgs(
    public val description: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val mtu: Output? = null,
    public val networkId: Output? = null,
    public val project: Output? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.edgenetwork.NetworkArgs =
        com.pulumi.gcp.edgenetwork.NetworkArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .mtu(mtu?.applyValue({ args0 -> args0 }))
            .networkId(networkId?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

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

    private var labels: Output>? = null

    private var location: Output? = null

    private var mtu: Output? = null

    private var networkId: Output? = null

    private var project: Output? = null

    private var zone: Output? = null

    /**
     * @param value A free-text description of the resource. Max length 1024 characters.
     */
    @JvmName("ffvtradrsidpplfv")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Labels associated with this resource.
     */
    @JvmName("wiggbsaaydlbamfn")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
     */
    @JvmName("ynyubqjgmnqquhln")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value IP (L3) MTU value of the network. Default value is `1500`. Possible values are: `1500`, `9000`.
     */
    @JvmName("exvwkhogwfqhnbci")
    public suspend fun mtu(`value`: Output) {
        this.mtu = value
    }

    /**
     * @param value A unique ID that identifies this network.
     * - - -
     */
    @JvmName("rfrpjesnxnypbrry")
    public suspend fun networkId(`value`: Output) {
        this.networkId = value
    }

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

    /**
     * @param value The name of the target Distributed Cloud Edge zone.
     */
    @JvmName("lypqyuixxdkywcca")
    public suspend fun zone(`value`: Output) {
        this.zone = value
    }

    /**
     * @param value A free-text description of the resource. Max length 1024 characters.
     */
    @JvmName("mkyjcbcsgmdxwggh")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Labels associated with this resource.
     */
    @JvmName("tjqlwxugpkefgmib")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Labels associated with this resource.
     */
    @JvmName("tckbiawkoedwyady")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
     */
    @JvmName("dfwrlfbspcdpbmjq")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value IP (L3) MTU value of the network. Default value is `1500`. Possible values are: `1500`, `9000`.
     */
    @JvmName("hxqabquaashrwbql")
    public suspend fun mtu(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mtu = mapped
    }

    /**
     * @param value A unique ID that identifies this network.
     * - - -
     */
    @JvmName("vvcjiuawjkyoxttr")
    public suspend fun networkId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkId = mapped
    }

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

    /**
     * @param value The name of the target Distributed Cloud Edge zone.
     */
    @JvmName("tonsokheieqqdlry")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): NetworkArgs = NetworkArgs(
        description = description,
        labels = labels,
        location = location,
        mtu = mtu,
        networkId = networkId,
        project = project,
        zone = zone,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy