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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
|
syntax = "proto3";
package yandex.cloud.compute.v1;
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "yandex/cloud/compute/v1/maintenance.proto";
option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/compute/v1;compute";
option java_package = "yandex.cloud.api.compute.v1";
// An Instance resource. For more information, see [Instances](/docs/compute/concepts/vm).
message Instance {
reserved 15, 25;
enum Status {
STATUS_UNSPECIFIED = 0;
// Instance is waiting for resources to be allocated.
PROVISIONING = 1;
// Instance is running normally.
RUNNING = 2;
// Instance is being stopped.
STOPPING = 3;
// Instance stopped.
STOPPED = 4;
// Instance is being started.
STARTING = 5;
// Instance is being restarted.
RESTARTING = 6;
// Instance is being updated.
UPDATING = 7;
// Instance encountered a problem and cannot operate.
ERROR = 8;
// Instance crashed and will be restarted automatically.
CRASHED = 9;
// Instance is being deleted.
DELETING = 10;
}
// ID of the instance.
string id = 1;
// ID of the folder that the instance belongs to.
string folder_id = 2;
google.protobuf.Timestamp created_at = 3;
// Name of the instance. 1-63 characters long.
string name = 4;
// Description of the instance. 0-256 characters long.
string description = 5;
// Resource labels as `key:value` pairs. Maximum of 64 per resource.
map<string, string> labels = 6;
// ID of the availability zone where the instance resides.
string zone_id = 7;
// ID of the hardware platform configuration for the instance.
string platform_id = 8;
// Computing resources of the instance such as the amount of memory and number of cores.
Resources resources = 9;
// Status of the instance.
Status status = 10;
// The metadata `key:value` pairs assigned to this instance. This includes custom metadata and predefined keys.
//
// For example, you may use the metadata in order to provide your public SSH key to the instance.
// For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
map<string, string> metadata = 11;
// Options allow user to configure access to instance's metadata
MetadataOptions metadata_options = 23;
// Boot disk that is attached to the instance.
AttachedDisk boot_disk = 12;
// Array of secondary disks that are attached to the instance.
repeated AttachedDisk secondary_disks = 13;
// Array of local disks that are attached to the instance.
repeated AttachedLocalDisk local_disks = 22;
// Array of filesystems that are attached to the instance.
repeated AttachedFilesystem filesystems = 21;
// Array of network interfaces that are attached to the instance.
repeated NetworkInterface network_interfaces = 14;
// Serial port settings
SerialPortSettings serial_port_settings = 24;
// GPU settings
GpuSettings gpu_settings = 26;
// A domain name of the instance. FQDN is defined by the server
// in the format `<hostname>.<region_id>.internal` when the instance is created.
// If the hostname were not specified when the instance was created, FQDN would be `<id>.auto.internal`.
string fqdn = 16; // output only
// Scheduling policy configuration.
SchedulingPolicy scheduling_policy = 17;
// ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
// To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
string service_account_id = 18;
// Network Settings
NetworkSettings network_settings = 19;
// Placement policy configuration.
PlacementPolicy placement_policy = 20;
// ID of the dedicated host group that the instance belongs to.
string host_group_id = 27;
// ID of the dedicated host that the instance belongs to.
string host_id = 28;
// Behaviour on maintenance events
MaintenancePolicy maintenance_policy = 29;
// Time between notification via metadata service and maintenance
google.protobuf.Duration maintenance_grace_period = 30;
}
message Resources {
// The amount of memory available to the instance, specified in bytes.
int64 memory = 1;
// The number of cores available to the instance.
int64 cores = 2;
// Baseline level of CPU performance with the ability to burst performance above that baseline level.
// This field sets baseline performance for each core.
int64 core_fraction = 3;
// The number of GPUs available to the instance.
int64 gpus = 4;
}
message AttachedDisk {
enum Mode {
MODE_UNSPECIFIED = 0;
// Read-only access.
READ_ONLY = 1;
// Read/Write access.
READ_WRITE = 2;
}
// Access mode to the Disk resource.
Mode mode = 1;
// Serial number that is reflected into the /dev/disk/by-id/ tree
// of a Linux operating system running within the instance.
//
// This value can be used to reference the device for mounting, resizing, and so on, from within the instance.
string device_name = 2;
// Specifies whether the disk will be auto-deleted when the instance is deleted.
bool auto_delete = 3;
// ID of the disk that is attached to the instance.
string disk_id = 4;
}
message AttachedLocalDisk {
// Size of the disk, specified in bytes.
int64 size = 1;
// Serial number that is reflected into the /dev/disk/by-id/ tree
// of a Linux operating system running within the instance.
//
// This value can be used to reference the device for mounting, resizing, and so on, from within the instance.
string device_name = 2;
}
message AttachedFilesystem {
enum Mode {
MODE_UNSPECIFIED = 0;
// Read-only access.
READ_ONLY = 1;
// Read/Write access.
READ_WRITE = 2;
}
// Access mode to the filesystem.
Mode mode = 1;
// Name of the device representing the filesystem on the instance.
//
// The name should be used for referencing the filesystem from within the instance
// when it's being mounted, resized etc.
string device_name = 2;
// ID of the filesystem that is attached to the instance.
string filesystem_id = 3;
}
message NetworkInterface {
// The index of the network interface, generated by the server, 0,1,2... etc.
// Currently only one network interface is supported per instance.
string index = 1;
// MAC address that is assigned to the network interface.
string mac_address = 2;
// ID of the subnet.
string subnet_id = 3;
// Primary IPv4 address that is assigned to the instance for this network interface.
PrimaryAddress primary_v4_address = 4;
// Primary IPv6 address that is assigned to the instance for this network interface. IPv6 not available yet.
PrimaryAddress primary_v6_address = 5;
// ID's of security groups attached to the interface
repeated string security_group_ids = 6;
}
message PrimaryAddress {
// An IPv4 internal network address that is assigned to the instance for this network interface.
string address = 1;
// One-to-one NAT configuration. If missing, NAT has not been set up.
OneToOneNat one_to_one_nat = 2;
// Internal DNS configuration
repeated DnsRecord dns_records = 3;
}
message OneToOneNat {
// An external IP address associated with this instance.
string address = 1;
// IP version for the external IP address.
IpVersion ip_version = 2;
// External DNS configuration
repeated DnsRecord dns_records = 3;
}
message DnsRecord {
// Name of the A/AAAA record as specified when creating the instance.
// Note that if `fqdn' has no trailing '.', it is specified relative to the zone (@see dns_zone_id).
string fqdn = 1;
// DNS zone id for the record (optional, if not set, some private zone is used).
string dns_zone_id = 2;
// DNS record ttl (optional, if not set, a reasonable default is used.)
int64 ttl = 3;
// When true, indicates there is a corresponding auto-created PTR DNS record.
bool ptr = 4;
}
enum IpVersion {
IP_VERSION_UNSPECIFIED = 0;
// IPv4 address, for example 192.0.2.235.
IPV4 = 1;
// IPv6 address. Not available yet.
IPV6 = 2;
}
message SchedulingPolicy {
// True for short-lived compute instances. For more information, see [Preemptible VMs](/docs/compute/concepts/preemptible-vm).
bool preemptible = 1;
}
message NetworkSettings {
enum Type {
TYPE_UNSPECIFIED = 0;
// Standard network.
STANDARD = 1;
// Software accelerated network.
SOFTWARE_ACCELERATED = 2;
// Hardware accelerated network (not available yet, reserved for future use).
HARDWARE_ACCELERATED = 3;
}
// Network Type
Type type = 1;
}
message GpuSettings {
// Attach instance to specified GPU cluster.
string gpu_cluster_id = 1;
}
message PlacementPolicy {
// Affinity definition
message HostAffinityRule {
enum Operator {
OPERATOR_UNSPECIFIED = 0;
IN = 1;
NOT_IN = 2;
}
// Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'
string key = 1;
// Include or exclude action
Operator op = 2;
// Affinity value or host ID or host group ID
repeated string values = 3;
}
// Placement group ID.
string placement_group_id = 1;
// List of affinity rules. Scheduler will attempt to allocate instances according to order of rules.
repeated HostAffinityRule host_affinity_rules = 2;
// Placement group partition
int64 placement_group_partition = 3;
}
message MetadataOptions {
// Enabled access to GCE flavored metadata
MetadataOption gce_http_endpoint = 1;
// Enabled access to AWS flavored metadata (IMDSv1)
MetadataOption aws_v1_http_endpoint = 2;
// Enabled access to IAM credentials with GCE flavored metadata
MetadataOption gce_http_token = 3;
// Enabled access to IAM credentials with AWS flavored metadata (IMDSv1)
MetadataOption aws_v1_http_token = 4;
}
enum MetadataOption {
METADATA_OPTION_UNSPECIFIED = 0;
// Option is enabled
ENABLED = 1;
// Option is disabled
DISABLED = 2;
}
message SerialPortSettings {
enum SSHAuthorization {
SSH_AUTHORIZATION_UNSPECIFIED = 0;
// Authentication and authorization using SSH keys in instance metadata
INSTANCE_METADATA = 1;
// Authentication and authorization using Oslogin service
OS_LOGIN = 2;
}
// Authentication and authorization in serial console when using SSH protocol
SSHAuthorization ssh_authorization = 1;
}
|