diff options
author | iddqd <iddqd@yandex-team.com> | 2024-06-11 10:12:13 +0300 |
---|---|---|
committer | iddqd <iddqd@yandex-team.com> | 2024-06-11 10:22:43 +0300 |
commit | 07f57e35443ab7f09471caf2dbf1afbcced4d9f7 (patch) | |
tree | a4a7b66ead62e83fa988a2ec2ce6576311c1f4b1 /contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1 | |
parent | 6db3b8ca95e44179e48306a58656fb1f9317d9c3 (diff) | |
download | ydb-07f57e35443ab7f09471caf2dbf1afbcced4d9f7.tar.gz |
add contrib/python/yandexcloud to import
03b7d3cad2237366b55b393e18d4dc5eb222798c
Diffstat (limited to 'contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1')
20 files changed, 5514 insertions, 0 deletions
diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/backup.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/backup.proto new file mode 100644 index 0000000000..c5b045e7cc --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/backup.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A MongoDB Backup resource. For more information, see the +// [Developer's Guide](/docs/managed-mongodb/concepts). +message Backup { + enum BackupType { + BACKUP_TYPE_UNSPECIFIED = 0; + + // Backup created by automated daily schedule + AUTOMATED = 1; + + // Backup created by user request + MANUAL = 2; + } + + // ID of the backup. Required. + string id = 1; + + // ID of the folder that the backup belongs to. + string folder_id = 2; + + // Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format + // (i.e. when the backup operation was completed). + google.protobuf.Timestamp created_at = 3; + + // ID of the MongoDB cluster that the backup was created for. + string source_cluster_id = 4; + + // Time when the backup operation was started. + google.protobuf.Timestamp started_at = 5; + + // Shard names used as a source for backup. + repeated string source_shard_names = 6; + + // Size of backup in bytes + int64 size = 7; + + // How this backup was created (manual/automatic/etc...) + BackupType type = 8; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/backup_service.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/backup_service.proto new file mode 100644 index 0000000000..e3271e46ce --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/backup_service.proto @@ -0,0 +1,78 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "google/api/annotations.proto"; +import "yandex/cloud/api/operation.proto"; +import "yandex/cloud/operation/operation.proto"; +import "yandex/cloud/validation.proto"; +import "yandex/cloud/mdb/mongodb/v1/backup.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A set of methods for managing MongoDB Backup resources. +service BackupService { + // Returns the specified MongoDB backup. + // + // To get the list of available MongoDB backups, make a [List] request. + rpc Get (GetBackupRequest) returns (Backup) { + option (google.api.http) = { get: "/managed-mongodb/v1/backups/{backup_id}" }; + } + + // Retrieves the list of backups available for the specified folder. + rpc List (ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { get: "/managed-mongodb/v1/backups" }; + } + + // Returns the list of available backups for the specified MongoDB cluster. + rpc Delete (DeleteBackupRequest) returns (operation.Operation) { + option (google.api.http) = { delete: "/managed-mongodb/v1/backups/{backup_id}" }; + option (yandex.cloud.api.operation) = { + metadata: "DeleteBackupMetadata" + response: "google.protobuf.Empty" + }; + } +} + +message GetBackupRequest { + // ID of the backup to return information about. + // To get the backup ID, use a [ClusterService.ListBackups] request. + string backup_id = 1 [(required) = true]; +} + +message ListBackupsRequest { + // ID of the folder to list backups in. + // To get the folder ID, use a [yandex.cloud.resourcemanager.v1.FolderService.List] request. + string folder_id = 1 [(required) = true, (length) = "<=50"]; + + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListBackupsResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + int64 page_size = 2 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] to the + // [ListBackupsResponse.next_page_token] returned by the previous list request. + string page_token = 3 [(length) = "<=100"]; +} + +message ListBackupsResponse { + // List of Backup resources. + repeated Backup backups = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListBackupsRequest.page_size], use the [next_page_token] as the value + // for the [ListBackupsRequest.page_token] parameter in the next list request. Each subsequent + // list request will have its own [next_page_token] to continue paging through the results. + string next_page_token = 2; +} + +message DeleteBackupRequest { + // Required. ID of the backup to delete. + string backup_id = 1 [(required) = true]; +} + +message DeleteBackupMetadata { + // Required. ID of the deleting MongoDB backup. + string backup_id = 1; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/cluster.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/cluster.proto new file mode 100644 index 0000000000..57c969bb83 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/cluster.proto @@ -0,0 +1,775 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/timeofday.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb3_6.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb4_0.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb4_2.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb4_4.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb4_4_enterprise.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb5_0.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb5_0_enterprise.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb6_0.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb6_0_enterprise.proto"; +import "yandex/cloud/mdb/mongodb/v1/maintenance.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A managed MongoDB cluster. For more information, see the [documentation](/docs/managed-mongodb/concepts). +message Cluster { + enum Environment { + ENVIRONMENT_UNSPECIFIED = 0; + + // Stable environment with a conservative update policy: only hotfixes + // are applied during regular maintenance. + PRODUCTION = 1; + + // Environment with more aggressive update policy: new versions + // are rolled out irrespective of backward compatibility. + PRESTABLE = 2; + } + + enum Health { + + // State of the cluster is unknown ([Host.health] for every host in the cluster is UNKNOWN). + HEALTH_UNKNOWN = 0; + + // Cluster is alive and well ([Host.health] for every host in the cluster is ALIVE). + ALIVE = 1; + + // Cluster is inoperable ([Host.health] for every host in the cluster is DEAD). + DEAD = 2; + + // Cluster is working below capacity ([Host.health] for at least one host in the cluster is not ALIVE). + DEGRADED = 3; + } + + enum Status { + + // Cluster state is unknown. + STATUS_UNKNOWN = 0; + + // Cluster is being created. + CREATING = 1; + + // Cluster is running normally. + RUNNING = 2; + + // Cluster encountered a problem and cannot operate. + ERROR = 3; + + // Cluster is being updated. + UPDATING = 4; + + // Cluster is stopping. + STOPPING = 5; + + // Cluster stopped. + STOPPED = 6; + + // Cluster is starting. + STARTING = 7; + } + + // ID of the MongoDB cluster. + // This ID is assigned by MDB at creation time. + string id = 1; + + // ID of the folder that the MongoDB cluster belongs to. + string folder_id = 2; + + // Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + google.protobuf.Timestamp created_at = 3; + + // Name of the MongoDB cluster. + // The name is unique within the folder. 1-63 characters long. + string name = 4; + + // Description of the MongoDB cluster. 0-256 characters long. + string description = 5; + + // Custom labels for the MongoDB cluster as `` key:value `` pairs. Maximum 64 per resource. + map<string, string> labels = 6; + + // Deployment environment of the MongoDB cluster. + Environment environment = 7; + + // Description of monitoring systems relevant to the MongoDB cluster. + repeated Monitoring monitoring = 8; + + // Configuration of the MongoDB cluster. + ClusterConfig config = 9; + + // ID of the network that the cluster belongs to. + string network_id = 10; + + // Aggregated cluster health. + Health health = 11; + + // Current state of the cluster. + Status status = 12; + + // Indicates current sharding status of the cluster. + bool sharded = 13; + + // Maintenance window for the cluster. + MaintenanceWindow maintenance_window = 14; + + // Planned maintenance operation to be started for the cluster within the nearest [maintenance_window]. + MaintenanceOperation planned_operation = 15; + + // User security groups + repeated string security_group_ids = 16; + + // Deletion Protection inhibits deletion of the cluster + bool deletion_protection = 17; +} + +// Monitoring system. +message Monitoring { + // Name of the monitoring system. + string name = 1; + + // Description of the monitoring system. + string description = 2; + + // Link to the monitoring system charts for the MongoDB cluster. + string link = 3; +} + +message ClusterConfig { + // Version of MongoDB server software. Possible values: `3.6`, `4.0`, `4.2`, `4.4`, `4.4-enterprise`, `5.0`, `5.0-enterprise`, `6.0`, `6.0-enterprise`. + string version = 1; + + // MongoDB feature compatibility version. See usage details in [MongoDB documentation](https://docs.mongodb.com/manual/reference/command/setFeatureCompatibilityVersion/). + // + // Possible values: + // * `3.6` - persist data compatibility for version 3.6. After setting this option the data will not be compatible with 3.4 or lower. + // * `4.0` - persist data compatibility for version 4.0. After setting this option the data will not be compatible with 3.6 or lower. + // * `4.2` - persist data compatibility for version 4.2. After setting this option the data will not be compatible with 4.0 or lower. + // * `4.4` - persist data compatibility for version 4.4. After setting this option the data will not be compatible with 4.2 or lower. + // * `5.0` - persist data compatibility for version 5.0. After setting this option the data will not be compatible with 5.0 or lower. + // * `6.0` - persist data compatibility for version 6.0. After setting this option the data will not be compatible with 6.0 or lower. + string feature_compatibility_version = 5; + + // Configuration for MongoDB servers in the cluster. + oneof mongodb { + // Configuration and resource allocation for a MongoDB 3.6 cluster. + Mongodb3_6 mongodb_3_6 = 2 [json_name = "mongodb_3_6"]; + + // Configuration and resource allocation for a MongoDB 4.0 cluster. + Mongodb4_0 mongodb_4_0 = 4 [json_name = "mongodb_4_0"]; + + // Configuration and resource allocation for a MongoDB 4.2 cluster. + Mongodb4_2 mongodb_4_2 = 7 [json_name = "mongodb_4_2"]; + + // Configuration and resource allocation for a MongoDB 4.4 cluster. + Mongodb4_4 mongodb_4_4 = 8 [json_name = "mongodb_4_4"]; + + // Configuration and resource allocation for a MongoDB 5.0 cluster. + Mongodb5_0 mongodb_5_0 = 10 [json_name = "mongodb_5_0"]; + + // Configuration and resource allocation for a MongoDB 6.0 cluster. + Mongodb6_0 mongodb_6_0 = 14 [json_name = "mongodb_6_0"]; + + // Configuration and resource allocation for a MongoDB 4.4 Enterprise cluster. + Mongodb4_4_enterprise mongodb_4_4_enterprise = 11 [json_name = "mongodb_4_4_enterprise"]; + + // Configuration and resource allocation for a MongoDB 5.0 Enterprise cluster. + Mongodb5_0_enterprise mongodb_5_0_enterprise = 12 [json_name = "mongodb_5_0_enterprise"]; + + // Configuration and resource allocation for a MongoDB 6.0 Enterprise cluster. + Mongodb6_0_enterprise mongodb_6_0_enterprise = 15 [json_name = "mongodb_6_0_enterprise"]; + } + + // Time to start the daily backup, in the UTC timezone. + google.type.TimeOfDay backup_window_start = 3; + + // Retain period of automatically created backup in days + google.protobuf.Int64Value backup_retain_period_days = 9; + + // Performance Diagnostic + PerformanceDiagnosticsConfig performance_diagnostics = 13; + + // Access policy to DB + Access access = 6; +} + +message Mongodb3_6 { + message Mongod { + // Configuration for a mongod 3.6 hosts. + config.MongodConfigSet3_6 config = 1; + + // Resources allocated to MongoDB hosts. + Resources resources = 2; + } + + message MongoCfg { + config.MongoCfgConfigSet3_6 config = 1; + + // Resources allocated to mongocfg hosts. + Resources resources = 2; + } + + message Mongos { + config.MongosConfigSet3_6 config = 1; + + // Resources allocated to mongos hosts. + Resources resources = 2; + } + + message MongoInfra { + config.MongosConfigSet3_6 config_mongos = 1; + config.MongoCfgConfigSet3_6 config_mongocfg = 2; + + // Resources allocated to mongoinfra (mongos+mongocfg) hosts. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod in a MongoDB 3.6 cluster. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg in a MongoDB 3.6 cluster. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos in a MongoDB 3.6 cluster. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) in a MongoDB 3.6 cluster. + MongoInfra mongoinfra = 4; +} + +message Mongodb4_0 { + message Mongod { + // Configuration for mongod 4.0 hosts. + config.MongodConfigSet4_0 config = 1; + + // Resources allocated to mongod hosts. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 4.0 hosts. + config.MongoCfgConfigSet4_0 config = 1; + + // Resources allocated to mongocfg hosts. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 4.0 hosts. + config.MongosConfigSet4_0 config = 1; + + // Resources allocated to mongos hosts. + Resources resources = 2; + } + + message MongoInfra { + config.MongosConfigSet4_0 config_mongos = 1; + config.MongoCfgConfigSet4_0 config_mongocfg = 2; + + // Resources allocated to mongoinfra (mongos+mongocfg) hosts. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod in a MongoDB 4.0 cluster. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg in a MongoDB 4.0 cluster. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos in a MongoDB 4.0 cluster. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) in a MongoDB 4.0 cluster. + MongoInfra mongoinfra = 4; +} + +message Mongodb4_2 { + message Mongod { + // Configuration for mongod 4.2 hosts. + config.MongodConfigSet4_2 config = 1; + + // Resources allocated to mongod hosts. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 4.2 hosts. + config.MongoCfgConfigSet4_2 config = 1; + + // Resources allocated to mongocfg hosts. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 4.2 hosts. + config.MongosConfigSet4_2 config = 1; + + // Resources allocated to mongos hosts. + Resources resources = 2; + } + + message MongoInfra { + config.MongosConfigSet4_2 config_mongos = 1; + config.MongoCfgConfigSet4_2 config_mongocfg = 2; + + // Resources allocated to mongoinfra (mongos+mongocfg) hosts. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod in a MongoDB 4.2 cluster. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg in a MongoDB 4.2 cluster. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos in a MongoDB 4.2 cluster. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) in a MongoDB 4.2 cluster. + MongoInfra mongoinfra = 4; +} + +message Mongodb4_4 { + message Mongod { + // Configuration for mongod 4.4 hosts. + config.MongodConfigSet4_4 config = 1; + + // Resources allocated to mongod hosts. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 4.4 hosts. + config.MongoCfgConfigSet4_4 config = 1; + + // Resources allocated to mongocfg hosts. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 4.4 hosts. + config.MongosConfigSet4_4 config = 1; + + // Resources allocated to mongos hosts. + Resources resources = 2; + } + + message MongoInfra { + config.MongosConfigSet4_4 config_mongos = 1; + config.MongoCfgConfigSet4_4 config_mongocfg = 2; + + // Resources allocated to mongoinfra (mongos+mongocfg) hosts. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod in a MongoDB 4.4 cluster. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg in a MongoDB 4.4 cluster. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos in a MongoDB 4.4 cluster. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) in a MongoDB 4.4 cluster. + MongoInfra mongoinfra = 4; +} + +message Mongodb4_4_enterprise { + message Mongod { + // Configuration for mongod 4.4 hosts. + config.MongodConfigSet4_4_enterprise config = 1; + + // Resources allocated to mongod hosts. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 4.4 hosts. + config.MongoCfgConfigSet4_4_enterprise config = 1; + + // Resources allocated to mongocfg hosts. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 4.4 hosts. + config.MongosConfigSet4_4_enterprise config = 1; + + // Resources allocated to mongos hosts. + Resources resources = 2; + } + + message MongoInfra { + config.MongosConfigSet4_4_enterprise config_mongos = 1; + config.MongoCfgConfigSet4_4_enterprise config_mongocfg = 2; + + // Resources allocated to mongoinfra (mongos+mongocfg) hosts. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod in a MongoDB 4.4 cluster. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg in a MongoDB 4.4 cluster. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos in a MongoDB 4.4 cluster. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) in a MongoDB 4.4 cluster. + MongoInfra mongoinfra = 4; +} + +message Mongodb5_0 { + message Mongod { + // Configuration for mongod 5.0 hosts. + config.MongodConfigSet5_0 config = 1; + + // Resources allocated to mongod hosts. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 5.0 hosts. + config.MongoCfgConfigSet5_0 config = 1; + + // Resources allocated to mongocfg hosts. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 5.0 hosts. + config.MongosConfigSet5_0 config = 1; + + // Resources allocated to mongos hosts. + Resources resources = 2; + } + + message MongoInfra { + config.MongosConfigSet5_0 config_mongos = 1; + config.MongoCfgConfigSet5_0 config_mongocfg = 2; + + // Resources allocated to mongoinfra (mongos+mongocfg) hosts. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod in a MongoDB 5.0 cluster. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg in a MongoDB 5.0 cluster. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos in a MongoDB 5.0 cluster. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) in a MongoDB 5.0 cluster. + MongoInfra mongoinfra = 4; +} + +message Mongodb5_0_enterprise { + message Mongod { + // Configuration for mongod 5.0 hosts. + config.MongodConfigSet5_0_enterprise config = 1; + + // Resources allocated to mongod hosts. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 5.0 hosts. + config.MongoCfgConfigSet5_0_enterprise config = 1; + + // Resources allocated to mongocfg hosts. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 5.0 hosts. + config.MongosConfigSet5_0_enterprise config = 1; + + // Resources allocated to mongos hosts. + Resources resources = 2; + } + + message MongoInfra { + config.MongosConfigSet5_0_enterprise config_mongos = 1; + config.MongoCfgConfigSet5_0_enterprise config_mongocfg = 2; + + // Resources allocated to mongoinfra (mongos+mongocfg) hosts. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod in a MongoDB 5.0 cluster. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg in a MongoDB 5.0 cluster. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos in a MongoDB 5.0 cluster. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) in a MongoDB 5.0 cluster. + MongoInfra mongoinfra = 4; +} + +message Mongodb6_0 { + message Mongod { + // Configuration for mongod 6.0 hosts. + config.MongodConfigSet6_0 config = 1; + + // Resources allocated to mongod hosts. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 6.0 hosts. + config.MongoCfgConfigSet6_0 config = 1; + + // Resources allocated to mongocfg hosts. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 6.0 hosts. + config.MongosConfigSet6_0 config = 1; + + // Resources allocated to mongos hosts. + Resources resources = 2; + } + + message MongoInfra { + config.MongosConfigSet6_0 config_mongos = 1; + config.MongoCfgConfigSet6_0 config_mongocfg = 2; + + // Resources allocated to mongoinfra (mongos+mongocfg) hosts. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod in a MongoDB 6.0 cluster. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg in a MongoDB 6.0 cluster. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos in a MongoDB 6.0 cluster. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) in a MongoDB 6.0 cluster. + MongoInfra mongoinfra = 4; +} + +message Mongodb6_0_enterprise { + message Mongod { + // Configuration for mongod 6.0 hosts. + config.MongodConfigSet6_0_enterprise config = 1; + + // Resources allocated to mongod hosts. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 6.0 hosts. + config.MongoCfgConfigSet6_0_enterprise config = 1; + + // Resources allocated to mongocfg hosts. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 6.0 hosts. + config.MongosConfigSet6_0_enterprise config = 1; + + // Resources allocated to mongos hosts. + Resources resources = 2; + } + + message MongoInfra { + config.MongosConfigSet6_0_enterprise config_mongos = 1; + config.MongoCfgConfigSet6_0_enterprise config_mongocfg = 2; + + // Resources allocated to mongoinfra (mongos+mongocfg) hosts. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod in a MongoDB 6.0 cluster. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg in a MongoDB 6.0 cluster. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos in a MongoDB 6.0 cluster. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) in a MongoDB 6.0 cluster. + MongoInfra mongoinfra = 4; +} + +message Shard { + // Name of the shard. + string name = 1; + + // ID of the cluster that the shard belongs to. + string cluster_id = 2; +} + +message Host { + enum Type { + // Type of the host is unspecified. Default value. + TYPE_UNSPECIFIED = 0; + + // A mongod host. + MONGOD = 1; + + // A mongos host. + MONGOS = 2; + + // A mongocfg host. + MONGOCFG = 3; + + // A mongoinfra (mongos+mongocfg) host. + MONGOINFRA = 4; + } + + enum Role { + + // Role of the host in the cluster is unknown. Default value. + ROLE_UNKNOWN = 0; + + // Host is the primary MongoDB server in the cluster. + PRIMARY = 1; + + // Host is a secondary MongoDB server in the cluster. + SECONDARY = 2; + } + + enum Health { + + // Health of the host is unknown. Default value. + HEALTH_UNKNOWN = 0; + + // The host is performing all its functions normally. + ALIVE = 1; + + // The host is inoperable, and cannot perform any of its essential functions. + DEAD = 2; + + // The host is degraded, and can perform only some of its essential functions. + DEGRADED = 3; + } + + message HostParameters { + bool hidden = 1; + int64 secondary_delay_secs = 2; + double priority = 3; + map<string, string> tags = 4; + } + + // Name of the MongoDB host. The host name is assigned by MDB at creation time, and cannot be changed. + // 1-63 characters long. + // + // The name is unique across all MDB hosts that exist on the platform, as it defines the FQDN of the host. + string name = 1; + + // ID of the MongoDB host. The ID is assigned by MDB at creation time. + string cluster_id = 2; + + // ID of the availability zone where the MongoDB host resides. + string zone_id = 3; + + // Resources allocated to the MongoDB host. + Resources resources = 4; + + // Role of the host in the cluster. If the field has default value, it is not returned in the response. + Role role = 5; + + // Aggregated health of the host. If the field has default value, it is not returned in the response. + Health health = 6; + + // Services provided by the host. + repeated Service services = 7; + + // ID of the subnet that the host belongs to. + string subnet_id = 8; + + // Flag showing public IP assignment status to this host. + bool assign_public_ip = 9; + + // Shard which this host belongs to. + string shard_name = 10; + + // Host type. If the field has default value, it is not returned in the response. + Type type = 11; + + // Host parameters + HostParameters host_parameters = 12; +} + +message Service { + enum Type { + // Service type of the host is unspecified. Default value. + TYPE_UNSPECIFIED = 0; + + // The host is running a mongod daemon. + MONGOD = 1; + + // The host is running a mongos daemon. + MONGOS = 2; + + // The host is running a MongoDB config server. + MONGOCFG = 3; + } + + enum Health { + + // Health of the server is unknown. + HEALTH_UNKNOWN = 0; + + // The server is working normally. + ALIVE = 1; + + // The server is dead or unresponsive. + DEAD = 2; + } + + // Type of the service provided by the host. If the field has default value, it is not returned in the response. + Type type = 1; + + // Aggregated health of the service. If the field has default value, it is not returned in the response. + Health health = 2; +} + +message Resources { + // ID of the preset for computational resources available to a host (CPU, memory etc.). + // All available presets are listed in the [documentation](/docs/managed-mongodb/concepts/instance-types). + string resource_preset_id = 1; + + // Volume of the storage available to a host, in bytes. + int64 disk_size = 2; + + // Type of the storage environment for the host. + // Possible values: + // * network-hdd - network HDD drive, + // * network-ssd - network SSD drive, + // * local-ssd - local SSD storage. + string disk_type_id = 3; +} + +message Access { + reserved 2; + // Allow access for DataLens. + bool data_lens = 1; + + // Allow access for DataTransfer. + bool data_transfer = 3; +} + +message PerformanceDiagnosticsConfig { + bool profiling_enabled = 1; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/cluster_service.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/cluster_service.proto new file mode 100644 index 0000000000..ffde28b02f --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/cluster_service.proto @@ -0,0 +1,1645 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "google/api/annotations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/type/timeofday.proto"; +import "yandex/cloud/api/operation.proto"; +import "yandex/cloud/mdb/mongodb/v1/backup.proto"; +import "yandex/cloud/mdb/mongodb/v1/cluster.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb3_6.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb4_0.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb4_2.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb4_4.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb4_4_enterprise.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb5_0.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb5_0_enterprise.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb6_0.proto"; +import "yandex/cloud/mdb/mongodb/v1/config/mongodb6_0_enterprise.proto"; +import "yandex/cloud/mdb/mongodb/v1/database.proto"; +import "yandex/cloud/mdb/mongodb/v1/maintenance.proto"; +import "yandex/cloud/mdb/mongodb/v1/user.proto"; +import "yandex/cloud/operation/operation.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A set of methods for managing MongoDB Cluster resources. +service ClusterService { + // Returns the specified MongoDB Cluster resource. + // + // To get the list of available MongoDB Cluster resources, make a [List] request. + rpc Get(GetClusterRequest) returns (Cluster) { + option (google.api.http) = {get: "/managed-mongodb/v1/clusters/{cluster_id}"}; + } + + // Retrieves the list of MongoDB Cluster resources that belong + // to the specified folder. + rpc List(ListClustersRequest) returns (ListClustersResponse) { + option (google.api.http) = {get: "/managed-mongodb/v1/clusters"}; + } + + // Creates a MongoDB cluster in the specified folder. + rpc Create(CreateClusterRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "CreateClusterMetadata" + response: "Cluster" + }; + } + + // Updates the specified MongoDB cluster. + rpc Update(UpdateClusterRequest) returns (operation.Operation) { + option (google.api.http) = { + patch: "/managed-mongodb/v1/clusters/{cluster_id}" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "UpdateClusterMetadata" + response: "Cluster" + }; + } + + // Deletes the specified MongoDB cluster. + rpc Delete(DeleteClusterRequest) returns (operation.Operation) { + option (google.api.http) = {delete: "/managed-mongodb/v1/clusters/{cluster_id}"}; + option (yandex.cloud.api.operation) = { + metadata: "DeleteClusterMetadata" + response: "google.protobuf.Empty" + }; + } + + // Start the specified MongoDB cluster. + rpc Start(StartClusterRequest) returns (operation.Operation) { + option (google.api.http) = {post: "/managed-mongodb/v1/clusters/{cluster_id}:start"}; + option (yandex.cloud.api.operation) = { + metadata: "StartClusterMetadata" + response: "Cluster" + }; + } + + // Stop the specified MongoDB cluster. + rpc Stop(StopClusterRequest) returns (operation.Operation) { + option (google.api.http) = {post: "/managed-mongodb/v1/clusters/{cluster_id}:stop"}; + option (yandex.cloud.api.operation) = { + metadata: "StopClusterMetadata" + response: "Cluster" + }; + } + + // Moves the specified MongoDB cluster to the specified folder. + rpc Move(MoveClusterRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}:move" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "MoveClusterMetadata" + response: "Cluster" + }; + } + + // Creates a backup for the specified MongoDB cluster. + rpc Backup(BackupClusterRequest) returns (operation.Operation) { + option (google.api.http) = {post: "/managed-mongodb/v1/clusters/{cluster_id}:backup"}; + option (yandex.cloud.api.operation) = { + metadata: "BackupClusterMetadata" + response: "Cluster" + }; + } + + // Creates a new MongoDB cluster using the specified backup. + rpc Restore(RestoreClusterRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters:restore" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "RestoreClusterMetadata" + response: "Cluster" + }; + } + + // Reschedules planned maintenance operation. + rpc RescheduleMaintenance(RescheduleMaintenanceRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}:rescheduleMaintenance" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "RescheduleMaintenanceMetadata" + response: "Cluster" + }; + } + + // Retrieves logs for the specified MongoDB cluster. + // See the [Logs](/yandex-mdb-guide/concepts/logs.html) section in the developers guide for detailed logs description. + rpc ListLogs(ListClusterLogsRequest) returns (ListClusterLogsResponse) { + option (google.api.http) = {get: "/managed-mongodb/v1/clusters/{cluster_id}:logs"}; + } + + // Same as ListLogs but using server-side streaming. Also allows for 'tail -f' semantics. + rpc StreamLogs(StreamClusterLogsRequest) returns (stream StreamLogRecord) { + option (google.api.http) = {get: "/managed-mongodb/v1/clusters/{cluster_id}:stream_logs"}; + } + + // Retrieves the list of Operation resources for the specified cluster. + rpc ListOperations(ListClusterOperationsRequest) returns (ListClusterOperationsResponse) { + option (google.api.http) = {get: "/managed-mongodb/v1/clusters/{cluster_id}/operations"}; + } + + // Retrieves the list of available backups for the specified MongoDB cluster. + rpc ListBackups(ListClusterBackupsRequest) returns (ListClusterBackupsResponse) { + option (google.api.http) = {get: "/managed-mongodb/v1/clusters/{cluster_id}/backups"}; + } + + // Retrieves a list of hosts for the specified cluster. + rpc ListHosts(ListClusterHostsRequest) returns (ListClusterHostsResponse) { + option (google.api.http) = {get: "/managed-mongodb/v1/clusters/{cluster_id}/hosts"}; + } + + // Creates new hosts for a cluster. + rpc AddHosts(AddClusterHostsRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}/hosts:batchCreate" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "AddClusterHostsMetadata" + response: "google.protobuf.Empty" + }; + } + + // Deletes the specified hosts for a cluster. + rpc DeleteHosts(DeleteClusterHostsRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}/hosts:batchDelete" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "DeleteClusterHostsMetadata" + response: "google.protobuf.Empty" + }; + } + + // Updates the specified parameters for the host. + rpc UpdateHosts(UpdateClusterHostsRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}/hosts:batchUpdate" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "UpdateClusterHostsMetadata" + response: "google.protobuf.Empty" + }; + } + + // Enables sharding for the cluster: + // creates 3 mongoinfra (or 3 mongocfg and 2 mongos) hosts + // that would support adding and using shards in the cluster. + rpc EnableSharding(EnableClusterShardingRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}:enableSharding" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "EnableClusterShardingMetadata" + response: "google.protobuf.Empty" + }; + } + + // Returns the specified shard. + rpc GetShard(GetClusterShardRequest) returns (Shard) { + option (google.api.http) = {get: "/managed-mongodb/v1/clusters/{cluster_id}/shards/{shard_name}"}; + } + + // Retrieves a list of shards. + rpc ListShards(ListClusterShardsRequest) returns (ListClusterShardsResponse) { + option (google.api.http) = {get: "/managed-mongodb/v1/clusters/{cluster_id}/shards"}; + } + + // Creates a new shard. + rpc AddShard(AddClusterShardRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}/shards" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "AddClusterShardMetadata" + response: "Shard" + }; + } + + // Deletes the specified shard. + rpc DeleteShard(DeleteClusterShardRequest) returns (operation.Operation) { + option (google.api.http) = {delete: "/managed-mongodb/v1/clusters/{cluster_id}/shards/{shard_name}"}; + option (yandex.cloud.api.operation) = { + metadata: "DeleteClusterShardMetadata" + response: "google.protobuf.Empty" + }; + } + + // Resetups hosts. + rpc ResetupHosts(ResetupHostsRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}:resetupHosts" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "ResetupHostsMetadata" + response: "google.protobuf.Empty" + }; + } + + // Restarts hosts. + rpc RestartHosts(RestartHostsRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}:restartHosts" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "RestartHostsMetadata" + response: "google.protobuf.Empty" + }; + } + + // Stepdown hosts. + rpc StepdownHosts(StepdownHostsRequest) returns (operation.Operation) { + option (google.api.http) = { + post: "/managed-mongodb/v1/clusters/{cluster_id}:stepdownHosts" + body: "*" + }; + option (yandex.cloud.api.operation) = { + metadata: "StepdownHostsMetadata" + response: "google.protobuf.Empty" + }; + } +} + +message GetClusterRequest { + // ID of the MongoDB Cluster resource to return. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; +} + +message ListClustersRequest { + // ID of the folder to list MongoDB clusters in. + // To get the folder ID, use a [yandex.cloud.resourcemanager.v1.FolderService.List] request. + string folder_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListClustersResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + // Acceptable values are 0 to 1000, inclusive. Default value: 100. + int64 page_size = 2 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] + // to the [ListClustersResponse.next_page_token] returned by the previous list request. + string page_token = 3 [(length) = "<=100"]; + + // A filter expression that filters resources listed in the response. + // The expression must specify: + // 1. The field name. Currently you can only use filtering with the [Cluster.name] field. + // 2. An `=` operator. + // 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`. + string filter = 4 [(length) = "<=1000"]; +} + +message ListClustersResponse { + // List of MongoDB Cluster resources. + repeated Cluster clusters = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value + // for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent + // list request will have its own [next_page_token] to continue paging through the results. + string next_page_token = 2; +} + +message CreateClusterRequest { + // ID of the folder to create MongoDB cluster in. + string folder_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Name of the MongoDB cluster. The name must be unique within the folder. + string name = 2 [ + (required) = true, + (length) = "<=63", + (pattern) = "[a-zA-Z0-9_-]*" + ]; + + // Description of the MongoDB cluster. + string description = 3 [(length) = "<=256"]; + + // Custom labels for the MongoDB cluster as `` key:value `` pairs. Maximum 64 per resource. + // For example, "project": "mvp" or "source": "dictionary". + map<string, string> labels = 4 [ + (yandex.cloud.size) = "<=64", + (length) = "<=63", + (pattern) = "[-_0-9a-z]*", + (map_key).length = "<=63", + (map_key).pattern = "[a-z][-_0-9a-z]*" + ]; + + // Deployment environment of the MongoDB cluster. + Cluster.Environment environment = 5 [(required) = true]; + + // Configuration and resources for hosts that should be created for the MongoDB cluster. + ConfigSpec config_spec = 6 [(required) = true]; + + // Descriptions of databases to be created in the MongoDB cluster. + repeated DatabaseSpec database_specs = 7 [(size) = ">0"]; + + // Descriptions of database users to be created in the MongoDB cluster. + repeated UserSpec user_specs = 8 [(size) = ">0"]; + + // Individual configurations for hosts that should be created for the MongoDB cluster. + repeated HostSpec host_specs = 9 [(size) = ">0"]; + + // ID of the network to create the cluster in. + string network_id = 10 [ + (required) = true, + (length) = "<=50" + ]; + + // User security groups + repeated string security_group_ids = 11; + + // Deletion Protection inhibits deletion of the cluster + bool deletion_protection = 12; +} + +message CreateClusterMetadata { + // ID of the MongoDB cluster that is being created. + string cluster_id = 1; +} + +message UpdateClusterRequest { + // ID of the MongoDB Cluster resource to update. + // To get the MongoDB cluster ID use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Field mask that specifies which fields of the MongoDB Cluster resource should be updated. + google.protobuf.FieldMask update_mask = 2; + + // New description of the MongoDB cluster. + string description = 3 [(length) = "<=256"]; + + // Custom labels for the MongoDB cluster as `` key:value `` pairs. Maximum 64 per resource. + // For example, "project": "mvp" or "source": "dictionary". + // + // The new set of labels will completely replace the old ones. To add a label, request the current + // set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set. + map<string, string> labels = 4 [ + (yandex.cloud.size) = "<=64", + (length) = "<=63", + (pattern) = "[-_0-9a-z]*", + (map_key).length = "<=63", + (map_key).pattern = "[a-z][-_0-9a-z]*" + ]; + + // New configuration and resources for hosts in the cluster. + ConfigSpec config_spec = 5; + + // New name for the cluster. + string name = 6 [ + (length) = "<=63", + (pattern) = "[a-zA-Z0-9_-]*" + ]; + + // New maintenance window settings for the cluster. + MaintenanceWindow maintenance_window = 7; + + // User security groups + repeated string security_group_ids = 8; + + // Deletion Protection inhibits deletion of the cluster + bool deletion_protection = 9; +} + +message UpdateClusterMetadata { + // ID of the MongoDB Cluster resource that is being updated. + string cluster_id = 1; +} + +message DeleteClusterRequest { + // ID of the MongoDB cluster to delete. + // To get the MongoDB cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; +} + +message DeleteClusterMetadata { + // ID of the MongoDB cluster that is being deleted. + string cluster_id = 1; +} + +message StartClusterRequest { + // ID of the MongoDB cluster to start. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; +} + +message StartClusterMetadata { + // ID of the MongoDB cluster. + string cluster_id = 1; +} + +message StopClusterRequest { + // ID of the MongoDB cluster to stop. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; +} + +message StopClusterMetadata { + // ID of the MongoDB cluster. + string cluster_id = 1; +} + +message MoveClusterRequest { + // ID of the MongoDB cluster to move. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + // ID of the destination folder. + string destination_folder_id = 2 [ + (required) = true, + (length) = "<=50" + ]; +} + +message MoveClusterMetadata { + // ID of the MongoDB cluster being moved. + string cluster_id = 1; + // ID of the source folder. + string source_folder_id = 2; + // ID of the destnation folder. + string destination_folder_id = 3; +} + +message BackupClusterRequest { + // ID of the MongoDB cluster to back up. + // To get the MongoDB cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; +} + +message BackupClusterMetadata { + // ID of the MongoDB cluster that is being backed up. + string cluster_id = 1; +} + +message RestoreClusterRequest { + // ID of the backup to create a cluster from. + // To get the backup ID, use a [ClusterService.ListBackups] request. + string backup_id = 1 [(required) = true]; + + // Name of the new MongoDB cluster. The name must be unique within the folder. + // The name can't be changed after the MongoDB cluster is created. + string name = 2 [ + (required) = true, + (length) = "<=63", + (pattern) = "[a-zA-Z0-9_-]*" + ]; + + // Description of the new MongoDB cluster. + string description = 3 [(length) = "<=256"]; + + // Custom labels for the MongoDB cluster as `` key:value `` pairs. Maximum 64 per resource. + // For example, "project": "mvp" or "source": "dictionary". + map<string, string> labels = 4 [ + (yandex.cloud.size) = "<=64", + (length) = "<=63", + (pattern) = "[-_0-9a-z]*", + (map_key).length = "<=63", + (map_key).pattern = "[a-z][-_0-9a-z]*" + ]; + + // Deployment environment of the new MongoDB cluster. + Cluster.Environment environment = 5 [(required) = true]; + + // Configuration for the MongoDB cluster to be created. + ConfigSpec config_spec = 6 [(required) = true]; + + // Configurations for MongoDB hosts that should be created for + // the cluster that is being created from the backup. + repeated HostSpec host_specs = 7 [(size) = ">0"]; + + // ID of the network to create the MongoDB cluster in. + string network_id = 8 [ + (required) = true, + (length) = "<=50" + ]; + + // Required. ID of the folder to create the MongoDB cluster in. + string folder_id = 9 [(length) = "<=50"]; + + message RecoveryTargetSpec { + // Timestamp of the recovery target + int64 timestamp = 1 [(value) = ">0"]; + } + + // Specification of the moment to which the MongoDB cluster should be restored. + RecoveryTargetSpec recovery_target_spec = 10; + + // User security groups + repeated string security_group_ids = 11; + + // Deletion Protection inhibits deletion of the cluster + bool deletion_protection = 12; +} + +message RestoreClusterMetadata { + // ID of the new MongoDB cluster that is being created from a backup. + string cluster_id = 1; + + // ID of the backup that is being used for creating a cluster. + string backup_id = 2; +} + +message RescheduleMaintenanceRequest { + // ID of the MongoDB cluster to reschedule the maintenance operation for. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + enum RescheduleType { + RESCHEDULE_TYPE_UNSPECIFIED = 0; + + // Start the maintenance operation immediately. + IMMEDIATE = 1; + + // Start the maintenance operation within the next available maintenance window. + NEXT_AVAILABLE_WINDOW = 2; + + // Start the maintenance operation at the specific time. + SPECIFIC_TIME = 3; + } + + // The type of reschedule request. + RescheduleType reschedule_type = 2 [(required) = true]; + + // The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen. + google.protobuf.Timestamp delayed_until = 3; +} + +// Rescheduled maintenance operation metadata. +message RescheduleMaintenanceMetadata { + reserved 2 to 3; + // Required. ID of the MongoDB cluster. + string cluster_id = 1; + + // Required. The time until which this maintenance operation is to be delayed. + google.protobuf.Timestamp delayed_until = 4; +} + +message LogRecord { + // Log record timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + google.protobuf.Timestamp timestamp = 1; + + // Contents of the log record. + map<string, string> message = 2; +} + +message ListClusterLogsRequest { + // ID of the MongoDB cluster to request logs for. + // To get the MongoDB cluster ID use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Columns from the logs table to request. + // If no columns are specified, entire log records are returned. + repeated string column_filter = 2; + + // Type of the service to request logs about. + ServiceType service_type = 3; + + enum ServiceType { + SERVICE_TYPE_UNSPECIFIED = 0; + + // Logs of MongoDB activity. + MONGOD = 1; + MONGOS = 2; + MONGOCFG = 3; + // MongoDB Enterprise audit logs + AUDIT = 4; + } + + // Start timestamp for the logs request, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + google.protobuf.Timestamp from_time = 4; + + // End timestamp for the logs request, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + google.protobuf.Timestamp to_time = 5; + + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListClusterLogsResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + // Acceptable values are 0 to 1000, inclusive. Default value: 100. + int64 page_size = 6 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] to the + // [ListClusterLogsResponse.next_page_token] returned by the previous list request. + string page_token = 7 [(length) = "<=100"]; +} + +message ListClusterLogsResponse { + // Requested log records. + repeated LogRecord logs = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListClusterLogsRequest.page_size], use the [next_page_token] as the value + // for the [ListClusterLogsRequest.page_token] query parameter in the next list request. + // Each subsequent list request will have its own [next_page_token] to continue paging through the results. + // This value is interchangeable with `next_record_token` from StreamLogs method. + string next_page_token = 2; +} + +message StreamLogRecord { + // One of the requested log records. + LogRecord record = 1; + + // This token allows you to continue streaming logs starting from the exact + // same record. To continue streaming, specify value of `next_record_token` + // as value for `record_token` parameter in the next StreamLogs request. + // This value is interchangeable with `next_page_token` from ListLogs method. + string next_record_token = 2; +} + +message StreamClusterLogsRequest { + // Required. ID of the MongoDB cluster. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Columns from logs table to get in the response. + repeated string column_filter = 2; + + ServiceType service_type = 3; + + enum ServiceType { + SERVICE_TYPE_UNSPECIFIED = 0; + + // Logs of MongoDB activity. + MONGOD = 1; + MONGOS = 2; + MONGOCFG = 3; + + // MongoDB Enterprise audit logs + AUDIT = 4; + } + + // Start timestamp for the logs request. + google.protobuf.Timestamp from_time = 4; + + // End timestamp for the logs request. + // If this field is not set, all existing logs will be sent and then the new ones as + // they appear. In essence it has 'tail -f' semantics. + google.protobuf.Timestamp to_time = 5; + + // Record token. Set `record_token` to the `next_record_token` returned by a previous StreamLogs + // request to start streaming from next log record. + string record_token = 6 [(length) = "<=100"]; + + // A filter expression that filters resources listed in the response. + // The expression must specify: + // 1. The field name. Currently filtering can be applied to the [LogRecord.logs.message.hostname], [LogRecord.logs.message.severity] fields. + // 2. An `=` operator. + // 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-z0-9.-]{1,61}`. + // Examples of a filter: `message.hostname='node1.db.cloud.yandex.net'`, `message.severity IN ('E', 'F')` + string filter = 7 [(length) = "<=1000"]; +} + +message ListClusterOperationsRequest { + // ID of the MongoDB Cluster resource to list operations for. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListClusterOperationsResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + // Acceptable values are 0 to 1000, inclusive. Default value: 100. + int64 page_size = 2 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] to the + // [ListClusterOperationsResponse.next_page_token] returned by the previous list request. + string page_token = 3 [(length) = "<=100"]; +} + +message ListClusterOperationsResponse { + // List of Operation resources for the specified MongoDB cluster. + repeated operation.Operation operations = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListClusterOperationsRequest.page_size], use the [next_page_token] as the value + // for the [ListClusterOperationsRequest.page_token] query parameter in the next list request. + // Each subsequent list request will have its own [next_page_token] to continue paging through the results. + string next_page_token = 2; +} + +message ListClusterBackupsRequest { + // ID of the MongoDB cluster. + // To get the MongoDB cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListClusterBackupsResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + // Acceptable values are 0 to 1000, inclusive. Default value: 100. + int64 page_size = 2 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] to the + // [ListClusterBackupsResponse.next_page_token] returned by the previous list request. + string page_token = 3 [(length) = "<=100"]; +} + +message ListClusterBackupsResponse { + // List of MongoDB Backup resources. + repeated Backup backups = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListClusterBackupsRequest.page_size], use the [next_page_token] as the value + // for the [ListClusterBackupsRequest.page_token] query parameter in the next list request. + // Each subsequent list request will have its own [next_page_token] to continue paging through the results. + string next_page_token = 2; +} + +message ListClusterHostsRequest { + // ID of the MongoDB cluster. + // To get the MongoDB cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListClusterHostsResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + // Acceptable values are 0 to 1000, inclusive. Default value: 100. + int64 page_size = 2 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] to the + // [ListClusterHostsResponse.next_page_token] returned by the previous list request. + string page_token = 3 [(length) = "<=100"]; +} + +message ListClusterHostsResponse { + // List of Host resources. + repeated Host hosts = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListClusterHostsRequest.page_size], use the [next_page_token] as the value + // for the [ListClusterHostsRequest.page_token] query parameter in the next list request. + // Each subsequent list request will have its own [next_page_token] to continue paging through the results. + string next_page_token = 2; +} + +message AddClusterHostsRequest { + // ID of the MongoDB cluster to add hosts to. + // To get the MongoDB cluster ID use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Configurations for MongoDB hosts that should be added to the cluster. + repeated HostSpec host_specs = 2 [(size) = ">0"]; +} + +message AddClusterHostsMetadata { + // ID of the MongoDB cluster to which the hosts are being added. + string cluster_id = 1; + + // Names of hosts that are being added to the cluster. + repeated string host_names = 2; +} + +message DeleteClusterHostsRequest { + // ID of the MongoDB cluster to remove hosts from. + // To get the MongoDB cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Names of hosts to delete. + repeated string host_names = 2 [ + (size) = ">0", + (length) = "<=253" + ]; +} + +message DeleteClusterHostsMetadata { + // ID of the MongoDB cluster to remove hosts from. + string cluster_id = 1; + + // Names of hosts that are being deleted. + repeated string host_names = 2; +} + +message UpdateClusterHostsRequest { + // ID of the MongoDB cluster to update hosts from. + // To get the MongoDB cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // New configurations to apply to hosts. + repeated UpdateHostSpec update_host_specs = 2 [(size) = ">0"]; +} + +message UpdateClusterHostsMetadata { + // ID of the MongoDB cluster to update host from. + string cluster_id = 1; + + // Name of host that are being updated. + repeated string host_names = 2; +} + +message UpdateHostSpec { + // Names of hosts to update. + string host_name = 1 [ + (required) = true, + (length) = "<=253" + ]; + + // Is host hidden in replSet + google.protobuf.BoolValue hidden = 2; + + // The number of seconds "behind" the primary that this replica set member should "lag" + google.protobuf.Int64Value secondary_delay_secs = 3; + + // Priority of host for the election in replSet + google.protobuf.DoubleValue priority = 4; + + // Whether the host should get a public IP address on update. + bool assign_public_ip = 5; + + // Field mask that specifies which fields of the MongoDB host should be updated. + google.protobuf.FieldMask update_mask = 6; + + // Host tags + map<string, string> tags = 7; +} + +message EnableClusterShardingRequest { + message MongoCfg { + // Resources for mongocfg hosts. + Resources resources = 1 [(required) = true]; + } + + message Mongos { + // Resources for mongos hosts. + Resources resources = 1 [(required) = true]; + } + + message MongoInfra { + // Resources for mongoinfra (mongos+mongocfg) hosts. + Resources resources = 1 [(required) = true]; + } + + // ID of the MongoDB cluster to enable sharding for. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // mongocfg specification for sharding. + MongoCfg mongocfg = 2; + + // mongos specification for sharding. + Mongos mongos = 3; + + // Configurations for mongos and mongocfg hosts. + repeated HostSpec host_specs = 4 [(size) = ">0"]; + + // mongos specification for sharding. + MongoInfra mongoinfra = 5; +} + +message EnableClusterShardingMetadata { + // ID of the MongoDB cluster that sharding is being enabled for. + string cluster_id = 1; +} + +message GetClusterShardRequest { + // ID of the MongoDB cluster that the shard belongs to. + // To get the cluster ID use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Name of the MongoDB shard to return. + // To get the name of the shard use a [ClusterService.ListShards] request. + string shard_name = 2 [ + (required) = true, + (length) = "<=63", + (pattern) = "[a-zA-Z0-9_-]*" + ]; +} + +message ListClusterShardsRequest { + // ID of the MongoDB cluster to list databases in. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListClusterShardsResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + int64 page_size = 2 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] to the + // [ListClusterShardsResponse.next_page_token] returned by the previous list request. + string page_token = 3 [(length) = "<=100"]; +} + +message ListClusterShardsResponse { + // List of MongoDB shards. + repeated Shard shards = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListClusterShardsRequest.page_size], use the [next_page_token] as the value + // for the [ListClusterShardsRequest.page_token] parameter in the next list request. Each subsequent + // list request will have its own [next_page_token] to continue paging through the results. + string next_page_token = 2; +} + +message AddClusterShardRequest { + // ID of the MongoDB cluster to add a shard to. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Name of the MongoDB shard to create. + string shard_name = 2 [ + (required) = true, + (length) = "<=63", + (pattern) = "[a-zA-Z0-9_-]*" + ]; + + // Configurations for mongod hosts to be created with the shard. + repeated HostSpec host_specs = 3 [(size) = ">0"]; +} + +message AddClusterShardMetadata { + // ID of the MongoDB cluster that a shard is being added to. + string cluster_id = 1; + + // Name of the shard being added. + string shard_name = 2; +} + +message DeleteClusterShardRequest { + // ID of the MongoDB cluster to delete a shard in. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Name of the MongoDB shard to delete. + // To get the name of the shard use a [ClusterService.ListShards] request. + string shard_name = 2 [ + (required) = true, + (length) = "<=63", + (pattern) = "[a-zA-Z0-9_-]*" + ]; +} + +message DeleteClusterShardMetadata { + // ID of the MongoDB cluster that a shard is being deleted in. + string cluster_id = 1; + + // Name of the shard being deleted. + string shard_name = 2; +} + +message ResetupHostsRequest { + // Required. ID of the MongoDB cluster. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Required. Name of the hosts to resetup. + repeated string host_names = 2 [ + (size) = ">0", + (length) = "<=253" + ]; +} + +message ResetupHostsMetadata { + // Required. ID of the MongoDB cluster. + string cluster_id = 1; + + // Required. The name of hosts to resetup. + repeated string host_names = 2; +} + +message RestartHostsRequest { + // Required. ID of the MongoDB cluster. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Required. Name of the hosts to restart. + repeated string host_names = 2 [ + (size) = ">0", + (length) = "<=253" + ]; +} + +message RestartHostsMetadata { + // Required. ID of the MongoDB cluster. + string cluster_id = 1; + + // Required. The name of hosts to restart. + repeated string host_names = 2; +} + +message StepdownHostsRequest { + // Required. ID of the MongoDB cluster. + string cluster_id = 1 [ + (required) = true, + (length) = "<=50" + ]; + + // Required. Name of the hosts to resetup. + repeated string host_names = 2 [ + (size) = ">0", + (length) = "<=253" + ]; +} + +message StepdownHostsMetadata { + // Required. ID of the MongoDB cluster. + string cluster_id = 1; + + // Required. The name of hosts to resetup. + repeated string host_names = 2; +} + +message HostSpec { + // ID of the availability zone where the host resides. + // To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request. + string zone_id = 1 [(length) = "<=50"]; + + // ID of the subnet that the host should belong to. This subnet should be a part + // of the network that the cluster belongs to. + // The network ID is set in the [Cluster.network_id] field. + string subnet_id = 2 [(length) = "<=50"]; + + // Whether the host should get a public IP address on creation. + // + // After a host has been created, this setting cannot be changed. To remove an assigned public IP, or to assign + // a public IP to a host without one, recreate the host with [assign_public_ip] set as needed. + // + // Possible values: + // * false - don't assign a public IP to the host. + // * true - the host should have a public IP address. + bool assign_public_ip = 3; + + // Type of the host to be deployed. + Host.Type type = 4; + + // Name of the shard that the host belongs to. + string shard_name = 5 [ + (length) = "<=63", + (pattern) = "[a-zA-Z0-9_-]*" + ]; + + // Is host hidden in replSet + google.protobuf.BoolValue hidden = 6; + + // The number of seconds "behind" the primary that this replica set member should "lag" + google.protobuf.Int64Value secondary_delay_secs = 7; + + // Priority of host for the election in replSet + google.protobuf.DoubleValue priority = 8; + + // Host tags + map<string, string> tags = 9; +} + +message MongodbSpec3_6 { + message Mongod { + // Configuration for mongod 3.6 hosts. + config.MongodConfig3_6 config = 1; + + // Resources allocated to each mongod host. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 3.6 hosts. + config.MongoCfgConfig3_6 config = 1; + + // Resources allocated to each mongocfg host. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 3.6 hosts. + config.MongosConfig3_6 config = 1; + + // Resources allocated to each mongos host. + Resources resources = 2; + } + + message MongoInfra { + // Configuration for mongoinfra 3.6 hosts. + config.MongosConfig3_6 config_mongos = 1; + config.MongoCfgConfig3_6 config_mongocfg = 2; + + // Resources allocated to each mongoinfra (mongos+mongocfg) host. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod 3.6 hosts. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg 3.6 hosts. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos 3.6 hosts. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) 3.6 hosts. + MongoInfra mongoinfra = 4; +} + +message MongodbSpec4_0 { + message Mongod { + // Configuration for mongod 4.0 hosts. + config.MongodConfig4_0 config = 1; + + // Resources allocated to each mongod host. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 4.0 hosts. + config.MongoCfgConfig4_0 config = 1; + + // Resources allocated to each mongocfg host. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 4.0 hosts. + config.MongosConfig4_0 config = 1; + + // Resources allocated to each mongos host. + Resources resources = 2; + } + + message MongoInfra { + // Configuration for mongoinfra 4.0 hosts. + config.MongosConfig4_0 config_mongos = 1; + config.MongoCfgConfig4_0 config_mongocfg = 2; + + // Resources allocated to each mongoinfra (mongos+mongocfg) host. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod 4.0 hosts. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg 4.0 hosts. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos 4.0 hosts. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) 4.0 hosts. + MongoInfra mongoinfra = 4; +} + +message MongodbSpec4_2 { + message Mongod { + // Configuration for mongod 4.2 hosts. + config.MongodConfig4_2 config = 1; + + // Resources allocated to each mongod host. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 4.2 hosts. + config.MongoCfgConfig4_2 config = 1; + + // Resources allocated to each mongocfg host. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 4.2 hosts. + config.MongosConfig4_2 config = 1; + + // Resources allocated to each mongos host. + Resources resources = 2; + } + + message MongoInfra { + // Configuration for mongoinfra 4.2 hosts. + config.MongosConfig4_2 config_mongos = 1; + config.MongoCfgConfig4_2 config_mongocfg = 2; + + // Resources allocated to each mongoinfra (mongos+mongocfg) host. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod 4.2 hosts. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg 4.2 hosts. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos 4.2 hosts. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) 4.2 hosts. + MongoInfra mongoinfra = 4; +} + +message MongodbSpec4_4 { + message Mongod { + // Configuration for mongod 4.4 hosts. + config.MongodConfig4_4 config = 1; + + // Resources allocated to each mongod host. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 4.4 hosts. + config.MongoCfgConfig4_4 config = 1; + + // Resources allocated to each mongocfg host. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 4.4 hosts. + config.MongosConfig4_4 config = 1; + + // Resources allocated to each mongos host. + Resources resources = 2; + } + + message MongoInfra { + // Configuration for mongoinfra 4.4 hosts. + config.MongosConfig4_4 config_mongos = 1; + config.MongoCfgConfig4_4 config_mongocfg = 2; + + // Resources allocated to each mongoinfra (mongos+mongocfg) host. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod 4.4 hosts. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg 4.4 hosts. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos 4.4 hosts. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) 4.4 hosts. + MongoInfra mongoinfra = 4; +} + +message MongodbSpec4_4_enterprise { + message Mongod { + // Configuration for mongod 4.4 hosts. + config.MongodConfig4_4_enterprise config = 1; + + // Resources allocated to each mongod host. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 4.4 hosts. + config.MongoCfgConfig4_4_enterprise config = 1; + + // Resources allocated to each mongocfg host. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 4.4 hosts. + config.MongosConfig4_4_enterprise config = 1; + + // Resources allocated to each mongos host. + Resources resources = 2; + } + + message MongoInfra { + // Configuration for mongoinfra 4.4 hosts. + config.MongosConfig4_4_enterprise config_mongos = 1; + config.MongoCfgConfig4_4_enterprise config_mongocfg = 2; + + // Resources allocated to each mongoinfra (mongos+mongocfg) host. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod 4.4 hosts. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg 4.4 hosts. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos 4.4 hosts. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) 4.4 hosts. + MongoInfra mongoinfra = 4; +} + +message MongodbSpec5_0 { + message Mongod { + // Configuration for mongod 5.0 hosts. + config.MongodConfig5_0 config = 1; + + // Resources allocated to each mongod host. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 5.0 hosts. + config.MongoCfgConfig5_0 config = 1; + + // Resources allocated to each mongocfg host. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 5.0 hosts. + config.MongosConfig5_0 config = 1; + + // Resources allocated to each mongos host. + Resources resources = 2; + } + + message MongoInfra { + // Configuration for mongoinfra 5.0 hosts. + config.MongosConfig5_0 config_mongos = 1; + config.MongoCfgConfig5_0 config_mongocfg = 2; + + // Resources allocated to each mongoinfra (mongos+mongocfg) host. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod 5.0 hosts. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg 5.0 hosts. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos 5.0 hosts. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) 5.0 hosts. + MongoInfra mongoinfra = 4; +} + +message MongodbSpec5_0_enterprise { + message Mongod { + // Configuration for mongod 5.0 hosts. + config.MongodConfig5_0_enterprise config = 1; + + // Resources allocated to each mongod host. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 5.0 hosts. + config.MongoCfgConfig5_0_enterprise config = 1; + + // Resources allocated to each mongocfg host. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 5.0 hosts. + config.MongosConfig5_0_enterprise config = 1; + + // Resources allocated to each mongos host. + Resources resources = 2; + } + + message MongoInfra { + // Configuration for mongoinfra 5.0 hosts. + config.MongosConfig5_0_enterprise config_mongos = 1; + config.MongoCfgConfig5_0_enterprise config_mongocfg = 2; + + // Resources allocated to each mongoinfra (mongos+mongocfg) host. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod 5.0 hosts. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg 5.0 hosts. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos 5.0 hosts. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) 5.0 hosts. + MongoInfra mongoinfra = 4; +} + +message MongodbSpec6_0 { + message Mongod { + // Configuration for mongod 6.0 hosts. + config.MongodConfig6_0 config = 1; + + // Resources allocated to each mongod host. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 6.0 hosts. + config.MongoCfgConfig6_0 config = 1; + + // Resources allocated to each mongocfg host. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 6.0 hosts. + config.MongosConfig6_0 config = 1; + + // Resources allocated to each mongos host. + Resources resources = 2; + } + + message MongoInfra { + // Configuration for mongoinfra 6.0 hosts. + config.MongosConfig6_0 config_mongos = 1; + config.MongoCfgConfig6_0 config_mongocfg = 2; + + // Resources allocated to each mongoinfra (mongos+mongocfg) host. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod 6.0 hosts. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg 6.0 hosts. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos 6.0 hosts. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) 6.0 hosts. + MongoInfra mongoinfra = 4; +} + +message MongodbSpec6_0_enterprise { + message Mongod { + // Configuration for mongod 6.0 hosts. + config.MongodConfig6_0_enterprise config = 1; + + // Resources allocated to each mongod host. + Resources resources = 2; + } + + message MongoCfg { + // Configuration for mongocfg 6.0 hosts. + config.MongoCfgConfig6_0_enterprise config = 1; + + // Resources allocated to each mongocfg host. + Resources resources = 2; + } + + message Mongos { + // Configuration for mongos 6.0 hosts. + config.MongosConfig6_0_enterprise config = 1; + + // Resources allocated to each mongos host. + Resources resources = 2; + } + + message MongoInfra { + // Configuration for mongoinfra 6.0 hosts. + config.MongosConfig6_0_enterprise config_mongos = 1; + config.MongoCfgConfig6_0_enterprise config_mongocfg = 2; + + // Resources allocated to each mongoinfra (mongos+mongocfg) host. + Resources resources = 3; + } + + // Configuration and resource allocation for mongod 6.0 hosts. + Mongod mongod = 1; + + // Configuration and resource allocation for mongocfg 6.0 hosts. + MongoCfg mongocfg = 2; + + // Configuration and resource allocation for mongos 6.0 hosts. + Mongos mongos = 3; + + // Configuration and resource allocation for mongoinfra (mongos+mongocfg) 6.0 hosts. + MongoInfra mongoinfra = 4; +} + +message ConfigSpec { + // Version of MongoDB used in the cluster. Possible values: `3.6`, `4.0`, `4.2`, `4.4`, `4.4-enterprise`, `5.0`, `5.0-enterprise`, `6.0`, `6.0-enterprise`. + string version = 1; + + // MongoDB feature compatibility version. See usage details in [MongoDB documentation](https://docs.mongodb.com/manual/reference/command/setFeatureCompatibilityVersion/). + // + // Possible values: + // * `3.6` - persist data compatibility for version 3.6. After setting this option the data will not be compatible with 3.4 or older. + // * `4.0` - persist data compatibility for version 4.0. After setting this option the data will not be compatible with 3.6 or older. + // * `4.2` - persist data compatibility for version 4.2. After setting this option the data will not be compatible with 4.0 or older. + // * `4.4` - persist data compatibility for version 4.4. After setting this option the data will not be compatible with 4.2 or older. + // * `5.0` - persist data compatibility for version 5.0. After setting this option the data will not be compatible with 4.4 or older. + // * `6.0` - persist data compatibility for version 6.0. After setting this option the data will not be compatible with 5.0 or older. + string feature_compatibility_version = 5; + + oneof mongodb_spec { + // Configuration and resource allocation for a MongoDB 3.6 cluster. + MongodbSpec3_6 mongodb_spec_3_6 = 2 [json_name = "mongodbSpec_3_6"]; + + // Configuration and resource allocation for a MongoDB 4.0 cluster. + MongodbSpec4_0 mongodb_spec_4_0 = 4 [json_name = "mongodbSpec_4_0"]; + + // Configuration and resource allocation for a MongoDB 4.2 cluster. + MongodbSpec4_2 mongodb_spec_4_2 = 7 [json_name = "mongodbSpec_4_2"]; + + // Configuration and resource allocation for a MongoDB 4.4 cluster. + MongodbSpec4_4 mongodb_spec_4_4 = 8 [json_name = "mongodbSpec_4_4"]; + + // Configuration and resource allocation for a MongoDB 5.0 cluster. + MongodbSpec5_0 mongodb_spec_5_0 = 10 [json_name = "mongodbSpec_5_0"]; + + // Configuration and resource allocation for a MongoDB 6.0 cluster. + MongodbSpec6_0 mongodb_spec_6_0 = 14 [json_name = "mongodbSpec_6_0"]; + + // Configuration and resource allocation for a MongoDB 4.4 Enterprise cluster. + MongodbSpec4_4_enterprise mongodb_spec_4_4_enterprise = 11 [json_name = "mongodbSpec_4_4_enterprise"]; + + // Configuration and resource allocation for a MongoDB 5.0 Enterprise cluster. + MongodbSpec5_0_enterprise mongodb_spec_5_0_enterprise = 12 [json_name = "mongodbSpec_5_0_enterprise"]; + + // Configuration and resource allocation for a MongoDB 6.0 Enterprise cluster. + MongodbSpec6_0_enterprise mongodb_spec_6_0_enterprise = 15 [json_name = "mongodbSpec_6_0_enterprise"]; + } + + // Time to start the daily backup, in the UTC timezone. + google.type.TimeOfDay backup_window_start = 3; + + // Retain period of automatically created backup in days + google.protobuf.Int64Value backup_retain_period_days = 9 [(value) = "7-35"]; + + // Performance Diagnosics configuration + PerformanceDiagnosticsConfig performance_diagnostics = 13; + + // Access policy to DB + Access access = 6; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb3_6.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb3_6.proto new file mode 100644 index 0000000000..c94a0e4d1b --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb3_6.proto @@ -0,0 +1,204 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1.config; + +import "google/protobuf/wrappers.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1/config;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1.config"; + +// Configuration of a mongod daemon. Supported options are a limited subset of all +// options described in [MongoDB documentation](https://docs.mongodb.com/v3.6/reference/configuration-options/). +message MongodConfig3_6 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + message CollectionConfig { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // No compression. + NONE = 1; + + // The [Snappy](https://docs.mongodb.com/v3.6/reference/glossary/#term-snappy) compression. + SNAPPY = 2; + + // The [zlib](https://docs.mongodb.com/v3.6/reference/glossary/#term-zlib) compression. + ZLIB = 3; + } + + // Default type of compression to use for collection data. + Compressor block_compressor = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + + // Collection configuration for WiredTiger. + CollectionConfig collection_config = 2; + } + + message Journal { + // Whether the journal is enabled or disabled. + // Possible values: + // * true (default) - the journal is enabled. + // * false - the journal is disabled. + google.protobuf.BoolValue enabled = 1; + + // Commit interval between journal operations, in milliseconds. + // Default: 100. + google.protobuf.Int64Value commit_interval = 2 [(value) = "1-500"]; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + + // Configuration of the MongoDB [journal](https://docs.mongodb.com/v3.6/reference/glossary/#term-journal). + Journal journal = 2; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongod will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongod configuration. + Storage storage = 1; + + // `operationProfiling` section of mongod configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongod configuration. + Network net = 3; +} + +message MongoCfgConfig3_6 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. This is the default + // profiler level. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Operation profiling level. For details, see [MongoDB documentation](https://docs.mongodb.com/v3.6/tutorial/manage-the-database-profiler/). + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. For details see [MongoDB documentation](https://docs.mongodb.com/v3.6/reference/configuration-options/#operationProfiling.slowOpThresholdMs). + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of incoming connections. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongocfg configuration. + Storage storage = 1; + + // `operationProfiling` section of mongocfg configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongocfg configuration. + Network net = 3; +} + +message MongosConfig3_6 { + message Network { + // The maximum number of incoming connections. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // Network settings for mongos. + Network net = 1; +} + +message MongodConfigSet3_6 { + // Effective mongod settings for a MongoDB 3.6 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongodConfig3_6 effective_config = 1; + + // User-defined mongod settings for a MongoDB 3.6 cluster. + MongodConfig3_6 user_config = 2; + + // Default mongod configuration for a MongoDB 3.6 cluster. + MongodConfig3_6 default_config = 3; +} + +message MongoCfgConfigSet3_6 { + // Effective mongocfg settings for a MongoDB 3.6 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongoCfgConfig3_6 effective_config = 1; + + // User-defined mongocfg settings for a MongoDB 3.6 cluster. + MongoCfgConfig3_6 user_config = 2; + + // Default mongocfg configuration for a MongoDB 3.6 cluster. + MongoCfgConfig3_6 default_config = 3; +} + +message MongosConfigSet3_6 { + // Effective settings for a MongoDB 3.6 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongosConfig3_6 effective_config = 1; + + // User-defined settings for a MongoDB 3.6 cluster. + MongosConfig3_6 user_config = 2; + + // Default configuration for a MongoDB 3.6 cluster. + MongosConfig3_6 default_config = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_0.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_0.proto new file mode 100644 index 0000000000..cddb3203a7 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_0.proto @@ -0,0 +1,197 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1.config; + +import "google/protobuf/wrappers.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1/config;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1.config"; + +// Configuration of a mongod daemon. Supported options are a limited subset of all +// options described in [MongoDB documentation](https://docs.mongodb.com/v4.0/reference/configuration-options/). +message MongodConfig4_0 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + message CollectionConfig { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // No compression. + NONE = 1; + + // The [Snappy](https://docs.mongodb.com/v4.0/reference/glossary/#term-snappy) compression. + SNAPPY = 2; + + // The [zlib](https://docs.mongodb.com/v4.0/reference/glossary/#term-zlib) compression. + ZLIB = 3; + } + + // Default type of compression to use for collection data. + Compressor block_compressor = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + + // Collection configuration for WiredTiger. + CollectionConfig collection_config = 2; + } + + message Journal { + // Commit interval between journal operations, in milliseconds. + // Default: 100. + google.protobuf.Int64Value commit_interval = 1 [(value) = "1-500"]; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + + // Configuration of the MongoDB [journal](https://docs.mongodb.com/v4.0/reference/glossary/#term-journal). + Journal journal = 2; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongod will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongod configuration. + Storage storage = 1; + + // `operationProfiling` section of mongod configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongod configuration. + Network net = 3; +} + +message MongoCfgConfig4_0 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. For details see [MongoDB documentation](https://docs.mongodb.com/v4.0/reference/configuration-options/#operationProfiling.slowOpThresholdMs). + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongocfg will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongocfg configuration. + Storage storage = 1; + + // `operationProfiling` section of mongocfg configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongocfg configuration. + Network net = 3; +} + +message MongosConfig4_0 { + message Network { + // The maximum number of simultaneous connections that mongos will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // Network settings for mongos. + Network net = 1; +} + +message MongodConfigSet4_0 { + // Effective mongod settings for a MongoDB 4.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongodConfig4_0 effective_config = 1; + + // User-defined mongod settings for a MongoDB 4.0 cluster. + MongodConfig4_0 user_config = 2; + + // Default mongod configuration for a MongoDB 4.0 cluster. + MongodConfig4_0 default_config = 3; +} + +message MongoCfgConfigSet4_0 { + // Effective mongocfg settings for a MongoDB 4.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongoCfgConfig4_0 effective_config = 1; + + // User-defined mongocfg settings for a MongoDB 4.0 cluster. + MongoCfgConfig4_0 user_config = 2; + + // Default mongocfg configuration for a MongoDB 4.0 cluster. + MongoCfgConfig4_0 default_config = 3; +} + +message MongosConfigSet4_0 { + // Effective mongos settings for a MongoDB 4.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongosConfig4_0 effective_config = 1; + + // User-defined mongos settings for a MongoDB 4.0 cluster. + MongosConfig4_0 user_config = 2; + + // Default mongos configuration for a MongoDB 4.0 cluster. + MongosConfig4_0 default_config = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_2.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_2.proto new file mode 100644 index 0000000000..00729497db --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_2.proto @@ -0,0 +1,274 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1.config; + +import "google/protobuf/wrappers.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1/config;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1.config"; + +// Configuration of a mongod daemon. Supported options are a limited subset of all +// options described in [MongoDB documentation](https://docs.mongodb.com/v4.2/reference/configuration-options/). +message MongodConfig4_2 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + message CollectionConfig { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // No compression. + NONE = 1; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 2; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 3; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 4; + } + + // Default type of compression to use for collection data. + Compressor block_compressor = 1; + } + + message IndexConfig { + // Enables or disables [prefix compression](https://www.mongodb.com/docs/manual/reference/glossary/#std-term-prefix-compression) + google.protobuf.BoolValue prefix_compression = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + + // Collection configuration for WiredTiger. + CollectionConfig collection_config = 2; + + //Index configuration for WiredTiger + IndexConfig index_config = 3; + } + + message Journal { + // Commit interval between journal operations, in milliseconds. + // Default: 100. + google.protobuf.Int64Value commit_interval = 1 [(value) = "1-500"]; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + + // Configuration of the MongoDB [journal](https://docs.mongodb.com/v4.2/reference/glossary/#term-journal). + Journal journal = 2; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + + // The fraction of slow operations that should be profiled or logged. + // operationProfiling.slowOpSampleRate accepts values between 0 and 1, inclusive. + google.protobuf.DoubleValue slow_op_sample_rate = 3 [(value) = "0-1"]; + } + + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + // The maximum number of simultaneous connections that mongod will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + message SetParameter { + // Enables or disables the mechanism that controls the rate at which the primary applies its writes with the + // goal of keeping the secondary members [majority committed](https://www.mongodb.com/docs/v4.2/reference/command/replSetGetStatus/#replSetGetStatus.optimes.lastCommittedOpTime) + // lag under a configurable maximum value. + google.protobuf.BoolValue enable_flow_control = 1; + } + + // `storage` section of mongod configuration. + Storage storage = 1; + + // `operationProfiling` section of mongod configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongod configuration. + Network net = 3; + + // `replication` section of mongod configuration. + SetParameter set_parameter = 4; +} + +message MongoCfgConfig4_2 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. For details see [MongoDB documentation](https://docs.mongodb.com/v4.2/reference/configuration-options/#operationProfiling.slowOpThresholdMs). + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongocfg will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongocfg configuration. + Storage storage = 1; + + // `operationProfiling` section of mongocfg configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongocfg configuration. + Network net = 3; +} + +message MongosConfig4_2 { + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + // The maximum number of simultaneous connections that mongos will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + // Network settings for mongos. + Network net = 1; +} + +message MongodConfigSet4_2 { + // Effective mongod settings for a MongoDB 4.2 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongodConfig4_2 effective_config = 1; + + // User-defined mongod settings for a MongoDB 4.2 cluster. + MongodConfig4_2 user_config = 2; + + // Default mongod configuration for a MongoDB 4.2 cluster. + MongodConfig4_2 default_config = 3; +} + +message MongoCfgConfigSet4_2 { + // Effective mongocfg settings for a MongoDB 4.2 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongoCfgConfig4_2 effective_config = 1; + + // User-defined mongocfg settings for a MongoDB 4.2 cluster. + MongoCfgConfig4_2 user_config = 2; + + // Default mongocfg configuration for a MongoDB 4.2 cluster. + MongoCfgConfig4_2 default_config = 3; +} + +message MongosConfigSet4_2 { + // Effective mongos settings for a MongoDB 4.2 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongosConfig4_2 effective_config = 1; + + // User-defined mongos settings for a MongoDB 4.2 cluster. + MongosConfig4_2 user_config = 2; + + // Default mongos configuration for a MongoDB 4.2 cluster. + MongosConfig4_2 default_config = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_4.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_4.proto new file mode 100644 index 0000000000..f4082b1b4f --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_4.proto @@ -0,0 +1,275 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1.config; + +import "google/protobuf/wrappers.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1/config;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1.config"; + +// Configuration of a mongod daemon. Supported options are a limited subset of all +// options described in [MongoDB documentation](https://docs.mongodb.com/v4.4/reference/configuration-options/). +message MongodConfig4_4 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + message CollectionConfig { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // No compression. + NONE = 1; + + // The [Snappy](https://docs.mongodb.com/v4.4/reference/glossary/#term-snappy) compression. + SNAPPY = 2; + + // The [zlib](https://docs.mongodb.com/v4.4/reference/glossary/#term-zlib) compression. + ZLIB = 3; + + // The [zstd](https://docs.mongodb.com/v4.4/reference/glossary/#term-zstd) compression. + ZSTD = 4; + } + + // Default type of compression to use for collection data. + Compressor block_compressor = 1; + } + + message IndexConfig { + // Enables or disables [prefix compression](https://www.mongodb.com/docs/manual/reference/glossary/#std-term-prefix-compression) + google.protobuf.BoolValue prefix_compression = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + + // Collection configuration for WiredTiger. + CollectionConfig collection_config = 2; + + //Index configuration for WiredTiger + IndexConfig index_config = 3; + } + + message Journal { + // Commit interval between journal operations, in milliseconds. + // Default: 100. + google.protobuf.Int64Value commit_interval = 1 [(value) = "1-500"]; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + + // Configuration of the MongoDB [journal](https://docs.mongodb.com/v4.4/reference/glossary/#term-journal). + Journal journal = 2; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + + // The fraction of slow operations that should be profiled or logged. + // operationProfiling.slowOpSampleRate accepts values between 0 and 1, inclusive. + google.protobuf.DoubleValue slow_op_sample_rate = 3 [(value) = "0-1"]; + } + + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongod will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + message SetParameter { + // Enables or disables the mechanism that controls the rate at which the primary applies its writes with the + // goal of keeping the secondary members [majority committed](https://www.mongodb.com/docs/v4.2/reference/command/replSetGetStatus/#replSetGetStatus.optimes.lastCommittedOpTime) + // lag under a configurable maximum value. + google.protobuf.BoolValue enable_flow_control = 1; + } + + // `storage` section of mongod configuration. + Storage storage = 1; + + // `operationProfiling` section of mongod configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongod configuration. + Network net = 3; + + // `replication` section of mongod configuration. + SetParameter set_parameter = 4; +} + +message MongoCfgConfig4_4 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. For details see [MongoDB documentation](https://docs.mongodb.com/v4.4/reference/configuration-options/#operationProfiling.slowOpThresholdMs). + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongocfg will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongocfg configuration. + Storage storage = 1; + + // `operationProfiling` section of mongocfg configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongocfg configuration. + Network net = 3; +} + +message MongosConfig4_4 { + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + // The maximum number of simultaneous connections that mongos will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + // Network settings for mongos. + Network net = 1; +} + +message MongodConfigSet4_4 { + // Effective mongod settings for a MongoDB 4.4 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongodConfig4_4 effective_config = 1; + + // User-defined mongod settings for a MongoDB 4.4 cluster. + MongodConfig4_4 user_config = 2; + + // Default mongod configuration for a MongoDB 4.4 cluster. + MongodConfig4_4 default_config = 3; +} + +message MongoCfgConfigSet4_4 { + // Effective mongocfg settings for a MongoDB 4.4 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongoCfgConfig4_4 effective_config = 1; + + // User-defined mongocfg settings for a MongoDB 4.4 cluster. + MongoCfgConfig4_4 user_config = 2; + + // Default mongocfg configuration for a MongoDB 4.4 cluster. + MongoCfgConfig4_4 default_config = 3; +} + +message MongosConfigSet4_4 { + // Effective mongos settings for a MongoDB 4.4 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongosConfig4_4 effective_config = 1; + + // User-defined mongos settings for a MongoDB 4.4 cluster. + MongosConfig4_4 user_config = 2; + + // Default mongos configuration for a MongoDB 4.4 cluster. + MongosConfig4_4 default_config = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_4_enterprise.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_4_enterprise.proto new file mode 100644 index 0000000000..76bb373764 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb4_4_enterprise.proto @@ -0,0 +1,309 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1.config; + +import "google/protobuf/wrappers.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1/config;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1.config"; + +// Configuration of a mongod daemon. Supported options are a limited subset of all +// options described in [MongoDB documentation](https://docs.mongodb.com/v4.4/reference/configuration-options/). +message MongodConfig4_4_enterprise { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + message CollectionConfig { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // No compression. + NONE = 1; + + // The [Snappy](https://docs.mongodb.com/v4.4/reference/glossary/#term-snappy) compression. + SNAPPY = 2; + + // The [zlib](https://docs.mongodb.com/v4.4/reference/glossary/#term-zlib) compression. + ZLIB = 3; + + // The [zstd](https://docs.mongodb.com/v4.4/reference/glossary/#term-zstd) compression. + ZSTD = 4; + } + + // Default type of compression to use for collection data. + Compressor block_compressor = 1; + } + + message IndexConfig { + // Enables or disables [prefix compression](https://www.mongodb.com/docs/manual/reference/glossary/#std-term-prefix-compression) + google.protobuf.BoolValue prefix_compression = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + + // Collection configuration for WiredTiger. + CollectionConfig collection_config = 2; + + //Index configuration for WiredTiger + IndexConfig index_config = 3; + } + + message Journal { + // Commit interval between journal operations, in milliseconds. + // Default: 100. + google.protobuf.Int64Value commit_interval = 1 [(value) = "1-500"]; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + + // Configuration of the MongoDB [journal](https://docs.mongodb.com/v4.4/reference/glossary/#term-journal). + Journal journal = 2; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + + // The fraction of slow operations that should be profiled or logged. + // operationProfiling.slowOpSampleRate accepts values between 0 and 1, inclusive. + google.protobuf.DoubleValue slow_op_sample_rate = 3 [(value) = "0-1"]; + } + + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongod will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + message Security { + message KMIP { + // KMIP server name + string server_name = 1; + // KMIP server port + google.protobuf.Int64Value port = 2; + // KMIP Server CA + string server_ca = 3; + // KMIP client certificate + private key (unencrypted) + string client_certificate = 4; + // KMIP Key identifier (if any) + string key_identifier = 5; + } + + // If encryption at rest should be enabled or not + google.protobuf.BoolValue enable_encryption = 1; + // `kmip` section of mongod security config + KMIP kmip = 2; + } + + message AuditLog { + // Audit filter + string filter = 1; + } + + message SetParameter { + // Enables the auditing of authorization successes + google.protobuf.BoolValue audit_authorization_success = 1; + // Enables or disables the mechanism that controls the rate at which the primary applies its writes with the + // goal of keeping the secondary members [majority committed](https://www.mongodb.com/docs/v4.2/reference/command/replSetGetStatus/#replSetGetStatus.optimes.lastCommittedOpTime) + // lag under a configurable maximum value. + google.protobuf.BoolValue enable_flow_control = 2; + } + + // `storage` section of mongod configuration. + Storage storage = 1; + + // `operationProfiling` section of mongod configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongod configuration. + Network net = 3; + + // `security` section of mongod configuration. + Security security = 4; + + // `AuditLog` section of mongod configuration. + AuditLog audit_log = 5; + + // `SetParameter` section of mongod configuration. + SetParameter set_parameter = 6; +} + +message MongoCfgConfig4_4_enterprise { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. For details see [MongoDB documentation](https://docs.mongodb.com/v4.4/reference/configuration-options/#operationProfiling.slowOpThresholdMs). + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongocfg will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongocfg configuration. + Storage storage = 1; + + // `operationProfiling` section of mongocfg configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongocfg configuration. + Network net = 3; +} + +message MongosConfig4_4_enterprise { + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongos will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + // Network settings for mongos. + Network net = 1; +} + +message MongodConfigSet4_4_enterprise { + // Effective mongod settings for a MongoDB 4.4 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongodConfig4_4_enterprise effective_config = 1; + + // User-defined mongod settings for a MongoDB 4.4 cluster. + MongodConfig4_4_enterprise user_config = 2; + + // Default mongod configuration for a MongoDB 4.4 cluster. + MongodConfig4_4_enterprise default_config = 3; +} + +message MongoCfgConfigSet4_4_enterprise { + // Effective mongocfg settings for a MongoDB 4.4 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongoCfgConfig4_4_enterprise effective_config = 1; + + // User-defined mongocfg settings for a MongoDB 4.4 cluster. + MongoCfgConfig4_4_enterprise user_config = 2; + + // Default mongocfg configuration for a MongoDB 4.4 cluster. + MongoCfgConfig4_4_enterprise default_config = 3; +} + +message MongosConfigSet4_4_enterprise { + // Effective mongos settings for a MongoDB 4.4 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongosConfig4_4_enterprise effective_config = 1; + + // User-defined mongos settings for a MongoDB 4.4 cluster. + MongosConfig4_4_enterprise user_config = 2; + + // Default mongos configuration for a MongoDB 4.4 cluster. + MongosConfig4_4_enterprise default_config = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb5_0.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb5_0.proto new file mode 100644 index 0000000000..b4e5042905 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb5_0.proto @@ -0,0 +1,279 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1.config; + +import "google/protobuf/wrappers.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1/config;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1.config"; + +// Configuration of a mongod daemon. Supported options are a limited subset of all +// options described in [MongoDB documentation](https://docs.mongodb.com/v5.0/reference/configuration-options/). +message MongodConfig5_0 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + message CollectionConfig { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // No compression. + NONE = 1; + + // The [Snappy](https://docs.mongodb.com/v5.0/reference/glossary/#term-snappy) compression. + SNAPPY = 2; + + // The [zlib](https://docs.mongodb.com/v5.0/reference/glossary/#term-zlib) compression. + ZLIB = 3; + + // The [zstd](https://docs.mongodb.com/v5.0/reference/glossary/#term-zstd) compression. + ZSTD = 4; + } + + // Default type of compression to use for collection data. + Compressor block_compressor = 1; + } + + message IndexConfig { + // Enables or disables [prefix compression](https://www.mongodb.com/docs/manual/reference/glossary/#std-term-prefix-compression) + google.protobuf.BoolValue prefix_compression = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + + // Collection configuration for WiredTiger. + CollectionConfig collection_config = 2; + + //Index configuration for WiredTiger + IndexConfig index_config = 3; + } + + message Journal { + // Commit interval between journal operations, in milliseconds. + // Default: 100. + google.protobuf.Int64Value commit_interval = 1 [(value) = "1-500"]; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + + // Configuration of the MongoDB [journal](https://docs.mongodb.com/v5.0/reference/glossary/#term-journal). + Journal journal = 2; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + + // The fraction of slow operations that should be profiled or logged. + // operationProfiling.slowOpSampleRate accepts values between 0 and 1, inclusive. + google.protobuf.DoubleValue slow_op_sample_rate = 3 [(value) = "0-1"]; + } + + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongod will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + message SetParameter { + // Enables or disables the mechanism that controls the rate at which the primary applies its writes with the + // goal of keeping the secondary members [majority committed](https://www.mongodb.com/docs/v4.2/reference/command/replSetGetStatus/#replSetGetStatus.optimes.lastCommittedOpTime) + // lag under a configurable maximum value. + google.protobuf.BoolValue enable_flow_control = 1; + + // The minimum time window in seconds for which the storage engine keeps the snapshot history. + google.protobuf.Int64Value min_snapshot_history_window_in_seconds = 2 [(value) = ">=0"]; + } + + // `storage` section of mongod configuration. + Storage storage = 1; + + // `operationProfiling` section of mongod configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongod configuration. + Network net = 3; + + // `SetParameter` section of mongod configuration. + SetParameter set_parameter = 4; +} + +message MongoCfgConfig5_0 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. For details see [MongoDB documentation](https://docs.mongodb.com/v5.0/reference/configuration-options/#operationProfiling.slowOpThresholdMs). + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongocfg will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongocfg configuration. + Storage storage = 1; + + // `operationProfiling` section of mongocfg configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongocfg configuration. + Network net = 3; +} + +message MongosConfig5_0 { + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongos will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + // Network settings for mongos. + Network net = 1; +} + +message MongodConfigSet5_0 { + // Effective mongod settings for a MongoDB 5.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongodConfig5_0 effective_config = 1; + + // User-defined mongod settings for a MongoDB 5.0 cluster. + MongodConfig5_0 user_config = 2; + + // Default mongod configuration for a MongoDB 5.0 cluster. + MongodConfig5_0 default_config = 3; +} + +message MongoCfgConfigSet5_0 { + // Effective mongocfg settings for a MongoDB 5.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongoCfgConfig5_0 effective_config = 1; + + // User-defined mongocfg settings for a MongoDB 5.0 cluster. + MongoCfgConfig5_0 user_config = 2; + + // Default mongocfg configuration for a MongoDB 5.0 cluster. + MongoCfgConfig5_0 default_config = 3; +} + +message MongosConfigSet5_0 { + // Effective mongos settings for a MongoDB 5.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongosConfig5_0 effective_config = 1; + + // User-defined mongos settings for a MongoDB 5.0 cluster. + MongosConfig5_0 user_config = 2; + + // Default mongos configuration for a MongoDB 5.0 cluster. + MongosConfig5_0 default_config = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb5_0_enterprise.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb5_0_enterprise.proto new file mode 100644 index 0000000000..f0b4cd0a96 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb5_0_enterprise.proto @@ -0,0 +1,314 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1.config; + +import "google/protobuf/wrappers.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1/config;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1.config"; + +// Configuration of a mongod daemon. Supported options are a limited subset of all +// options described in [MongoDB documentation](https://docs.mongodb.com/v5.0/reference/configuration-options/). +message MongodConfig5_0_enterprise { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + message CollectionConfig { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // No compression. + NONE = 1; + + // The [Snappy](https://docs.mongodb.com/v5.0/reference/glossary/#term-snappy) compression. + SNAPPY = 2; + + // The [zlib](https://docs.mongodb.com/v5.0/reference/glossary/#term-zlib) compression. + ZLIB = 3; + + // The [zstd](https://docs.mongodb.com/v5.0/reference/glossary/#term-zstd) compression. + ZSTD = 4; + } + + // Default type of compression to use for collection data. + Compressor block_compressor = 1; + } + + message IndexConfig { + // Enables or disables [prefix compression](https://www.mongodb.com/docs/manual/reference/glossary/#std-term-prefix-compression) + google.protobuf.BoolValue prefix_compression = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + + // Collection configuration for WiredTiger. + CollectionConfig collection_config = 2; + + //Index configuration for WiredTiger + IndexConfig index_config = 3; + } + + message Journal { + // Commit interval between journal operations, in milliseconds. + // Default: 100. + google.protobuf.Int64Value commit_interval = 1 [(value) = "1-500"]; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + + // Configuration of the MongoDB [journal](https://docs.mongodb.com/v5.0/reference/glossary/#term-journal). + Journal journal = 2; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + + // The fraction of slow operations that should be profiled or logged. + // operationProfiling.slowOpSampleRate accepts values between 0 and 1, inclusive. + google.protobuf.DoubleValue slow_op_sample_rate = 3 [(value) = "0-1"]; + } + + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongod will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + message Security { + message KMIP { + // KMIP server name + string server_name = 1; + // KMIP server port + google.protobuf.Int64Value port = 2; + // KMIP Server CA + string server_ca = 3; + // KMIP client certificate + private key (unencrypted) + string client_certificate = 4; + // KMIP Key identifier (if any) + string key_identifier = 5; + } + + // If encryption at rest should be enabled or not + google.protobuf.BoolValue enable_encryption = 1; + // `kmip` section of mongod security config + KMIP kmip = 2; + } + + message AuditLog { + // Audit filter + string filter = 1; + // Allows runtime configuration of audit filter and auditAuthorizationSuccess + google.protobuf.BoolValue runtime_configuration = 2; + } + + message SetParameter { + // Enables the auditing of authorization successes + google.protobuf.BoolValue audit_authorization_success = 1; + + // Enables or disables the mechanism that controls the rate at which the primary applies its writes with the + // goal of keeping the secondary members [majority committed](https://www.mongodb.com/docs/v4.2/reference/command/replSetGetStatus/#replSetGetStatus.optimes.lastCommittedOpTime) + // lag under a configurable maximum value. + google.protobuf.BoolValue enable_flow_control = 2; + + // The minimum time window in seconds for which the storage engine keeps the snapshot history. + google.protobuf.Int64Value min_snapshot_history_window_in_seconds = 3 [(value) = ">=0"]; + } + + // `storage` section of mongod configuration. + Storage storage = 1; + + // `operationProfiling` section of mongod configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongod configuration. + Network net = 3; + + // `security` section of mongod configuration. + Security security = 4; + + // `AuditLog` section of mongod configuration. + AuditLog audit_log = 5; + + // `SetParameter` section of mongod configuration. + SetParameter set_parameter = 6; +} + +message MongoCfgConfig5_0_enterprise { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. For details see [MongoDB documentation](https://docs.mongodb.com/v5.0/reference/configuration-options/#operationProfiling.slowOpThresholdMs). + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongocfg will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + // `storage` section of mongocfg configuration. + Storage storage = 1; + + // `operationProfiling` section of mongocfg configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongocfg configuration. + Network net = 3; +} + +message MongosConfig5_0_enterprise { + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongos will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + // Network settings for mongos. + Network net = 1; +} + +message MongodConfigSet5_0_enterprise { + // Effective mongod settings for a MongoDB 5.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongodConfig5_0_enterprise effective_config = 1; + + // User-defined mongod settings for a MongoDB 5.0 cluster. + MongodConfig5_0_enterprise user_config = 2; + + // Default mongod configuration for a MongoDB 5.0 cluster. + MongodConfig5_0_enterprise default_config = 3; +} + +message MongoCfgConfigSet5_0_enterprise { + // Effective mongocfg settings for a MongoDB 5.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongoCfgConfig5_0_enterprise effective_config = 1; + + // User-defined mongocfg settings for a MongoDB 5.0 cluster. + MongoCfgConfig5_0_enterprise user_config = 2; + + // Default mongocfg configuration for a MongoDB 5.0 cluster. + MongoCfgConfig5_0_enterprise default_config = 3; +} + +message MongosConfigSet5_0_enterprise { + // Effective mongos settings for a MongoDB 5.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongosConfig5_0_enterprise effective_config = 1; + + // User-defined mongos settings for a MongoDB 5.0 cluster. + MongosConfig5_0_enterprise user_config = 2; + + // Default mongos configuration for a MongoDB 5.0 cluster. + MongosConfig5_0_enterprise default_config = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb6_0.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb6_0.proto new file mode 100644 index 0000000000..64e21fec65 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb6_0.proto @@ -0,0 +1,279 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1.config; + +import "google/protobuf/wrappers.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1/config;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1.config"; + +// Configuration of a mongod daemon. Supported options are a limited subset of all +// options described in [MongoDB documentation](https://docs.mongodb.com/v6.0/reference/configuration-options/). +message MongodConfig6_0 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + message CollectionConfig { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // No compression. + NONE = 1; + + // The [Snappy](https://docs.mongodb.com/v6.0/reference/glossary/#term-snappy) compression. + SNAPPY = 2; + + // The [zlib](https://docs.mongodb.com/v6.0/reference/glossary/#term-zlib) compression. + ZLIB = 3; + + // The [zstd](https://docs.mongodb.com/v6.0/reference/glossary/#term-zstd) compression. + ZSTD = 4; + } + + // Default type of compression to use for collection data. + Compressor block_compressor = 1; + } + + message IndexConfig { + // Enables or disables [prefix compression](https://www.mongodb.com/docs/manual/reference/glossary/#std-term-prefix-compression) + google.protobuf.BoolValue prefix_compression = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + + // Collection configuration for WiredTiger. + CollectionConfig collection_config = 2; + + //Index configuration for WiredTiger + IndexConfig index_config = 3; + } + + message Journal { + // Commit interval between journal operations, in milliseconds. + // Default: 100. + google.protobuf.Int64Value commit_interval = 2 [(value) = "1-500"]; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + + // Configuration of the MongoDB [journal](https://docs.mongodb.com/v6.0/reference/glossary/#term-journal). + Journal journal = 2; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + + // The fraction of slow operations that should be profiled or logged. + // operationProfiling.slowOpSampleRate accepts values between 0 and 1, inclusive. + google.protobuf.DoubleValue slow_op_sample_rate = 3 [(value) = "0-1"]; + } + + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongod will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + message SetParameter { + // Enables or disables the mechanism that controls the rate at which the primary applies its writes with the + // goal of keeping the secondary members [majority committed](https://www.mongodb.com/docs/v4.2/reference/command/replSetGetStatus/#replSetGetStatus.optimes.lastCommittedOpTime) + // lag under a configurable maximum value. + google.protobuf.BoolValue enable_flow_control = 1; + + // The minimum time window in seconds for which the storage engine keeps the snapshot history. + google.protobuf.Int64Value min_snapshot_history_window_in_seconds = 2 [(value) = ">=0"]; + } + + // `storage` section of mongod configuration. + Storage storage = 1; + + // `operationProfiling` section of mongod configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongod configuration. + Network net = 3; + + // `SetParameter` section of mongod configuration. + SetParameter set_parameter = 4; +} + +message MongoCfgConfig6_0 { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. For details see [MongoDB documentation](https://docs.mongodb.com/v6.0/reference/configuration-options/#operationProfiling.slowOpThresholdMs). + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongocfg will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongocfg configuration. + Storage storage = 1; + + // `operationProfiling` section of mongocfg configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongocfg configuration. + Network net = 3; +} + +message MongosConfig6_0 { + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongos will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + // Network settings for mongos. + Network net = 3; +} + +message MongodConfigSet6_0 { + // Effective mongod settings for a MongoDB 6.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongodConfig6_0 effective_config = 1; + + // User-defined mongod settings for a MongoDB 6.0 cluster. + MongodConfig6_0 user_config = 2; + + // Default mongod configuration for a MongoDB 6.0 cluster. + MongodConfig6_0 default_config = 3; +} + +message MongoCfgConfigSet6_0 { + // Effective mongocfg settings for a MongoDB 6.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongoCfgConfig6_0 effective_config = 1; + + // User-defined mongocfg settings for a MongoDB 6.0 cluster. + MongoCfgConfig6_0 user_config = 2; + + // Default mongocfg configuration for a MongoDB 6.0 cluster. + MongoCfgConfig6_0 default_config = 3; +} + +message MongosConfigSet6_0 { + // Effective mongos settings for a MongoDB 6.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongosConfig6_0 effective_config = 1; + + // User-defined mongos settings for a MongoDB 6.0 cluster. + MongosConfig6_0 user_config = 2; + + // Default mongos configuration for a MongoDB 6.0 cluster. + MongosConfig6_0 default_config = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb6_0_enterprise.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb6_0_enterprise.proto new file mode 100644 index 0000000000..d27cafb786 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/config/mongodb6_0_enterprise.proto @@ -0,0 +1,315 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1.config; + +import "google/protobuf/wrappers.proto"; +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1/config;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1.config"; + +// Configuration of a mongod daemon. Supported options are a limited subset of all +// options described in [MongoDB documentation](https://docs.mongodb.com/v6.0/reference/configuration-options/). +message MongodConfig6_0_enterprise { + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + message CollectionConfig { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // No compression. + NONE = 1; + + // The [Snappy](https://docs.mongodb.com/v6.0/reference/glossary/#term-snappy) compression. + SNAPPY = 2; + + // The [zlib](https://docs.mongodb.com/v6.0/reference/glossary/#term-zlib) compression. + ZLIB = 3; + + // The [zstd](https://docs.mongodb.com/v6.0/reference/glossary/#term-zstd) compression. + ZSTD = 4; + } + + // Default type of compression to use for collection data. + Compressor block_compressor = 1; + } + + message IndexConfig { + // Enables or disables [prefix compression](https://www.mongodb.com/docs/manual/reference/glossary/#std-term-prefix-compression) + google.protobuf.BoolValue prefix_compression = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + + // Collection configuration for WiredTiger. + CollectionConfig collection_config = 2; + + //Index configuration for WiredTiger + IndexConfig index_config = 3; + } + + message Journal { + // Commit interval between journal operations, in milliseconds. + // Default: 100. + google.protobuf.Int64Value commit_interval = 2 [(value) = "1-500"]; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + + // Configuration of the MongoDB [journal](https://docs.mongodb.com/v6.0/reference/glossary/#term-journal). + Journal journal = 2; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + + // The fraction of slow operations that should be profiled or logged. + // operationProfiling.slowOpSampleRate accepts values between 0 and 1, inclusive. + google.protobuf.DoubleValue slow_op_sample_rate = 3 [(value) = "0-1"]; + } + + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongod will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + message Security { + message KMIP { + // KMIP server name + string server_name = 1; + // KMIP server port + google.protobuf.Int64Value port = 2; + // KMIP Server CA + string server_ca = 3; + // KMIP client certificate + private key (unencrypted) + string client_certificate = 4; + // KMIP Key identifier (if any) + string key_identifier = 5; + } + + // If encryption at rest should be enabled or not + google.protobuf.BoolValue enable_encryption = 1; + // `kmip` section of mongod security config + KMIP kmip = 2; + } + + message AuditLog { + // Audit filter + string filter = 1; + // Allows runtime configuration of audit filter and auditAuthorizationSuccess + google.protobuf.BoolValue runtime_configuration = 2; + } + + message SetParameter { + // Enables the auditing of authorization successes + google.protobuf.BoolValue audit_authorization_success = 1; + // Enables or disables the mechanism that controls the rate at which the primary applies its writes with the + // goal of keeping the secondary members [majority committed](https://www.mongodb.com/docs/v4.2/reference/command/replSetGetStatus/#replSetGetStatus.optimes.lastCommittedOpTime) + // lag under a configurable maximum value. + google.protobuf.BoolValue enable_flow_control = 2; + + // The minimum time window in seconds for which the storage engine keeps the snapshot history. + google.protobuf.Int64Value min_snapshot_history_window_in_seconds = 3 [(value) = ">=0"]; + } + + // `storage` section of mongod configuration. + Storage storage = 1; + + // `operationProfiling` section of mongod configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongod configuration. + Network net = 3; + + // `security` section of mongod configuration. + Security security = 4; + + // `AuditLog` section of mongod configuration. + AuditLog audit_log = 5; + + // `SetParameter` section of mongod configuration. + SetParameter set_parameter = 6; +} + +message MongoCfgConfig6_0_enterprise { + + message Storage { + // Configuration of WiredTiger storage engine. + message WiredTiger { + message EngineConfig { + // The maximum size of the internal cache that WiredTiger will use for all data. + google.protobuf.DoubleValue cache_size_gb = 1; + } + + // Engine configuration for WiredTiger. + EngineConfig engine_config = 1; + } + + // Configuration of the WiredTiger storage engine. + WiredTiger wired_tiger = 1; + } + + message OperationProfiling { + enum Mode { + MODE_UNSPECIFIED = 0; + + // The profiler is off and does not collect any data. + OFF = 1; + + // The profiler collects data for operations that take longer than the value of [slow_op_threshold]. + SLOW_OP = 2; + + // The profiler collects data for all operations. + ALL = 3; + } + + // Mode which specifies operations that should be profiled. + Mode mode = 1; + + // The slow operation time threshold, in milliseconds. Operations that run + // for longer than this threshold are considered slow, and are processed by the profiler + // running in the SLOW_OP mode. For details see [MongoDB documentation](https://docs.mongodb.com/v6.0/reference/configuration-options/#operationProfiling.slowOpThresholdMs). + google.protobuf.Int64Value slow_op_threshold = 2 [(value) = ">0"]; + } + + message Network { + // The maximum number of simultaneous connections that mongocfg will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + } + + // `storage` section of mongocfg configuration. + Storage storage = 1; + + // `operationProfiling` section of mongocfg configuration. + OperationProfiling operation_profiling = 2; + + // `net` section of mongocfg configuration. + Network net = 3; +} + +message MongosConfig6_0_enterprise { + message Network { + message Compression { + enum Compressor { + COMPRESSOR_UNSPECIFIED = 0; + + // The [Snappy](https://docs.mongodb.com/v4.2/reference/glossary/#term-snappy) compression. + SNAPPY = 1; + + // The [zlib](https://docs.mongodb.com/v4.2/reference/glossary/#term-zlib) compression. + ZLIB = 2; + + // The [zstd](https://docs.mongodb.com/v4.2/reference/glossary/#term-zstd) compression. + ZSTD = 3; + + //No compression + DISABLED = 4; + } + // Specifies the default compressor(s) to use for communication between this mongod or mongos instance and: + // - other members of the deployment if the instance is part of a replica set or a sharded cluster + // - mongosh + // - drivers that support the OP_COMPRESSED message format. + // MongoDB supports the following compressors: + repeated Compressor compressors = 1 [(size) = "1-3"]; + } + + // The maximum number of simultaneous connections that mongos will accept. + google.protobuf.Int64Value max_incoming_connections = 1 [(value) = "10-16384"]; + + // Compression settings + Compression compression = 2; + } + + // Network settings for mongos. + Network net = 3; +} + +message MongodConfigSet6_0_enterprise { + // Effective mongod settings for a MongoDB 6.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongodConfig6_0_enterprise effective_config = 1; + + // User-defined mongod settings for a MongoDB 6.0 cluster. + MongodConfig6_0_enterprise user_config = 2; + + // Default mongod configuration for a MongoDB 6.0 cluster. + MongodConfig6_0_enterprise default_config = 3; +} + +message MongoCfgConfigSet6_0_enterprise { + // Effective mongocfg settings for a MongoDB 6.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongoCfgConfig6_0_enterprise effective_config = 1; + + // User-defined mongocfg settings for a MongoDB 6.0 cluster. + MongoCfgConfig6_0_enterprise user_config = 2; + + // Default mongocfg configuration for a MongoDB 6.0 cluster. + MongoCfgConfig6_0_enterprise default_config = 3; +} + +message MongosConfigSet6_0_enterprise { + // Effective mongos settings for a MongoDB 6.0 cluster (a combination of settings defined + // in [user_config] and [default_config]). + MongosConfig6_0_enterprise effective_config = 1; + + // User-defined mongos settings for a MongoDB 5.0 cluster. + MongosConfig6_0_enterprise user_config = 2; + + // Default mongos configuration for a MongoDB 5.0 cluster. + MongosConfig6_0_enterprise default_config = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/database.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/database.proto new file mode 100644 index 0000000000..12442b577b --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/database.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A MongoDB Database resource. For more information, see the +// [Developer's Guide](/docs/managed-mongodb/concepts). +message Database { + // Name of the database. + string name = 1; + + // ID of the MongoDB cluster that the database belongs to. + string cluster_id = 2; +} + +message DatabaseSpec { + // Name of the MongoDB database. 1-63 characters long. + string name = 1 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_-]{1,63}"]; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/database_service.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/database_service.proto new file mode 100644 index 0000000000..c944d093f5 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/database_service.proto @@ -0,0 +1,116 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "google/api/annotations.proto"; +import "yandex/cloud/api/operation.proto"; +import "yandex/cloud/operation/operation.proto"; +import "yandex/cloud/validation.proto"; +import "yandex/cloud/mdb/mongodb/v1/database.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A set of methods for managing MongoDB Database resources. +service DatabaseService { + // Returns the specified MongoDB Database resource. + // + // To get the list of available MongoDB Database resources, make a [List] request. + rpc Get (GetDatabaseRequest) returns (Database) { + option (google.api.http) = { get: "/managed-mongodb/v1/clusters/{cluster_id}/databases/{database_name}" }; + } + + // Retrieves the list of MongoDB Database resources in the specified cluster. + rpc List (ListDatabasesRequest) returns (ListDatabasesResponse) { + option (google.api.http) = { get: "/managed-mongodb/v1/clusters/{cluster_id}/databases" }; + } + + // Creates a new MongoDB database in the specified cluster. + rpc Create (CreateDatabaseRequest) returns (operation.Operation) { + option (google.api.http) = { post: "/managed-mongodb/v1/clusters/{cluster_id}/databases" body: "*" }; + option (yandex.cloud.api.operation) = { + metadata: "CreateDatabaseMetadata" + response: "Database" + }; + } + + // Deletes the specified MongoDB database. + rpc Delete (DeleteDatabaseRequest) returns (operation.Operation) { + option (google.api.http) = { delete: "/managed-mongodb/v1/clusters/{cluster_id}/databases/{database_name}" }; + option (yandex.cloud.api.operation) = { + metadata: "DeleteDatabaseMetadata" + response: "google.protobuf.Empty" + }; + } +} + +message GetDatabaseRequest { + // ID of the MongoDB cluster that the database belongs to. + // To get the cluster ID use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // Name of the MongoDB database to return. + // To get the name of the database use a [DatabaseService.List] request. + string database_name = 2 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_-]*"]; +} + +message ListDatabasesRequest { + // ID of the MongoDB cluster to list databases in. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListDatabasesResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + int64 page_size = 2 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] to the + // [ListDatabasesResponse.next_page_token] returned by the previous list request. + string page_token = 3 [(length) = "<=100"]; +} + +message ListDatabasesResponse { + // List of MongoDB databases. + repeated Database databases = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListDatabasesRequest.page_size], use the [next_page_token] as the value + // for the [ListDatabasesRequest.page_token] parameter in the next list request. Each subsequent + // list request will have its own [next_page_token] to continue paging through the results. + string next_page_token = 2; +} + +message CreateDatabaseRequest { + // ID of the MongoDB cluster to create a database in. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // Configuration of the database to create. + DatabaseSpec database_spec = 2 [(required) = true]; +} + +message CreateDatabaseMetadata { + // ID of the MongoDB cluster where a database is being created. + string cluster_id = 1; + + // Name of the MongoDB database that is being created. + string database_name = 2; +} + +message DeleteDatabaseRequest { + // ID of the MongoDB cluster to delete a database in. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // Name of the database to delete. + // To get the name of the database, use a [DatabaseService.List] request. + string database_name = 2 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_-]*"]; +} + +message DeleteDatabaseMetadata { + // ID of the MongoDB cluster where a database is being deleted. + string cluster_id = 1; + + // Name of the MongoDB database that is being deleted. + string database_name = 2; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/maintenance.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/maintenance.proto new file mode 100644 index 0000000000..510b3cf62b --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/maintenance.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "google/protobuf/timestamp.proto"; + +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A maintenance window settings. +message MaintenanceWindow { + // The maintenance policy in effect. + oneof policy { + option (exactly_one) = true; + + // Maintenance operation can be scheduled anytime. + AnytimeMaintenanceWindow anytime = 1; + + // Maintenance operation can be scheduled on a weekly basis. + WeeklyMaintenanceWindow weekly_maintenance_window = 2; + } +} + +message AnytimeMaintenanceWindow {} + +// Weelky maintenance window settings. +message WeeklyMaintenanceWindow { + enum WeekDay { + WEEK_DAY_UNSPECIFIED = 0; + MON = 1; + TUE = 2; + WED = 3; + THU = 4; + FRI = 5; + SAT = 6; + SUN = 7; + } + + // Day of the week (in `DDD` format). + WeekDay day = 1; + + // Hour of the day in UTC (in `HH` format). + int64 hour = 2 [(value) = "1-24"]; +} + +// A planned maintenance operation. +message MaintenanceOperation { + // Information about this maintenance operation. + string info = 1 [(length) = "<=256"]; + + // Time until which this maintenance operation is delayed. + google.protobuf.Timestamp delayed_until = 2; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/resource_preset.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/resource_preset.proto new file mode 100644 index 0000000000..83bf2c527f --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/resource_preset.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A ResourcePreset resource for describing hardware configuration presets. +message ResourcePreset { + // ID of the ResourcePreset resource. + string id = 1; + + // IDs of availability zones where the resource preset is available. + repeated string zone_ids = 2; + + // Number of CPU cores for a MongoDB host created with the preset. + int64 cores = 3; + + // RAM volume for a MongoDB host created with the preset, in bytes. + int64 memory = 4; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/resource_preset_service.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/resource_preset_service.proto new file mode 100644 index 0000000000..0ca3855be1 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/resource_preset_service.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "google/api/annotations.proto"; +import "yandex/cloud/validation.proto"; +import "yandex/cloud/mdb/mongodb/v1/resource_preset.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A set of methods for managing ResourcePreset resources. +service ResourcePresetService { + // Returns the specified ResourcePreset resource. + // + // To get the list of available ResourcePreset resources, make a [List] request. + rpc Get (GetResourcePresetRequest) returns (ResourcePreset) { + option (google.api.http) = { get: "/managed-mongodb/v1/resourcePresets/{resource_preset_id}" }; + } + + // Retrieves the list of available ResourcePreset resources. + rpc List (ListResourcePresetsRequest) returns (ListResourcePresetsResponse) { + option (google.api.http) = { get: "/managed-mongodb/v1/resourcePresets" }; + } +} + +message GetResourcePresetRequest { + // ID of the resource preset to return. + // To get the resource preset ID, use a [ResourcePresetService.List] request. + string resource_preset_id = 1 [(required) = true]; +} + +message ListResourcePresetsRequest { + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListResourcePresetsResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + // Acceptable values are 0 to 1000, inclusive. Default value: 100. + int64 page_size = 2 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] to the + // [ListResourcePresetsResponse.next_page_token] returned by the previous list request. + string page_token = 3 [(length) = "<=100"]; +} + +message ListResourcePresetsResponse { + // List of ResourcePreset resources. + repeated ResourcePreset resource_presets = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListResourcePresetsRequest.page_size], use the [next_page_token] as the value + // for the [ListResourcePresetsRequest.page_token] parameter in the next list request. Each subsequent + // list request will have its own [next_page_token] to continue paging through the results. + string next_page_token = 2; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/user.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/user.proto new file mode 100644 index 0000000000..615ed5512b --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/user.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "yandex/cloud/validation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A MongoDB User resource. For more information, see the +// [Developer's Guide](/docs/managed-mongodb/concepts). +message User { + // Name of the MongoDB user. + string name = 1; + + // ID of the MongoDB cluster the user belongs to. + string cluster_id = 2; + + // Set of permissions granted to the user. + repeated Permission permissions = 3; +} + +message Permission { + // Name of the database that the permission grants access to. + string database_name = 1; + + // MongoDB roles for the [database_name] database that the permission grants. + repeated string roles = 2; +} + +message UserSpec { + // Name of the MongoDB user. + string name = 1 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_]*"]; + + // Password of the MongoDB user. + string password = 2 [(required) = true, (length) = "8-128"]; + + // Set of permissions to grant to the user. + repeated Permission permissions = 3; +} diff --git a/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/user_service.proto b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/user_service.proto new file mode 100644 index 0000000000..7080629119 --- /dev/null +++ b/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/mongodb/v1/user_service.proto @@ -0,0 +1,214 @@ +syntax = "proto3"; + +package yandex.cloud.mdb.mongodb.v1; + +import "google/api/annotations.proto"; +import "google/protobuf/field_mask.proto"; +import "yandex/cloud/validation.proto"; +import "yandex/cloud/operation/operation.proto"; +import "yandex/cloud/mdb/mongodb/v1/user.proto"; +import "yandex/cloud/api/operation.proto"; + +option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mongodb/v1;mongodb"; +option java_package = "yandex.cloud.api.mdb.mongodb.v1"; + +// A set of methods for managing MongoDB User resources. +service UserService { + // Returns the specified MongoDB User resource. + // + // To get the list of available MongoDB User resources, make a [List] request. + rpc Get (GetUserRequest) returns (User) { + option (google.api.http) = { get: "/managed-mongodb/v1/clusters/{cluster_id}/users/{user_name}" }; + } + + // Retrieves the list of MongoDB User resources in the specified cluster. + rpc List (ListUsersRequest) returns (ListUsersResponse) { + option (google.api.http) = { get: "/managed-mongodb/v1/clusters/{cluster_id}/users" }; + } + + // Creates a MongoDB user in the specified cluster. + rpc Create (CreateUserRequest) returns (operation.Operation) { + option (google.api.http) = { post: "/managed-mongodb/v1/clusters/{cluster_id}/users" body: "*" }; + option (yandex.cloud.api.operation) = { + metadata: "CreateUserMetadata" + response: "User" + }; + } + + // Updates the specified MongoDB user. + rpc Update (UpdateUserRequest) returns (operation.Operation) { + option (google.api.http) = { patch: "/managed-mongodb/v1/clusters/{cluster_id}/users/{user_name}" body: "*" }; + option (yandex.cloud.api.operation) = { + metadata: "UpdateUserMetadata" + response: "User" + }; + } + + // Deletes the specified MongoDB user. + rpc Delete (DeleteUserRequest) returns (operation.Operation) { + option (google.api.http) = { delete: "/managed-mongodb/v1/clusters/{cluster_id}/users/{user_name}" }; + option (yandex.cloud.api.operation) = { + metadata: "DeleteUserMetadata" + response: "google.protobuf.Empty" + }; + } + + // Grants permission to the specified MongoDB user. + rpc GrantPermission (GrantUserPermissionRequest) returns (operation.Operation) { + option (google.api.http) = { post: "/managed-mongodb/v1/clusters/{cluster_id}/users/{user_name}:grantPermission" body: "*" }; + option (yandex.cloud.api.operation) = { + metadata: "GrantUserPermissionMetadata" + response: "User" + }; + } + + // Revokes permission from the specified MongoDB user. + rpc RevokePermission (RevokeUserPermissionRequest) returns (operation.Operation) { + option (google.api.http) = { post: "/managed-mongodb/v1/clusters/{cluster_id}/users/{user_name}:revokePermission" body: "*" }; + option (yandex.cloud.api.operation) = { + metadata: "RevokeUserPermissionMetadata" + response: "User" + }; + } +} + +message GetUserRequest { + // ID of the MongoDB cluster the user belongs to. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // Name of the MongoDB User resource to return. + // To get the name of the user, use a [UserService.List] request. + string user_name = 2 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_]*"]; +} + +message ListUsersRequest { + // ID of the cluster to list MongoDB users in. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // The maximum number of results per page to return. If the number of available + // results is larger than [page_size], the service returns a [ListUsersResponse.next_page_token] + // that can be used to get the next page of results in subsequent list requests. + int64 page_size = 2 [(value) = "<=1000"]; + + // Page token. To get the next page of results, set [page_token] to the + // [ListUsersResponse.next_page_token] returned by the previous list request. + string page_token = 3 [(length) = "<=100"]; +} + +message ListUsersResponse { + // List of MongoDB User resources. + repeated User users = 1; + + // This token allows you to get the next page of results for list requests. If the number of results + // is larger than [ListUsersRequest.page_size], use the [next_page_token] as the value + // for the [ListUsersRequest.page_token] parameter in the next list request. Each subsequent + // list request will have its own [next_page_token] to continue paging through the results. + string next_page_token = 2; +} + +message CreateUserRequest { + // ID of the MongoDB cluster to create a user in. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // Properties of the user to be created. + UserSpec user_spec = 2; +} + +message CreateUserMetadata { + // ID of the MongoDB cluster the user is being created in. + string cluster_id = 1; + + // Name of the user that is being created. + string user_name = 2; +} + +message UpdateUserRequest { + // ID of the MongoDB cluster the user belongs to. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // Name of the user to be updated. + // To get the name of the user, use a [UserService.List] request. + string user_name = 2 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_]*"]; + + // Field mask that specifies which fields of the MongoDB User resource should be updated. + google.protobuf.FieldMask update_mask = 3; + + // New password for the user. + string password = 4 [(length) = "8-128"]; + + // New set of permissions for the user. + repeated Permission permissions = 5; +} + +message UpdateUserMetadata { + // ID of the MongoDB cluster the user belongs to. + string cluster_id = 1; + + // Name of the user that is being updated. + string user_name = 2; +} + +message DeleteUserRequest { + // ID of the MongoDB cluster the user belongs to. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // Name of the user to delete. + // To get the name of the user use a [UserService.List] request. + string user_name = 2 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_]*"]; +} + +message DeleteUserMetadata { + // ID of the MongoDB cluster the user belongs to. + string cluster_id = 1; + + // Name of the user that is being deleted. + string user_name = 2; +} + +message GrantUserPermissionRequest { + // ID of the MongoDB cluster the user belongs to. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // Name of the user to grant the permission to. + // To get the name of the user, use a [UserService.List] request. + string user_name = 2 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_]*"]; + + // Permission that should be granted to the specified user. + Permission permission = 3 [(required) = true]; +} + +message GrantUserPermissionMetadata { + // ID of the MongoDB cluster the user belongs to. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1; + + // Name of the user that is being granted a permission. + string user_name = 2; +} + +message RevokeUserPermissionRequest { + // ID of the MongoDB cluster the user belongs to. + // To get the cluster ID, use a [ClusterService.List] request. + string cluster_id = 1 [(required) = true, (length) = "<=50"]; + + // Name of the user to revoke a permission from. + // To get the name of the user, use a [UserService.List] request. + string user_name = 2 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_]*"]; + + // Name of the database that the user should lose access to. + string database_name = 3 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_-]*"]; +} + +message RevokeUserPermissionMetadata { + // ID of the MongoDB cluster the user belongs to. + string cluster_id = 1; + + // Name of the user whose permission is being revoked. + string user_name = 2; +} |