-
Notifications
You must be signed in to change notification settings - Fork 666
Expand file tree
/
Copy pathcloud_sql_connect.proto
More file actions
217 lines (176 loc) · 7.77 KB
/
cloud_sql_connect.proto
File metadata and controls
217 lines (176 loc) · 7.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.sql.v1beta4;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/cloud/sql/v1beta4/cloud_sql_resources.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
option go_package = "cloud.google.com/go/sql/apiv1beta4/sqlpb;sqlpb";
option java_multiple_files = true;
option java_outer_classname = "CloudSqlConnectProto";
option java_package = "com.google.cloud.sql.v1beta4";
// Cloud SQL connect service.
service SqlConnectService {
option (google.api.default_host) = "sqladmin.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/sqlservice.admin";
// Retrieves connect settings about a Cloud SQL instance.
rpc GetConnectSettings(GetConnectSettingsRequest) returns (ConnectSettings) {
option (google.api.http) = {
get: "/sql/v1beta4/projects/{project}/instances/{instance}/connectSettings"
};
}
// Generates a short-lived X509 certificate containing the provided public key
// and signed by a private key specific to the target instance. Users may use
// the certificate to authenticate as themselves when connecting to the
// database.
rpc GenerateEphemeralCert(GenerateEphemeralCertRequest)
returns (GenerateEphemeralCertResponse) {
option (google.api.http) = {
post: "/sql/v1beta4/projects/{project}/instances/{instance}:generateEphemeralCert"
body: "*"
};
}
}
// Connect settings retrieval request.
message GetConnectSettingsRequest {
// Cloud SQL instance ID. This does not include the project ID.
string instance = 1;
// Project ID of the project that contains the instance.
string project = 2;
// Optional. Optional snapshot read timestamp to trade freshness for
// performance.
google.protobuf.Timestamp read_time = 7
[(google.api.field_behavior) = OPTIONAL];
}
// Connect settings retrieval response.
message ConnectSettings {
// Various Certificate Authority (CA) modes for certificate signing.
enum CaMode {
// CA mode is unspecified. It is effectively the same as
// `GOOGLE_MANAGED_INTERNAL_CA`.
CA_MODE_UNSPECIFIED = 0;
// Google-managed self-signed internal CA.
GOOGLE_MANAGED_INTERNAL_CA = 1;
// Google-managed regional CA part of root CA hierarchy hosted on Google
// Cloud's Certificate Authority Service (CAS).
GOOGLE_MANAGED_CAS_CA = 2;
// Customer-managed CA hosted on Google Cloud's Certificate Authority
// Service (CAS).
CUSTOMER_MANAGED_CAS_CA = 3;
}
// Details of a single read pool node of a read pool.
message ConnectPoolNodeConfig {
// Output only. The name of the read pool node. Doesn't include the project
// ID.
optional string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Mappings containing IP addresses that can be used to connect
// to the read pool node.
repeated IpMapping ip_addresses = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The DNS name of the read pool node.
optional string dns_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The list of DNS names used by this read pool node.
repeated DnsNameMapping dns_names = 4
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// MdxProtocolSupport describes parts of the MDX protocol supported by this
// instance.
enum MdxProtocolSupport {
// Not specified.
MDX_PROTOCOL_SUPPORT_UNSPECIFIED = 0;
// Client should send the client protocol type in the MDX request.
CLIENT_PROTOCOL_TYPE = 1;
}
// This is always `sql#connectSettings`.
string kind = 1;
// SSL configuration.
SslCert server_ca_cert = 2;
// The assigned IP addresses for the instance.
repeated IpMapping ip_addresses = 3;
// The cloud region for the instance. e.g. `us-central1`, `europe-west1`.
// The region cannot be changed after instance creation.
string region = 4;
// The database engine type and version. The `databaseVersion`
// field cannot be changed after instance creation.
// MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default),
// or `MYSQL_5_6`.
// PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`,
// `POSTGRES_11` or `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`.
// SQL Server instances: `SQLSERVER_2017_STANDARD` (default),
// `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`,
// `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`,
// `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or
// `SQLSERVER_2019_WEB`.
SqlDatabaseVersion database_version = 31;
// `SECOND_GEN`: Cloud SQL database instance.
// `EXTERNAL`: A database server that is not managed by Google.
// This property is read-only; use the `tier` property in the `settings`
// object to determine the database type.
SqlBackendType backend_type = 32;
// Whether PSC connectivity is enabled for this instance.
bool psc_enabled = 33;
// The dns name of the instance.
string dns_name = 34;
// Specify what type of CA is used for the server certificate.
CaMode server_ca_mode = 35;
// Custom subject alternative names for the server certificate.
repeated string custom_subject_alternative_names = 37;
// Output only. The list of DNS names used by this instance.
repeated DnsNameMapping dns_names = 38
[(google.api.field_behavior) = OUTPUT_ONLY];
// The number of read pool nodes in a read pool.
optional int32 node_count = 63;
// Output only. Entries containing information about each read pool node of
// the read pool.
repeated ConnectPoolNodeConfig nodes = 64
[(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Output only. mdx_protocol_support controls how the client uses
// metadata exchange when connecting to the instance. The values in the list
// representing parts of the MDX protocol that are supported by this instance.
// When the list is empty, the instance does not support MDX, so the client
// must not send an MDX request. The default is empty.
repeated MdxProtocolSupport mdx_protocol_support = 39 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = OPTIONAL
];
}
// Ephemeral certificate creation request.
message GenerateEphemeralCertRequest {
// Cloud SQL instance ID. This does not include the project ID.
string instance = 1;
// Project ID of the project that contains the instance.
string project = 2;
// PEM encoded public key to include in the signed certificate.
string public_key = 3 [json_name = "public_key"];
// Optional. Access token to include in the signed certificate.
string access_token = 4
[json_name = "access_token", (google.api.field_behavior) = OPTIONAL];
// Optional. Optional snapshot read timestamp to trade freshness for
// performance.
google.protobuf.Timestamp read_time = 7
[(google.api.field_behavior) = OPTIONAL];
// Optional. If set, it will contain the cert valid duration.
google.protobuf.Duration valid_duration = 12
[(google.api.field_behavior) = OPTIONAL];
}
// Ephemeral certificate creation request.
message GenerateEphemeralCertResponse {
// Generated cert
SslCert ephemeral_cert = 1;
}