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

com.pulumi.aws.waf.kotlin.RegexPatternSetArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.waf.kotlin

import com.pulumi.aws.waf.RegexPatternSetArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a WAF Regex Pattern Set Resource
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.waf.RegexPatternSet("example", {
 *     name: "my_waf_regex_pattern_set",
 *     regexPatternStrings: [
 *         "one",
 *         "two",
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.waf.RegexPatternSet("example",
 *     name="my_waf_regex_pattern_set",
 *     regex_pattern_strings=[
 *         "one",
 *         "two",
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Waf.RegexPatternSet("example", new()
 *     {
 *         Name = "my_waf_regex_pattern_set",
 *         RegexPatternStrings = new[]
 *         {
 *             "one",
 *             "two",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/waf"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := waf.NewRegexPatternSet(ctx, "example", &waf.RegexPatternSetArgs{
 * 			Name: pulumi.String("my_waf_regex_pattern_set"),
 * 			RegexPatternStrings: pulumi.StringArray{
 * 				pulumi.String("one"),
 * 				pulumi.String("two"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.waf.RegexPatternSet;
 * import com.pulumi.aws.waf.RegexPatternSetArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new RegexPatternSet("example", RegexPatternSetArgs.builder()
 *             .name("my_waf_regex_pattern_set")
 *             .regexPatternStrings(
 *                 "one",
 *                 "two")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:waf:RegexPatternSet
 *     properties:
 *       name: my_waf_regex_pattern_set
 *       regexPatternStrings:
 *         - one
 *         - two
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import AWS WAF Regex Pattern Set using their ID. For example:
 * ```sh
 * $ pulumi import aws:waf/regexPatternSet:RegexPatternSet example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
 * ```
 * @property name The name or description of the Regex Pattern Set.
 * @property regexPatternStrings A list of regular expression (regex) patterns that you want AWS WAF to search for, such as `B[a@]dB[o0]t`.
 */
public data class RegexPatternSetArgs(
    public val name: Output? = null,
    public val regexPatternStrings: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.waf.RegexPatternSetArgs =
        com.pulumi.aws.waf.RegexPatternSetArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .regexPatternStrings(
                regexPatternStrings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            ).build()
}

/**
 * Builder for [RegexPatternSetArgs].
 */
@PulumiTagMarker
public class RegexPatternSetArgsBuilder internal constructor() {
    private var name: Output? = null

    private var regexPatternStrings: Output>? = null

    /**
     * @param value The name or description of the Regex Pattern Set.
     */
    @JvmName("lyqkeexjcbdfkgxn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A list of regular expression (regex) patterns that you want AWS WAF to search for, such as `B[a@]dB[o0]t`.
     */
    @JvmName("uiruptwvxpldukri")
    public suspend fun regexPatternStrings(`value`: Output>) {
        this.regexPatternStrings = value
    }

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

    /**
     * @param values A list of regular expression (regex) patterns that you want AWS WAF to search for, such as `B[a@]dB[o0]t`.
     */
    @JvmName("tknvixheiuswoglc")
    public suspend fun regexPatternStrings(values: List>) {
        this.regexPatternStrings = Output.all(values)
    }

    /**
     * @param value The name or description of the Regex Pattern Set.
     */
    @JvmName("enmsiqfwckgbccum")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A list of regular expression (regex) patterns that you want AWS WAF to search for, such as `B[a@]dB[o0]t`.
     */
    @JvmName("iyamhpabvyhqowhl")
    public suspend fun regexPatternStrings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regexPatternStrings = mapped
    }

    /**
     * @param values A list of regular expression (regex) patterns that you want AWS WAF to search for, such as `B[a@]dB[o0]t`.
     */
    @JvmName("vctceatoykqcbmod")
    public suspend fun regexPatternStrings(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.regexPatternStrings = mapped
    }

    internal fun build(): RegexPatternSetArgs = RegexPatternSetArgs(
        name = name,
        regexPatternStrings = regexPatternStrings,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy