- [HTTP request](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/Backups/UpdateBackup#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/Backups/UpdateBackup#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/Backups/UpdateBackup#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/Backups/UpdateBackup#body.request_body)
- [Response body](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/Backups/UpdateBackup#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/Backups/UpdateBackup#body.aspect)
- [Examples](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/Backups/UpdateBackup#examples)
- [Try it!](https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/Backups/UpdateBackup#try-it)

Updates the retention period and description of the backup. You can use this API to update final backups only.

### HTTP request

`PATCH https://sqladmin.googleapis.com/v1/{backup.name=projects/*/backups/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `backup.name` | `string` Output only. The resource name of the backup. Format: projects/{project}/backups/{backup}. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The list of fields that you can update. You can update only the description and retention period of the final backup. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/Backups#Backup`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/sql/docs/mysql/admin-api/rest/v1/operations#Operation`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloudsql`
- `
  https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/sqlservice.admin`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).