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

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

package com.pulumi.gcp.networksecurity.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networksecurity.MirroringDeploymentGroupArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * ### Network Security Mirroring Deployment Group Basic
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const network = new gcp.compute.Network("network", {
 *     name: "example-network",
 *     autoCreateSubnetworks: false,
 * });
 * const _default = new gcp.networksecurity.MirroringDeploymentGroup("default", {
 *     mirroringDeploymentGroupId: "example-dg",
 *     location: "global",
 *     network: network.id,
 *     labels: {
 *         foo: "bar",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * network = gcp.compute.Network("network",
 *     name="example-network",
 *     auto_create_subnetworks=False)
 * default = gcp.networksecurity.MirroringDeploymentGroup("default",
 *     mirroring_deployment_group_id="example-dg",
 *     location="global",
 *     network=network.id,
 *     labels={
 *         "foo": "bar",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var network = new Gcp.Compute.Network("network", new()
 *     {
 *         Name = "example-network",
 *         AutoCreateSubnetworks = false,
 *     });
 *     var @default = new Gcp.NetworkSecurity.MirroringDeploymentGroup("default", new()
 *     {
 *         MirroringDeploymentGroupId = "example-dg",
 *         Location = "global",
 *         Network = network.Id,
 *         Labels =
 *         {
 *             { "foo", "bar" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networksecurity"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
 * 			Name:                  pulumi.String("example-network"),
 * 			AutoCreateSubnetworks: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = networksecurity.NewMirroringDeploymentGroup(ctx, "default", &networksecurity.MirroringDeploymentGroupArgs{
 * 			MirroringDeploymentGroupId: pulumi.String("example-dg"),
 * 			Location:                   pulumi.String("global"),
 * 			Network:                    network.ID(),
 * 			Labels: pulumi.StringMap{
 * 				"foo": pulumi.String("bar"),
 * 			},
 * 		})
 * 		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.Network;
 * import com.pulumi.gcp.compute.NetworkArgs;
 * import com.pulumi.gcp.networksecurity.MirroringDeploymentGroup;
 * import com.pulumi.gcp.networksecurity.MirroringDeploymentGroupArgs;
 * 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 network = new Network("network", NetworkArgs.builder()
 *             .name("example-network")
 *             .autoCreateSubnetworks(false)
 *             .build());
 *         var default_ = new MirroringDeploymentGroup("default", MirroringDeploymentGroupArgs.builder()
 *             .mirroringDeploymentGroupId("example-dg")
 *             .location("global")
 *             .network(network.id())
 *             .labels(Map.of("foo", "bar"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   network:
 *     type: gcp:compute:Network
 *     properties:
 *       name: example-network
 *       autoCreateSubnetworks: false
 *   default:
 *     type: gcp:networksecurity:MirroringDeploymentGroup
 *     properties:
 *       mirroringDeploymentGroupId: example-dg
 *       location: global
 *       network: ${network.id}
 *       labels:
 *         foo: bar
 * ```
 * 
 * ## Import
 * MirroringDeploymentGroup can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{location}}/mirroringDeploymentGroups/{{mirroring_deployment_group_id}}`
 * * `{{project}}/{{location}}/{{mirroring_deployment_group_id}}`
 * * `{{location}}/{{mirroring_deployment_group_id}}`
 * When using the `pulumi import` command, MirroringDeploymentGroup can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringDeploymentGroup:MirroringDeploymentGroup default projects/{{project}}/locations/{{location}}/mirroringDeploymentGroups/{{mirroring_deployment_group_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringDeploymentGroup:MirroringDeploymentGroup default {{project}}/{{location}}/{{mirroring_deployment_group_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:networksecurity/mirroringDeploymentGroup:MirroringDeploymentGroup default {{location}}/{{mirroring_deployment_group_id}}
 * ```
 * @property labels Optional. Labels as key value pairs
 * **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 location Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `networksecurity.googleapis.com/MirroringDeploymentGroup`.
 * @property mirroringDeploymentGroupId Required. Id of the requesting object
 * If auto-generating Id server-side, remove this field and
 * mirroring_deployment_group_id from the method_signature of Create RPC
 * - - -
 * @property network Required. Immutable. The network that is being used for the deployment. Format is:
 * projects/{project}/global/networks/{network}.
 * @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 MirroringDeploymentGroupArgs(
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val mirroringDeploymentGroupId: Output? = null,
    public val network: Output? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networksecurity.MirroringDeploymentGroupArgs =
        com.pulumi.gcp.networksecurity.MirroringDeploymentGroupArgs.builder()
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .mirroringDeploymentGroupId(mirroringDeploymentGroupId?.applyValue({ args0 -> args0 }))
            .network(network?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [MirroringDeploymentGroupArgs].
 */
@PulumiTagMarker
public class MirroringDeploymentGroupArgsBuilder internal constructor() {
    private var labels: Output>? = null

    private var location: Output? = null

    private var mirroringDeploymentGroupId: Output? = null

    private var network: Output? = null

    private var project: Output? = null

    /**
     * @param value Optional. Labels as key value pairs
     * **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("magxnyxvvahlhkif")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `networksecurity.googleapis.com/MirroringDeploymentGroup`.
     */
    @JvmName("lxocijpdgbbeqyil")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Required. Id of the requesting object
     * If auto-generating Id server-side, remove this field and
     * mirroring_deployment_group_id from the method_signature of Create RPC
     * - - -
     */
    @JvmName("gpmclnbvlkiauxbk")
    public suspend fun mirroringDeploymentGroupId(`value`: Output) {
        this.mirroringDeploymentGroupId = value
    }

    /**
     * @param value Required. Immutable. The network that is being used for the deployment. Format is:
     * projects/{project}/global/networks/{network}.
     */
    @JvmName("jdspedfqydbxqosy")
    public suspend fun network(`value`: Output) {
        this.network = value
    }

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

    /**
     * @param value Optional. Labels as key value pairs
     * **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("yrxlpqddydqdrvym")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Optional. Labels as key value pairs
     * **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("rtfkhjilpdjqggrw")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. See documentation for resource type `networksecurity.googleapis.com/MirroringDeploymentGroup`.
     */
    @JvmName("depoobybwnovbpys")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Required. Id of the requesting object
     * If auto-generating Id server-side, remove this field and
     * mirroring_deployment_group_id from the method_signature of Create RPC
     * - - -
     */
    @JvmName("qdjojjxgcqyukmlt")
    public suspend fun mirroringDeploymentGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mirroringDeploymentGroupId = mapped
    }

    /**
     * @param value Required. Immutable. The network that is being used for the deployment. Format is:
     * projects/{project}/global/networks/{network}.
     */
    @JvmName("smpudxusvaoqapct")
    public suspend fun network(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.network = mapped
    }

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

    internal fun build(): MirroringDeploymentGroupArgs = MirroringDeploymentGroupArgs(
        labels = labels,
        location = location,
        mirroringDeploymentGroupId = mirroringDeploymentGroupId,
        network = network,
        project = project,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy