Reference documentation and code samples for the Compute Engine v1 API enum NodeGroup.Types.MaintenancePolicy.
Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies.
Allow the node and corresponding instances to retain default maintenance behavior.
MigrateWithinNodeGroup
When maintenance must be done on a node, the instances on that node will be moved to other nodes in the group. Instances with onHostMaintenance = MIGRATE will live migrate to their destinations while instances with onHostMaintenance = TERMINATE will terminate and then restart on their destination nodes if automaticRestart = true.
RestartInPlace
Instances in this group will restart on the same node when maintenance has completed. Instances must have onHostMaintenance = TERMINATE, and they will only restart if automaticRestart = true.
UndefinedMaintenancePolicy
A value indicating that the enum field is not set.
[[["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-08 UTC."],[[["\u003cp\u003eThe webpage provides documentation for the \u003ccode\u003eMaintenancePolicy\u003c/code\u003e enum within the Google Cloud Compute Engine v1 API, specifically for NodeGroups.\u003c/p\u003e\n"],["\u003cp\u003eThe latest documented version is 3.6.0, and the content also lists links to versions dating back to 1.0.0 for \u003ccode\u003eNodeGroup.Types.MaintenancePolicy\u003c/code\u003e documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMaintenancePolicy\u003c/code\u003e enum has four defined fields: \u003ccode\u003eDefault\u003c/code\u003e, \u003ccode\u003eMigrateWithinNodeGroup\u003c/code\u003e, \u003ccode\u003eRestartInPlace\u003c/code\u003e, \u003ccode\u003eUndefinedMaintenancePolicy\u003c/code\u003e and \u003ccode\u003eUnspecified\u003c/code\u003e, each with a specific behavior regarding node maintenance.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMigrateWithinNodeGroup\u003c/code\u003e policy allows instances to live migrate or terminate and restart on other nodes in the group during maintenance.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRestartInPlace\u003c/code\u003e policy specifies that instances will restart on the same node once maintenance is done, requiring \u003ccode\u003eonHostMaintenance\u003c/code\u003e to be set to terminate, and \u003ccode\u003eautomaticRestart\u003c/code\u003e set to true.\u003c/p\u003e\n"]]],[],null,[]]