## Resource: Instance

An Instance is a computing unit that an end customer can connect to. It's the main unit of computing resources in AlloyDB.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "uid": string, "createTime": string, "updateTime": string, "deleteTime": string, "labels": { string: string, ... }, "state": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#State`), "instanceType": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#InstanceType`), "machineConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#MachineConfig`) }, "availabilityType": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#AvailabilityType`), "gceZone": string, "databaseFlags": { string: string, ... }, "writableNode": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Node`) }, "nodes": [ { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Node`) } ], "queryInsightsConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#QueryInsightsInstanceConfig`) }, "observabilityConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ObservabilityInstanceConfig`) }, "readPoolConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ReadPoolConfig`) }, "ipAddress": string, "publicIpAddress": string, "reconciling": boolean, "etag": string, "annotations": { string: string, ... }, "updatePolicy": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#UpdatePolicy`) }, "clientConnectionConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ClientConnectionConfig`) }, "satisfiesPzs": boolean, "pscInstanceConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscInstanceConfig`) }, "pscInstanceInfo": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscInstanceInfo`) }, "networkConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#InstanceNetworkConfig`) }, "networkInfo": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#InstanceNetworkInfo`) }, "geminiConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#GeminiInstanceConfig`) }, "outboundPublicIpAddresses": [ string ], "activationPolicy": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ActivationPolicy`), "connectionPoolConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ConnectionPoolConfig`) }, "gcaConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#GCAInstanceConfig`) }, "maintenanceVersionName": string, "dataApiAccess": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#DataApiAccess`) } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The name of the instance resource with the format: \* projects/{project}/locations/{region}/clusters/{clusterId}/instances/{instanceId} where the cluster and instance ID segments should satisfy the regex expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see <https://google.aip.dev/122>. The prefix of the instance resource name is the name of the parent resource: \* projects/{project}/locations/{region}/clusters/{clusterId} |
| `displayName` | `string` User-settable and human-readable display name for the Instance. |
| `uid` | `string` Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Create time stamp 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"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Update time stamp 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"`. |
| `deleteTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Delete time stamp 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"`. |
| `labels` | `map (key: string, value: string)` Labels as key value pairs An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `state` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#State`)`` Output only. The current serving state of the instance. |
| `instanceType` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#InstanceType`)`` Required. The type of the instance. Specified at creation time. |
| `machineConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#MachineConfig`)`` Configurations for the machines that host the underlying database engine. |
| `availabilityType` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#AvailabilityType`)`` Availability type of an Instance. If empty, defaults to REGIONAL for primary instances. For read pools, availabilityType is always UNSPECIFIED. Instances in the read pools are evenly distributed across available zones within the region (i.e. read pools with more than one node will have a node in at least two zones). |
| `gceZone` | `string` The Compute Engine zone that the instance should serve from, per <https://cloud.google.com/compute/docs/regions-zones> This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity. |
| `databaseFlags` | `map (key: string, value: string)` Database flags. Set at the instance level. They are copied from the primary instance on secondary instance creation. Flags that have restrictions default to the value at primary instance on read instances during creation. Read instances can set new flags or override existing flags that are relevant for reads, for example, for enabling columnar cache on a read instance. Flags set on read instance might or might not be present on the primary instance. This is a list of "key": "value" pairs. "key": The name of the flag. These flags are passed at instance setup time, so include both server options and system variables for Postgres. Flags are specified with underscores, not hyphens. "value": The value of the flag. Booleans are set to **on** for true and **off** for false. This field must be omitted if the flag doesn't take a value. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `writableNode` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Node`)`` Output only. This is set for the read-write VM of the PRIMARY instance only. |
| `nodes[]` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Node`)`` Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance. |
| `queryInsightsConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#QueryInsightsInstanceConfig`)`` Configuration for query insights. |
| `observabilityConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ObservabilityInstanceConfig`)`` Configuration for observability. |
| `readPoolConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ReadPoolConfig`)`` Read pool instance configuration. This is required if the value of instanceType is READ_POOL. |
| `ipAddress` | `string` Output only. The IP address for the Instance. This is the connection endpoint for an end-user application. |
| `publicIpAddress` | `string` Output only. The public IP address for the Instance. This is available ONLY when `enablePublicIp` is set or when you have upgraded from an Express Instance that has public DNS enabled. This field is not available for Express Instances. This is the connection endpoint for an end-user application. |
| `reconciling` | `boolean` Output only. Reconciling (<https://google.aip.dev/128#reconciliation)>. Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance. |
| `etag` | `string` For Resource freshness validation (<https://google.aip.dev/154>) |
| `annotations` | `map (key: string, value: string)` Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. <https://google.aip.dev/128> An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `updatePolicy` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#UpdatePolicy`)`` Update policy that will be applied during instance update. This field is not persisted when you update the instance. To use a non-default update policy, you must specify explicitly specify the value in each update request. |
| `clientConnectionConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ClientConnectionConfig`)`` Optional. Client connection specific configurations |
| `satisfiesPzs` | `boolean` Output only. Reserved for future use. |
| `pscInstanceConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscInstanceConfig`)`` Optional. The configuration for Private Service Connect (PSC) for the instance. |
| `pscInstanceInfo` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscInstanceInfo`)`` Output only. Information about the Private Service Connect (PSC) for the instance. |
| `networkConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#InstanceNetworkConfig`)`` Optional. Instance-level network configuration. |
| `networkInfo` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#InstanceNetworkInfo`)`` Output only. Instance-level network information. |
| `geminiConfig (deprecated)` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#GeminiInstanceConfig`)`` > [!WARNING] > This item is deprecated! Optional. Deprecated and unused. This field will be removed in the near future. |
| `outboundPublicIpAddresses[]` | `string` Output only. All outbound public IP addresses configured for the instance. |
| `activationPolicy` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ActivationPolicy`)`` Optional. Specifies whether an instance needs to spin up. Once the instance is active, the activation policy can be updated to the `NEVER` to stop the instance. Likewise, the activation policy can be updated to `ALWAYS` to start the instance. There are restrictions around when an instance can/cannot be activated (for example, a read pool instance should be stopped before stopping primary etc.). Please refer to the API documentation for more details. |
| `connectionPoolConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#ConnectionPoolConfig`)`` Optional. The configuration for Managed Connection Pool (MCP). |
| `gcaConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#GCAInstanceConfig`)`` Output only. Configuration parameters related to Gemini Cloud Assist. |
| `maintenanceVersionName` | `string` Output only. Maintenance version of the instance, for example: POSTGRES_15.2025_07_15.04_00. Output only. Update this field via the parent cluster's maintenanceVersion field(s). |
| `dataApiAccess` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#DataApiAccess`)`` Optional. Controls whether the Data API is enabled for this instance. When enabled, this allows authorized users to connect to the instance from the public internet using the `executeSql` API, even for private IP instances. If this is not specified, the data API is enabled by default for Google internal services like AlloyDB Studio. Disable it explicitly to disallow Google internal services as well. |

## State

Instance State

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The state of the instance is unknown. |
| `READY` | The instance is active and running. |
| `STOPPED` | The instance is stopped. Instance name and IP resources are preserved. |
| `CREATING` | The instance is being created. |
| `DELETING` | The instance is being deleted. |
| `MAINTENANCE` | The instance is down for maintenance. |
| `FAILED` | The creation of the instance failed or a fatal error occurred during an operation on the instance. Note: Instances in this state would tried to be auto-repaired. And Customers should be able to restart, update or delete these instances. |
| `BOOTSTRAPPING` | The instance has been configured to sync data from some other source. |
| `PROMOTING` | The instance is being promoted. |
| `SWITCHOVER` | The instance has entered switchover state. All updates on instance are restricted while the instance is in this state. |
| `STOPPING` | The instance is being stopped. |
| `STARTING` | The instance is being started. |

## InstanceType

Type of an Instance

| Enums ||
|---|---|
| `INSTANCE_TYPE_UNSPECIFIED` | The type of the instance is unknown. |
| `PRIMARY` | PRIMARY instances support read and write operations. |
| `READ_POOL` | READ POOL instances support read operations only. Each read pool instance consists of one or more homogeneous nodes. \* Read pool of size 1 can only have zonal availability. \* Read pools with node count of 2 or more can have regional availability (nodes are present in 2 or more zones in a region). |
| `SECONDARY` | SECONDARY instances support read operations only. SECONDARY instance is a cross-region read replica |

## MachineConfig

MachineConfig describes the configuration of a machine.

| JSON representation |
|---|
| ``` { "cpuCount": integer, "machineType": string } ``` |

| Fields ||
|---|---|
| `cpuCount` | `integer` The number of CPU's in the VM instance. |
| `machineType` | `string` Machine type of the VM instance. E.g. "n2-highmem-4", "n2-highmem-8", "c4a-highmem-4-lssd". cpuCount must match the number of vCPUs in the machine type. |

## AvailabilityType

The Availability type of an instance. Potential values:

- ZONAL: The instance serves data from only one zone. Outages in that zone affect instance availability.
- REGIONAL: The instance can serve data from more than one zone in a region (it is highly available).

| Enums ||
|---|---|
| `AVAILABILITY_TYPE_UNSPECIFIED` | This is an unknown Availability type. |
| `ZONAL` | Zonal available instance. |
| `REGIONAL` | Regional (or Highly) available instance. |

## Node

Details of a single node in the instance. Nodes in an AlloyDB instance are ephemeral, they can change during update, failover, autohealing and resize operations.

| JSON representation |
|---|
| ``` { "zoneId": string, "id": string, "ip": string, "state": string, "isHotStandby": boolean } ``` |

| Fields ||
|---|---|
| `zoneId` | `string` Output only. The Compute Engine zone of the VM e.g. "us-central1-b". |
| `id` | `string` Output only. The identifier of the VM e.g. "test-read-0601-407e52be-ms3l". |
| `ip` | `string` Output only. The private IP address of the VM e.g. "10.57.0.34". |
| `state` | `string` Output only. Determined by state of the compute VM and postgres-service health. Compute VM state can have values listed in <https://cloud.google.com/compute/docs/instances/instance-life-cycle> and postgres-service health can have values: HEALTHY and UNHEALTHY. |
| `isHotStandby` | `boolean` Output only. Indicates whether the node set up to be configured as a hot standby. |

## QueryInsightsInstanceConfig

QueryInsights Instance specific configuration.

| JSON representation |
|---|
| ``` { "queryStringLength": integer, "recordApplicationTags": boolean, "recordClientAddress": boolean, "queryPlansPerMinute": integer } ``` |

| Fields ||
|---|---|
| `queryStringLength` | `integer (https://developers.google.com/discovery/v1/type-format format)` Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid. |
| `recordApplicationTags` | `boolean` Record application tags for an instance. This flag is turned "on" by default. |
| `recordClientAddress` | `boolean` Record client address for an instance. Client address is PII information. This flag is turned "on" by default. |
| `queryPlansPerMinute` | `integer (https://developers.google.com/discovery/v1/type-format format)` Number of query execution plans captured by Insights per minute for all queries combined. The default value is 5. Any integer between 0 and 20 is considered valid. |

## ObservabilityInstanceConfig

Observability Instance specific configuration.

| JSON representation |
|---|
| ``` { "enabled": boolean, "preserveComments": boolean, "trackWaitEvents": boolean, "trackWaitEventTypes": boolean, "maxQueryStringLength": integer, "recordApplicationTags": boolean, "queryPlansPerMinute": integer, "trackActiveQueries": boolean, "trackClientAddress": boolean, "assistiveExperiencesEnabled": boolean, "trackActiveQueryPlan": boolean } ``` |

| Fields ||
|---|---|
| `enabled` | `boolean` Observability feature status for an instance. This flag is turned "off" by default. |
| `preserveComments` | `boolean` Preserve comments in query string for an instance. This flag is turned "off" by default. |
| `trackWaitEvents` | `boolean` Track wait events during query execution for an instance. This flag is turned "on" by default but tracking is enabled only after observability enabled flag is also turned on. |
| `trackWaitEventTypes` | `boolean` Output only. Track wait event types during query execution for an instance. This flag is turned "on" by default but tracking is enabled only after observability enabled flag is also turned on. This is read-only flag and only modifiable by internal API. |
| `maxQueryStringLength` | `integer` Query string length. The default value is 10k. |
| `recordApplicationTags` | `boolean` Record application tags for an instance. This flag is turned "off" by default. |
| `queryPlansPerMinute` | `integer` Number of query execution plans captured by Insights per minute for all queries combined. The default value is 200. Any integer between 0 to 200 is considered valid. |
| `trackActiveQueries` | `boolean` Track actively running queries on the instance. If not set, this flag is "off" by default. |
| `trackClientAddress` | `boolean` Track client address for an instance. If not set, default value is "off". |
| `assistiveExperiencesEnabled` | `boolean` Whether assistive experiences are enabled for this AlloyDB instance. |
| `trackActiveQueryPlan` | `boolean` Indicates whether to track active query plans for an instance. If not set, the default value is "off". Can only be enabled if trackActiveQueries is enabled. |

## ReadPoolConfig

Configuration for a read pool instance.

| JSON representation |
|---|
| ``` { "nodeCount": integer, "autoScalingConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#AutoScalingConfig`) } } ``` |

| Fields ||
|---|---|
| `nodeCount` | `integer` Read capacity, i.e. number of nodes in a read pool instance. |
| `autoScalingConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#AutoScalingConfig`)`` Autoscaling configuration for the read pool instance. If not set, the read pool instance will not be autoscaled. |

## AutoScalingConfig

Configuration for autoscaling.

| JSON representation |
|---|
| ``` { "policy": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Policy`) }, "schedules": [ { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Schedule`) } ] } ``` |

| Fields ||
|---|---|
| `policy` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Policy`)`` Policy for the MIG autoscaler. |
| `schedules[]` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Schedule`)`` Optional list of schedules for the MIG autoscaler. If not set, no schedules are created. |

## Policy

Policy for the autoscaler.

| JSON representation |
|---|
| ``` { "maxNodeCount": string, "coolDownPeriodSec": string, "cpuUtilization": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#CpuUtilization`) }, "enabled": boolean } ``` |

| Fields ||
|---|---|
| `maxNodeCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Maximum number of nodes for the autoscaler. |
| `coolDownPeriodSec` | `string (https://developers.google.com/discovery/v1/type-format format)` The period of time in seconds after a new node is created before the autoscaler will incorporate its resource usage (e.g. CPU utilization) into the autoscaling recommendation algorithm. |
| `cpuUtilization` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#CpuUtilization`)`` CPU utilization policy for the autoscaler. |
| `enabled` | `boolean` If true, autoscaling is enabled for the instance. If not set, the default value is false. |

## CpuUtilization

CPU utilization policy for the autoscaler.

| JSON representation |
|---|
| ``` { "utilizationTarget": number } ``` |

| Fields ||
|---|---|
| `utilizationTarget` | `number` Target CPU utilization as a float between 0 and 1. |

## Schedule

A schedule for the autoscaler.

| JSON representation |
|---|
| ``` { "name": string, "cronExpression": string, "durationSec": string, "minNodeCount": string, "timeZone": string, "disabled": boolean, "description": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Name of the schedule. |
| `cronExpression` | `string` Cron expression for the triggering the schedule. See <https://cloud.google.com/compute/docs/autoscaler/scaling-schedules#cron_expressions> for the syntax. |
| `durationSec` | `string (https://developers.google.com/discovery/v1/type-format format)` Duration of the schedule. |
| `minNodeCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Minimum number of nodes in while the schedule is active. |
| `timeZone` | `string` The location-based IANA time zone for interpreting the schedule's start time. If no time zone is provided, UTC is used by default. |
| `disabled` | `boolean` If true, the schedule is disabled. |
| `description` | `string` Description of the schedule. |

## UpdatePolicy

Policy to be used while updating the instance.

| JSON representation |
|---|
| ``` { "mode": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Mode`) } ``` |

| Fields ||
|---|---|
| `mode` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#Mode`)`` Mode for updating the instance. |

## Mode

Specifies the available modes of update.

| Enums ||
|---|---|
| `MODE_UNSPECIFIED` | Mode is unknown. |
| `DEFAULT` | Least disruptive way to apply the update. |
| `FORCE_APPLY` | Performs a forced update when applicable. This will be fast but may incur a downtime. |

## ClientConnectionConfig

Client connection configuration

| JSON representation |
|---|
| ``` { "requireConnectors": boolean, "sslConfig": { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/SslConfig`) } } ``` |

| Fields ||
|---|---|
| `requireConnectors` | `boolean` Optional. Configuration to enforce connectors only (ex: AuthProxy) connections to the database. |
| `sslConfig` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/SslConfig`)`` Optional. SSL configuration option for this instance. |

## PscInstanceConfig

PscInstanceConfig contains PSC related configuration at an instance level.

| JSON representation |
|---|
| ``` { "serviceAttachmentLink": string, "allowedConsumerProjects": [ string ], "pscDnsName": string, "pscInterfaceConfigs": [ { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscInterfaceConfig`) } ], "pscAutoConnections": [ { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscAutoConnectionConfig`) } ], "pscAutoDnsState": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscAutoDnsState`), "pscAutoConnectionPolicyState": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscAutoConnectionPolicyState`) } ``` |

| Fields ||
|---|---|
| `serviceAttachmentLink` | `string` Output only. The service attachment created when Private Service Connect (PSC) is enabled for the instance. The name of the resource will be in the format of `projects/<alloydb-tenant-project-number>/regions/<region-name>/serviceAttachments/<service-attachment-name>` |
| `allowedConsumerProjects[]` | `string` Optional. List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance. |
| `pscDnsName` | `string` Output only. The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog |
| `pscInterfaceConfigs[]` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscInterfaceConfig`)`` Optional. Configurations for setting up PSC interfaces attached to the instance which are used for outbound connectivity. Only primary instances can have PSC interface attached. Currently we only support 0 or 1 PSC interface. |
| `pscAutoConnections[]` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscAutoConnectionConfig`)`` Optional. Configurations for setting up PSC service automation. |
| `pscAutoDnsState` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscAutoDnsState`)`` Optional. Configuration for setting up PSC auto DNS for the instance. |
| `pscAutoConnectionPolicyState` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PscAutoConnectionPolicyState`)`` Optional. Configuration for setting up PSC auto connection for the instance. |

## PscInterfaceConfig

Configuration for setting up a PSC interface to enable outbound connectivity.

| JSON representation |
|---|
| ``` { "networkAttachmentResource": string } ``` |

| Fields ||
|---|---|
| `networkAttachmentResource` | `string` The network attachment resource created in the consumer network to which the PSC interface will be linked. This is of the format: "projects/${CONSUMER_PROJECT}/regions/${REGION}/networkAttachments/${NETWORK_ATTACHMENT_NAME}". The network attachment must be in the same region as the instance. |

## PscAutoConnectionConfig

Configuration for setting up PSC service automation. Consumer projects in the configs will be allowlisted automatically for the instance.

| JSON representation |
|---|
| ``` { "consumerProject": string, "consumerNetwork": string, "ipAddress": string, "status": string, "consumerNetworkStatus": string } ``` |

| Fields ||
|---|---|
| `consumerProject` | `string` The consumer project to which the PSC service automation endpoint will be created. |
| `consumerNetwork` | `string` The consumer network for the PSC service automation, example: "projects/vpc-host-project/global/networks/default". The consumer network might be hosted a different project than the consumer project. |
| `ipAddress` | `string` Output only. The IP address of the PSC service automation endpoint. |
| `status` | `string` Output only. The status of the PSC service automation connection. Possible values: "STATE_UNSPECIFIED" - An invalid state as the default case. "ACTIVE" - The connection has been created successfully. "FAILED" - The connection is not functional since some resources on the connection fail to be created. "CREATING" - The connection is being created. "DELETING" - The connection is being deleted. "CREATE_REPAIRING" - The connection is being repaired to complete creation. "DELETE_REPAIRING" - The connection is being repaired to complete deletion. |
| `consumerNetworkStatus` | `string` Output only. The status of the service connection policy. Possible values: "STATE_UNSPECIFIED" - Default state, when Connection Map is created initially. "VALID" - Set when policy and map configuration is valid, and their matching can lead to allowing creation of PSC Connections subject to other constraints like connections limit. "CONNECTION_POLICY_MISSING" - No Service Connection Policy found for this network and Service Class "POLICY_LIMIT_REACHED" - Service Connection Policy limit reached for this network and Service Class "CONSUMER_INSTANCE_PROJECT_NOT_ALLOWLISTED" - The consumer instance project is not in AllowedGoogleProducersResourceHierarchyLevels of the matching ServiceConnectionPolicy. |

## PscAutoDnsState

The state of the PSC auto DNS.

| Enums ||
|---|---|
| `PSC_AUTO_DNS_STATE_UNSPECIFIED` | The state is unspecified. For old instances, this means the PSC auto DNS is disabled. For new instances, this means the PSC auto DNS is enabled by default. Use `effectivePscAutoDnsEnabled` to check the effective state of the PSC auto DNS. |
| `PSC_AUTO_DNS_STATE_ENABLED` | Enables the PSC auto DNS for the instance. |
| `PSC_AUTO_DNS_STATE_DISABLED` | Disables the PSC auto DNS for the instance. |

## PscAutoConnectionPolicyState

The state of the PSC auto connection policy.

| Enums ||
|---|---|
| `PSC_AUTO_CONNECTION_POLICY_STATE_UNSPECIFIED` | The state is unspecified. For old instances, this means the PSC auto connection is disabled. For new instances, this means the PSC auto connection is enabled by default. |
| `ENABLED` | Enables the PSC auto connection for the instance. |
| `DISABLED` | Disables the PSC auto connection for the instance. |

## PscInstanceInfo

Information about the Private Service Connect (PSC) for the instance.

| JSON representation |
|---|
| ``` { "effectivePscAutoDnsEnabled": boolean, "pscAutoDnsNames": [ string ], "effectivePscAutoConnectionPolicy": boolean, "serviceConnectionPolicy": string } ``` |

| Fields ||
|---|---|
| `effectivePscAutoDnsEnabled` | `boolean` Output only. The effective state of the PSC auto DNS for the instance. |
| `pscAutoDnsNames[]` | `string` Output only. Specifies the auto DNS names for the instance. |
| `effectivePscAutoConnectionPolicy` | `boolean` Output only. Indicates if the PSC auto connection policy is enabled for the instance. For older instances, this will be off by default, but for newer instances, this will be auto-enabled. |
| `serviceConnectionPolicy` | `string` Output only. The PSC service connection policy name. The format is "projects//regions//serviceConnectionPolicies/\<alloydb-$NETWORK-$RANDOM-scp\>" |

## InstanceNetworkConfig

Metadata related to instance-level network configuration.

| JSON representation |
|---|
| ``` { "authorizedExternalNetworks": [ { object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#AuthorizedNetwork`) } ], "enablePublicIp": boolean, "publicDnsEnabled": boolean, "enableOutboundPublicIp": boolean, "network": string, "allocatedIpRangeOverride": string } ``` |

| Fields ||
|---|---|
| `authorizedExternalNetworks[]` | ``object (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#AuthorizedNetwork`)`` Optional. A list of external network authorized to access this instance. |
| `enablePublicIp` | `boolean` Optional. Enabling public ip for the instance. |
| `publicDnsEnabled` | `boolean` Optional. Whether Public DNS is enabled for the instance. |
| `enableOutboundPublicIp` | `boolean` Optional. Enabling an outbound public IP address to support a database server sending requests out into the internet. |
| `network` | `string` Output only. The resource link for the VPC network in which instance resources are created and from which they are accessible via Private IP. This will be the same value as the parent cluster's network. It is specified in the form: // `projects/{projectNumber}/global/networks/{network_id}`. |
| `allocatedIpRangeOverride` | `string` Optional. Name of the allocated IP range for the private IP AlloyDB instance, for example: "google-managed-services-default". If set, the instance IPs will be created from this allocated range and will override the IP range used by the parent cluster. The range name must comply with [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z](https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/[-a-z0-9]*[a-z0-9])?. |

## AuthorizedNetwork

AuthorizedNetwork contains metadata for an authorized network.

| JSON representation |
|---|
| ``` { "cidrRange": string } ``` |

| Fields ||
|---|---|
| `cidrRange` | `string` CIDR range for one authorzied network of the instance. |

## InstanceNetworkInfo

Output-only metadata related to instance-level network information.

| JSON representation |
|---|
| ``` { "publicDnsName": string } ``` |

| Fields ||
|---|---|
| `publicDnsName` | `string` Output only. The DNS name of the instance for public connectivity. |

## GeminiInstanceConfig

Deprecated and unused. This message will be removed in the near future.

| JSON representation |
|---|
| ``` { "entitled": boolean } ``` |

| Fields ||
|---|---|
| `entitled (deprecated)` | `boolean` > [!WARNING] > This item is deprecated! Output only. Deprecated and unused. This field will be removed in the near future. |

## ActivationPolicy

Specifies whether an instance needs to spin up.

| Enums ||
|---|---|
| `ACTIVATION_POLICY_UNSPECIFIED` | The policy is not specified. |
| `ALWAYS` | The instance is running. |
| `NEVER` | The instance is not running. |

## ConnectionPoolConfig

Configuration for Managed Connection Pool (MCP).

| JSON representation |
|---|
| ``` { "enabled": boolean, "flags": { string: string, ... }, "poolerCount": integer, "authproxyPoolerCount": integer, "poolerScalingType": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PoolerScalingType`), "authproxyPoolerScalingType": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PoolerScalingType`) } ``` |

| Fields ||
|---|---|
| `enabled` | `boolean` Optional. Whether to enable Managed Connection Pool (MCP). |
| `flags` | `map (key: string, value: string)` Optional. Connection Pool flags, as a list of "key": "value" pairs. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `poolerCount` | `integer` Output only. The number of running poolers per instance. |
| `authproxyPoolerCount` | `integer` Output only. The number of running AuthProxy poolers per instance. |
| `poolerScalingType` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PoolerScalingType`)`` Optional. The scaling type of the regular pooler. |
| `authproxyPoolerScalingType` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#PoolerScalingType`)`` Optional. The scaling type of the AuthProxy pooler. |

## PoolerScalingType

The scaling type of the pooler. If set to POOLER_MACHINE_SIZED, the number of poolers will be automatically determined by the service based on the VM size. POOLER_NONE can be used to disable AuthProxy pooler and is disallowed for regular connection pool. POOLER_MANUAL_OVERRIDE keeps the pooler count unchanged no matter the machine size; this value can only be set manually by an internal user.

| Enums ||
|---|---|
| `POOLER_SCALING_TYPE_UNSPECIFIED` | The scaling type is not specified. |
| `POOLER_NONE` | No pooler is enabled. |
| `POOLER_MACHINE_SIZED` | The number of poolers is automatically determined by the service based on the VM size. |
| `POOLER_MANUAL_OVERRIDE` | The number of poolers is kept unchanged no matter the machine size. |

## GCAInstanceConfig

Instance level configuration parameters related to the Gemini Cloud Assist product.

| JSON representation |
|---|
| ``` { "gcaEntitlement": enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#GCAEntitlementType`) } ``` |

| Fields ||
|---|---|
| `gcaEntitlement` | ``enum (`https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances#GCAEntitlementType`)`` Output only. Represents the GCA entitlement state of the instance. |

## GCAEntitlementType

Enum representing the type of GCA entitlement assigned to a resource.

| Enums ||
|---|---|
| `GCA_ENTITLEMENT_TYPE_UNSPECIFIED` | No GCA entitlement is assigned. |
| `GCA_STANDARD` | The resource is entitled to the GCA Standard Tier. |

## DataApiAccess

Enum for Data API access.

| Enums ||
|---|---|
| `DEFAULT_DATA_API_ENABLED_FOR_GOOGLE_CLOUD_SERVICES` | DEFAULT_DATA_API_ENABLED_FOR_GOOGLE_CLOUD_SERVICES is a default value that allows Google internal services like AlloyDB Studio to access the instance. |
| `DISABLED` | Data API access is disabled for this instance. |
| `ENABLED` | Data API access is enabled for this instance. For private IP instances, this allows authorized users to access the instance from the public internet using the instances.executeSql API. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/create` | Creates a new Instance in a given project and location. |
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/createsecondary` | Creates a new SECONDARY Instance in a given project and location. |
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/delete` | Deletes a single Instance. |
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/failover` | Forces a Failover for a highly available instance. |
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/get` | Gets details of a single Instance. |
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/getConnectionInfo` | Get instance metadata used for a connection. |
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/injectFault` | Injects fault in an instance. |
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/list` | Lists Instances in a given project and location. |
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/patch` | Updates the parameters of a single Instance. |
| ### `https://docs.cloud.google.com/alloydb/docs/reference/rest/v1beta/projects.locations.clusters.instances/restart` | Restart an Instance in a cluster. |