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
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
|
syntax = "proto3";
package yandex.cloud.iot.devices.v1;
import "google/api/annotations.proto";
import "google/protobuf/field_mask.proto";
import "yandex/cloud/api/operation.proto";
import "yandex/cloud/iot/devices/v1/registry.proto";
import "yandex/cloud/operation/operation.proto";
import "yandex/cloud/validation.proto";
option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/iot/devices/v1;devices";
option java_package = "yandex.cloud.api.iot.devices.v1";
// A set of methods for managing registry.
service RegistryService {
// Returns the specified registry.
//
// To get the list of available registries, make a [List] request.
rpc Get(GetRegistryRequest) returns (Registry) {
option (google.api.http) = {get: "/iot-devices/v1/registries/{registry_id}"};
}
rpc GetByName(GetByNameRegistryRequest) returns (Registry) {
option (google.api.http) = {get: "/iot-devices/v1/registries:getByName"};
}
// Retrieves the list of registries in the specified folder.
rpc List(ListRegistriesRequest) returns (ListRegistriesResponse) {
option (google.api.http) = {get: "/iot-devices/v1/registries"};
}
// Creates a registry in the specified folder.
rpc Create(CreateRegistryRequest) returns (operation.Operation) {
option (google.api.http) = {
post: "/iot-devices/v1/registries"
body: "*"
};
option (yandex.cloud.api.operation) = {
metadata: "CreateRegistryMetadata"
response: "Registry"
};
}
// Updates the specified registry.
rpc Update(UpdateRegistryRequest) returns (operation.Operation) {
option (google.api.http) = {
patch: "/iot-devices/v1/registries/{registry_id}"
body: "*"
};
option (yandex.cloud.api.operation) = {
metadata: "UpdateRegistryMetadata"
response: "Registry"
};
}
// Deletes the specified registry.
rpc Delete(DeleteRegistryRequest) returns (operation.Operation) {
option (google.api.http) = {delete: "/iot-devices/v1/registries/{registry_id}"};
option (yandex.cloud.api.operation) = {
metadata: "DeleteRegistryMetadata"
response: "google.protobuf.Empty"
};
}
// Retrieves the list of registry certificates for the specified registry.
rpc ListCertificates(ListRegistryCertificatesRequest) returns (ListRegistryCertificatesResponse) {
option (google.api.http) = {get: "/iot-devices/v1/registries/{registry_id}/certificates"};
}
// Adds a certificate.
rpc AddCertificate(AddRegistryCertificateRequest) returns (operation.Operation) {
option (google.api.http) = {
post: "/iot-devices/v1/registries/{registry_id}/certificates"
body: "*"
};
option (yandex.cloud.api.operation) = {
metadata: "AddRegistryCertificateMetadata"
response: "RegistryCertificate"
};
}
// Deletes the specified registry certificate.
rpc DeleteCertificate(DeleteRegistryCertificateRequest) returns (operation.Operation) {
option (google.api.http) = {delete: "/iot-devices/v1/registries/{registry_id}/certificates/{fingerprint}"};
option (yandex.cloud.api.operation) = {
metadata: "DeleteRegistryCertificateMetadata"
response: "google.protobuf.Empty"
};
}
// Retrieves the list of passwords for the specified registry.
rpc ListPasswords(ListRegistryPasswordsRequest) returns (ListRegistryPasswordsResponse) {
option (google.api.http) = {get: "/iot-devices/v1/registries/{registry_id}/passwords"};
}
// Adds password for the specified registry.
rpc AddPassword(AddRegistryPasswordRequest) returns (operation.Operation) {
option (google.api.http) = {
post: "/iot-devices/v1/registries/{registry_id}/passwords"
body: "*"
};
option (yandex.cloud.api.operation) = {
metadata: "AddRegistryPasswordMetadata"
response: "RegistryPassword"
};
}
// Deletes the specified password.
rpc DeletePassword(DeleteRegistryPasswordRequest) returns (operation.Operation) {
option (google.api.http) = {delete: "/iot-devices/v1/registries/{registry_id}/passwords/{password_id}"};
option (yandex.cloud.api.operation) = {
metadata: "DeleteRegistryPasswordMetadata"
response: "google.protobuf.Empty"
};
}
// Retrieves the list of device topic aliases for the specified registry.
rpc ListDeviceTopicAliases(ListDeviceTopicAliasesRequest) returns (ListDeviceTopicAliasesResponse) {
option (google.api.http) = {get: "/iot-devices/v1/registries/{registry_id}:listDeviceTopicAliases"};
}
// Retrieves the list of YDS exports for the specified registry.
rpc ListDataStreamExports(ListDataStreamExportsRequest) returns (ListDataStreamExportsResponse);
// Adds YDS export for the specified registry.
rpc AddDataStreamExport(AddDataStreamExportRequest) returns (operation.Operation) {
option (yandex.cloud.api.operation) = {
metadata: "AddDataStreamExportMetadata"
response: "DataStreamExport"
};
}
// Deletes the specified YDS export.
rpc DeleteDataStreamExport(DeleteDataStreamExportRequest) returns (operation.Operation) {
option (yandex.cloud.api.operation) = {
metadata: "DeleteDataStreamExportMetadata"
response: "google.protobuf.Empty"
};
}
// Lists operations for the specified registry.
rpc ListOperations(ListRegistryOperationsRequest) returns (ListRegistryOperationsResponse) {
option (google.api.http) = {get: "/iot-devices/v1/registries/{registry_id}/operations"};
}
}
message GetRegistryRequest {
// ID of the registry to return.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
}
message GetByNameRegistryRequest {
// ID of the folder to list registries in.
//
// To get a folder ID make a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
string folder_id = 1 [
(required) = true,
(length) = "<=50"
];
// Name of the registry to return.
//
// To get a registry Name make a [RegistryService.List] request.
string registry_name = 2 [
(required) = true,
(length) = "<=50",
(pattern) = "[a-zA-Z0-9_-]*"
];
}
message ListRegistriesRequest {
// ID of the folder to list registries in.
//
// To get a folder ID make a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
string folder_id = 1 [
(required) = true,
(length) = "<=50"
];
// The maximum number of results per page that should be returned. If the number of available
// results is larger than `page_size`, the service returns a [ListRegistriesResponse.next_page_token]
// that can be used to get the next page of results in subsequent list requests.
// Default value: 100.
int64 page_size = 2 [(value) = "0-1000"];
// Page token. To get the next page of results, set `page_token` to the
// [ListRegistriesResponse.next_page_token] returned by a previous list request.
string page_token = 3 [(length) = "<=100"];
}
message ListRegistriesResponse {
// List of registries.
repeated Registry registries = 1;
// Token for getting the next page of the list. If the number of results is greater than
// the specified [ListRegistriesRequest.page_size], use `next_page_token` as the value
// for the [ListRegistriesRequest.page_token] parameter in the next list request.
//
// Each subsequent page will have its own `next_page_token` to continue paging through the results.
string next_page_token = 2;
}
message CreateRegistryRequest {
// ID of the folder to create a registry in.
//
// To get a folder ID, make a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
string folder_id = 1 [
(required) = true,
(length) = "<=50"
];
// Name of the registry. The name must be unique within the folder.
string name = 2 [
(required) = true,
(length) = "<=50",
(pattern) = "[a-zA-Z0-9_-]*"
];
// Description of the registry.
string description = 3 [(length) = "<=256"];
// Resource labels as `key:value` pairs.
map<string, string> labels = 4 [
(size) = "<=64",
(length) = "<=63",
(pattern) = "[-_0-9a-z]*",
(map_key).length = "1-63",
(map_key).pattern = "[a-z][-_0-9a-z]*"
];
// Registry certificates.
repeated Certificate certificates = 5;
// Registry passwords.
//
// The password must contain at least three character categories among the following: upper case latin, lower case latin, numbers and special symbols.
string password = 6;
// Options for logging registry events
LogOptions log_options = 7;
// Specification of a registry certificate.
message Certificate {
// Public part of the registry certificate.
string certificate_data = 1;
}
}
message CreateRegistryMetadata {
// ID of the registry that is being created.
string registry_id = 1;
}
message UpdateRegistryRequest {
// ID of the registry to update.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
// Field mask that specifies which fields of the registry are going to be updated.
google.protobuf.FieldMask update_mask = 2;
// Name of the registry. The name must be unique within the folder.
string name = 3 [
(length) = "<=50",
(pattern) = "[a-zA-Z0-9_-]*"
];
// Description of the registry.
string description = 4 [(length) = "<=256"];
// Resource labels as `key:value` pairs.
//
// Existing set of `labels` is completely replaced by the provided set.
map<string, string> labels = 5 [
(size) = "<=64",
(length) = "<=63",
(pattern) = "[-_0-9a-z]*",
(map_key).length = "1-63",
(map_key).pattern = "[a-z][-_0-9a-z]*"
];
// Options for logging registry events
LogOptions log_options = 6;
}
message UpdateRegistryMetadata {
// ID of the registry that is being updated.
string registry_id = 1;
}
message DeleteRegistryRequest {
// ID of the registry to delete.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
}
message DeleteRegistryMetadata {
// ID of the registry that is being deleted.
string registry_id = 1;
}
message ListRegistryCertificatesRequest {
// ID of the registry to list certificates for.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
}
message ListRegistryCertificatesResponse {
// List of certificates for the specified registry.
repeated RegistryCertificate certificates = 1;
}
message AddRegistryCertificateRequest {
reserved 2;
// ID of the registry for which the certificate is being added.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
// Public part of the certificate that is being added.
string certificate_data = 3;
}
message AddRegistryCertificateMetadata {
// ID of the registry certificate that is being added.
string registry_id = 1;
// Fingerprint of the certificate that is being added.
string fingerprint = 2;
}
message DeleteRegistryCertificateRequest {
// ID of the registry to delete a certificate for.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
// Fingerprint of the certificate that is being deleted.
string fingerprint = 2 [
(required) = true,
(length) = "<=50"
];
}
message DeleteRegistryCertificateMetadata {
// ID of a registry for which the certificate is being delete.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
// Fingerprint of the certificate to deleted.
string fingerprint = 2 [
(required) = true,
(length) = "<=50"
];
}
message ListRegistryPasswordsRequest {
// ID of the registry to list passwords in.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
}
message ListRegistryPasswordsResponse {
// List of passwords for the specified registry.
repeated RegistryPassword passwords = 1;
}
message AddRegistryPasswordRequest {
// ID of the registry to add a password for.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
// Passwords for the registry.
//
// The password must contain at least three character categories among the following: upper case latin, lower case latin, numbers and special symbols.
string password = 2 [(length) = ">=14"];
}
message AddRegistryPasswordMetadata {
// ID of the registry for which the password is being added.
string registry_id = 1;
// ID of a password that is being added.
string password_id = 2;
}
message DeleteRegistryPasswordRequest {
// ID of the registry to delete a password for.
//
// To get a registry ID make a [DeviceService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
// ID of the password to delete.
//
// To get a password ID make a [RegistryService.ListPasswords] request.
string password_id = 2 [
(required) = true,
(length) = "<=50"
];
}
message DeleteRegistryPasswordMetadata {
// ID of a registry for which the password is being delete.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
// ID of the password to delete.
//
// To get a password ID make a [RegistryService.ListPasswords] request.
string password_id = 2 [
(required) = true,
(length) = "<=50"
];
}
message ListDeviceTopicAliasesRequest {
// ID of the registry to list aliases for device topic.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
// The maximum number of results per page that should be returned. If the number of available
// results is larger than `page_size`, the service returns a [ListDeviceTopicAliasesResponse.next_page_token]
// that can be used to get the next page of results in subsequent list requests.
// Default value: 100.
int64 page_size = 2 [(value) = "0-1000"];
// Page token. To get the next page of results, set `page_token` to the
// [ListDeviceTopicAliasesResponse.next_page_token] returned by a previous list request.
string page_token = 3 [(length) = "<=100"];
}
message ListDeviceTopicAliasesResponse {
// List of device aliases for the specified registry.
repeated DeviceAlias aliases = 1;
// Token for getting the next page of the list. If the number of results is greater than
// the specified [ListDeviceTopicAliasesRequest.page_size], use `next_page_token` as the value
// for the [ListDeviceTopicAliasesRequest.page_token] parameter in the next list request.
//
// Each subsequent page will have its own `next_page_token` to continue paging through the results.
string next_page_token = 2;
}
message ListRegistryOperationsRequest {
// ID of the registry to list operations for.
string registry_id = 1 [(required) = true];
// The maximum number of results per page that should be returned. If the number of available
// results is larger than `page_size`, the service returns a [ListRegistryOperationsResponse.next_page_token]
// that can be used to get the next page of results in subsequent list requests.
// Default value: 100.
int64 page_size = 2 [(value) = "0-1000"];
// Page token. To get the next page of results, set `page_token` to the
// [ListRegistryOperationsResponse.next_page_token] returned by a previous list request.
string page_token = 3 [(length) = "<=100"];
// A filter expression that filters resources listed in the response.
// Currently you can use filtering only on [Registry.name] field.
string filter = 4 [(length) = "<=1000"];
}
message ListRegistryOperationsResponse {
// List of operations for the specified registry.
repeated operation.Operation operations = 1;
// Token for getting the next page of the list. If the number of results is greater than
// the specified [ListRegistryOperationsRequest.page_size], use `next_page_token` as the value
// for the [ListRegistryOperationsRequest.page_token] parameter in the next list request.
//
// Each subsequent page will have its own `next_page_token` to continue paging through the results.
string next_page_token = 2;
}
message AddDataStreamExportRequest {
reserved 3;
// Name of the YDS export. The name must be unique within the folder.
string name = 1 [
(length) = "<=50",
(pattern) = "[a-zA-Z0-9_-]*"
];
// ID of the registry to add a YDS export for.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 2 [
(required) = true,
(length) = "<=50"
];
// MQTT topic whose messages export to YDS.
string mqtt_topic_filter = 4 [(length) = "<=1024"];
// YDS database.
string database = 5 [
(required) = true,
(length) = "<=512"
];
// YDS stream name.
string stream = 6 [
(required) = true,
(length) = "<=512"
];
// ID of the service account which has permission to write to data stream.
string service_account_id = 7 [
(required) = true,
(length) = "<=50"
];
}
message AddDataStreamExportMetadata {
// ID of the registry for which the YDS export was added.
string registry_id = 1;
// ID of the added YDS export.
string data_stream_export_id = 2;
}
message DeleteDataStreamExportRequest {
// ID of a registry for which the YDS export is being deleted.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
// ID of the YDS export to delete.
string data_stream_export_id = 2 [
(required) = true,
(length) = "<=50"
];
}
message DeleteDataStreamExportMetadata {
// ID of a registry for which the YDS export was deleted.
string registry_id = 1 [(required) = true];
// ID of the deleted YDS export.
string data_stream_export_id = 2 [(required) = true];
}
message ListDataStreamExportsRequest {
// ID of the registry to list YDS exports in.
//
// To get a registry ID make a [RegistryService.List] request.
string registry_id = 1 [
(required) = true,
(length) = "<=50"
];
}
message ListDataStreamExportsResponse {
// List of YDS exports for the specified registry.
repeated DataStreamExport data_stream_exports = 1;
}
|