Skip to content

HTTPRequest

Source code in docs_src/capo_wafv2/types/http_request.py
class HTTPRequest(TypedDict, closed=True):
    client_ip: NotRequired["capo_wafv2.types.ip_string.IPString"]
    """<p>The IP address that the request originated from. If the web ACL is associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:</p> <ul> <li> <p> <code>c-ip</code>, if the viewer did not use an HTTP proxy or a load balancer to send the request</p> </li> <li> <p> <code>x-forwarded-for</code>, if the viewer did use an HTTP proxy or a load balancer to send the request</p> </li> </ul>"""
    country: NotRequired["capo_wafv2.types.country.Country"]
    """<p>The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha-2</a>.</p>"""
    uri: NotRequired["capo_wafv2.types.uri_string.URIString"]
    """<p>The URI path of the request, which identifies the resource, for example, <code>/images/daily-ad.jpg</code>.</p>"""
    method: NotRequired["capo_wafv2.types.http_method.HTTPMethod"]
    """<p>The HTTP method specified in the sampled web request. </p>"""
    http_version: NotRequired["capo_wafv2.types.http_version.HTTPVersion"]
    """<p>The HTTP version specified in the sampled web request, for example, <code>HTTP/1.1</code>.</p>"""
    headers: NotRequired["capo_wafv2.types.http_headers.HTTPHeaders"]
    """<p>A complex type that contains the name and value for each header in the sampled web request.</p>"""

client_ip instance-attribute

client_ip: NotRequired[IPString]

The IP address that the request originated from. If the web ACL is associated with a CloudFront distribution, this is the value of one of the following fields in CloudFront access logs:

  • c-ip, if the viewer did not use an HTTP proxy or a load balancer to send the request

  • x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer to send the request

country instance-attribute

country: NotRequired[Country]

The two-letter country code for the country that the request originated from. For a current list of country codes, see the Wikipedia entry ISO 3166-1 alpha-2.

headers instance-attribute

headers: NotRequired[HTTPHeaders]

A complex type that contains the name and value for each header in the sampled web request.

http_version instance-attribute

http_version: NotRequired[HTTPVersion]

The HTTP version specified in the sampled web request, for example, HTTP/1.1.

method instance-attribute

method: NotRequired[HTTPMethod]

The HTTP method specified in the sampled web request.

uri instance-attribute

uri: NotRequired[URIString]

The URI path of the request, which identifies the resource, for example, /images/daily-ad.jpg.