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](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/resources/gdcloud-manage-configurations.md.txt):

```bash
gdcloud config list
```

Print the organization console URL:

```bash
gdcloud config get organization_console_url
```

Print the project property:

```bash
gdcloud config get project
```

Print the zone property:

```bash
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:

```bash
gdcloud config set organization_console_url ORGANIZATION_CONSOLE_URL
```

Switch to a new project:

```bash
gdcloud config set project PROJECT_ID
```

Switch to a new zone:

```bash
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`:

```bash
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`:

```bash
gdcloud config configurations activate example
```