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

com.pulumi.awsnative.s3.kotlin.inputs.BucketWebsiteConfigurationArgs.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.awsnative.s3.inputs.BucketWebsiteConfigurationArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Specifies website configuration parameters for an Amazon S3 bucket.
 * @property errorDocument The name of the error document for the website.
 * @property indexDocument The name of the index document for the website.
 * @property redirectAllRequestsTo The redirect behavior for every request to this bucket's website endpoint.
 *   If you specify this property, you can't specify any other property.
 * @property routingRules Rules that define when a redirect is applied and the redirect behavior.
 */
public data class BucketWebsiteConfigurationArgs(
    public val errorDocument: Output? = null,
    public val indexDocument: Output? = null,
    public val redirectAllRequestsTo: Output? = null,
    public val routingRules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.s3.inputs.BucketWebsiteConfigurationArgs =
        com.pulumi.awsnative.s3.inputs.BucketWebsiteConfigurationArgs.builder()
            .errorDocument(errorDocument?.applyValue({ args0 -> args0 }))
            .indexDocument(indexDocument?.applyValue({ args0 -> args0 }))
            .redirectAllRequestsTo(
                redirectAllRequestsTo?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .routingRules(
                routingRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [BucketWebsiteConfigurationArgs].
 */
@PulumiTagMarker
public class BucketWebsiteConfigurationArgsBuilder internal constructor() {
    private var errorDocument: Output? = null

    private var indexDocument: Output? = null

    private var redirectAllRequestsTo: Output? = null

    private var routingRules: Output>? = null

    /**
     * @param value The name of the error document for the website.
     */
    @JvmName("laseppdvpqvoryxv")
    public suspend fun errorDocument(`value`: Output) {
        this.errorDocument = value
    }

    /**
     * @param value The name of the index document for the website.
     */
    @JvmName("myunmeosdbbmigvl")
    public suspend fun indexDocument(`value`: Output) {
        this.indexDocument = value
    }

    /**
     * @param value The redirect behavior for every request to this bucket's website endpoint.
     *   If you specify this property, you can't specify any other property.
     */
    @JvmName("bxnrvbmuqcpwdepm")
    public suspend fun redirectAllRequestsTo(`value`: Output) {
        this.redirectAllRequestsTo = value
    }

    /**
     * @param value Rules that define when a redirect is applied and the redirect behavior.
     */
    @JvmName("sufyrnwcaeihnyxk")
    public suspend fun routingRules(`value`: Output>) {
        this.routingRules = value
    }

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

    /**
     * @param values Rules that define when a redirect is applied and the redirect behavior.
     */
    @JvmName("smiqkbshqushhryi")
    public suspend fun routingRules(values: List>) {
        this.routingRules = Output.all(values)
    }

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

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

    /**
     * @param value The redirect behavior for every request to this bucket's website endpoint.
     *   If you specify this property, you can't specify any other property.
     */
    @JvmName("nxanstonqbohwtpv")
    public suspend fun redirectAllRequestsTo(`value`: BucketRedirectAllRequestsToArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.redirectAllRequestsTo = mapped
    }

    /**
     * @param argument The redirect behavior for every request to this bucket's website endpoint.
     *   If you specify this property, you can't specify any other property.
     */
    @JvmName("rnuspahgqdfljvyk")
    public suspend fun redirectAllRequestsTo(argument: suspend BucketRedirectAllRequestsToArgsBuilder.() -> Unit) {
        val toBeMapped = BucketRedirectAllRequestsToArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.redirectAllRequestsTo = mapped
    }

    /**
     * @param value Rules that define when a redirect is applied and the redirect behavior.
     */
    @JvmName("axndlehaljxdyghr")
    public suspend fun routingRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routingRules = mapped
    }

    /**
     * @param argument Rules that define when a redirect is applied and the redirect behavior.
     */
    @JvmName("hypxobgnplebkjjy")
    public suspend fun routingRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketRoutingRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routingRules = mapped
    }

    /**
     * @param argument Rules that define when a redirect is applied and the redirect behavior.
     */
    @JvmName("omkydficdglfprxv")
    public suspend fun routingRules(vararg argument: suspend BucketRoutingRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketRoutingRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routingRules = mapped
    }

    /**
     * @param argument Rules that define when a redirect is applied and the redirect behavior.
     */
    @JvmName("ewyeiitgvnpbqprq")
    public suspend fun routingRules(argument: suspend BucketRoutingRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BucketRoutingRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.routingRules = mapped
    }

    /**
     * @param values Rules that define when a redirect is applied and the redirect behavior.
     */
    @JvmName("ngdscseeylmodkvm")
    public suspend fun routingRules(vararg values: BucketRoutingRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routingRules = mapped
    }

    internal fun build(): BucketWebsiteConfigurationArgs = BucketWebsiteConfigurationArgs(
        errorDocument = errorDocument,
        indexDocument = indexDocument,
        redirectAllRequestsTo = redirectAllRequestsTo,
        routingRules = routingRules,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy