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

com.pulumi.awsnative.shield.kotlin.ProtectionArgs.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.shield.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.shield.ProtectionArgs.builder
import com.pulumi.awsnative.shield.kotlin.inputs.ProtectionApplicationLayerAutomaticResponseConfigurationArgs
import com.pulumi.awsnative.shield.kotlin.inputs.ProtectionApplicationLayerAutomaticResponseConfigurationArgsBuilder
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

/**
 * Enables AWS Shield Advanced for a specific AWS resource. The resource can be an Amazon CloudFront distribution, Amazon Route 53 hosted zone, AWS Global Accelerator standard accelerator, Elastic IP Address, Application Load Balancer, or a Classic Load Balancer. You can protect Amazon EC2 instances and Network Load Balancers by association with protected Amazon EC2 Elastic IP addresses.
 * @property applicationLayerAutomaticResponseConfiguration The automatic application layer DDoS mitigation settings for the protection. This configuration determines whether Shield Advanced automatically manages rules in the web ACL in order to respond to application layer events that Shield Advanced determines to be DDoS attacks.
 * If you use AWS CloudFormation to manage the web ACLs that you use with Shield Advanced automatic mitigation, see the additional guidance about web ACL management in the `AWS::WAFv2::WebACL` resource description.
 * @property healthCheckArns The Amazon Resource Names (ARNs) of the health check to associate with the protection.
 * @property name Friendly name for the Protection.
 * @property resourceArn The ARN (Amazon Resource Name) of the resource to be protected.
 * @property tags One or more tag key-value pairs for the Protection object.
 */
public data class ProtectionArgs(
    public val applicationLayerAutomaticResponseConfiguration: Output? = null,
    public val healthCheckArns: Output>? = null,
    public val name: Output? = null,
    public val resourceArn: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.shield.ProtectionArgs =
        com.pulumi.awsnative.shield.ProtectionArgs.builder()
            .applicationLayerAutomaticResponseConfiguration(
                applicationLayerAutomaticResponseConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .healthCheckArns(healthCheckArns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceArn(resourceArn?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ProtectionArgs].
 */
@PulumiTagMarker
public class ProtectionArgsBuilder internal constructor() {
    private var applicationLayerAutomaticResponseConfiguration:
        Output? = null

    private var healthCheckArns: Output>? = null

    private var name: Output? = null

    private var resourceArn: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The automatic application layer DDoS mitigation settings for the protection. This configuration determines whether Shield Advanced automatically manages rules in the web ACL in order to respond to application layer events that Shield Advanced determines to be DDoS attacks.
     * If you use AWS CloudFormation to manage the web ACLs that you use with Shield Advanced automatic mitigation, see the additional guidance about web ACL management in the `AWS::WAFv2::WebACL` resource description.
     */
    @JvmName("rhtulgnxnwgsnlip")
    public suspend fun applicationLayerAutomaticResponseConfiguration(`value`: Output) {
        this.applicationLayerAutomaticResponseConfiguration = value
    }

    /**
     * @param value The Amazon Resource Names (ARNs) of the health check to associate with the protection.
     */
    @JvmName("edjiqsjyabraytkb")
    public suspend fun healthCheckArns(`value`: Output>) {
        this.healthCheckArns = value
    }

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

    /**
     * @param values The Amazon Resource Names (ARNs) of the health check to associate with the protection.
     */
    @JvmName("ksjqairutapwqmpd")
    public suspend fun healthCheckArns(values: List>) {
        this.healthCheckArns = Output.all(values)
    }

    /**
     * @param value Friendly name for the Protection.
     */
    @JvmName("ncbkbchkurpyqyae")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ARN (Amazon Resource Name) of the resource to be protected.
     */
    @JvmName("sbkflurgdejndgkk")
    public suspend fun resourceArn(`value`: Output) {
        this.resourceArn = value
    }

    /**
     * @param value One or more tag key-value pairs for the Protection object.
     */
    @JvmName("ndqebodjhhknwnyo")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values One or more tag key-value pairs for the Protection object.
     */
    @JvmName("chlxkduqqomirwyb")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The automatic application layer DDoS mitigation settings for the protection. This configuration determines whether Shield Advanced automatically manages rules in the web ACL in order to respond to application layer events that Shield Advanced determines to be DDoS attacks.
     * If you use AWS CloudFormation to manage the web ACLs that you use with Shield Advanced automatic mitigation, see the additional guidance about web ACL management in the `AWS::WAFv2::WebACL` resource description.
     */
    @JvmName("ngmwfgmlrbqywprw")
    public suspend fun applicationLayerAutomaticResponseConfiguration(`value`: ProtectionApplicationLayerAutomaticResponseConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.applicationLayerAutomaticResponseConfiguration = mapped
    }

    /**
     * @param argument The automatic application layer DDoS mitigation settings for the protection. This configuration determines whether Shield Advanced automatically manages rules in the web ACL in order to respond to application layer events that Shield Advanced determines to be DDoS attacks.
     * If you use AWS CloudFormation to manage the web ACLs that you use with Shield Advanced automatic mitigation, see the additional guidance about web ACL management in the `AWS::WAFv2::WebACL` resource description.
     */
    @JvmName("bpvjiswirgrnrohi")
    public suspend fun applicationLayerAutomaticResponseConfiguration(argument: suspend ProtectionApplicationLayerAutomaticResponseConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped =
            ProtectionApplicationLayerAutomaticResponseConfigurationArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.applicationLayerAutomaticResponseConfiguration = mapped
    }

    /**
     * @param value The Amazon Resource Names (ARNs) of the health check to associate with the protection.
     */
    @JvmName("aohgfghwdevbxqip")
    public suspend fun healthCheckArns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckArns = mapped
    }

    /**
     * @param values The Amazon Resource Names (ARNs) of the health check to associate with the protection.
     */
    @JvmName("hwuvoqwhongfwmwv")
    public suspend fun healthCheckArns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.healthCheckArns = mapped
    }

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

    /**
     * @param value The ARN (Amazon Resource Name) of the resource to be protected.
     */
    @JvmName("daysdanhpudfcmbh")
    public suspend fun resourceArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceArn = mapped
    }

    /**
     * @param value One or more tag key-value pairs for the Protection object.
     */
    @JvmName("jerspcmkoquufacx")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument One or more tag key-value pairs for the Protection object.
     */
    @JvmName("cxmqfuxogxtmuoma")
    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 One or more tag key-value pairs for the Protection object.
     */
    @JvmName("mfgchkqciuitbhtm")
    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 One or more tag key-value pairs for the Protection object.
     */
    @JvmName("wwstwqaiaukvigfu")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values One or more tag key-value pairs for the Protection object.
     */
    @JvmName("djfqvmliuaxpwetx")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ProtectionArgs = ProtectionArgs(
        applicationLayerAutomaticResponseConfiguration = applicationLayerAutomaticResponseConfiguration,
        healthCheckArns = healthCheckArns,
        name = name,
        resourceArn = resourceArn,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy