1. Packages
  2. AWS Classic
  3. API Docs
  4. wafregional
  5. XssMatchSet

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.wafregional.XssMatchSet

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Provides a WAF Regional XSS Match Set Resource for use with Application Load Balancer.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const xssMatchSet = new aws.wafregional.XssMatchSet("xss_match_set", {
        name: "xss_match_set",
        xssMatchTuples: [
            {
                textTransformation: "NONE",
                fieldToMatch: {
                    type: "URI",
                },
            },
            {
                textTransformation: "NONE",
                fieldToMatch: {
                    type: "QUERY_STRING",
                },
            },
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    xss_match_set = aws.wafregional.XssMatchSet("xss_match_set",
        name="xss_match_set",
        xss_match_tuples=[
            aws.wafregional.XssMatchSetXssMatchTupleArgs(
                text_transformation="NONE",
                field_to_match=aws.wafregional.XssMatchSetXssMatchTupleFieldToMatchArgs(
                    type="URI",
                ),
            ),
            aws.wafregional.XssMatchSetXssMatchTupleArgs(
                text_transformation="NONE",
                field_to_match=aws.wafregional.XssMatchSetXssMatchTupleFieldToMatchArgs(
                    type="QUERY_STRING",
                ),
            ),
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/wafregional"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := wafregional.NewXssMatchSet(ctx, "xss_match_set", &wafregional.XssMatchSetArgs{
    			Name: pulumi.String("xss_match_set"),
    			XssMatchTuples: wafregional.XssMatchSetXssMatchTupleArray{
    				&wafregional.XssMatchSetXssMatchTupleArgs{
    					TextTransformation: pulumi.String("NONE"),
    					FieldToMatch: &wafregional.XssMatchSetXssMatchTupleFieldToMatchArgs{
    						Type: pulumi.String("URI"),
    					},
    				},
    				&wafregional.XssMatchSetXssMatchTupleArgs{
    					TextTransformation: pulumi.String("NONE"),
    					FieldToMatch: &wafregional.XssMatchSetXssMatchTupleFieldToMatchArgs{
    						Type: pulumi.String("QUERY_STRING"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var xssMatchSet = new Aws.WafRegional.XssMatchSet("xss_match_set", new()
        {
            Name = "xss_match_set",
            XssMatchTuples = new[]
            {
                new Aws.WafRegional.Inputs.XssMatchSetXssMatchTupleArgs
                {
                    TextTransformation = "NONE",
                    FieldToMatch = new Aws.WafRegional.Inputs.XssMatchSetXssMatchTupleFieldToMatchArgs
                    {
                        Type = "URI",
                    },
                },
                new Aws.WafRegional.Inputs.XssMatchSetXssMatchTupleArgs
                {
                    TextTransformation = "NONE",
                    FieldToMatch = new Aws.WafRegional.Inputs.XssMatchSetXssMatchTupleFieldToMatchArgs
                    {
                        Type = "QUERY_STRING",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.wafregional.XssMatchSet;
    import com.pulumi.aws.wafregional.XssMatchSetArgs;
    import com.pulumi.aws.wafregional.inputs.XssMatchSetXssMatchTupleArgs;
    import com.pulumi.aws.wafregional.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());
    
        }
    }
    
    resources:
      xssMatchSet:
        type: aws:wafregional:XssMatchSet
        name: xss_match_set
        properties:
          name: xss_match_set
          xssMatchTuples:
            - textTransformation: NONE
              fieldToMatch:
                type: URI
            - textTransformation: NONE
              fieldToMatch:
                type: QUERY_STRING
    

    Create XssMatchSet Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new XssMatchSet(name: string, args?: XssMatchSetArgs, opts?: CustomResourceOptions);
    @overload
    def XssMatchSet(resource_name: str,
                    args: Optional[XssMatchSetArgs] = None,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def XssMatchSet(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    name: Optional[str] = None,
                    xss_match_tuples: Optional[Sequence[XssMatchSetXssMatchTupleArgs]] = None)
    func NewXssMatchSet(ctx *Context, name string, args *XssMatchSetArgs, opts ...ResourceOption) (*XssMatchSet, error)
    public XssMatchSet(string name, XssMatchSetArgs? args = null, CustomResourceOptions? opts = null)
    public XssMatchSet(String name, XssMatchSetArgs args)
    public XssMatchSet(String name, XssMatchSetArgs args, CustomResourceOptions options)
    
    type: aws:wafregional:XssMatchSet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args XssMatchSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args XssMatchSetArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args XssMatchSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args XssMatchSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args XssMatchSetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var awsXssMatchSetResource = new Aws.WafRegional.XssMatchSet("awsXssMatchSetResource", new()
    {
        Name = "string",
        XssMatchTuples = new[]
        {
            new Aws.WafRegional.Inputs.XssMatchSetXssMatchTupleArgs
            {
                FieldToMatch = new Aws.WafRegional.Inputs.XssMatchSetXssMatchTupleFieldToMatchArgs
                {
                    Type = "string",
                    Data = "string",
                },
                TextTransformation = "string",
            },
        },
    });
    
    example, err := wafregional.NewXssMatchSet(ctx, "awsXssMatchSetResource", &wafregional.XssMatchSetArgs{
    	Name: pulumi.String("string"),
    	XssMatchTuples: wafregional.XssMatchSetXssMatchTupleArray{
    		&wafregional.XssMatchSetXssMatchTupleArgs{
    			FieldToMatch: &wafregional.XssMatchSetXssMatchTupleFieldToMatchArgs{
    				Type: pulumi.String("string"),
    				Data: pulumi.String("string"),
    			},
    			TextTransformation: pulumi.String("string"),
    		},
    	},
    })
    
    var awsXssMatchSetResource = new XssMatchSet("awsXssMatchSetResource", XssMatchSetArgs.builder()        
        .name("string")
        .xssMatchTuples(XssMatchSetXssMatchTupleArgs.builder()
            .fieldToMatch(XssMatchSetXssMatchTupleFieldToMatchArgs.builder()
                .type("string")
                .data("string")
                .build())
            .textTransformation("string")
            .build())
        .build());
    
    aws_xss_match_set_resource = aws.wafregional.XssMatchSet("awsXssMatchSetResource",
        name="string",
        xss_match_tuples=[aws.wafregional.XssMatchSetXssMatchTupleArgs(
            field_to_match=aws.wafregional.XssMatchSetXssMatchTupleFieldToMatchArgs(
                type="string",
                data="string",
            ),
            text_transformation="string",
        )])
    
    const awsXssMatchSetResource = new aws.wafregional.XssMatchSet("awsXssMatchSetResource", {
        name: "string",
        xssMatchTuples: [{
            fieldToMatch: {
                type: "string",
                data: "string",
            },
            textTransformation: "string",
        }],
    });
    
    type: aws:wafregional:XssMatchSet
    properties:
        name: string
        xssMatchTuples:
            - fieldToMatch:
                data: string
                type: string
              textTransformation: string
    

    XssMatchSet Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The XssMatchSet resource accepts the following input properties:

    Name string
    The name of the set
    XssMatchTuples List<XssMatchSetXssMatchTuple>
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    Name string
    The name of the set
    XssMatchTuples []XssMatchSetXssMatchTupleArgs
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    name String
    The name of the set
    xssMatchTuples List<XssMatchSetXssMatchTuple>
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    name string
    The name of the set
    xssMatchTuples XssMatchSetXssMatchTuple[]
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    name str
    The name of the set
    xss_match_tuples Sequence[XssMatchSetXssMatchTupleArgs]
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    name String
    The name of the set
    xssMatchTuples List<Property Map>
    The parts of web requests that you want to inspect for cross-site scripting attacks.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the XssMatchSet resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing XssMatchSet Resource

    Get an existing XssMatchSet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: XssMatchSetState, opts?: CustomResourceOptions): XssMatchSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            xss_match_tuples: Optional[Sequence[XssMatchSetXssMatchTupleArgs]] = None) -> XssMatchSet
    func GetXssMatchSet(ctx *Context, name string, id IDInput, state *XssMatchSetState, opts ...ResourceOption) (*XssMatchSet, error)
    public static XssMatchSet Get(string name, Input<string> id, XssMatchSetState? state, CustomResourceOptions? opts = null)
    public static XssMatchSet get(String name, Output<String> id, XssMatchSetState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Name string
    The name of the set
    XssMatchTuples List<XssMatchSetXssMatchTuple>
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    Name string
    The name of the set
    XssMatchTuples []XssMatchSetXssMatchTupleArgs
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    name String
    The name of the set
    xssMatchTuples List<XssMatchSetXssMatchTuple>
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    name string
    The name of the set
    xssMatchTuples XssMatchSetXssMatchTuple[]
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    name str
    The name of the set
    xss_match_tuples Sequence[XssMatchSetXssMatchTupleArgs]
    The parts of web requests that you want to inspect for cross-site scripting attacks.
    name String
    The name of the set
    xssMatchTuples List<Property Map>
    The parts of web requests that you want to inspect for cross-site scripting attacks.

    Supporting Types

    XssMatchSetXssMatchTuple, XssMatchSetXssMatchTupleArgs

    FieldToMatch XssMatchSetXssMatchTupleFieldToMatch
    Specifies where in a web request to look for cross-site scripting attacks.
    TextTransformation string
    Which text transformation, if any, to perform on the web request before inspecting the request for cross-site scripting attacks.
    FieldToMatch XssMatchSetXssMatchTupleFieldToMatch
    Specifies where in a web request to look for cross-site scripting attacks.
    TextTransformation string
    Which text transformation, if any, to perform on the web request before inspecting the request for cross-site scripting attacks.
    fieldToMatch XssMatchSetXssMatchTupleFieldToMatch
    Specifies where in a web request to look for cross-site scripting attacks.
    textTransformation String
    Which text transformation, if any, to perform on the web request before inspecting the request for cross-site scripting attacks.
    fieldToMatch XssMatchSetXssMatchTupleFieldToMatch
    Specifies where in a web request to look for cross-site scripting attacks.
    textTransformation string
    Which text transformation, if any, to perform on the web request before inspecting the request for cross-site scripting attacks.
    field_to_match XssMatchSetXssMatchTupleFieldToMatch
    Specifies where in a web request to look for cross-site scripting attacks.
    text_transformation str
    Which text transformation, if any, to perform on the web request before inspecting the request for cross-site scripting attacks.
    fieldToMatch Property Map
    Specifies where in a web request to look for cross-site scripting attacks.
    textTransformation String
    Which text transformation, if any, to perform on the web request before inspecting the request for cross-site scripting attacks.

    XssMatchSetXssMatchTupleFieldToMatch, XssMatchSetXssMatchTupleFieldToMatchArgs

    Type string
    The part of the web request that you want AWS WAF to search for a specified stringE.g., HEADER or METHOD
    Data string
    When the value of type is HEADER, enter the name of the header that you want the WAF to search, for example, User-Agent or Referer. If the value of type is any other value, omit data.
    Type string
    The part of the web request that you want AWS WAF to search for a specified stringE.g., HEADER or METHOD
    Data string
    When the value of type is HEADER, enter the name of the header that you want the WAF to search, for example, User-Agent or Referer. If the value of type is any other value, omit data.
    type String
    The part of the web request that you want AWS WAF to search for a specified stringE.g., HEADER or METHOD
    data String
    When the value of type is HEADER, enter the name of the header that you want the WAF to search, for example, User-Agent or Referer. If the value of type is any other value, omit data.
    type string
    The part of the web request that you want AWS WAF to search for a specified stringE.g., HEADER or METHOD
    data string
    When the value of type is HEADER, enter the name of the header that you want the WAF to search, for example, User-Agent or Referer. If the value of type is any other value, omit data.
    type str
    The part of the web request that you want AWS WAF to search for a specified stringE.g., HEADER or METHOD
    data str
    When the value of type is HEADER, enter the name of the header that you want the WAF to search, for example, User-Agent or Referer. If the value of type is any other value, omit data.
    type String
    The part of the web request that you want AWS WAF to search for a specified stringE.g., HEADER or METHOD
    data String
    When the value of type is HEADER, enter the name of the header that you want the WAF to search, for example, User-Agent or Referer. If the value of type is any other value, omit data.

    Import

    Using pulumi import, import AWS WAF Regional XSS Match using the id. For example:

    $ pulumi import aws:wafregional/xssMatchSet:XssMatchSet example 12345abcde
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi