Class OrgPolicyCustomConstraint.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.org_policy_custom_constraint.OrgPolicyCustomConstraint.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<OrgPolicyCustomConstraint>
- Enclosing class:
- OrgPolicyCustomConstraint
@Stability(Stable) public static final class OrgPolicyCustomConstraint.Builder extends Object implements software.amazon.jsii.Builder<OrgPolicyCustomConstraint>
A fluent builder forOrgPolicyCustomConstraint.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OrgPolicyCustomConstraint.BuilderactionType(String actionType)The action to take if the condition is met.OrgPolicyCustomConstraintbuild()OrgPolicyCustomConstraint.Buildercondition(String condition)A CEL condition that refers to a supported service resource, for example 'resource.management.autoUpgrade == false'.OrgPolicyCustomConstraint.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)OrgPolicyCustomConstraint.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)OrgPolicyCustomConstraint.Buildercount(com.hashicorp.cdktf.TerraformCount count)OrgPolicyCustomConstraint.Buildercount(Number count)static OrgPolicyCustomConstraint.Buildercreate(software.constructs.Construct scope, String id)OrgPolicyCustomConstraint.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)OrgPolicyCustomConstraint.Builderdescription(String description)A human-friendly description of the constraint to display as an error message when the policy is violated.OrgPolicyCustomConstraint.BuilderdisplayName(String displayName)A human-friendly name for the constraint.OrgPolicyCustomConstraint.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)OrgPolicyCustomConstraint.Builderid(String id)Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#id OrgPolicyCustomConstraint#id}.OrgPolicyCustomConstraint.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)OrgPolicyCustomConstraint.BuildermethodTypes(List<String> methodTypes)A list of RESTful methods for which to enforce the constraint.OrgPolicyCustomConstraint.Buildername(String name)Immutable.OrgPolicyCustomConstraint.Builderparent(String parent)The parent of the resource, an organization.OrgPolicyCustomConstraint.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)OrgPolicyCustomConstraint.Builderprovisioners(List<? extends Object> provisioners)OrgPolicyCustomConstraint.BuilderresourceTypes(List<String> resourceTypes)Immutable.OrgPolicyCustomConstraint.Buildertimeouts(OrgPolicyCustomConstraintTimeouts timeouts)timeouts block.
-
-
-
Method Detail
-
create
@Stability(Stable) public static OrgPolicyCustomConstraint.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope- The scope in which to define this construct. This parameter is required.id- The scoped construct ID. This parameter is required.- Returns:
- a new instance of
OrgPolicyCustomConstraint.Builder.
-
connection
@Stability(Experimental) public OrgPolicyCustomConstraint.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
connection
@Stability(Experimental) public OrgPolicyCustomConstraint.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public OrgPolicyCustomConstraint.Builder count(Number count)
- Parameters:
count- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public OrgPolicyCustomConstraint.Builder count(com.hashicorp.cdktf.TerraformCount count)
- Parameters:
count- This parameter is required.- Returns:
this
-
dependsOn
@Stability(Experimental) public OrgPolicyCustomConstraint.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
- Parameters:
dependsOn- This parameter is required.- Returns:
this
-
forEach
@Stability(Experimental) public OrgPolicyCustomConstraint.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
- Parameters:
forEach- This parameter is required.- Returns:
this
-
lifecycle
@Stability(Experimental) public OrgPolicyCustomConstraint.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
- Parameters:
lifecycle- This parameter is required.- Returns:
this
-
provider
@Stability(Experimental) public OrgPolicyCustomConstraint.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
- Parameters:
provider- This parameter is required.- Returns:
this
-
provisioners
@Stability(Experimental) public OrgPolicyCustomConstraint.Builder provisioners(List<? extends Object> provisioners)
- Parameters:
provisioners- This parameter is required.- Returns:
this
-
actionType
@Stability(Stable) public OrgPolicyCustomConstraint.Builder actionType(String actionType)
The action to take if the condition is met. Possible values: ["ALLOW", "DENY"].Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#action_type OrgPolicyCustomConstraint#action_type}
- Parameters:
actionType- The action to take if the condition is met. Possible values: ["ALLOW", "DENY"]. This parameter is required.- Returns:
this
-
condition
@Stability(Stable) public OrgPolicyCustomConstraint.Builder condition(String condition)
A CEL condition that refers to a supported service resource, for example 'resource.management.autoUpgrade == false'. For details about CEL usage, see Common Expression Language.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#condition OrgPolicyCustomConstraint#condition}
- Parameters:
condition- A CEL condition that refers to a supported service resource, for example 'resource.management.autoUpgrade == false'. For details about CEL usage, see Common Expression Language. This parameter is required.- Returns:
this
-
methodTypes
@Stability(Stable) public OrgPolicyCustomConstraint.Builder methodTypes(List<String> methodTypes)
A list of RESTful methods for which to enforce the constraint.Can be 'CREATE', 'UPDATE', or both. Not all Google Cloud services support both methods. To see supported methods for each service, find the service in [Supported services](https://cloud.google.com/resource-manager/docs/organization-policy/custom-constraint-supported-services). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#method_types OrgPolicyCustomConstraint#method_types}
- Parameters:
methodTypes- A list of RESTful methods for which to enforce the constraint. This parameter is required.- Returns:
this
-
name
@Stability(Stable) public OrgPolicyCustomConstraint.Builder name(String name)
Immutable. The name of the custom constraint. This is unique within the organization.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#name OrgPolicyCustomConstraint#name}
- Parameters:
name- Immutable. The name of the custom constraint. This is unique within the organization. This parameter is required.- Returns:
this
-
parent
@Stability(Stable) public OrgPolicyCustomConstraint.Builder parent(String parent)
The parent of the resource, an organization. Format should be 'organizations/{organization_id}'.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#parent OrgPolicyCustomConstraint#parent}
- Parameters:
parent- The parent of the resource, an organization. Format should be 'organizations/{organization_id}'. This parameter is required.- Returns:
this
-
resourceTypes
@Stability(Stable) public OrgPolicyCustomConstraint.Builder resourceTypes(List<String> resourceTypes)
Immutable.The fully qualified name of the Google Cloud REST resource containing the object and field you want to restrict. For example, 'container.googleapis.com/NodePool'. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#resource_types OrgPolicyCustomConstraint#resource_types}
- Parameters:
resourceTypes- Immutable. This parameter is required.- Returns:
this
-
description
@Stability(Stable) public OrgPolicyCustomConstraint.Builder description(String description)
A human-friendly description of the constraint to display as an error message when the policy is violated.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#description OrgPolicyCustomConstraint#description}
- Parameters:
description- A human-friendly description of the constraint to display as an error message when the policy is violated. This parameter is required.- Returns:
this
-
displayName
@Stability(Stable) public OrgPolicyCustomConstraint.Builder displayName(String displayName)
A human-friendly name for the constraint.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#display_name OrgPolicyCustomConstraint#display_name}
- Parameters:
displayName- A human-friendly name for the constraint. This parameter is required.- Returns:
this
-
id
@Stability(Stable) public OrgPolicyCustomConstraint.Builder id(String id)
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#id OrgPolicyCustomConstraint#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.
- Parameters:
id- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#id OrgPolicyCustomConstraint#id}. This parameter is required.- Returns:
this
-
timeouts
@Stability(Stable) public OrgPolicyCustomConstraint.Builder timeouts(OrgPolicyCustomConstraintTimeouts timeouts)
timeouts block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#timeouts OrgPolicyCustomConstraint#timeouts}
- Parameters:
timeouts- timeouts block. This parameter is required.- Returns:
this
-
build
@Stability(Stable) public OrgPolicyCustomConstraint build()
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<OrgPolicyCustomConstraint>- Returns:
- a newly built instance of
OrgPolicyCustomConstraint.
-
-