{
  "basePath": "/api/v2025/fs/v1beta2",
  "consumes": [
    "application/json"
  ],
  "definitions": {
    "fsv1beta2Region": {
      "description": "A representation of an fs region.",
      "properties": {
        "cloudProvider": {
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ],
          "description": "The cloud provider that offers the region.\n\n- `\"aws\"`: Amazon Web Services\n\n- `\"gcp\"`: Google Cloud\n\n- `\"azure\"`: Microsoft Azure\n\n- `\"alicloud\"`: Alibaba Cloud",
          "example": "aws",
          "readOnly": true
        },
        "displayName": {
          "description": "A human-readable name for the region. For example, `Oregon (us-west-2)`.",
          "example": "Oregon (us-west-2)",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "description": "The unique name of the region, in the format of `regions/{region_id}`. For example, `regions/aws-us-west-2`.",
          "example": "regions/aws-us-west-2",
          "pattern": "^regions/(aws|gcp|azure|alicloud)-(.+)$",
          "type": "string"
        },
        "regionId": {
          "description": "The unique identifier for the region, in the format of `{cloud_provider}-{region_code}`. For example, `aws-us-west-2`.",
          "example": "aws-us-west-2",
          "pattern": "^(aws|gcp|azure|alicloud)-[a-z0-9-]+$",
          "readOnly": true,
          "type": "string"
        },
        "serviceAddress": {
          "description": "The endpoint address of the fs regional server in this region. Call the fs regional server at this address directly for business requests.",
          "example": "https://fs-us-west-2.tidbcloud.com",
          "readOnly": true,
          "type": "string"
        },
        "state": {
          "allOf": [
            {
              "$ref": "#/definitions/fsv1beta2RegionState"
            }
          ],
          "readOnly": true
        }
      },
      "type": "object"
    },
    "fsv1beta2RegionState": {
      "description": "The lifecycle state of the region.\n\n - ACTIVE: The region is available for business requests.\n - INACTIVE: The region is not available yet.",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ],
      "type": "string"
    },
    "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).",
      "properties": {
        "code": {
          "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code].",
          "format": "int32",
          "type": "integer"
        },
        "details": {
          "description": "A list of messages that carry the error details.  There is a common set of\nmessage types for APIs to use.",
          "items": {
            "$ref": "#/definitions/protobufAny",
            "type": "object"
          },
          "type": "array"
        },
        "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"
        }
      },
      "type": "object"
    },
    "protobufAny": {
      "additionalProperties": {},
      "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(\u0026foo)) {\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 := \u0026pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := \u0026pb.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\": \u003cstring\u003e,\n      \"lastName\": \u003cstring\u003e\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    }",
      "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"
        }
      },
      "type": "object"
    },
    "tidb_cloud_open_apifsv1beta2ListRegionsResponse": {
      "properties": {
        "nextPageToken": {
          "description": "The token to retrieve the next page of results. Use this value as the `pageToken` parameter in the next request. This field is empty when there are no more pages.",
          "type": "string"
        },
        "regions": {
          "description": "A list of regions that match the query.",
          "items": {
            "$ref": "#/definitions/fsv1beta2Region",
            "type": "object"
          },
          "type": "array"
        },
        "totalSize": {
          "description": "The total number of regions that match the query.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "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.",
      "enum": [
        "aws",
        "gcp",
        "azure",
        "alicloud"
      ],
      "type": "string"
    }
  },
  "host": "fs.tidbapi.com",
  "info": {
    "description": "TiDB Cloud FS API",
    "title": "TiDB Cloud FS API",
    "version": "v1beta2"
  },
  "paths": {
    "/api/v2025/fs/v1beta2/regions": {
      "get": {
        "description": "Lists the regions where the fs service is available. Each region contains the endpoint address of the fs regional server. Use the endpoint address to call the fs regional server directly.",
        "operationId": "RegionService_ListRegions",
        "parameters": [
          {
            "description": "The cloud provider. If specified, only regions belonging to the specified cloud provider are returned.",
            "in": "query",
            "name": "cloudProvider",
            "required": false,
            "type": "string"
          },
          {
            "default": "10",
            "description": "The maximum number of regions to return. If not specified, at most 10 regions will be returned. The maximum value is `100`. Values greater than `100` are set to `100`.",
            "format": "int32",
            "in": "query",
            "name": "pageSize",
            "required": false,
            "type": "integer"
          },
          {
            "description": "The pagination token received from a previous [List regions](#tag/Region/operation/RegionService_ListRegions) 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",
            "name": "pageToken",
            "required": false,
            "type": "string"
          },
          {
            "description": "The number of regions to skip before returning results. If the value exceeds the total number of regions, the response is `200` with an empty list and no `nextPageToken`.",
            "format": "int32",
            "in": "query",
            "name": "skip",
            "required": false,
            "type": "integer"
          },
          {
            "description": "Organization id",
            "format": "uint64",
            "in": "query",
            "name": "orgId",
            "required": true,
            "type": "string"
          },
          {
            "description": "Project id",
            "format": "uint64",
            "in": "query",
            "name": "projectId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/tidb_cloud_open_apifsv1beta2ListRegionsResponse"
            }
          },
          "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"
            }
          }
        },
        "summary": "List regions",
        "tags": [
          "Region"
        ]
      }
    },
    "/api/v2025/fs/v1beta2/regions/{regionId}": {
      "get": {
        "description": "Retrieves details of a specific fs region, including the endpoint address of the fs regional server. Use the endpoint address to call the fs regional server directly.",
        "operationId": "RegionService_GetRegion",
        "parameters": [
          {
            "description": "The ID of the region to retrieve, in the format of `{cloud_provider}-{region_code}`. For example, `aws-us-west-2`.",
            "in": "path",
            "name": "regionId",
            "required": true,
            "type": "string"
          },
          {
            "description": "Organization id",
            "format": "uint64",
            "in": "query",
            "name": "orgId",
            "required": true,
            "type": "string"
          },
          {
            "description": "Project id",
            "format": "uint64",
            "in": "query",
            "name": "projectId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/fsv1beta2Region"
            }
          },
          "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"
            }
          }
        },
        "summary": "Get a region",
        "tags": [
          "Region"
        ]
      }
    }
  },
  "produces": [
    "application/json"
  ],
  "schemes": [
    "https"
  ],
  "swagger": "2.0",
  "tags": [
    {
      "name": "RegionService"
    }
  ]
}