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

com.pulumi.aws.redshift.kotlin.ClusterSnapshotArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.redshift.kotlin

import com.pulumi.aws.redshift.ClusterSnapshotArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a Redshift cluster snapshot
 * ## Example Usage
 * 
 * ```yaml
 * resources:
 *   example:
 *     type: aws:redshift:ClusterSnapshot
 *     properties:
 *       clusterSnapshotName: example
 *       clusterSnapshotContent:
 *         fn::toJSON:
 *           AllowDBUserOverride: '1'
 *           Client_ID: ExampleClientID
 *           App_ID: example
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Redshift Cluster Snapshots using `snapshot_identifier`. For example:
 * ```sh
 * $ pulumi import aws:redshift/clusterSnapshot:ClusterSnapshot test example
 * ```
 * @property clusterIdentifier The cluster identifier for which you want a snapshot.
 * @property manualSnapshotRetentionPeriod The number of days that a manual snapshot is retained. If the value is `-1`, the manual snapshot is retained indefinitely. Valid values are -1 and between `1` and `3653`.
 * @property snapshotIdentifier A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the Amazon Web Services account.
 * @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.
 */
public data class ClusterSnapshotArgs(
    public val clusterIdentifier: Output? = null,
    public val manualSnapshotRetentionPeriod: Output? = null,
    public val snapshotIdentifier: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.redshift.ClusterSnapshotArgs =
        com.pulumi.aws.redshift.ClusterSnapshotArgs.builder()
            .clusterIdentifier(clusterIdentifier?.applyValue({ args0 -> args0 }))
            .manualSnapshotRetentionPeriod(manualSnapshotRetentionPeriod?.applyValue({ args0 -> args0 }))
            .snapshotIdentifier(snapshotIdentifier?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ClusterSnapshotArgs].
 */
@PulumiTagMarker
public class ClusterSnapshotArgsBuilder internal constructor() {
    private var clusterIdentifier: Output? = null

    private var manualSnapshotRetentionPeriod: Output? = null

    private var snapshotIdentifier: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The cluster identifier for which you want a snapshot.
     */
    @JvmName("ruqosmdbviosiuti")
    public suspend fun clusterIdentifier(`value`: Output) {
        this.clusterIdentifier = value
    }

    /**
     * @param value The number of days that a manual snapshot is retained. If the value is `-1`, the manual snapshot is retained indefinitely. Valid values are -1 and between `1` and `3653`.
     */
    @JvmName("kysnfbojourrrrcj")
    public suspend fun manualSnapshotRetentionPeriod(`value`: Output) {
        this.manualSnapshotRetentionPeriod = value
    }

    /**
     * @param value A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the Amazon Web Services account.
     */
    @JvmName("kmminyoamnknobem")
    public suspend fun snapshotIdentifier(`value`: Output) {
        this.snapshotIdentifier = value
    }

    /**
     * @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("mwuihihstihioqjf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The cluster identifier for which you want a snapshot.
     */
    @JvmName("vwwycqbkywjjpscu")
    public suspend fun clusterIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterIdentifier = mapped
    }

    /**
     * @param value The number of days that a manual snapshot is retained. If the value is `-1`, the manual snapshot is retained indefinitely. Valid values are -1 and between `1` and `3653`.
     */
    @JvmName("bnfqidqvutdfhtux")
    public suspend fun manualSnapshotRetentionPeriod(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.manualSnapshotRetentionPeriod = mapped
    }

    /**
     * @param value A unique identifier for the snapshot that you are requesting. This identifier must be unique for all snapshots within the Amazon Web Services account.
     */
    @JvmName("hwwjqanltnexdxsb")
    public suspend fun snapshotIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snapshotIdentifier = 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("rlxijstnqkpphbvh")
    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("yuwhemegilywcdih")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ClusterSnapshotArgs = ClusterSnapshotArgs(
        clusterIdentifier = clusterIdentifier,
        manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriod,
        snapshotIdentifier = snapshotIdentifier,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy