Class OrgPolicyCustomConstraint.Builder

    • Method Detail

      • 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​(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
      • 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