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

com.pulumi.awsnative.wafv2.kotlin.IpSetArgs.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.wafv2.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.wafv2.IpSetArgs.builder
import com.pulumi.awsnative.wafv2.kotlin.enums.IpSetIpAddressVersion
import com.pulumi.awsnative.wafv2.kotlin.enums.IpSetScope
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

/**
 * Contains a list of IP addresses. This can be either IPV4 or IPV6. The list will be mutually
 * @property addresses List of IPAddresses.
 * @property description A description of the IP set that helps with identification.
 * @property ipAddressVersion The version of the IP addresses, either `IPV4` or `IPV6` .
 * @property name The name of the IP set. You cannot change the name of an `IPSet` after you create it.
 * @property scope Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` .
 * > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .
 * @property tags Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
 * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
 */
public data class IpSetArgs(
    public val addresses: Output>? = null,
    public val description: Output? = null,
    public val ipAddressVersion: Output? = null,
    public val name: Output? = null,
    public val scope: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.wafv2.IpSetArgs =
        com.pulumi.awsnative.wafv2.IpSetArgs.builder()
            .addresses(addresses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .ipAddressVersion(ipAddressVersion?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .scope(scope?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var description: Output? = null

    private var ipAddressVersion: Output? = null

    private var name: Output? = null

    private var scope: Output? = null

    private var tags: Output>? = null

    /**
     * @param value List of IPAddresses.
     */
    @JvmName("jywpesfdxiphurpb")
    public suspend fun addresses(`value`: Output>) {
        this.addresses = value
    }

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

    /**
     * @param values List of IPAddresses.
     */
    @JvmName("vktedvsyehsosqsi")
    public suspend fun addresses(values: List>) {
        this.addresses = Output.all(values)
    }

    /**
     * @param value A description of the IP set that helps with identification.
     */
    @JvmName("taqnetttbscwxkjy")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The version of the IP addresses, either `IPV4` or `IPV6` .
     */
    @JvmName("erhofpwcpjfnnbap")
    public suspend fun ipAddressVersion(`value`: Output) {
        this.ipAddressVersion = value
    }

    /**
     * @param value The name of the IP set. You cannot change the name of an `IPSet` after you create it.
     */
    @JvmName("aknftwbxcgybpdsw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` .
     * > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .
     */
    @JvmName("mimhgtgkqhayrikw")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("iebbcbusslcirrqq")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("nvsdqesmluniqfrd")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value List of IPAddresses.
     */
    @JvmName("jjmydkjjvfaltfnp")
    public suspend fun addresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.addresses = mapped
    }

    /**
     * @param values List of IPAddresses.
     */
    @JvmName("gqasaupttqpqoqtc")
    public suspend fun addresses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.addresses = mapped
    }

    /**
     * @param value A description of the IP set that helps with identification.
     */
    @JvmName("csisknyfunbikxjl")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The version of the IP addresses, either `IPV4` or `IPV6` .
     */
    @JvmName("wdacqibullgyaabo")
    public suspend fun ipAddressVersion(`value`: IpSetIpAddressVersion?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipAddressVersion = mapped
    }

    /**
     * @param value The name of the IP set. You cannot change the name of an `IPSet` after you create it.
     */
    @JvmName("rhvbqaipvnlevedr")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` .
     * > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .
     */
    @JvmName("achmdcrmbeofdcbv")
    public suspend fun scope(`value`: IpSetScope?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param value Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("vkiaiagxjxfbuiud")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("yabvuopkcqhpcjig")
    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 Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("aljovrnvptgnfiqx")
    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 Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("qswiuafxgurxnwqm")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
     * > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
     */
    @JvmName("jxbijtnvcikvbcsn")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): IpSetArgs = IpSetArgs(
        addresses = addresses,
        description = description,
        ipAddressVersion = ipAddressVersion,
        name = name,
        scope = scope,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy