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

com.pulumi.awsnative.s3.kotlin.inputs.BucketEncryptionArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.s3.kotlin.inputs

import com.pulumi.awsnative.s3.inputs.BucketEncryptionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Specifies default encryption for a bucket using server-side encryption with Amazon S3-managed keys (SSE-S3), AWS KMS-managed keys (SSE-KMS), or dual-layer server-side encryption with KMS-managed keys (DSSE-KMS). For information about the Amazon S3 default encryption feature, see [Amazon S3 Default Encryption for S3 Buckets](https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html) in the *Amazon S3 User Guide*.
 * @property serverSideEncryptionConfiguration Specifies the default server-side-encryption configuration.
 */
public data class BucketEncryptionArgs(
    public val serverSideEncryptionConfiguration: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.s3.inputs.BucketEncryptionArgs =
        com.pulumi.awsnative.s3.inputs.BucketEncryptionArgs.builder()
            .serverSideEncryptionConfiguration(
                serverSideEncryptionConfiguration.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            ).build()
}

/**
 * Builder for [BucketEncryptionArgs].
 */
@PulumiTagMarker
public class BucketEncryptionArgsBuilder internal constructor() {
    private var serverSideEncryptionConfiguration: Output>? =
        null

    /**
     * @param value Specifies the default server-side-encryption configuration.
     */
    @JvmName("mylaeglvfyeawjsd")
    public suspend fun serverSideEncryptionConfiguration(`value`: Output>) {
        this.serverSideEncryptionConfiguration = value
    }

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

    /**
     * @param values Specifies the default server-side-encryption configuration.
     */
    @JvmName("xvedfhqkjovqywpk")
    public suspend fun serverSideEncryptionConfiguration(values: List>) {
        this.serverSideEncryptionConfiguration = Output.all(values)
    }

    /**
     * @param value Specifies the default server-side-encryption configuration.
     */
    @JvmName("wrmfkewqsofppldq")
    public suspend fun serverSideEncryptionConfiguration(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.serverSideEncryptionConfiguration = mapped
    }

    /**
     * @param argument Specifies the default server-side-encryption configuration.
     */
    @JvmName("bcywxgwbhjyujldd")
    public suspend fun serverSideEncryptionConfiguration(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketServerSideEncryptionRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.serverSideEncryptionConfiguration = mapped
    }

    /**
     * @param argument Specifies the default server-side-encryption configuration.
     */
    @JvmName("wifmmuxxganjoquf")
    public suspend fun serverSideEncryptionConfiguration(vararg argument: suspend BucketServerSideEncryptionRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketServerSideEncryptionRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.serverSideEncryptionConfiguration = mapped
    }

    /**
     * @param argument Specifies the default server-side-encryption configuration.
     */
    @JvmName("mdireabppsuixyvx")
    public suspend fun serverSideEncryptionConfiguration(argument: suspend BucketServerSideEncryptionRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            BucketServerSideEncryptionRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.serverSideEncryptionConfiguration = mapped
    }

    /**
     * @param values Specifies the default server-side-encryption configuration.
     */
    @JvmName("gotdaabqvdmrtcri")
    public suspend fun serverSideEncryptionConfiguration(vararg values: BucketServerSideEncryptionRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.serverSideEncryptionConfiguration = mapped
    }

    internal fun build(): BucketEncryptionArgs = BucketEncryptionArgs(
        serverSideEncryptionConfiguration = serverSideEncryptionConfiguration ?: throw
            PulumiNullFieldException("serverSideEncryptionConfiguration"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy