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

com.pulumi.awsnative.s3.kotlin.inputs.BucketOwnershipControlsArgs.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.s3.kotlin.inputs

import com.pulumi.awsnative.s3.inputs.BucketOwnershipControlsArgs.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 the container element for Object Ownership rules.
 *  S3 Object Ownership is an Amazon S3 bucket-level setting that you can use to disable access control lists (ACLs) and take ownership of every object in your bucket, simplifying access management for data stored in Amazon S3. For more information, see [Controlling ownership of objects and disabling ACLs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html) in the *Amazon S3 User Guide*.
 * @property rules Specifies the container element for Object Ownership rules.
 */
public data class BucketOwnershipControlsArgs(
    public val rules: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.s3.inputs.BucketOwnershipControlsArgs =
        com.pulumi.awsnative.s3.inputs.BucketOwnershipControlsArgs.builder()
            .rules(
                rules.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    /**
     * @param value Specifies the container element for Object Ownership rules.
     */
    @JvmName("xdumfbhcjslfulaa")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values Specifies the container element for Object Ownership rules.
     */
    @JvmName("bedbicgtocjpmtba")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value Specifies the container element for Object Ownership rules.
     */
    @JvmName("kmmaxlndcpcsjpxf")
    public suspend fun rules(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument Specifies the container element for Object Ownership rules.
     */
    @JvmName("vdutljegdpsywkfj")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketOwnershipControlsRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Specifies the container element for Object Ownership rules.
     */
    @JvmName("ehudbwtlptnmpdhc")
    public suspend fun rules(vararg argument: suspend BucketOwnershipControlsRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketOwnershipControlsRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Specifies the container element for Object Ownership rules.
     */
    @JvmName("ndwmkrjfnusmjpkq")
    public suspend fun rules(argument: suspend BucketOwnershipControlsRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            BucketOwnershipControlsRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values Specifies the container element for Object Ownership rules.
     */
    @JvmName("vdxuygbxnfebpmab")
    public suspend fun rules(vararg values: BucketOwnershipControlsRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    internal fun build(): BucketOwnershipControlsArgs = BucketOwnershipControlsArgs(
        rules = rules ?: throw PulumiNullFieldException("rules"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy