|
33 | 33 | - [PutRequest.Body](#neo.fs.v2.container.PutRequest.Body) |
34 | 34 | - [PutResponse](#neo.fs.v2.container.PutResponse) |
35 | 35 | - [PutResponse.Body](#neo.fs.v2.container.PutResponse.Body) |
| 36 | + - [RemoveAttributeRequest](#neo.fs.v2.container.RemoveAttributeRequest) |
| 37 | + - [RemoveAttributeRequest.Body](#neo.fs.v2.container.RemoveAttributeRequest.Body) |
| 38 | + - [RemoveAttributeRequest.Body.Parameters](#neo.fs.v2.container.RemoveAttributeRequest.Body.Parameters) |
| 39 | + - [RemoveAttributeResponse](#neo.fs.v2.container.RemoveAttributeResponse) |
| 40 | + - [RemoveAttributeResponse.Body](#neo.fs.v2.container.RemoveAttributeResponse.Body) |
| 41 | + - [SetAttributeRequest](#neo.fs.v2.container.SetAttributeRequest) |
| 42 | + - [SetAttributeRequest.Body](#neo.fs.v2.container.SetAttributeRequest.Body) |
| 43 | + - [SetAttributeRequest.Body.Parameters](#neo.fs.v2.container.SetAttributeRequest.Body.Parameters) |
| 44 | + - [SetAttributeResponse](#neo.fs.v2.container.SetAttributeResponse) |
| 45 | + - [SetAttributeResponse.Body](#neo.fs.v2.container.SetAttributeResponse.Body) |
36 | 46 | - [SetExtendedACLRequest](#neo.fs.v2.container.SetExtendedACLRequest) |
37 | 47 | - [SetExtendedACLRequest.Body](#neo.fs.v2.container.SetExtendedACLRequest.Body) |
38 | 48 | - [SetExtendedACLResponse](#neo.fs.v2.container.SetExtendedACLResponse) |
@@ -74,6 +84,8 @@ rpc List(ListRequest) returns (ListResponse); |
74 | 84 | rpc SetExtendedACL(SetExtendedACLRequest) returns (SetExtendedACLResponse); |
75 | 85 | rpc GetExtendedACL(GetExtendedACLRequest) returns (GetExtendedACLResponse); |
76 | 86 | rpc AnnounceUsedSpace(AnnounceUsedSpaceRequest) returns (AnnounceUsedSpaceResponse); |
| 87 | +rpc SetAttribute(SetAttributeRequest) returns (SetAttributeResponse); |
| 88 | +rpc RemoveAttribute(RemoveAttributeRequest) returns (RemoveAttributeResponse); |
77 | 89 |
|
78 | 90 | ``` |
79 | 91 |
|
@@ -191,6 +203,40 @@ contract. |
191 | 203 | | Name | Input | Output | |
192 | 204 | | ---- | ----- | ------ | |
193 | 205 | | AnnounceUsedSpace | [AnnounceUsedSpaceRequest](#neo.fs.v2.container.AnnounceUsedSpaceRequest) | [AnnounceUsedSpaceResponse](#neo.fs.v2.container.AnnounceUsedSpaceResponse) | |
| 206 | +#### Method SetAttribute |
| 207 | + |
| 208 | +Sends transaction calling contract method to set container attribute, and |
| 209 | +waits for the transaction to be executed. Deadline is determined by the |
| 210 | +transport protocol (e.g. `grpc-timeout` header). If the deadline is not |
| 211 | +set, server waits 15s after submitting the transaction. |
| 212 | + |
| 213 | +Statuses: |
| 214 | +- **OK** (0, SECTION_SUCCESS): \ |
| 215 | + attribute successfully set; |
| 216 | +- Common failures (SECTION_FAILURE_COMMON); |
| 217 | +- **CONTAINER_AWAIT_TIMEOUT** (3075, SECTION_CONTAINER): \ |
| 218 | + transaction was sent but not executed within the deadline. |
| 219 | + |
| 220 | +| Name | Input | Output | |
| 221 | +| ---- | ----- | ------ | |
| 222 | +| SetAttribute | [SetAttributeRequest](#neo.fs.v2.container.SetAttributeRequest) | [SetAttributeResponse](#neo.fs.v2.container.SetAttributeResponse) | |
| 223 | +#### Method RemoveAttribute |
| 224 | + |
| 225 | +Sends transaction calling contract method to remove container attribute, |
| 226 | +and waits for the transaction to be executed. Deadline is determined by |
| 227 | +the transport protocol (e.g. `grpc-timeout` header). If the deadline is |
| 228 | +not set, server waits 15s after submitting the transaction. |
| 229 | + |
| 230 | +Statuses: |
| 231 | +- **OK** (0, SECTION_SUCCESS): \ |
| 232 | + attribute successfully removed; |
| 233 | +- Common failures (SECTION_FAILURE_COMMON); |
| 234 | +- **CONTAINER_AWAIT_TIMEOUT** (3075, SECTION_CONTAINER): \ |
| 235 | + transaction was sent but not executed within the deadline. |
| 236 | + |
| 237 | +| Name | Input | Output | |
| 238 | +| ---- | ----- | ------ | |
| 239 | +| RemoveAttribute | [RemoveAttributeRequest](#neo.fs.v2.container.RemoveAttributeRequest) | [RemoveAttributeResponse](#neo.fs.v2.container.RemoveAttributeResponse) | |
194 | 240 | <!-- end services --> |
195 | 241 |
|
196 | 242 |
|
@@ -514,6 +560,148 @@ returned here to make sure everything has been done as expected. |
514 | 560 | | container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Unique identifier of the newly created container | |
515 | 561 |
|
516 | 562 |
|
| 563 | +<a name="neo.fs.v2.container.RemoveAttributeRequest"></a> |
| 564 | + |
| 565 | +### Message RemoveAttributeRequest |
| 566 | +Attribute removal request |
| 567 | + |
| 568 | + |
| 569 | +| Field | Type | Label | Description | |
| 570 | +| ----- | ---- | ----- | ----------- | |
| 571 | +| body | [RemoveAttributeRequest.Body](#neo.fs.v2.container.RemoveAttributeRequest.Body) | | Request payload. | |
| 572 | +| body_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of stable-marshalled `body` field. | |
| 573 | + |
| 574 | + |
| 575 | +<a name="neo.fs.v2.container.RemoveAttributeRequest.Body"></a> |
| 576 | + |
| 577 | +### Message RemoveAttributeRequest.Body |
| 578 | +Request payload message. |
| 579 | + |
| 580 | + |
| 581 | +| Field | Type | Label | Description | |
| 582 | +| ----- | ---- | ----- | ----------- | |
| 583 | +| parameters | [RemoveAttributeRequest.Body.Parameters](#neo.fs.v2.container.RemoveAttributeRequest.Body.Parameters) | | Op parameters. | |
| 584 | +| signature | [neo.fs.v2.refs.SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) | | RFC-6979 signature of stable-marshalled `parameters` field. The signature must authenticate either container owner or one of subjects in the `session_token` field if any. | |
| 585 | +| session_token | [neo.fs.v2.session.SessionTokenV2](#neo.fs.v2.session.SessionTokenV2) | | Optional session token. The token must be issued by the container owner. The token must have at least one subject authenticated by `signature` field. The token must have at least one context with this container and `CONTAINER_REMOVEATTRIBUTE` verb. | |
| 586 | + |
| 587 | + |
| 588 | +<a name="neo.fs.v2.container.RemoveAttributeRequest.Body.Parameters"></a> |
| 589 | + |
| 590 | +### Message RemoveAttributeRequest.Body.Parameters |
| 591 | +Op parameters message. |
| 592 | + |
| 593 | +If container does not have the `attribute`, nothing is done and status |
| 594 | +`OK` is returned. |
| 595 | + |
| 596 | +`attribute` must be one of: |
| 597 | + - `CORS`; |
| 598 | + - `__NEOFS__LOCK_UNTIL`. |
| 599 | + |
| 600 | +Attribute-specific requirements: |
| 601 | + - `__NEOFS__LOCK_UNTIL`: current timestamp must have already passed if any |
| 602 | + |
| 603 | + |
| 604 | +| Field | Type | Label | Description | |
| 605 | +| ----- | ---- | ----- | ----------- | |
| 606 | +| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Identifier of the container to remove attribute from. | |
| 607 | +| attribute | [string](#string) | | Attribute to be removed. | |
| 608 | + |
| 609 | + |
| 610 | +<a name="neo.fs.v2.container.RemoveAttributeResponse"></a> |
| 611 | + |
| 612 | +### Message RemoveAttributeResponse |
| 613 | +Attribute removal response |
| 614 | + |
| 615 | + |
| 616 | +| Field | Type | Label | Description | |
| 617 | +| ----- | ---- | ----- | ----------- | |
| 618 | +| body | [RemoveAttributeResponse.Body](#neo.fs.v2.container.RemoveAttributeResponse.Body) | | Request result. | |
| 619 | +| body_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of stable-marshalled `body` field. | |
| 620 | + |
| 621 | + |
| 622 | +<a name="neo.fs.v2.container.RemoveAttributeResponse.Body"></a> |
| 623 | + |
| 624 | +### Message RemoveAttributeResponse.Body |
| 625 | +Request result message. |
| 626 | + |
| 627 | + |
| 628 | +| Field | Type | Label | Description | |
| 629 | +| ----- | ---- | ----- | ----------- | |
| 630 | +| status | [neo.fs.v2.status.Status](#neo.fs.v2.status.Status) | | Operation execution status. | |
| 631 | + |
| 632 | + |
| 633 | +<a name="neo.fs.v2.container.SetAttributeRequest"></a> |
| 634 | + |
| 635 | +### Message SetAttributeRequest |
| 636 | +Attribute setting request |
| 637 | + |
| 638 | + |
| 639 | +| Field | Type | Label | Description | |
| 640 | +| ----- | ---- | ----- | ----------- | |
| 641 | +| body | [SetAttributeRequest.Body](#neo.fs.v2.container.SetAttributeRequest.Body) | | Request payload. | |
| 642 | +| body_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of stable-marshalled `body` field. | |
| 643 | + |
| 644 | + |
| 645 | +<a name="neo.fs.v2.container.SetAttributeRequest.Body"></a> |
| 646 | + |
| 647 | +### Message SetAttributeRequest.Body |
| 648 | +Request payload message. |
| 649 | + |
| 650 | + |
| 651 | +| Field | Type | Label | Description | |
| 652 | +| ----- | ---- | ----- | ----------- | |
| 653 | +| parameters | [SetAttributeRequest.Body.Parameters](#neo.fs.v2.container.SetAttributeRequest.Body.Parameters) | | Op parameters. | |
| 654 | +| signature | [neo.fs.v2.refs.SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) | | RFC-6979 signature of stable-marshalled `parameters` field. The signature must authenticate either container owner or one of subjects in the `session_token` field if any. | |
| 655 | +| session_token | [neo.fs.v2.session.SessionTokenV2](#neo.fs.v2.session.SessionTokenV2) | | Optional session token. The token must be issued by the container owner. The token must have at least one subject authenticated by `signature` field. The token must have at least one context with this container and `CONTAINER_SETATTRIBUTE` verb. | |
| 656 | + |
| 657 | + |
| 658 | +<a name="neo.fs.v2.container.SetAttributeRequest.Body.Parameters"></a> |
| 659 | + |
| 660 | +### Message SetAttributeRequest.Body.Parameters |
| 661 | +Op parameters message. |
| 662 | + |
| 663 | +If container does not have the `attribute`, it is added. Otherwise, its |
| 664 | +value is swapped. |
| 665 | + |
| 666 | +`attribute` must be one of: |
| 667 | + - `CORS`; |
| 668 | + - `__NEOFS__LOCK_UNTIL`. |
| 669 | + |
| 670 | +In general, requirements for `value` are the same as for container |
| 671 | +creation. Attribute-specific requirements: |
| 672 | + - `__NEOFS__LOCK_UNTIL`: new timestamp must be after the current one if any |
| 673 | + |
| 674 | + |
| 675 | +| Field | Type | Label | Description | |
| 676 | +| ----- | ---- | ----- | ----------- | |
| 677 | +| container_id | [neo.fs.v2.refs.ContainerID](#neo.fs.v2.refs.ContainerID) | | Identifier of the container to set attribute for. | |
| 678 | +| attribute | [string](#string) | | Attribute to be set. | |
| 679 | +| value | [string](#string) | | New attribute value. | |
| 680 | + |
| 681 | + |
| 682 | +<a name="neo.fs.v2.container.SetAttributeResponse"></a> |
| 683 | + |
| 684 | +### Message SetAttributeResponse |
| 685 | +Attribute setting response |
| 686 | + |
| 687 | + |
| 688 | +| Field | Type | Label | Description | |
| 689 | +| ----- | ---- | ----- | ----------- | |
| 690 | +| body | [SetAttributeResponse.Body](#neo.fs.v2.container.SetAttributeResponse.Body) | | Request result. | |
| 691 | +| body_signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of stable-marshalled `body` field. | |
| 692 | + |
| 693 | + |
| 694 | +<a name="neo.fs.v2.container.SetAttributeResponse.Body"></a> |
| 695 | + |
| 696 | +### Message SetAttributeResponse.Body |
| 697 | +Request result message. |
| 698 | + |
| 699 | + |
| 700 | +| Field | Type | Label | Description | |
| 701 | +| ----- | ---- | ----- | ----------- | |
| 702 | +| status | [neo.fs.v2.status.Status](#neo.fs.v2.status.Status) | | Operation execution status. | |
| 703 | + |
| 704 | + |
517 | 705 | <a name="neo.fs.v2.container.SetExtendedACLRequest"></a> |
518 | 706 |
|
519 | 707 | ### Message SetExtendedACLRequest |
|
0 commit comments