aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/iot/broker/v1/broker.proto
blob: 1028447fe88707abb3172d4f0c345f5f0628823c (plain) (blame)
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
syntax = "proto3";

package yandex.cloud.iot.broker.v1;

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/iot/broker/v1;broker";
option java_package = "yandex.cloud.api.iot.broker.v1";

// A broker.
message Broker {
  enum Status {
    STATUS_UNSPECIFIED = 0;

    // Broker is being created.
    CREATING = 1;

    // Broker is ready to use.
    ACTIVE = 2;

    // Broker is being deleted.
    DELETING = 3;
  }

  // ID of the broker.
  string id = 1;

  // ID of the folder that the broker belongs to.
  string folder_id = 2;

  // Creation timestamp.
  google.protobuf.Timestamp created_at = 3;

  // Name of the broker. The name is unique within the folder.
  string name = 4;

  // Description of the broker. 0-256 characters long.
  string description = 5;

  // Resource labels as `key:value` pairs. Maximum of 64 per resource.
  map<string, string> labels = 6;

  // Status of the broker.
  Status status = 7;

  // Options for logging broker events
  LogOptions log_options = 8;
}

// A broker certificate.
message BrokerCertificate {
  // ID of the broker that the certificate belongs to.
  string broker_id = 1;

  // SHA256 hash of the certificates.
  string fingerprint = 2;

  // Public part of the certificate.
  string certificate_data = 3;

  // Creation timestamp.
  google.protobuf.Timestamp created_at = 4;
}

// A broker password.
message BrokerPassword {
  // ID of the broker that the password belongs to.
  string broker_id = 1;

  // ID of the password.
  string id = 2;

  // Creation timestamp.
  google.protobuf.Timestamp created_at = 3;
}

message LogOptions {

  // Is logging from broker 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;
}