Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.msk.kotlin.VpcConnectionArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.msk.kotlin
import com.pulumi.aws.msk.VpcConnectionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Resource for managing an AWS Managed Streaming for Kafka VPC Connection.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.msk.VpcConnection("test", {
* authentication: "SASL_IAM",
* targetClusterArn: "aws_msk_cluster.arn",
* vpcId: testAwsVpc.id,
* clientSubnets: testAwsSubnet.map(__item => __item.id),
* securityGroups: [testAwsSecurityGroup.id],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.msk.VpcConnection("test",
* authentication="SASL_IAM",
* target_cluster_arn="aws_msk_cluster.arn",
* vpc_id=test_aws_vpc["id"],
* client_subnets=[__item["id"] for __item in test_aws_subnet],
* security_groups=[test_aws_security_group["id"]])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.Msk.VpcConnection("test", new()
* {
* Authentication = "SASL_IAM",
* TargetClusterArn = "aws_msk_cluster.arn",
* VpcId = testAwsVpc.Id,
* ClientSubnets = testAwsSubnet.Select(__item => __item.Id).ToList(),
* SecurityGroups = new[]
* {
* testAwsSecurityGroup.Id,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* var splat0 []interface{}
* for _, val0 := range testAwsSubnet {
* splat0 = append(splat0, val0.Id)
* }
* _, err := msk.NewVpcConnection(ctx, "test", &msk.VpcConnectionArgs{
* Authentication: pulumi.String("SASL_IAM"),
* TargetClusterArn: pulumi.String("aws_msk_cluster.arn"),
* VpcId: pulumi.Any(testAwsVpc.Id),
* ClientSubnets: toPulumiArray(splat0),
* SecurityGroups: pulumi.StringArray{
* testAwsSecurityGroup.Id,
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* func toPulumiArray(arr []) pulumi.Array {
* var pulumiArr pulumi.Array
* for _, v := range arr {
* pulumiArr = append(pulumiArr, pulumi.(v))
* }
* return pulumiArr
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.msk.VpcConnection;
* import com.pulumi.aws.msk.VpcConnectionArgs;
* 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 test = new VpcConnection("test", VpcConnectionArgs.builder()
* .authentication("SASL_IAM")
* .targetClusterArn("aws_msk_cluster.arn")
* .vpcId(testAwsVpc.id())
* .clientSubnets(testAwsSubnet.stream().map(element -> element.id()).collect(toList()))
* .securityGroups(testAwsSecurityGroup.id())
* .build());
* }
* }
* ```
*
* ## Import
* Using `pulumi import`, import MSK configurations using the configuration ARN. For example:
* ```sh
* $ pulumi import aws:msk/vpcConnection:VpcConnection example arn:aws:kafka:eu-west-2:123456789012:vpc-connection/123456789012/example/38173259-79cd-4ee8-87f3-682ea6023f48-2
* ```
* @property authentication The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
* @property clientSubnets The list of subnets in the client VPC to connect to.
* @property securityGroups The security groups to attach to the ENIs for the broker nodes.
* @property tags A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
* @property targetClusterArn The Amazon Resource Name (ARN) of the cluster.
* @property vpcId The VPC ID of the remote client.
*/
public data class VpcConnectionArgs(
public val authentication: Output? = null,
public val clientSubnets: Output>? = null,
public val securityGroups: Output>? = null,
public val tags: Output>? = null,
public val targetClusterArn: Output? = null,
public val vpcId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.msk.VpcConnectionArgs =
com.pulumi.aws.msk.VpcConnectionArgs.builder()
.authentication(authentication?.applyValue({ args0 -> args0 }))
.clientSubnets(clientSubnets?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.securityGroups(securityGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.targetClusterArn(targetClusterArn?.applyValue({ args0 -> args0 }))
.vpcId(vpcId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [VpcConnectionArgs].
*/
@PulumiTagMarker
public class VpcConnectionArgsBuilder internal constructor() {
private var authentication: Output? = null
private var clientSubnets: Output>? = null
private var securityGroups: Output>? = null
private var tags: Output>? = null
private var targetClusterArn: Output? = null
private var vpcId: Output? = null
/**
* @param value The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
*/
@JvmName("tpuykqvsrofsgtpc")
public suspend fun authentication(`value`: Output) {
this.authentication = value
}
/**
* @param value The list of subnets in the client VPC to connect to.
*/
@JvmName("fhnlbshpiwscebvb")
public suspend fun clientSubnets(`value`: Output>) {
this.clientSubnets = value
}
@JvmName("voqabuunvbkvxlqj")
public suspend fun clientSubnets(vararg values: Output) {
this.clientSubnets = Output.all(values.asList())
}
/**
* @param values The list of subnets in the client VPC to connect to.
*/
@JvmName("jrhsuehjdwtrmxru")
public suspend fun clientSubnets(values: List>) {
this.clientSubnets = Output.all(values)
}
/**
* @param value The security groups to attach to the ENIs for the broker nodes.
*/
@JvmName("rwphlwesecxelfcl")
public suspend fun securityGroups(`value`: Output>) {
this.securityGroups = value
}
@JvmName("fyggbdngtnmpplmk")
public suspend fun securityGroups(vararg values: Output) {
this.securityGroups = Output.all(values.asList())
}
/**
* @param values The security groups to attach to the ENIs for the broker nodes.
*/
@JvmName("ianvobppsphncmbl")
public suspend fun securityGroups(values: List>) {
this.securityGroups = Output.all(values)
}
/**
* @param value A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("xoyyrtpsjrllnqyw")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The Amazon Resource Name (ARN) of the cluster.
*/
@JvmName("wfvdctwhhfchlidw")
public suspend fun targetClusterArn(`value`: Output) {
this.targetClusterArn = value
}
/**
* @param value The VPC ID of the remote client.
*/
@JvmName("xtxwnqebtdhxpjmb")
public suspend fun vpcId(`value`: Output) {
this.vpcId = value
}
/**
* @param value The authentication type for the client VPC connection. Specify one of these auth type strings: SASL_IAM, SASL_SCRAM, or TLS.
*/
@JvmName("jgnlylnujwvocayb")
public suspend fun authentication(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.authentication = mapped
}
/**
* @param value The list of subnets in the client VPC to connect to.
*/
@JvmName("dxknmkqwavnyldlj")
public suspend fun clientSubnets(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clientSubnets = mapped
}
/**
* @param values The list of subnets in the client VPC to connect to.
*/
@JvmName("aifrxkoifbqfutvr")
public suspend fun clientSubnets(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.clientSubnets = mapped
}
/**
* @param value The security groups to attach to the ENIs for the broker nodes.
*/
@JvmName("fyehcpxhopapggrg")
public suspend fun securityGroups(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.securityGroups = mapped
}
/**
* @param values The security groups to attach to the ENIs for the broker nodes.
*/
@JvmName("wdmjkupohwnxveqy")
public suspend fun securityGroups(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.securityGroups = mapped
}
/**
* @param value A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("kssrkimraojbilmp")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("atddgigabqtpfgkc")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The Amazon Resource Name (ARN) of the cluster.
*/
@JvmName("ugbjluwmrwtkjorp")
public suspend fun targetClusterArn(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetClusterArn = mapped
}
/**
* @param value The VPC ID of the remote client.
*/
@JvmName("qjxhstvwdkoimnvl")
public suspend fun vpcId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.vpcId = mapped
}
internal fun build(): VpcConnectionArgs = VpcConnectionArgs(
authentication = authentication,
clientSubnets = clientSubnets,
securityGroups = securityGroups,
tags = tags,
targetClusterArn = targetClusterArn,
vpcId = vpcId,
)
}