github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/waf_byte_match_set.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: waf_byte_match_set"
     4  sidebar_current: "docs-aws-resource-waf-bytematchset"
     5  description: |-
     6    Provides a AWS WAF Byte Match Set resource.
     7  ---
     8  
     9  # aws\_waf\_byte\_match\_set
    10  
    11  Provides a WAF Byte Match Set Resource
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "aws_waf_byte_match_set" "byte_set" {
    17    name = "tf_waf_byte_match_set"
    18  
    19    byte_match_tuples {
    20      text_transformation   = "NONE"
    21      target_string         = "badrefer1"
    22      positional_constraint = "CONTAINS"
    23  
    24      field_to_match {
    25        type = "HEADER"
    26        data = "referer"
    27      }
    28    }
    29  }
    30  ```
    31  
    32  ## Argument Reference
    33  
    34  The following arguments are supported:
    35  
    36  * `name` - (Required) The name or description of the Byte Match Set.
    37  * `byte_match_tuples` - Specifies the bytes (typically a string that corresponds
    38    with ASCII characters) that you want to search for in web requests,
    39    the location in requests that you want to search, and other settings.
    40  
    41  ## Nested blocks
    42  
    43  ### `byte_match_tuples`
    44  
    45  #### Arguments
    46  
    47  * `field_to_match` - (Required) The part of a web request that you want to search, such as a specified header or a query string.
    48  * `positional_constraint` - (Required) Within the portion of a web request that you want to search
    49    (for example, in the query string, if any), specify where you want to search.
    50    e.g. `CONTAINS`, `CONTAINS_WORD` or `EXACTLY`.
    51    See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_ByteMatchTuple.html#WAF-Type-ByteMatchTuple-PositionalConstraint)
    52    for all supported values.
    53  * `target_string` - (Optional) The value that you want to search for. e.g. `HEADER`, `METHOD` or `BODY`.
    54    See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_ByteMatchTuple.html#WAF-Type-ByteMatchTuple-TargetString)
    55    for all supported values.
    56  * `text_transformation` - (Required) Text transformations used to eliminate unusual formatting that attackers use in web requests in an effort to bypass AWS WAF.
    57    If you specify a transformation, AWS WAF performs the transformation on `target_string` before inspecting a request for a match.
    58    e.g. `CMD_LINE`, `HTML_ENTITY_DECODE` or `NONE`.
    59    See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_ByteMatchTuple.html#WAF-Type-ByteMatchTuple-TextTransformation)
    60    for all supported values.
    61  
    62  ### `field_to_match`
    63  
    64  #### Arguments
    65  
    66  * `data` - (Optional) When `type` is `HEADER`, enter the name of the header that you want to search, e.g. `User-Agent` or `Referer`.
    67    If `type` is any other value, omit this field.
    68  * `type` - (Required) The part of the web request that you want AWS WAF to search for a specified string.
    69    e.g. `HEADER`, `METHOD` or `BODY`.
    70    See [docs](http://docs.aws.amazon.com/waf/latest/APIReference/API_FieldToMatch.html)
    71    for all supported values.
    72  
    73  ## Remarks
    74  
    75  ## Attributes Reference
    76  
    77  The following attributes are exported:
    78  
    79  * `id` - The ID of the WAF Byte Match Set.