HaController

HaController handles failover for a VM Instance.

JSON representation
{
  "kind": string,
  "id": string,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "selfLink": string,
  "selfLinkWithId": string,
  "region": string,
  "zoneConfigurations": {
    string: {
      object (ZoneConfiguration)
    },
    ...
  },
  "instanceName": string,
  "status": {
    object (Status)
  },
  "failoverInitiation": enum (FailoverInitiation),
  "networkingAutoConfiguration": {
    object (NetworkingAutoConfiguration)
  },
  "backendServices": [
    string
  ],
  "state": enum (State)
}
Fields
kind

string

Output only. Type of the resource. Always compute#haController for HaControllers.

id

string (uint64 format)

Output only. The unique identifier for the resource. This identifier is defined by the server.

creationTimestamp

string

Output only. Creation timestamp in RFC3339 text format.

name

string

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

description

string

An optional description of this resource. Provide this property when you create the resource.

region

string

Output only. URL of the region where the resource resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

zoneConfigurations

map (key: string, value: object (ZoneConfiguration))

Map of zone configurations Key: name of the zone Value: ZoneConfiguration

Available from 2026-10-01-preview..

instanceName

string

Name of the instance that HaController is in charge of. If not specified the HaController's resource name will be used instead. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

status

object (Status)

Output only. Status information for the HaController resource.

Available from 2026-10-01-preview..

failoverInitiation

enum (FailoverInitiation)

Indicates how failover should be initiated.

Available from 2026-10-01-preview..

networkingAutoConfiguration

object (NetworkingAutoConfiguration)

Basic networking configuration. Required backend services and forwarding rules will be automatically created with default parameters.

Available from 2026-10-01-preview..

backendServices[]

string

Advanced configuration option. If specified, these Backend Services need to be pre-created.

Currently, only one backend service can be specified, and it must be L4 Internal Load Balancer (ILB).

Available from 2026-10-01-preview..

state

enum (State)

Output only. The current state of the HA Controller.

Available from 2026-10-01-preview..

ZoneConfiguration

Config for a zone that the HaController may use for running the VM instance.

JSON representation
{
  "reservationAffinity": {
    object (ReservationAffinity)
  },
  "nodeAffinities": [
    {
      object (NodeAffinity)
    }
  ]
}
Fields
reservationAffinity

object (ReservationAffinity)

Specifies the reservations that the instance can consume from.

Available from 2026-10-01-preview..

nodeAffinities[]

object (NodeAffinity)

A set of node affinity configurations. Refer to Configuring node affinity for more information. Overrides reservationAffinity.

Available from 2026-10-01-preview..

ReservationAffinity

Specifies the reservations that this instance can consume from. This message should be an exact copy of the Instances representation of AllocationAffinity.

JSON representation
{
  "consumeReservationType": enum (Type),
  "key": string,
  "values": [
    string
  ]
}
Fields
consumeReservationType

enum (Type)

Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.

Available from 2026-10-01-preview..

key

string

Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.

values[]

string

Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.

Available from 2026-10-01-preview..

Type

Indicates whether to consume from a reservation or not.

Enums
UNSPECIFIED
NO_RESERVATION Do not consume from any allocated capacity.
ANY_RESERVATION Consume any allocation available.
SPECIFIC_RESERVATION Must consume from a specific reservation. Must specify key value fields for specifying the reservations.
SPECIFIC_THEN_ANY_RESERVATION

Prefer to consume from a specific reservation, but still consume any reservation available if the specified reservation is not available or exhausted. Must specify key value fields for specifying the reservations.

Available from 2026-10-01-preview..

SPECIFIC_THEN_NO_RESERVATION

Prefer to consume from a specific reservation, but still consume from the on-demand pool if the specified reservation is exhausted. Must specify key value fields for specifying the reservations.

Available from 2026-10-01-preview..

ANY_RESERVATION_THEN_FAIL

Consume any reservation available, but fail if no reservation is available. Will not consume from the on-demand pool.

Available from 2026-10-01-preview..

NodeAffinity

Node Affinity: the configuration of desired nodes onto which the Instance could be scheduled. This message should be an exact copy of the Instances representation of NodeAffinity.

JSON representation
{
  "key": string,
  "operator": enum (Operator),
  "values": [
    string
  ]
}
Fields
key

string

Corresponds to the label key of Node resource.

operator

enum (Operator)

Defines the operation of node selection. Valid operators are IN for affinity and NOT_IN for anti-affinity.

Available from 2026-10-01-preview..

values[]

string

Corresponds to the label values of Node resource.

Operator

Defines the type of node selections.

Enums
OPERATOR_UNSPECIFIED
IN Requires Compute Engine to seek for matched nodes.
NOT_IN Requires Compute Engine to avoid certain nodes.

Status

Contains information about current status of the HaController.

JSON representation
{
  "primaryZone": string,
  "primaryInstance": string,
  "ongoingFailover": boolean,
  "readyForFailover": boolean,
  "failoverProgress": {
    object (FailoverProgress)
  },
  "lastFailoverInfo": {
    object (FailoverProgress)
  },
  "zoneStatus": {
    string: {
      object (ZoneStatus)
    },
    ...
  }
}
Fields
primaryZone

string

Output only. The name of the zone that is intended to be primary at this moment. Primary zone will be changed at the very beginning of a failover operation. The zone may not be operational in the middle of a failover operation.

Available from 2026-10-01-preview..

primaryInstance

string

Output only. The URL to the instance that is intended to be primary at this moment. Primary instance will be changed at the very beginning of a failover operation.

Available from 2026-10-01-preview..

ongoingFailover

boolean

Output only. Indicates if the failover is currently in-progress.

Available from 2026-10-01-preview..

readyForFailover

boolean

Output only. Indicates if the resource is ready for initiating a failover to the secondary zone.

Available from 2026-10-01-preview..

failoverProgress

object (FailoverProgress)

Output only. Contains the details of the ongoing failover. This message is not displayed if failover is NOT in progress.

Available from 2026-10-01-preview..

lastFailoverInfo

object (FailoverProgress)

Output only. Contains the details of the last successful failover.

Available from 2026-10-01-preview..

zoneStatus

map (key: string, value: object (ZoneStatus))

Output only. Map of zone statuses. Key: name of the zone Value: ZoneStatus

Available from 2026-10-01-preview..

FailoverProgress

Contains information about the current failover operation.

JSON representation
{
  "failoverTrigger": enum (FailoverTrigger),
  "failoverTriggerTimestamp": string,
  "failoverCompleteTimestamp": string,
  "lastFailoverAttempt": {
    object (LastFailoverAttempt)
  },
  "failoverDuration": string
}
Fields
failoverTrigger

enum (FailoverTrigger)

Output only. Indicates if failover has been triggered automatically or manually.

Available from 2026-10-01-preview..

failoverTriggerTimestamp

string (Timestamp format)

Output only. Timestamp of the last failover trigger.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Available from 2026-10-01-preview..

failoverCompleteTimestamp

string (Timestamp format)

Output only. Timestamp of the failover completion. Filled only if the failover is completed, in lastFailoverInfo.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Available from 2026-10-01-preview..

lastFailoverAttempt

object (LastFailoverAttempt)

Output only. Contains details of the last failed failover. This field is filled only if the current failover is failing

Available from 2026-10-01-preview..

failoverDuration

string (Duration format)

Output only. The duration of the last failover.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Available from 2026-10-01-preview..

FailoverTrigger

Enums
FAILOVER_TRIGGER_UNSPECIFIED
AUTOMATIC Failover has been triggered automatically.
MANUAL Failover has been triggered manually.

LastFailoverAttempt

JSON representation
{
  "errors": {
    "errors": [
      {
        "code": string,
        "location": string,
        "message": string,
        "errorDetails": [
          {
            "errorInfo": {
              object (ErrorInfo)
            },
            "quotaInfo": {
              object (QuotaExceededInfo)
            },
            "help": {
              object (Help)
            },
            "localizedMessage": {
              object (LocalizedMessage)
            }
          }
        ]
      }
    ]
  },
  "timestamp": string
}
Fields
errors

object

Output only. Encountered errors during the last attempt to process failover.

Available from 2026-10-01-preview..

errors.errors[]

object

Output only. The array of errors encountered while processing this operation.

errors.errors[].code

string

Output only. The error type identifier for this error.

errors.errors[].location

string

Output only. Indicates the field in the request that caused the error. This property is optional.

errors.errors[].message

string

Output only. An optional, human-readable error message.

errors.errors[].errorDetails[]

object

Output only. An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.

errors.errors[].errorDetails[].errorInfo

object (ErrorInfo)

Error information containing structured domain, reason, and metadata.

errors.errors[].errorDetails[].quotaInfo

object (QuotaExceededInfo)

Details about quota limits and metrics when a quota is exceeded.

errors.errors[].errorDetails[].help

object (Help)

Links and information to help the user resolve the error.

errors.errors[].errorDetails[].localizedMessage

object (LocalizedMessage)

A localized human-readable error message intended for end users.

timestamp

string (Timestamp format)

Output only. Show timestamp only if there is an error. RFC3339 text format.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Available from 2026-10-01-preview..

ZoneStatus

Contains the status of a specific zone.

JSON representation
{
  "isPrimary": boolean,
  "isZoneReady": boolean,
  "lastError": {
    object (LastError)
  }
}
Fields
isPrimary

boolean

Output only. Indicates if the zone is primary at this moment.

Available from 2026-10-01-preview..

isZoneReady

boolean

Output only. Indicates if the zone is ready for initiating a failover.

Available from 2026-10-01-preview..

lastError

object (LastError)

Output only. This field is filled only if the current operation is failing.

Available from 2026-10-01-preview..

LastError

Contains details of the last failed operation.

JSON representation
{
  "errors": {
    "errors": [
      {
        "code": string,
        "location": string,
        "message": string,
        "errorDetails": [
          {
            "errorInfo": {
              object (ErrorInfo)
            },
            "quotaInfo": {
              object (QuotaExceededInfo)
            },
            "help": {
              object (Help)
            },
            "localizedMessage": {
              object (LocalizedMessage)
            }
          }
        ]
      }
    ]
  },
  "timestamp": string
}
Fields
errors

object

Output only. Encountered errors.

Available from 2026-10-01-preview..

errors.errors[]

object

Output only. The array of errors encountered while processing this operation.

errors.errors[].code

string

Output only. The error type identifier for this error.

errors.errors[].location

string

Output only. Indicates the field in the request that caused the error. This property is optional.

errors.errors[].message

string

Output only. An optional, human-readable error message.

errors.errors[].errorDetails[]

object

Output only. An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.

errors.errors[].errorDetails[].errorInfo

object (ErrorInfo)

Error information containing structured domain, reason, and metadata.

errors.errors[].errorDetails[].quotaInfo

object (QuotaExceededInfo)

Details about quota limits and metrics when a quota is exceeded.

errors.errors[].errorDetails[].help

object (Help)

Links and information to help the user resolve the error.

errors.errors[].errorDetails[].localizedMessage

object (LocalizedMessage)

A localized human-readable error message intended for end users.

timestamp

string (Timestamp format)

Output only. Show timestamp only if there is an error. RFC3339 text format.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Available from 2026-10-01-preview..

FailoverInitiation

Indicates how failover should be initiated.

Enums
FAILOVER_INITIATION_UNSPECIFIED
MANUAL_ONLY Failover will be initiated only when compute.haControllers.failover method is called.
AUTOMATIC Failover will be initiated automatically in case of an outage

NetworkingAutoConfiguration

Basic networking configuration. Required backend services and forwarding rules will be automatically created with default parameters.

JSON representation
{
  "internal": {
    object (Internal)
  }
}
Fields
internal

object (Internal)

Internal networking configuration

Available from 2026-10-01-preview..

Internal

Internal networking configuration

JSON representation
{
  "stackType": enum (StackType),
  "ipAddress": string,
  "ipv6Address": string
}
Fields
stackType

enum (StackType)

Determine which IP addresses to automatically create. Field and option naming consistent with NetworkInterface configuration on Instances.

ipAddress

string

Optional. IP addresses will be automatically allocated according to StackType if not provided.

ipv6Address

string

StackType

Determine which IP addresses to automatically create. Field and option naming consistent with NetworkInterface configuration on Instances.

Enums
IPV4_ONLY The HA Controller Networking Endpoint will only be assigned with IPv4 address.
IPV4_IPV6 The HA Controller Networking Endpoint will be assigned with both IPv4 and IPv6 addresses.
IPV6_ONLY The HA Controller Networking Endpoint will only be assigned with IPv6 address.

State

Indicates the current state of the HA Controller resource.

Enums
STATE_UNSPECIFIED Unspecified state.
ACTIVE The HA Controller is active and ready to perform failover.
FAILOVER_IN_PROGRESS The HA Controller is in the process of failing over.
FAILOVER_UNAVAILABLE The HA Controller is not ready to perform failover.
PENDING_FAILOVER The HA Controller requires a failover operation to be performed.
MULTI_ZONE_FAILURE The HA Controller requires a failover operation to be performed but the secondary zone is not available to failover to.
CREATING The HA Controller is being created.
UPDATING The HA Controller is being updated.
DELETING The HA Controller is being deleted.
STOPPED The HA Controller is stopped.
STOPPING The HA Controller is being stopped.
STARTING The HA Controller is being started.