View and switch context

Organization and project are the two available contexts within the Google Distributed Cloud (GDC) air-gapped resource hierarchy. You can switch between organizations and projects using gdcloud CLI properties. You can view the current settings for your organization and project.

View the existing settings

After you initialize the gdcloud CLI, view the existing settings for your organization and project using the following commands.

List gdcloud CLI properties for the active configurations :

 gdcloud  
config  
list 

Print the organization console URL:

 gdcloud  
config  
get  
organization_console_url 

Print the project property:

 gdcloud  
config  
get  
project 

Print the zone property:

 gdcloud  
config  
get  
core/zone 

Switch between contexts

If you want to switch to a new organization or project context, you can set the properties either in your active configuration, or in another named configuration.

Set properties in the active configuration

Switch to a new organization:

 gdcloud  
config  
 set 
  
organization_console_url  
 ORGANIZATION_CONSOLE_URL 
 

Switch to a new project:

 gdcloud  
config  
 set 
  
project  
 PROJECT_ID 
 

Switch to a new zone:

 gdcloud  
config  
 set 
  
core/zone  
 ZONE_NAME 
 

Set properties in a new named configuration

Assume you have created a new named configuration example which has been set with specific https://console.example-org.com and example-project :

 gdcloud  
config  
configurations  
create  
 example 
gdcloud  
config  
 set 
  
organization_console_url  
 https://console.example-org.com 
gdcloud  
config  
 set 
  
project  
 example-project 
 

Then you can switch to use such contexts by activating the configuration example :

 gdcloud  
config  
configurations  
activate  
 example 
 
Create a Mobile Website
View Site in Mobile | Classic
Share by: