aws.waf.SqlInjectionMatchSet
Explore with Pulumi AI
Provides a WAF SQL Injection Match Set Resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const sqlInjectionMatchSet = new aws.waf.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.waf.SqlInjectionMatchSet("sql_injection_match_set",
name="tf-sql_injection_match_set",
sql_injection_match_tuples=[{
"text_transformation": "URL_DECODE",
"field_to_match": {
"type": "QUERY_STRING",
},
}])
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.NewSqlInjectionMatchSet(ctx, "sql_injection_match_set", &waf.SqlInjectionMatchSetArgs{
Name: pulumi.String("tf-sql_injection_match_set"),
SqlInjectionMatchTuples: waf.SqlInjectionMatchSetSqlInjectionMatchTupleArray{
&waf.SqlInjectionMatchSetSqlInjectionMatchTupleArgs{
TextTransformation: pulumi.String("URL_DECODE"),
FieldToMatch: &waf.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.Waf.SqlInjectionMatchSet("sql_injection_match_set", new()
{
Name = "tf-sql_injection_match_set",
SqlInjectionMatchTuples = new[]
{
new Aws.Waf.Inputs.SqlInjectionMatchSetSqlInjectionMatchTupleArgs
{
TextTransformation = "URL_DECODE",
FieldToMatch = new Aws.Waf.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.waf.SqlInjectionMatchSet;
import com.pulumi.aws.waf.SqlInjectionMatchSetArgs;
import com.pulumi.aws.waf.inputs.SqlInjectionMatchSetSqlInjectionMatchTupleArgs;
import com.pulumi.aws.waf.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:waf:SqlInjectionMatchSet
name: sql_injection_match_set
properties:
name: tf-sql_injection_match_set
sqlInjectionMatchTuples:
- textTransformation: URL_DECODE
fieldToMatch:
type: QUERY_STRING
Create SqlInjectionMatchSet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SqlInjectionMatchSet(name: string, args?: SqlInjectionMatchSetArgs, opts?: CustomResourceOptions);
@overload
def SqlInjectionMatchSet(resource_name: str,
args: Optional[SqlInjectionMatchSetArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SqlInjectionMatchSet(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
sql_injection_match_tuples: Optional[Sequence[SqlInjectionMatchSetSqlInjectionMatchTupleArgs]] = 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:waf:SqlInjectionMatchSet
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 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var sqlInjectionMatchSetResource = new Aws.Waf.SqlInjectionMatchSet("sqlInjectionMatchSetResource", new()
{
Name = "string",
SqlInjectionMatchTuples = new[]
{
new Aws.Waf.Inputs.SqlInjectionMatchSetSqlInjectionMatchTupleArgs
{
FieldToMatch = new Aws.Waf.Inputs.SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs
{
Type = "string",
Data = "string",
},
TextTransformation = "string",
},
},
});
example, err := waf.NewSqlInjectionMatchSet(ctx, "sqlInjectionMatchSetResource", &waf.SqlInjectionMatchSetArgs{
Name: pulumi.String("string"),
SqlInjectionMatchTuples: waf.SqlInjectionMatchSetSqlInjectionMatchTupleArray{
&waf.SqlInjectionMatchSetSqlInjectionMatchTupleArgs{
FieldToMatch: &waf.SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs{
Type: pulumi.String("string"),
Data: pulumi.String("string"),
},
TextTransformation: pulumi.String("string"),
},
},
})
var sqlInjectionMatchSetResource = new SqlInjectionMatchSet("sqlInjectionMatchSetResource", SqlInjectionMatchSetArgs.builder()
.name("string")
.sqlInjectionMatchTuples(SqlInjectionMatchSetSqlInjectionMatchTupleArgs.builder()
.fieldToMatch(SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs.builder()
.type("string")
.data("string")
.build())
.textTransformation("string")
.build())
.build());
sql_injection_match_set_resource = aws.waf.SqlInjectionMatchSet("sqlInjectionMatchSetResource",
name="string",
sql_injection_match_tuples=[{
"field_to_match": {
"type": "string",
"data": "string",
},
"text_transformation": "string",
}])
const sqlInjectionMatchSetResource = new aws.waf.SqlInjectionMatchSet("sqlInjectionMatchSetResource", {
name: "string",
sqlInjectionMatchTuples: [{
fieldToMatch: {
type: "string",
data: "string",
},
textTransformation: "string",
}],
});
type: aws:waf:SqlInjectionMatchSet
properties:
name: string
sqlInjectionMatchTuples:
- fieldToMatch:
data: string
type: string
textTransformation: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SqlInjectionMatchSet resource accepts the following input properties:
- Name string
- The name or description of the SQL Injection Match Set.
- Sql
Injection List<SqlMatch Tuples Injection Match Set Sql Injection Match Tuple> - 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 SQL Injection Match Set.
- Sql
Injection []SqlMatch Tuples Injection Match Set Sql Injection Match Tuple Args - 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 SQL Injection Match Set.
- sql
Injection List<SqlMatch Tuples Injection Match Set Sql Injection Match Tuple> - 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 SQL Injection Match Set.
- sql
Injection SqlMatch Tuples Injection Match Set Sql Injection Match Tuple[] - 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 SQL Injection Match Set.
- sql_
injection_ Sequence[Sqlmatch_ tuples Injection Match Set Sql Injection Match Tuple Args] - 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 SQL Injection Match Set.
- sql
Injection List<Property Map>Match Tuples - 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.
- Name string
- The name or description of the SQL Injection Match Set.
- Sql
Injection List<SqlMatch Tuples Injection Match Set Sql Injection Match Tuple> - 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 SQL Injection Match Set.
- Sql
Injection []SqlMatch Tuples Injection Match Set Sql Injection Match Tuple Args - 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 SQL Injection Match Set.
- sql
Injection List<SqlMatch Tuples Injection Match Set Sql Injection Match Tuple> - 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 SQL Injection Match Set.
- sql
Injection SqlMatch Tuples Injection Match Set Sql Injection Match Tuple[] - 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 SQL Injection Match Set.
- sql_
injection_ Sequence[Sqlmatch_ tuples Injection Match Set Sql Injection Match Tuple Args] - 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 SQL Injection Match Set.
- sql
Injection List<Property Map>Match Tuples - 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
- Field
To SqlMatch Injection Match Set Sql Injection Match Tuple Field To Match - Specifies where in a web request to look for snippets of malicious SQL code.
- Text
Transformation 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
orNONE
. See docs for all supported values.
- Field
To SqlMatch Injection Match Set Sql Injection Match Tuple Field To Match - Specifies where in a web request to look for snippets of malicious SQL code.
- Text
Transformation 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
orNONE
. See docs for all supported values.
- field
To SqlMatch Injection Match Set Sql Injection Match Tuple Field To Match - Specifies where in a web request to look for snippets of malicious SQL code.
- text
Transformation 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
orNONE
. See docs for all supported values.
- field
To SqlMatch Injection Match Set Sql Injection Match Tuple Field To Match - Specifies where in a web request to look for snippets of malicious SQL code.
- text
Transformation 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
orNONE
. See docs for all supported values.
- field_
to_ Sqlmatch Injection Match Set Sql Injection Match Tuple Field To Match - 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
orNONE
. See docs for all supported values.
- field
To Property MapMatch - Specifies where in a web request to look for snippets of malicious SQL code.
- text
Transformation 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
orNONE
. 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
orBODY
. See docs for all supported values. - Data string
- When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
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
orBODY
. See docs for all supported values. - Data string
- When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
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
orBODY
. See docs for all supported values. - data String
- When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
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
orBODY
. See docs for all supported values. - data string
- When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
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
orBODY
. See docs for all supported values. - data str
- When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
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
orBODY
. See docs for all supported values. - data String
- When
type
isHEADER
, enter the name of the header that you want to search, e.g.,User-Agent
orReferer
. Iftype
is any other value, omit this field.
Import
Using pulumi import
, import AWS WAF SQL Injection Match Set using their ID. For example:
$ pulumi import aws:waf/sqlInjectionMatchSet:SqlInjectionMatchSet example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
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.