# Compute Engine v1 API - Class Scheduling (3.28.0)

3.28.0 (latest) 3.27.0 3.26.0 3.25.0 3.24.0 3.23.0 3.22.0 3.21.0 3.20.0 3.19.0 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public sealed class Scheduling : IMessage<Scheduling>, IEquatable<Scheduling>, IDeepCloneable<Scheduling>, IBufferMessage, IMessage

Reference documentation and code samples for the Compute Engine v1 API class Scheduling.

Sets the scheduling options for an Instance.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Scheduling

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Scheduling](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Scheduling), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Scheduling](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Scheduling), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Scheduling](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Scheduling), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Compute.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1)

## Assembly

Google.Cloud.Compute.V1.dll

## Constructors

### Scheduling()

    public Scheduling()

### Scheduling(Scheduling)

    public Scheduling(Scheduling other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Scheduling` |

## Properties

### AutomaticRestart

    public bool AutomaticRestart { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### AvailabilityDomain

    public int AvailabilityDomain { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### HasAutomaticRestart

    public bool HasAutomaticRestart { get; }

Gets whether the "automatic_restart" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasAvailabilityDomain

    public bool HasAvailabilityDomain { get; }

Gets whether the "availability_domain" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasHostErrorTimeoutSeconds

    public bool HasHostErrorTimeoutSeconds { get; }

Gets whether the "host_error_timeout_seconds" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasInstanceTerminationAction

    public bool HasInstanceTerminationAction { get; }

Gets whether the "instance_termination_action" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasLocationHint

    public bool HasLocationHint { get; }

Gets whether the "location_hint" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasMinNodeCpus

    public bool HasMinNodeCpus { get; }

Gets whether the "min_node_cpus" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasOnHostMaintenance

    public bool HasOnHostMaintenance { get; }

Gets whether the "on_host_maintenance" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasPreemptible

    public bool HasPreemptible { get; }

Gets whether the "preemptible" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasProvisioningModel

    public bool HasProvisioningModel { get; }

Gets whether the "provisioning_model" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasSkipGuestOsShutdown

    public bool HasSkipGuestOsShutdown { get; }

Gets whether the "skip_guest_os_shutdown" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HasTerminationTime

    public bool HasTerminationTime { get; }

Gets whether the "termination_time" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### HostErrorTimeoutSeconds

    public int HostErrorTimeoutSeconds { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### InstanceTerminationAction

    public string InstanceTerminationAction { get; set; }

Specifies the termination action for the instance.
Check the InstanceTerminationAction enum for the list of possible values.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### LocalSsdRecoveryTimeout

    public Duration LocalSsdRecoveryTimeout { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Duration` |   |

### LocationHint

    public string LocationHint { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### MaxRunDuration

    public Duration MaxRunDuration { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Duration` |   |

### MinNodeCpus

    public int MinNodeCpus { get; set; }

The minimum number of virtual CPUs this instance will consume when running
on a sole-tenant node.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### NodeAffinities

    public RepeatedField<SchedulingNodeAffinity> NodeAffinities { get; }

A set of node affinity and anti-affinity configurations. Refer toConfiguring node
affinity for more information.
Overrides reservationAffinity.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SchedulingNodeAffinity` |   |

### OnHostMaintenance

    public string OnHostMaintenance { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### OnInstanceStopAction

    public SchedulingOnInstanceStopAction OnInstanceStopAction { get; set; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SchedulingOnInstanceStopAction` |   |

### Preemptible

    public bool Preemptible { get; set; }

Defines whether the instance is preemptible. This can only be set during
instance creation or while the instance isstopped and
therefore, in a `TERMINATED` state. SeeInstance Life
Cycle for more information on the possible instance states.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### ProvisioningModel

    public string ProvisioningModel { get; set; }

Specifies the provisioning model of the instance.
Check the ProvisioningModel enum for the list of possible values.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### SkipGuestOsShutdown

    public bool SkipGuestOsShutdown { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### TerminationTime

    public string TerminationTime { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |