Method: instances.reencrypt

instances.reencrypt CMEK instance with latest key version.

HTTP request

POST https://sqladmin.googleapis.com/v1/projects/{project}/instances/{instance}/reencrypt

The URL usesgRPC Transcoding syntax.

Path parameters

Parameters
project

string

ID of the project that contains the instance.

instance

string

Cloud SQL instance ID. This does not include the project ID.

Request body

The request body contains an instance ofInstancesReencryptRequest.

Response body

If successful, the response body contains an instance ofOperation.

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see theAuthentication Overview.

InstancesReencryptRequest

Database Instance reencrypt request.

JSON representation
{"backupReencryptionConfig":{object (BackupReencryptionConfig)}}
Fields
backupReencryptionConfig

object (BackupReencryptionConfig)

Configuration specific to backup re-encryption

BackupReencryptionConfig

Backup Reencryption Config

JSON representation
{"backupLimit":integer,"backupType":enum (BackupType)}
Fields
backupLimit

integer

Backup re-encryption limit

backupType

enum (BackupType)

Type of backups users want to re-encrypt.

BackupType

Backup type for re-encryption

Enums
BACKUP_TYPE_UNSPECIFIEDUnknown backup type, will be defaulted to AUTOMATIC backup type
AUTOMATEDinstances.reencrypt automatic backups
ON_DEMANDinstances.reencrypt on-demand backups

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-27 UTC.