This page describes self-service maintenance, which lets you apply a
maintenance update on your instance outside of the typical flow of scheduled
maintenance. To see what changes each update has, see [Memorystore for Memcached maintenance changelogs](https://docs.cloud.google.com/memorystore/docs/memcached/maintenance-changelog.md.txt).

## Overview

Memorystore for Memcached releases software improvements regularly, such as
patches for known vulnerabilities, through new maintenance versions.
Although Memorystore for Memcached schedules maintenance updates once every few
months to ensure that you have the latest maintenance version, you might want to
use self-service maintenance if any of the following conditions apply:

- You need an update sooner than your next scheduled maintenance event.
- You want to stay up-to-date with CVE patches necessary for FedRAMP Compliance.

You're not required to update to the latest version manually. You can
let Memorystore for Memcached update your maintenance version automatically during
your next scheduled maintenance event.

> [!NOTE]
> **Note:** You can update your instance's maintenance version to a newer version only.

### Impact of self-service maintenance

Self-service maintenance updates have the same impact on your applications as
standard maintenance updates. For more information, see [About maintenance](https://docs.cloud.google.com/memorystore/docs/memcached/about-maintenance.md.txt).

## View maintenance versions

You can use the [gcloud CLI](https://docs.cloud.google.com/sdk/gcloud.md.txt) to view the following information about maintenance versions that are
associated with your instance:

- The current maintenance version.
- Available maintenance versions to which you can update your instance.

To view maintenance version information about your instance, use the
[`gcloud memcache instances describe`](https://docs.cloud.google.com/sdk/gcloud/reference/memcache/instances/describe) command.

```
gcloud memcache instances describe INSTANCE_ID \
--region=REGION_NAME \
--project=PROJECT_NAME
```

Make the following replacements:

- <var translate="no">INSTANCE_ID</var>: the ID of the instance
- <var translate="no">REGION_NAME</var>: the region name for the instance
- <var translate="no">PROJECT_NAME</var>: the name of the Google Cloud project that contains the instance

The current maintenance version appears next to the
`effectiveMaintenanceVersion` field. Also, the list of available maintenance
versions appears next to the `availableMaintenanceVersions` field. If no
versions appear, then your instance has the latest version.

## Update your instance to a new maintenance version

You can use the [gcloud CLI](https://docs.cloud.google.com/sdk/gcloud.md.txt) to update your instance to a newer maintenance version.

To update the maintenance version for your instance, use the [`gcloud memcache instances update`](https://docs.cloud.google.com/sdk/gcloud/reference/memcache/instances/update.md.txt) command.

```
gcloud memcache instances update INSTANCE_ID \
--region=REGION_NAME \
--project=PROJECT_NAME \
--maintenance-version=MAINTENANCE_VERSION
```

Make the following replacements:

- <var translate="no">INSTANCE_ID</var>: the ID of the instance.
- <var translate="no">REGION_NAME</var>: the region name for the instance.
- <var translate="no">PROJECT_NAME</var>: the name of the Google Cloud project that contains the instance.
- <var translate="no">MAINTENANCE_VERSION</var>: the maintenance version to which you want to update the instance. To find available maintenance versions, see [View maintenance versions](https://docs.cloud.google.com/memorystore/docs/memcached/self-service-maintenance.md.txt#view-maintenance-versions).