Interface SampledHTTPRequest.Builder

    • Method Detail

      • request

        SampledHTTPRequest.Builder request​(HTTPRequest request)

        A complex type that contains detailed information about the request.

        Parameters:
        request - A complex type that contains detailed information about the request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • weight

        SampledHTTPRequest.Builder weight​(Long weight)

        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.

        Parameters:
        weight - 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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • timestamp

        SampledHTTPRequest.Builder timestamp​(Instant timestamp)

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

        Parameters:
        timestamp - The time at which WAF received the request from your Amazon Web Services resource, in Unix time format (in seconds).
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • action

        SampledHTTPRequest.Builder action​(String action)

        The action that WAF applied to the request.

        Parameters:
        action - The action that WAF applied to the request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • ruleNameWithinRuleGroup

        SampledHTTPRequest.Builder ruleNameWithinRuleGroup​(String ruleNameWithinRuleGroup)

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

        Parameters:
        ruleNameWithinRuleGroup - The name of the Rule that the request matched. For managed rule groups, the format for this name is <vendor name>#<managed rule group name>#<rule name>. For your own rule groups, the format for this name is <rule group name>#<rule name>. If the rule is not in a rule group, this field is absent.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • requestHeadersInserted

        SampledHTTPRequest.Builder requestHeadersInserted​(Collection<HTTPHeader> requestHeadersInserted)

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

        Parameters:
        requestHeadersInserted - Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • requestHeadersInserted

        SampledHTTPRequest.Builder requestHeadersInserted​(HTTPHeader... requestHeadersInserted)

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

        Parameters:
        requestHeadersInserted - Custom request headers inserted by WAF into the request, according to the custom request configuration for the matching rule action.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • requestHeadersInserted

        SampledHTTPRequest.Builder requestHeadersInserted​(Consumer<HTTPHeader.Builder>... requestHeadersInserted)

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

        This is a convenience method that creates an instance of the HTTPHeader.Builder avoiding the need to create one manually via HTTPHeader.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #requestHeadersInserted(List).

        Parameters:
        requestHeadersInserted - a consumer that will call methods on HTTPHeader.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #requestHeadersInserted(java.util.Collection)
      • responseCodeSent

        SampledHTTPRequest.Builder responseCodeSent​(Integer responseCodeSent)

        The response code that was sent for the request.

        Parameters:
        responseCodeSent - The response code that was sent for the request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • labels

        SampledHTTPRequest.Builder labels​(Collection<Label> 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • labels

        SampledHTTPRequest.Builder labels​(Label... 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • labels

        SampledHTTPRequest.Builder labels​(Consumer<Label.Builder>... 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.

        This is a convenience method that creates an instance of the Label.Builder avoiding the need to create one manually via Label.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #labels(List.

        Parameters:
        labels - a consumer that will call methods on Label.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #labels(java.util.Collection
      • captchaResponse

        SampledHTTPRequest.Builder captchaResponse​(CaptchaResponse captchaResponse)

        The CAPTCHA response for the request.

        Parameters:
        captchaResponse - The CAPTCHA response for the request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • challengeResponse

        SampledHTTPRequest.Builder challengeResponse​(ChallengeResponse challengeResponse)

        The Challenge response for the request.

        Parameters:
        challengeResponse - The Challenge response for the request.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • overriddenAction

        SampledHTTPRequest.Builder overriddenAction​(String overriddenAction)

        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.

        Parameters:
        overriddenAction - 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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.