- JSON representation
- OnInstanceStopAction
- OnHostMaintenance
- NodeAffinity
- Operator
- ProvisioningModel
- InstanceTerminationAction
Sets the scheduling options for an Instance.
JSON representation |
---|
{ "onHostMaintenance": enum ( |
Fields | |
---|---|
on |
Defines the maintenance behavior for this instance. For standard instances, the default behavior is
. For preemptible instances, the default and only possible behavior is
. For more information, see Set VM host maintenance policy. |
automatic |
Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. By default, this is set to
so an instance is automatically restarted if it is terminated by Compute Engine. |
preemptible |
Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a |
node |
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity. |
min |
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. |
location |
An opaque location hint used to place the instance close to other resources. This field is for use by internal tools that use the public API. |
availability |
Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance. |
provisioning |
Specifies the provisioning model of the instance. |
instance |
Specifies the termination action for the instance. |
local |
Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour. |
Union field
|
|
max |
Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration. |
termination |
Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time. |
Union field on_instance_termination_action . Defines the behaviour for instances with the instance_termination_actions. At the end of the run duration or termination time, the instance will be terminated according to the properties defined in the action. There can be only one termination action specified for an instance. on_instance_termination_action can be only one of the following: |
|
on |
|
OnInstanceStopAction
Defines the behaviour for instances with the instanceTerminationAction
STOP
.
JSON representation |
---|
{ "discardLocalSsd": boolean } |
Fields | |
---|---|
discard |
If true, the contents of any attached Local SSD disks will be discarded else, the Local SSD data will be preserved when the instance is stopped at the end of the run duration/termination time. |
OnHostMaintenance
Defines the maintenance behavior for this instance, either
TERMINATE
or
MIGRATE
. For standard instances, the default behavior is
MIGRATE
. For preemptible instances, the default, and only possible behavior, is
TERMINATE
. For more information, see Set VM host maintenance policy.
Enums | |
---|---|
TERMINATE |
Tells Compute Engine to terminate and (optionally) restart the instance away from the maintenance activity. If you would like your instance to be restarted, set the
flag to true. Your instance may be restarted more than once, and it may be restarted outside the window of maintenance events. |
MIGRATE |
[Default] Allows Compute Engine to automatically migrate instances out of the way of maintenance events. |
NodeAffinity
Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.
JSON representation |
---|
{
"key": string,
"operator": enum ( |
Fields | |
---|---|
key |
Corresponds to the label key of Node resource. |
operator |
Defines the operation of node selection. Valid operators are
for affinity and
for anti-affinity. |
values[] |
Corresponds to the label values of Node resource. |
Operator
Defines the type of node selections.
Enums | |
---|---|
OPERATOR_UNSPECIFIED |
|
IN |
Requires Compute Engine to seek for matched nodes. |
NOT_IN |
Requires Compute Engine to avoid certain nodes. |
ProvisioningModel
Defines the provisioning model for an instance.
Enums | |
---|---|
STANDARD |
Standard provisioning with user controlled runtime, no discounts. |
SPOT |
Heavily discounted, no guaranteed runtime. |
InstanceTerminationAction
Defines the supported termination actions for an instance.
Enums | |
---|---|
INSTANCE_TERMINATION_ACTION_UNSPECIFIED |
Default value. This value is unused. |
DELETE |
Delete the VM. |
STOP |
Stop the VM without storing in-memory content. default action. |