Skip to content

SampledHTTPRequest

Source code in docs_src/capo_wafv2/types/sampled_http_request.py
class SampledHTTPRequest(TypedDict, closed=True):
    request: "capo_wafv2.types.http_request.HTTPRequest"
    """<p>A complex type that contains detailed information about the request.</p>"""
    weight: "capo_wafv2.types.sample_weight.SampleWeight"
    """<p>A value that indicates how one result in the response relates proportionally to other results in the response. For example, a result that has a weight of <code>2</code> represents roughly twice as many web requests as a result that has a weight of <code>1</code>.</p>"""
    timestamp: NotRequired["capo_wafv2.types.timestamp.Timestamp"]
    """<p>The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).</p>"""
    action: NotRequired["capo_wafv2.types.action.Action"]
    """<p>The action that WAF applied to the request.</p>"""
    rule_name_within_rule_group: NotRequired["capo_wafv2.types.entity_name.EntityName"]
    """<p>The name of the <code>Rule</code> that the request matched. For managed rule groups, the format for this name is <code><vendor name>#<managed rule group name>#<rule name></code>. For your own rule groups, the format for this name is <code><rule group name>#<rule name></code>. If the rule is not in a rule group, this field is absent. </p>"""
    request_headers_inserted: NotRequired["capo_wafv2.types.http_headers.HTTPHeaders"]
    """<p>Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.</p>"""
    response_code_sent: NotRequired[
        "capo_wafv2.types.response_status_code.ResponseStatusCode"
    ]
    """<p>The response code that was sent for the request.</p>"""
    labels: NotRequired["capo_wafv2.types.labels.Labels"]
    """<p>Labels applied to the web request by matching rules. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace. </p> <p>For example, <code>awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA</code> or <code>awswaf:managed:aws:managed-rule-set:header:encoding:utf8</code>. </p>"""
    captcha_response: NotRequired["capo_wafv2.types.captcha_response.CaptchaResponse"]
    """<p>The <code>CAPTCHA</code> response for the request.</p>"""
    challenge_response: NotRequired[
        "capo_wafv2.types.challenge_response.ChallengeResponse"
    ]
    """<p>The <code>Challenge</code> response for the request.</p>"""
    overridden_action: NotRequired["capo_wafv2.types.action.Action"]
    """<p>Used only for rule group rules that have a rule action override in place in the web ACL. This is the action that the rule group rule is configured for, and not the action that was applied to the request. The action that WAF applied is the <code>Action</code> value. </p>"""

action instance-attribute

action: NotRequired[Action]

The action that WAF applied to the request.

captcha_response instance-attribute

captcha_response: NotRequired[CaptchaResponse]

The CAPTCHA response for the request.

challenge_response instance-attribute

challenge_response: NotRequired[ChallengeResponse]

The Challenge response for the request.

labels instance-attribute

labels: NotRequired[Labels]

Labels applied to the web request by matching rules. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

For example, awswaf:111122223333:myRuleGroup:testRules:testNS1:testNS2:labelNameA or awswaf:managed:aws:managed-rule-set:header:encoding:utf8.

overridden_action instance-attribute

overridden_action: NotRequired[Action]

Used only for rule group rules that have a rule action override in place in the web ACL. This is the action that the rule group rule is configured for, and not the action that was applied to the request. The action that WAF applied is the Action value.

request instance-attribute

request: HTTPRequest

A complex type that contains detailed information about the request.

request_headers_inserted instance-attribute

request_headers_inserted: NotRequired[HTTPHeaders]

Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.

response_code_sent instance-attribute

response_code_sent: NotRequired[ResponseStatusCode]

The response code that was sent for the request.

rule_name_within_rule_group instance-attribute

rule_name_within_rule_group: NotRequired[EntityName]

The name of the Rule that the request matched. For managed rule groups, the format for this name is ##. For your own rule groups, the format for this name is #. If the rule is not in a rule group, this field is absent.

timestamp instance-attribute

timestamp: NotRequired[Timestamp]

The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).

weight instance-attribute

weight: SampleWeight

A value that indicates how one result in the response relates proportionally to other results in the response. For example, a result that has a weight of 2 represents roughly twice as many web requests as a result that has a weight of 1.