Reference documentation and code samples for the Compute V1 Client class Scheduling.
Sets the scheduling options for an Instance.
Generated from protobuf message google.cloud.compute.v1.Scheduling
Namespace
Google \ Cloud \ Compute \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ 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.
↳ availability_domain
int
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.
↳ instance_termination_action
string
Specifies the termination action for the instance. Check the InstanceTerminationAction enum for the list of possible values.
↳ local_ssd_recovery_timeout
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
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
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
int
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
↳ node_affinities
array< SchedulingNodeAffinity
>
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
↳ on_host_maintenance
string
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.
↳ on_instance_stop_action
↳ 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.
↳ provisioning_model
string
Specifies the provisioning model of the instance. Check the ProvisioningModel enum for the list of possible values.
↳ termination_time
string
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.
getAutomaticRestart
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.
bool
hasAutomaticRestart
clearAutomaticRestart
setAutomaticRestart
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.
var
bool
$this
getAvailabilityDomain
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.
int
hasAvailabilityDomain
clearAvailabilityDomain
setAvailabilityDomain
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.
var
int
$this
getInstanceTerminationAction
Specifies the termination action for the instance.
Check the InstanceTerminationAction enum for the list of possible values.
string
hasInstanceTerminationAction
clearInstanceTerminationAction
setInstanceTerminationAction
Specifies the termination action for the instance.
Check the InstanceTerminationAction enum for the list of possible values.
var
string
$this
getLocalSsdRecoveryTimeout
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.
hasLocalSsdRecoveryTimeout
clearLocalSsdRecoveryTimeout
setLocalSsdRecoveryTimeout
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.
$this
getLocationHint
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
hasLocationHint
clearLocationHint
setLocationHint
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.
var
string
$this
getMaxRunDuration
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.
hasMaxRunDuration
clearMaxRunDuration
setMaxRunDuration
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.
$this
getMinNodeCpus
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
int
hasMinNodeCpus
clearMinNodeCpus
setMinNodeCpus
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.
var
int
$this
getNodeAffinities
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
setNodeAffinities
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.
$this
getOnHostMaintenance
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.
string
hasOnHostMaintenance
clearOnHostMaintenance
setOnHostMaintenance
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.
var
string
$this
getOnInstanceStopAction
Generated from protobuf field optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;
hasOnInstanceStopAction
clearOnInstanceStopAction
setOnInstanceStopAction
Generated from protobuf field optional .google.cloud.compute.v1.SchedulingOnInstanceStopAction on_instance_stop_action = 529876681;
$this
getPreemptible
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.
bool
hasPreemptible
clearPreemptible
setPreemptible
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.
var
bool
$this
getProvisioningModel
Specifies the provisioning model of the instance.
Check the ProvisioningModel enum for the list of possible values.
string
hasProvisioningModel
clearProvisioningModel
setProvisioningModel
Specifies the provisioning model of the instance.
Check the ProvisioningModel enum for the list of possible values.
var
string
$this
getTerminationTime
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.
string
hasTerminationTime
clearTerminationTime
setTerminationTime
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.
var
string
$this