{
  "swagger": "2.0",
  "info": {
    "title": "TiDB Cloud Premium API",
    "description": "TiDB Cloud Premium API",
    "version": "v1beta2"
  },
  "tags": [
    {
      "name": "BackupService"
    }
  ],
  "host": "cloud.tidbapi.com",
  "basePath": "/api/v2025/cloud/v1beta2",
  "schemes": ["https"],
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "paths": {
    "/api/v2025/cloud/v1beta2/backups": {
      "get": {
        "summary": "List backups",
        "description": "Lists all backups in your organization. You can filter results by TiDB Cloud Premium instance, state, service plan, region, or time range.",
        "operationId": "BackupService_ListBackups",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2ListBackupsResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbIds",
            "description": "A list of TiDB Cloud Premium instance IDs. If specified, only backups belonging to these TiDB Cloud Premium instances are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "states",
            "description": "A list of backup states. If specified, only backups with these states are returned.\n\n - UNKNOWN: The backup state is unknown.\n - PENDING: The backup is pending.\n - RUNNING: The backup is in progress.\n - SUCCEEDED: The backup completed successfully.\n - FAILED: The backup has failed.\n - CANCELLED: The backup is cancelled.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "enum": ["UNKNOWN", "PENDING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"],
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "servicePlans",
            "description": "A list of service plans. If specified, only backups belonging to these service plans are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "enum": ["Starter", "Essential", "Premium", "BYOC", "Dedicated", "Premium_Reserved", "Essential_V2"],
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "regionIds",
            "description": "A list of region IDs. If specified, only backups in these regions are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "tidbStates",
            "description": "A list of TiDB Cloud Premium instance states. If specified, only backups from TiDB Cloud Premium instances in these states are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "enum": ["ACTIVE", "DELETED"],
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "triggerTypes",
            "description": "A list of trigger types. If specified, only backups with these trigger types are returned.\n\n - AUTO: The backup is triggered automatically by TiDB Cloud.\n - MANUAL: The backup is triggered manually by a user.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "enum": ["AUTO", "MANUAL"],
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "startTime",
            "description": "The start time of the time range filter. If specified, only backups created after this time are returned.",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "endTime",
            "description": "The end time of the time range filter. If specified, only backups created before this time are returned.",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "pageSize",
            "description": "The maximum number of backups to return. If not specified, at most 10 backups will be returned.\nThe maximum value is `100`. Values greater than `100` are set to `100`.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32",
            "default": "10"
          },
          {
            "name": "pageToken",
            "description": "The pagination token received from a previous `ListBackups` request. Use this token to retrieve the next page of results.\n\n**Note**: When paginating, all other parameters must match the original request.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "skip",
            "description": "The number of individual resources to skip before starting to return results.\nIf the skip value causes the cursor to move past the end of the collection,\nthe response will be 200 OK with an empty result set and no next_page_token.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "orgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "projectId",
            "description": "Project id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["public", "Backup"],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location 'https://cloud.tidbapi.com/v1beta2/backups' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      }
    },
    "/api/v2025/cloud/v1beta2/backups/{backupId}": {
      "delete": {
        "summary": "Delete a backup",
        "description": "Deletes a backup by `backupId`.",
        "operationId": "BackupService_DeleteBackup",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "backupId",
            "description": "The ID of the backup to delete.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "orgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "projectId",
            "description": "Project id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["public", "Backup"],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location --request DELETE 'https://cloud.tidbapi.com/v1beta2/backups/{backup_id}' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      }
    },
    "/api/v2025/cloud/v1beta2/backups:listDeletedTidbs": {
      "get": {
        "summary": "List deleted TiDB Cloud Premium instances with backups",
        "description": "Lists all deleted TiDB Cloud Premium instances that still have backups available.",
        "operationId": "BackupService_ListDeletedTidbs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ListDeletedTidbsResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbIds",
            "description": "A list of TiDB Cloud instance IDs. If specified, only deleted TiDB Cloud instances matching these IDs are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "includeEncryptionInfo",
            "description": "Indicates whether to include encryption information in the response.",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "servicePlans",
            "description": "A list of service plans. If specified, only deleted TiDB Cloud instances belonging to these service plans are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "enum": ["Starter", "Essential", "Premium", "BYOC", "Dedicated", "Premium_Reserved", "Essential_V2"],
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "regionIds",
            "description": "A list of region ids. If specified, only deleted TiDB Cloud instances belonging to these region ids are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "startTime",
            "description": "The start time of the deletion time range filter. If specified, only deleted TiDB Cloud instances deleted after this time are returned.",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "endTime",
            "description": "The end time of the deletion time range filter. If specified, only deleted TiDB Cloud instances deleted before this time are returned.",
            "in": "query",
            "required": false,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "name",
            "description": "The display name to filter by. If specified, only deleted TiDB Cloud instances with a display name containing this value are returned.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "pageSize",
            "description": "The maximum number of deleted TiDB Cloud instances to return. If not specified, at most 10 will be returned.\nThe maximum value is `100`. Values greater than `100` are set to `100`.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32",
            "default": "10"
          },
          {
            "name": "pageToken",
            "description": "The pagination token received from a previous `ListDeletedTidbs` request. Use this token to retrieve the next page of results.\n\n**Note**: When paginating, all other parameters must match the original request.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "skip",
            "description": "The number of individual resources to skip before starting to return results.\nIf the skip value causes the cursor to move past the end of the collection,\nthe response will be 200 OK with an empty result set and no next_page_token.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "orgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "projectId",
            "description": "Project id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": ["BackupService"]
      }
    }
  },
  "definitions": {
    "ListBackupsRequestTidbState": {
      "type": "string",
      "enum": ["ACTIVE", "DELETED"]
    },
    "commonv1beta1ServicePlan": {
      "type": "string",
      "enum": ["Starter", "Essential", "Premium", "BYOC", "Dedicated", "Premium_Reserved", "Essential_V2"]
    },
    "googlerpcStatus": {
      "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors).",
      "type": "object",
      "properties": {
        "code": {
          "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code].",
          "type": "integer",
          "format": "int32"
        },
        "details": {
          "description": "A list of messages that carry the error details.  There is a common set of\nmessage types for APIs to use.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/protobufAny",
            "type": "object"
          }
        },
        "message": {
          "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client.",
          "type": "string"
        }
      }
    },
    "nextgenv1beta2Backup": {
      "type": "object",
      "properties": {
        "backupTs": {
          "description": "The backup timestamp.",
          "type": "string",
          "readOnly": true
        },
        "createTime": {
          "description": "The timestamp when the backup was created, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "customerManaged": {
          "description": "Whether the source cluster used a customer-managed key at backup time. Combine with encryption_key_id: \"0\" means not encrypted; non-zero key id with false means SMEK; non-zero key id with true means CMEK.",
          "type": "boolean",
          "readOnly": true,
          "title": "Whether the source cluster used a customer-managed key at backup time.\nCombine with `encryption_key_id`:\n- `encryption_key_id == \"0\"`: backup was not encrypted\n- `encryption_key_id != \"0\" && customer_managed == false`: backup used SMEK\n- `encryption_key_id != \"0\" && customer_managed == true`: backup used CMEK"
        },
        "description": {
          "description": "The description of the backup.",
          "type": "string"
        },
        "displayName": {
          "description": "The name of the backup.",
          "type": "string",
          "readOnly": true
        },
        "encryptionKeyId": {
          "description": "Source cluster encryption key ID at backup time. \"0\" means no encryption key was used.",
          "type": "string",
          "readOnly": true
        },
        "expirationTime": {
          "description": "The timestamp when the backup expires, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "id": {
          "description": "The unique identifier of the backup.",
          "type": "string",
          "readOnly": true
        },
        "organizationId": {
          "description": "The ID of the organization to which the backup belongs.",
          "type": "string",
          "readOnly": true
        },
        "regionId": {
          "description": "The ID of the region where the backup is stored.",
          "type": "string",
          "readOnly": true
        },
        "servicePlan": {
          "description": "The service plan of the backup. The possible value is `Premium`.",
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ServicePlan"
            }
          ],
          "readOnly": true,
          "example": "Premium"
        },
        "sizeBytes": {
          "description": "The size of the backup in bytes.",
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "state": {
          "description": "The current state of the backup.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2BackupState"
            }
          ],
          "readOnly": true
        },
        "tidbId": {
          "description": "The ID of the TiDB Cloud Premium instance to which the backup belongs.",
          "type": "string",
          "readOnly": true
        },
        "triggerType": {
          "description": "The trigger type of the backup.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2BackupTriggerType"
            }
          ],
          "readOnly": true
        },
        "type": {
          "description": "The type of the backup.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2BackupType"
            }
          ],
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2BackupState": {
      "description": "The state of a backup.\n\n - UNKNOWN: The backup state is unknown.\n - PENDING: The backup is pending.\n - RUNNING: The backup is in progress.\n - SUCCEEDED: The backup completed successfully.\n - FAILED: The backup has failed.\n - CANCELLED: The backup is cancelled.",
      "type": "string",
      "enum": ["UNKNOWN", "PENDING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED"]
    },
    "nextgenv1beta2BackupTriggerType": {
      "description": "The trigger type of a backup.\n\n - AUTO: The backup is triggered automatically by TiDB Cloud.\n - MANUAL: The backup is triggered manually by a user.",
      "type": "string",
      "enum": ["AUTO", "MANUAL"]
    },
    "nextgenv1beta2BackupType": {
      "description": "The type of a backup.\n\n - SNAPSHOT: A full snapshot backup.",
      "type": "string",
      "enum": ["SNAPSHOT"]
    },
    "nextgenv1beta2CmekAccessIamPrincipalAliyunCmekPrincipal": {
      "type": "object",
      "properties": {
        "accountId": {
          "description": "The Alibaba Cloud account ID of the CMEK IAM principal.",
          "type": "string",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2CmekAccessIamPrincipalAwsCmekPrincipal": {
      "type": "object",
      "properties": {
        "accountId": {
          "description": "The AWS account ID of the CMEK IAM principal.",
          "type": "string",
          "readOnly": true
        },
        "externalId": {
          "description": "The AWS STS AssumeRole `ExternalId` that must be pinned in the KMS\nkey policy's `Condition` block when granting access to this principal.",
          "type": "string",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2CustomerManagedEncryptionKey": {
      "type": "object",
      "properties": {
        "aliyunKms": {
          "description": "The configuration for Alibaba Cloud KMS.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CustomerManagedEncryptionKeyAliyunKms"
            }
          ]
        },
        "aliyunPrincipal": {
          "description": "Alibaba Cloud RAM principal.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CmekAccessIamPrincipalAliyunCmekPrincipal"
            }
          ]
        },
        "awsKms": {
          "description": "The configuration for AWS KMS.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CustomerManagedEncryptionKeyAwsKms"
            }
          ]
        },
        "awsPrincipal": {
          "description": "AWS IAM principal.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CmekAccessIamPrincipalAwsCmekPrincipal"
            }
          ]
        },
        "cloudProvider": {
          "description": "The cloud provider where the CMEK is located.\n\n- `\"aws\"`: Amazon Web Services\n\n- `\"gcp\"`: Google Cloud (not yet supported, planned for a future release)\n\n- `\"azure\"`: Microsoft Azure (not yet supported, planned for a future release)\n\n- `\"alicloud\"`: Alibaba Cloud",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ],
          "readOnly": true
        },
        "createTime": {
          "description": "The timestamp when the CMEK was created, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "customerManagedEncryptionKeyId": {
          "description": "The ID of the CMEK.",
          "type": "string",
          "readOnly": true
        },
        "name": {
          "description": "The unique name of the CMEK, in the format of `cmeks/{cmek_id}`.",
          "type": "string",
          "readOnly": true
        },
        "regionId": {
          "description": "The region where the CMEK is located, in the format of `{cloud_provider}-{region_code}`. For example, `aws-us-west-2`.",
          "type": "string"
        },
        "servicePlan": {
          "$ref": "#/definitions/commonv1beta1ServicePlan"
        }
      },
      "required": ["regionId", "servicePlan"]
    },
    "nextgenv1beta2CustomerManagedEncryptionKeyAliyunKms": {
      "type": "object",
      "properties": {
        "kmsKeyArn": {
          "description": "The Alibaba Cloud KMS key ARN used for encryption, e.g.\n`acs:kms:ap-southeast-1:5841052134823325:key/key-sgp68887a54phjt9703ut`.",
          "type": "string"
        }
      },
      "required": ["kmsKeyArn"]
    },
    "nextgenv1beta2CustomerManagedEncryptionKeyAwsKms": {
      "type": "object",
      "properties": {
        "kmsKeyArn": {
          "description": "The Amazon Resource Name (ARN) of the AWS KMS key used for encryption.",
          "type": "string"
        }
      },
      "required": ["kmsKeyArn"]
    },
    "nextgenv1beta2ListBackupsResponse": {
      "type": "object",
      "properties": {
        "backups": {
          "description": "A list of backups that match the query.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/nextgenv1beta2Backup",
            "type": "object"
          }
        },
        "nextPageToken": {
          "description": "A token, which can be sent as `pageToken` to retrieve the next page.\nIf this field is omitted, there are no subsequent pages.",
          "type": "string"
        },
        "totalSize": {
          "description": "The total number of backups that match the query.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "protobufAny": {
      "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n    // or ...\n    if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n      foo = any.unpack(Foo.getDefaultInstance());\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }",
      "type": "object",
      "additionalProperties": {},
      "properties": {
        "@type": {
          "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.",
          "type": "string"
        }
      }
    },
    "v1beta1RegionCloudProvider": {
      "description": "Enum of cloud provider names.\n\n - aws: Amazon Web Services.\n - gcp: Google Cloud Platform.\n - azure: Microsoft Azure.\n - alicloud: Alibaba Cloud.",
      "type": "string",
      "enum": ["aws", "gcp", "azure", "alicloud"]
    },
    "v1beta2DeletedTidb": {
      "type": "object",
      "properties": {
        "cloudProvider": {
          "description": "The cloud provider where the deleted TiDB Cloud Premium instance was deployed.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ]
        },
        "deleteTime": {
          "description": "The timestamp when the TiDB Cloud Premium instance was deleted.",
          "type": "string",
          "format": "date-time"
        },
        "displayName": {
          "description": "The user-defined name of the deleted TiDB Cloud Premium instance.",
          "type": "string"
        },
        "dualLayerDataEncryption": {
          "description": "The dual-layer data encryption configuration of the deleted TiDB Cloud Premium instance.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2TidbDualLayerDataEncryption"
            }
          ]
        },
        "pitrEndTime": {
          "description": "The end time of the point-in-time recovery (PITR) window.",
          "type": "string",
          "format": "date-time"
        },
        "pitrStartTime": {
          "description": "The start time of the point-in-time recovery (PITR) window.",
          "type": "string",
          "format": "date-time"
        },
        "regionDisplayName": {
          "description": "The display name of the region where the deleted TiDB Cloud Premium instance was deployed.",
          "type": "string"
        },
        "regionId": {
          "description": "The ID of the region where the deleted TiDB Cloud Premium instance was deployed, in the format of `{cloud_provider}-{region_code}`. For example, `aws-us-west-2`.",
          "type": "string"
        },
        "servicePlan": {
          "description": "The service plan of the deleted TiDB Cloud Premium instance.",
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ServicePlan"
            }
          ]
        },
        "tidbId": {
          "description": "The ID of the deleted TiDB Cloud Premium instance.",
          "type": "string"
        }
      }
    },
    "v1beta2ListDeletedTidbsResponse": {
      "type": "object",
      "properties": {
        "items": {
          "description": "A list of deleted TiDB Cloud instances that still have backups.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/v1beta2DeletedTidb",
            "type": "object"
          }
        },
        "nextPageToken": {
          "description": "A token, which can be sent as `pageToken` to retrieve the next page.\nIf this field is omitted, there are no subsequent pages.",
          "type": "string"
        },
        "totalSize": {
          "description": "The total number of deleted TiDB Cloud instances that match the query.",
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "v1beta2TidbDualLayerDataEncryption": {
      "description": "The dual-layer data encryption configuration for a TiDB Cloud Premium instance. Specify exactly one of the following options: `noEncryption`, `defaultKey`, or `cmek`.",
      "type": "object",
      "properties": {
        "cmek": {
          "description": "Enables dual-layer data encryption using a customer-managed encryption key (CMEK).\nConfigure the key according to the cloud provider:\n- AWS: set `awsKms` and `awsPrincipal`.\n- Alibaba Cloud: set `aliyunKms` and `aliyunPrincipal`.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CustomerManagedEncryptionKey"
            }
          ]
        },
        "defaultKey": {
          "description": "Enables dual-layer data encryption using the TiDB Cloud default key.",
          "type": "object",
          "properties": {}
        },
        "noEncryption": {
          "description": "Disables dual-layer data encryption. The TiDB Cloud Premium instance uses the default encryption provided by the cloud provider.",
          "type": "object",
          "properties": {}
        }
      }
    }
  }
}
