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

com.pulumi.awsnative.lightsail.kotlin.BucketArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.lightsail.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.lightsail.BucketArgs.builder
import com.pulumi.awsnative.lightsail.kotlin.inputs.BucketAccessRulesArgs
import com.pulumi.awsnative.lightsail.kotlin.inputs.BucketAccessRulesArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::Lightsail::Bucket
 * @property accessRules An object that describes the access rules for the bucket.
 * @property bucketName The name for the bucket.
 * @property bundleId The ID of the bundle to use for the bucket.
 * @property objectVersioning Specifies whether to enable or disable versioning of objects in the bucket.
 * @property readOnlyAccessAccounts An array of strings to specify the AWS account IDs that can access the bucket.
 * @property resourcesReceivingAccess The names of the Lightsail resources for which to set bucket access.
 * @property tags An array of key-value pairs to apply to this resource.
 */
public data class BucketArgs(
    public val accessRules: Output? = null,
    public val bucketName: Output? = null,
    public val bundleId: Output? = null,
    public val objectVersioning: Output? = null,
    public val readOnlyAccessAccounts: Output>? = null,
    public val resourcesReceivingAccess: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lightsail.BucketArgs =
        com.pulumi.awsnative.lightsail.BucketArgs.builder()
            .accessRules(accessRules?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .bucketName(bucketName?.applyValue({ args0 -> args0 }))
            .bundleId(bundleId?.applyValue({ args0 -> args0 }))
            .objectVersioning(objectVersioning?.applyValue({ args0 -> args0 }))
            .readOnlyAccessAccounts(
                readOnlyAccessAccounts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .resourcesReceivingAccess(
                resourcesReceivingAccess?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [BucketArgs].
 */
@PulumiTagMarker
public class BucketArgsBuilder internal constructor() {
    private var accessRules: Output? = null

    private var bucketName: Output? = null

    private var bundleId: Output? = null

    private var objectVersioning: Output? = null

    private var readOnlyAccessAccounts: Output>? = null

    private var resourcesReceivingAccess: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value An object that describes the access rules for the bucket.
     */
    @JvmName("jqhslanhvgffifgn")
    public suspend fun accessRules(`value`: Output) {
        this.accessRules = value
    }

    /**
     * @param value The name for the bucket.
     */
    @JvmName("xhqrmgvjevycmvep")
    public suspend fun bucketName(`value`: Output) {
        this.bucketName = value
    }

    /**
     * @param value The ID of the bundle to use for the bucket.
     */
    @JvmName("uumsinjbqbnumstq")
    public suspend fun bundleId(`value`: Output) {
        this.bundleId = value
    }

    /**
     * @param value Specifies whether to enable or disable versioning of objects in the bucket.
     */
    @JvmName("syvuouxgrapbwfnk")
    public suspend fun objectVersioning(`value`: Output) {
        this.objectVersioning = value
    }

    /**
     * @param value An array of strings to specify the AWS account IDs that can access the bucket.
     */
    @JvmName("havrijjpywiecrcd")
    public suspend fun readOnlyAccessAccounts(`value`: Output>) {
        this.readOnlyAccessAccounts = value
    }

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

    /**
     * @param values An array of strings to specify the AWS account IDs that can access the bucket.
     */
    @JvmName("qmageyydhjathqwk")
    public suspend fun readOnlyAccessAccounts(values: List>) {
        this.readOnlyAccessAccounts = Output.all(values)
    }

    /**
     * @param value The names of the Lightsail resources for which to set bucket access.
     */
    @JvmName("vdxqvevymdjuawkn")
    public suspend fun resourcesReceivingAccess(`value`: Output>) {
        this.resourcesReceivingAccess = value
    }

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

    /**
     * @param values The names of the Lightsail resources for which to set bucket access.
     */
    @JvmName("sapugoygmefegxmq")
    public suspend fun resourcesReceivingAccess(values: List>) {
        this.resourcesReceivingAccess = Output.all(values)
    }

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

    @JvmName("xpqehwangxnpknsl")
    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 resource.
     */
    @JvmName("uudlefvsmllvpeei")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value An object that describes the access rules for the bucket.
     */
    @JvmName("xeddkvdovarhygte")
    public suspend fun accessRules(`value`: BucketAccessRulesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessRules = mapped
    }

    /**
     * @param argument An object that describes the access rules for the bucket.
     */
    @JvmName("qdtejxmbfijikmyu")
    public suspend fun accessRules(argument: suspend BucketAccessRulesArgsBuilder.() -> Unit) {
        val toBeMapped = BucketAccessRulesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.accessRules = mapped
    }

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

    /**
     * @param value The ID of the bundle to use for the bucket.
     */
    @JvmName("ptuipqoerufjbftb")
    public suspend fun bundleId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bundleId = mapped
    }

    /**
     * @param value Specifies whether to enable or disable versioning of objects in the bucket.
     */
    @JvmName("fabhtujrnsrcxbkn")
    public suspend fun objectVersioning(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.objectVersioning = mapped
    }

    /**
     * @param value An array of strings to specify the AWS account IDs that can access the bucket.
     */
    @JvmName("shvslhjxgrxfykub")
    public suspend fun readOnlyAccessAccounts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.readOnlyAccessAccounts = mapped
    }

    /**
     * @param values An array of strings to specify the AWS account IDs that can access the bucket.
     */
    @JvmName("gvpqjiporeqlgrjf")
    public suspend fun readOnlyAccessAccounts(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.readOnlyAccessAccounts = mapped
    }

    /**
     * @param value The names of the Lightsail resources for which to set bucket access.
     */
    @JvmName("hiybnhrsrgxnlqoy")
    public suspend fun resourcesReceivingAccess(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourcesReceivingAccess = mapped
    }

    /**
     * @param values The names of the Lightsail resources for which to set bucket access.
     */
    @JvmName("idqvhyebtmfdscit")
    public suspend fun resourcesReceivingAccess(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourcesReceivingAccess = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("jybneuilhphwbuvq")
    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 resource.
     */
    @JvmName("mmmxieifdfdskfgv")
    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 resource.
     */
    @JvmName("ytyypklmbmgsntvg")
    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 resource.
     */
    @JvmName("uastcpshaynydept")
    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 resource.
     */
    @JvmName("brejgvbuerdbyxpn")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): BucketArgs = BucketArgs(
        accessRules = accessRules,
        bucketName = bucketName,
        bundleId = bundleId,
        objectVersioning = objectVersioning,
        readOnlyAccessAccounts = readOnlyAccessAccounts,
        resourcesReceivingAccess = resourcesReceivingAccess,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy