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.
Enums
Name
Description
UNDEFINED_MAINTENANCE_POLICY
A value indicating that the enum field is not set.
DEFAULT
Allow the node and corresponding instances to retain default maintenance behavior.
MAINTENANCE_POLICY_UNSPECIFIED
No description available.
MIGRATE_WITHIN_NODE_GROUP
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.
RESTART_IN_PLACE
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.
[[["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-28 UTC."],[],[],null,["# Class MaintenancePolicy (0.1.5)\n\nVersion latestkeyboard_arrow_down\n\n- [0.1.5 (latest)](/python/docs/reference/google-cloud-compute-v1beta/latest/google.cloud.compute_v1beta.types.NodeGroup.MaintenancePolicy)\n- [0.1.4](/python/docs/reference/google-cloud-compute-v1beta/0.1.4/google.cloud.compute_v1beta.types.NodeGroup.MaintenancePolicy) \n\n MaintenancePolicy(value)\n\nSpecifies how to handle instances when a node in the group undergoes\nmaintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or\nMIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more\ninformation, see Maintenance policies."]]