aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/serverless/mdbproxy/v1/proxy.proto
blob: b87ff7503bbdb20b511bafa9ab11456b014c1a27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
syntax = "proto3";

package yandex.cloud.serverless.mdbproxy.v1;

import "google/protobuf/timestamp.proto";
import "yandex/cloud/validation.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/serverless/mdbproxy/v1;proxy";
option java_package = "yandex.cloud.api.serverless.mdbproxy.v1";

message Proxy {
    // ID of the proxy.
    string id = 1;

    // ID of the folder that the proxy belongs to.
    string folder_id = 2 [(required) = true, (length) = "<=50"];

    // Creation timestamp for the proxy.
    google.protobuf.Timestamp created_at = 3;

    // Name of the proxy.
    string name = 4 [(required) = true, (pattern) = "|[a-z][-a-z0-9]{1,61}[a-z0-9]"];

    // Description of the proxy.
    string description = 5;

    // Resource labels as `key:value` pairs.
    map<string, string> labels = 6 [(size) = "<=64", (length) = "<=63", (pattern) = "[-_./\\@0-9a-z]*", (map_key).length = "1-63", (map_key).pattern = "[a-z][-_./\\@0-9a-z]*"];

    // MDB specific settings.
    Target target = 7;
}

message Target {
    oneof mdb {
        option (exactly_one) = true;

        // Clickhouse settings for proxy.
        ClickHouse clickhouse = 1;

        // PostgreSQL settings for proxy.
        PostgreSQL postgresql = 2;
    }

    message PostgreSQL {
        // Cluster identifier for postgresql.
        string cluster_id = 1 [(required) = true, (length) = "<=50"];

        // PostgreSQL user.
        string user = 2 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_-]*"];

        // PostgreSQL password, input only field.
        string password = 3;

        // PostgreSQL database name.
        string db = 4 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_-]*"];

        // PostgreSQL proxy-host for connection, output only field.
        string endpoint = 5;
    }

    message ClickHouse {
        // Cluster identifier for clickhouse.
        string cluster_id = 1 [(required) = true, (length) = "<=50"];

        // Clickhouse user.
        string user = 2 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_]*"];

        // Clickhouse password, input only field.
        string password = 3;

        // Clickhouse database name.
        string db = 4 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_-]*"];

        // Clickhouse proxy-host for connection, output only field.
        string endpoint = 5;
    }
}