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

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

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.wafregional.SqlInjectionMatchSet

Explore with Pulumi AI

aws logo

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

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const sqlInjectionMatchSet = new aws.wafregional.SqlInjectionMatchSet("sql_injection_match_set", {
        name: "tf-sql_injection_match_set",
        sqlInjectionMatchTuples: [{
            textTransformation: "URL_DECODE",
            fieldToMatch: {
                type: "QUERY_STRING",
            },
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    sql_injection_match_set = aws.wafregional.SqlInjectionMatchSet("sql_injection_match_set",
        name="tf-sql_injection_match_set",
        sql_injection_match_tuples=[aws.wafregional.SqlInjectionMatchSetSqlInjectionMatchTupleArgs(
            text_transformation="URL_DECODE",
            field_to_match=aws.wafregional.SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs(
                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.NewSqlInjectionMatchSet(ctx, "sql_injection_match_set", &wafregional.SqlInjectionMatchSetArgs{
    			Name: pulumi.String("tf-sql_injection_match_set"),
    			SqlInjectionMatchTuples: wafregional.SqlInjectionMatchSetSqlInjectionMatchTupleArray{
    				&wafregional.SqlInjectionMatchSetSqlInjectionMatchTupleArgs{
    					TextTransformation: pulumi.String("URL_DECODE"),
    					FieldToMatch: &wafregional.SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs{
    						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 sqlInjectionMatchSet = new Aws.WafRegional.SqlInjectionMatchSet("sql_injection_match_set", new()
        {
            Name = "tf-sql_injection_match_set",
            SqlInjectionMatchTuples = new[]
            {
                new Aws.WafRegional.Inputs.SqlInjectionMatchSetSqlInjectionMatchTupleArgs
                {
                    TextTransformation = "URL_DECODE",
                    FieldToMatch = new Aws.WafRegional.Inputs.SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs
                    {
                        Type = "QUERY_STRING",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.wafregional.SqlInjectionMatchSet;
    import com.pulumi.aws.wafregional.SqlInjectionMatchSetArgs;
    import com.pulumi.aws.wafregional.inputs.SqlInjectionMatchSetSqlInjectionMatchTupleArgs;
    import com.pulumi.aws.wafregional.inputs.SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs;
    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 sqlInjectionMatchSet = new SqlInjectionMatchSet("sqlInjectionMatchSet", SqlInjectionMatchSetArgs.builder()        
                .name("tf-sql_injection_match_set")
                .sqlInjectionMatchTuples(SqlInjectionMatchSetSqlInjectionMatchTupleArgs.builder()
                    .textTransformation("URL_DECODE")
                    .fieldToMatch(SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs.builder()
                        .type("QUERY_STRING")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      sqlInjectionMatchSet:
        type: aws:wafregional:SqlInjectionMatchSet
        name: sql_injection_match_set
        properties:
          name: tf-sql_injection_match_set
          sqlInjectionMatchTuples:
            - textTransformation: URL_DECODE
              fieldToMatch:
                type: QUERY_STRING
    

    Create SqlInjectionMatchSet Resource

    new SqlInjectionMatchSet(name: string, args?: SqlInjectionMatchSetArgs, opts?: CustomResourceOptions);
    @overload
    def SqlInjectionMatchSet(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             name: Optional[str] = None,
                             sql_injection_match_tuples: Optional[Sequence[SqlInjectionMatchSetSqlInjectionMatchTupleArgs]] = None)
    @overload
    def SqlInjectionMatchSet(resource_name: str,
                             args: Optional[SqlInjectionMatchSetArgs] = None,
                             opts: Optional[ResourceOptions] = None)
    func NewSqlInjectionMatchSet(ctx *Context, name string, args *SqlInjectionMatchSetArgs, opts ...ResourceOption) (*SqlInjectionMatchSet, error)
    public SqlInjectionMatchSet(string name, SqlInjectionMatchSetArgs? args = null, CustomResourceOptions? opts = null)
    public SqlInjectionMatchSet(String name, SqlInjectionMatchSetArgs args)
    public SqlInjectionMatchSet(String name, SqlInjectionMatchSetArgs args, CustomResourceOptions options)
    
    type: aws:wafregional:SqlInjectionMatchSet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SqlInjectionMatchSetArgs
    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 SqlInjectionMatchSetArgs
    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 SqlInjectionMatchSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SqlInjectionMatchSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SqlInjectionMatchSetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SqlInjectionMatchSet 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 SqlInjectionMatchSet resource accepts the following input properties:

    Name string
    The name or description of the SizeConstraintSet.
    SqlInjectionMatchTuples List<SqlInjectionMatchSetSqlInjectionMatchTuple>
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    Name string
    The name or description of the SizeConstraintSet.
    SqlInjectionMatchTuples []SqlInjectionMatchSetSqlInjectionMatchTupleArgs
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    name String
    The name or description of the SizeConstraintSet.
    sqlInjectionMatchTuples List<SqlInjectionMatchSetSqlInjectionMatchTuple>
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    name string
    The name or description of the SizeConstraintSet.
    sqlInjectionMatchTuples SqlInjectionMatchSetSqlInjectionMatchTuple[]
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    name str
    The name or description of the SizeConstraintSet.
    sql_injection_match_tuples Sequence[SqlInjectionMatchSetSqlInjectionMatchTupleArgs]
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    name String
    The name or description of the SizeConstraintSet.
    sqlInjectionMatchTuples List<Property Map>
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SqlInjectionMatchSet 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 SqlInjectionMatchSet Resource

    Get an existing SqlInjectionMatchSet 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?: SqlInjectionMatchSetState, opts?: CustomResourceOptions): SqlInjectionMatchSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            sql_injection_match_tuples: Optional[Sequence[SqlInjectionMatchSetSqlInjectionMatchTupleArgs]] = None) -> SqlInjectionMatchSet
    func GetSqlInjectionMatchSet(ctx *Context, name string, id IDInput, state *SqlInjectionMatchSetState, opts ...ResourceOption) (*SqlInjectionMatchSet, error)
    public static SqlInjectionMatchSet Get(string name, Input<string> id, SqlInjectionMatchSetState? state, CustomResourceOptions? opts = null)
    public static SqlInjectionMatchSet get(String name, Output<String> id, SqlInjectionMatchSetState 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 or description of the SizeConstraintSet.
    SqlInjectionMatchTuples List<SqlInjectionMatchSetSqlInjectionMatchTuple>
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    Name string
    The name or description of the SizeConstraintSet.
    SqlInjectionMatchTuples []SqlInjectionMatchSetSqlInjectionMatchTupleArgs
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    name String
    The name or description of the SizeConstraintSet.
    sqlInjectionMatchTuples List<SqlInjectionMatchSetSqlInjectionMatchTuple>
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    name string
    The name or description of the SizeConstraintSet.
    sqlInjectionMatchTuples SqlInjectionMatchSetSqlInjectionMatchTuple[]
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    name str
    The name or description of the SizeConstraintSet.
    sql_injection_match_tuples Sequence[SqlInjectionMatchSetSqlInjectionMatchTupleArgs]
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.
    name String
    The name or description of the SizeConstraintSet.
    sqlInjectionMatchTuples List<Property Map>
    The parts of web requests that you want AWS WAF to inspect for malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.

    Supporting Types

    SqlInjectionMatchSetSqlInjectionMatchTuple, SqlInjectionMatchSetSqlInjectionMatchTupleArgs

    FieldToMatch SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatch
    Specifies where in a web request to look for snippets of malicious SQL code.
    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 field_to_match before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.
    FieldToMatch SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatch
    Specifies where in a web request to look for snippets of malicious SQL code.
    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 field_to_match before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.
    fieldToMatch SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatch
    Specifies where in a web request to look for snippets of malicious SQL code.
    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 field_to_match before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.
    fieldToMatch SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatch
    Specifies where in a web request to look for snippets of malicious SQL code.
    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 field_to_match 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 SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatch
    Specifies where in a web request to look for snippets of malicious SQL code.
    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 field_to_match 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 snippets of malicious SQL code.
    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 field_to_match before inspecting a request for a match. e.g., CMD_LINE, HTML_ENTITY_DECODE or NONE. See docs for all supported values.

    SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatch, SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs

    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

    Using pulumi import, import WAF Regional Sql Injection Match Set using the id. For example:

    $ pulumi import aws:wafregional/sqlInjectionMatchSet:SqlInjectionMatchSet sql_injection_match_set 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 v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi