Tool: get_cluster
Get a cluster
The following sample demonstrate how to use curl to invoke the get_cluster MCP tool.
| Curl Request |
|---|
curl --location 'https://alloydb.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "get_cluster", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Message for getting a Cluster
GetClusterRequest
| JSON representation |
|---|
{
"name": string,
"view": enum ( |
| Fields | |
|---|---|
name |
Required. The name of the resource. For the required format, see the comment on the Cluster.name field. |
view |
Optional. The view of the cluster to return. Returns all default fields if not set. |
Output Schema
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.
Cluster
| 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/{cluster_id} 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 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: |
updateTime |
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: |
deleteTime |
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: |
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 |
tags |
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: An object containing a list of |
backupdrInfo |
Output only. Output only information about BackupDR protection for this cluster. |
dataplexConfig |
Optional. Configuration for Dataplex integration. |
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. |
cloudsqlBackupRunSource |
Output only. Cluster created from CloudSQL snapshot. |
backupdrBackupSource |
Output only. Cluster created from a BackupDR backup. |
Union field maintenance_version. Input only. The maintenance version to which to update the instances belonging to the cluster. maintenance_version can be only one of the following: |
|
maintenanceVersionSelectionPolicy |
Input only. Policy to use to automatically select the maintenance version to which to update the cluster's instances. |
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/{backup_id} |
MigrationSource
| 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. |
CloudSQLBackupRunSource
| JSON representation |
|---|
{ "project": string, "instanceId": string, "backupRunId": string } |
| Fields | |
|---|---|
project |
The project ID of the source CloudSQL instance. This should be the same as the AlloyDB cluster's project. |
instanceId |
Required. The CloudSQL instance ID. |
backupRunId |
Required. The CloudSQL backup run ID. |
BackupDrBackupSource
| JSON representation |
|---|
{ "backup": string } |
| Fields | |
|---|---|
backup |
Required. The name of the backup resource with the format: * projects/{project}/locations/{location}/backupVaults/{backupvault_id}/dataSources/{datasource_id}/backups/{backup_id} |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
LabelsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
NetworkConfig
| 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 |
AnnotationsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
UserPassword
| JSON representation |
|---|
{ "user": string, "password": string } |
| Fields | |
|---|---|
user |
The database username. |
password |
The initial password for the user. |
AutomatedBackupPolicy
| 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 use the cluster's encryption config. |
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. |
Union field
|
|
enabled |
Whether automated automated backups are enabled. If not set, defaults to true. |
WeeklySchedule
| 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. |
TimeOfDay
| JSON representation |
|---|
{ "hours": integer, "minutes": integer, "seconds": integer, "nanos": integer } |
| Fields | |
|---|---|
hours |
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. |
minutes |
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59. |
seconds |
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds. |
nanos |
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. |
TimeBasedRetention
| JSON representation |
|---|
{ "retentionPeriod": string } |
| Fields | |
|---|---|
retentionPeriod |
The retention period. A duration in seconds with up to nine fractional digits, ending with ' |
Duration
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years |
nanos |
Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 |
QuantityBasedRetention
| JSON representation |
|---|
{ "count": integer } |
| Fields | |
|---|---|
count |
The number of backups to retain. |
EncryptionConfig
| JSON representation |
|---|
{ "kmsKeyName": string } |
| Fields | |
|---|---|
kmsKeyName |
The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME] |
LabelsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
SslConfig
| JSON representation |
|---|
{ "sslMode": enum ( |
| Fields | |
|---|---|
sslMode |
Optional. SSL mode. Specifies client-server SSL/TLS connection behavior. |
caSource |
Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is supported currently, and is the default value. |
EncryptionInfo
| JSON representation |
|---|
{
"encryptionType": enum ( |
| Fields | |
|---|---|
encryptionType |
Output only. Type of encryption. |
kmsKeyVersions[] |
Output only. Cloud KMS key versions that are being used to protect the database or the backup. |
ContinuousBackupConfig
| 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 use the cluster's encryption config. |
Union field
|
|
enabled |
Whether ContinuousBackup is enabled. |
ContinuousBackupInfo
| 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. 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: |
schedule[] |
Output only. Days of the week on which a continuous backup is taken. |
earliestRestorableTime |
Output only. The earliest restorable time that can be restored to. If continuous backups and recovery was recently enabled, the earliest restorable time is the creation time of the earliest eligible backup within this cluster's continuous backup recovery window. After a cluster has had continuous backups enabled for the duration of its recovery window, the earliest restorable time becomes "now minus the recovery window". For example, assuming a point in time recovery is attempted at 04/16/2025 3:23:00PM with a 14d recovery window, the earliest restorable time would be 04/02/2025 3:23:00PM. This field is only visible if the CLUSTER_VIEW_CONTINUOUS_BACKUP cluster view is provided. 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: |
SecondaryConfig
| JSON representation |
|---|
{ "primaryClusterName": string } |
| Fields | |
|---|---|
primaryClusterName |
The name of the primary cluster name with the format: * projects/{project}/locations/{region}/clusters/{cluster_id} |
PrimaryConfig
| JSON representation |
|---|
{ "secondaryClusterNames": [ string ] } |
| Fields | |
|---|---|
secondaryClusterNames[] |
Output only. Names of the clusters that are replicating from this cluster. |
PscConfig
| JSON representation |
|---|
{ "pscEnabled": boolean, "serviceOwnedProjectNumber": string } |
| Fields | |
|---|---|
pscEnabled |
Optional. Create an instance that allows connections from Private Service Connect endpoints to the instance. |
serviceOwnedProjectNumber |
Output only. The project number that needs to be allowlisted on the network attachment to enable outbound connectivity. |
MaintenanceUpdatePolicy
| JSON representation |
|---|
{ "maintenanceWindows": [ { object ( |
| Fields | |
|---|---|
maintenanceWindows[] |
Preferred windows to perform maintenance. Currently limited to 1. |
denyMaintenancePeriods[] |
Periods to deny maintenance. Currently limited to 1. |
MaintenanceWindow
| 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. |
DenyMaintenancePeriod
| JSON representation |
|---|
{ "startDate": { object ( |
| Fields | |
|---|---|
startDate |
Deny period start date. This can be: * A full date, with non-zero year, month and day values OR * A month and day value, with a zero year for recurring |
endDate |
Deny period end date. This can be: * A full date, with non-zero year, month and day values OR * A month and day value, with a zero year for recurring |
time |
Time in UTC when the deny period starts on start_date and ends on end_date. This can be: * Full time OR * All zeros for 00:00:00 UTC |
Date
| JSON representation |
|---|
{ "year": integer, "month": integer, "day": integer } |
| Fields | |
|---|---|
year |
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
month |
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
day |
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. |
MaintenanceSchedule
| JSON representation |
|---|
{ "startTime": string } |
| Fields | |
|---|---|
startTime |
Output only. The scheduled start time for the maintenance. 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: |
TrialMetadata
| JSON representation |
|---|
{ "startTime": string, "endTime": string, "upgradeTime": string, "graceEndTime": string } |
| Fields | |
|---|---|
startTime |
start time of the trial cluster. 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: |
endTime |
End time of the trial cluster. 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: |
upgradeTime |
Upgrade time of trial cluster to Standard cluster. 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: |
graceEndTime |
grace end time of the cluster. 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: |
TagsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
BackupDrInfo
| JSON representation |
|---|
{ "previousWindows": [ { object ( |
| Fields | |
|---|---|
previousWindows[] |
Windows during which BackupDR was enabled for this cluster, along with associated configuration for that window. These are used to determine points-in-time for which restores can be performed. The windows are ordered with the most recent window last. Windows are mutally exclusive. Windows which closed more than 1 year ago will be removed from this list. |
Union field
|
|
currentWindow |
The current BackupDR configuration for this cluster. If BackupDR protection is not enabled for this cluster, this field will be empty. |
BackupDrEnabledWindow
| JSON representation |
|---|
{ "enabledTime": string, "backupPlanAssociation": string, "dataSource": string, "continuousBackupPreviouslyEnabled": boolean, "continuousBackupPreviouslyEnabledTime": string, "continuousBackupPreviousRecoveryWindowDays": integer, "automatedBackupPreviouslyEnabled": boolean, "logRetentionPeriod": string, // Union field |
| Fields | |
|---|---|
enabledTime |
Time when the BackupDR protection for this cluster was enabled. 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: |
backupPlanAssociation |
The BackupPlanAssociation resource that was used to enable BackupDR protection for this cluster. |
dataSource |
The DataSource resource that represents the cluster in BackupDR. |
continuousBackupPreviouslyEnabled |
Whether continuous backup was previously enabled prior to enabling BackupDR protection for this cluster. |
continuousBackupPreviouslyEnabledTime |
The time when continuous backup was previously enabled prior to enabling BackupDR protection for this cluster. 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: |
continuousBackupPreviousRecoveryWindowDays |
The retention set for the continuous backup that was previously enabled prior to enabling BackupDR protection for this cluster. |
automatedBackupPreviouslyEnabled |
Whether automated backup was previously enabled prior to enabling BackupDR protection for this cluster. |
logRetentionPeriod |
The retention period for logs generated by BackupDR for this cluster. A duration in seconds with up to nine fractional digits, ending with ' |
Union field
|
|
disabledTime |
Time when the BackupDR protection for this cluster was disabled. This field will be empty if this BackupDR window is the 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: |
DataplexConfig
| JSON representation |
|---|
{ "enabled": boolean } |
| Fields | |
|---|---|
enabled |
Dataplex is enabled by default for resources such as clusters and instances. This flag controls the integration of AlloyDB PG resources (like databases, schemas, and tables) with Dataplex." |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ✅