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

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

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

aws.waf.XssMatchSet

Explore with Pulumi AI

aws logo

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

AWS Classic v5.41.0 published on Monday, May 15, 2023 by Pulumi

    Provides a WAF XSS Match Set Resource

    Example Usage

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

    Create XssMatchSet Resource

    new XssMatchSet(name: string, args?: XssMatchSetArgs, opts?: CustomResourceOptions);
    @overload
    def XssMatchSet(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    name: Optional[str] = None,
                    xss_match_tuples: Optional[Sequence[XssMatchSetXssMatchTupleArgs]] = None)
    @overload
    def XssMatchSet(resource_name: str,
                    args: Optional[XssMatchSetArgs] = None,
                    opts: Optional[ResourceOptions] = 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:waf:XssMatchSet
    properties: # The arguments to resource properties.
    options: # 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.
    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.

    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 or description of the SizeConstraintSet.

    XssMatchTuples List<XssMatchSetXssMatchTupleArgs>

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    Name string

    The name or description of the SizeConstraintSet.

    XssMatchTuples []XssMatchSetXssMatchTupleArgs

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    name String

    The name or description of the SizeConstraintSet.

    xssMatchTuples List<XssMatchSetXssMatchTupleArgs>

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    name string

    The name or description of the SizeConstraintSet.

    xssMatchTuples XssMatchSetXssMatchTupleArgs[]

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    name str

    The name or description of the SizeConstraintSet.

    xss_match_tuples Sequence[XssMatchSetXssMatchTupleArgs]

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    name String

    The name or description of the SizeConstraintSet.

    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:

    Arn string

    Amazon Resource Name (ARN)

    Id string

    The provider-assigned unique ID for this managed resource.

    Arn string

    Amazon Resource Name (ARN)

    Id string

    The provider-assigned unique ID for this managed resource.

    arn String

    Amazon Resource Name (ARN)

    id String

    The provider-assigned unique ID for this managed resource.

    arn string

    Amazon Resource Name (ARN)

    id string

    The provider-assigned unique ID for this managed resource.

    arn str

    Amazon Resource Name (ARN)

    id str

    The provider-assigned unique ID for this managed resource.

    arn String

    Amazon Resource Name (ARN)

    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,
            arn: Optional[str] = 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:
    Arn string

    Amazon Resource Name (ARN)

    Name string

    The name or description of the SizeConstraintSet.

    XssMatchTuples List<XssMatchSetXssMatchTupleArgs>

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    Arn string

    Amazon Resource Name (ARN)

    Name string

    The name or description of the SizeConstraintSet.

    XssMatchTuples []XssMatchSetXssMatchTupleArgs

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    arn String

    Amazon Resource Name (ARN)

    name String

    The name or description of the SizeConstraintSet.

    xssMatchTuples List<XssMatchSetXssMatchTupleArgs>

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    arn string

    Amazon Resource Name (ARN)

    name string

    The name or description of the SizeConstraintSet.

    xssMatchTuples XssMatchSetXssMatchTupleArgs[]

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    arn str

    Amazon Resource Name (ARN)

    name str

    The name or description of the SizeConstraintSet.

    xss_match_tuples Sequence[XssMatchSetXssMatchTupleArgs]

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    arn String

    Amazon Resource Name (ARN)

    name String

    The name or description of the SizeConstraintSet.

    xssMatchTuples List<Property Map>

    The parts of web requests that you want to inspect for cross-site scripting attacks.

    Supporting Types

    XssMatchSetXssMatchTuple

    FieldToMatch XssMatchSetXssMatchTupleFieldToMatch

    Specifies where in a web request to look for cross-site scripting attacks.

    TextTransformation string

    Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. If you specify a transformation, AWS WAF performs the transformation on target_string before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

    FieldToMatch XssMatchSetXssMatchTupleFieldToMatch

    Specifies where in a web request to look for cross-site scripting attacks.

    TextTransformation string

    Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. If you specify a transformation, AWS WAF performs the transformation on target_string before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

    fieldToMatch XssMatchSetXssMatchTupleFieldToMatch

    Specifies where in a web request to look for cross-site scripting attacks.

    textTransformation String

    Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. If you specify a transformation, AWS WAF performs the transformation on target_string before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

    fieldToMatch XssMatchSetXssMatchTupleFieldToMatch

    Specifies where in a web request to look for cross-site scripting attacks.

    textTransformation string

    Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. If you specify a transformation, AWS WAF performs the transformation on target_string before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

    field_to_match XssMatchSetXssMatchTupleFieldToMatch

    Specifies where in a web request to look for cross-site scripting attacks.

    text_transformation str

    Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. If you specify a transformation, AWS WAF performs the transformation on target_string before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

    fieldToMatch Property Map

    Specifies where in a web request to look for cross-site scripting attacks.

    textTransformation String

    Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. If you specify a transformation, AWS WAF performs the transformation on target_string before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

    XssMatchSetXssMatchTupleFieldToMatch

    Type string

    The part of the web request that you want AWS WAF to search for a specified string. e.g., HEADER, METHOD or BODY. See docs for all supported values.

    Data string

    When type is HEADER, enter the name of the header that you want to search, e.g., User-Agent or Referer. If type is any other value, omit this field.

    Type string

    The part of the web request that you want AWS WAF to search for a specified string. e.g., HEADER, METHOD or BODY. See docs for all supported values.

    Data string

    When type is HEADER, enter the name of the header that you want to search, e.g., User-Agent or Referer. If type is any other value, omit this field.

    type String

    The part of the web request that you want AWS WAF to search for a specified string. e.g., HEADER, METHOD or BODY. See docs for all supported values.

    data String

    When type is HEADER, enter the name of the header that you want to search, e.g., User-Agent or Referer. If type is any other value, omit this field.

    type string

    The part of the web request that you want AWS WAF to search for a specified string. e.g., HEADER, METHOD or BODY. See docs for all supported values.

    data string

    When type is HEADER, enter the name of the header that you want to search, e.g., User-Agent or Referer. If type is any other value, omit this field.

    type str

    The part of the web request that you want AWS WAF to search for a specified string. e.g., HEADER, METHOD or BODY. See docs for all supported values.

    data str

    When type is HEADER, enter the name of the header that you want to search, e.g., User-Agent or Referer. If type is any other value, omit this field.

    type String

    The part of the web request that you want AWS WAF to search for a specified string. e.g., HEADER, METHOD or BODY. See docs for all supported values.

    data String

    When type is HEADER, enter the name of the header that you want to search, e.g., User-Agent or Referer. If type is any other value, omit this field.

    Import

    WAF XSS Match Set can be imported using their ID, e.g.,

     $ pulumi import aws:waf/xssMatchSet:XssMatchSet example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
    

    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 v5.41.0 published on Monday, May 15, 2023 by Pulumi