[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-03 (世界標準時間)。"],[],[],null,["# Edit an instance\n\nThis page describes how to edit an existing AlloyDB for PostgreSQL instance.\n\nAfter you create an instance, you can edit it while it's running to change its\nsettings. For information about how instance settings and edits can impact an\ninstance, see\n[View cluster and instance settings](/alloydb/docs/cluster-settings?resource=primary).\n\n\nBefore you begin\n----------------\n\n- The Google Cloud project you are using must have been [enabled to access AlloyDB](/alloydb/docs/project-enable-access).\n- You must have one of these IAM roles in the Google Cloud project you are using:\n - `roles/alloydb.admin` (the AlloyDB Admin predefined IAM role)\n - `roles/owner` (the Owner basic IAM role)\n - `roles/editor` (the Editor basic IAM role)\n\n If you don't have any of these roles, contact your Organization Administrator to request\n access.\n\n\u003cbr /\u003e\n\nProcedure\n---------\n\nMost edits can be applied to an instance only when it's running. \n\n### Console\n\n1. In the Google Cloud console, go to the **Clusters** page.\n\n\n [Go to Clusters](https://console.cloud.google.com/alloydb/clusters)\n2. In the **Resource Name** column, click a cluster.\n3. On the **Overview** page, go to the **Instances in your cluster** section and find the instance that you want to edit. In the **Instance actions menu** , click **Edit**.\n4. Update any editable settings for your instance and click **Update Instance**.\n\n### gcloud\n\nTo use the gcloud CLI, you can\n[install and initialize](/sdk/docs/install) the Google Cloud CLI, or you\ncan use [Cloud Shell](/shell/docs/using-cloud-shell).\n\nTo edit an instance, use the\n[`instances update`](/sdk/gcloud/reference/alloydb/instances/update)\ncommand along with the configuration that you want to update, as shown in the\nfollowing example: \n\n```\ngcloud instances update INSTANCE_ID \\\n --region=REGION_ID \\\n --cluster=CLUSTER_ID \\\n```\n\n- \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e: The ID of the instance.\n- \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e: The region where the instance is placed.\n- \u003cvar translate=\"no\"\u003eCLUSTER_ID\u003c/var\u003e: The ID of the cluster where the instance is placed.\n\nThe following example command shows how to update the number of nodes in the\nread pool: \n\n```\ngcloud alloydb instances update my-read-instance \\\n --cluster=my-cluster \\\n --region=us-central1 \\\n --read-pool-node-count=3\n```\n\nTo learn more about instance configuration flags, see\n[gcloud alloydb instances update](/sdk/gcloud/reference/alloydb/instances/update)."]]