[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eGoogle Distributed Cloud (GDC) air-gapped resources are organized within two contexts: organization and project.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egdcloud\u003c/code\u003e CLI can be used to view the current settings for your organization and project.\u003c/p\u003e\n"],["\u003cp\u003eYou can switch between different organization, project, or zone contexts by setting properties in either the active or another named configuration via the \u003ccode\u003egdcloud\u003c/code\u003e CLI.\u003c/p\u003e\n"],["\u003cp\u003eUsing the \u003ccode\u003egdcloud config set\u003c/code\u003e command can allow you to change to a new organization, project, or zone.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a new named configuration with specific organization and project settings, and then activate it to quickly switch contexts.\u003c/p\u003e\n"]]],[],null,["# View and switch context\n\nOrganization and project are the two available contexts within the\nGoogle Distributed Cloud (GDC) air-gapped resource hierarchy. You can switch\nbetween organizations and projects using gdcloud CLI properties.\nYou can view the current settings for your organization and project.\n\nView the existing settings\n--------------------------\n\nAfter you initialize the gdcloud CLI, view the existing settings for\nyour organization and project using the following commands.\n\nList gdcloud CLI properties for the active\n[configurations](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-manage-configurations): \n\n gdcloud config list\n\nPrint the organization console URL: \n\n gdcloud config get organization_console_url\n\nPrint the project property: \n\n gdcloud config get project\n\nPrint the zone property: \n\n gdcloud config get core/zone\n\nSwitch between contexts\n-----------------------\n\nIf you want to switch to a new organization or project context, you can set the\nproperties either in your active configuration, or in another named\nconfiguration.\n\n### Set properties in the active configuration\n\nSwitch to a new organization: \n\n gdcloud config set organization_console_url \u003cvar translate=\"no\"\u003eORGANIZATION_CONSOLE_URL\u003c/var\u003e\n\nSwitch to a new project: \n\n gdcloud config set project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\nSwitch to a new zone: \n\n gdcloud config set core/zone \u003cvar translate=\"no\"\u003eZONE_NAME\u003c/var\u003e\n\n### Set properties in a new named configuration\n\nAssume you have created a new named configuration `example` which has been set\nwith specific `https://console.example-org.com` and `example-project`: \n\n gdcloud config configurations create \u003cvar translate=\"no\"\u003eexample\u003c/var\u003e\n\n gdcloud config set organization_console_url \u003cvar translate=\"no\"\u003ehttps://console.example-org.com\u003c/var\u003e\n gdcloud config set project \u003cvar translate=\"no\"\u003eexample-project\u003c/var\u003e\n\nThen you can switch to use such contexts by activating the configuration\n`example`: \n\n gdcloud config configurations activate \u003cvar translate=\"no\"\u003eexample\u003c/var\u003e"]]