Class ComputeSecurityPolicyRuleAConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_security_policy_rule.ComputeSecurityPolicyRuleAConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeSecurityPolicyRuleAConfig>
- Enclosing interface:
- ComputeSecurityPolicyRuleAConfig
@Stability(Stable) public static final class ComputeSecurityPolicyRuleAConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeSecurityPolicyRuleAConfig>
A builder forComputeSecurityPolicyRuleAConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
action
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder action(String action)
Sets the value ofComputeSecurityPolicyRuleAConfig.getAction()- Parameters:
action- The Action to perform when the rule is matched. The following are the valid actions:. This parameter is required. * allow: allow access to target. * deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for STATUS are 403, 404, and 502. * rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rateLimitOptions to be set. * redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. This action is only supported in Global Security Policies of type CLOUD_ARMOR. * throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rateLimitOptions to be set for this. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#action ComputeSecurityPolicyRuleA#action}- Returns:
this
-
priority
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder priority(Number priority)
Sets the value ofComputeSecurityPolicyRuleAConfig.getPriority()- Parameters:
priority- An integer indicating the priority of a rule in the list. This parameter is required. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#priority ComputeSecurityPolicyRuleA#priority}- Returns:
this
-
securityPolicy
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder securityPolicy(String securityPolicy)
Sets the value ofComputeSecurityPolicyRuleAConfig.getSecurityPolicy()- Parameters:
securityPolicy- The name of the security policy this rule belongs to. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#security_policy ComputeSecurityPolicyRuleA#security_policy}- Returns:
this
-
description
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder description(String description)
Sets the value ofComputeSecurityPolicyRuleAConfig.getDescription()- Parameters:
description- An optional description of this resource. Provide this property when you create the resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#description ComputeSecurityPolicyRuleA#description}- Returns:
this
-
id
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder id(String id)
Sets the value ofComputeSecurityPolicyRuleAConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#id ComputeSecurityPolicyRuleA#id}. Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.- Returns:
this
-
match
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder match(ComputeSecurityPolicyRuleMatchA match)
Sets the value ofComputeSecurityPolicyRuleAConfig.getMatch()- Parameters:
match- match block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#match ComputeSecurityPolicyRuleA#match}- Returns:
this
-
preconfiguredWafConfig
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder preconfiguredWafConfig(ComputeSecurityPolicyRulePreconfiguredWafConfig preconfiguredWafConfig)
Sets the value ofComputeSecurityPolicyRuleAConfig.getPreconfiguredWafConfig()- Parameters:
preconfiguredWafConfig- preconfigured_waf_config block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#preconfigured_waf_config ComputeSecurityPolicyRuleA#preconfigured_waf_config}- Returns:
this
-
preview
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder preview(Boolean preview)
Sets the value ofComputeSecurityPolicyRuleAConfig.getPreview()- Parameters:
preview- If set to true, the specified action is not enforced. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#preview ComputeSecurityPolicyRuleA#preview}- Returns:
this
-
preview
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder preview(com.hashicorp.cdktf.IResolvable preview)
Sets the value ofComputeSecurityPolicyRuleAConfig.getPreview()- Parameters:
preview- If set to true, the specified action is not enforced. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#preview ComputeSecurityPolicyRuleA#preview}- Returns:
this
-
project
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder project(String project)
Sets the value ofComputeSecurityPolicyRuleAConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#project ComputeSecurityPolicyRuleA#project}.- Returns:
this
-
rateLimitOptions
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder rateLimitOptions(ComputeSecurityPolicyRuleRateLimitOptionsA rateLimitOptions)
Sets the value ofComputeSecurityPolicyRuleAConfig.getRateLimitOptions()- Parameters:
rateLimitOptions- rate_limit_options block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#rate_limit_options ComputeSecurityPolicyRuleA#rate_limit_options}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig.Builder timeouts(ComputeSecurityPolicyRuleTimeouts timeouts)
Sets the value ofComputeSecurityPolicyRuleAConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_security_policy_rule#timeouts ComputeSecurityPolicyRuleA#timeouts}- Returns:
this
-
connection
@Stability(Experimental) public ComputeSecurityPolicyRuleAConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public ComputeSecurityPolicyRuleAConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeSecurityPolicyRuleAConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeSecurityPolicyRuleAConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public ComputeSecurityPolicyRuleAConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public ComputeSecurityPolicyRuleAConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public ComputeSecurityPolicyRuleAConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public ComputeSecurityPolicyRuleAConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public ComputeSecurityPolicyRuleAConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeSecurityPolicyRuleAConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeSecurityPolicyRuleAConfig>- Returns:
- a new instance of
ComputeSecurityPolicyRuleAConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-