Class ComputeFirewallPolicyRuleConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_firewall_policy_rule.ComputeFirewallPolicyRuleConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeFirewallPolicyRuleConfig>
- Enclosing interface:
- ComputeFirewallPolicyRuleConfig
@Stability(Stable) public static final class ComputeFirewallPolicyRuleConfig.Builder extends Object implements software.amazon.jsii.Builder<ComputeFirewallPolicyRuleConfig>
A builder forComputeFirewallPolicyRuleConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
action
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder action(String action)
Sets the value ofComputeFirewallPolicyRuleConfig.getAction()- Parameters:
action- The Action to perform when the client connection triggers the rule. Valid actions are "allow", "deny", "goto_next" and "apply_security_profile_group". This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#action ComputeFirewallPolicyRule#action}- Returns:
this
-
direction
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder direction(String direction)
Sets the value ofComputeFirewallPolicyRuleConfig.getDirection()- Parameters:
direction- The direction in which this rule applies. Possible values: INGRESS, EGRESS. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#direction ComputeFirewallPolicyRule#direction}- Returns:
this
-
firewallPolicy
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder firewallPolicy(String firewallPolicy)
Sets the value ofComputeFirewallPolicyRuleConfig.getFirewallPolicy()- Parameters:
firewallPolicy- The firewall policy of the resource. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#firewall_policy ComputeFirewallPolicyRule#firewall_policy}- Returns:
this
-
match
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder match(ComputeFirewallPolicyRuleMatch match)
Sets the value ofComputeFirewallPolicyRuleConfig.getMatch()- Parameters:
match- match block. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#match ComputeFirewallPolicyRule#match}- Returns:
this
-
priority
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder priority(Number priority)
Sets the value ofComputeFirewallPolicyRuleConfig.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 prority. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#priority ComputeFirewallPolicyRule#priority}- Returns:
this
-
description
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder description(String description)
Sets the value ofComputeFirewallPolicyRuleConfig.getDescription()- Parameters:
description- An optional description for this resource. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#description ComputeFirewallPolicyRule#description}- Returns:
this
-
disabled
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder disabled(Boolean disabled)
Sets the value ofComputeFirewallPolicyRuleConfig.getDisabled()- Parameters:
disabled- Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#disabled ComputeFirewallPolicyRule#disabled}- Returns:
this
-
disabled
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder disabled(com.hashicorp.cdktf.IResolvable disabled)
Sets the value ofComputeFirewallPolicyRuleConfig.getDisabled()- Parameters:
disabled- Denotes whether the firewall policy rule is disabled. When set to true, the firewall policy rule is not enforced and traffic behaves as if it did not exist. If this is unspecified, the firewall policy rule will be enabled. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#disabled ComputeFirewallPolicyRule#disabled}- Returns:
this
-
enableLogging
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder enableLogging(Boolean enableLogging)
Sets the value ofComputeFirewallPolicyRuleConfig.getEnableLogging()- Parameters:
enableLogging- Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#enable_logging ComputeFirewallPolicyRule#enable_logging}- Returns:
this
-
enableLogging
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder enableLogging(com.hashicorp.cdktf.IResolvable enableLogging)
Sets the value ofComputeFirewallPolicyRuleConfig.getEnableLogging()- Parameters:
enableLogging- Denotes whether to enable logging for a particular rule. If logging is enabled, logs will be exported to the configured export destination in Stackdriver. Logs may be exported to BigQuery or Pub/Sub. Note: you cannot enable logging on "goto_next" rules. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#enable_logging ComputeFirewallPolicyRule#enable_logging}- Returns:
this
-
id
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder id(String id)
Sets the value ofComputeFirewallPolicyRuleConfig.getId()- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#id ComputeFirewallPolicyRule#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
-
securityProfileGroup
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder securityProfileGroup(String securityProfileGroup)
Sets the value ofComputeFirewallPolicyRuleConfig.getSecurityProfileGroup()- Parameters:
securityProfileGroup- A fully-qualified URL of a SecurityProfileGroup resource. Example: https://networksecurity.googleapis.com/v1/organizations/{organizationId}/locations/global/securityProfileGroups/my-security-profile-group. It must be specified if action = 'apply_security_profile_group' and cannot be specified for other actions. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#security_profile_group ComputeFirewallPolicyRule#security_profile_group}- Returns:
this
-
targetResources
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder targetResources(List<String> targetResources)
Sets the value ofComputeFirewallPolicyRuleConfig.getTargetResources()- Parameters:
targetResources- A list of network resource URLs to which this rule applies. This field allows you to control which network's VMs get this rule. If this field is left blank, all VMs within the organization will receive the rule. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#target_resources ComputeFirewallPolicyRule#target_resources}- Returns:
this
-
targetServiceAccounts
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder targetServiceAccounts(List<String> targetServiceAccounts)
Sets the value ofComputeFirewallPolicyRuleConfig.getTargetServiceAccounts()- Parameters:
targetServiceAccounts- A list of service accounts indicating the sets of instances that are applied with this rule. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#target_service_accounts ComputeFirewallPolicyRule#target_service_accounts}- Returns:
this
-
timeouts
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder timeouts(ComputeFirewallPolicyRuleTimeouts timeouts)
Sets the value ofComputeFirewallPolicyRuleConfig.getTimeouts()- Parameters:
timeouts- timeouts block. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#timeouts ComputeFirewallPolicyRule#timeouts}- Returns:
this
-
tlsInspect
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder tlsInspect(Boolean tlsInspect)
Sets the value ofComputeFirewallPolicyRuleConfig.getTlsInspect()- Parameters:
tlsInspect- Boolean flag indicating if the traffic should be TLS decrypted. It can be set only if action = 'apply_security_profile_group' and cannot be set for other actions. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#tls_inspect ComputeFirewallPolicyRule#tls_inspect}- Returns:
this
-
tlsInspect
@Stability(Stable) public ComputeFirewallPolicyRuleConfig.Builder tlsInspect(com.hashicorp.cdktf.IResolvable tlsInspect)
Sets the value ofComputeFirewallPolicyRuleConfig.getTlsInspect()- Parameters:
tlsInspect- Boolean flag indicating if the traffic should be TLS decrypted. It can be set only if action = 'apply_security_profile_group' and cannot be set for other actions. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_firewall_policy_rule#tls_inspect ComputeFirewallPolicyRule#tls_inspect}- Returns:
this
-
connection
@Stability(Experimental) public ComputeFirewallPolicyRuleConfig.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 ComputeFirewallPolicyRuleConfig.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 ComputeFirewallPolicyRuleConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public ComputeFirewallPolicyRuleConfig.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 ComputeFirewallPolicyRuleConfig.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 ComputeFirewallPolicyRuleConfig.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 ComputeFirewallPolicyRuleConfig.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 ComputeFirewallPolicyRuleConfig.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 ComputeFirewallPolicyRuleConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public ComputeFirewallPolicyRuleConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeFirewallPolicyRuleConfig>- Returns:
- a new instance of
ComputeFirewallPolicyRuleConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-