com.pulumi.aws.msk.kotlin.ServerlessClusterArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-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.aws.msk.kotlin
import com.pulumi.aws.msk.ServerlessClusterArgs.builder
import com.pulumi.aws.msk.kotlin.inputs.ServerlessClusterClientAuthenticationArgs
import com.pulumi.aws.msk.kotlin.inputs.ServerlessClusterClientAuthenticationArgsBuilder
import com.pulumi.aws.msk.kotlin.inputs.ServerlessClusterVpcConfigArgs
import com.pulumi.aws.msk.kotlin.inputs.ServerlessClusterVpcConfigArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages an Amazon MSK Serverless cluster.
* > **Note:** To manage a _provisioned_ Amazon MSK cluster, use the `aws.msk.Cluster` resource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.msk.ServerlessCluster("example", {
* clusterName: "Example",
* vpcConfigs: [{
* subnetIds: exampleAwsSubnet.map(__item => __item.id),
* securityGroupIds: [exampleAwsSecurityGroup.id],
* }],
* clientAuthentication: {
* sasl: {
* iam: {
* enabled: true,
* },
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.msk.ServerlessCluster("example",
* cluster_name="Example",
* vpc_configs=[{
* "subnet_ids": [__item["id"] for __item in example_aws_subnet],
* "security_group_ids": [example_aws_security_group["id"]],
* }],
* client_authentication={
* "sasl": {
* "iam": {
* "enabled": True,
* },
* },
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Msk.ServerlessCluster("example", new()
* {
* ClusterName = "Example",
* VpcConfigs = new[]
* {
* new Aws.Msk.Inputs.ServerlessClusterVpcConfigArgs
* {
* SubnetIds = exampleAwsSubnet.Select(__item => __item.Id).ToList(),
* SecurityGroupIds = new[]
* {
* exampleAwsSecurityGroup.Id,
* },
* },
* },
* ClientAuthentication = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationArgs
* {
* Sasl = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationSaslArgs
* {
* Iam = new Aws.Msk.Inputs.ServerlessClusterClientAuthenticationSaslIamArgs
* {
* Enabled = true,
* },
* },
* },
* });
* });
* ```
* ```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 {
* _, err := msk.NewServerlessCluster(ctx, "example", &msk.ServerlessClusterArgs{
* ClusterName: pulumi.String("Example"),
* VpcConfigs: msk.ServerlessClusterVpcConfigArray{
* &msk.ServerlessClusterVpcConfigArgs{
* SubnetIds: []pulumi.String(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:3,24-46)),
* SecurityGroupIds: pulumi.StringArray{
* exampleAwsSecurityGroup.Id,
* },
* },
* },
* ClientAuthentication: &msk.ServerlessClusterClientAuthenticationArgs{
* Sasl: &msk.ServerlessClusterClientAuthenticationSaslArgs{
* Iam: &msk.ServerlessClusterClientAuthenticationSaslIamArgs{
* Enabled: pulumi.Bool(true),
* },
* },
* },
* })
* 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.aws.msk.ServerlessCluster;
* import com.pulumi.aws.msk.ServerlessClusterArgs;
* import com.pulumi.aws.msk.inputs.ServerlessClusterVpcConfigArgs;
* import com.pulumi.aws.msk.inputs.ServerlessClusterClientAuthenticationArgs;
* import com.pulumi.aws.msk.inputs.ServerlessClusterClientAuthenticationSaslArgs;
* import com.pulumi.aws.msk.inputs.ServerlessClusterClientAuthenticationSaslIamArgs;
* 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 example = new ServerlessCluster("example", ServerlessClusterArgs.builder()
* .clusterName("Example")
* .vpcConfigs(ServerlessClusterVpcConfigArgs.builder()
* .subnetIds(exampleAwsSubnet.stream().map(element -> element.id()).collect(toList()))
* .securityGroupIds(exampleAwsSecurityGroup.id())
* .build())
* .clientAuthentication(ServerlessClusterClientAuthenticationArgs.builder()
* .sasl(ServerlessClusterClientAuthenticationSaslArgs.builder()
* .iam(ServerlessClusterClientAuthenticationSaslIamArgs.builder()
* .enabled(true)
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
*
* ## Import
* Using `pulumi import`, import MSK serverless clusters using the cluster `arn`. For example:
* ```sh
* $ pulumi import aws:msk/serverlessCluster:ServerlessCluster example arn:aws:kafka:us-west-2:123456789012:cluster/example/279c0212-d057-4dba-9aa9-1c4e5a25bfc7-3
* ```
* @property clientAuthentication Specifies client authentication information for the serverless cluster. See below.
* @property clusterName The name of the serverless cluster.
* @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 vpcConfigs VPC configuration information. See below.
*/
public data class ServerlessClusterArgs(
public val clientAuthentication: Output? = null,
public val clusterName: Output? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy