{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/google-cloud-memorystore/json-schema/google-cloud-memorystore-backup-schema.json",
  "title": "Backup",
  "description": "Backup of a cluster.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/google-cloud-memorystore-redis-projects-api-openapi.yml#/components/schemas/Backup",
  "properties": {
    "replicaCount": {
      "description": "Output only. Number of replicas for the cluster.",
      "type": "integer",
      "format": "int32",
      "readOnly": true
    },
    "createTime": {
      "type": "string",
      "description": "Output only. The time when the backup was created.",
      "format": "google-datetime",
      "readOnly": true
    },
    "cluster": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. Cluster resource path of this backup."
    },
    "uid": {
      "type": "string",
      "description": "Output only. System assigned unique identifier of the backup.",
      "readOnly": true
    },
    "totalSizeBytes": {
      "format": "int64",
      "readOnly": true,
      "type": "string",
      "description": "Output only. Total size of the backup in bytes."
    },
    "name": {
      "description": "Identifier. Full resource path of the backup. the last part of the name is the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster UID] OR customer specified while backup cluster. Example: 20240515123000_1234",
      "type": "string"
    },
    "nodeType": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "NODE_TYPE_UNSPECIFIED",
        "REDIS_SHARED_CORE_NANO",
        "REDIS_HIGHMEM_MEDIUM",
        "REDIS_HIGHMEM_XLARGE",
        "REDIS_STANDARD_SMALL",
        "REDIS_HIGHCPU_MEDIUM",
        "REDIS_STANDARD_LARGE",
        "REDIS_HIGHMEM_2XLARGE"
      ],
      "description": "Output only. Node type of the cluster."
    },
    "shardCount": {
      "readOnly": true,
      "type": "integer",
      "format": "int32",
      "description": "Output only. Number of shards for the cluster."
    },
    "state": {
      "description": "Output only. State of the backup.",
      "enum": [
        "STATE_UNSPECIFIED",
        "CREATING",
        "ACTIVE",
        "DELETING",
        "SUSPENDED"
      ],
      "type": "string",
      "readOnly": true
    },
    "backupFiles": {
      "type": "array",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/BackupFile"
      },
      "description": "Output only. List of backup files of the backup."
    },
    "encryptionInfo": {
      "$ref": "#/$defs/EncryptionInfo",
      "description": "Output only. Encryption information of the backup."
    },
    "backupType": {
      "readOnly": true,
      "type": "string",
      "description": "Output only. Type of the backup.",
      "enum": [
        "BACKUP_TYPE_UNSPECIFIED",
        "ON_DEMAND",
        "AUTOMATED"
      ]
    },
    "clusterUid": {
      "type": "string",
      "readOnly": true,
      "description": "Output only. Cluster uid of this backup."
    },
    "engineVersion": {
      "description": "Output only. redis-7.2, valkey-7.5",
      "readOnly": true,
      "type": "string"
    },
    "expireTime": {
      "format": "google-datetime",
      "type": "string",
      "description": "Output only. The time when the backup will expire.",
      "readOnly": true
    }
  },
  "type": "object",
  "$defs": {
    "BackupFile": {
      "properties": {
        "createTime": {
          "type": "string",
          "readOnly": true,
          "format": "google-datetime",
          "description": "Output only. The time when the backup file was created."
        },
        "fileName": {
          "readOnly": true,
          "type": "string",
          "description": "Output only. e.g: .rdb"
        },
        "sizeBytes": {
          "readOnly": true,
          "type": "string",
          "format": "int64",
          "description": "Output only. Size of the backup file in bytes."
        }
      },
      "description": "Backup is consisted of multiple backup files.",
      "type": "object"
    },
    "EncryptionInfo": {
      "type": "object",
      "description": "EncryptionInfo describes the encryption information of a cluster or a backup.",
      "properties": {
        "kmsKeyPrimaryState": {
          "description": "Output only. The state of the primary version of the KMS key perceived by the system. This field is not populated in backups.",
          "type": "string",
          "enum": [
            "KMS_KEY_STATE_UNSPECIFIED",
            "ENABLED",
            "PERMISSION_DENIED",
            "DISABLED",
            "DESTROYED",
            "DESTROY_SCHEDULED",
            "EKM_KEY_UNREACHABLE_DETECTED",
            "BILLING_DISABLED",
            "UNKNOWN_FAILURE"
          ],
          "readOnly": true
        },
        "encryptionType": {
          "readOnly": true,
          "type": "string",
          "enum": [
            "TYPE_UNSPECIFIED",
            "GOOGLE_DEFAULT_ENCRYPTION",
            "CUSTOMER_MANAGED_ENCRYPTION"
          ],
          "description": "Output only. Type of encryption."
        },
        "kmsKeyVersions": {
          "readOnly": true,
          "type": "array",
          "description": "Output only. KMS key versions that are being used to protect the data at-rest.",
          "items": {
            "type": "string"
          }
        },
        "lastUpdateTime": {
          "format": "google-datetime",
          "description": "Output only. The most recent time when the encryption info was updated.",
          "type": "string",
          "readOnly": true
        }
      }
    }
  }
}