Reference documentation and code samples for the Google Cloud AlloyDB for PostgreSQL V1 Client class Cluster.
A cluster is a collection of regional AlloyDB resources. It can include a primary instance and one or more read pool instances.
All cluster resources share a storage layer, which scales as needed.
Generated from protobuf message google.cloud.alloydb.v1.Cluster
Namespace
Google \ Cloud \ AlloyDb \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ backup_source
↳ migration_source
↳ cloudsql_backup_run_source
↳ name
string
Output only. The name of the cluster resource with the format: * * projects/{project}/locations/{region}/clusters/{cluster_id} where the cluster ID segment should satisfy the regex expression [a-z0-9-]+
. For more details see https://google.aip.dev/122
. The prefix of the cluster resource name is the name of the parent resource: * * projects/{project}/locations/{region}
↳ display_name
string
User-settable and human-readable display name for the Cluster.
↳ 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 cluster.
↳ cluster_type
int
Output only. The type of the cluster. This is an output-only field and it's populated at the Cluster creation time or the Cluster promotion time. The cluster type is determined by which RPC was used to create the cluster (i.e. CreateCluster
vs. CreateSecondaryCluster
↳ database_version
int
Optional. The database engine major version. This is an optional field and it is populated at the Cluster creation time. If a database version is not supplied at cluster creation time, then a default database version will be used.
↳ network_config
↳ network
string
Required. The resource link for the VPC network in which cluster resources are created and from which they are accessible via Private IP. The network must belong to the same project as the cluster. It is specified in the form: projects/{project}/global/networks/{network_id}
. This is required to create a cluster. Deprecated, use network_config.network instead.
↳ 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
↳ reconciling
bool
Output only. Reconciling ( https://google.aip.dev/128#reconciliation ). Set to true if the current state of Cluster 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.
↳ initial_user
UserPassword
Input only. Initial user to setup during cluster creation. Required. If used in RestoreCluster
this is ignored.
↳ automated_backup_policy
AutomatedBackupPolicy
The automated backup policy for this cluster. If no policy is provided then the default policy will be used. If backups are supported for the cluster, the default policy takes one backup a day, has a backup window of 1 hour, and retains backups for 14 days. For more information on the defaults, consult the documentation for the message type.
↳ ssl_config
↳ encryption_config
EncryptionConfig
Optional. The encryption config can be specified to encrypt the data disks and other persistent data resources of a cluster with a customer-managed encryption key (CMEK). When this field is not specified, the cluster will then use default encryption scheme to protect the user data.
↳ encryption_info
↳ continuous_backup_config
↳ continuous_backup_info
↳ secondary_config
↳ primary_config
↳ satisfies_pzs
bool
Output only. Reserved for future use.
↳ psc_config
↳ maintenance_update_policy
MaintenanceUpdatePolicy
Optional. The maintenance update policy determines when to allow or deny updates.
↳ maintenance_schedule
MaintenanceSchedule
Output only. The maintenance schedule for the cluster, generated for a specific rollout if a maintenance window is set.
↳ subscription_type
int
Optional. Subscription type of the cluster.
↳ trial_metadata
↳ tags
array| Google\Protobuf\Internal\MapField
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing"
getBackupSource
Output only. Cluster created from backup.
hasBackupSource
setBackupSource
Output only. Cluster created from backup.
$this
getMigrationSource
Output only. Cluster created via DMS migration.
hasMigrationSource
setMigrationSource
Output only. Cluster created via DMS migration.
$this
getCloudsqlBackupRunSource
Output only. Cluster created from CloudSQL snapshot.
hasCloudsqlBackupRunSource
setCloudsqlBackupRunSource
Output only. Cluster created from CloudSQL snapshot.
$this
getName
Output only. The name of the cluster resource with the format:
- projects/{project}/locations/{region}/clusters/{cluster_id}
where the cluster ID segment should satisfy the regex expression
[a-z0-9-]+
. For more details see https://google.aip.dev/122 .
The prefix of the cluster resource name is the name of the parent resource:
- projects/{project}/locations/{region}
string
setName
Output only. The name of the cluster resource with the format:
- projects/{project}/locations/{region}/clusters/{cluster_id}
where the cluster ID segment should satisfy the regex expression
[a-z0-9-]+
. For more details see https://google.aip.dev/122 .
The prefix of the cluster resource name is the name of the parent resource:
- projects/{project}/locations/{region}
var
string
$this
getDisplayName
User-settable and human-readable display name for the Cluster.
string
setDisplayName
User-settable and human-readable display name for the Cluster.
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 cluster.
int
setState
Output only. The current serving state of the cluster.
var
int
$this
getClusterType
Output only. The type of the cluster. This is an output-only field and it's
populated at the Cluster creation time or the Cluster promotion
time. The cluster type is determined by which RPC was used to create
the cluster (i.e. CreateCluster
vs. CreateSecondaryCluster
int
setClusterType
Output only. The type of the cluster. This is an output-only field and it's
populated at the Cluster creation time or the Cluster promotion
time. The cluster type is determined by which RPC was used to create
the cluster (i.e. CreateCluster
vs. CreateSecondaryCluster
var
int
$this
getDatabaseVersion
Optional. The database engine major version. This is an optional field and it is populated at the Cluster creation time. If a database version is not supplied at cluster creation time, then a default database version will be used.
int
setDatabaseVersion
Optional. The database engine major version. This is an optional field and it is populated at the Cluster creation time. If a database version is not supplied at cluster creation time, then a default database version will be used.
var
int
$this
getNetworkConfig
Generated from protobuf field .google.cloud.alloydb.v1.Cluster.NetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL];
hasNetworkConfig
clearNetworkConfig
setNetworkConfig
Generated from protobuf field .google.cloud.alloydb.v1.Cluster.NetworkConfig network_config = 29 [(.google.api.field_behavior) = OPTIONAL];
$this
getNetwork
Required. The resource link for the VPC network in which cluster resources
are created and from which they are accessible via Private IP. The network
must belong to the same project as the cluster. It is specified in the
form: projects/{project}/global/networks/{network_id}
. This is required
to create a cluster. Deprecated, use network_config.network instead.
string
setNetwork
Required. The resource link for the VPC network in which cluster resources
are created and from which they are accessible via Private IP. The network
must belong to the same project as the cluster. It is specified in the
form: projects/{project}/global/networks/{network_id}
. This is required
to create a cluster. Deprecated, use network_config.network instead.
var
string
$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
getReconciling
Output only. Reconciling ( https://google.aip.dev/128#reconciliation ).
Set to true if the current state of Cluster 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 Cluster 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
getInitialUser
Input only. Initial user to setup during cluster creation. Required.
If used in RestoreCluster
this is ignored.
hasInitialUser
clearInitialUser
setInitialUser
Input only. Initial user to setup during cluster creation. Required.
If used in RestoreCluster
this is ignored.
$this
getAutomatedBackupPolicy
The automated backup policy for this cluster.
If no policy is provided then the default policy will be used. If backups are supported for the cluster, the default policy takes one backup a day, has a backup window of 1 hour, and retains backups for 14 days. For more information on the defaults, consult the documentation for the message type.
hasAutomatedBackupPolicy
clearAutomatedBackupPolicy
setAutomatedBackupPolicy
The automated backup policy for this cluster.
If no policy is provided then the default policy will be used. If backups are supported for the cluster, the default policy takes one backup a day, has a backup window of 1 hour, and retains backups for 14 days. For more information on the defaults, consult the documentation for the message type.
$this
getSslConfig
SSL configuration for this AlloyDB cluster.
hasSslConfig
clearSslConfig
setSslConfig
SSL configuration for this AlloyDB cluster.
$this
getEncryptionConfig
Optional. The encryption config can be specified to encrypt the data disks and other persistent data resources of a cluster with a customer-managed encryption key (CMEK). When this field is not specified, the cluster will then use default encryption scheme to protect the user data.
hasEncryptionConfig
clearEncryptionConfig
setEncryptionConfig
Optional. The encryption config can be specified to encrypt the data disks and other persistent data resources of a cluster with a customer-managed encryption key (CMEK). When this field is not specified, the cluster will then use default encryption scheme to protect the user data.
$this
getEncryptionInfo
Output only. The encryption information for the cluster.
hasEncryptionInfo
clearEncryptionInfo
setEncryptionInfo
Output only. The encryption information for the cluster.
$this
getContinuousBackupConfig
Optional. Continuous backup configuration for this cluster.
hasContinuousBackupConfig
clearContinuousBackupConfig
setContinuousBackupConfig
Optional. Continuous backup configuration for this cluster.
$this
getContinuousBackupInfo
Output only. Continuous backup properties for this cluster.
hasContinuousBackupInfo
clearContinuousBackupInfo
setContinuousBackupInfo
Output only. Continuous backup properties for this cluster.
$this
getSecondaryConfig
Cross Region replication config specific to SECONDARY cluster.
hasSecondaryConfig
clearSecondaryConfig
setSecondaryConfig
Cross Region replication config specific to SECONDARY cluster.
$this
getPrimaryConfig
Output only. Cross Region replication config specific to PRIMARY cluster.
hasPrimaryConfig
clearPrimaryConfig
setPrimaryConfig
Output only. Cross Region replication config specific to PRIMARY cluster.
$this
getSatisfiesPzs
Output only. Reserved for future use.
bool
setSatisfiesPzs
Output only. Reserved for future use.
var
bool
$this
getPscConfig
Optional. The configuration for Private Service Connect (PSC) for the cluster.
hasPscConfig
clearPscConfig
setPscConfig
Optional. The configuration for Private Service Connect (PSC) for the cluster.
$this
getMaintenanceUpdatePolicy
Optional. The maintenance update policy determines when to allow or deny updates.
hasMaintenanceUpdatePolicy
clearMaintenanceUpdatePolicy
setMaintenanceUpdatePolicy
Optional. The maintenance update policy determines when to allow or deny updates.
$this
getMaintenanceSchedule
Output only. The maintenance schedule for the cluster, generated for a specific rollout if a maintenance window is set.
hasMaintenanceSchedule
clearMaintenanceSchedule
setMaintenanceSchedule
Output only. The maintenance schedule for the cluster, generated for a specific rollout if a maintenance window is set.
$this
getSubscriptionType
Optional. Subscription type of the cluster.
int
setSubscriptionType
Optional. Subscription type of the cluster.
var
int
$this
getTrialMetadata
Output only. Metadata for free trial clusters
hasTrialMetadata
clearTrialMetadata
setTrialMetadata
Output only. Metadata for free trial clusters
$this
getTags
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example:
"123/environment": "production",
"123/costCenter": "marketing"
setTags
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example:
"123/environment": "production",
"123/costCenter": "marketing"
$this
getSource
string