com.pulumi.gcp.networksecurity.kotlin.MirroringDeploymentGroup.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.networksecurity.kotlin
import com.pulumi.core.Output
import com.pulumi.gcp.networksecurity.kotlin.outputs.MirroringDeploymentGroupConnectedEndpointGroup
import com.pulumi.gcp.networksecurity.kotlin.outputs.MirroringDeploymentGroupConnectedEndpointGroup.Companion.toKotlin
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [MirroringDeploymentGroup].
*/
@PulumiTagMarker
public class MirroringDeploymentGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: MirroringDeploymentGroupArgs = MirroringDeploymentGroupArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend MirroringDeploymentGroupArgsBuilder.() -> Unit) {
val builder = MirroringDeploymentGroupArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): MirroringDeploymentGroup {
val builtJavaResource =
com.pulumi.gcp.networksecurity.MirroringDeploymentGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return MirroringDeploymentGroup(builtJavaResource)
}
}
/**
* ## 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}}
* ```
*/
public class MirroringDeploymentGroup internal constructor(
override val javaResource: com.pulumi.gcp.networksecurity.MirroringDeploymentGroup,
) : KotlinCustomResource(javaResource, MirroringDeploymentGroupMapper) {
/**
* Output only. The list of Mirroring Endpoint Groups that are connected to this resource.
* Structure is documented below.
*/
public val connectedEndpointGroups: Output>
get() = javaResource.connectedEndpointGroups().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
})
/**
* Output only. [Output only] Create time stamp
*/
public val createTime: Output
get() = javaResource.createTime().applyValue({ args0 -> args0 })
/**
* All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
*/
public val effectiveLabels: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy