Reference documentation and code samples for the Policy Simulator V1 API module Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType.
The operation for which this constraint will be applied. To apply this
constraint only when creating new resources, the method_types should be
CREATE only. To apply this constraint when creating or deleting
resources, the method_types should be CREATE and DELETE.
UPDATE only custom constraints are not supported. Use CREATE or
CREATE, UPDATE.
Constants
METHOD_TYPE_UNSPECIFIED
value: 0 This is only used for distinguishing unset values and should never be
used. Results in an error.
CREATE
value: 1 Constraint applied when creating the resource.
UPDATE
value: 2 Constraint applied when updating the resource.
DELETE
value: 3 Constraint applied when deleting the resource.
Not currently supported.
REMOVE_GRANT
value: 4 Constraint applied when removing an IAM grant.
GOVERN_TAGS
value: 5 Constraint applied when enforcing forced tagging.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[],[],null,["# Policy Simulator V1 API - Module Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType (v1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/ruby/docs/reference/google-cloud-policy_simulator-v1/latest/Google-Cloud-OrgPolicy-V2-CustomConstraint-MethodType)\n- [1.3.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.3.0/Google-Cloud-OrgPolicy-V2-CustomConstraint-MethodType)\n- [1.2.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.2.1/Google-Cloud-OrgPolicy-V2-CustomConstraint-MethodType)\n- [1.1.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.1.0/Google-Cloud-OrgPolicy-V2-CustomConstraint-MethodType)\n- [1.0.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/1.0.1/Google-Cloud-OrgPolicy-V2-CustomConstraint-MethodType)\n- [0.4.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.4.0/Google-Cloud-OrgPolicy-V2-CustomConstraint-MethodType)\n- [0.3.2](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.3.2/Google-Cloud-OrgPolicy-V2-CustomConstraint-MethodType)\n- [0.2.0](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.2.0/Google-Cloud-OrgPolicy-V2-CustomConstraint-MethodType)\n- [0.1.1](/ruby/docs/reference/google-cloud-policy_simulator-v1/0.1.1/Google-Cloud-OrgPolicy-V2-CustomConstraint-MethodType) \nReference documentation and code samples for the Policy Simulator V1 API module Google::Cloud::OrgPolicy::V2::CustomConstraint::MethodType.\n\nThe operation for which this constraint will be applied. To apply this\nconstraint only when creating new resources, the `method_types` should be\n`CREATE` only. To apply this constraint when creating or deleting\nresources, the `method_types` should be `CREATE` and `DELETE`.\n\n\n\u003cbr /\u003e\n\n`UPDATE` only custom constraints are not supported. Use `CREATE` or\n`CREATE, UPDATE`.\n\nConstants\n---------\n\n### METHOD_TYPE_UNSPECIFIED\n\n**value:** 0 \nThis is only used for distinguishing unset values and should never be\nused. Results in an error.\n\n### CREATE\n\n**value:** 1 \nConstraint applied when creating the resource.\n\n### UPDATE\n\n**value:** 2 \nConstraint applied when updating the resource.\n\n### DELETE\n\n**value:** 3 \nConstraint applied when deleting the resource.\nNot currently supported.\n\n### REMOVE_GRANT\n\n**value:** 4 \nConstraint applied when removing an IAM grant.\n\n### GOVERN_TAGS\n\n**value:** 5 \nConstraint applied when enforcing forced tagging."]]