1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
syntax = "proto3";
package yandex.cloud.backup.v1;
import "google/api/annotations.proto";
import "yandex/cloud/api/operation.proto";
import "yandex/cloud/backup/v1/policy.proto";
import "yandex/cloud/operation/operation.proto";
import "yandex/cloud/validation.proto";
option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/backup/v1;backup";
option java_package = "yandex.cloud.api.backup.v1";
// A set of methods for managing [policies](/docs/backup/concepts/policy).
service PolicyService {
// List [policies](/docs/backup/concepts/policy) of specified folder.
rpc List(ListPoliciesRequest) returns (ListPoliciesResponse) {
option (google.api.http) = { get: "/backup/v1/policies" };
};
// Create a new policy.
//
// For detailed information, please see [Creating a backup policy](/docs/backup/operations/policy-vm/create).
rpc Create(CreatePolicyRequest) returns (operation.Operation) {
option (google.api.http) = { post: "/backup/v1/policies" body: "*" };
option (yandex.cloud.api.operation) = {
metadata: "CreatePolicyMetadata"
response: "Policy"
};
}
// Get specific policy.
rpc Get(GetPolicyRequest) returns (Policy) {
option (google.api.http) = { get: "/backup/v1/policies/{policy_id}" };
};
// Update specific policy.
rpc Update(UpdatePolicyRequest) returns (operation.Operation) {
option (google.api.http) = { patch: "/backup/v1/policies/{policy_id}" body: "*" };
option (yandex.cloud.api.operation) = {
metadata: "UpdatePolicyMetadata"
response: "Policy"
};
}
// Delete specific policy.
rpc Delete(DeletePolicyRequest) returns (operation.Operation) {
option (google.api.http) = { delete: "/backup/v1/policies/{policy_id}" };
option (yandex.cloud.api.operation) = {
metadata: "DeletePolicyMetadata"
response: "google.protobuf.Empty"
};
}
// Apply policy to [Compute Cloud instance](/docs/backup/concepts/vm-connection#os).
rpc Apply(ApplyPolicyRequest) returns (operation.Operation) {
option (google.api.http) = { post: "/backup/v1/policies/{policy_id}:apply" body: "*" };
option (yandex.cloud.api.operation) = {
metadata: "ApplyPolicyMetadata"
response: "google.protobuf.Empty"
};
}
// List applied policies using filters.
rpc ListApplications(ListApplicationsRequest) returns (ListApplicationsResponse) {
option (google.api.http) = { get: "/backup/v1/policies/{policy_id}/applications" };
};
// Run policy on specific Compute Cloud instance. That will create backup
// according selected policy. In order to perform this action, policy should be
// applied to the Compute Cloud instance.
rpc Execute(ExecuteRequest) returns (operation.Operation) {
option (google.api.http) = { post: "/backup/v1/policies/{policy_id}:execute" body: "*" };
option (yandex.cloud.api.operation) = {
metadata: "ExecuteMetadata"
response: "google.protobuf.Empty"
};
}
// Revoke policy from Compute Cloud instance.
rpc Revoke(RevokeRequest) returns (operation.Operation) {
option (google.api.http) = { post: "/backup/v1/policies/{policy_id}:revoke" body: "*" };
option (yandex.cloud.api.operation) = {
metadata: "RevokeMetadata"
response: "google.protobuf.Empty"
};
}
}
message ListPoliciesRequest {
// Folder ID. Either Folder ID or Compute Cloud instance ID should be set.
string folder_id = 1 [(length) = "<=50"];
// Compute Cloud instance ID. Either Folder ID or Compute Cloud instance ID should be set.
string compute_instance_id = 2;
}
message ListPoliciesResponse {
repeated Policy policies = 1;
}
message CreatePolicyRequest {
// Folder ID.
string folder_id = 1 [ (required) = true, (length) = "<=50" ];
// Policy name.
string name = 2 [ (required) = true, (length) = "<=50"];
PolicySettings settings = 3 [ (required) = true ];
}
message CreatePolicyMetadata {
// Policy ID.
string policy_id = 1 [ (required) = true, (length) = "<=50" ];
}
message GetPolicyRequest {
// Policy ID.
string policy_id = 1 [ (required) = true, (length) = "<=50" ];
}
message UpdatePolicyRequest {
// Policy ID.
string policy_id = 1 [ (required) = true, (length) = "<=50" ];
PolicySettings settings = 2 [ (required) = true ];
}
message UpdatePolicyMetadata {
// Policy ID.
string policy_id = 1 [ (required) = true, (length) = "<=50" ];
}
message DeletePolicyRequest {
// Policy ID.
string policy_id = 1 [ (required) = true, (length) = "<=50" ];
}
message DeletePolicyMetadata {
// Policy ID.
string policy_id = 1 [ (required) = true, (length) = "<=50" ];
}
message ApplyPolicyRequest {
// Policy ID.
string policy_id = 1 [ (required) = true, (length) = "<=50" ];
// Compute Cloud instance ID.
string compute_instance_id = 2 [ (required) = true, (length) = "<=50" ];
}
message ApplyPolicyMetadata {
// Policy ID.
string policy_id = 1;
// Compute Cloud instance ID.
string compute_instance_id = 2;
}
message ListApplicationsRequest {
oneof id {
option (exactly_one) = true;
// Folder ID.
string folder_id = 1;
// Policy ID.
string policy_id = 2;
// Compute Cloud instance ID.
string compute_instance_id = 3;
};
}
message ListApplicationsResponse {
repeated PolicyApplication applications = 1;
}
message ExecuteRequest {
// Policy ID.
string policy_id = 1 [ (required) = true, (length) = "<=50" ];
// Compute Cloud instance ID.
string compute_instance_id = 2 [ (required) = true, (length) = "<=50" ];
}
message ExecuteMetadata {
// Policy ID.
string policy_id = 1;
// Compute Cloud instance ID.
string compute_instance_id = 2;
// Progress of the backup process.
double progress_percentage = 3;
}
message RevokeRequest {
// Policy ID.
string policy_id = 1 [ (required) = true, (length) = "<=50" ];
// Compute Cloud instance ID.
string compute_instance_id = 2 [ (required) = true, (length) = "<=50" ];
}
message RevokeMetadata {
// Policy ID.
string policy_id = 1;
// Compute Cloud instance ID.
string compute_instance_id = 2;
}
|