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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
syntax = "proto3";
package yandex.cloud.serverless.containers.v1;
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "yandex/cloud/logging/v1/log_entry.proto";
import "yandex/cloud/validation.proto";
option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/serverless/containers/v1;containers";
option java_package = "yandex.cloud.api.serverless.containers.v1";
message Container {
reserved 7;
enum Status {
STATUS_UNSPECIFIED = 0;
// Container is being created.
CREATING = 1;
// Container is ready for use.
ACTIVE = 2;
// Container is being deleted.
DELETING = 3;
// Container failed. The only allowed action is delete.
ERROR = 4;
}
// ID of the container. Generated at creation time.
string id = 1;
// ID of the folder that the container belongs to.
string folder_id = 2;
// Creation timestamp for the container.
google.protobuf.Timestamp created_at = 3;
// Name of the container. The name is unique within the folder.
string name = 4;
// Description of the container.
string description = 5;
// Container labels as `key:value` pairs.
map<string, string> labels = 6;
// URL that needs to be requested to call the container.
string url = 8;
// Status of the container.
Status status = 9;
}
message Revision {
enum Status {
STATUS_UNSPECIFIED = 0;
// Revision is being created.
CREATING = 1;
// Revision is currently used by the container.
ACTIVE = 2;
// Revision is not used by the container. May be deleted later.
OBSOLETE = 3;
}
// ID of the revision.
string id = 1;
// ID of the container that the revision belongs to.
string container_id = 2;
// Description of the revision.
string description = 3;
// Creation timestamp for the revision.
google.protobuf.Timestamp created_at = 4;
// Image configuration for the revision.
Image image = 5;
// Resources allocated to the revision.
Resources resources = 6;
// Timeout for the execution of the revision.
//
// If the timeout is exceeded, Serverless Containers responds with a 504 HTTP code.
google.protobuf.Duration execution_timeout = 7;
// The number of concurrent requests allowed per container instance.
int64 concurrency = 8;
// ID of the service account associated with the revision.
string service_account_id = 9;
// Status of the revision.
Status status = 10;
// Yandex Lockbox secrets to be used by the revision.
repeated Secret secrets = 11;
// Network access. If specified the revision will be attached to specified network/subnet(s).
Connectivity connectivity = 12;
// Policy for provisioning instances of the revision.
//
// The policy is only applied when the revision is ACTIVE.
ProvisionPolicy provision_policy = 13;
// Policy for scaling instances of the revision.
ScalingPolicy scaling_policy = 14;
// Options for logging from the container.
LogOptions log_options = 15;
// S3 mounts to be used by the version.
repeated StorageMount storage_mounts = 16;
}
// Revision image specification.
message Image {
// Image URL, that is used by the revision.
string image_url = 1;
// Digest of the image. Calculated at creation time.
string image_digest = 2;
// Override for the image's ENTRYPOINT.
Command command = 3;
// Override for the image's CMD.
Args args = 4;
// Additional environment for the container.
map<string, string> environment = 5 [
(length) = "<=4096",
(map_key).pattern = "[a-zA-Z][a-zA-Z0-9_]*"
];
// Override for the image's WORKDIR.
string working_dir = 6;
}
message Command {
// Command that will override ENTRYPOINT of an image.
//
// Commands will be executed as is. The runtime will not substitute environment
// variables or execute shell commands. If one wants to do that, they should
// invoke shell interpreter with an appropriate shell script.
repeated string command = 1;
}
message Args {
// Arguments that will override CMD of an image.
//
// Arguments will be passed as is. The runtime will not substitute environment
// variables or execute shell commands. If one wants to do that, they should
// invoke shell interpreter with an appropriate shell script.
repeated string args = 1;
}
// Resources allocated to a revision.
message Resources {
// Amount of memory available to the revision, specified in bytes, multiple of 128MB.
int64 memory = 1 [(value) = "134217728-4294967296"];
// Number of cores available to the revision.
int64 cores = 2 [(value) = "0-2"];
// Specifies baseline performance for a core in percent, multiple of 5%.
// Should be 100% for cores > 1.
int64 core_fraction = 3 [(value) = "0-100"];
}
message ProvisionPolicy {
// Minimum number of guaranteed provisioned container instances for all zones
// in total.
int64 min_instances = 1;
}
// Secret that is available to the container at run time.
message Secret {
// ID of Yandex Lockbox secret.
string id = 1;
// ID of Yandex Lockbox secret.
string version_id = 2;
// Key in secret's payload, which value to be delivered into container environment.
string key = 3;
oneof reference {
// Environment variable in which secret's value is delivered.
string environment_variable = 4;
}
}
// Revision connectivity specification.
message Connectivity {
// Network the revision will have access to.
string network_id = 1;
// The list of subnets (from the same network) the revision can be attached to.
//
// Deprecated, it is sufficient to specify only network_id, without the list of subnet_ids.
repeated string subnet_ids = 2 [
(length) = ">0",
(unique) = true
];
}
message LogOptions {
// Is logging from container disabled.
bool disabled = 1;
// Log entries destination.
oneof destination {
// Entry should be written to log group resolved by ID.
string log_group_id = 2 [(pattern) = "([a-zA-Z][-a-zA-Z0-9_.]{0,63})?"];
// Entry should be written to default log group for specified folder.
string folder_id = 3 [(pattern) = "([a-zA-Z][-a-zA-Z0-9_.]{0,63})?"];
}
// Minimum log entry level.
//
// See [LogLevel.Level] for details.
yandex.cloud.logging.v1.LogLevel.Level min_level = 4;
}
message ScalingPolicy {
// Upper limit for instance count in each zone.
// 0 means no limit.
int64 zone_instances_limit = 1;
// Upper limit of requests count in each zone.
// 0 means no limit.
int64 zone_requests_limit = 2;
}
message StorageMount {
// S3 bucket name for mounting.
string bucket_id = 1 [
(required) = true,
(length) = "3-63",
(pattern) = "[-.0-9a-zA-Z]*"
];
// S3 bucket prefix for mounting.
string prefix = 2;
// Reserved for mount_point_name (optional unique mount point name for synchronization)
reserved 3;
// Is mount read only.
bool read_only = 4;
// Mount point path inside the container for mounting.
string mount_point_path = 5 [
(required) = true,
(length) = "1-300",
(pattern) = "[-_0-9a-zA-Z/]*"
];
}
|