Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::Scheduling.
Sets the scheduling options for an Instance.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#automatic_restart
def automatic_restart() -> ::Boolean-
(::Boolean) — 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.
#automatic_restart=
def automatic_restart=(value) -> ::Boolean-
value (::Boolean) — 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.
-
(::Boolean) — 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.
#availability_domain
def availability_domain() -> ::Integer- (::Integer) — 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.
#availability_domain=
def availability_domain=(value) -> ::Integer- value (::Integer) — 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.
- (::Integer) — 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.
#host_error_timeout_seconds
def host_error_timeout_seconds() -> ::Integer- (::Integer) — Specify the time in seconds for host error detection, the value must be within the range of [90, 330] with the increment of 30, if unset, the default behavior of host error recovery will be used.
#host_error_timeout_seconds=
def host_error_timeout_seconds=(value) -> ::Integer- value (::Integer) — Specify the time in seconds for host error detection, the value must be within the range of [90, 330] with the increment of 30, if unset, the default behavior of host error recovery will be used.
- (::Integer) — Specify the time in seconds for host error detection, the value must be within the range of [90, 330] with the increment of 30, if unset, the default behavior of host error recovery will be used.
#instance_termination_action
def instance_termination_action() -> ::String- (::String) — Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.
#instance_termination_action=
def instance_termination_action=(value) -> ::String- value (::String) — Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.
- (::String) — Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.
#local_ssd_recovery_timeout
def local_ssd_recovery_timeout() -> ::Google::Cloud::Compute::V1::Duration- (::Google::Cloud::Compute::V1::Duration) — 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.
#local_ssd_recovery_timeout=
def local_ssd_recovery_timeout=(value) -> ::Google::Cloud::Compute::V1::Duration- value (::Google::Cloud::Compute::V1::Duration) — 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.
- (::Google::Cloud::Compute::V1::Duration) — 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.
#location_hint
def location_hint() -> ::String- (::String) — 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.
#location_hint=
def location_hint=(value) -> ::String- value (::String) — 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.
- (::String) — 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.
#max_run_duration
def max_run_duration() -> ::Google::Cloud::Compute::V1::Duration- (::Google::Cloud::Compute::V1::Duration) — 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.
#max_run_duration=
def max_run_duration=(value) -> ::Google::Cloud::Compute::V1::Duration- value (::Google::Cloud::Compute::V1::Duration) — 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.
- (::Google::Cloud::Compute::V1::Duration) — 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.
#min_node_cpus
def min_node_cpus() -> ::Integer- (::Integer) — The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
#min_node_cpus=
def min_node_cpus=(value) -> ::Integer- value (::Integer) — The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
- (::Integer) — The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
#node_affinities
def node_affinities() -> ::Array<::Google::Cloud::Compute::V1::SchedulingNodeAffinity>- (::Array<::Google::Cloud::Compute::V1::SchedulingNodeAffinity>) — A set of node affinity and anti-affinity configurations. Refer toConfiguring node affinity for more information. Overrides reservationAffinity.
#node_affinities=
def node_affinities=(value) -> ::Array<::Google::Cloud::Compute::V1::SchedulingNodeAffinity>- value (::Array<::Google::Cloud::Compute::V1::SchedulingNodeAffinity>) — A set of node affinity and anti-affinity configurations. Refer toConfiguring node affinity for more information. Overrides reservationAffinity.
- (::Array<::Google::Cloud::Compute::V1::SchedulingNodeAffinity>) — A set of node affinity and anti-affinity configurations. Refer toConfiguring node affinity for more information. Overrides reservationAffinity.
#on_host_maintenance
def on_host_maintenance() -> ::String- (::String) — Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. Forpreemptible 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.
#on_host_maintenance=
def on_host_maintenance=(value) -> ::String- value (::String) — Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. Forpreemptible 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.
- (::String) — Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. Forpreemptible 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.
#on_instance_stop_action
def on_instance_stop_action() -> ::Google::Cloud::Compute::V1::SchedulingOnInstanceStopAction#on_instance_stop_action=
def on_instance_stop_action=(value) -> ::Google::Cloud::Compute::V1::SchedulingOnInstanceStopAction#preemptible
def preemptible() -> ::Boolean-
(::Boolean) — Defines whether the instance is preemptible. This can only be set during
instance creation or while the instance isstopped and
therefore, in a
TERMINATEDstate. SeeInstance Life Cycle for more information on the possible instance states.
#preemptible=
def preemptible=(value) -> ::Boolean-
value (::Boolean) — Defines whether the instance is preemptible. This can only be set during
instance creation or while the instance isstopped and
therefore, in a
TERMINATEDstate. SeeInstance Life Cycle for more information on the possible instance states.
-
(::Boolean) — Defines whether the instance is preemptible. This can only be set during
instance creation or while the instance isstopped and
therefore, in a
TERMINATEDstate. SeeInstance Life Cycle for more information on the possible instance states.
#provisioning_model
def provisioning_model() -> ::String- (::String) — Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.
#provisioning_model=
def provisioning_model=(value) -> ::String- value (::String) — Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.
- (::String) — Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.
#skip_guest_os_shutdown
def skip_guest_os_shutdown() -> ::Boolean- (::Boolean) — Default is false and there will be 120 seconds between GCE ACPI G2 Soft Off and ACPI G3 Mechanical Off for Standard VMs and 30 seconds for Spot VMs.
#skip_guest_os_shutdown=
def skip_guest_os_shutdown=(value) -> ::Boolean- value (::Boolean) — Default is false and there will be 120 seconds between GCE ACPI G2 Soft Off and ACPI G3 Mechanical Off for Standard VMs and 30 seconds for Spot VMs.
- (::Boolean) — Default is false and there will be 120 seconds between GCE ACPI G2 Soft Off and ACPI G3 Mechanical Off for Standard VMs and 30 seconds for Spot VMs.
#termination_time
def termination_time() -> ::String- (::String) — Specifies the timestamp, when the instance will be terminated, inRFC3339 text format. If specified, the instance termination action will be performed at the termination time.
#termination_time=
def termination_time=(value) -> ::String- value (::String) — Specifies the timestamp, when the instance will be terminated, inRFC3339 text format. If specified, the instance termination action will be performed at the termination time.
- (::String) — Specifies the timestamp, when the instance will be terminated, inRFC3339 text format. If specified, the instance termination action will be performed at the termination time.