target.apidocs.com.google.api.services.compute.model.Scheduling.html Maven / Gradle / Ivy
The newest version!
Scheduling (Compute Engine API v1-rev20250320-2.0.0)
com.google.api.services.compute.model
Class Scheduling
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.Scheduling
-
public final class Scheduling
extends com.google.api.client.json.GenericJson
Sets the scheduling options for an Instance.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Scheduling()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Scheduling
clone()
Boolean
getAutomaticRestart()
Specifies whether the instance should be automatically restarted if it is terminated by Compute
Engine (not terminated by a user).
Integer
getAvailabilityDomain()
Specifies the availability domain to place the instance in.
Integer
getHostErrorTimeoutSeconds()
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.
String
getInstanceTerminationAction()
Specifies the termination action for the instance.
Duration
getLocalSsdRecoveryTimeout()
Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd
state is attempted.
String
getLocationHint()
An opaque location hint used to place the instance close to other resources.
Duration
getMaxRunDuration()
Specifies the max run duration for the given instance.
Integer
getMinNodeCpus()
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant
node.
List<SchedulingNodeAffinity>
getNodeAffinities()
A set of node affinity and anti-affinity configurations.
String
getOnHostMaintenance()
Defines the maintenance behavior for this instance.
SchedulingOnInstanceStopAction
getOnInstanceStopAction()
Boolean
getPreemptible()
Defines whether the instance is preemptible.
String
getProvisioningModel()
Specifies the provisioning model of the instance.
String
getTerminationTime()
Specifies the timestamp, when the instance will be terminated, in RFC3339 text format.
Scheduling
set(String fieldName,
Object value)
Scheduling
setAutomaticRestart(Boolean automaticRestart)
Specifies whether the instance should be automatically restarted if it is terminated by Compute
Engine (not terminated by a user).
Scheduling
setAvailabilityDomain(Integer availabilityDomain)
Specifies the availability domain to place the instance in.
Scheduling
setHostErrorTimeoutSeconds(Integer hostErrorTimeoutSeconds)
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.
Scheduling
setInstanceTerminationAction(String instanceTerminationAction)
Specifies the termination action for the instance.
Scheduling
setLocalSsdRecoveryTimeout(Duration localSsdRecoveryTimeout)
Specifies the maximum amount of time a Local Ssd Vm should wait while recovery of the Local Ssd
state is attempted.
Scheduling
setLocationHint(String locationHint)
An opaque location hint used to place the instance close to other resources.
Scheduling
setMaxRunDuration(Duration maxRunDuration)
Specifies the max run duration for the given instance.
Scheduling
setMinNodeCpus(Integer minNodeCpus)
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant
node.
Scheduling
setNodeAffinities(List<SchedulingNodeAffinity> nodeAffinities)
A set of node affinity and anti-affinity configurations.
Scheduling
setOnHostMaintenance(String onHostMaintenance)
Defines the maintenance behavior for this instance.
Scheduling
setOnInstanceStopAction(SchedulingOnInstanceStopAction onInstanceStopAction)
Scheduling
setPreemptible(Boolean preemptible)
Defines whether the instance is preemptible.
Scheduling
setProvisioningModel(String provisioningModel)
Specifies the provisioning model of the instance.
Scheduling
setTerminationTime(String terminationTime)
Specifies the timestamp, when the instance will be terminated, in RFC3339 text format.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAutomaticRestart
public Boolean 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.
- Returns:
- value or
null for none
-
setAutomaticRestart
public Scheduling setAutomaticRestart(Boolean automaticRestart)
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.
- Parameters:
automaticRestart - automaticRestart or null for none
-
getAvailabilityDomain
public Integer 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.
- Returns:
- value or
null for none
-
setAvailabilityDomain
public Scheduling setAvailabilityDomain(Integer availabilityDomain)
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.
- Parameters:
availabilityDomain - availabilityDomain or null for none
-
getHostErrorTimeoutSeconds
public Integer getHostErrorTimeoutSeconds()
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.
- Returns:
- value or
null for none
-
setHostErrorTimeoutSeconds
public Scheduling setHostErrorTimeoutSeconds(Integer hostErrorTimeoutSeconds)
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.
- Parameters:
hostErrorTimeoutSeconds - hostErrorTimeoutSeconds or null for none
-
getInstanceTerminationAction
public String getInstanceTerminationAction()
Specifies the termination action for the instance.
- Returns:
- value or
null for none
-
setInstanceTerminationAction
public Scheduling setInstanceTerminationAction(String instanceTerminationAction)
Specifies the termination action for the instance.
- Parameters:
instanceTerminationAction - instanceTerminationAction or null for none
-
getLocalSsdRecoveryTimeout
public Duration 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.
- Returns:
- value or
null for none
-
setLocalSsdRecoveryTimeout
public Scheduling setLocalSsdRecoveryTimeout(Duration localSsdRecoveryTimeout)
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.
- Parameters:
localSsdRecoveryTimeout - localSsdRecoveryTimeout or null for none
-
getLocationHint
public String 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.
- Returns:
- value or
null for none
-
setLocationHint
public Scheduling setLocationHint(String locationHint)
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.
- Parameters:
locationHint - locationHint or null for none
-
getMaxRunDuration
public Duration 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.
- Returns:
- value or
null for none
-
setMaxRunDuration
public Scheduling setMaxRunDuration(Duration maxRunDuration)
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.
- Parameters:
maxRunDuration - maxRunDuration or null for none
-
getMinNodeCpus
public Integer getMinNodeCpus()
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant
node.
- Returns:
- value or
null for none
-
setMinNodeCpus
public Scheduling setMinNodeCpus(Integer minNodeCpus)
The minimum number of virtual CPUs this instance will consume when running on a sole-tenant
node.
- Parameters:
minNodeCpus - minNodeCpus or null for none
-
getNodeAffinities
public List<SchedulingNodeAffinity> getNodeAffinities()
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for
more information. Overrides reservationAffinity.
- Returns:
- value or
null for none
-
setNodeAffinities
public Scheduling setNodeAffinities(List<SchedulingNodeAffinity> nodeAffinities)
A set of node affinity and anti-affinity configurations. Refer to Configuring node affinity for
more information. Overrides reservationAffinity.
- Parameters:
nodeAffinities - nodeAffinities or null for none
-
getOnHostMaintenance
public String 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.
- Returns:
- value or
null for none
-
setOnHostMaintenance
public Scheduling setOnHostMaintenance(String onHostMaintenance)
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.
- Parameters:
onHostMaintenance - onHostMaintenance or null for none
-
getOnInstanceStopAction
public SchedulingOnInstanceStopAction getOnInstanceStopAction()
- Returns:
- value or
null for none
-
setOnInstanceStopAction
public Scheduling setOnInstanceStopAction(SchedulingOnInstanceStopAction onInstanceStopAction)
- Parameters:
onInstanceStopAction - onInstanceStopAction or null for none
-
getPreemptible
public Boolean 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.
- Returns:
- value or
null for none
-
setPreemptible
public Scheduling setPreemptible(Boolean 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 `TERMINATED` state. See Instance Life Cycle
for more information on the possible instance states.
- Parameters:
preemptible - preemptible or null for none
-
getProvisioningModel
public String getProvisioningModel()
Specifies the provisioning model of the instance.
- Returns:
- value or
null for none
-
setProvisioningModel
public Scheduling setProvisioningModel(String provisioningModel)
Specifies the provisioning model of the instance.
- Parameters:
provisioningModel - provisioningModel or null for none
-
getTerminationTime
public String 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.
- Returns:
- value or
null for none
-
setTerminationTime
public Scheduling setTerminationTime(String terminationTime)
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.
- Parameters:
terminationTime - terminationTime or null for none
-
set
public Scheduling set(String fieldName,
Object value)
- Overrides:
set in class com.google.api.client.json.GenericJson
-
clone
public Scheduling clone()
- Overrides:
clone in class com.google.api.client.json.GenericJson
Copyright © 2011–2025 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy