Class OrgPolicyCustomConstraintConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.org_policy_custom_constraint.OrgPolicyCustomConstraintConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<OrgPolicyCustomConstraintConfig>
- Enclosing interface:
- OrgPolicyCustomConstraintConfig
@Stability(Stable) public static final class OrgPolicyCustomConstraintConfig.Builder extends Object implements software.amazon.jsii.Builder<OrgPolicyCustomConstraintConfig>
A builder forOrgPolicyCustomConstraintConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
actionType
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder actionType(String actionType)
Sets the value ofOrgPolicyCustomConstraintConfig.getActionType()- Parameters:
actionType- The action to take if the condition is met. Possible values: ["ALLOW", "DENY"]. This parameter is required. 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}- Returns:
this
-
condition
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder condition(String condition)
Sets the value ofOrgPolicyCustomConstraintConfig.getCondition()- 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. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#condition OrgPolicyCustomConstraint#condition}- Returns:
this
-
methodTypes
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder methodTypes(List<String> methodTypes)
Sets the value ofOrgPolicyCustomConstraintConfig.getMethodTypes()- Parameters:
methodTypes- A list of RESTful methods for which to enforce the constraint. This parameter is required. 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}- Returns:
this
-
name
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder name(String name)
Sets the value ofOrgPolicyCustomConstraintConfig.getName()- Parameters:
name- Immutable. The name of the custom constraint. This is unique within the organization. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#name OrgPolicyCustomConstraint#name}- Returns:
this
-
parent
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder parent(String parent)
Sets the value ofOrgPolicyCustomConstraintConfig.getParent()- Parameters:
parent- The parent of the resource, an organization. Format should be 'organizations/{organization_id}'. This parameter is required. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/org_policy_custom_constraint#parent OrgPolicyCustomConstraint#parent}- Returns:
this
-
resourceTypes
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder resourceTypes(List<String> resourceTypes)
Sets the value ofOrgPolicyCustomConstraintConfig.getResourceTypes()- Parameters:
resourceTypes- Immutable. This parameter is required. 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}- Returns:
this
-
description
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder description(String description)
Sets the value ofOrgPolicyCustomConstraintConfig.getDescription()- Parameters:
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}- Returns:
this
-
displayName
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder displayName(String displayName)
Sets the value ofOrgPolicyCustomConstraintConfig.getDisplayName()- Parameters:
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}- Returns:
this
-
id
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder id(String id)
Sets the value ofOrgPolicyCustomConstraintConfig.getId()- 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}. 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
-
timeouts
@Stability(Stable) public OrgPolicyCustomConstraintConfig.Builder timeouts(OrgPolicyCustomConstraintTimeouts timeouts)
Sets the value ofOrgPolicyCustomConstraintConfig.getTimeouts()- Parameters:
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}- Returns:
this
-
connection
@Stability(Experimental) public OrgPolicyCustomConstraintConfig.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 OrgPolicyCustomConstraintConfig.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 OrgPolicyCustomConstraintConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public OrgPolicyCustomConstraintConfig.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 OrgPolicyCustomConstraintConfig.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 OrgPolicyCustomConstraintConfig.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 OrgPolicyCustomConstraintConfig.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 OrgPolicyCustomConstraintConfig.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 OrgPolicyCustomConstraintConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public OrgPolicyCustomConstraintConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<OrgPolicyCustomConstraintConfig>- Returns:
- a new instance of
OrgPolicyCustomConstraintConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-