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

com.pulumi.aws.waf.kotlin.XssMatchSetArgs.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.XssMatchSetArgs.builder
import com.pulumi.aws.waf.kotlin.inputs.XssMatchSetXssMatchTupleArgs
import com.pulumi.aws.waf.kotlin.inputs.XssMatchSetXssMatchTupleArgsBuilder
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

/**
 * Provides a WAF XSS Match Set Resource
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const xssMatchSet = new aws.waf.XssMatchSet("xss_match_set", {
 *     name: "xss_match_set",
 *     xssMatchTuples: [
 *         {
 *             textTransformation: "NONE",
 *             fieldToMatch: {
 *                 type: "URI",
 *             },
 *         },
 *         {
 *             textTransformation: "NONE",
 *             fieldToMatch: {
 *                 type: "QUERY_STRING",
 *             },
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * xss_match_set = aws.waf.XssMatchSet("xss_match_set",
 *     name="xss_match_set",
 *     xss_match_tuples=[
 *         {
 *             "text_transformation": "NONE",
 *             "field_to_match": {
 *                 "type": "URI",
 *             },
 *         },
 *         {
 *             "text_transformation": "NONE",
 *             "field_to_match": {
 *                 "type": "QUERY_STRING",
 *             },
 *         },
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var xssMatchSet = new Aws.Waf.XssMatchSet("xss_match_set", new()
 *     {
 *         Name = "xss_match_set",
 *         XssMatchTuples = new[]
 *         {
 *             new Aws.Waf.Inputs.XssMatchSetXssMatchTupleArgs
 *             {
 *                 TextTransformation = "NONE",
 *                 FieldToMatch = new Aws.Waf.Inputs.XssMatchSetXssMatchTupleFieldToMatchArgs
 *                 {
 *                     Type = "URI",
 *                 },
 *             },
 *             new Aws.Waf.Inputs.XssMatchSetXssMatchTupleArgs
 *             {
 *                 TextTransformation = "NONE",
 *                 FieldToMatch = new Aws.Waf.Inputs.XssMatchSetXssMatchTupleFieldToMatchArgs
 *                 {
 *                     Type = "QUERY_STRING",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```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.NewXssMatchSet(ctx, "xss_match_set", &waf.XssMatchSetArgs{
 * 			Name: pulumi.String("xss_match_set"),
 * 			XssMatchTuples: waf.XssMatchSetXssMatchTupleArray{
 * 				&waf.XssMatchSetXssMatchTupleArgs{
 * 					TextTransformation: pulumi.String("NONE"),
 * 					FieldToMatch: &waf.XssMatchSetXssMatchTupleFieldToMatchArgs{
 * 						Type: pulumi.String("URI"),
 * 					},
 * 				},
 * 				&waf.XssMatchSetXssMatchTupleArgs{
 * 					TextTransformation: pulumi.String("NONE"),
 * 					FieldToMatch: &waf.XssMatchSetXssMatchTupleFieldToMatchArgs{
 * 						Type: pulumi.String("QUERY_STRING"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.XssMatchSet;
 * import com.pulumi.aws.waf.XssMatchSetArgs;
 * import com.pulumi.aws.waf.inputs.XssMatchSetXssMatchTupleArgs;
 * import com.pulumi.aws.waf.inputs.XssMatchSetXssMatchTupleFieldToMatchArgs;
 * 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 xssMatchSet = new XssMatchSet("xssMatchSet", XssMatchSetArgs.builder()
 *             .name("xss_match_set")
 *             .xssMatchTuples(
 *                 XssMatchSetXssMatchTupleArgs.builder()
 *                     .textTransformation("NONE")
 *                     .fieldToMatch(XssMatchSetXssMatchTupleFieldToMatchArgs.builder()
 *                         .type("URI")
 *                         .build())
 *                     .build(),
 *                 XssMatchSetXssMatchTupleArgs.builder()
 *                     .textTransformation("NONE")
 *                     .fieldToMatch(XssMatchSetXssMatchTupleFieldToMatchArgs.builder()
 *                         .type("QUERY_STRING")
 *                         .build())
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   xssMatchSet:
 *     type: aws:waf:XssMatchSet
 *     name: xss_match_set
 *     properties:
 *       name: xss_match_set
 *       xssMatchTuples:
 *         - textTransformation: NONE
 *           fieldToMatch:
 *             type: URI
 *         - textTransformation: NONE
 *           fieldToMatch:
 *             type: QUERY_STRING
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import WAF XSS Match Set using their ID. For example:
 * ```sh
 * $ pulumi import aws:waf/xssMatchSet:XssMatchSet example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
 * ```
 * @property name The name or description of the SizeConstraintSet.
 * @property xssMatchTuples The parts of web requests that you want to inspect for cross-site scripting attacks.
 */
public data class XssMatchSetArgs(
    public val name: Output? = null,
    public val xssMatchTuples: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.waf.XssMatchSetArgs =
        com.pulumi.aws.waf.XssMatchSetArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .xssMatchTuples(
                xssMatchTuples?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var xssMatchTuples: Output>? = null

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

    /**
     * @param value The parts of web requests that you want to inspect for cross-site scripting attacks.
     */
    @JvmName("mukkvueuqutvwldk")
    public suspend fun xssMatchTuples(`value`: Output>) {
        this.xssMatchTuples = value
    }

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

    /**
     * @param values The parts of web requests that you want to inspect for cross-site scripting attacks.
     */
    @JvmName("jmoiywcfuyikjmxv")
    public suspend fun xssMatchTuples(values: List>) {
        this.xssMatchTuples = Output.all(values)
    }

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

    /**
     * @param value The parts of web requests that you want to inspect for cross-site scripting attacks.
     */
    @JvmName("fstxsxekdkqmcgvp")
    public suspend fun xssMatchTuples(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.xssMatchTuples = mapped
    }

    /**
     * @param argument The parts of web requests that you want to inspect for cross-site scripting attacks.
     */
    @JvmName("vyvopllqxvmiljxy")
    public suspend fun xssMatchTuples(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            XssMatchSetXssMatchTupleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.xssMatchTuples = mapped
    }

    /**
     * @param argument The parts of web requests that you want to inspect for cross-site scripting attacks.
     */
    @JvmName("iudyymdwrbhfyhcg")
    public suspend fun xssMatchTuples(vararg argument: suspend XssMatchSetXssMatchTupleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            XssMatchSetXssMatchTupleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.xssMatchTuples = mapped
    }

    /**
     * @param argument The parts of web requests that you want to inspect for cross-site scripting attacks.
     */
    @JvmName("xpiargcwnkghkvhg")
    public suspend fun xssMatchTuples(argument: suspend XssMatchSetXssMatchTupleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            XssMatchSetXssMatchTupleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.xssMatchTuples = mapped
    }

    /**
     * @param values The parts of web requests that you want to inspect for cross-site scripting attacks.
     */
    @JvmName("ufkdscfpyxaseeoy")
    public suspend fun xssMatchTuples(vararg values: XssMatchSetXssMatchTupleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.xssMatchTuples = mapped
    }

    internal fun build(): XssMatchSetArgs = XssMatchSetArgs(
        name = name,
        xssMatchTuples = xssMatchTuples,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy