Interface RuleCondition.Builder

  • Method Details

    • field

      The field in the HTTP request. The following are the possible values:

      • http-header

      • http-request-method

      • host-header

      • path-pattern

      • query-string

      • source-ip

      Parameters:
      field - The field in the HTTP request. The following are the possible values:

      • http-header

      • http-request-method

      • host-header

      • path-pattern

      • query-string

      • source-ip

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

      The condition value. Specify only when Field is host-header or path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use HostHeaderConfig or PathPatternConfig.

      If Field is host-header and you are not using HostHeaderConfig, you can specify a single host name (for example, my.example.com) in Values. A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9

      • - .

      • * (matches 0 or more characters)

      • ? (matches exactly 1 character)

      If Field is path-pattern and you are not using PathPatternConfig, you can specify a single path pattern (for example, /img/*) in Values. A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9

      • _ - . $ / ~ " ' @ : +

      • & (using &)

      • * (matches 0 or more characters)

      • ? (matches exactly 1 character)

      Parameters:
      values - The condition value. Specify only when Field is host-header or path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use HostHeaderConfig or PathPatternConfig.

      If Field is host-header and you are not using HostHeaderConfig, you can specify a single host name (for example, my.example.com) in Values. A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9

      • - .

      • * (matches 0 or more characters)

      • ? (matches exactly 1 character)

      If Field is path-pattern and you are not using PathPatternConfig, you can specify a single path pattern (for example, /img/*) in Values. A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9

      • _ - . $ / ~ " ' @ : +

      • & (using &)

      • * (matches 0 or more characters)

      • ? (matches exactly 1 character)

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

      RuleCondition.Builder values(String... values)

      The condition value. Specify only when Field is host-header or path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use HostHeaderConfig or PathPatternConfig.

      If Field is host-header and you are not using HostHeaderConfig, you can specify a single host name (for example, my.example.com) in Values. A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9

      • - .

      • * (matches 0 or more characters)

      • ? (matches exactly 1 character)

      If Field is path-pattern and you are not using PathPatternConfig, you can specify a single path pattern (for example, /img/*) in Values. A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9

      • _ - . $ / ~ " ' @ : +

      • & (using &)

      • * (matches 0 or more characters)

      • ? (matches exactly 1 character)

      Parameters:
      values - The condition value. Specify only when Field is host-header or path-pattern. Alternatively, to specify multiple host names or multiple path patterns, use HostHeaderConfig or PathPatternConfig.

      If Field is host-header and you are not using HostHeaderConfig, you can specify a single host name (for example, my.example.com) in Values. A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9

      • - .

      • * (matches 0 or more characters)

      • ? (matches exactly 1 character)

      If Field is path-pattern and you are not using PathPatternConfig, you can specify a single path pattern (for example, /img/*) in Values. A path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following characters.

      • A-Z, a-z, 0-9

      • _ - . $ / ~ " ' @ : +

      • & (using &)

      • * (matches 0 or more characters)

      • ? (matches exactly 1 character)

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

      RuleCondition.Builder hostHeaderConfig(HostHeaderConditionConfig hostHeaderConfig)

      Information for a host header condition. Specify only when Field is host-header.

      Parameters:
      hostHeaderConfig - Information for a host header condition. Specify only when Field is host-header.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • hostHeaderConfig

      default RuleCondition.Builder hostHeaderConfig(Consumer<HostHeaderConditionConfig.Builder> hostHeaderConfig)

      Information for a host header condition. Specify only when Field is host-header.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to hostHeaderConfig(HostHeaderConditionConfig).

      Parameters:
      hostHeaderConfig - a consumer that will call methods on HostHeaderConditionConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • pathPatternConfig

      RuleCondition.Builder pathPatternConfig(PathPatternConditionConfig pathPatternConfig)

      Information for a path pattern condition. Specify only when Field is path-pattern.

      Parameters:
      pathPatternConfig - Information for a path pattern condition. Specify only when Field is path-pattern.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • pathPatternConfig

      default RuleCondition.Builder pathPatternConfig(Consumer<PathPatternConditionConfig.Builder> pathPatternConfig)

      Information for a path pattern condition. Specify only when Field is path-pattern.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to pathPatternConfig(PathPatternConditionConfig).

      Parameters:
      pathPatternConfig - a consumer that will call methods on PathPatternConditionConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • httpHeaderConfig

      RuleCondition.Builder httpHeaderConfig(HttpHeaderConditionConfig httpHeaderConfig)

      Information for an HTTP header condition. Specify only when Field is http-header.

      Parameters:
      httpHeaderConfig - Information for an HTTP header condition. Specify only when Field is http-header.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • httpHeaderConfig

      default RuleCondition.Builder httpHeaderConfig(Consumer<HttpHeaderConditionConfig.Builder> httpHeaderConfig)

      Information for an HTTP header condition. Specify only when Field is http-header.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to httpHeaderConfig(HttpHeaderConditionConfig).

      Parameters:
      httpHeaderConfig - a consumer that will call methods on HttpHeaderConditionConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • queryStringConfig

      RuleCondition.Builder queryStringConfig(QueryStringConditionConfig queryStringConfig)

      Information for a query string condition. Specify only when Field is query-string.

      Parameters:
      queryStringConfig - Information for a query string condition. Specify only when Field is query-string.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • queryStringConfig

      default RuleCondition.Builder queryStringConfig(Consumer<QueryStringConditionConfig.Builder> queryStringConfig)

      Information for a query string condition. Specify only when Field is query-string.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to queryStringConfig(QueryStringConditionConfig).

      Parameters:
      queryStringConfig - a consumer that will call methods on QueryStringConditionConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • httpRequestMethodConfig

      RuleCondition.Builder httpRequestMethodConfig(HttpRequestMethodConditionConfig httpRequestMethodConfig)

      Information for an HTTP method condition. Specify only when Field is http-request-method.

      Parameters:
      httpRequestMethodConfig - Information for an HTTP method condition. Specify only when Field is http-request-method.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • httpRequestMethodConfig

      default RuleCondition.Builder httpRequestMethodConfig(Consumer<HttpRequestMethodConditionConfig.Builder> httpRequestMethodConfig)

      Information for an HTTP method condition. Specify only when Field is http-request-method.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to httpRequestMethodConfig(HttpRequestMethodConditionConfig).

      Parameters:
      httpRequestMethodConfig - a consumer that will call methods on HttpRequestMethodConditionConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • sourceIpConfig

      RuleCondition.Builder sourceIpConfig(SourceIpConditionConfig sourceIpConfig)

      Information for a source IP condition. Specify only when Field is source-ip.

      Parameters:
      sourceIpConfig - Information for a source IP condition. Specify only when Field is source-ip.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sourceIpConfig

      default RuleCondition.Builder sourceIpConfig(Consumer<SourceIpConditionConfig.Builder> sourceIpConfig)

      Information for a source IP condition. Specify only when Field is source-ip.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to sourceIpConfig(SourceIpConditionConfig).

      Parameters:
      sourceIpConfig - a consumer that will call methods on SourceIpConditionConfig.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: