Class OrgPolicyCustomConstraintConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • actionType

        @Stability(Stable)
        public OrgPolicyCustomConstraintConfig.Builder actionType​(String actionType)
        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)
        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)
        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)
        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)
        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)
        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)
        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
      • id

        @Stability(Stable)
        public OrgPolicyCustomConstraintConfig.Builder id​(String id)
        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
      • connection

        @Stability(Experimental)
        public OrgPolicyCustomConstraintConfig.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Sets the value of TerraformMetaArguments.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 of TerraformMetaArguments.getConnection()
        Parameters:
        connection - the value to be set.
        Returns:
        this
      • count

        @Stability(Experimental)
        public OrgPolicyCustomConstraintConfig.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Sets the value of TerraformMetaArguments.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 of TerraformMetaArguments.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 of TerraformMetaArguments.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 of TerraformMetaArguments.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 of TerraformMetaArguments.getProvider()
        Parameters:
        provider - the value to be set.
        Returns:
        this
      • provisioners

        @Stability(Experimental)
        public OrgPolicyCustomConstraintConfig.Builder provisioners​(List<? extends Object> provisioners)
        Sets the value of TerraformMetaArguments.getProvisioners()
        Parameters:
        provisioners - the value to be set.
        Returns:
        this