AlloyDB CLI Usage
AlloyDB resources are managed using the gcloud alloydb command group.
Clusters
Create a cluster:
gcloud alloydb clusters create CLUSTER_ID --region=REGION --password=PASSWORDList clusters:
gcloud alloydb clusters list --region=REGIONGet cluster info:
gcloud alloydb clusters describe CLUSTER_ID --region=REGIONDelete a cluster:
gcloud alloydb clusters delete CLUSTER_ID --region=REGION
Instances
Create a primary instance:
gcloud alloydb instances create INSTANCE_ID --cluster=CLUSTER_ID --region=REGION --instance-type=PRIMARY --cpu-count=8Create a read pool instance:
gcloud alloydb instances create INSTANCE_ID --cluster=CLUSTER_ID --region=REGION --instance-type=READ_POOL --read-pool-node-count=2 --cpu-count=2List instances:
gcloud alloydb instances list --cluster=CLUSTER_ID --region=REGIONRestart an instance:
gcloud alloydb instances restart INSTANCE_ID --cluster=CLUSTER_ID --region=REGION
Backups
Create a backup:
gcloud alloydb backups create BACKUP_ID --cluster=CLUSTER_ID --region=REGIONList backups:
gcloud alloydb backups list --region=REGION