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, specifically for the .NET environment.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version documented is 2.7.0, with versions ranging back to 1.0.0 also included and accessible.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCustomConstraint.Types.MethodType\u003c/code\u003e enum is used to specify when a constraint should be applied, such as during resource creation, deletion, or updating.\u003c/p\u003e\n"],["\u003cp\u003eThe available fields for \u003ccode\u003eCustomConstraint.Types.MethodType\u003c/code\u003e are \u003ccode\u003eCreate\u003c/code\u003e, \u003ccode\u003eDelete\u003c/code\u003e, \u003ccode\u003eUnspecified\u003c/code\u003e, and \u003ccode\u003eUpdate\u003c/code\u003e, each defining a specific operational context for constraint enforcement.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation clarifies that using only the \u003ccode\u003eUPDATE\u003c/code\u003e option for custom constraints is not supported, and \u003ccode\u003eCREATE\u003c/code\u003e or \u003ccode\u003eCREATE, UPDATE\u003c/code\u003e should be used instead.\u003c/p\u003e\n"]]],[],null,[]]