Reference documentation and code samples for the Google Cloud AlloyDB for PostgreSQL V1alpha Client class Instance.
An Instance is a computing unit that an end customer can connect to.
It's the main unit of computing resources in AlloyDB.
Generated from protobuf message google.cloud.alloydb.v1alpha.Instance
Namespace
Google \ Cloud \ AlloyDb \ V1alphaMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. The name of the instance resource with the format: * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id} 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/{cluster_id}
↳ display_name
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.
↳ create_time
↳ update_time
↳ delete_time
↳ labels
↳ state
int
Output only. The current serving state of the instance.
↳ instance_type
int
Required. The type of the instance. Specified at creation time.
↳ machine_config
Google\Cloud\AlloyDb\V1alpha\Instance\MachineConfig
Configurations for the machines that host the underlying database engine.
↳ availability_type
int
Availability type of an Instance. If empty, defaults to REGIONAL for primary instances. For read pools, availability_type 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).
↳ gce_zone
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.
↳ database_flags
array| Google\Protobuf\Internal\MapField
Database flags. Set at instance level. * They are copied from primary instance on read instance creation. * Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary. 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 onfor true and offfor false. This field must be omitted if the flag doesn't take a value.
↳ writable_node
Google\Cloud\AlloyDb\V1alpha\Instance\Node
Output only. This is set for the read-write VM of the PRIMARY instance only.
↳ nodes
array< Google\Cloud\AlloyDb\V1alpha\Instance\Node
>
Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance.
↳ query_insights_config
↳ read_pool_config
Google\Cloud\AlloyDb\V1alpha\Instance\ReadPoolConfig
Read pool instance configuration. This is required if the value of instanceType is READ_POOL.
↳ ip_address
string
Output only. The IP address for the Instance. This is the connection endpoint for an end-user application.
↳ public_ip_address
string
Output only. The public IP addresses for the Instance. This is available ONLY when enable_public_ip is set. This is the connection endpoint for an end-user application.
↳ reconciling
bool
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
↳ annotations
array| Google\Protobuf\Internal\MapField
Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128
↳ update_policy
Google\Cloud\AlloyDb\V1alpha\Instance\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.
↳ client_connection_config
Google\Cloud\AlloyDb\V1alpha\Instance\ClientConnectionConfig
Optional. Client connection specific configurations
↳ satisfies_pzi
bool
Output only. Reserved for future use.
↳ satisfies_pzs
bool
Output only. Reserved for future use.
↳ psc_instance_config
Google\Cloud\AlloyDb\V1alpha\Instance\PscInstanceConfig
Optional. The configuration for Private Service Connect (PSC) for the instance.
↳ network_config
Google\Cloud\AlloyDb\V1alpha\Instance\InstanceNetworkConfig
Optional. Instance level network configuration.
getName
Output only. The name of the instance resource with the format:
- projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
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/{cluster_id}
string
setName
Output only. The name of the instance resource with the format:
- projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
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/{cluster_id}
var
string
$this
getDisplayName
User-settable and human-readable display name for the Instance.
string
setDisplayName
User-settable and human-readable display name for the Instance.
var
string
$this
getUid
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.
string
setUid
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.
var
string
$this
getCreateTime
Output only. Create time stamp
hasCreateTime
clearCreateTime
setCreateTime
Output only. Create time stamp
$this
getUpdateTime
Output only. Update time stamp
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. Update time stamp
$this
getDeleteTime
Output only. Delete time stamp
hasDeleteTime
clearDeleteTime
setDeleteTime
Output only. Delete time stamp
$this
getLabels
Labels as key value pairs
setLabels
Labels as key value pairs
$this
getState
Output only. The current serving state of the instance.
int
setState
Output only. The current serving state of the instance.
var
int
$this
getInstanceType
Required. The type of the instance. Specified at creation time.
int
setInstanceType
Required. The type of the instance. Specified at creation time.
var
int
$this
getMachineConfig
Configurations for the machines that host the underlying database engine.
hasMachineConfig
clearMachineConfig
setMachineConfig
Configurations for the machines that host the underlying database engine.
$this
getAvailabilityType
Availability type of an Instance.
If empty, defaults to REGIONAL for primary instances. For read pools, availability_type 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).
int
setAvailabilityType
Availability type of an Instance.
If empty, defaults to REGIONAL for primary instances. For read pools, availability_type 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).
var
int
$this
getGceZone
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.
string
setGceZone
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.
var
string
$this
getDatabaseFlags
Database flags. Set at instance level.
- They are copied from primary instance on read instance creation.
- Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary. 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 onfor true and offfor false. This field must be omitted if the flag doesn't take a value.
setDatabaseFlags
Database flags. Set at instance level.
- They are copied from primary instance on read instance creation.
- Read instances can set new or override existing flags that are relevant for reads, e.g. for enabling columnar cache on a read instance. Flags set on read instance may or may not be present on primary. 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 onfor true and offfor false. This field must be omitted if the flag doesn't take a value.
$this
getWritableNode
Output only. This is set for the read-write VM of the PRIMARY instance only.
hasWritableNode
clearWritableNode
setWritableNode
Output only. This is set for the read-write VM of the PRIMARY instance only.
$this
getNodes
Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance.
setNodes
Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance.
$this
getQueryInsightsConfig
Configuration for query insights.
hasQueryInsightsConfig
clearQueryInsightsConfig
setQueryInsightsConfig
Configuration for query insights.
$this
getReadPoolConfig
Read pool instance configuration.
This is required if the value of instanceType is READ_POOL.
hasReadPoolConfig
clearReadPoolConfig
setReadPoolConfig
Read pool instance configuration.
This is required if the value of instanceType is READ_POOL.
$this
getIpAddress
Output only. The IP address for the Instance.
This is the connection endpoint for an end-user application.
string
setIpAddress
Output only. The IP address for the Instance.
This is the connection endpoint for an end-user application.
var
string
$this
getPublicIpAddress
Output only. The public IP addresses for the Instance. This is available ONLY when enable_public_ip is set. This is the connection endpoint for an end-user application.
string
setPublicIpAddress
Output only. The public IP addresses for the Instance. This is available ONLY when enable_public_ip is set. This is the connection endpoint for an end-user application.
var
string
$this
getReconciling
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.
bool
setReconciling
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.
var
bool
$this
getEtag
For Resource freshness validation ( https://google.aip.dev/154 )
string
setEtag
For Resource freshness validation ( https://google.aip.dev/154 )
var
string
$this
getAnnotations
Annotations to allow client tools to store small amount of arbitrary data.
This is distinct from labels. https://google.aip.dev/128
setAnnotations
Annotations to allow client tools to store small amount of arbitrary data.
This is distinct from labels. https://google.aip.dev/128
$this
getUpdatePolicy
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.
hasUpdatePolicy
clearUpdatePolicy
setUpdatePolicy
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.
$this
getClientConnectionConfig
Optional. Client connection specific configurations
hasClientConnectionConfig
clearClientConnectionConfig
setClientConnectionConfig
Optional. Client connection specific configurations
$this
getSatisfiesPzi
Output only. Reserved for future use.
bool
setSatisfiesPzi
Output only. Reserved for future use.
var
bool
$this
getSatisfiesPzs
Output only. Reserved for future use.
bool
setSatisfiesPzs
Output only. Reserved for future use.
var
bool
$this
getPscInstanceConfig
Optional. The configuration for Private Service Connect (PSC) for the instance.
hasPscInstanceConfig
clearPscInstanceConfig
setPscInstanceConfig
Optional. The configuration for Private Service Connect (PSC) for the instance.
$this
getNetworkConfig
Optional. Instance level network configuration.
hasNetworkConfig
clearNetworkConfig
setNetworkConfig
Optional. Instance level network configuration.
$this