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

com.pulumi.aws.docdb.kotlin.ElasticClusterArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.docdb.kotlin

import com.pulumi.aws.docdb.ElasticClusterArgs.builder
import com.pulumi.aws.docdb.kotlin.inputs.ElasticClusterTimeoutsArgs
import com.pulumi.aws.docdb.kotlin.inputs.ElasticClusterTimeoutsArgsBuilder
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.Double
import kotlin.Int
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 AWS DocDB (DocumentDB) Elastic Cluster.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.docdb.ElasticCluster("example", {
 *     name: "my-docdb-cluster",
 *     adminUserName: "foo",
 *     adminUserPassword: "mustbeeightchars",
 *     authType: "PLAIN_TEXT",
 *     shardCapacity: 2,
 *     shardCount: 1,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.docdb.ElasticCluster("example",
 *     name="my-docdb-cluster",
 *     admin_user_name="foo",
 *     admin_user_password="mustbeeightchars",
 *     auth_type="PLAIN_TEXT",
 *     shard_capacity=2,
 *     shard_count=1)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.DocDB.ElasticCluster("example", new()
 *     {
 *         Name = "my-docdb-cluster",
 *         AdminUserName = "foo",
 *         AdminUserPassword = "mustbeeightchars",
 *         AuthType = "PLAIN_TEXT",
 *         ShardCapacity = 2,
 *         ShardCount = 1,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/docdb"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := docdb.NewElasticCluster(ctx, "example", &docdb.ElasticClusterArgs{
 * 			Name:              pulumi.String("my-docdb-cluster"),
 * 			AdminUserName:     pulumi.String("foo"),
 * 			AdminUserPassword: pulumi.String("mustbeeightchars"),
 * 			AuthType:          pulumi.String("PLAIN_TEXT"),
 * 			ShardCapacity:     pulumi.Int(2),
 * 			ShardCount:        pulumi.Int(1),
 * 		})
 * 		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.docdb.ElasticCluster;
 * import com.pulumi.aws.docdb.ElasticClusterArgs;
 * 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 ElasticCluster("example", ElasticClusterArgs.builder()
 *             .name("my-docdb-cluster")
 *             .adminUserName("foo")
 *             .adminUserPassword("mustbeeightchars")
 *             .authType("PLAIN_TEXT")
 *             .shardCapacity(2)
 *             .shardCount(1)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:docdb:ElasticCluster
 *     properties:
 *       name: my-docdb-cluster
 *       adminUserName: foo
 *       adminUserPassword: mustbeeightchars
 *       authType: PLAIN_TEXT
 *       shardCapacity: 2
 *       shardCount: 1
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import DocDB (DocumentDB) Elastic Cluster using the `arn` argument. For example,
 * ```sh
 * $ pulumi import aws:docdb/elasticCluster:ElasticCluster example arn:aws:docdb-elastic:us-east-1:000011112222:cluster/12345678-7abc-def0-1234-56789abcdef
 * ```
 * @property adminUserName Name of the Elastic DocumentDB cluster administrator
 * @property adminUserPassword Password for the Elastic DocumentDB cluster administrator. Can contain any printable ASCII characters. Must be at least 8 characters
 * @property authType Authentication type for the Elastic DocumentDB cluster. Valid values are `PLAIN_TEXT` and `SECRET_ARN`
 * @property backupRetentionPeriod The number of days for which automatic snapshots are retained. It should be in between 1 and 35. If not specified, the default value of 1 is set.
 * @property kmsKeyId ARN of a KMS key that is used to encrypt the Elastic DocumentDB cluster. If not specified, the default encryption key that KMS creates for your account is used.
 * @property name Name of the Elastic DocumentDB cluster
 * @property preferredBackupWindow The daily time range during which automated backups are created if automated backups are enabled, as determined by the `backup_retention_period`.
 * @property preferredMaintenanceWindow Weekly time range during which system maintenance can occur in UTC. Format: `ddd:hh24:mi-ddd:hh24:mi`. If not specified, AWS will choose a random 30-minute window on a random day of the week.
 * @property shardCapacity Number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64
 * @property shardCount Number of shards assigned to the elastic cluster. Maximum is 32
 * The following arguments are optional:
 * @property subnetIds IDs of subnets in which the Elastic DocumentDB Cluster operates.
 * @property tags A map of tags to assign to the collection. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property timeouts
 * @property vpcSecurityGroupIds List of VPC security groups to associate with the Elastic DocumentDB Cluster
 */
public data class ElasticClusterArgs(
    public val adminUserName: Output? = null,
    public val adminUserPassword: Output? = null,
    public val authType: Output? = null,
    public val backupRetentionPeriod: Output? = null,
    public val kmsKeyId: Output? = null,
    public val name: Output? = null,
    public val preferredBackupWindow: Output? = null,
    public val preferredMaintenanceWindow: Output? = null,
    public val shardCapacity: Output? = null,
    public val shardCount: Output? = null,
    public val subnetIds: Output>? = null,
    public val tags: Output>? = null,
    public val timeouts: Output? = null,
    public val vpcSecurityGroupIds: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.docdb.ElasticClusterArgs =
        com.pulumi.aws.docdb.ElasticClusterArgs.builder()
            .adminUserName(adminUserName?.applyValue({ args0 -> args0 }))
            .adminUserPassword(adminUserPassword?.applyValue({ args0 -> args0 }))
            .authType(authType?.applyValue({ args0 -> args0 }))
            .backupRetentionPeriod(backupRetentionPeriod?.applyValue({ args0 -> args0 }))
            .kmsKeyId(kmsKeyId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .preferredBackupWindow(preferredBackupWindow?.applyValue({ args0 -> args0 }))
            .preferredMaintenanceWindow(preferredMaintenanceWindow?.applyValue({ args0 -> args0 }))
            .shardCapacity(shardCapacity?.applyValue({ args0 -> args0 }))
            .shardCount(shardCount?.applyValue({ args0 -> args0 }))
            .subnetIds(subnetIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .vpcSecurityGroupIds(
                vpcSecurityGroupIds?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            ).build()
}

/**
 * Builder for [ElasticClusterArgs].
 */
@PulumiTagMarker
public class ElasticClusterArgsBuilder internal constructor() {
    private var adminUserName: Output? = null

    private var adminUserPassword: Output? = null

    private var authType: Output? = null

    private var backupRetentionPeriod: Output? = null

    private var kmsKeyId: Output? = null

    private var name: Output? = null

    private var preferredBackupWindow: Output? = null

    private var preferredMaintenanceWindow: Output? = null

    private var shardCapacity: Output? = null

    private var shardCount: Output? = null

    private var subnetIds: Output>? = null

    private var tags: Output>? = null

    private var timeouts: Output? = null

    private var vpcSecurityGroupIds: Output>? = null

    /**
     * @param value Name of the Elastic DocumentDB cluster administrator
     */
    @JvmName("smbvegrwggfqmtph")
    public suspend fun adminUserName(`value`: Output) {
        this.adminUserName = value
    }

    /**
     * @param value Password for the Elastic DocumentDB cluster administrator. Can contain any printable ASCII characters. Must be at least 8 characters
     */
    @JvmName("ijmrafrnhviqjwno")
    public suspend fun adminUserPassword(`value`: Output) {
        this.adminUserPassword = value
    }

    /**
     * @param value Authentication type for the Elastic DocumentDB cluster. Valid values are `PLAIN_TEXT` and `SECRET_ARN`
     */
    @JvmName("cdlejctcleddjfhl")
    public suspend fun authType(`value`: Output) {
        this.authType = value
    }

    /**
     * @param value The number of days for which automatic snapshots are retained. It should be in between 1 and 35. If not specified, the default value of 1 is set.
     */
    @JvmName("rhvqlqpylacyldjg")
    public suspend fun backupRetentionPeriod(`value`: Output) {
        this.backupRetentionPeriod = value
    }

    /**
     * @param value ARN of a KMS key that is used to encrypt the Elastic DocumentDB cluster. If not specified, the default encryption key that KMS creates for your account is used.
     */
    @JvmName("jsnjtlufdgcveukr")
    public suspend fun kmsKeyId(`value`: Output) {
        this.kmsKeyId = value
    }

    /**
     * @param value Name of the Elastic DocumentDB cluster
     */
    @JvmName("bteqrpyrqnccolgw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The daily time range during which automated backups are created if automated backups are enabled, as determined by the `backup_retention_period`.
     */
    @JvmName("wwgnvyifwphilyqf")
    public suspend fun preferredBackupWindow(`value`: Output) {
        this.preferredBackupWindow = value
    }

    /**
     * @param value Weekly time range during which system maintenance can occur in UTC. Format: `ddd:hh24:mi-ddd:hh24:mi`. If not specified, AWS will choose a random 30-minute window on a random day of the week.
     */
    @JvmName("daenpwaldoxuyaqh")
    public suspend fun preferredMaintenanceWindow(`value`: Output) {
        this.preferredMaintenanceWindow = value
    }

    /**
     * @param value Number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64
     */
    @JvmName("cserqntwegtdncpx")
    public suspend fun shardCapacity(`value`: Output) {
        this.shardCapacity = value
    }

    /**
     * @param value Number of shards assigned to the elastic cluster. Maximum is 32
     * The following arguments are optional:
     */
    @JvmName("flrekhsboislfkim")
    public suspend fun shardCount(`value`: Output) {
        this.shardCount = value
    }

    /**
     * @param value IDs of subnets in which the Elastic DocumentDB Cluster operates.
     */
    @JvmName("cwogmckmpjwlfyeh")
    public suspend fun subnetIds(`value`: Output>) {
        this.subnetIds = value
    }

    @JvmName("eyinibttsdlahexx")
    public suspend fun subnetIds(vararg values: Output) {
        this.subnetIds = Output.all(values.asList())
    }

    /**
     * @param values IDs of subnets in which the Elastic DocumentDB Cluster operates.
     */
    @JvmName("gcfytkwcowftswkh")
    public suspend fun subnetIds(values: List>) {
        this.subnetIds = Output.all(values)
    }

    /**
     * @param value A map of tags to assign to the collection. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("bxryrbcebuuhwkxc")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value
     */
    @JvmName("woxopvovevijsbgb")
    public suspend fun timeouts(`value`: Output) {
        this.timeouts = value
    }

    /**
     * @param value List of VPC security groups to associate with the Elastic DocumentDB Cluster
     */
    @JvmName("ehfkyvpcfegefioo")
    public suspend fun vpcSecurityGroupIds(`value`: Output>) {
        this.vpcSecurityGroupIds = value
    }

    @JvmName("gbpcfuxigqejqkpi")
    public suspend fun vpcSecurityGroupIds(vararg values: Output) {
        this.vpcSecurityGroupIds = Output.all(values.asList())
    }

    /**
     * @param values List of VPC security groups to associate with the Elastic DocumentDB Cluster
     */
    @JvmName("eqswklyapqqlapsx")
    public suspend fun vpcSecurityGroupIds(values: List>) {
        this.vpcSecurityGroupIds = Output.all(values)
    }

    /**
     * @param value Name of the Elastic DocumentDB cluster administrator
     */
    @JvmName("evlkorrypwommrvf")
    public suspend fun adminUserName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.adminUserName = mapped
    }

    /**
     * @param value Password for the Elastic DocumentDB cluster administrator. Can contain any printable ASCII characters. Must be at least 8 characters
     */
    @JvmName("xtvesdjgrpgbeqdm")
    public suspend fun adminUserPassword(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.adminUserPassword = mapped
    }

    /**
     * @param value Authentication type for the Elastic DocumentDB cluster. Valid values are `PLAIN_TEXT` and `SECRET_ARN`
     */
    @JvmName("rfmmwnrhtihmuhhg")
    public suspend fun authType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authType = mapped
    }

    /**
     * @param value The number of days for which automatic snapshots are retained. It should be in between 1 and 35. If not specified, the default value of 1 is set.
     */
    @JvmName("erquoowfwtarhemo")
    public suspend fun backupRetentionPeriod(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupRetentionPeriod = mapped
    }

    /**
     * @param value ARN of a KMS key that is used to encrypt the Elastic DocumentDB cluster. If not specified, the default encryption key that KMS creates for your account is used.
     */
    @JvmName("jngateorxwreorin")
    public suspend fun kmsKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyId = mapped
    }

    /**
     * @param value Name of the Elastic DocumentDB cluster
     */
    @JvmName("cuqobrykgewtlmun")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The daily time range during which automated backups are created if automated backups are enabled, as determined by the `backup_retention_period`.
     */
    @JvmName("niohbjwqwkdlbiir")
    public suspend fun preferredBackupWindow(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preferredBackupWindow = mapped
    }

    /**
     * @param value Weekly time range during which system maintenance can occur in UTC. Format: `ddd:hh24:mi-ddd:hh24:mi`. If not specified, AWS will choose a random 30-minute window on a random day of the week.
     */
    @JvmName("hsphsjhvvtpduaop")
    public suspend fun preferredMaintenanceWindow(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preferredMaintenanceWindow = mapped
    }

    /**
     * @param value Number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64
     */
    @JvmName("gjjsfyqdfraxwjsl")
    public suspend fun shardCapacity(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shardCapacity = mapped
    }

    /**
     * @param value Number of shards assigned to the elastic cluster. Maximum is 32
     * The following arguments are optional:
     */
    @JvmName("ssmcwdkienebdynp")
    public suspend fun shardCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shardCount = mapped
    }

    /**
     * @param value IDs of subnets in which the Elastic DocumentDB Cluster operates.
     */
    @JvmName("eopovitfkwtypirj")
    public suspend fun subnetIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param values IDs of subnets in which the Elastic DocumentDB Cluster operates.
     */
    @JvmName("gwsvbfukpvifxjxh")
    public suspend fun subnetIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param value A map of tags to assign to the collection. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("wcxckypsndouqyth")
    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 collection. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("wlgkqqfyakdpeexm")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value
     */
    @JvmName("gmcfcbheaufblfsa")
    public suspend fun timeouts(`value`: ElasticClusterTimeoutsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeouts = mapped
    }

    /**
     * @param argument
     */
    @JvmName("oohjwmwsdfivmyql")
    public suspend fun timeouts(argument: suspend ElasticClusterTimeoutsArgsBuilder.() -> Unit) {
        val toBeMapped = ElasticClusterTimeoutsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeouts = mapped
    }

    /**
     * @param value List of VPC security groups to associate with the Elastic DocumentDB Cluster
     */
    @JvmName("ibfvjnmslcxtblip")
    public suspend fun vpcSecurityGroupIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcSecurityGroupIds = mapped
    }

    /**
     * @param values List of VPC security groups to associate with the Elastic DocumentDB Cluster
     */
    @JvmName("txjsdxunjjlmpvim")
    public suspend fun vpcSecurityGroupIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vpcSecurityGroupIds = mapped
    }

    internal fun build(): ElasticClusterArgs = ElasticClusterArgs(
        adminUserName = adminUserName,
        adminUserPassword = adminUserPassword,
        authType = authType,
        backupRetentionPeriod = backupRetentionPeriod,
        kmsKeyId = kmsKeyId,
        name = name,
        preferredBackupWindow = preferredBackupWindow,
        preferredMaintenanceWindow = preferredMaintenanceWindow,
        shardCapacity = shardCapacity,
        shardCount = shardCount,
        subnetIds = subnetIds,
        tags = tags,
        timeouts = timeouts,
        vpcSecurityGroupIds = vpcSecurityGroupIds,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy