@@ -22,12 +22,19 @@ message ListAccountsResponse {
22
22
repeated string accounts = 1 ;
23
23
}
24
24
25
+ message SpecifiedPartitions {
26
+ // specify the partitions
27
+ // use the value only when is_partition_specified is true
28
+ repeated string partitions = 1 ;
29
+ }
30
+
25
31
message CreateAccountRequest {
26
32
string account_name = 1 ;
27
33
string owner_user_id = 2 ;
28
34
// specify the available partitions when creating an account
29
- // when the value dose not exist: use all partitions
30
- repeated string available_partitions = 3 ;
35
+ // when the value is undefined, create account with all partitions
36
+ // when the value is [], create account with no available partitions
37
+ optional SpecifiedPartitions available_partitions = 3 ;
31
38
}
32
39
33
40
message CreateAccountResponse {
@@ -36,8 +43,8 @@ message CreateAccountResponse {
36
43
message BlockAccountRequest {
37
44
string account_name = 1 ;
38
45
// when the value exists: block specified partition(s) of the account
39
- // when the value dose not exist or is [] : block the account in all partitions
40
- repeated string available_partitions = 3 ;
46
+ // when the value is undefined : block the account in all partitions
47
+ optional SpecifiedPartitions blocked_partitions = 2 ;
41
48
}
42
49
43
50
message BlockAccountResponse {
@@ -46,13 +53,18 @@ message BlockAccountResponse {
46
53
message UnblockAccountRequest {
47
54
string account_name = 1 ;
48
55
// specify the available partition(s) when executing unblock
49
- // when the value dose not exist : use all partitions
50
- repeated string available_partitions = 2 ;
56
+ // when the value is undefined : use all partitions
57
+ optional SpecifiedPartitions unblocked_partitions = 2 ;
51
58
}
52
59
53
60
message UnblockAccountResponse {
54
61
}
55
62
63
+ message AccountStatusInPartition {
64
+ string partition = 1 ;
65
+ bool blocked = 2 ;
66
+ }
67
+
56
68
message ClusterAccountInfo {
57
69
message UserInAccount {
58
70
string user_id = 1 ;
@@ -63,6 +75,8 @@ message ClusterAccountInfo {
63
75
repeated UserInAccount users = 2 ;
64
76
optional string owner = 3 ;
65
77
bool blocked = 4 ;
78
+ // the details of account blocked status in every partition
79
+ repeated AccountStatusInPartition accountBlockedDetails = 5 ;
66
80
}
67
81
68
82
message GetAllAccountsWithUsersRequest {
@@ -76,12 +90,14 @@ message GetAllAccountsWithUsersResponse {
76
90
message QueryAccountBlockStatusRequest {
77
91
string account_name = 1 ;
78
92
// query in specified partition(s)
79
- // when the value does not exist, maintain the original query logic
80
- repeated string partitions = 2 ;
93
+ // when the value does not exist or [], use all partitions
94
+ optional SpecifiedPartitions queryed_partitions = 2 ;
81
95
}
82
96
83
97
message QueryAccountBlockStatusResponse {
84
98
bool blocked = 1 ;
99
+ // the details of account blocked status in every partition
100
+ repeated AccountStatusInPartition accountBlockedDetails = 2 ;
85
101
}
86
102
87
103
0 commit comments