Reference documentation and code samples for the Organization Policy v2 API enum CustomConstraint.Types.MethodType.
The operation for which this constraint will be applied. To apply this
constraint only when creating new VMs, the method_types should be
CREATE only. To apply this constraint when creating or deleting
VMs, the method_types should be CREATE and DELETE.
UPDATE only custom constraints are not supported. Use CREATE or
CREATE, UPDATE.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eCustomConstraint.Types.MethodType\u003c/code\u003e enum within the Organization Policy v2 API.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this documentation is version 2.7.0, with historical versions dating back to 1.0.0 also accessible.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMethodType\u003c/code\u003e enum specifies when a constraint is applied, such as during resource creation, deletion, or updates.\u003c/p\u003e\n"],["\u003cp\u003eValid \u003ccode\u003eMethodType\u003c/code\u003e options include \u003ccode\u003eCREATE\u003c/code\u003e, \u003ccode\u003eDELETE\u003c/code\u003e, \u003ccode\u003eUPDATE\u003c/code\u003e, and \u003ccode\u003eUNSPECIFIED\u003c/code\u003e, each with specific application behaviors and one that will return an error.\u003c/p\u003e\n"],["\u003cp\u003eIt is important to know that only \u003ccode\u003eCREATE\u003c/code\u003e or \u003ccode\u003eCREATE\u003c/code\u003e and \u003ccode\u003eUPDATE\u003c/code\u003e custom constraints are supported as of now.\u003c/p\u003e\n"]]],[],null,[]]