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

com.pulumi.gcp.networkservices.kotlin.MeshArgs.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.networkservices.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.MeshArgs.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

/**
 * ## Example Usage
 * ### Network Services Mesh Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.networkservices.Mesh("default", {
 *     name: "my-mesh",
 *     labels: {
 *         foo: "bar",
 *     },
 *     description: "my description",
 *     interceptionPort: 443,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.networkservices.Mesh("default",
 *     name="my-mesh",
 *     labels={
 *         "foo": "bar",
 *     },
 *     description="my description",
 *     interception_port=443)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.NetworkServices.Mesh("default", new()
 *     {
 *         Name = "my-mesh",
 *         Labels =
 *         {
 *             { "foo", "bar" },
 *         },
 *         Description = "my description",
 *         InterceptionPort = 443,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := networkservices.NewMesh(ctx, "default", &networkservices.MeshArgs{
 * 			Name: pulumi.String("my-mesh"),
 * 			Labels: pulumi.StringMap{
 * 				"foo": pulumi.String("bar"),
 * 			},
 * 			Description:      pulumi.String("my description"),
 * 			InterceptionPort: pulumi.Int(443),
 * 		})
 * 		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.networkservices.Mesh;
 * import com.pulumi.gcp.networkservices.MeshArgs;
 * 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 default_ = new Mesh("default", MeshArgs.builder()
 *             .name("my-mesh")
 *             .labels(Map.of("foo", "bar"))
 *             .description("my description")
 *             .interceptionPort(443)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:networkservices:Mesh
 *     properties:
 *       name: my-mesh
 *       labels:
 *         foo: bar
 *       description: my description
 *       interceptionPort: 443
 * ```
 * 
 * ### Network Services Mesh No Port
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const _default = new gcp.networkservices.Mesh("default", {
 *     name: "my-mesh-noport",
 *     labels: {
 *         foo: "bar",
 *     },
 *     description: "my description",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * default = gcp.networkservices.Mesh("default",
 *     name="my-mesh-noport",
 *     labels={
 *         "foo": "bar",
 *     },
 *     description="my description")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @default = new Gcp.NetworkServices.Mesh("default", new()
 *     {
 *         Name = "my-mesh-noport",
 *         Labels =
 *         {
 *             { "foo", "bar" },
 *         },
 *         Description = "my description",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkservices"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := networkservices.NewMesh(ctx, "default", &networkservices.MeshArgs{
 * 			Name: pulumi.String("my-mesh-noport"),
 * 			Labels: pulumi.StringMap{
 * 				"foo": pulumi.String("bar"),
 * 			},
 * 			Description: pulumi.String("my description"),
 * 		})
 * 		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.networkservices.Mesh;
 * import com.pulumi.gcp.networkservices.MeshArgs;
 * 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 default_ = new Mesh("default", MeshArgs.builder()
 *             .name("my-mesh-noport")
 *             .labels(Map.of("foo", "bar"))
 *             .description("my description")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   default:
 *     type: gcp:networkservices:Mesh
 *     properties:
 *       name: my-mesh-noport
 *       labels:
 *         foo: bar
 *       description: my description
 * ```
 * 
 * ## Import
 * Mesh can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/global/meshes/{{name}}`
 * * `{{project}}/{{name}}`
 * * `{{name}}`
 * When using the `pulumi import` command, Mesh can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:networkservices/mesh:Mesh default projects/{{project}}/locations/global/meshes/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:networkservices/mesh:Mesh default {{project}}/{{name}}
 * ```
 * ```sh
 * $ pulumi import gcp:networkservices/mesh:Mesh default {{name}}
 * ```
 * @property description A free-text description of the resource. Max length 1024 characters.
 * @property interceptionPort Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the
 * specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to
 * be redirected to this port regardless of its actual ip:port destination. If unset, a port
 * '15001' is used as the interception port. This will is applicable only for sidecar proxy
 * deployments.
 * @property labels Set of label tags associated with the Mesh resource.
 * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field `effective_labels` for all of the labels present on the resource.
 * @property name Short name of the Mesh resource to be created.
 * - - -
 * @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 MeshArgs(
    public val description: Output? = null,
    public val interceptionPort: Output? = null,
    public val labels: Output>? = null,
    public val name: Output? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.MeshArgs =
        com.pulumi.gcp.networkservices.MeshArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .interceptionPort(interceptionPort?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 })).build()
}

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

    private var interceptionPort: Output? = null

    private var labels: Output>? = null

    private var name: Output? = null

    private var project: Output? = null

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

    /**
     * @param value Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the
     * specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to
     * be redirected to this port regardless of its actual ip:port destination. If unset, a port
     * '15001' is used as the interception port. This will is applicable only for sidecar proxy
     * deployments.
     */
    @JvmName("xignvybuiqxlebvo")
    public suspend fun interceptionPort(`value`: Output) {
        this.interceptionPort = value
    }

    /**
     * @param value Set of label tags associated with the Mesh resource.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("qjttapdogbefeirg")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Short name of the Mesh resource to be created.
     * - - -
     */
    @JvmName("wkhmijehhjfcyckw")
    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("owwtjlgjinwjxgqy")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

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

    /**
     * @param value Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the
     * specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to
     * be redirected to this port regardless of its actual ip:port destination. If unset, a port
     * '15001' is used as the interception port. This will is applicable only for sidecar proxy
     * deployments.
     */
    @JvmName("knnrxdghdlpnkrfj")
    public suspend fun interceptionPort(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interceptionPort = mapped
    }

    /**
     * @param value Set of label tags associated with the Mesh resource.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("stwjmqeetelbdlhf")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Set of label tags associated with the Mesh resource.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("fcljyybhhasfoijd")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Short name of the Mesh resource to be created.
     * - - -
     */
    @JvmName("nkgcpycidjrsraxx")
    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("mqslkacpybqmsifb")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    internal fun build(): MeshArgs = MeshArgs(
        description = description,
        interceptionPort = interceptionPort,
        labels = labels,
        name = name,
        project = project,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy