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 ( |
Fields | |
---|---|
name |
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 |
displayName |
User-settable and human-readable display name for the Instance. |
uid |
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 |
Output only. Create time stamp Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. Update time stamp Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
deleteTime |
Output only. Delete time stamp Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
labels |
Labels as key value pairs An object containing a list of |
state |
Output only. The current serving state of the instance. |
instanceType |
Required. The type of the instance. Specified at creation time. |
machineConfig |
Configurations for the machines that host the underlying database engine. |
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 |
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 |
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 |
writableNode |
Output only. This is set for the read-write VM of the PRIMARY instance only. |
nodes[] |
Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance. |
queryInsightsConfig |
Configuration for query insights. |
observabilityConfig |
Configuration for observability. |
readPoolConfig |
Read pool instance configuration. This is required if the value of instanceType is READ_POOL. |
ipAddress |
Output only. The IP address for the Instance. This is the connection endpoint for an end-user application. |
publicIpAddress |
Output only. The public IP addresses for the Instance. This is available ONLY when enablePublicIp is set. This is the connection endpoint for an end-user application. |
reconciling |
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 |
For Resource freshness validation (https://google.aip.dev/154) |
annotations |
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 |
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 |
Optional. Client connection specific configurations |
satisfiesPzs |
Output only. Reserved for future use. |
pscInstanceConfig |
Optional. The configuration for Private Service Connect (PSC) for the instance. |
networkConfig |
Optional. Instance-level network configuration. |
geminiConfig |
Optional. Deprecated and unused. This field will be removed in the near future. |
outboundPublicIpAddresses[] |
Output only. All outbound public IP addresses configured for the instance. |
connectionPoolConfig |
Optional. The configuration for Managed Connection Pool (MCP). |
gcaConfig |
Output only. Configuration parameters related to Gemini Cloud Assist. |
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 |
Index 7 is used in the producer apis for ROLLED_BACK state. Keeping that index unused in case that state also needs to exposed via consumer apis in future. The instance has been configured to sync data from some other source. |
PROMOTING |
The instance is being promoted. |
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 |
The number of CPU's in the VM instance. |
machineType |
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 } |
Fields | |
---|---|
zoneId |
Output only. The Compute Engine zone of the VM e.g. "us-central1-b". |
id |
Output only. The identifier of the VM e.g. "test-read-0601-407e52be-ms3l". |
ip |
Output only. The private IP address of the VM e.g. "10.57.0.34". |
state |
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. |
QueryInsightsInstanceConfig
QueryInsights Instance specific configuration.
JSON representation |
---|
{ "queryStringLength": integer, "recordApplicationTags": boolean, "recordClientAddress": boolean, "queryPlansPerMinute": integer } |
Fields | |
---|---|
queryStringLength |
Query string length. The default value is 1024. Any integer between 256 and 4500 is considered valid. |
recordApplicationTags |
Record application tags for an instance. This flag is turned "on" by default. |
recordClientAddress |
Record client address for an instance. Client address is PII information. This flag is turned "on" by default. |
queryPlansPerMinute |
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, "assistiveExperiencesEnabled": boolean } |
Fields | |
---|---|
enabled |
Observability feature status for an instance. This flag is turned "off" by default. |
preserveComments |
Preserve comments in query string for an instance. This flag is turned "off" by default. |
trackWaitEvents |
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 |
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 |
Query string length. The default value is 10k. |
recordApplicationTags |
Record application tags for an instance. This flag is turned "off" by default. |
queryPlansPerMinute |
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 |
Track actively running queries on the instance. If not set, this flag is "off" by default. |
assistiveExperiencesEnabled |
Whether assistive experiences are enabled for this AlloyDB instance. |
ReadPoolConfig
Configuration for a read pool instance.
JSON representation |
---|
{ "nodeCount": integer } |
Fields | |
---|---|
nodeCount |
Read capacity, i.e. number of nodes in a read pool instance. |
UpdatePolicy
Policy to be used while updating the instance.
JSON representation |
---|
{
"mode": enum ( |
Fields | |
---|---|
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 ( |
Fields | |
---|---|
requireConnectors |
Optional. Configuration to enforce connectors only (ex: AuthProxy) connections to the database. |
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 ( |
Fields | |
---|---|
serviceAttachmentLink |
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 |
allowedConsumerProjects[] |
Optional. List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance. |
pscDnsName |
Output only. The DNS name of the instance for PSC connectivity. Name convention: |
pscInterfaceConfigs[] |
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[] |
Optional. Configurations for setting up PSC service automation. |
PscInterfaceConfig
Configuration for setting up a PSC interface to enable outbound connectivity.
JSON representation |
---|
{ "networkAttachmentResource": string } |
Fields | |
---|---|
networkAttachmentResource |
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 |
The consumer project to which the PSC service automation endpoint will be created. |
consumerNetwork |
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 |
Output only. The IP address of the PSC service automation endpoint. |
status |
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 |
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. |
InstanceNetworkConfig
Metadata related to instance-level network configuration.
JSON representation |
---|
{
"authorizedExternalNetworks": [
{
object ( |
Fields | |
---|---|
authorizedExternalNetworks[] |
Optional. A list of external network authorized to access this instance. |
enablePublicIp |
Optional. Enabling public ip for the instance. |
enableOutboundPublicIp |
Optional. Enabling an outbound public IP address to support a database server sending requests out into the internet. |
network |
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: // |
AuthorizedNetwork
AuthorizedNetwork contains metadata for an authorized network.
JSON representation |
---|
{ "cidrRange": string } |
Fields | |
---|---|
cidrRange |
CIDR range for one authorzied network of the instance. |
GeminiInstanceConfig
Deprecated and unused. This field will be removed in the near future.
JSON representation |
---|
{ "entitled": boolean } |
Fields | |
---|---|
entitled |
Output only. Deprecated and unused. This field will be removed in the near future. |
ConnectionPoolConfig
Configuration for Managed Connection Pool (MCP).
JSON representation |
---|
{
"enabled": boolean,
"enable": boolean,
"flags": {
string: string,
...
},
"defaultPoolSize": string,
"minPoolSize": string,
"poolMode": enum ( |
Fields | |
---|---|
enabled |
Optional. Whether to enable Managed Connection Pool (MCP). |
enable |
Optional. Deprecated; Prefer 'enabled' as this will be removed soon. |
flags |
Optional. Connection Pool flags, as a list of "key": "value" pairs. An object containing a list of |
defaultPoolSize |
Optional. Deprecated. Use 'flags' instead. The default pool size. Defaults to 20. |
minPoolSize |
Optional. Deprecated. Use 'flags' instead. The minimum pool size. Defaults to 0. |
poolMode |
Optional. Deprecated. Use 'flags' instead. The pool mode. Defaults to |
ignoreStartupParameters[] |
Optional. Deprecated. Use 'flags' instead. The list of startup parameters to ignore. Defaults to ["extra_float_digits"] |
maxClientConn |
Optional. Deprecated. Use 'flags' instead. The maximum number of client connections allowed. |
maxPreparedStatements |
Optional. Deprecated. Use 'flags' instead. The maximum number of prepared statements allowed. MCP makes sure that any statement prepared by a client, up to this limit, is available on the backing server connection in transaction and statement pooling mode. Even if the statement was originally prepared on another server connection. Defaults to 0. |
queryWaitTimeout |
Optional. Deprecated. Use 'flags' instead. The maximum number of seconds queries are allowed to spend waiting for execution. If the query is not assigned to a server during that time, the client is disconnected. 0 disables. |
serverIdleTimeout |
Optional. Deprecated. Use 'flags' instead. The maximum number of seconds a server is allowed to be idle before it is disconnected. 0 disables. |
statsUsers[] |
Optional. Deprecated. Use 'flags' instead. The list of users that are allowed to connect to the MCP stats console. The users must exist in the database. |
PoolMode
The pool mode. Defaults to POOL_MODE_TRANSACTION
.
Enums | |
---|---|
POOL_MODE_UNSPECIFIED |
The pool mode is not specified. Defaults to POOL_MODE_TRANSACTION . |
POOL_MODE_SESSION |
Server is released back to pool after a client disconnects. |
POOL_MODE_TRANSACTION |
Server is released back to pool after a transaction finishes. |
GCAInstanceConfig
Instance level configuration parameters related to the Gemini Cloud Assist product.
JSON representation |
---|
{
"gcaEntitlement": enum ( |
Fields | |
---|---|
gcaEntitlement |
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. |
Methods |
|
---|---|
|
Creates a new Instance in a given project and location. |
|
Creates a new SECONDARY Instance in a given project and location. |
|
Deletes a single Instance. |
|
Forces a Failover for a highly available instance. |
|
Gets details of a single Instance. |
|
Get instance metadata used for a connection. |
|
Injects fault in an instance. |
|
Lists Instances in a given project and location. |
|
Updates the parameters of a single Instance. |
|
Restart an Instance in a cluster. |