Resource: 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.
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 cluster resource with the format: * projects/{project}/locations/{region}/clusters/{clusterId} where the cluster ID segment should satisfy the regex expression |
displayName |
User-settable and human-readable display name for the Cluster. |
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 A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. Update time stamp A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
deleteTime |
Output only. Delete time stamp A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
Labels as key value pairs An object containing a list of |
state |
Output only. The current serving state of the cluster. |
clusterType |
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. |
databaseVersion |
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. |
networkConfig |
|
network |
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: |
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 |
reconciling |
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. |
initialUser |
Input only. Initial user to setup during cluster creation. Required. If used in |
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. |
sslConfig |
SSL configuration for this AlloyDB cluster. |
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. |
encryptionInfo |
Output only. The encryption information for the cluster. |
continuousBackupConfig |
Optional. Continuous backup configuration for this cluster. |
continuousBackupInfo |
Output only. Continuous backup properties for this cluster. |
secondaryConfig |
Cross Region replication config specific to SECONDARY cluster. |
primaryConfig |
Output only. Cross Region replication config specific to PRIMARY cluster. |
satisfiesPzs |
Output only. Reserved for future use. |
pscConfig |
Optional. The configuration for Private Service Connect (PSC) for the cluster. |
maintenanceUpdatePolicy |
Optional. The maintenance update policy determines when to allow or deny updates. |
maintenanceSchedule |
Output only. The maintenance schedule for the cluster, generated for a specific rollout if a maintenance window is set. |
subscriptionType |
Optional. Subscription type of the cluster. |
trialMetadata |
Output only. Metadata for free trial clusters |
Union field source . In case of an imported cluster, this field contains information about the source this cluster was imported from. source can be only one of the following: |
|
backupSource |
Output only. Cluster created from backup. |
migrationSource |
Output only. Cluster created via DMS migration. |
BackupSource
Message describing a BackupSource.
JSON representation |
---|
{ "backupUid": string, "backupName": string } |
Fields | |
---|---|
backupUid |
Output only. The system-generated UID of the backup which was used to create this resource. The UID is generated when the backup is created, and it is retained until the backup is deleted. |
backupName |
Required. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId} |
MigrationSource
Subset of the source instance configuration that is available when reading the cluster resource.
JSON representation |
---|
{
"hostPort": string,
"referenceId": string,
"sourceType": enum ( |
Fields | |
---|---|
hostPort |
Output only. The host and port of the on-premises instance in host:port format |
referenceId |
Output only. Place holder for the external source identifier(e.g DMS job name) that created the cluster. |
sourceType |
Output only. Type of migration source. |
MigrationSourceType
Denote the type of migration source that created this cluster.
Enums | |
---|---|
MIGRATION_SOURCE_TYPE_UNSPECIFIED |
Migration source is unknown. |
DMS |
DMS source means the cluster was created via DMS migration job. |
State
Cluster State
Enums | |
---|---|
STATE_UNSPECIFIED |
The state of the cluster is unknown. |
READY |
The cluster is active and running. |
STOPPED |
The cluster is stopped. All instances in the cluster are stopped. Customers can start a stopped cluster at any point and all their instances will come back to life with same names and IP resources. In this state, customer pays for storage. Associated backups could also be present in a stopped cluster. |
EMPTY |
The cluster is empty and has no associated resources. All instances, associated storage and backups have been deleted. |
CREATING |
The cluster is being created. |
DELETING |
The cluster is being deleted. |
FAILED |
The creation of the cluster failed. |
BOOTSTRAPPING |
The cluster is bootstrapping with data from some other source. Direct mutations to the cluster (e.g. adding read pool) are not allowed. |
MAINTENANCE |
The cluster is under maintenance. AlloyDB regularly performs maintenance and upgrades on customer clusters. Updates on the cluster are not allowed while the cluster is in this state. |
PROMOTING |
The cluster is being promoted. |
ClusterType
Type of Cluster
Enums | |
---|---|
CLUSTER_TYPE_UNSPECIFIED |
The type of the cluster is unknown. |
PRIMARY |
Primary cluster that support read and write operations. |
SECONDARY |
Secondary cluster that is replicating from another region. This only supports read. |
NetworkConfig
Metadata related to network configuration.
JSON representation |
---|
{ "network": string, "allocatedIpRange": string } |
Fields | |
---|---|
network |
Optional. 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: |
allocatedIpRange |
Optional. Name of the allocated IP range for the private IP AlloyDB cluster, for example: "google-managed-services-default". If set, the instance IPs for this cluster will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression |
UserPassword
The username/password for a database user. Used for specifying initial users at cluster creation time.
JSON representation |
---|
{ "user": string, "password": string } |
Fields | |
---|---|
user |
The database username. |
password |
The initial password for the user. |
AutomatedBackupPolicy
Message describing the user-specified automated backup policy.
All fields in the automated backup policy are optional. Defaults for each field are provided if they are not set.
JSON representation |
---|
{ "backupWindow": string, "encryptionConfig": { object ( |
Fields | |
---|---|
backupWindow |
The length of the time window during which a backup can be taken. If a backup does not succeed within this time window, it will be canceled and considered failed. The backup window must be at least 5 minutes long. There is no upper bound on the window. If not set, it defaults to 1 hour. A duration in seconds with up to nine fractional digits, ending with ' |
encryptionConfig |
Optional. The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data. |
location |
The location where the backup will be stored. Currently, the only supported option is to store the backup in the same region as the cluster. If empty, defaults to the region of the cluster. |
labels |
Labels to apply to backups created using this configuration. An object containing a list of |
Union field A schedule specifies times at which to start a backup. If a backup window is also provided, the backup is guaranteed to be started and completed within the start time plus the backup window. If the backup is not completed within the backup window it is marked as failed. If not set, the schedule defaults to a weekly schedule with one backup per day and a start time chosen arbitrarily. |
|
weeklySchedule |
Weekly schedule for the Backup. |
Union field The retention policy for a backup is fixed at the time the backup is created. Changes to this field only apply to new backups taken with the policy; the retentions of existing backups remain unchanged. If no retention policy is set, a default of 14 days is used. |
|
timeBasedRetention |
Time-based Backup retention policy. |
quantityBasedRetention |
Quantity-based Backup retention policy to retain recent backups. |
enabled |
Whether automated automated backups are enabled. If not set, defaults to true. |
WeeklySchedule
A weekly schedule starts a backup at prescribed start times within a day, for the specified days of the week.
The weekly schedule message is flexible and can be used to create many types of schedules. For example, to have a daily backup that starts at 22:00, configure the startTimes
field to have one element "22:00" and the daysOfWeek
field to have all seven days of the week.
JSON representation |
---|
{ "startTimes": [ { object ( |
Fields | |
---|---|
startTimes[] |
The times during the day to start a backup. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00). If no start times are provided, a single fixed start time is chosen arbitrarily. |
daysOfWeek[] |
The days of the week to perform a backup. If this field is left empty, the default of every day of the week is used. |
TimeBasedRetention
A time based retention policy specifies that all backups within a certain time period should be retained.
JSON representation |
---|
{ "retentionPeriod": string } |
Fields | |
---|---|
retentionPeriod |
The retention period. A duration in seconds with up to nine fractional digits, ending with ' |
QuantityBasedRetention
A quantity based policy specifies that a certain number of the most recent successful backups should be retained.
JSON representation |
---|
{ "count": integer } |
Fields | |
---|---|
count |
The number of backups to retain. |
ContinuousBackupConfig
ContinuousBackupConfig describes the continuous backups recovery configurations of a cluster.
JSON representation |
---|
{
"recoveryWindowDays": integer,
"encryptionConfig": {
object ( |
Fields | |
---|---|
recoveryWindowDays |
The number of days that are eligible to restore from using PITR. To support the entire recovery window, backups and logs are retained for one day more than the recovery window. If not set, defaults to 14 days. |
encryptionConfig |
The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data. |
enabled |
Whether ContinuousBackup is enabled. |
ContinuousBackupInfo
ContinuousBackupInfo describes the continuous backup properties of a cluster.
JSON representation |
---|
{ "encryptionInfo": { object ( |
Fields | |
---|---|
encryptionInfo |
Output only. The encryption information for the WALs and backups required for ContinuousBackup. |
enabledTime |
Output only. When ContinuousBackup was most recently enabled. Set to null if ContinuousBackup is not enabled. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
schedule[] |
Output only. Days of the week on which a continuous backup is taken. Output only field. Ignored if passed into the request. |
earliestRestorableTime |
Output only. The earliest restorable time that can be restored to. Output only field. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
SecondaryConfig
Configuration information for the secondary cluster. This should be set if and only if the cluster is of type SECONDARY.
JSON representation |
---|
{ "primaryClusterName": string } |
Fields | |
---|---|
primaryClusterName |
The name of the primary cluster name with the format: * projects/{project}/locations/{region}/clusters/{clusterId} |
PrimaryConfig
Configuration for the primary cluster. It has the list of clusters that are replicating from this cluster. This should be set if and only if the cluster is of type PRIMARY.
JSON representation |
---|
{ "secondaryClusterNames": [ string ] } |
Fields | |
---|---|
secondaryClusterNames[] |
Output only. Names of the clusters that are replicating from this cluster. |
PscConfig
PscConfig contains PSC related configuration at a cluster level.
JSON representation |
---|
{ "pscEnabled": boolean } |
Fields | |
---|---|
pscEnabled |
Optional. Create an instance that allows connections from Private Service Connect endpoints to the instance. |
MaintenanceUpdatePolicy
MaintenanceUpdatePolicy defines the policy for system updates.
JSON representation |
---|
{
"maintenanceWindows": [
{
object ( |
Fields | |
---|---|
maintenanceWindows[] |
Preferred windows to perform maintenance. Currently limited to 1. |
MaintenanceWindow
MaintenanceWindow specifies a preferred day and time for maintenance.
JSON representation |
---|
{ "day": enum ( |
Fields | |
---|---|
day |
Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, etc. |
startTime |
Preferred time to start the maintenance operation on the specified day. Maintenance will start within 1 hour of this time. |
MaintenanceSchedule
MaintenanceSchedule stores the maintenance schedule generated from the MaintenanceUpdatePolicy, once a maintenance rollout is triggered, if MaintenanceWindow is set, and if there is no conflicting DenyPeriod. The schedule is cleared once the update takes place. This field cannot be manually changed; modify the MaintenanceUpdatePolicy instead.
JSON representation |
---|
{ "startTime": string } |
Fields | |
---|---|
startTime |
Output only. The scheduled start time for the maintenance. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
SubscriptionType
Subscription_type added to distinguish between Standard and Trial subscription. By default, subscription type is considered STANDARD unless explicitly specified.
Enums | |
---|---|
SUBSCRIPTION_TYPE_UNSPECIFIED |
This is an unknown Subscription type (By default, Subscription Type is STANDARD) |
STANDARD |
Standard subscription. |
TRIAL |
Trial subscription. |
TrialMetadata
Contains information and all metadata related to TRIAL clusters.
JSON representation |
---|
{ "startTime": string, "endTime": string, "upgradeTime": string, "graceEndTime": string } |
Fields | |
---|---|
startTime |
start time of the trial cluster. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
endTime |
End time of the trial cluster. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
upgradeTime |
Upgrade time of trial cluster to Standard cluster. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
graceEndTime |
grace end time of the cluster. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
Methods |
|
---|---|
|
Creates a new Cluster in a given project and location. |
|
Creates a cluster of type SECONDARY in the given location using the primary cluster as the source. |
|
Deletes a single Cluster. |
|
Gets details of a single Cluster. |
|
Lists Clusters in a given project and location. |
|
Updates the parameters of a single Cluster. |
|
Promotes a SECONDARY cluster. |
|
Creates a new Cluster in a given project and location, with a volume restored from the provided source, either a backup ID or a point-in-time and a source cluster. |
|
Switches the role of PRIMARY and SECONDARY cluster without any data loss. |