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

com.pulumi.awsnative.shield.kotlin.ProtectionGroupArgs.kt Maven / Gradle / Ivy

@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.ProtectionGroupArgs.builder
import com.pulumi.awsnative.shield.kotlin.enums.ProtectionGroupAggregation
import com.pulumi.awsnative.shield.kotlin.enums.ProtectionGroupPattern
import com.pulumi.awsnative.shield.kotlin.enums.ProtectionGroupResourceType
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

/**
 * A grouping of protected resources so they can be handled as a collective. This resource grouping improves the accuracy of detection and reduces false positives.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * @property aggregation Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
 * * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.
 * * Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.
 * * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront and origin resources for CloudFront distributions.
 * @property members The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set `Pattern` to `ARBITRARY` and you must not set it for any other `Pattern` setting.
 * @property pattern The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.
 * @property protectionGroupId The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
 * @property resourceType The resource type to include in the protection group. All protected resources of this type are included in the protection group. Newly protected resources of this type are automatically added to the group. You must set this when you set `Pattern` to `BY_RESOURCE_TYPE` and you must not set it for any other `Pattern` setting.
 * @property tags One or more tag key-value pairs for the Protection object.
 */
public data class ProtectionGroupArgs(
    public val aggregation: Output? = null,
    public val members: Output>? = null,
    public val pattern: Output? = null,
    public val protectionGroupId: Output? = null,
    public val resourceType: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.shield.ProtectionGroupArgs =
        com.pulumi.awsnative.shield.ProtectionGroupArgs.builder()
            .aggregation(aggregation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .members(members?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .pattern(pattern?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .protectionGroupId(protectionGroupId?.applyValue({ args0 -> args0 }))
            .resourceType(resourceType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ProtectionGroupArgs].
 */
@PulumiTagMarker
public class ProtectionGroupArgsBuilder internal constructor() {
    private var aggregation: Output? = null

    private var members: Output>? = null

    private var pattern: Output? = null

    private var protectionGroupId: Output? = null

    private var resourceType: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
     * * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.
     * * Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.
     * * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront and origin resources for CloudFront distributions.
     */
    @JvmName("wicsquxdbfkmaqmo")
    public suspend fun aggregation(`value`: Output) {
        this.aggregation = value
    }

    /**
     * @param value The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set `Pattern` to `ARBITRARY` and you must not set it for any other `Pattern` setting.
     */
    @JvmName("mjgllfrmpvocuyuc")
    public suspend fun members(`value`: Output>) {
        this.members = value
    }

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

    /**
     * @param values The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set `Pattern` to `ARBITRARY` and you must not set it for any other `Pattern` setting.
     */
    @JvmName("bcwgvqibpttwbmgc")
    public suspend fun members(values: List>) {
        this.members = Output.all(values)
    }

    /**
     * @param value The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.
     */
    @JvmName("xjtfsyynjdafhcgm")
    public suspend fun pattern(`value`: Output) {
        this.pattern = value
    }

    /**
     * @param value The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
     */
    @JvmName("wyiqmwtvahhnoyle")
    public suspend fun protectionGroupId(`value`: Output) {
        this.protectionGroupId = value
    }

    /**
     * @param value The resource type to include in the protection group. All protected resources of this type are included in the protection group. Newly protected resources of this type are automatically added to the group. You must set this when you set `Pattern` to `BY_RESOURCE_TYPE` and you must not set it for any other `Pattern` setting.
     */
    @JvmName("lsotxpxqbtdttutu")
    public suspend fun resourceType(`value`: Output) {
        this.resourceType = value
    }

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

    @JvmName("kiwrujrheqiltisd")
    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("ciuknoashumkaqel")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
     * * Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.
     * * Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.
     * * Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront and origin resources for CloudFront distributions.
     */
    @JvmName("ecapxwliirtrpnci")
    public suspend fun aggregation(`value`: ProtectionGroupAggregation?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aggregation = mapped
    }

    /**
     * @param value The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set `Pattern` to `ARBITRARY` and you must not set it for any other `Pattern` setting.
     */
    @JvmName("piiuaekrfscuywvs")
    public suspend fun members(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.members = mapped
    }

    /**
     * @param values The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set `Pattern` to `ARBITRARY` and you must not set it for any other `Pattern` setting.
     */
    @JvmName("tenisepdsrtpyfja")
    public suspend fun members(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.members = mapped
    }

    /**
     * @param value The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.
     */
    @JvmName("sntuqvrlvfqfxvam")
    public suspend fun pattern(`value`: ProtectionGroupPattern?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pattern = mapped
    }

    /**
     * @param value The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
     */
    @JvmName("cdnsjilohyuolcka")
    public suspend fun protectionGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protectionGroupId = mapped
    }

    /**
     * @param value The resource type to include in the protection group. All protected resources of this type are included in the protection group. Newly protected resources of this type are automatically added to the group. You must set this when you set `Pattern` to `BY_RESOURCE_TYPE` and you must not set it for any other `Pattern` setting.
     */
    @JvmName("kssebamrpixayxur")
    public suspend fun resourceType(`value`: ProtectionGroupResourceType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceType = mapped
    }

    /**
     * @param value One or more tag key-value pairs for the Protection object.
     */
    @JvmName("wkayfvvxwkkptkrh")
    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("uukkwgvngagcdueg")
    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("wgwtsmhsydpycpyq")
    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("yhmxyuwxceqshhao")
    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("kjwmduambkatwenc")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ProtectionGroupArgs = ProtectionGroupArgs(
        aggregation = aggregation,
        members = members,
        pattern = pattern,
        protectionGroupId = protectionGroupId,
        resourceType = resourceType,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy