Class Scheduling (1.12.0)

Scheduling(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Attributes

NameDescription
automatic_restart bool
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 true so an instance is automatically restarted if it is terminated by Compute Engine. This field is a member of oneof_ _automatic_restart.
instance_termination_action str
Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values. This field is a member of oneof_ _instance_termination_action.
location_hint str
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. This field is a member of oneof_ _location_hint.
min_node_cpus int
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. This field is a member of oneof_ _min_node_cpus.
node_affinities MutableSequence[google.cloud.compute_v1.types.SchedulingNodeAffinity]
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
on_host_maintenance str
Defines the maintenance behavior for this instance. 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. Check the OnHostMaintenance enum for the list of possible values. This field is a member of oneof_ _on_host_maintenance.
preemptible bool
Defines whether the instance is preemptible. This can only be set during instance creation or while the instance is stopped and therefore, in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. This field is a member of oneof_ _preemptible.
provisioning_model str
Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values. This field is a member of oneof_ _provisioning_model.

Classes

InstanceTerminationAction

InstanceTerminationAction(value)

Specifies the termination action for the instance.

Values: UNDEFINED_INSTANCE_TERMINATION_ACTION (0): A value indicating that the enum field is not set. DELETE (402225579): Delete the VM. INSTANCE_TERMINATION_ACTION_UNSPECIFIED (92954803): Default value. This value is unused. STOP (2555906): Stop the VM without storing in-memory content. default action.

OnHostMaintenance

OnHostMaintenance(value)

Defines the maintenance behavior for this instance. 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.

Values: UNDEFINED_ON_HOST_MAINTENANCE (0): A value indicating that the enum field is not set. MIGRATE (165699979): [Default] Allows Compute Engine to automatically migrate instances out of the way of maintenance events. TERMINATE (527617601): 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 automaticRestart flag to true. Your instance may be restarted more than once, and it may be restarted outside the window of maintenance events.

ProvisioningModel

ProvisioningModel(value)

Specifies the provisioning model of the instance.

Values: UNDEFINED_PROVISIONING_MODEL (0): A value indicating that the enum field is not set. SPOT (2552066): Heavily discounted, no guaranteed runtime. STANDARD (484642493): Standard provisioning with user controlled runtime, no discounts.