Viewing high-level information about Memorystore for Valkey instances is
essential to obtain a comprehensive snapshot of the instance's state,
configuration, and connectivity.

The following are sample use cases for viewing summary information about
Memorystore for Valkey instances:

- **Retrieve connection endpoints** : For Cluster Mode Enabled instances, you can retrieve the [discovery endpoint](https://docs.cloud.google.com/memorystore/docs/valkey/instance-node-specification.md.txt#discovery_endpoint), which consists of an IP address and port number. For Cluster Mode Disabled instances, you can obtain the [primary](https://docs.cloud.google.com/memorystore/docs/valkey/instance-node-specification.md.txt#primary_endpoint) and [reader](https://docs.cloud.google.com/memorystore/docs/valkey/instance-node-specification.md.txt#reader_endpoint) endpoints that you need to configure your client applications to connect to the instance.
- **Verify custom configurations** : view configuration parameters that a user applies to an instance. For example, you can obtain the value that a user sets for the [`maxmemory-policy`](https://docs.cloud.google.com/memorystore/docs/valkey/supported-instance-configurations.md.txt#modifiable_configuration_parameters) parameter.
- **Check information about nodes and shards**: obtain information about the nodes and shards associated with an instance. This includes the number of shards, the node type, and the number of replicas that each shard has.
- **Confirm data resiliency settings** : verify active [persistence](https://docs.cloud.google.com/memorystore/docs/valkey/persistence-overview.md.txt) modes for Redis Database (RDB) snapshots and Append-Only File (AOF) log files, as well as the status of whether an instance is protected from accidental deletion.

## View instance summary information

You can view summary information about an instance by using either the
Google Cloud console or the [gcloud CLI](https://docs.cloud.google.com/sdk/gcloud.md.txt).

### Console

1. In the Google Cloud console, go to the **Memorystore for Valkey**
   page.

   [Memorystore for Valkey](https://console.cloud.google.com/memorystore/valkey/instances)
2. Click the ID of an instance about which you want to view summary
   information.

### gcloud

To view summary information about an instance, use the
[`gcloud memorystore instances describe`](https://docs.cloud.google.com/sdk/gcloud/reference/memorystore/instances/describe)
command:

```
gcloud memorystore instances describe INSTANCE_ID \
--location=REGION_ID
```

Make the following replacements:

- <var translate="no">INSTANCE_ID</var>: the ID of the instance about which you want to view summary information
- <var translate="no">REGION_ID</var>: the region where the instance is located

For example:

```
gcloud memorystore instances describe my-instance \
--location=us-central1
```

## View zones for an instance

You can view which zones an instance uses by using either the Google Cloud console
or the [gcloud CLI](https://docs.cloud.google.com/sdk/gcloud.md.txt).

### Console

The Google Cloud console displays a tooltip, which lists the zones that your
instance uses. If the instance is running in a two-zone deployment, then the
tooltip indicates this deployment type. For more information, see [Two-zone deployments for high availability and resilience](https://docs.cloud.google.com/memorystore/docs/valkey/ha-and-replicas.md.txt#two-zone-deployments).

To view which zones an instance uses, do the following:

1. In the Google Cloud console, go to the **Memorystore for Valkey**
   page.

   [Memorystore for Valkey](https://console.cloud.google.com/memorystore/valkey/instances)
2. Hold your mouse pointer over the number of zones for the instance.

### gcloud

To view which zones an instance uses, use the [`gcloud memorystore instances describe`](https://docs.cloud.google.com/sdk/gcloud/reference/memorystore/instances/describe) command with the
`--format="yaml(zoneDistributionConfig)"` flag.

```
gcloud memorystore instances describe INSTANCE_ID \
  --location=REGION_ID \
  --format="yaml(zoneDistributionConfig)"
```

Make the following replacements:

- <var translate="no">INSTANCE_ID</var>: the ID of the instance
- <var translate="no">REGION_ID</var>: the region where the instance is located

### REST

To view the zones that an instance uses, use the following REST command.


Before using any of the request data,
make the following replacements:

- <var translate="no">PROJECT_ID</var>: the ID of the project that contains the instance
- <var translate="no">REGION_ID</var>: the region where the instance is located
- <var translate="no">INSTANCE_ID</var>: the ID of the instance


HTTP method and URL:

```
GET https://memorystore.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/instancesINSTANCE_ID
```

To send your request, expand one of these options:

#### curl (Linux, macOS, or Cloud Shell)

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) , or by using [Cloud Shell](https://docs.cloud.google.com/shell/docs.md.txt), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


Execute the following command:

```
curl -X GET \
     -H "Authorization: Bearer $(gcloud auth print-access-token)" \
     "https://memorystore.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/instancesINSTANCE_ID"
```

#### PowerShell (Windows)

> [!NOTE]
> **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](https://docs.cloud.google.com/sdk/gcloud/reference/init) or [`gcloud auth login`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/login.md.txt) . You can check the currently active account by running [`gcloud auth list`](https://docs.cloud.google.com/sdk/gcloud/reference/auth/list.md.txt).


Execute the following command:

```
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
    -Method GET `
    -Headers $headers `
    -Uri "https://memorystore.googleapis.com/v1/projects/PROJECT_ID/locations/REGION_ID/instancesINSTANCE_ID" | Select-Object -Expand Content
```

You should receive a JSON response similar to the following:

```
{
  "name": "projects/PROJECT_ID/locations/REGION_ID/instances/INSTANCE_ID",
  "state": "ACTIVE",
  "shardCount": SHARD_COUNT,
  "zoneDistributionConfig": {
    "mode": "MULTI_ZONE",
    "zones": [
      "ZONE_1",
      "ZONE_2",
      "ZONE_3"
    ],
    "activeZones": [
      "ZONE_1",
      "ZONE_2"
    ]
  }
}
```

<br />