go.etcd.io/etcd@v3.3.27+incompatible/Documentation/dev-guide/api_reference_v3.md (about) 1 --- 2 title: etcd API Reference 3 --- 4 5 6 This is a generated documentation. Please read the proto files for more. 7 8 9 ##### service `Auth` (etcdserver/etcdserverpb/rpc.proto) 10 11 | Method | Request Type | Response Type | Description | 12 | ------ | ------------ | ------------- | ----------- | 13 | AuthEnable | AuthEnableRequest | AuthEnableResponse | AuthEnable enables authentication. | 14 | AuthDisable | AuthDisableRequest | AuthDisableResponse | AuthDisable disables authentication. | 15 | Authenticate | AuthenticateRequest | AuthenticateResponse | Authenticate processes an authenticate request. | 16 | UserAdd | AuthUserAddRequest | AuthUserAddResponse | UserAdd adds a new user. | 17 | UserGet | AuthUserGetRequest | AuthUserGetResponse | UserGet gets detailed user information. | 18 | UserList | AuthUserListRequest | AuthUserListResponse | UserList gets a list of all users. | 19 | UserDelete | AuthUserDeleteRequest | AuthUserDeleteResponse | UserDelete deletes a specified user. | 20 | UserChangePassword | AuthUserChangePasswordRequest | AuthUserChangePasswordResponse | UserChangePassword changes the password of a specified user. | 21 | UserGrantRole | AuthUserGrantRoleRequest | AuthUserGrantRoleResponse | UserGrant grants a role to a specified user. | 22 | UserRevokeRole | AuthUserRevokeRoleRequest | AuthUserRevokeRoleResponse | UserRevokeRole revokes a role of specified user. | 23 | RoleAdd | AuthRoleAddRequest | AuthRoleAddResponse | RoleAdd adds a new role. | 24 | RoleGet | AuthRoleGetRequest | AuthRoleGetResponse | RoleGet gets detailed role information. | 25 | RoleList | AuthRoleListRequest | AuthRoleListResponse | RoleList gets lists of all roles. | 26 | RoleDelete | AuthRoleDeleteRequest | AuthRoleDeleteResponse | RoleDelete deletes a specified role. | 27 | RoleGrantPermission | AuthRoleGrantPermissionRequest | AuthRoleGrantPermissionResponse | RoleGrantPermission grants a permission of a specified key or range to a specified role. | 28 | RoleRevokePermission | AuthRoleRevokePermissionRequest | AuthRoleRevokePermissionResponse | RoleRevokePermission revokes a key or range permission of a specified role. | 29 30 31 32 ##### service `Cluster` (etcdserver/etcdserverpb/rpc.proto) 33 34 | Method | Request Type | Response Type | Description | 35 | ------ | ------------ | ------------- | ----------- | 36 | MemberAdd | MemberAddRequest | MemberAddResponse | MemberAdd adds a member into the cluster. | 37 | MemberRemove | MemberRemoveRequest | MemberRemoveResponse | MemberRemove removes an existing member from the cluster. | 38 | MemberUpdate | MemberUpdateRequest | MemberUpdateResponse | MemberUpdate updates the member configuration. | 39 | MemberList | MemberListRequest | MemberListResponse | MemberList lists all the members in the cluster. | 40 41 42 43 ##### service `KV` (etcdserver/etcdserverpb/rpc.proto) 44 45 | Method | Request Type | Response Type | Description | 46 | ------ | ------------ | ------------- | ----------- | 47 | Range | RangeRequest | RangeResponse | Range gets the keys in the range from the key-value store. | 48 | Put | PutRequest | PutResponse | Put puts the given key into the key-value store. A put request increments the revision of the key-value store and generates one event in the event history. | 49 | DeleteRange | DeleteRangeRequest | DeleteRangeResponse | DeleteRange deletes the given range from the key-value store. A delete request increments the revision of the key-value store and generates a delete event in the event history for every deleted key. | 50 | Txn | TxnRequest | TxnResponse | Txn processes multiple requests in a single transaction. A txn request increments the revision of the key-value store and generates events with the same revision for every completed request. It is not allowed to modify the same key several times within one txn. | 51 | Compact | CompactionRequest | CompactionResponse | Compact compacts the event history in the etcd key-value store. The key-value store should be periodically compacted or the event history will continue to grow indefinitely. | 52 53 54 55 ##### service `Lease` (etcdserver/etcdserverpb/rpc.proto) 56 57 | Method | Request Type | Response Type | Description | 58 | ------ | ------------ | ------------- | ----------- | 59 | LeaseGrant | LeaseGrantRequest | LeaseGrantResponse | LeaseGrant creates a lease which expires if the server does not receive a keepAlive within a given time to live period. All keys attached to the lease will be expired and deleted if the lease expires. Each expired key generates a delete event in the event history. | 60 | LeaseRevoke | LeaseRevokeRequest | LeaseRevokeResponse | LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted. | 61 | LeaseKeepAlive | LeaseKeepAliveRequest | LeaseKeepAliveResponse | LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client to the server and streaming keep alive responses from the server to the client. | 62 | LeaseTimeToLive | LeaseTimeToLiveRequest | LeaseTimeToLiveResponse | LeaseTimeToLive retrieves lease information. | 63 | LeaseLeases | LeaseLeasesRequest | LeaseLeasesResponse | LeaseLeases lists all existing leases. | 64 65 66 67 ##### service `Maintenance` (etcdserver/etcdserverpb/rpc.proto) 68 69 | Method | Request Type | Response Type | Description | 70 | ------ | ------------ | ------------- | ----------- | 71 | Alarm | AlarmRequest | AlarmResponse | Alarm activates, deactivates, and queries alarms regarding cluster health. | 72 | Status | StatusRequest | StatusResponse | Status gets the status of the member. | 73 | Defragment | DefragmentRequest | DefragmentResponse | Defragment defragments a member's backend database to recover storage space. | 74 | Hash | HashRequest | HashResponse | Hash computes the hash of whole backend keyspace, including key, lease, and other buckets in storage. This is designed for testing ONLY! Do not rely on this in production with ongoing transactions, since Hash operation does not hold MVCC locks. Use "HashKV" API instead for "key" bucket consistency checks. | 75 | HashKV | HashKVRequest | HashKVResponse | HashKV computes the hash of all MVCC keys up to a given revision. It only iterates "key" bucket in backend storage. | 76 | Snapshot | SnapshotRequest | SnapshotResponse | Snapshot sends a snapshot of the entire backend from a member over a stream to a client. | 77 | MoveLeader | MoveLeaderRequest | MoveLeaderResponse | MoveLeader requests current leader node to transfer its leadership to transferee. | 78 79 80 81 ##### service `Watch` (etcdserver/etcdserverpb/rpc.proto) 82 83 | Method | Request Type | Response Type | Description | 84 | ------ | ------------ | ------------- | ----------- | 85 | Watch | WatchRequest | WatchResponse | Watch watches for events happening or that have happened. Both input and output are streams; the input stream is for creating and canceling watchers and the output stream sends events. One watch RPC can watch on multiple key ranges, streaming events for several watches at once. The entire event history can be watched starting from the last compaction revision. | 86 87 88 89 ##### message `AlarmMember` (etcdserver/etcdserverpb/rpc.proto) 90 91 | Field | Description | Type | 92 | ----- | ----------- | ---- | 93 | memberID | memberID is the ID of the member associated with the raised alarm. | uint64 | 94 | alarm | alarm is the type of alarm which has been raised. | AlarmType | 95 96 97 98 ##### message `AlarmRequest` (etcdserver/etcdserverpb/rpc.proto) 99 100 | Field | Description | Type | 101 | ----- | ----------- | ---- | 102 | action | action is the kind of alarm request to issue. The action may GET alarm statuses, ACTIVATE an alarm, or DEACTIVATE a raised alarm. | AlarmAction | 103 | memberID | memberID is the ID of the member associated with the alarm. If memberID is 0, the alarm request covers all members. | uint64 | 104 | alarm | alarm is the type of alarm to consider for this request. | AlarmType | 105 106 107 108 ##### message `AlarmResponse` (etcdserver/etcdserverpb/rpc.proto) 109 110 | Field | Description | Type | 111 | ----- | ----------- | ---- | 112 | header | | ResponseHeader | 113 | alarms | alarms is a list of alarms associated with the alarm request. | (slice of) AlarmMember | 114 115 116 117 ##### message `AuthDisableRequest` (etcdserver/etcdserverpb/rpc.proto) 118 119 Empty field. 120 121 122 123 ##### message `AuthDisableResponse` (etcdserver/etcdserverpb/rpc.proto) 124 125 | Field | Description | Type | 126 | ----- | ----------- | ---- | 127 | header | | ResponseHeader | 128 129 130 131 ##### message `AuthEnableRequest` (etcdserver/etcdserverpb/rpc.proto) 132 133 Empty field. 134 135 136 137 ##### message `AuthEnableResponse` (etcdserver/etcdserverpb/rpc.proto) 138 139 | Field | Description | Type | 140 | ----- | ----------- | ---- | 141 | header | | ResponseHeader | 142 143 144 145 ##### message `AuthRoleAddRequest` (etcdserver/etcdserverpb/rpc.proto) 146 147 | Field | Description | Type | 148 | ----- | ----------- | ---- | 149 | name | name is the name of the role to add to the authentication system. | string | 150 151 152 153 ##### message `AuthRoleAddResponse` (etcdserver/etcdserverpb/rpc.proto) 154 155 | Field | Description | Type | 156 | ----- | ----------- | ---- | 157 | header | | ResponseHeader | 158 159 160 161 ##### message `AuthRoleDeleteRequest` (etcdserver/etcdserverpb/rpc.proto) 162 163 | Field | Description | Type | 164 | ----- | ----------- | ---- | 165 | role | | string | 166 167 168 169 ##### message `AuthRoleDeleteResponse` (etcdserver/etcdserverpb/rpc.proto) 170 171 | Field | Description | Type | 172 | ----- | ----------- | ---- | 173 | header | | ResponseHeader | 174 175 176 177 ##### message `AuthRoleGetRequest` (etcdserver/etcdserverpb/rpc.proto) 178 179 | Field | Description | Type | 180 | ----- | ----------- | ---- | 181 | role | | string | 182 183 184 185 ##### message `AuthRoleGetResponse` (etcdserver/etcdserverpb/rpc.proto) 186 187 | Field | Description | Type | 188 | ----- | ----------- | ---- | 189 | header | | ResponseHeader | 190 | perm | | (slice of) authpb.Permission | 191 192 193 194 ##### message `AuthRoleGrantPermissionRequest` (etcdserver/etcdserverpb/rpc.proto) 195 196 | Field | Description | Type | 197 | ----- | ----------- | ---- | 198 | name | name is the name of the role which will be granted the permission. | string | 199 | perm | perm is the permission to grant to the role. | authpb.Permission | 200 201 202 203 ##### message `AuthRoleGrantPermissionResponse` (etcdserver/etcdserverpb/rpc.proto) 204 205 | Field | Description | Type | 206 | ----- | ----------- | ---- | 207 | header | | ResponseHeader | 208 209 210 211 ##### message `AuthRoleListRequest` (etcdserver/etcdserverpb/rpc.proto) 212 213 Empty field. 214 215 216 217 ##### message `AuthRoleListResponse` (etcdserver/etcdserverpb/rpc.proto) 218 219 | Field | Description | Type | 220 | ----- | ----------- | ---- | 221 | header | | ResponseHeader | 222 | roles | | (slice of) string | 223 224 225 226 ##### message `AuthRoleRevokePermissionRequest` (etcdserver/etcdserverpb/rpc.proto) 227 228 | Field | Description | Type | 229 | ----- | ----------- | ---- | 230 | role | | string | 231 | key | | bytes | 232 | range_end | | bytes | 233 234 235 236 ##### message `AuthRoleRevokePermissionResponse` (etcdserver/etcdserverpb/rpc.proto) 237 238 | Field | Description | Type | 239 | ----- | ----------- | ---- | 240 | header | | ResponseHeader | 241 242 243 244 ##### message `AuthUserAddRequest` (etcdserver/etcdserverpb/rpc.proto) 245 246 | Field | Description | Type | 247 | ----- | ----------- | ---- | 248 | name | | string | 249 | password | | string | 250 251 252 253 ##### message `AuthUserAddResponse` (etcdserver/etcdserverpb/rpc.proto) 254 255 | Field | Description | Type | 256 | ----- | ----------- | ---- | 257 | header | | ResponseHeader | 258 259 260 261 ##### message `AuthUserChangePasswordRequest` (etcdserver/etcdserverpb/rpc.proto) 262 263 | Field | Description | Type | 264 | ----- | ----------- | ---- | 265 | name | name is the name of the user whose password is being changed. | string | 266 | password | password is the new password for the user. | string | 267 268 269 270 ##### message `AuthUserChangePasswordResponse` (etcdserver/etcdserverpb/rpc.proto) 271 272 | Field | Description | Type | 273 | ----- | ----------- | ---- | 274 | header | | ResponseHeader | 275 276 277 278 ##### message `AuthUserDeleteRequest` (etcdserver/etcdserverpb/rpc.proto) 279 280 | Field | Description | Type | 281 | ----- | ----------- | ---- | 282 | name | name is the name of the user to delete. | string | 283 284 285 286 ##### message `AuthUserDeleteResponse` (etcdserver/etcdserverpb/rpc.proto) 287 288 | Field | Description | Type | 289 | ----- | ----------- | ---- | 290 | header | | ResponseHeader | 291 292 293 294 ##### message `AuthUserGetRequest` (etcdserver/etcdserverpb/rpc.proto) 295 296 | Field | Description | Type | 297 | ----- | ----------- | ---- | 298 | name | | string | 299 300 301 302 ##### message `AuthUserGetResponse` (etcdserver/etcdserverpb/rpc.proto) 303 304 | Field | Description | Type | 305 | ----- | ----------- | ---- | 306 | header | | ResponseHeader | 307 | roles | | (slice of) string | 308 309 310 311 ##### message `AuthUserGrantRoleRequest` (etcdserver/etcdserverpb/rpc.proto) 312 313 | Field | Description | Type | 314 | ----- | ----------- | ---- | 315 | user | user is the name of the user which should be granted a given role. | string | 316 | role | role is the name of the role to grant to the user. | string | 317 318 319 320 ##### message `AuthUserGrantRoleResponse` (etcdserver/etcdserverpb/rpc.proto) 321 322 | Field | Description | Type | 323 | ----- | ----------- | ---- | 324 | header | | ResponseHeader | 325 326 327 328 ##### message `AuthUserListRequest` (etcdserver/etcdserverpb/rpc.proto) 329 330 Empty field. 331 332 333 334 ##### message `AuthUserListResponse` (etcdserver/etcdserverpb/rpc.proto) 335 336 | Field | Description | Type | 337 | ----- | ----------- | ---- | 338 | header | | ResponseHeader | 339 | users | | (slice of) string | 340 341 342 343 ##### message `AuthUserRevokeRoleRequest` (etcdserver/etcdserverpb/rpc.proto) 344 345 | Field | Description | Type | 346 | ----- | ----------- | ---- | 347 | name | | string | 348 | role | | string | 349 350 351 352 ##### message `AuthUserRevokeRoleResponse` (etcdserver/etcdserverpb/rpc.proto) 353 354 | Field | Description | Type | 355 | ----- | ----------- | ---- | 356 | header | | ResponseHeader | 357 358 359 360 ##### message `AuthenticateRequest` (etcdserver/etcdserverpb/rpc.proto) 361 362 | Field | Description | Type | 363 | ----- | ----------- | ---- | 364 | name | | string | 365 | password | | string | 366 367 368 369 ##### message `AuthenticateResponse` (etcdserver/etcdserverpb/rpc.proto) 370 371 | Field | Description | Type | 372 | ----- | ----------- | ---- | 373 | header | | ResponseHeader | 374 | token | token is an authorized token that can be used in succeeding RPCs | string | 375 376 377 378 ##### message `CompactionRequest` (etcdserver/etcdserverpb/rpc.proto) 379 380 CompactionRequest compacts the key-value store up to a given revision. All superseded keys with a revision less than the compaction revision will be removed. 381 382 | Field | Description | Type | 383 | ----- | ----------- | ---- | 384 | revision | revision is the key-value store revision for the compaction operation. | int64 | 385 | physical | physical is set so the RPC will wait until the compaction is physically applied to the local database such that compacted entries are totally removed from the backend database. | bool | 386 387 388 389 ##### message `CompactionResponse` (etcdserver/etcdserverpb/rpc.proto) 390 391 | Field | Description | Type | 392 | ----- | ----------- | ---- | 393 | header | | ResponseHeader | 394 395 396 397 ##### message `Compare` (etcdserver/etcdserverpb/rpc.proto) 398 399 | Field | Description | Type | 400 | ----- | ----------- | ---- | 401 | result | result is logical comparison operation for this comparison. | CompareResult | 402 | target | target is the key-value field to inspect for the comparison. | CompareTarget | 403 | key | key is the subject key for the comparison operation. | bytes | 404 | target_union | | oneof | 405 | version | version is the version of the given key | int64 | 406 | create_revision | create_revision is the creation revision of the given key | int64 | 407 | mod_revision | mod_revision is the last modified revision of the given key. | int64 | 408 | value | value is the value of the given key, in bytes. | bytes | 409 | lease | lease is the lease id of the given key. | int64 | 410 | range_end | range_end compares the given target to all keys in the range [key, range_end). See RangeRequest for more details on key ranges. | bytes | 411 412 413 414 ##### message `DefragmentRequest` (etcdserver/etcdserverpb/rpc.proto) 415 416 Empty field. 417 418 419 420 ##### message `DefragmentResponse` (etcdserver/etcdserverpb/rpc.proto) 421 422 | Field | Description | Type | 423 | ----- | ----------- | ---- | 424 | header | | ResponseHeader | 425 426 427 428 ##### message `DeleteRangeRequest` (etcdserver/etcdserverpb/rpc.proto) 429 430 | Field | Description | Type | 431 | ----- | ----------- | ---- | 432 | key | key is the first key to delete in the range. | bytes | 433 | range_end | range_end is the key following the last key to delete for the range [key, range_end). If range_end is not given, the range is defined to contain only the key argument. If range_end is one bit larger than the given key, then the range is all the keys with the prefix (the given key). If range_end is '\0', the range is all keys greater than or equal to the key argument. | bytes | 434 | prev_kv | If prev_kv is set, etcd gets the previous key-value pairs before deleting it. The previous key-value pairs will be returned in the delete response. | bool | 435 436 437 438 ##### message `DeleteRangeResponse` (etcdserver/etcdserverpb/rpc.proto) 439 440 | Field | Description | Type | 441 | ----- | ----------- | ---- | 442 | header | | ResponseHeader | 443 | deleted | deleted is the number of keys deleted by the delete range request. | int64 | 444 | prev_kvs | if prev_kv is set in the request, the previous key-value pairs will be returned. | (slice of) mvccpb.KeyValue | 445 446 447 448 ##### message `HashKVRequest` (etcdserver/etcdserverpb/rpc.proto) 449 450 | Field | Description | Type | 451 | ----- | ----------- | ---- | 452 | revision | revision is the key-value store revision for the hash operation. | int64 | 453 454 455 456 ##### message `HashKVResponse` (etcdserver/etcdserverpb/rpc.proto) 457 458 | Field | Description | Type | 459 | ----- | ----------- | ---- | 460 | header | | ResponseHeader | 461 | hash | hash is the hash value computed from the responding member's MVCC keys up to a given revision. | uint32 | 462 | compact_revision | compact_revision is the compacted revision of key-value store when hash begins. | int64 | 463 464 465 466 ##### message `HashRequest` (etcdserver/etcdserverpb/rpc.proto) 467 468 Empty field. 469 470 471 472 ##### message `HashResponse` (etcdserver/etcdserverpb/rpc.proto) 473 474 | Field | Description | Type | 475 | ----- | ----------- | ---- | 476 | header | | ResponseHeader | 477 | hash | hash is the hash value computed from the responding member's KV's backend. | uint32 | 478 479 480 481 ##### message `LeaseCheckpoint` (etcdserver/etcdserverpb/rpc.proto) 482 483 | Field | Description | Type | 484 | ----- | ----------- | ---- | 485 | ID | ID is the lease ID to checkpoint. | int64 | 486 | remaining_TTL | Remaining_TTL is the remaining time until expiry of the lease. | int64 | 487 488 489 490 ##### message `LeaseCheckpointRequest` (etcdserver/etcdserverpb/rpc.proto) 491 492 | Field | Description | Type | 493 | ----- | ----------- | ---- | 494 | checkpoints | | (slice of) LeaseCheckpoint | 495 496 497 498 ##### message `LeaseCheckpointResponse` (etcdserver/etcdserverpb/rpc.proto) 499 500 | Field | Description | Type | 501 | ----- | ----------- | ---- | 502 | header | | ResponseHeader | 503 504 505 506 ##### message `LeaseGrantRequest` (etcdserver/etcdserverpb/rpc.proto) 507 508 | Field | Description | Type | 509 | ----- | ----------- | ---- | 510 | TTL | TTL is the advisory time-to-live in seconds. Expired lease will return -1. | int64 | 511 | ID | ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID. | int64 | 512 513 514 515 ##### message `LeaseGrantResponse` (etcdserver/etcdserverpb/rpc.proto) 516 517 | Field | Description | Type | 518 | ----- | ----------- | ---- | 519 | header | | ResponseHeader | 520 | ID | ID is the lease ID for the granted lease. | int64 | 521 | TTL | TTL is the server chosen lease time-to-live in seconds. | int64 | 522 | error | | string | 523 524 525 526 ##### message `LeaseKeepAliveRequest` (etcdserver/etcdserverpb/rpc.proto) 527 528 | Field | Description | Type | 529 | ----- | ----------- | ---- | 530 | ID | ID is the lease ID for the lease to keep alive. | int64 | 531 532 533 534 ##### message `LeaseKeepAliveResponse` (etcdserver/etcdserverpb/rpc.proto) 535 536 | Field | Description | Type | 537 | ----- | ----------- | ---- | 538 | header | | ResponseHeader | 539 | ID | ID is the lease ID from the keep alive request. | int64 | 540 | TTL | TTL is the new time-to-live for the lease. | int64 | 541 542 543 544 ##### message `LeaseLeasesRequest` (etcdserver/etcdserverpb/rpc.proto) 545 546 Empty field. 547 548 549 550 ##### message `LeaseLeasesResponse` (etcdserver/etcdserverpb/rpc.proto) 551 552 | Field | Description | Type | 553 | ----- | ----------- | ---- | 554 | header | | ResponseHeader | 555 | leases | | (slice of) LeaseStatus | 556 557 558 559 ##### message `LeaseRevokeRequest` (etcdserver/etcdserverpb/rpc.proto) 560 561 | Field | Description | Type | 562 | ----- | ----------- | ---- | 563 | ID | ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted. | int64 | 564 565 566 567 ##### message `LeaseRevokeResponse` (etcdserver/etcdserverpb/rpc.proto) 568 569 | Field | Description | Type | 570 | ----- | ----------- | ---- | 571 | header | | ResponseHeader | 572 573 574 575 ##### message `LeaseStatus` (etcdserver/etcdserverpb/rpc.proto) 576 577 | Field | Description | Type | 578 | ----- | ----------- | ---- | 579 | ID | | int64 | 580 581 582 583 ##### message `LeaseTimeToLiveRequest` (etcdserver/etcdserverpb/rpc.proto) 584 585 | Field | Description | Type | 586 | ----- | ----------- | ---- | 587 | ID | ID is the lease ID for the lease. | int64 | 588 | keys | keys is true to query all the keys attached to this lease. | bool | 589 590 591 592 ##### message `LeaseTimeToLiveResponse` (etcdserver/etcdserverpb/rpc.proto) 593 594 | Field | Description | Type | 595 | ----- | ----------- | ---- | 596 | header | | ResponseHeader | 597 | ID | ID is the lease ID from the keep alive request. | int64 | 598 | TTL | TTL is the remaining TTL in seconds for the lease; the lease will expire in under TTL+1 seconds. | int64 | 599 | grantedTTL | GrantedTTL is the initial granted time in seconds upon lease creation/renewal. | int64 | 600 | keys | Keys is the list of keys attached to this lease. | (slice of) bytes | 601 602 603 604 ##### message `Member` (etcdserver/etcdserverpb/rpc.proto) 605 606 | Field | Description | Type | 607 | ----- | ----------- | ---- | 608 | ID | ID is the member ID for this member. | uint64 | 609 | name | name is the human-readable name of the member. If the member is not started, the name will be an empty string. | string | 610 | peerURLs | peerURLs is the list of URLs the member exposes to the cluster for communication. | (slice of) string | 611 | clientURLs | clientURLs is the list of URLs the member exposes to clients for communication. If the member is not started, clientURLs will be empty. | (slice of) string | 612 613 614 615 ##### message `MemberAddRequest` (etcdserver/etcdserverpb/rpc.proto) 616 617 | Field | Description | Type | 618 | ----- | ----------- | ---- | 619 | peerURLs | peerURLs is the list of URLs the added member will use to communicate with the cluster. | (slice of) string | 620 621 622 623 ##### message `MemberAddResponse` (etcdserver/etcdserverpb/rpc.proto) 624 625 | Field | Description | Type | 626 | ----- | ----------- | ---- | 627 | header | | ResponseHeader | 628 | member | member is the member information for the added member. | Member | 629 | members | members is a list of all members after adding the new member. | (slice of) Member | 630 631 632 633 ##### message `MemberListRequest` (etcdserver/etcdserverpb/rpc.proto) 634 635 Empty field. 636 637 638 639 ##### message `MemberListResponse` (etcdserver/etcdserverpb/rpc.proto) 640 641 | Field | Description | Type | 642 | ----- | ----------- | ---- | 643 | header | | ResponseHeader | 644 | members | members is a list of all members associated with the cluster. | (slice of) Member | 645 646 647 648 ##### message `MemberRemoveRequest` (etcdserver/etcdserverpb/rpc.proto) 649 650 | Field | Description | Type | 651 | ----- | ----------- | ---- | 652 | ID | ID is the member ID of the member to remove. | uint64 | 653 654 655 656 ##### message `MemberRemoveResponse` (etcdserver/etcdserverpb/rpc.proto) 657 658 | Field | Description | Type | 659 | ----- | ----------- | ---- | 660 | header | | ResponseHeader | 661 | members | members is a list of all members after removing the member. | (slice of) Member | 662 663 664 665 ##### message `MemberUpdateRequest` (etcdserver/etcdserverpb/rpc.proto) 666 667 | Field | Description | Type | 668 | ----- | ----------- | ---- | 669 | ID | ID is the member ID of the member to update. | uint64 | 670 | peerURLs | peerURLs is the new list of URLs the member will use to communicate with the cluster. | (slice of) string | 671 672 673 674 ##### message `MemberUpdateResponse` (etcdserver/etcdserverpb/rpc.proto) 675 676 | Field | Description | Type | 677 | ----- | ----------- | ---- | 678 | header | | ResponseHeader | 679 | members | members is a list of all members after updating the member. | (slice of) Member | 680 681 682 683 ##### message `MoveLeaderRequest` (etcdserver/etcdserverpb/rpc.proto) 684 685 | Field | Description | Type | 686 | ----- | ----------- | ---- | 687 | targetID | targetID is the node ID for the new leader. | uint64 | 688 689 690 691 ##### message `MoveLeaderResponse` (etcdserver/etcdserverpb/rpc.proto) 692 693 | Field | Description | Type | 694 | ----- | ----------- | ---- | 695 | header | | ResponseHeader | 696 697 698 699 ##### message `PutRequest` (etcdserver/etcdserverpb/rpc.proto) 700 701 | Field | Description | Type | 702 | ----- | ----------- | ---- | 703 | key | key is the key, in bytes, to put into the key-value store. | bytes | 704 | value | value is the value, in bytes, to associate with the key in the key-value store. | bytes | 705 | lease | lease is the lease ID to associate with the key in the key-value store. A lease value of 0 indicates no lease. | int64 | 706 | prev_kv | If prev_kv is set, etcd gets the previous key-value pair before changing it. The previous key-value pair will be returned in the put response. | bool | 707 | ignore_value | If ignore_value is set, etcd updates the key using its current value. Returns an error if the key does not exist. | bool | 708 | ignore_lease | If ignore_lease is set, etcd updates the key using its current lease. Returns an error if the key does not exist. | bool | 709 710 711 712 ##### message `PutResponse` (etcdserver/etcdserverpb/rpc.proto) 713 714 | Field | Description | Type | 715 | ----- | ----------- | ---- | 716 | header | | ResponseHeader | 717 | prev_kv | if prev_kv is set in the request, the previous key-value pair will be returned. | mvccpb.KeyValue | 718 719 720 721 ##### message `RangeRequest` (etcdserver/etcdserverpb/rpc.proto) 722 723 | Field | Description | Type | 724 | ----- | ----------- | ---- | 725 | key | key is the first key for the range. If range_end is not given, the request only looks up key. | bytes | 726 | range_end | range_end is the upper bound on the requested range [key, range_end). If range_end is '\0', the range is all keys >= key. If range_end is key plus one (e.g., "aa"+1 == "ab", "a\xff"+1 == "b"), then the range request gets all keys prefixed with key. If both key and range_end are '\0', then the range request returns all keys. | bytes | 727 | limit | limit is a limit on the number of keys returned for the request. When limit is set to 0, it is treated as no limit. | int64 | 728 | revision | revision is the point-in-time of the key-value store to use for the range. If revision is less or equal to zero, the range is over the newest key-value store. If the revision has been compacted, ErrCompacted is returned as a response. | int64 | 729 | sort_order | sort_order is the order for returned sorted results. | SortOrder | 730 | sort_target | sort_target is the key-value field to use for sorting. | SortTarget | 731 | serializable | serializable sets the range request to use serializable member-local reads. Range requests are linearizable by default; linearizable requests have higher latency and lower throughput than serializable requests but reflect the current consensus of the cluster. For better performance, in exchange for possible stale reads, a serializable range request is served locally without needing to reach consensus with other nodes in the cluster. | bool | 732 | keys_only | keys_only when set returns only the keys and not the values. | bool | 733 | count_only | count_only when set returns only the count of the keys in the range. | bool | 734 | min_mod_revision | min_mod_revision is the lower bound for returned key mod revisions; all keys with lesser mod revisions will be filtered away. | int64 | 735 | max_mod_revision | max_mod_revision is the upper bound for returned key mod revisions; all keys with greater mod revisions will be filtered away. | int64 | 736 | min_create_revision | min_create_revision is the lower bound for returned key create revisions; all keys with lesser create revisions will be filtered away. | int64 | 737 | max_create_revision | max_create_revision is the upper bound for returned key create revisions; all keys with greater create revisions will be filtered away. | int64 | 738 739 740 741 ##### message `RangeResponse` (etcdserver/etcdserverpb/rpc.proto) 742 743 | Field | Description | Type | 744 | ----- | ----------- | ---- | 745 | header | | ResponseHeader | 746 | kvs | kvs is the list of key-value pairs matched by the range request. kvs is empty when count is requested. | (slice of) mvccpb.KeyValue | 747 | more | more indicates if there are more keys to return in the requested range. | bool | 748 | count | count is set to the number of keys within the range when requested. | int64 | 749 750 751 752 ##### message `RequestOp` (etcdserver/etcdserverpb/rpc.proto) 753 754 | Field | Description | Type | 755 | ----- | ----------- | ---- | 756 | request | request is a union of request types accepted by a transaction. | oneof | 757 | request_range | | RangeRequest | 758 | request_put | | PutRequest | 759 | request_delete_range | | DeleteRangeRequest | 760 | request_txn | | TxnRequest | 761 762 763 764 ##### message `ResponseHeader` (etcdserver/etcdserverpb/rpc.proto) 765 766 | Field | Description | Type | 767 | ----- | ----------- | ---- | 768 | cluster_id | cluster_id is the ID of the cluster which sent the response. | uint64 | 769 | member_id | member_id is the ID of the member which sent the response. | uint64 | 770 | revision | revision is the key-value store revision when the request was applied. For watch progress responses, the header.revision indicates progress. All future events recieved in this stream are guaranteed to have a higher revision number than the header.revision number. | int64 | 771 | raft_term | raft_term is the raft term when the request was applied. | uint64 | 772 773 774 775 ##### message `ResponseOp` (etcdserver/etcdserverpb/rpc.proto) 776 777 | Field | Description | Type | 778 | ----- | ----------- | ---- | 779 | response | response is a union of response types returned by a transaction. | oneof | 780 | response_range | | RangeResponse | 781 | response_put | | PutResponse | 782 | response_delete_range | | DeleteRangeResponse | 783 | response_txn | | TxnResponse | 784 785 786 787 ##### message `SnapshotRequest` (etcdserver/etcdserverpb/rpc.proto) 788 789 Empty field. 790 791 792 793 ##### message `SnapshotResponse` (etcdserver/etcdserverpb/rpc.proto) 794 795 | Field | Description | Type | 796 | ----- | ----------- | ---- | 797 | header | header has the current key-value store information. The first header in the snapshot stream indicates the point in time of the snapshot. | ResponseHeader | 798 | remaining_bytes | remaining_bytes is the number of blob bytes to be sent after this message | uint64 | 799 | blob | blob contains the next chunk of the snapshot in the snapshot stream. | bytes | 800 801 802 803 ##### message `StatusRequest` (etcdserver/etcdserverpb/rpc.proto) 804 805 Empty field. 806 807 808 809 ##### message `StatusResponse` (etcdserver/etcdserverpb/rpc.proto) 810 811 | Field | Description | Type | 812 | ----- | ----------- | ---- | 813 | header | | ResponseHeader | 814 | version | version is the cluster protocol version used by the responding member. | string | 815 | dbSize | dbSize is the size of the backend database physically allocated, in bytes, of the responding member. | int64 | 816 | leader | leader is the member ID which the responding member believes is the current leader. | uint64 | 817 | raftIndex | raftIndex is the current raft committed index of the responding member. | uint64 | 818 | raftTerm | raftTerm is the current raft term of the responding member. | uint64 | 819 | raftAppliedIndex | raftAppliedIndex is the current raft applied index of the responding member. | uint64 | 820 | errors | errors contains alarm/health information and status. | (slice of) string | 821 | dbSizeInUse | dbSizeInUse is the size of the backend database logically in use, in bytes, of the responding member. | int64 | 822 823 824 825 ##### message `TxnRequest` (etcdserver/etcdserverpb/rpc.proto) 826 827 From google paxosdb paper: Our implementation hinges around a powerful primitive which we call MultiOp. All other database operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically and consists of three components: 1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check for the absence or presence of a value, or compare with a given value. Two different tests in the guard may apply to the same or different entries in the database. All tests in the guard are applied and MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise it executes f op (see item 3 below). 2. A list of database operations called t op. Each operation in the list is either an insert, delete, or lookup operation, and applies to a single database entry. Two different operations in the list may apply to the same or different entries in the database. These operations are executed if guard evaluates to true. 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false. 828 829 | Field | Description | Type | 830 | ----- | ----------- | ---- | 831 | compare | compare is a list of predicates representing a conjunction of terms. If the comparisons succeed, then the success requests will be processed in order, and the response will contain their respective responses in order. If the comparisons fail, then the failure requests will be processed in order, and the response will contain their respective responses in order. | (slice of) Compare | 832 | success | success is a list of requests which will be applied when compare evaluates to true. | (slice of) RequestOp | 833 | failure | failure is a list of requests which will be applied when compare evaluates to false. | (slice of) RequestOp | 834 835 836 837 ##### message `TxnResponse` (etcdserver/etcdserverpb/rpc.proto) 838 839 | Field | Description | Type | 840 | ----- | ----------- | ---- | 841 | header | | ResponseHeader | 842 | succeeded | succeeded is set to true if the compare evaluated to true or false otherwise. | bool | 843 | responses | responses is a list of responses corresponding to the results from applying success if succeeded is true or failure if succeeded is false. | (slice of) ResponseOp | 844 845 846 847 ##### message `WatchCancelRequest` (etcdserver/etcdserverpb/rpc.proto) 848 849 | Field | Description | Type | 850 | ----- | ----------- | ---- | 851 | watch_id | watch_id is the watcher id to cancel so that no more events are transmitted. | int64 | 852 853 854 855 ##### message `WatchCreateRequest` (etcdserver/etcdserverpb/rpc.proto) 856 857 | Field | Description | Type | 858 | ----- | ----------- | ---- | 859 | key | key is the key to register for watching. | bytes | 860 | range_end | range_end is the end of the range [key, range_end) to watch. If range_end is not given, only the key argument is watched. If range_end is equal to '\0', all keys greater than or equal to the key argument are watched. If the range_end is one bit larger than the given key, then all keys with the prefix (the given key) will be watched. | bytes | 861 | start_revision | start_revision is an optional revision to watch from (inclusive). No start_revision is "now". | int64 | 862 | progress_notify | progress_notify is set so that the etcd server will periodically send a WatchResponse with no events to the new watcher if there are no recent events. It is useful when clients wish to recover a disconnected watcher starting from a recent known revision. The etcd server may decide how often it will send notifications based on current load. | bool | 863 | filters | filters filter the events at server side before it sends back to the watcher. | (slice of) FilterType | 864 | prev_kv | If prev_kv is set, created watcher gets the previous KV before the event happens. If the previous KV is already compacted, nothing will be returned. | bool | 865 | watch_id | If watch_id is provided and non-zero, it will be assigned to this watcher. Since creating a watcher in etcd is not a synchronous operation, this can be used ensure that ordering is correct when creating multiple watchers on the same stream. Creating a watcher with an ID already in use on the stream will cause an error to be returned. | int64 | 866 | fragment | fragment enables splitting large revisions into multiple watch responses. | bool | 867 868 869 870 ##### message `WatchProgressRequest` (etcdserver/etcdserverpb/rpc.proto) 871 872 Requests the a watch stream progress status be sent in the watch response stream as soon as possible. 873 874 Empty field. 875 876 877 878 ##### message `WatchRequest` (etcdserver/etcdserverpb/rpc.proto) 879 880 | Field | Description | Type | 881 | ----- | ----------- | ---- | 882 | request_union | request_union is a request to either create a new watcher or cancel an existing watcher. | oneof | 883 | create_request | | WatchCreateRequest | 884 | cancel_request | | WatchCancelRequest | 885 | progress_request | | WatchProgressRequest | 886 887 888 889 ##### message `WatchResponse` (etcdserver/etcdserverpb/rpc.proto) 890 891 | Field | Description | Type | 892 | ----- | ----------- | ---- | 893 | header | | ResponseHeader | 894 | watch_id | watch_id is the ID of the watcher that corresponds to the response. | int64 | 895 | created | created is set to true if the response is for a create watch request. The client should record the watch_id and expect to receive events for the created watcher from the same stream. All events sent to the created watcher will attach with the same watch_id. | bool | 896 | canceled | canceled is set to true if the response is for a cancel watch request. No further events will be sent to the canceled watcher. | bool | 897 | compact_revision | compact_revision is set to the minimum index if a watcher tries to watch at a compacted index. This happens when creating a watcher at a compacted revision or the watcher cannot catch up with the progress of the key-value store. The client should treat the watcher as canceled and should not try to create any watcher with the same start_revision again. | int64 | 898 | cancel_reason | cancel_reason indicates the reason for canceling the watcher. | string | 899 | fragment | framgment is true if large watch response was split over multiple responses. | bool | 900 | events | | (slice of) mvccpb.Event | 901 902 903 904 ##### message `Event` (mvcc/mvccpb/kv.proto) 905 906 | Field | Description | Type | 907 | ----- | ----------- | ---- | 908 | type | type is the kind of event. If type is a PUT, it indicates new data has been stored to the key. If type is a DELETE, it indicates the key was deleted. | EventType | 909 | kv | kv holds the KeyValue for the event. A PUT event contains current kv pair. A PUT event with kv.Version=1 indicates the creation of a key. A DELETE/EXPIRE event contains the deleted key with its modification revision set to the revision of deletion. | KeyValue | 910 | prev_kv | prev_kv holds the key-value pair before the event happens. | KeyValue | 911 912 913 914 ##### message `KeyValue` (mvcc/mvccpb/kv.proto) 915 916 | Field | Description | Type | 917 | ----- | ----------- | ---- | 918 | key | key is the key in bytes. An empty key is not allowed. | bytes | 919 | create_revision | create_revision is the revision of last creation on this key. | int64 | 920 | mod_revision | mod_revision is the revision of last modification on this key. | int64 | 921 | version | version is the version of the key. A deletion resets the version to zero and any modification of the key increases its version. | int64 | 922 | value | value is the value held by the key, in bytes. | bytes | 923 | lease | lease is the ID of the lease that attached to key. When the attached lease expires, the key will be deleted. If lease is 0, then no lease is attached to the key. | int64 | 924 925 926 927 ##### message `Lease` (lease/leasepb/lease.proto) 928 929 | Field | Description | Type | 930 | ----- | ----------- | ---- | 931 | ID | | int64 | 932 | TTL | | int64 | 933 | RemainingTTL | | int64 | 934 935 936 937 ##### message `LeaseInternalRequest` (lease/leasepb/lease.proto) 938 939 | Field | Description | Type | 940 | ----- | ----------- | ---- | 941 | LeaseTimeToLiveRequest | | etcdserverpb.LeaseTimeToLiveRequest | 942 943 944 945 ##### message `LeaseInternalResponse` (lease/leasepb/lease.proto) 946 947 | Field | Description | Type | 948 | ----- | ----------- | ---- | 949 | LeaseTimeToLiveResponse | | etcdserverpb.LeaseTimeToLiveResponse | 950 951 952 953 ##### message `Permission` (auth/authpb/auth.proto) 954 955 Permission is a single entity 956 957 | Field | Description | Type | 958 | ----- | ----------- | ---- | 959 | permType | | Type | 960 | key | | bytes | 961 | range_end | | bytes | 962 963 964 965 ##### message `Role` (auth/authpb/auth.proto) 966 967 Role is a single entry in the bucket authRoles 968 969 | Field | Description | Type | 970 | ----- | ----------- | ---- | 971 | name | | bytes | 972 | keyPermission | | (slice of) Permission | 973 974 975 976 ##### message `User` (auth/authpb/auth.proto) 977 978 User is a single entry in the bucket authUsers 979 980 | Field | Description | Type | 981 | ----- | ----------- | ---- | 982 | name | | bytes | 983 | password | | bytes | 984 | roles | | (slice of) string | 985 986 987