ETCD v3 restful api 使用详解

2023-11-04

ETCD v3 restful api 使用详解


网上已经有很多关于v2接口的使用了,类型下面的请求方式,本文就主要讲解v3版本的restful api的使用方式。

//V2版本
 curl http://127.0.0.1:2379/v2/keys/hello -XPUT -d value="world" // 创建键值对(hello:"world")
 curl http://127.0.0.1:2379/v2/keys/hello //查看hello键的值
 curl http://127.0.0.1:2379/v2/keys/hello -X DELETE //删除hello键值对


etcd v3使用gRPC作为其消息传递协议。 etcd项目包括一个基于gRPC的Go客户端和一个命令行实用程序etcdctl,用于通过gRPC与etcd集群进行通信。 对于不支持gRPC的语言,etcd提供了JSON gRPC网关。 该网关提供一个RESTful代理,该代理将HTTP/JSON请求转换为gRPC消息。

 

使用gRPC网关

网关接受etcd协议缓冲区消息定义的JSON映射。 请注意,键和值字段定义为字节数组,因此必须使用JSON进行base64编码。 以下示例使用curl,但是任何HTTP/JSON客户端都应相同。

 

注意:

自etcd v3.3起,gRPC网关endpoint已更改:

etcd v3.2 or before uses only [CLIENT-URL]/v3alpha/*.
etcd v3.3 uses [CLIENT-URL]/v3beta/* while keeping [CLIENT-URL]/v3alpha/*.
etcd v3.4 uses [CLIENT-URL]/v3/* while keeping [CLIENT-URL]/v3beta/*.
[CLIENT-URL]/v3alpha/* is deprecated.
etcd v3.5 or later uses only [CLIENT-URL]/v3/*.
[CLIENT-URL]/v3beta/* is deprecated.
gRPC网关不支持使用TLS通用名称的身份验证。

 

Put and get keys

Use the /v3/kv/range and /v3/kv/put services to read and write keys:

curl -L http://localhost:2379/v3/kv/put \
  -X POST -d '{"key": "Zm9v", "value": "YmFy"}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"}}

curl -L http://localhost:2379/v3/kv/range \
  -X POST -d '{"key": "Zm9v"}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}],"count":"1"}

# get all keys prefixed with "foo"
curl -L http://localhost:2379/v3/kv/range \
  -X POST -d '{"key": "Zm9v", "range_end": "Zm9w"}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"3"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}],"count":"1"}



Watch keys

Use the /v3/watch service to watch keys:

curl -N http://localhost:2379/v3/watch \
  -X POST -d '{"create_request": {"key":"Zm9v"} }' &
# {"result":{"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"1","raft_term":"2"},"created":true}}

curl -L http://localhost:2379/v3/kv/put \
  -X POST -d '{"key": "Zm9v", "value": "YmFy"}' >/dev/null 2>&1
# {"result":{"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"2","raft_term":"2"},"events":[{"kv":{"key":"Zm9v","create_revision":"2","mod_revision":"2","version":"1","value":"YmFy"}}]}}


Transactions

Issue a transaction with /v3/kv/txn:

# target CREATE
curl -L http://localhost:2379/v3/kv/txn \
  -X POST \
  -d '{"compare":[{"target":"CREATE","key":"Zm9v","createRevision":"2"}],"success":[{"requestPut":{"key":"Zm9v","value":"YmFy"}}]}'
# {"header":{"cluster_id":"12585971608760269493","member_id":"13847567121247652255","revision":"3","raft_term":"2"},"succeeded":true,"responses":[{"response_put":{"header":{"revision":"3"}}}]}


# target VERSION

curl -L http://localhost:2379/v3/kv/txn \
  -X POST \
  -d '{"compare":[{"version":"4","result":"EQUAL","target":"VERSION","key":"Zm9v"}],"success":[{"requestRange":{"key":"Zm9v"}}]}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"6","raft_term":"3"},"succeeded":true,"responses":[{"response_range":{"header":{"revision":"6"},"kvs":[{"key":"Zm9v","create_revision":"2","mod_revision":"6","version":"4","value":"YmF6"}],"count":"1"}}]}


Authentication

Set up authentication with the /v3/auth service:

# create root user
curl -L http://localhost:2379/v3/auth/user/add \
  -X POST -d '{"name": "root", "password": "pass"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"}}

# create root role
curl -L http://localhost:2379/v3/auth/role/add \
  -X POST -d '{"name": "root"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"}}

# grant root role
curl -L http://localhost:2379/v3/auth/user/grant \
  -X POST -d '{"user": "root", "role": "root"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"}}

# enable auth
curl -L http://localhost:2379/v3/auth/enable -X POST -d '{}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"}}


Authenticate with etcd for an authentication token using /v3/auth/authenticate:

# get the auth token for the root user
curl -L http://localhost:2379/v3/auth/authenticate \
  -X POST -d '{"name": "root", "password": "pass"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"1","raft_term":"2"},"token":"sssvIpwfnLAcWAQH.9"}


Set the Authorization header to the authentication token to fetch a key using authentication credentials:

curl -L http://localhost:2379/v3/kv/put \
  -H 'Authorization : sssvIpwfnLAcWAQH.9' \
  -X POST -d '{"key": "Zm9v", "value": "YmFy"}'
# {"header":{"cluster_id":"14841639068965178418","member_id":"10276657743932975437","revision":"2","raft_term":"2"}}


Swagger文档

生成的Swagger API定义可以在rpc.swagger.json中找到:https://github.com/etcd-io/etcd/blob/master/Documentation/dev-guide/apispec/swagger/rpc.swagger.json

更多的使用api,可以通过下面的api定义来找到。

{
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "schemes": [
    "http",
    "https"
  ],
  "swagger": "2.0",
  "info": {
    "title": "etcdserver/etcdserverpb/rpc.proto",
    "version": "version not set"
  },
  "paths": {
    "/v3/auth/authenticate": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Authenticate processes an authenticate request.",
        "operationId": "Authenticate",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthenticateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthenticateResponse"
            }
          }
        }
      }
    },
    "/v3/auth/disable": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "AuthDisable disables authentication.",
        "operationId": "AuthDisable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthDisableRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthDisableResponse"
            }
          }
        }
      }
    },
    "/v3/auth/enable": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "AuthEnable enables authentication.",
        "operationId": "AuthEnable",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthEnableRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthEnableResponse"
            }
          }
        }
      }
    },
    "/v3/auth/role/add": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "RoleAdd adds a new role. Role name cannot be empty.",
        "operationId": "RoleAdd",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleAddRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleAddResponse"
            }
          }
        }
      }
    },
    "/v3/auth/role/delete": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "RoleDelete deletes a specified role.",
        "operationId": "RoleDelete",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleDeleteRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleDeleteResponse"
            }
          }
        }
      }
    },
    "/v3/auth/role/get": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "RoleGet gets detailed role information.",
        "operationId": "RoleGet",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleGetRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleGetResponse"
            }
          }
        }
      }
    },
    "/v3/auth/role/grant": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "RoleGrantPermission grants a permission of a specified key or range to a specified role.",
        "operationId": "RoleGrantPermission",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleGrantPermissionRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleGrantPermissionResponse"
            }
          }
        }
      }
    },
    "/v3/auth/role/list": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "RoleList gets lists of all roles.",
        "operationId": "RoleList",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleListRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleListResponse"
            }
          }
        }
      }
    },
    "/v3/auth/role/revoke": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "RoleRevokePermission revokes a key or range permission of a specified role.",
        "operationId": "RoleRevokePermission",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleRevokePermissionRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthRoleRevokePermissionResponse"
            }
          }
        }
      }
    },
    "/v3/auth/user/add": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "UserAdd adds a new user. User name cannot be empty.",
        "operationId": "UserAdd",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserAddRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserAddResponse"
            }
          }
        }
      }
    },
    "/v3/auth/user/changepw": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "UserChangePassword changes the password of a specified user.",
        "operationId": "UserChangePassword",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserChangePasswordRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserChangePasswordResponse"
            }
          }
        }
      }
    },
    "/v3/auth/user/delete": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "UserDelete deletes a specified user.",
        "operationId": "UserDelete",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserDeleteRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserDeleteResponse"
            }
          }
        }
      }
    },
    "/v3/auth/user/get": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "UserGet gets detailed user information.",
        "operationId": "UserGet",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserGetRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserGetResponse"
            }
          }
        }
      }
    },
    "/v3/auth/user/grant": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "UserGrant grants a role to a specified user.",
        "operationId": "UserGrantRole",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserGrantRoleRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserGrantRoleResponse"
            }
          }
        }
      }
    },
    "/v3/auth/user/list": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "UserList gets a list of all users.",
        "operationId": "UserList",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserListRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserListResponse"
            }
          }
        }
      }
    },
    "/v3/auth/user/revoke": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "UserRevokeRole revokes a role of specified user.",
        "operationId": "UserRevokeRole",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserRevokeRoleRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAuthUserRevokeRoleResponse"
            }
          }
        }
      }
    },
    "/v3/cluster/member/add": {
      "post": {
        "tags": [
          "Cluster"
        ],
        "summary": "MemberAdd adds a member into the cluster.",
        "operationId": "MemberAdd",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberAddRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberAddResponse"
            }
          }
        }
      }
    },
    "/v3/cluster/member/list": {
      "post": {
        "tags": [
          "Cluster"
        ],
        "summary": "MemberList lists all the members in the cluster.",
        "operationId": "MemberList",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberListRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberListResponse"
            }
          }
        }
      }
    },
    "/v3/cluster/member/promote": {
      "post": {
        "tags": [
          "Cluster"
        ],
        "summary": "MemberPromote promotes a member from raft learner (non-voting) to raft voting member.",
        "operationId": "MemberPromote",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberPromoteRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberPromoteResponse"
            }
          }
        }
      }
    },
    "/v3/cluster/member/remove": {
      "post": {
        "tags": [
          "Cluster"
        ],
        "summary": "MemberRemove removes an existing member from the cluster.",
        "operationId": "MemberRemove",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberRemoveRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberRemoveResponse"
            }
          }
        }
      }
    },
    "/v3/cluster/member/update": {
      "post": {
        "tags": [
          "Cluster"
        ],
        "summary": "MemberUpdate updates the member configuration.",
        "operationId": "MemberUpdate",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberUpdateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbMemberUpdateResponse"
            }
          }
        }
      }
    },
    "/v3/kv/compaction": {
      "post": {
        "tags": [
          "KV"
        ],
        "summary": "Compact compacts the event history in the etcd key-value store. The key-value\nstore should be periodically compacted or the event history will continue to grow\nindefinitely.",
        "operationId": "Compact",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbCompactionRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbCompactionResponse"
            }
          }
        }
      }
    },
    "/v3/kv/deleterange": {
      "post": {
        "tags": [
          "KV"
        ],
        "summary": "DeleteRange deletes the given range from the key-value store.\nA delete request increments the revision of the key-value store\nand generates a delete event in the event history for every deleted key.",
        "operationId": "DeleteRange",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbDeleteRangeRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbDeleteRangeResponse"
            }
          }
        }
      }
    },
    "/v3/kv/lease/leases": {
      "post": {
        "tags": [
          "Lease"
        ],
        "summary": "LeaseLeases lists all existing leases.",
        "operationId": "LeaseLeases2",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseLeasesRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseLeasesResponse"
            }
          }
        }
      }
    },
    "/v3/kv/lease/revoke": {
      "post": {
        "tags": [
          "Lease"
        ],
        "summary": "LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.",
        "operationId": "LeaseRevoke2",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseRevokeRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseRevokeResponse"
            }
          }
        }
      }
    },
    "/v3/kv/lease/timetolive": {
      "post": {
        "tags": [
          "Lease"
        ],
        "summary": "LeaseTimeToLive retrieves lease information.",
        "operationId": "LeaseTimeToLive2",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseTimeToLiveRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseTimeToLiveResponse"
            }
          }
        }
      }
    },
    "/v3/kv/put": {
      "post": {
        "tags": [
          "KV"
        ],
        "summary": "Put puts the given key into the key-value store.\nA put request increments the revision of the key-value store\nand generates one event in the event history.",
        "operationId": "Put",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbPutRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbPutResponse"
            }
          }
        }
      }
    },
    "/v3/kv/range": {
      "post": {
        "tags": [
          "KV"
        ],
        "summary": "Range gets the keys in the range from the key-value store.",
        "operationId": "Range",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbRangeRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbRangeResponse"
            }
          }
        }
      }
    },
    "/v3/kv/txn": {
      "post": {
        "tags": [
          "KV"
        ],
        "summary": "Txn processes multiple requests in a single transaction.\nA txn request increments the revision of the key-value store\nand generates events with the same revision for every completed request.\nIt is not allowed to modify the same key several times within one txn.",
        "operationId": "Txn",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbTxnRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbTxnResponse"
            }
          }
        }
      }
    },
    "/v3/lease/grant": {
      "post": {
        "tags": [
          "Lease"
        ],
        "summary": "LeaseGrant creates a lease which expires if the server does not receive a keepAlive\nwithin a given time to live period. All keys attached to the lease will be expired and\ndeleted if the lease expires. Each expired key generates a delete event in the event history.",
        "operationId": "LeaseGrant",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseGrantRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseGrantResponse"
            }
          }
        }
      }
    },
    "/v3/lease/keepalive": {
      "post": {
        "tags": [
          "Lease"
        ],
        "summary": "LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client\nto the server and streaming keep alive responses from the server to the client.",
        "operationId": "LeaseKeepAlive",
        "parameters": [
          {
            "description": " (streaming inputs)",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseKeepAliveRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "$ref": "#/x-stream-definitions/etcdserverpbLeaseKeepAliveResponse"
            }
          }
        }
      }
    },
    "/v3/lease/leases": {
      "post": {
        "tags": [
          "Lease"
        ],
        "summary": "LeaseLeases lists all existing leases.",
        "operationId": "LeaseLeases",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseLeasesRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseLeasesResponse"
            }
          }
        }
      }
    },
    "/v3/lease/revoke": {
      "post": {
        "tags": [
          "Lease"
        ],
        "summary": "LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.",
        "operationId": "LeaseRevoke",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseRevokeRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseRevokeResponse"
            }
          }
        }
      }
    },
    "/v3/lease/timetolive": {
      "post": {
        "tags": [
          "Lease"
        ],
        "summary": "LeaseTimeToLive retrieves lease information.",
        "operationId": "LeaseTimeToLive",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseTimeToLiveRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbLeaseTimeToLiveResponse"
            }
          }
        }
      }
    },
    "/v3/maintenance/alarm": {
      "post": {
        "tags": [
          "Maintenance"
        ],
        "summary": "Alarm activates, deactivates, and queries alarms regarding cluster health.",
        "operationId": "Alarm",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbAlarmRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbAlarmResponse"
            }
          }
        }
      }
    },
    "/v3/maintenance/defragment": {
      "post": {
        "tags": [
          "Maintenance"
        ],
        "summary": "Defragment defragments a member's backend database to recover storage space.",
        "operationId": "Defragment",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbDefragmentRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbDefragmentResponse"
            }
          }
        }
      }
    },
    "/v3/maintenance/hash": {
      "post": {
        "tags": [
          "Maintenance"
        ],
        "summary": "HashKV computes the hash of all MVCC keys up to a given revision.\nIt only iterates \"key\" bucket in backend storage.",
        "operationId": "HashKV",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbHashKVRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbHashKVResponse"
            }
          }
        }
      }
    },
    "/v3/maintenance/snapshot": {
      "post": {
        "tags": [
          "Maintenance"
        ],
        "summary": "Snapshot sends a snapshot of the entire backend from a member over a stream to a client.",
        "operationId": "Snapshot",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbSnapshotRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "$ref": "#/x-stream-definitions/etcdserverpbSnapshotResponse"
            }
          }
        }
      }
    },
    "/v3/maintenance/status": {
      "post": {
        "tags": [
          "Maintenance"
        ],
        "summary": "Status gets the status of the member.",
        "operationId": "Status",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbStatusRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbStatusResponse"
            }
          }
        }
      }
    },
    "/v3/maintenance/transfer-leadership": {
      "post": {
        "tags": [
          "Maintenance"
        ],
        "summary": "MoveLeader requests current leader node to transfer its leadership to transferee.",
        "operationId": "MoveLeader",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbMoveLeaderRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/etcdserverpbMoveLeaderResponse"
            }
          }
        }
      }
    },
    "/v3/watch": {
      "post": {
        "tags": [
          "Watch"
        ],
        "summary": "Watch watches for events happening or that have happened. Both input and output\nare streams; the input stream is for creating and canceling watchers and the output\nstream sends events. One watch RPC can watch on multiple key ranges, streaming events\nfor several watches at once. The entire event history can be watched starting from the\nlast compaction revision.",
        "operationId": "Watch",
        "parameters": [
          {
            "description": " (streaming inputs)",
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/etcdserverpbWatchRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.(streaming responses)",
            "schema": {
              "$ref": "#/x-stream-definitions/etcdserverpbWatchResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "AlarmRequestAlarmAction": {
      "type": "string",
      "default": "GET",
      "enum": [
        "GET",
        "ACTIVATE",
        "DEACTIVATE"
      ]
    },
    "CompareCompareResult": {
      "type": "string",
      "default": "EQUAL",
      "enum": [
        "EQUAL",
        "GREATER",
        "LESS",
        "NOT_EQUAL"
      ]
    },
    "CompareCompareTarget": {
      "type": "string",
      "default": "VERSION",
      "enum": [
        "VERSION",
        "CREATE",
        "MOD",
        "VALUE",
        "LEASE"
      ]
    },
    "EventEventType": {
      "type": "string",
      "default": "PUT",
      "enum": [
        "PUT",
        "DELETE"
      ]
    },
    "RangeRequestSortOrder": {
      "type": "string",
      "default": "NONE",
      "enum": [
        "NONE",
        "ASCEND",
        "DESCEND"
      ]
    },
    "RangeRequestSortTarget": {
      "type": "string",
      "default": "KEY",
      "enum": [
        "KEY",
        "VERSION",
        "CREATE",
        "MOD",
        "VALUE"
      ]
    },
    "WatchCreateRequestFilterType": {
      "description": " - NOPUT: filter out put event.\n - NODELETE: filter out delete event.",
      "type": "string",
      "default": "NOPUT",
      "enum": [
        "NOPUT",
        "NODELETE"
      ]
    },
    "authpbPermission": {
      "type": "object",
      "title": "Permission is a single entity",
      "properties": {
        "key": {
          "type": "string",
          "format": "byte"
        },
        "permType": {
          "$ref": "#/definitions/authpbPermissionType"
        },
        "range_end": {
          "type": "string",
          "format": "byte"
        }
      }
    },
    "authpbPermissionType": {
      "type": "string",
      "default": "READ",
      "enum": [
        "READ",
        "WRITE",
        "READWRITE"
      ]
    },
    "authpbUserAddOptions": {
      "type": "object",
      "properties": {
        "no_password": {
          "type": "boolean",
          "format": "boolean"
        }
      }
    },
    "etcdserverpbAlarmMember": {
      "type": "object",
      "properties": {
        "alarm": {
          "description": "alarm is the type of alarm which has been raised.",
          "$ref": "#/definitions/etcdserverpbAlarmType"
        },
        "memberID": {
          "description": "memberID is the ID of the member associated with the raised alarm.",
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "etcdserverpbAlarmRequest": {
      "type": "object",
      "properties": {
        "action": {
          "description": "action is the kind of alarm request to issue. The action\nmay GET alarm statuses, ACTIVATE an alarm, or DEACTIVATE a\nraised alarm.",
          "$ref": "#/definitions/AlarmRequestAlarmAction"
        },
        "alarm": {
          "description": "alarm is the type of alarm to consider for this request.",
          "$ref": "#/definitions/etcdserverpbAlarmType"
        },
        "memberID": {
          "description": "memberID is the ID of the member associated with the alarm. If memberID is 0, the\nalarm request covers all members.",
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "etcdserverpbAlarmResponse": {
      "type": "object",
      "properties": {
        "alarms": {
          "description": "alarms is a list of alarms associated with the alarm request.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbAlarmMember"
          }
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAlarmType": {
      "type": "string",
      "default": "NONE",
      "enum": [
        "NONE",
        "NOSPACE",
        "CORRUPT"
      ]
    },
    "etcdserverpbAuthDisableRequest": {
      "type": "object"
    },
    "etcdserverpbAuthDisableResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthEnableRequest": {
      "type": "object"
    },
    "etcdserverpbAuthEnableResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthRoleAddRequest": {
      "type": "object",
      "properties": {
        "name": {
          "description": "name is the name of the role to add to the authentication system.",
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthRoleAddResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthRoleDeleteRequest": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthRoleDeleteResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthRoleGetRequest": {
      "type": "object",
      "properties": {
        "role": {
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthRoleGetResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "perm": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/authpbPermission"
          }
        }
      }
    },
    "etcdserverpbAuthRoleGrantPermissionRequest": {
      "type": "object",
      "properties": {
        "name": {
          "description": "name is the name of the role which will be granted the permission.",
          "type": "string"
        },
        "perm": {
          "description": "perm is the permission to grant to the role.",
          "$ref": "#/definitions/authpbPermission"
        }
      }
    },
    "etcdserverpbAuthRoleGrantPermissionResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthRoleListRequest": {
      "type": "object"
    },
    "etcdserverpbAuthRoleListResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "etcdserverpbAuthRoleRevokePermissionRequest": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "format": "byte"
        },
        "range_end": {
          "type": "string",
          "format": "byte"
        },
        "role": {
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthRoleRevokePermissionResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthUserAddRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "options": {
          "$ref": "#/definitions/authpbUserAddOptions"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthUserAddResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthUserChangePasswordRequest": {
      "type": "object",
      "properties": {
        "name": {
          "description": "name is the name of the user whose password is being changed.",
          "type": "string"
        },
        "password": {
          "description": "password is the new password for the user.",
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthUserChangePasswordResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthUserDeleteRequest": {
      "type": "object",
      "properties": {
        "name": {
          "description": "name is the name of the user to delete.",
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthUserDeleteResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthUserGetRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthUserGetResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "etcdserverpbAuthUserGrantRoleRequest": {
      "type": "object",
      "properties": {
        "role": {
          "description": "role is the name of the role to grant to the user.",
          "type": "string"
        },
        "user": {
          "description": "user is the name of the user which should be granted a given role.",
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthUserGrantRoleResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthUserListRequest": {
      "type": "object"
    },
    "etcdserverpbAuthUserListResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "users": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "etcdserverpbAuthUserRevokeRoleRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "role": {
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthUserRevokeRoleResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbAuthenticateRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "etcdserverpbAuthenticateResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "token": {
          "type": "string",
          "title": "token is an authorized token that can be used in succeeding RPCs"
        }
      }
    },
    "etcdserverpbCompactionRequest": {
      "description": "CompactionRequest compacts the key-value store up to a given revision. All superseded keys\nwith a revision less than the compaction revision will be removed.",
      "type": "object",
      "properties": {
        "physical": {
          "description": "physical is set so the RPC will wait until the compaction is physically\napplied to the local database such that compacted entries are totally\nremoved from the backend database.",
          "type": "boolean",
          "format": "boolean"
        },
        "revision": {
          "description": "revision is the key-value store revision for the compaction operation.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "etcdserverpbCompactionResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbCompare": {
      "type": "object",
      "properties": {
        "create_revision": {
          "type": "string",
          "format": "int64",
          "title": "create_revision is the creation revision of the given key"
        },
        "key": {
          "description": "key is the subject key for the comparison operation.",
          "type": "string",
          "format": "byte"
        },
        "lease": {
          "description": "lease is the lease id of the given key.",
          "type": "string",
          "format": "int64"
        },
        "mod_revision": {
          "description": "mod_revision is the last modified revision of the given key.",
          "type": "string",
          "format": "int64"
        },
        "range_end": {
          "description": "range_end compares the given target to all keys in the range [key, range_end).\nSee RangeRequest for more details on key ranges.",
          "type": "string",
          "format": "byte"
        },
        "result": {
          "description": "result is logical comparison operation for this comparison.",
          "$ref": "#/definitions/CompareCompareResult"
        },
        "target": {
          "description": "target is the key-value field to inspect for the comparison.",
          "$ref": "#/definitions/CompareCompareTarget"
        },
        "value": {
          "description": "value is the value of the given key, in bytes.",
          "type": "string",
          "format": "byte"
        },
        "version": {
          "type": "string",
          "format": "int64",
          "title": "version is the version of the given key"
        }
      }
    },
    "etcdserverpbDefragmentRequest": {
      "type": "object"
    },
    "etcdserverpbDefragmentResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbDeleteRangeRequest": {
      "type": "object",
      "properties": {
        "key": {
          "description": "key is the first key to delete in the range.",
          "type": "string",
          "format": "byte"
        },
        "prev_kv": {
          "description": "If prev_kv is set, etcd gets the previous key-value pairs before deleting it.\nThe previous key-value pairs will be returned in the delete response.",
          "type": "boolean",
          "format": "boolean"
        },
        "range_end": {
          "description": "range_end is the key following the last key to delete for the range [key, range_end).\nIf range_end is not given, the range is defined to contain only the key argument.\nIf range_end is one bit larger than the given key, then the range is all the keys\nwith the prefix (the given key).\nIf range_end is '\\0', the range is all keys greater than or equal to the key argument.",
          "type": "string",
          "format": "byte"
        }
      }
    },
    "etcdserverpbDeleteRangeResponse": {
      "type": "object",
      "properties": {
        "deleted": {
          "description": "deleted is the number of keys deleted by the delete range request.",
          "type": "string",
          "format": "int64"
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "prev_kvs": {
          "description": "if prev_kv is set in the request, the previous key-value pairs will be returned.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/mvccpbKeyValue"
          }
        }
      }
    },
    "etcdserverpbHashKVRequest": {
      "type": "object",
      "properties": {
        "revision": {
          "description": "revision is the key-value store revision for the hash operation.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "etcdserverpbHashKVResponse": {
      "type": "object",
      "properties": {
        "compact_revision": {
          "description": "compact_revision is the compacted revision of key-value store when hash begins.",
          "type": "string",
          "format": "int64"
        },
        "hash": {
          "description": "hash is the hash value computed from the responding member's MVCC keys up to a given revision.",
          "type": "integer",
          "format": "int64"
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbHashRequest": {
      "type": "object"
    },
    "etcdserverpbHashResponse": {
      "type": "object",
      "properties": {
        "hash": {
          "description": "hash is the hash value computed from the responding member's KV's backend.",
          "type": "integer",
          "format": "int64"
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbLeaseGrantRequest": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID.",
          "type": "string",
          "format": "int64"
        },
        "TTL": {
          "description": "TTL is the advisory time-to-live in seconds. Expired lease will return -1.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "etcdserverpbLeaseGrantResponse": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the lease ID for the granted lease.",
          "type": "string",
          "format": "int64"
        },
        "TTL": {
          "description": "TTL is the server chosen lease time-to-live in seconds.",
          "type": "string",
          "format": "int64"
        },
        "error": {
          "type": "string"
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbLeaseKeepAliveRequest": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the lease ID for the lease to keep alive.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "etcdserverpbLeaseKeepAliveResponse": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the lease ID from the keep alive request.",
          "type": "string",
          "format": "int64"
        },
        "TTL": {
          "description": "TTL is the new time-to-live for the lease.",
          "type": "string",
          "format": "int64"
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbLeaseLeasesRequest": {
      "type": "object"
    },
    "etcdserverpbLeaseLeasesResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "leases": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbLeaseStatus"
          }
        }
      }
    },
    "etcdserverpbLeaseRevokeRequest": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "etcdserverpbLeaseRevokeResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbLeaseStatus": {
      "type": "object",
      "properties": {
        "ID": {
          "type": "string",
          "format": "int64"
        }
      }
    },
    "etcdserverpbLeaseTimeToLiveRequest": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the lease ID for the lease.",
          "type": "string",
          "format": "int64"
        },
        "keys": {
          "description": "keys is true to query all the keys attached to this lease.",
          "type": "boolean",
          "format": "boolean"
        }
      }
    },
    "etcdserverpbLeaseTimeToLiveResponse": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the lease ID from the keep alive request.",
          "type": "string",
          "format": "int64"
        },
        "TTL": {
          "description": "TTL is the remaining TTL in seconds for the lease; the lease will expire in under TTL+1 seconds.",
          "type": "string",
          "format": "int64"
        },
        "grantedTTL": {
          "description": "GrantedTTL is the initial granted time in seconds upon lease creation/renewal.",
          "type": "string",
          "format": "int64"
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "keys": {
          "description": "Keys is the list of keys attached to this lease.",
          "type": "array",
          "items": {
            "type": "string",
            "format": "byte"
          }
        }
      }
    },
    "etcdserverpbMember": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the member ID for this member.",
          "type": "string",
          "format": "uint64"
        },
        "clientURLs": {
          "description": "clientURLs is the list of URLs the member exposes to clients for communication. If the member is not started, clientURLs will be empty.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "isLearner": {
          "description": "isLearner indicates if the member is raft learner.",
          "type": "boolean",
          "format": "boolean"
        },
        "name": {
          "description": "name is the human-readable name of the member. If the member is not started, the name will be an empty string.",
          "type": "string"
        },
        "peerURLs": {
          "description": "peerURLs is the list of URLs the member exposes to the cluster for communication.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "etcdserverpbMemberAddRequest": {
      "type": "object",
      "properties": {
        "isLearner": {
          "description": "isLearner indicates if the added member is raft learner.",
          "type": "boolean",
          "format": "boolean"
        },
        "peerURLs": {
          "description": "peerURLs is the list of URLs the added member will use to communicate with the cluster.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "etcdserverpbMemberAddResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "member": {
          "description": "member is the member information for the added member.",
          "$ref": "#/definitions/etcdserverpbMember"
        },
        "members": {
          "description": "members is a list of all members after adding the new member.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbMember"
          }
        }
      }
    },
    "etcdserverpbMemberListRequest": {
      "type": "object"
    },
    "etcdserverpbMemberListResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "members": {
          "description": "members is a list of all members associated with the cluster.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbMember"
          }
        }
      }
    },
    "etcdserverpbMemberPromoteRequest": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the member ID of the member to promote.",
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "etcdserverpbMemberPromoteResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "members": {
          "description": "members is a list of all members after promoting the member.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbMember"
          }
        }
      }
    },
    "etcdserverpbMemberRemoveRequest": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the member ID of the member to remove.",
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "etcdserverpbMemberRemoveResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "members": {
          "description": "members is a list of all members after removing the member.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbMember"
          }
        }
      }
    },
    "etcdserverpbMemberUpdateRequest": {
      "type": "object",
      "properties": {
        "ID": {
          "description": "ID is the member ID of the member to update.",
          "type": "string",
          "format": "uint64"
        },
        "peerURLs": {
          "description": "peerURLs is the new list of URLs the member will use to communicate with the cluster.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "etcdserverpbMemberUpdateResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "members": {
          "description": "members is a list of all members after updating the member.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbMember"
          }
        }
      }
    },
    "etcdserverpbMoveLeaderRequest": {
      "type": "object",
      "properties": {
        "targetID": {
          "description": "targetID is the node ID for the new leader.",
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "etcdserverpbMoveLeaderResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        }
      }
    },
    "etcdserverpbPutRequest": {
      "type": "object",
      "properties": {
        "ignore_lease": {
          "description": "If ignore_lease is set, etcd updates the key using its current lease.\nReturns an error if the key does not exist.",
          "type": "boolean",
          "format": "boolean"
        },
        "ignore_value": {
          "description": "If ignore_value is set, etcd updates the key using its current value.\nReturns an error if the key does not exist.",
          "type": "boolean",
          "format": "boolean"
        },
        "key": {
          "description": "key is the key, in bytes, to put into the key-value store.",
          "type": "string",
          "format": "byte"
        },
        "lease": {
          "description": "lease is the lease ID to associate with the key in the key-value store. A lease\nvalue of 0 indicates no lease.",
          "type": "string",
          "format": "int64"
        },
        "prev_kv": {
          "description": "If prev_kv is set, etcd gets the previous key-value pair before changing it.\nThe previous key-value pair will be returned in the put response.",
          "type": "boolean",
          "format": "boolean"
        },
        "value": {
          "description": "value is the value, in bytes, to associate with the key in the key-value store.",
          "type": "string",
          "format": "byte"
        }
      }
    },
    "etcdserverpbPutResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "prev_kv": {
          "description": "if prev_kv is set in the request, the previous key-value pair will be returned.",
          "$ref": "#/definitions/mvccpbKeyValue"
        }
      }
    },
    "etcdserverpbRangeRequest": {
      "type": "object",
      "properties": {
        "count_only": {
          "description": "count_only when set returns only the count of the keys in the range.",
          "type": "boolean",
          "format": "boolean"
        },
        "key": {
          "description": "key is the first key for the range. If range_end is not given, the request only looks up key.",
          "type": "string",
          "format": "byte"
        },
        "keys_only": {
          "description": "keys_only when set returns only the keys and not the values.",
          "type": "boolean",
          "format": "boolean"
        },
        "limit": {
          "description": "limit is a limit on the number of keys returned for the request. When limit is set to 0,\nit is treated as no limit.",
          "type": "string",
          "format": "int64"
        },
        "max_create_revision": {
          "description": "max_create_revision is the upper bound for returned key create revisions; all keys with\ngreater create revisions will be filtered away.",
          "type": "string",
          "format": "int64"
        },
        "max_mod_revision": {
          "description": "max_mod_revision is the upper bound for returned key mod revisions; all keys with\ngreater mod revisions will be filtered away.",
          "type": "string",
          "format": "int64"
        },
        "min_create_revision": {
          "description": "min_create_revision is the lower bound for returned key create revisions; all keys with\nlesser create revisions will be filtered away.",
          "type": "string",
          "format": "int64"
        },
        "min_mod_revision": {
          "description": "min_mod_revision is the lower bound for returned key mod revisions; all keys with\nlesser mod revisions will be filtered away.",
          "type": "string",
          "format": "int64"
        },
        "range_end": {
          "description": "range_end is the upper bound on the requested range [key, range_end).\nIf range_end is '\\0', the range is all keys \u003e= key.\nIf range_end is key plus one (e.g., \"aa\"+1 == \"ab\", \"a\\xff\"+1 == \"b\"),\nthen the range request gets all keys prefixed with key.\nIf both key and range_end are '\\0', then the range request returns all keys.",
          "type": "string",
          "format": "byte"
        },
        "revision": {
          "description": "revision is the point-in-time of the key-value store to use for the range.\nIf revision is less or equal to zero, the range is over the newest key-value store.\nIf the revision has been compacted, ErrCompacted is returned as a response.",
          "type": "string",
          "format": "int64"
        },
        "serializable": {
          "description": "serializable sets the range request to use serializable member-local reads.\nRange requests are linearizable by default; linearizable requests have higher\nlatency and lower throughput than serializable requests but reflect the current\nconsensus of the cluster. For better performance, in exchange for possible stale reads,\na serializable range request is served locally without needing to reach consensus\nwith other nodes in the cluster.",
          "type": "boolean",
          "format": "boolean"
        },
        "sort_order": {
          "description": "sort_order is the order for returned sorted results.",
          "$ref": "#/definitions/RangeRequestSortOrder"
        },
        "sort_target": {
          "description": "sort_target is the key-value field to use for sorting.",
          "$ref": "#/definitions/RangeRequestSortTarget"
        }
      }
    },
    "etcdserverpbRangeResponse": {
      "type": "object",
      "properties": {
        "count": {
          "description": "count is set to the number of keys within the range when requested.",
          "type": "string",
          "format": "int64"
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "kvs": {
          "description": "kvs is the list of key-value pairs matched by the range request.\nkvs is empty when count is requested.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/mvccpbKeyValue"
          }
        },
        "more": {
          "description": "more indicates if there are more keys to return in the requested range.",
          "type": "boolean",
          "format": "boolean"
        }
      }
    },
    "etcdserverpbRequestOp": {
      "type": "object",
      "properties": {
        "request_delete_range": {
          "$ref": "#/definitions/etcdserverpbDeleteRangeRequest"
        },
        "request_put": {
          "$ref": "#/definitions/etcdserverpbPutRequest"
        },
        "request_range": {
          "$ref": "#/definitions/etcdserverpbRangeRequest"
        },
        "request_txn": {
          "$ref": "#/definitions/etcdserverpbTxnRequest"
        }
      }
    },
    "etcdserverpbResponseHeader": {
      "type": "object",
      "properties": {
        "cluster_id": {
          "description": "cluster_id is the ID of the cluster which sent the response.",
          "type": "string",
          "format": "uint64"
        },
        "member_id": {
          "description": "member_id is the ID of the member which sent the response.",
          "type": "string",
          "format": "uint64"
        },
        "raft_term": {
          "description": "raft_term is the raft term when the request was applied.",
          "type": "string",
          "format": "uint64"
        },
        "revision": {
          "description": "revision is the key-value store revision when the request was applied.\nFor watch progress responses, the header.revision indicates progress. All future events\nrecieved in this stream are guaranteed to have a higher revision number than the\nheader.revision number.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "etcdserverpbResponseOp": {
      "type": "object",
      "properties": {
        "response_delete_range": {
          "$ref": "#/definitions/etcdserverpbDeleteRangeResponse"
        },
        "response_put": {
          "$ref": "#/definitions/etcdserverpbPutResponse"
        },
        "response_range": {
          "$ref": "#/definitions/etcdserverpbRangeResponse"
        },
        "response_txn": {
          "$ref": "#/definitions/etcdserverpbTxnResponse"
        }
      }
    },
    "etcdserverpbSnapshotRequest": {
      "type": "object"
    },
    "etcdserverpbSnapshotResponse": {
      "type": "object",
      "properties": {
        "blob": {
          "description": "blob contains the next chunk of the snapshot in the snapshot stream.",
          "type": "string",
          "format": "byte"
        },
        "header": {
          "description": "header has the current key-value store information. The first header in the snapshot\nstream indicates the point in time of the snapshot.",
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "remaining_bytes": {
          "type": "string",
          "format": "uint64",
          "title": "remaining_bytes is the number of blob bytes to be sent after this message"
        }
      }
    },
    "etcdserverpbStatusRequest": {
      "type": "object"
    },
    "etcdserverpbStatusResponse": {
      "type": "object",
      "properties": {
        "dbSize": {
          "description": "dbSize is the size of the backend database physically allocated, in bytes, of the responding member.",
          "type": "string",
          "format": "int64"
        },
        "dbSizeInUse": {
          "description": "dbSizeInUse is the size of the backend database logically in use, in bytes, of the responding member.",
          "type": "string",
          "format": "int64"
        },
        "errors": {
          "description": "errors contains alarm/health information and status.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "isLearner": {
          "description": "isLearner indicates if the member is raft learner.",
          "type": "boolean",
          "format": "boolean"
        },
        "leader": {
          "description": "leader is the member ID which the responding member believes is the current leader.",
          "type": "string",
          "format": "uint64"
        },
        "raftAppliedIndex": {
          "description": "raftAppliedIndex is the current raft applied index of the responding member.",
          "type": "string",
          "format": "uint64"
        },
        "raftIndex": {
          "description": "raftIndex is the current raft committed index of the responding member.",
          "type": "string",
          "format": "uint64"
        },
        "raftTerm": {
          "description": "raftTerm is the current raft term of the responding member.",
          "type": "string",
          "format": "uint64"
        },
        "version": {
          "description": "version is the cluster protocol version used by the responding member.",
          "type": "string"
        }
      }
    },
    "etcdserverpbTxnRequest": {
      "description": "From google paxosdb paper:\nOur implementation hinges around a powerful primitive which we call MultiOp. All other database\noperations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically\nand consists of three components:\n1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check\nfor the absence or presence of a value, or compare with a given value. Two different tests in the guard\nmay apply to the same or different entries in the database. All tests in the guard are applied and\nMultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise\nit executes f op (see item 3 below).\n2. A list of database operations called t op. Each operation in the list is either an insert, delete, or\nlookup operation, and applies to a single database entry. Two different operations in the list may apply\nto the same or different entries in the database. These operations are executed\nif guard evaluates to\ntrue.\n3. A list of database operations called f op. Like t op, but executed if guard evaluates to false.",
      "type": "object",
      "properties": {
        "compare": {
          "description": "compare is a list of predicates representing a conjunction of terms.\nIf the comparisons succeed, then the success requests will be processed in order,\nand the response will contain their respective responses in order.\nIf the comparisons fail, then the failure requests will be processed in order,\nand the response will contain their respective responses in order.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbCompare"
          }
        },
        "failure": {
          "description": "failure is a list of requests which will be applied when compare evaluates to false.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbRequestOp"
          }
        },
        "success": {
          "description": "success is a list of requests which will be applied when compare evaluates to true.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbRequestOp"
          }
        }
      }
    },
    "etcdserverpbTxnResponse": {
      "type": "object",
      "properties": {
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "responses": {
          "description": "responses is a list of responses corresponding to the results from applying\nsuccess if succeeded is true or failure if succeeded is false.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/etcdserverpbResponseOp"
          }
        },
        "succeeded": {
          "description": "succeeded is set to true if the compare evaluated to true or false otherwise.",
          "type": "boolean",
          "format": "boolean"
        }
      }
    },
    "etcdserverpbWatchCancelRequest": {
      "type": "object",
      "properties": {
        "watch_id": {
          "description": "watch_id is the watcher id to cancel so that no more events are transmitted.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "etcdserverpbWatchCreateRequest": {
      "type": "object",
      "properties": {
        "filters": {
          "description": "filters filter the events at server side before it sends back to the watcher.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/WatchCreateRequestFilterType"
          }
        },
        "fragment": {
          "description": "fragment enables splitting large revisions into multiple watch responses.",
          "type": "boolean",
          "format": "boolean"
        },
        "key": {
          "description": "key is the key to register for watching.",
          "type": "string",
          "format": "byte"
        },
        "prev_kv": {
          "description": "If prev_kv is set, created watcher gets the previous KV before the event happens.\nIf the previous KV is already compacted, nothing will be returned.",
          "type": "boolean",
          "format": "boolean"
        },
        "progress_notify": {
          "description": "progress_notify is set so that the etcd server will periodically send a WatchResponse with\nno events to the new watcher if there are no recent events. It is useful when clients\nwish to recover a disconnected watcher starting from a recent known revision.\nThe etcd server may decide how often it will send notifications based on current load.",
          "type": "boolean",
          "format": "boolean"
        },
        "range_end": {
          "description": "range_end is the end of the range [key, range_end) to watch. If range_end is not given,\nonly the key argument is watched. If range_end is equal to '\\0', all keys greater than\nor equal to the key argument are watched.\nIf the range_end is one bit larger than the given key,\nthen all keys with the prefix (the given key) will be watched.",
          "type": "string",
          "format": "byte"
        },
        "start_revision": {
          "description": "start_revision is an optional revision to watch from (inclusive). No start_revision is \"now\".",
          "type": "string",
          "format": "int64"
        },
        "watch_id": {
          "description": "If watch_id is provided and non-zero, it will be assigned to this watcher.\nSince creating a watcher in etcd is not a synchronous operation,\nthis can be used ensure that ordering is correct when creating multiple\nwatchers on the same stream. Creating a watcher with an ID already in\nuse on the stream will cause an error to be returned.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "etcdserverpbWatchProgressRequest": {
      "description": "Requests the a watch stream progress status be sent in the watch response stream as soon as\npossible.",
      "type": "object"
    },
    "etcdserverpbWatchRequest": {
      "type": "object",
      "properties": {
        "cancel_request": {
          "$ref": "#/definitions/etcdserverpbWatchCancelRequest"
        },
        "create_request": {
          "$ref": "#/definitions/etcdserverpbWatchCreateRequest"
        },
        "progress_request": {
          "$ref": "#/definitions/etcdserverpbWatchProgressRequest"
        }
      }
    },
    "etcdserverpbWatchResponse": {
      "type": "object",
      "properties": {
        "cancel_reason": {
          "description": "cancel_reason indicates the reason for canceling the watcher.",
          "type": "string"
        },
        "canceled": {
          "description": "canceled is set to true if the response is for a cancel watch request.\nNo further events will be sent to the canceled watcher.",
          "type": "boolean",
          "format": "boolean"
        },
        "compact_revision": {
          "description": "compact_revision is set to the minimum index if a watcher tries to watch\nat a compacted index.\n\nThis happens when creating a watcher at a compacted revision or the watcher cannot\ncatch up with the progress of the key-value store.\n\nThe client should treat the watcher as canceled and should not try to create any\nwatcher with the same start_revision again.",
          "type": "string",
          "format": "int64"
        },
        "created": {
          "description": "created is set to true if the response is for a create watch request.\nThe client should record the watch_id and expect to receive events for\nthe created watcher from the same stream.\nAll events sent to the created watcher will attach with the same watch_id.",
          "type": "boolean",
          "format": "boolean"
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/mvccpbEvent"
          }
        },
        "fragment": {
          "description": "framgment is true if large watch response was split over multiple responses.",
          "type": "boolean",
          "format": "boolean"
        },
        "header": {
          "$ref": "#/definitions/etcdserverpbResponseHeader"
        },
        "watch_id": {
          "description": "watch_id is the ID of the watcher that corresponds to the response.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "mvccpbEvent": {
      "type": "object",
      "properties": {
        "kv": {
          "description": "kv holds the KeyValue for the event.\nA PUT event contains current kv pair.\nA PUT event with kv.Version=1 indicates the creation of a key.\nA DELETE/EXPIRE event contains the deleted key with\nits modification revision set to the revision of deletion.",
          "$ref": "#/definitions/mvccpbKeyValue"
        },
        "prev_kv": {
          "description": "prev_kv holds the key-value pair before the event happens.",
          "$ref": "#/definitions/mvccpbKeyValue"
        },
        "type": {
          "description": "type is the kind of event. If type is a PUT, it indicates\nnew data has been stored to the key. If type is a DELETE,\nit indicates the key was deleted.",
          "$ref": "#/definitions/EventEventType"
        }
      }
    },
    "mvccpbKeyValue": {
      "type": "object",
      "properties": {
        "create_revision": {
          "description": "create_revision is the revision of last creation on this key.",
          "type": "string",
          "format": "int64"
        },
        "key": {
          "description": "key is the key in bytes. An empty key is not allowed.",
          "type": "string",
          "format": "byte"
        },
        "lease": {
          "description": "lease is the ID of the lease that attached to key.\nWhen the attached lease expires, the key will be deleted.\nIf lease is 0, then no lease is attached to the key.",
          "type": "string",
          "format": "int64"
        },
        "mod_revision": {
          "description": "mod_revision is the revision of last modification on this key.",
          "type": "string",
          "format": "int64"
        },
        "value": {
          "description": "value is the value held by the key, in bytes.",
          "type": "string",
          "format": "byte"
        },
        "version": {
          "description": "version is the version of the key. A deletion resets\nthe version to zero and any modification of the key\nincreases its version.",
          "type": "string",
          "format": "int64"
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "type_url": {
          "type": "string"
        },
        "value": {
          "type": "string",
          "format": "byte"
        }
      }
    },
    "runtimeStreamError": {
      "type": "object",
      "properties": {
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/protobufAny"
          }
        },
        "grpc_code": {
          "type": "integer",
          "format": "int32"
        },
        "http_code": {
          "type": "integer",
          "format": "int32"
        },
        "http_status": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "ApiKey": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "x-stream-definitions": {
    "etcdserverpbLeaseKeepAliveResponse": {
      "properties": {
        "error": {
          "$ref": "#/definitions/runtimeStreamError"
        },
        "result": {
          "$ref": "#/definitions/etcdserverpbLeaseKeepAliveResponse"
        }
      },
      "title": "Stream result of etcdserverpbLeaseKeepAliveResponse",
      "type": "object"
    },
    "etcdserverpbSnapshotResponse": {
      "properties": {
        "error": {
          "$ref": "#/definitions/runtimeStreamError"
        },
        "result": {
          "$ref": "#/definitions/etcdserverpbSnapshotResponse"
        }
      },
      "title": "Stream result of etcdserverpbSnapshotResponse",
      "type": "object"
    },
    "etcdserverpbWatchResponse": {
      "properties": {
        "error": {
          "$ref": "#/definitions/runtimeStreamError"
        },
        "result": {
          "$ref": "#/definitions/etcdserverpbWatchResponse"
        }
      },
      "title": "Stream result of etcdserverpbWatchResponse",
      "type": "object"
    }
  }
}


————————————————
版权声明:本文为CSDN博主「咻咻ing」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/meifannao789456/article/details/103480842

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ETCD v3 restful api 使用详解 的相关文章

  • 性能调优之 ETCD

    磁盘 IOPS 调整 etcd 对磁盘写入延迟非常敏感 xff0c 通常需要 50 顺序写入 IOPS 例如 7200RPM 磁盘 对于负载较重的集群 xff0c 建议使用 500 顺序写入 IOPS 例如 xff0c 典型的本地 SSD
  • etcd概述

    本文主要介绍了 etcd 相关概念 xff0c 以及 etcd 的主要使用场景 1 介绍 etcd 是云原生架构中的基础组件 xff0c 由 CNCF 孵化托管 etcd 在微服务和 kubernetes 集群中不仅可以作为服务注册中心用于
  • Rancher RKE K8s 集群 etcd 恢复

    背景 在 Rancher 中基于 RKE 创建的 K8s 集群 xff0c 因为服务器磁盘故障 xff0c 导致 3个 master 节点有2个节点的 etcd 数据文件损坏 xff0c 导致整个集群不可用 etcd 三个节点集群时 xff
  • k8s docker集群搭建

    一 Kubernetes系列之介绍篇 Kubernetes介绍 1 背景介绍 云计算飞速发展 IaaS PaaS SaaS Docker技术突飞猛进 一次构建 到处运行 容器的快速轻量 完整的生态环境 2 什么是kubernetes 首先
  • 服务注册中心etcd

    etcd简介 etcd官方描述 A distributed reliable key value store for the most critical data of a distributed system etcd is a stro
  • SaltStack实现etcd自动扩容

    一 ETCD 概述 1 ETCD 简介 ETCD是用于共享配置和服务发现的分布式 一致性的KV存储系统 该项目目前最新稳定版本为2 3 0 ETCD是CoreOS公司发起的一个开源项目 授权协议为Apache 提供配置共享和服务发现的系统比
  • K8s二进制部署-flanneld报(Couldn‘t fetch network config)

    1 报错提示 将网络配置信息写入了ETCD中 启动flanneld测试时一直报错 具体报错如下 root master1 tail 100f var log messages Dec 15 23 39 22 localhost flanne
  • etcd的使用

    启动etcd服务 启动etcd时最主要的是需要准备两个没有使用过的端口 这两个端口一个用于etcd之间同步信息 一个用于etcd向客户端提供服务的端口 因此启动单个etcd节点 只需按照如下命令行输入即可 server name myetc
  • 很好用的etcd可视化管理工具 etcdv3-browser

    etcd是一个高可用 强一致性的服务发现存储仓库的 是k8s里的一个基础组件 现在随着k8s的不断的被企业所使用 etcd也越来越被看好作为服务发现的好的组件之一 今天推荐的是一款用来对etcd进行管理的图形化管理工具 etcdv3 bro
  • patroni+etcd+antdb高可用

    patroni etcd antdb高可用架构图 Patroni组件功能 自动创建并管理主备流复制集群 并且通过api接口往dcs Distributed Configuration Store 通常指etcd zookeeper cons
  • 如何实现零宕机的配置热加载

    对于高可用的服务 为了保证服务可用性 更新配置时必然不能直接停止服务 可以使用配置热加载来避免服务暂停 不需要重启服务 配置的热加载可以分为两个场景 手动更新与自动更新 手动更新 对于一些临时调试 服务数量不多的情况下 可以进行手动更新配置
  • etcd之日志和快照管理

    系列文章目录 浅谈分布式系统与一致性协议 一 浅谈分布式系统与一致性协议 二 浅谈分布式系统与一致性协议 三 深入浅出之etcd 深入浅出之etcd 二 etcd版本之v3 etcd之安全性阐述 etcd的多版本并发控制 目录 系列文章目录
  • 可自动扩展的高可用Swarm集群EdgeScaler的搭建

    项目简介 应用场景 集群架构 组件描述 集群搭建 环境准备 Swarm工作节点搭建 Swarm管理节点搭建 ConfdHAProxy节点搭建 小结 项目简介 随着虚拟化和容器技术的日趋成熟 Docker越来越受到人们的关注 目前Docker
  • etcd键值操作

    etcd 删除键值 1 查询所有键值 curl http 10 0 2 255 9001 v2 keys services recursive true 2 删除键值 curl http 10 0 22 39 9001 v2 keys ke
  • 《Kubernetes部署篇:Ubuntu20.04基于外部etcd+部署kubernetes1.24.17集群(多主多从)》

    一 部署架构图 1 架构图如下所示 2 部署流程图如下所示 二 环境信息 1 部署规划 主机名 K8S版本 系统版本 内核版本 IP地址 备注 k8s master 63 1 24 17 Ubuntu 20 04 5 LTS 5 15 0
  • etcd 集群搭建及常用场景分析

    概述 etcd 是一个分布式一致性k v存储系统 可用于服务注册发现与共享配置 具有以下优点 简单 相比于晦涩难懂的paxos算法 etcd基于相对简单且易实现的raft算法实现一致性 并通过gRPC提供接口调用 安全 支持TLS通信 并可
  • 分布式注册中心-etcd

    etcd是什么 etcd 设计为提供高可用 强一致性的小型 kv 数据存储服务 etcd v2 和 v3 比较 v3使用 gRPC protobuf 取代 v2的http json 通信 提高通信效率 gRPC 只需要一条连接 http是每
  • go-zero 开发之安装 etcd

    本文只涉及 Linux 上的安装 二进制安装 下载二进制安装包 ETCD VER v3 4 28 ETCD VER v3 5 10 DOWNLOAD URL https github com etcd io etcd releases do
  • 在 Kubernetes 集群上使用 etcdctl 时出现错误:“证书由未知机构签名”

    我正在运行 minikube 并且正在尝试列出 ETCD 上的密钥 我下载了最新的etcdctl来自github的客户端 https github com etcd io etcd releases download v3 3 18 etc
  • minikube:无法连接本地部署的 nginx 服务

    我已经在我的 ubuntu 16 04 机器上安装了 minikube 并启动了一个集群 并显示一条消息 Kubernetes is available at https 192 168 99 100 443 接下来 我使用以下命令部署了

随机推荐

  • 如果有一条告警流量你会怎么分析,请详细说明?

    先要判断攻击有没有成功 是攻击成功的告警 还是攻击不成功但是真实的攻击 看规则的告警的名称 分析攻击源IP和目的IP 如果攻击源IP是内网的话 则可能为有关键特征的业务系统 被判为恶意攻击 内网可能沦陷 已被入侵 可能是设备使用盗版软件或者
  • Yolov5的安装配置与使用

    文章目录 一 下载Yolov5 1 下载Yolov5源码 2 下载Yolov5预训练模型 二 安装Yolov5 三 测试Yolov5 1 Img图片测试 2 Video视频测试 3 摄像头测试 三 小结 四 参考链接 在下载配置Yolov5
  • Echarts 实现两个图表联动

    init obj pageSource var that this console log obj pageSource this chart this echarts init document getElementById this i
  • 使用C++ Eigen库求解线性方程组Ax=b

    Eigen http eigen tuxfamily org 是常用的 C 矩阵运算库 具有很高的运算效率 大部分 需要在 C 中使用矩阵运算的库 都会选用 Eigen 作为基本代数库 例如 Google Tensorflow Google
  • 批量读取csv文件指定列

    目录 一 算法原理 二 代码实现 三 注意事项 一 算法原理 在读取csv文件进行点云处理的时候 常常需要跳过表头 并且进行批量读取 本代码 将每行数据记录为一个数组 并将多个csv文件合并记录 在使用中 需要自己修改想要提取的列数以及定义
  • FM33LG0XX-16位基本定时器

    FM33LG0包含1个16位基本定时器 基本定时器包含一个16bit自动重载计数器及一个可编程预分频器 基本定时器主要用来产生系统时基 也可以产生触发事件来驱动ADC采样 测试代码如下 void BSTIM Init uint16 t pr
  • 【转载收藏】Unity预计算实时GI

    初步介绍 新年假期结束了 想不想掌握一个新技能迎接全新的一年呢 不妨来阅读一下Unity预计算实时GI系列文章 本文是该系列的第一篇 在Unity中有两种区别很大的技术被用于计算全局光照GI或光源反射 它们就是烘焙全局光照 Baked GI
  • 【一文搞懂】FD_SET的使用

    阅读大概需要十分钟 绝对干货 看完还没搞懂你找我 随便查一下 可以看到对FD SET的说明如下 一个long类型的数组 提供给select 机制使用的一种数据结构 主要功能是建立联系 其中每一个数组元素都能与任意一个打开的句柄 socket
  • 回溯法(基础版)

    能进则进 不能进则换 不能换则退 退一步海阔天空 文章目录 算法适用问题 算法思想步骤 基础题目 A 装载问题 B 0 1背包问题 C N皇后问题 D 涂色问题 算法适用问题 搜索问题 求解的个数 最优解问题 算法思想步骤 深度优先搜索 定
  • js实现圆型的进度条

    一次项目需求中需要实现一个圆形的进度条 就参考了网上的一些资料做了一个demo 具体代码如下
  • Java线程池七大参数详解和配置

    目录 一 corePoolSize核心线程数 二 maximunPoolSize最大线程数 三 keepAliveTime空闲线程存活时间 四 unit空闲线程存活时间的单位 五 workQueue线程工作队列 1 ArrayBlockin
  • Mac如何读写NTFS硬盘,NTFSTool让Mac也可以轻松读写NTFS硬盘

    在了解Mac如何读写NTFS格式硬盘前 我们应该先了解什么是NTFS硬盘 以及Mac为什么不能对NTFS硬盘进行读写 一 什么是NTFS硬盘 NTFS格式硬盘最早出现于1993年的win NT操作系统中 作为一款日志文件系统 除了可以对硬盘
  • Java中 判断集合中的元素相等的依据 详细解析

    我们经常使用的集合如ArrayList LinkedList Vector 你在调用contains 方法的时候 或者是你在根据对象移除元素 remove Object o 你知道他们是如何判断集合中的元素是否 是相等的吗 接下来我们跟着源
  • 解决Linux MySQL报错ERROR 2002

    在Linux安装MySQL有时候会出现 mysql ERROR 2002 HY000 Can t connect to local MySQL server through socket var lib mysql mysql sock 2
  • Fority代码审计工具介绍

    Fortify SCA简介 Fortify SCA 是一个静态的 白盒的软件源代码安全测试工具 它通过内置的五大主要分析引擎 数据流 语义 结构 控制流 配置流等对应用软件的源代码进行静态的分析 分析的过程中与它特有的软件安全漏洞规则集进行
  • 速度教你创建网页文件,实现HTML入门

    今天 为大家准备了关于创建网页文件的学习内容 具体包括网页文件创建 HTML标签语法规范 HTML标签的关系以及HTML整体结构 完成以上内容的学习 零基础学习者基本上就能学会如何创建一个有简单内容的网页文件 快一起来看吧 1 网页文件的扩
  • Java常用包

    Java采用包结构来组织和管理类和接口文件 一 java lang包 该包提供了Java语言进行程序设计的基础类 它是默认导入的包 该包里面的Runnable接口和Object Math String StringBuffer System
  • Python中使用zlib库实现字符串的压缩和解压缩是一种常见的操作

    Python中使用zlib库实现字符串的压缩和解压缩是一种常见的操作 zlib库提供了一组函数 可以方便地对字符串进行压缩和解压缩操作 下面是一个详细的示例 展示了如何使用zlib库进行字符串的压缩和解压缩 首先 我们需要导入zlib库 i
  • C++模板的使用

    在平时的工作和学习过程中 经常会用到泛型 这里对泛型和模板进行一下梳理 以便理解和使用 模板关键字 template 为什么要使用模板 假如设计一个两个参数的函数 用来求两个对象的乘积 在实践中我们可能需要定义n多个函数 int multi
  • ETCD v3 restful api 使用详解

    ETCD v3 restful api 使用详解 网上已经有很多关于v2接口的使用了 类型下面的请求方式 本文就主要讲解v3版本的restful api的使用方式 V2版本 curl http 127 0 0 1 2379 v2 keys