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

com.pulumi.awsnative.elasticache.kotlin.ServerlessCacheArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.elasticache.kotlin

import com.pulumi.awsnative.elasticache.ServerlessCacheArgs.builder
import com.pulumi.awsnative.elasticache.kotlin.inputs.ServerlessCacheCacheUsageLimitsArgs
import com.pulumi.awsnative.elasticache.kotlin.inputs.ServerlessCacheCacheUsageLimitsArgsBuilder
import com.pulumi.awsnative.elasticache.kotlin.inputs.ServerlessCacheEndpointArgs
import com.pulumi.awsnative.elasticache.kotlin.inputs.ServerlessCacheEndpointArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::ElastiCache::ServerlessCache resource creates an Amazon ElastiCache Serverless Cache.
 * @property cacheUsageLimits The cache usage limit for the serverless cache.
 * @property dailySnapshotTime The daily time range (in UTC) during which the service takes automatic snapshot of the Serverless Cache.
 * @property description The description of the Serverless Cache.
 * @property endpoint Represents the information required for client programs to connect to a cache node. This value is read-only.
 * @property engine The engine name of the Serverless Cache.
 * @property finalSnapshotName The final snapshot name which is taken before Serverless Cache is deleted.
 * @property kmsKeyId The ID of the KMS key used to encrypt the cluster.
 * @property majorEngineVersion The major engine version of the Serverless Cache.
 * @property readerEndpoint Represents the information required for client programs to connect to a cache node. This value is read-only.
 * @property securityGroupIds One or more Amazon VPC security groups associated with this Serverless Cache.
 * @property serverlessCacheName The name of the Serverless Cache. This value must be unique.
 * @property snapshotArnsToRestore The ARN's of snapshot to restore Serverless Cache.
 * @property snapshotRetentionLimit The snapshot retention limit of the Serverless Cache.
 * @property subnetIds The subnet id's of the Serverless Cache.
 * @property tags An array of key-value pairs to apply to this Serverless Cache.
 * @property userGroupId The ID of the user group.
 */
public data class ServerlessCacheArgs(
    public val cacheUsageLimits: Output? = null,
    public val dailySnapshotTime: Output? = null,
    public val description: Output? = null,
    public val endpoint: Output? = null,
    public val engine: Output? = null,
    public val finalSnapshotName: Output? = null,
    public val kmsKeyId: Output? = null,
    public val majorEngineVersion: Output? = null,
    public val readerEndpoint: Output? = null,
    public val securityGroupIds: Output>? = null,
    public val serverlessCacheName: Output? = null,
    public val snapshotArnsToRestore: Output>? = null,
    public val snapshotRetentionLimit: Output? = null,
    public val subnetIds: Output>? = null,
    public val tags: Output>? = null,
    public val userGroupId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.elasticache.ServerlessCacheArgs =
        com.pulumi.awsnative.elasticache.ServerlessCacheArgs.builder()
            .cacheUsageLimits(cacheUsageLimits?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dailySnapshotTime(dailySnapshotTime?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .endpoint(endpoint?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .engine(engine?.applyValue({ args0 -> args0 }))
            .finalSnapshotName(finalSnapshotName?.applyValue({ args0 -> args0 }))
            .kmsKeyId(kmsKeyId?.applyValue({ args0 -> args0 }))
            .majorEngineVersion(majorEngineVersion?.applyValue({ args0 -> args0 }))
            .readerEndpoint(readerEndpoint?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .securityGroupIds(securityGroupIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .serverlessCacheName(serverlessCacheName?.applyValue({ args0 -> args0 }))
            .snapshotArnsToRestore(snapshotArnsToRestore?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .snapshotRetentionLimit(snapshotRetentionLimit?.applyValue({ args0 -> args0 }))
            .subnetIds(subnetIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .userGroupId(userGroupId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ServerlessCacheArgs].
 */
@PulumiTagMarker
public class ServerlessCacheArgsBuilder internal constructor() {
    private var cacheUsageLimits: Output? = null

    private var dailySnapshotTime: Output? = null

    private var description: Output? = null

    private var endpoint: Output? = null

    private var engine: Output? = null

    private var finalSnapshotName: Output? = null

    private var kmsKeyId: Output? = null

    private var majorEngineVersion: Output? = null

    private var readerEndpoint: Output? = null

    private var securityGroupIds: Output>? = null

    private var serverlessCacheName: Output? = null

    private var snapshotArnsToRestore: Output>? = null

    private var snapshotRetentionLimit: Output? = null

    private var subnetIds: Output>? = null

    private var tags: Output>? = null

    private var userGroupId: Output? = null

    /**
     * @param value The cache usage limit for the serverless cache.
     */
    @JvmName("asocdahsrmxcmhsv")
    public suspend fun cacheUsageLimits(`value`: Output) {
        this.cacheUsageLimits = value
    }

    /**
     * @param value The daily time range (in UTC) during which the service takes automatic snapshot of the Serverless Cache.
     */
    @JvmName("ewnblopgtelkbxty")
    public suspend fun dailySnapshotTime(`value`: Output) {
        this.dailySnapshotTime = value
    }

    /**
     * @param value The description of the Serverless Cache.
     */
    @JvmName("husverjcauhiruss")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Represents the information required for client programs to connect to a cache node. This value is read-only.
     */
    @JvmName("jjlsncndlixadsoc")
    public suspend fun endpoint(`value`: Output) {
        this.endpoint = value
    }

    /**
     * @param value The engine name of the Serverless Cache.
     */
    @JvmName("nyorvgtqlhqostph")
    public suspend fun engine(`value`: Output) {
        this.engine = value
    }

    /**
     * @param value The final snapshot name which is taken before Serverless Cache is deleted.
     */
    @JvmName("asmuufpdhssvpwbh")
    public suspend fun finalSnapshotName(`value`: Output) {
        this.finalSnapshotName = value
    }

    /**
     * @param value The ID of the KMS key used to encrypt the cluster.
     */
    @JvmName("myfrxrxrayooryhf")
    public suspend fun kmsKeyId(`value`: Output) {
        this.kmsKeyId = value
    }

    /**
     * @param value The major engine version of the Serverless Cache.
     */
    @JvmName("weapohrpbhpnndyw")
    public suspend fun majorEngineVersion(`value`: Output) {
        this.majorEngineVersion = value
    }

    /**
     * @param value Represents the information required for client programs to connect to a cache node. This value is read-only.
     */
    @JvmName("dclgisekswdemegm")
    public suspend fun readerEndpoint(`value`: Output) {
        this.readerEndpoint = value
    }

    /**
     * @param value One or more Amazon VPC security groups associated with this Serverless Cache.
     */
    @JvmName("wfcljeclovoouwwm")
    public suspend fun securityGroupIds(`value`: Output>) {
        this.securityGroupIds = value
    }

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

    /**
     * @param values One or more Amazon VPC security groups associated with this Serverless Cache.
     */
    @JvmName("sqwpsslbytryyfjf")
    public suspend fun securityGroupIds(values: List>) {
        this.securityGroupIds = Output.all(values)
    }

    /**
     * @param value The name of the Serverless Cache. This value must be unique.
     */
    @JvmName("tldxgnsbhfymtyia")
    public suspend fun serverlessCacheName(`value`: Output) {
        this.serverlessCacheName = value
    }

    /**
     * @param value The ARN's of snapshot to restore Serverless Cache.
     */
    @JvmName("rbkhmumrfhhsohxd")
    public suspend fun snapshotArnsToRestore(`value`: Output>) {
        this.snapshotArnsToRestore = value
    }

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

    /**
     * @param values The ARN's of snapshot to restore Serverless Cache.
     */
    @JvmName("xbafytliiuehcfwf")
    public suspend fun snapshotArnsToRestore(values: List>) {
        this.snapshotArnsToRestore = Output.all(values)
    }

    /**
     * @param value The snapshot retention limit of the Serverless Cache.
     */
    @JvmName("shbijiqjfarnndyt")
    public suspend fun snapshotRetentionLimit(`value`: Output) {
        this.snapshotRetentionLimit = value
    }

    /**
     * @param value The subnet id's of the Serverless Cache.
     */
    @JvmName("rftymahanuppyigk")
    public suspend fun subnetIds(`value`: Output>) {
        this.subnetIds = value
    }

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

    /**
     * @param values The subnet id's of the Serverless Cache.
     */
    @JvmName("jkqnjgqdtappnbah")
    public suspend fun subnetIds(values: List>) {
        this.subnetIds = Output.all(values)
    }

    /**
     * @param value An array of key-value pairs to apply to this Serverless Cache.
     */
    @JvmName("eyhocmmbasedsjyy")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this Serverless Cache.
     */
    @JvmName("quajetnodmjqqric")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The ID of the user group.
     */
    @JvmName("xamcthqupjnndoao")
    public suspend fun userGroupId(`value`: Output) {
        this.userGroupId = value
    }

    /**
     * @param value The cache usage limit for the serverless cache.
     */
    @JvmName("qaywyrdacrfdxane")
    public suspend fun cacheUsageLimits(`value`: ServerlessCacheCacheUsageLimitsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cacheUsageLimits = mapped
    }

    /**
     * @param argument The cache usage limit for the serverless cache.
     */
    @JvmName("qaxnjupksaaxvmya")
    public suspend fun cacheUsageLimits(argument: suspend ServerlessCacheCacheUsageLimitsArgsBuilder.() -> Unit) {
        val toBeMapped = ServerlessCacheCacheUsageLimitsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.cacheUsageLimits = mapped
    }

    /**
     * @param value The daily time range (in UTC) during which the service takes automatic snapshot of the Serverless Cache.
     */
    @JvmName("shtksowdhptqsjhp")
    public suspend fun dailySnapshotTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dailySnapshotTime = mapped
    }

    /**
     * @param value The description of the Serverless Cache.
     */
    @JvmName("focfffnjrdpvscsi")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Represents the information required for client programs to connect to a cache node. This value is read-only.
     */
    @JvmName("yigvarsjktfnaxoi")
    public suspend fun endpoint(`value`: ServerlessCacheEndpointArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endpoint = mapped
    }

    /**
     * @param argument Represents the information required for client programs to connect to a cache node. This value is read-only.
     */
    @JvmName("qthgocbhqipkofoq")
    public suspend fun endpoint(argument: suspend ServerlessCacheEndpointArgsBuilder.() -> Unit) {
        val toBeMapped = ServerlessCacheEndpointArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.endpoint = mapped
    }

    /**
     * @param value The engine name of the Serverless Cache.
     */
    @JvmName("owkvenedsxoeorqt")
    public suspend fun engine(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.engine = mapped
    }

    /**
     * @param value The final snapshot name which is taken before Serverless Cache is deleted.
     */
    @JvmName("eflomupakjjsncrt")
    public suspend fun finalSnapshotName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.finalSnapshotName = mapped
    }

    /**
     * @param value The ID of the KMS key used to encrypt the cluster.
     */
    @JvmName("ahlqtwgniseomqfa")
    public suspend fun kmsKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyId = mapped
    }

    /**
     * @param value The major engine version of the Serverless Cache.
     */
    @JvmName("xpbvdhdeknngdupw")
    public suspend fun majorEngineVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.majorEngineVersion = mapped
    }

    /**
     * @param value Represents the information required for client programs to connect to a cache node. This value is read-only.
     */
    @JvmName("ujjkkammvqjqpugb")
    public suspend fun readerEndpoint(`value`: ServerlessCacheEndpointArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.readerEndpoint = mapped
    }

    /**
     * @param argument Represents the information required for client programs to connect to a cache node. This value is read-only.
     */
    @JvmName("rulhtavhkqqollwx")
    public suspend fun readerEndpoint(argument: suspend ServerlessCacheEndpointArgsBuilder.() -> Unit) {
        val toBeMapped = ServerlessCacheEndpointArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.readerEndpoint = mapped
    }

    /**
     * @param value One or more Amazon VPC security groups associated with this Serverless Cache.
     */
    @JvmName("ncluckirpufroknb")
    public suspend fun securityGroupIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param values One or more Amazon VPC security groups associated with this Serverless Cache.
     */
    @JvmName("uoghtuekirtfwdef")
    public suspend fun securityGroupIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param value The name of the Serverless Cache. This value must be unique.
     */
    @JvmName("mouiktivcbtfdhku")
    public suspend fun serverlessCacheName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serverlessCacheName = mapped
    }

    /**
     * @param value The ARN's of snapshot to restore Serverless Cache.
     */
    @JvmName("qjmsejmepnkxnjbw")
    public suspend fun snapshotArnsToRestore(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snapshotArnsToRestore = mapped
    }

    /**
     * @param values The ARN's of snapshot to restore Serverless Cache.
     */
    @JvmName("hfkniqdmysuwpcuy")
    public suspend fun snapshotArnsToRestore(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.snapshotArnsToRestore = mapped
    }

    /**
     * @param value The snapshot retention limit of the Serverless Cache.
     */
    @JvmName("xhjiuxuygowklcqs")
    public suspend fun snapshotRetentionLimit(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snapshotRetentionLimit = mapped
    }

    /**
     * @param value The subnet id's of the Serverless Cache.
     */
    @JvmName("hitkhekcidexnaao")
    public suspend fun subnetIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param values The subnet id's of the Serverless Cache.
     */
    @JvmName("avylkioiiijfodlt")
    public suspend fun subnetIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this Serverless Cache.
     */
    @JvmName("pjqxggiffgkxltlh")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this Serverless Cache.
     */
    @JvmName("lnqbvoiherptkanh")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this Serverless Cache.
     */
    @JvmName("ytdtykgqajecxtej")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this Serverless Cache.
     */
    @JvmName("luadkfmdhaefjhno")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this Serverless Cache.
     */
    @JvmName("xeyseavgteqchsjo")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The ID of the user group.
     */
    @JvmName("hcyjcbeqnlflskbg")
    public suspend fun userGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userGroupId = mapped
    }

    internal fun build(): ServerlessCacheArgs = ServerlessCacheArgs(
        cacheUsageLimits = cacheUsageLimits,
        dailySnapshotTime = dailySnapshotTime,
        description = description,
        endpoint = endpoint,
        engine = engine,
        finalSnapshotName = finalSnapshotName,
        kmsKeyId = kmsKeyId,
        majorEngineVersion = majorEngineVersion,
        readerEndpoint = readerEndpoint,
        securityGroupIds = securityGroupIds,
        serverlessCacheName = serverlessCacheName,
        snapshotArnsToRestore = snapshotArnsToRestore,
        snapshotRetentionLimit = snapshotRetentionLimit,
        subnetIds = subnetIds,
        tags = tags,
        userGroupId = userGroupId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy