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\u003eThis webpage provides documentation for the \u003ccode\u003eNodeGroup.Types.MaintenancePolicy\u003c/code\u003e enum within the Google Cloud Compute Engine v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation available is 3.6.0, with historical versions ranging down to 1.0.0 also provided.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eMaintenancePolicy\u003c/code\u003e enum specifies how instances should be handled during node maintenance, offering options like \u003ccode\u003eDEFAULT\u003c/code\u003e, \u003ccode\u003eRESTART_IN_PLACE\u003c/code\u003e, and \u003ccode\u003eMIGRATE_WITHIN_NODE_GROUP\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe enum also includes fields for \u003ccode\u003eUndefinedMaintenancePolicy\u003c/code\u003e, indicating when the field is unset, and \u003ccode\u003eUnspecified\u003c/code\u003e which is also a field.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation details the behavior of instances during maintenance, such as live migration or termination and restart, depending on the chosen policy.\u003c/p\u003e\n"]]],[],null,["# Compute Engine v1 API - Enum NodeGroup.Types.MaintenancePolicy (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.12.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.11.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.10.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.9.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.8.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.7.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.6.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.5.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.4.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.3.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.2.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.1.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/3.0.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.17.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.17.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.16.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.16.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.15.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.14.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.13.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.12.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.11.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.10.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.9.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.8.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.7.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.6.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.5.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.4.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.3.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.2.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.1.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/2.0.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.4.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.3.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.2.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.1.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Compute.V1/1.0.0/Google.Cloud.Compute.V1.NodeGroup.Types.MaintenancePolicy) \n\n public enum NodeGroup.Types.MaintenancePolicy\n\nReference documentation and code samples for the Compute Engine v1 API enum NodeGroup.Types.MaintenancePolicy.\n\nSpecifies 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.\n\nNamespace\n---------\n\n[Google.Cloud.Compute.V1](/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Compute.V1.dll"]]