Class ComputeSecurityPolicyRuleRateLimitOptions.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_security_policy.ComputeSecurityPolicyRuleRateLimitOptions.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeSecurityPolicyRuleRateLimitOptions>
- Enclosing interface:
- ComputeSecurityPolicyRuleRateLimitOptions
@Stability(Stable) public static final class ComputeSecurityPolicyRuleRateLimitOptions.Builder extends Object implements software.amazon.jsii.Builder<ComputeSecurityPolicyRuleRateLimitOptions>
A builder forComputeSecurityPolicyRuleRateLimitOptions
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
conformAction
@Stability(Stable) public ComputeSecurityPolicyRuleRateLimitOptions.Builder conformAction(String conformAction)
Sets the value ofComputeSecurityPolicyRuleRateLimitOptions.getConformAction()- Parameters:
conformAction- Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy#conform_action ComputeSecurityPolicy#conform_action}- Returns:
this
-
exceedAction
@Stability(Stable) public ComputeSecurityPolicyRuleRateLimitOptions.Builder exceedAction(String exceedAction)
Sets the value ofComputeSecurityPolicyRuleRateLimitOptions.getExceedAction()- Parameters:
exceedAction- Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. This parameter is required. Valid options are "deny()" where valid values for status are 403, 404, 429, and 502, and "redirect" where the redirect parameters come from exceedRedirectOptions below. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy#exceed_action ComputeSecurityPolicy#exceed_action}- Returns:
this
-
rateLimitThreshold
@Stability(Stable) public ComputeSecurityPolicyRuleRateLimitOptions.Builder rateLimitThreshold(ComputeSecurityPolicyRuleRateLimitOptionsRateLimitThreshold rateLimitThreshold)
Sets the value ofComputeSecurityPolicyRuleRateLimitOptions.getRateLimitThreshold()- Parameters:
rateLimitThreshold- rate_limit_threshold block. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy#rate_limit_threshold ComputeSecurityPolicy#rate_limit_threshold}- Returns:
this
-
banDurationSec
@Stability(Stable) public ComputeSecurityPolicyRuleRateLimitOptions.Builder banDurationSec(Number banDurationSec)
Sets the value ofComputeSecurityPolicyRuleRateLimitOptions.getBanDurationSec()- Parameters:
banDurationSec- Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy#ban_duration_sec ComputeSecurityPolicy#ban_duration_sec}- Returns:
this
-
banThreshold
@Stability(Stable) public ComputeSecurityPolicyRuleRateLimitOptions.Builder banThreshold(ComputeSecurityPolicyRuleRateLimitOptionsBanThreshold banThreshold)
Sets the value ofComputeSecurityPolicyRuleRateLimitOptions.getBanThreshold()- Parameters:
banThreshold- ban_threshold block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy#ban_threshold ComputeSecurityPolicy#ban_threshold}- Returns:
this
-
enforceOnKey
@Stability(Stable) public ComputeSecurityPolicyRuleRateLimitOptions.Builder enforceOnKey(String enforceOnKey)
Sets the value ofComputeSecurityPolicyRuleRateLimitOptions.getEnforceOnKey()- Parameters:
enforceOnKey- Determines the key to enforce the rateLimitThreshold on. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy#enforce_on_key ComputeSecurityPolicy#enforce_on_key}- Returns:
this
-
enforceOnKeyName
@Stability(Stable) public ComputeSecurityPolicyRuleRateLimitOptions.Builder enforceOnKeyName(String enforceOnKeyName)
Sets the value ofComputeSecurityPolicyRuleRateLimitOptions.getEnforceOnKeyName()- Parameters:
enforceOnKeyName- Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy#enforce_on_key_name ComputeSecurityPolicy#enforce_on_key_name}- Returns:
this
-
exceedRedirectOptions
@Stability(Stable) public ComputeSecurityPolicyRuleRateLimitOptions.Builder exceedRedirectOptions(ComputeSecurityPolicyRuleRateLimitOptionsExceedRedirectOptions exceedRedirectOptions)
Sets the value ofComputeSecurityPolicyRuleRateLimitOptions.getExceedRedirectOptions()- Parameters:
exceedRedirectOptions- exceed_redirect_options block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy#exceed_redirect_options ComputeSecurityPolicy#exceed_redirect_options}- Returns:
this
-
build
@Stability(Stable) public ComputeSecurityPolicyRuleRateLimitOptions build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeSecurityPolicyRuleRateLimitOptions>- Returns:
- a new instance of
ComputeSecurityPolicyRuleRateLimitOptions - Throws:
NullPointerException- if any required attribute was not provided
-
-