google-cloud-sql-v1 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/sql/v1/cloud_sql_connect_pb.rb +2 -1
- data/lib/google/cloud/sql/v1/cloud_sql_connect_services_pb.rb +3 -0
- data/lib/google/cloud/sql/v1/cloud_sql_instances_pb.rb +1 -1
- data/lib/google/cloud/sql/v1/cloud_sql_resources_pb.rb +3 -1
- data/lib/google/cloud/sql/v1/cloud_sql_users_pb.rb +1 -1
- data/lib/google/cloud/sql/v1/sql_backups_service/paths.rb +19 -0
- data/lib/google/cloud/sql/v1/sql_connect_service/client.rb +98 -0
- data/lib/google/cloud/sql/v1/sql_connect_service/rest/client.rb +88 -0
- data/lib/google/cloud/sql/v1/sql_connect_service/rest/service_stub.rb +62 -0
- data/lib/google/cloud/sql/v1/sql_instances_service/client.rb +7 -1
- data/lib/google/cloud/sql/v1/sql_instances_service/paths.rb +19 -0
- data/lib/google/cloud/sql/v1/sql_instances_service/rest/client.rb +7 -1
- data/lib/google/cloud/sql/v1/version.rb +1 -1
- data/proto_docs/google/cloud/sql/v1/cloud_sql_connect.rb +16 -0
- data/proto_docs/google/cloud/sql/v1/cloud_sql_instances.rb +9 -1
- data/proto_docs/google/cloud/sql/v1/cloud_sql_resources.rb +126 -14
- data/proto_docs/google/cloud/sql/v1/cloud_sql_users.rb +4 -0
- metadata +5 -5
|
@@ -290,6 +290,97 @@ module Google
|
|
|
290
290
|
raise ::Google::Cloud::Error.from_error(e)
|
|
291
291
|
end
|
|
292
292
|
|
|
293
|
+
##
|
|
294
|
+
# Retrieves connect settings about a Cloud SQL instance using the instance
|
|
295
|
+
# DNS name.
|
|
296
|
+
#
|
|
297
|
+
# @overload resolve_connect_settings(request, options = nil)
|
|
298
|
+
# Pass arguments to `resolve_connect_settings` via a request object, either of type
|
|
299
|
+
# {::Google::Cloud::Sql::V1::ResolveConnectSettingsRequest} or an equivalent Hash.
|
|
300
|
+
#
|
|
301
|
+
# @param request [::Google::Cloud::Sql::V1::ResolveConnectSettingsRequest, ::Hash]
|
|
302
|
+
# A request object representing the call parameters. Required. To specify no
|
|
303
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
304
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
305
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
306
|
+
#
|
|
307
|
+
# @overload resolve_connect_settings(dns_name: nil, location: nil)
|
|
308
|
+
# Pass arguments to `resolve_connect_settings` via keyword arguments. Note that at
|
|
309
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
310
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
311
|
+
#
|
|
312
|
+
# @param dns_name [::String]
|
|
313
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
|
314
|
+
# @param location [::String]
|
|
315
|
+
# Required. The region of the instance.
|
|
316
|
+
#
|
|
317
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
318
|
+
# @yieldparam response [::Google::Cloud::Sql::V1::ConnectSettings]
|
|
319
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
320
|
+
#
|
|
321
|
+
# @return [::Google::Cloud::Sql::V1::ConnectSettings]
|
|
322
|
+
#
|
|
323
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
324
|
+
#
|
|
325
|
+
# @example Basic example
|
|
326
|
+
# require "google/cloud/sql/v1"
|
|
327
|
+
#
|
|
328
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
329
|
+
# client = Google::Cloud::Sql::V1::SqlConnectService::Client.new
|
|
330
|
+
#
|
|
331
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
332
|
+
# request = Google::Cloud::Sql::V1::ResolveConnectSettingsRequest.new
|
|
333
|
+
#
|
|
334
|
+
# # Call the resolve_connect_settings method.
|
|
335
|
+
# result = client.resolve_connect_settings request
|
|
336
|
+
#
|
|
337
|
+
# # The returned object is of type Google::Cloud::Sql::V1::ConnectSettings.
|
|
338
|
+
# p result
|
|
339
|
+
#
|
|
340
|
+
def resolve_connect_settings request, options = nil
|
|
341
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
342
|
+
|
|
343
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::ResolveConnectSettingsRequest
|
|
344
|
+
|
|
345
|
+
# Converts hash and nil to an options object
|
|
346
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
347
|
+
|
|
348
|
+
# Customize the options with defaults
|
|
349
|
+
metadata = @config.rpcs.resolve_connect_settings.metadata.to_h
|
|
350
|
+
|
|
351
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
352
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
353
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
354
|
+
gapic_version: ::Google::Cloud::Sql::V1::VERSION
|
|
355
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
356
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
357
|
+
|
|
358
|
+
header_params = {}
|
|
359
|
+
if request.location
|
|
360
|
+
header_params["location"] = request.location
|
|
361
|
+
end
|
|
362
|
+
if request.dns_name
|
|
363
|
+
header_params["dns_name"] = request.dns_name
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
367
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
368
|
+
|
|
369
|
+
options.apply_defaults timeout: @config.rpcs.resolve_connect_settings.timeout,
|
|
370
|
+
metadata: metadata,
|
|
371
|
+
retry_policy: @config.rpcs.resolve_connect_settings.retry_policy
|
|
372
|
+
|
|
373
|
+
options.apply_defaults timeout: @config.timeout,
|
|
374
|
+
metadata: @config.metadata,
|
|
375
|
+
retry_policy: @config.retry_policy
|
|
376
|
+
|
|
377
|
+
@sql_connect_service_stub.call_rpc :resolve_connect_settings, request, options: options do |response, operation|
|
|
378
|
+
yield response, operation if block_given?
|
|
379
|
+
end
|
|
380
|
+
rescue ::GRPC::BadStatus => e
|
|
381
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
382
|
+
end
|
|
383
|
+
|
|
293
384
|
##
|
|
294
385
|
# Generates a short-lived X509 certificate containing the provided public key
|
|
295
386
|
# and signed by a private key specific to the target instance. Users may use
|
|
@@ -583,6 +674,11 @@ module Google
|
|
|
583
674
|
#
|
|
584
675
|
attr_reader :get_connect_settings
|
|
585
676
|
##
|
|
677
|
+
# RPC-specific configuration for `resolve_connect_settings`
|
|
678
|
+
# @return [::Gapic::Config::Method]
|
|
679
|
+
#
|
|
680
|
+
attr_reader :resolve_connect_settings
|
|
681
|
+
##
|
|
586
682
|
# RPC-specific configuration for `generate_ephemeral_cert`
|
|
587
683
|
# @return [::Gapic::Config::Method]
|
|
588
684
|
#
|
|
@@ -592,6 +688,8 @@ module Google
|
|
|
592
688
|
def initialize parent_rpcs = nil
|
|
593
689
|
get_connect_settings_config = parent_rpcs.get_connect_settings if parent_rpcs.respond_to? :get_connect_settings
|
|
594
690
|
@get_connect_settings = ::Gapic::Config::Method.new get_connect_settings_config
|
|
691
|
+
resolve_connect_settings_config = parent_rpcs.resolve_connect_settings if parent_rpcs.respond_to? :resolve_connect_settings
|
|
692
|
+
@resolve_connect_settings = ::Gapic::Config::Method.new resolve_connect_settings_config
|
|
595
693
|
generate_ephemeral_cert_config = parent_rpcs.generate_ephemeral_cert if parent_rpcs.respond_to? :generate_ephemeral_cert
|
|
596
694
|
@generate_ephemeral_cert = ::Gapic::Config::Method.new generate_ephemeral_cert_config
|
|
597
695
|
|
|
@@ -273,6 +273,87 @@ module Google
|
|
|
273
273
|
raise ::Google::Cloud::Error.from_error(e)
|
|
274
274
|
end
|
|
275
275
|
|
|
276
|
+
##
|
|
277
|
+
# Retrieves connect settings about a Cloud SQL instance using the instance
|
|
278
|
+
# DNS name.
|
|
279
|
+
#
|
|
280
|
+
# @overload resolve_connect_settings(request, options = nil)
|
|
281
|
+
# Pass arguments to `resolve_connect_settings` via a request object, either of type
|
|
282
|
+
# {::Google::Cloud::Sql::V1::ResolveConnectSettingsRequest} or an equivalent Hash.
|
|
283
|
+
#
|
|
284
|
+
# @param request [::Google::Cloud::Sql::V1::ResolveConnectSettingsRequest, ::Hash]
|
|
285
|
+
# A request object representing the call parameters. Required. To specify no
|
|
286
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
287
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
288
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
289
|
+
#
|
|
290
|
+
# @overload resolve_connect_settings(dns_name: nil, location: nil)
|
|
291
|
+
# Pass arguments to `resolve_connect_settings` via keyword arguments. Note that at
|
|
292
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
293
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
294
|
+
#
|
|
295
|
+
# @param dns_name [::String]
|
|
296
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
|
297
|
+
# @param location [::String]
|
|
298
|
+
# Required. The region of the instance.
|
|
299
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
300
|
+
# @yieldparam result [::Google::Cloud::Sql::V1::ConnectSettings]
|
|
301
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
302
|
+
#
|
|
303
|
+
# @return [::Google::Cloud::Sql::V1::ConnectSettings]
|
|
304
|
+
#
|
|
305
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
306
|
+
#
|
|
307
|
+
# @example Basic example
|
|
308
|
+
# require "google/cloud/sql/v1"
|
|
309
|
+
#
|
|
310
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
311
|
+
# client = Google::Cloud::Sql::V1::SqlConnectService::Rest::Client.new
|
|
312
|
+
#
|
|
313
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
314
|
+
# request = Google::Cloud::Sql::V1::ResolveConnectSettingsRequest.new
|
|
315
|
+
#
|
|
316
|
+
# # Call the resolve_connect_settings method.
|
|
317
|
+
# result = client.resolve_connect_settings request
|
|
318
|
+
#
|
|
319
|
+
# # The returned object is of type Google::Cloud::Sql::V1::ConnectSettings.
|
|
320
|
+
# p result
|
|
321
|
+
#
|
|
322
|
+
def resolve_connect_settings request, options = nil
|
|
323
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
324
|
+
|
|
325
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::ResolveConnectSettingsRequest
|
|
326
|
+
|
|
327
|
+
# Converts hash and nil to an options object
|
|
328
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
329
|
+
|
|
330
|
+
# Customize the options with defaults
|
|
331
|
+
call_metadata = @config.rpcs.resolve_connect_settings.metadata.to_h
|
|
332
|
+
|
|
333
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
334
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
335
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
336
|
+
gapic_version: ::Google::Cloud::Sql::V1::VERSION,
|
|
337
|
+
transports_version_send: [:rest]
|
|
338
|
+
|
|
339
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
340
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
341
|
+
|
|
342
|
+
options.apply_defaults timeout: @config.rpcs.resolve_connect_settings.timeout,
|
|
343
|
+
metadata: call_metadata,
|
|
344
|
+
retry_policy: @config.rpcs.resolve_connect_settings.retry_policy
|
|
345
|
+
|
|
346
|
+
options.apply_defaults timeout: @config.timeout,
|
|
347
|
+
metadata: @config.metadata,
|
|
348
|
+
retry_policy: @config.retry_policy
|
|
349
|
+
|
|
350
|
+
@sql_connect_service_stub.resolve_connect_settings request, options do |result, operation|
|
|
351
|
+
yield result, operation if block_given?
|
|
352
|
+
end
|
|
353
|
+
rescue ::Gapic::Rest::Error => e
|
|
354
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
355
|
+
end
|
|
356
|
+
|
|
276
357
|
##
|
|
277
358
|
# Generates a short-lived X509 certificate containing the provided public key
|
|
278
359
|
# and signed by a private key specific to the target instance. Users may use
|
|
@@ -519,6 +600,11 @@ module Google
|
|
|
519
600
|
#
|
|
520
601
|
attr_reader :get_connect_settings
|
|
521
602
|
##
|
|
603
|
+
# RPC-specific configuration for `resolve_connect_settings`
|
|
604
|
+
# @return [::Gapic::Config::Method]
|
|
605
|
+
#
|
|
606
|
+
attr_reader :resolve_connect_settings
|
|
607
|
+
##
|
|
522
608
|
# RPC-specific configuration for `generate_ephemeral_cert`
|
|
523
609
|
# @return [::Gapic::Config::Method]
|
|
524
610
|
#
|
|
@@ -528,6 +614,8 @@ module Google
|
|
|
528
614
|
def initialize parent_rpcs = nil
|
|
529
615
|
get_connect_settings_config = parent_rpcs.get_connect_settings if parent_rpcs.respond_to? :get_connect_settings
|
|
530
616
|
@get_connect_settings = ::Gapic::Config::Method.new get_connect_settings_config
|
|
617
|
+
resolve_connect_settings_config = parent_rpcs.resolve_connect_settings if parent_rpcs.respond_to? :resolve_connect_settings
|
|
618
|
+
@resolve_connect_settings = ::Gapic::Config::Method.new resolve_connect_settings_config
|
|
531
619
|
generate_ephemeral_cert_config = parent_rpcs.generate_ephemeral_cert if parent_rpcs.respond_to? :generate_ephemeral_cert
|
|
532
620
|
@generate_ephemeral_cert = ::Gapic::Config::Method.new generate_ephemeral_cert_config
|
|
533
621
|
|
|
@@ -113,6 +113,46 @@ module Google
|
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
##
|
|
117
|
+
# Baseline implementation for the resolve_connect_settings REST call
|
|
118
|
+
#
|
|
119
|
+
# @param request_pb [::Google::Cloud::Sql::V1::ResolveConnectSettingsRequest]
|
|
120
|
+
# A request object representing the call parameters. Required.
|
|
121
|
+
# @param options [::Gapic::CallOptions]
|
|
122
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
123
|
+
#
|
|
124
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
125
|
+
# @yieldparam result [::Google::Cloud::Sql::V1::ConnectSettings]
|
|
126
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
127
|
+
#
|
|
128
|
+
# @return [::Google::Cloud::Sql::V1::ConnectSettings]
|
|
129
|
+
# A result object deserialized from the server's reply
|
|
130
|
+
def resolve_connect_settings request_pb, options = nil
|
|
131
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
132
|
+
|
|
133
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_resolve_connect_settings_request request_pb
|
|
134
|
+
query_string_params = if query_string_params.any?
|
|
135
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
136
|
+
else
|
|
137
|
+
{}
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
response = @client_stub.make_http_request(
|
|
141
|
+
verb,
|
|
142
|
+
uri: uri,
|
|
143
|
+
body: body || "",
|
|
144
|
+
params: query_string_params,
|
|
145
|
+
method_name: "resolve_connect_settings",
|
|
146
|
+
options: options
|
|
147
|
+
)
|
|
148
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
149
|
+
result = ::Google::Cloud::Sql::V1::ConnectSettings.decode_json response.body, ignore_unknown_fields: true
|
|
150
|
+
catch :response do
|
|
151
|
+
yield result, operation if block_given?
|
|
152
|
+
result
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
116
156
|
##
|
|
117
157
|
# Baseline implementation for the generate_ephemeral_cert REST call
|
|
118
158
|
#
|
|
@@ -175,6 +215,28 @@ module Google
|
|
|
175
215
|
transcoder.transcode request_pb
|
|
176
216
|
end
|
|
177
217
|
|
|
218
|
+
##
|
|
219
|
+
# @private
|
|
220
|
+
#
|
|
221
|
+
# GRPC transcoding helper method for the resolve_connect_settings REST call
|
|
222
|
+
#
|
|
223
|
+
# @param request_pb [::Google::Cloud::Sql::V1::ResolveConnectSettingsRequest]
|
|
224
|
+
# A request object representing the call parameters. Required.
|
|
225
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
226
|
+
# Uri, Body, Query string parameters
|
|
227
|
+
def self.transcode_resolve_connect_settings_request request_pb
|
|
228
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
229
|
+
.with_bindings(
|
|
230
|
+
uri_method: :get,
|
|
231
|
+
uri_template: "/v1/locations/{location}/dns/{dns_name}:resolveConnectSettings",
|
|
232
|
+
matches: [
|
|
233
|
+
["location", %r{^[^/]+/?$}, false],
|
|
234
|
+
["dns_name", %r{^[^/]+/?$}, false]
|
|
235
|
+
]
|
|
236
|
+
)
|
|
237
|
+
transcoder.transcode request_pb
|
|
238
|
+
end
|
|
239
|
+
|
|
178
240
|
##
|
|
179
241
|
# @private
|
|
180
242
|
#
|
|
@@ -1814,7 +1814,7 @@ module Google
|
|
|
1814
1814
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1815
1815
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1816
1816
|
#
|
|
1817
|
-
# @overload patch(instance: nil, project: nil, body: nil)
|
|
1817
|
+
# @overload patch(instance: nil, project: nil, reconcile_psc_networking: nil, reconcile_psc_networking_force: nil, body: nil)
|
|
1818
1818
|
# Pass arguments to `patch` via keyword arguments. Note that at
|
|
1819
1819
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1820
1820
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -1823,6 +1823,12 @@ module Google
|
|
|
1823
1823
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
1824
1824
|
# @param project [::String]
|
|
1825
1825
|
# Project ID of the project that contains the instance.
|
|
1826
|
+
# @param reconcile_psc_networking [::Boolean]
|
|
1827
|
+
# Optional. Set PSC config to the same value as the existing config to
|
|
1828
|
+
# reconcile the PSC networking.
|
|
1829
|
+
# @param reconcile_psc_networking_force [::Boolean]
|
|
1830
|
+
# Optional. Set PSC config to the same value as the existing config and force
|
|
1831
|
+
# reconcile the PSC networking.
|
|
1826
1832
|
# @param body [::Google::Cloud::Sql::V1::DatabaseInstance, ::Hash]
|
|
1827
1833
|
#
|
|
1828
1834
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
@@ -86,6 +86,25 @@ module Google
|
|
|
86
86
|
"projects/#{project}/global/networks/#{network}"
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
+
##
|
|
90
|
+
# Create a fully-qualified ServiceConnectionPolicy resource string.
|
|
91
|
+
#
|
|
92
|
+
# The resource will be in the following format:
|
|
93
|
+
#
|
|
94
|
+
# `projects/{project}/regions/{region}/serviceConnectionPolicies/{service_connection_policy}`
|
|
95
|
+
#
|
|
96
|
+
# @param project [String]
|
|
97
|
+
# @param region [String]
|
|
98
|
+
# @param service_connection_policy [String]
|
|
99
|
+
#
|
|
100
|
+
# @return [::String]
|
|
101
|
+
def service_connection_policy_path project:, region:, service_connection_policy:
|
|
102
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
103
|
+
raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"
|
|
104
|
+
|
|
105
|
+
"projects/#{project}/regions/#{region}/serviceConnectionPolicies/#{service_connection_policy}"
|
|
106
|
+
end
|
|
107
|
+
|
|
89
108
|
extend self
|
|
90
109
|
end
|
|
91
110
|
end
|
|
@@ -1643,7 +1643,7 @@ module Google
|
|
|
1643
1643
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1644
1644
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1645
1645
|
#
|
|
1646
|
-
# @overload patch(instance: nil, project: nil, body: nil)
|
|
1646
|
+
# @overload patch(instance: nil, project: nil, reconcile_psc_networking: nil, reconcile_psc_networking_force: nil, body: nil)
|
|
1647
1647
|
# Pass arguments to `patch` via keyword arguments. Note that at
|
|
1648
1648
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1649
1649
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -1652,6 +1652,12 @@ module Google
|
|
|
1652
1652
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
1653
1653
|
# @param project [::String]
|
|
1654
1654
|
# Project ID of the project that contains the instance.
|
|
1655
|
+
# @param reconcile_psc_networking [::Boolean]
|
|
1656
|
+
# Optional. Set PSC config to the same value as the existing config to
|
|
1657
|
+
# reconcile the PSC networking.
|
|
1658
|
+
# @param reconcile_psc_networking_force [::Boolean]
|
|
1659
|
+
# Optional. Set PSC config to the same value as the existing config and force
|
|
1660
|
+
# reconcile the PSC networking.
|
|
1655
1661
|
# @param body [::Google::Cloud::Sql::V1::DatabaseInstance, ::Hash]
|
|
1656
1662
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1657
1663
|
# @yieldparam result [::Google::Cloud::Sql::V1::Operation]
|
|
@@ -37,6 +37,18 @@ module Google
|
|
|
37
37
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
# Connect settings retrieval request.
|
|
41
|
+
# @!attribute [rw] dns_name
|
|
42
|
+
# @return [::String]
|
|
43
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
|
44
|
+
# @!attribute [rw] location
|
|
45
|
+
# @return [::String]
|
|
46
|
+
# Required. The region of the instance.
|
|
47
|
+
class ResolveConnectSettingsRequest
|
|
48
|
+
include ::Google::Protobuf::MessageExts
|
|
49
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
50
|
+
end
|
|
51
|
+
|
|
40
52
|
# Connect settings retrieval response.
|
|
41
53
|
# @!attribute [rw] kind
|
|
42
54
|
# @return [::String]
|
|
@@ -99,6 +111,10 @@ module Google
|
|
|
99
111
|
# representing parts of the MDX protocol that are supported by this instance.
|
|
100
112
|
# When the list is empty, the instance does not support MDX, so the client
|
|
101
113
|
# must not send an MDX request. The default is empty.
|
|
114
|
+
# @!attribute [r] connection_name
|
|
115
|
+
# @return [::String]
|
|
116
|
+
# Optional. Output only. Connection name of the Cloud SQL instance used in
|
|
117
|
+
# connection strings, in the format project:region:instance.
|
|
102
118
|
class ConnectSettings
|
|
103
119
|
include ::Google::Protobuf::MessageExts
|
|
104
120
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -269,6 +269,14 @@ module Google
|
|
|
269
269
|
# @!attribute [rw] project
|
|
270
270
|
# @return [::String]
|
|
271
271
|
# Project ID of the project that contains the instance.
|
|
272
|
+
# @!attribute [rw] reconcile_psc_networking
|
|
273
|
+
# @return [::Boolean]
|
|
274
|
+
# Optional. Set PSC config to the same value as the existing config to
|
|
275
|
+
# reconcile the PSC networking.
|
|
276
|
+
# @!attribute [rw] reconcile_psc_networking_force
|
|
277
|
+
# @return [::Boolean]
|
|
278
|
+
# Optional. Set PSC config to the same value as the existing config and force
|
|
279
|
+
# reconcile the PSC networking.
|
|
272
280
|
# @!attribute [rw] body
|
|
273
281
|
# @return [::Google::Cloud::Sql::V1::DatabaseInstance]
|
|
274
282
|
class SqlInstancesPatchRequest
|
|
@@ -1042,7 +1050,7 @@ module Google
|
|
|
1042
1050
|
# @!attribute [rw] destination_network
|
|
1043
1051
|
# @return [::String]
|
|
1044
1052
|
# Optional. The fully qualified URI of the VPC network to which the cloned
|
|
1045
|
-
# instance will be connected via
|
|
1053
|
+
# instance will be connected via private services access for private IP. For
|
|
1046
1054
|
# example:`projects/my-network-project/global/networks/my-network`. This
|
|
1047
1055
|
# field is only required for cross-project cloning.
|
|
1048
1056
|
class CloneContext
|
|
@@ -117,8 +117,12 @@ module Google
|
|
|
117
117
|
# (MySQL only) Whether binary log is enabled. If backup configuration is
|
|
118
118
|
# disabled, binarylog must be disabled as well.
|
|
119
119
|
# @!attribute [rw] replication_log_archiving_enabled
|
|
120
|
+
# @deprecated This field is deprecated and may be removed in the next major version update.
|
|
120
121
|
# @return [::Google::Protobuf::BoolValue]
|
|
121
|
-
#
|
|
122
|
+
# Optional. Deprecated: replication_log_archiving_enabled is deprecated and
|
|
123
|
+
# will be removed from a future version of the API. Use
|
|
124
|
+
# {::Google::Cloud::Sql::V1::BackupConfiguration#point_in_time_recovery_enabled point_in_time_recovery_enabled}
|
|
125
|
+
# instead.
|
|
122
126
|
# @!attribute [rw] location
|
|
123
127
|
# @return [::String]
|
|
124
128
|
# Location of the backup
|
|
@@ -961,20 +965,24 @@ module Google
|
|
|
961
965
|
# format: projects/PROJECT/regions/REGION/networkAttachments/ID
|
|
962
966
|
# @!attribute [rw] psc_auto_dns_enabled
|
|
963
967
|
# @return [::Boolean]
|
|
964
|
-
# Optional. Indicates whether
|
|
965
|
-
# instance. When enabled, Cloud SQL provisions a universal
|
|
966
|
-
# all networks configured with Private Service Connect
|
|
967
|
-
# auto-connections. This will default to true for new instances when
|
|
968
|
-
# Service Connect is enabled.
|
|
968
|
+
# Optional. Indicates whether Private Service Connect DNS automation is
|
|
969
|
+
# enabled for this instance. When enabled, Cloud SQL provisions a universal
|
|
970
|
+
# DNS record across all networks configured with Private Service Connect
|
|
971
|
+
# auto-connections. This will default to true for new instances when
|
|
972
|
+
# Private Service Connect is enabled.
|
|
969
973
|
# @!attribute [rw] psc_write_endpoint_dns_enabled
|
|
970
974
|
# @return [::Boolean]
|
|
971
|
-
# Optional. Indicates whether
|
|
972
|
-
# for this instance. When enabled, Cloud SQL provisions
|
|
973
|
-
# DNS record across all networks configured with Private
|
|
974
|
-
#
|
|
975
|
-
# This feature is only supported for Enterprise Plus edition.
|
|
976
|
-
#
|
|
975
|
+
# Optional. Indicates whether Private Service Connect write endpoint DNS
|
|
976
|
+
# automation is enabled for this instance. When enabled, Cloud SQL provisions
|
|
977
|
+
# a universal global DNS record across all networks configured with Private
|
|
978
|
+
# Service Connect auto-connections that points to the cluster primary
|
|
979
|
+
# instance. This feature is only supported for Enterprise Plus edition. This
|
|
980
|
+
# will default to true for new Enterprise Plus instances when
|
|
977
981
|
# `psc_auto_dns_enabled` is enabled.
|
|
982
|
+
# @!attribute [rw] psc_auto_connection_policy_enabled
|
|
983
|
+
# @return [::Boolean]
|
|
984
|
+
# Optional. Whether to set up the PSC service connection policy
|
|
985
|
+
# automatically.
|
|
978
986
|
class PscConfig
|
|
979
987
|
include ::Google::Protobuf::MessageExts
|
|
980
988
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -1007,6 +1015,23 @@ module Google
|
|
|
1007
1015
|
# @!attribute [rw] consumer_network_status
|
|
1008
1016
|
# @return [::String]
|
|
1009
1017
|
# The connection policy status of the consumer network.
|
|
1018
|
+
# @!attribute [r] service_connection_policy
|
|
1019
|
+
# @return [::String]
|
|
1020
|
+
# Output only. The service connection policy created automatically for the
|
|
1021
|
+
# consumer network when `psc_auto_connection_policy_enabled` is true. It is
|
|
1022
|
+
# in the format of:
|
|
1023
|
+
# `projects/{project}/regions/{region}/serviceConnectionPolicies/{policy_id}`
|
|
1024
|
+
# The `policy_id` is in format of `$NETWORK-$RANDOM`.
|
|
1025
|
+
# @!attribute [r] service_connection_policy_creation_result
|
|
1026
|
+
# @return [::String]
|
|
1027
|
+
# Output only. The status of service connection policy creation.
|
|
1028
|
+
# @!attribute [r] instance_auto_dns_status
|
|
1029
|
+
# @return [::Google::Cloud::Sql::V1::AutoDnsStatus]
|
|
1030
|
+
# Output only. The status of automated DNS provisioning.
|
|
1031
|
+
# @!attribute [r] write_endpoint_auto_dns_status
|
|
1032
|
+
# @return [::Google::Cloud::Sql::V1::AutoDnsStatus]
|
|
1033
|
+
# Output only. The status of automated DNS provisioning for the write
|
|
1034
|
+
# endpoint.
|
|
1010
1035
|
class PscAutoConnectionConfig
|
|
1011
1036
|
include ::Google::Protobuf::MessageExts
|
|
1012
1037
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
@@ -1480,6 +1505,11 @@ module Google
|
|
|
1480
1505
|
|
|
1481
1506
|
# Pre-checks the major version upgrade operation.
|
|
1482
1507
|
PRE_CHECK_MAJOR_VERSION_UPGRADE = 54
|
|
1508
|
+
|
|
1509
|
+
# This operation type represents individual steps in a multi-step setup
|
|
1510
|
+
# migration workflow: including configuration, replication,
|
|
1511
|
+
# switchover/back, and data reseeding, as defined by operation's intent.
|
|
1512
|
+
SETUP_MIGRATION = 55
|
|
1483
1513
|
end
|
|
1484
1514
|
|
|
1485
1515
|
# The status of an operation.
|
|
@@ -1711,7 +1741,7 @@ module Google
|
|
|
1711
1741
|
# SQL Server specific audit configuration.
|
|
1712
1742
|
# @!attribute [rw] edition
|
|
1713
1743
|
# @return [::Google::Cloud::Sql::V1::Settings::Edition]
|
|
1714
|
-
# Optional. The edition of the instance.
|
|
1744
|
+
# Optional. The edition type of the Cloud SQL instance.
|
|
1715
1745
|
# @!attribute [rw] connector_enforcement
|
|
1716
1746
|
# @return [::Google::Cloud::Sql::V1::Settings::ConnectorEnforcement]
|
|
1717
1747
|
# Specifies if connections must use Cloud SQL connectors.
|
|
@@ -1823,7 +1853,7 @@ module Google
|
|
|
1823
1853
|
ON_DEMAND = 3
|
|
1824
1854
|
end
|
|
1825
1855
|
|
|
1826
|
-
# The
|
|
1856
|
+
# The list of Cloud SQL editions available to users.
|
|
1827
1857
|
module Edition
|
|
1828
1858
|
# The instance did not specify the edition.
|
|
1829
1859
|
EDITION_UNSPECIFIED = 0
|
|
@@ -1833,6 +1863,9 @@ module Google
|
|
|
1833
1863
|
|
|
1834
1864
|
# The instance is an Enterprise Plus edition.
|
|
1835
1865
|
ENTERPRISE_PLUS = 3
|
|
1866
|
+
|
|
1867
|
+
# This instance is a Cloud SQL developer edition instance.
|
|
1868
|
+
DEVELOPER = 5
|
|
1836
1869
|
end
|
|
1837
1870
|
|
|
1838
1871
|
# The options for enforcing Cloud SQL connectors in the instance.
|
|
@@ -1888,9 +1921,70 @@ module Google
|
|
|
1888
1921
|
# @return [::Integer]
|
|
1889
1922
|
# Optional. Specifies the amount of time in seconds that a transaction needs
|
|
1890
1923
|
# to have been open before the watcher starts recording it.
|
|
1924
|
+
# @!attribute [rw] cpu_utilization_threshold_percent
|
|
1925
|
+
# @return [::Integer]
|
|
1926
|
+
# Optional. Specifies the minimum percentage of CPU utilization to trigger
|
|
1927
|
+
# the performance capture. Valid integers range from `10` to `99`. Enter `0`
|
|
1928
|
+
# to disable the check.
|
|
1929
|
+
# @!attribute [rw] memory_usage_threshold_percent
|
|
1930
|
+
# @return [::Integer]
|
|
1931
|
+
# Optional. Specifies the minimum percentage of memory usage to trigger the
|
|
1932
|
+
# performance capture.
|
|
1933
|
+
# Valid integers range from `10` to `99`. Enter `0` to disable the check.
|
|
1934
|
+
# @!attribute [rw] transaction_lock_wait_threshold_count
|
|
1935
|
+
# @return [::Integer]
|
|
1936
|
+
# Optional. Specifies the minimum allowed number of transactions in lock wait
|
|
1937
|
+
# state to trigger the performance capture. Valid integers range from `10` to
|
|
1938
|
+
# `10000`. Enter `0` to disable the check.
|
|
1939
|
+
# @!attribute [rw] semaphore_wait_threshold_count
|
|
1940
|
+
# @return [::Integer]
|
|
1941
|
+
# Optional. Specifies the minimum allowed number of semaphore waits to
|
|
1942
|
+
# trigger the performance capture. Valid integers range from `10` to `10000`.
|
|
1943
|
+
# Enter `0` to disable the check.
|
|
1944
|
+
# @!attribute [rw] history_list_length_threshold_count
|
|
1945
|
+
# @return [::Integer]
|
|
1946
|
+
# Optional. Specifies the minimum number of undo log entries in the history
|
|
1947
|
+
# list length to trigger the performance capture. Valid integers range from
|
|
1948
|
+
# `10000` to `10000000`. Enter `0` to disable the check.
|
|
1949
|
+
# @!attribute [rw] transaction_kill_threshold_seconds
|
|
1950
|
+
# @return [::Integer]
|
|
1951
|
+
# Optional. Specifies the amount of time in seconds that a transaction needs
|
|
1952
|
+
# to have been open before the watcher starts terminating it. Valid integers
|
|
1953
|
+
# range from `60` to `604800` (7 days). Enter `0` to disable. If enabled
|
|
1954
|
+
# (i.e., > 0), this value must be greater than or equal to
|
|
1955
|
+
# `transaction_duration_threshold`. Configurations where
|
|
1956
|
+
# `0 < transaction_kill_threshold_seconds < transaction_duration_threshold`
|
|
1957
|
+
# will be rejected.
|
|
1958
|
+
# @!attribute [rw] transaction_kill_excluded_user_hosts
|
|
1959
|
+
# @return [::Array<::String>]
|
|
1960
|
+
# Optional. Specifies a customer-defined list of users to exclude from
|
|
1961
|
+
# transaction termination. Entries can be in the format 'user@host' or just
|
|
1962
|
+
# 'user'. A standalone 'user' implies 'user@%', excluding the user from any
|
|
1963
|
+
# host. Wildcard '%' is allowed in the host part of the 'user@host' format.
|
|
1964
|
+
# Example: `["app_user", "db_admin@10.1.2.3", "report_user@%"]`
|
|
1965
|
+
# @!attribute [rw] transaction_kill_type
|
|
1966
|
+
# @return [::Google::Cloud::Sql::V1::PerformanceCaptureConfig::TransactionKillType]
|
|
1967
|
+
# Optional. Determines which transactions are allowed to be terminated when
|
|
1968
|
+
# they exceed `transaction_kill_threshold_seconds`. This allows protecting
|
|
1969
|
+
# write-heavy transactions from auto-termination if desired. Defaults to
|
|
1970
|
+
# `READ_ONLY_TRANSACTIONS` if unspecified.
|
|
1891
1971
|
class PerformanceCaptureConfig
|
|
1892
1972
|
include ::Google::Protobuf::MessageExts
|
|
1893
1973
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
1974
|
+
|
|
1975
|
+
# Defines the categories of long-running transactions eligible for automatic
|
|
1976
|
+
# termination by the Performance Capture.
|
|
1977
|
+
module TransactionKillType
|
|
1978
|
+
# Unspecified.
|
|
1979
|
+
TRANSACTION_KILL_TYPE_UNSPECIFIED = 0
|
|
1980
|
+
|
|
1981
|
+
# Only read-only transactions are eligible for termination.
|
|
1982
|
+
READ_ONLY_TRANSACTIONS = 1
|
|
1983
|
+
|
|
1984
|
+
# All transactions are eligible for termination, including those with write
|
|
1985
|
+
# operations (such as INSERT, UPDATE, DELETE, or DDL).
|
|
1986
|
+
ALL_TRANSACTIONS = 2
|
|
1987
|
+
end
|
|
1894
1988
|
end
|
|
1895
1989
|
|
|
1896
1990
|
# Connection pool flags for Cloud SQL instances managed connection pool
|
|
@@ -2405,6 +2499,9 @@ module Google
|
|
|
2405
2499
|
# The database version is PostgreSQL 19.
|
|
2406
2500
|
POSTGRES_19 = 684
|
|
2407
2501
|
|
|
2502
|
+
# The database version is PostgreSQL 20.
|
|
2503
|
+
POSTGRES_20 = 781
|
|
2504
|
+
|
|
2408
2505
|
# The database version is SQL Server 2019 Standard.
|
|
2409
2506
|
SQLSERVER_2019_STANDARD = 26
|
|
2410
2507
|
|
|
@@ -2516,6 +2613,21 @@ module Google
|
|
|
2516
2613
|
# after the notification is sent out.
|
|
2517
2614
|
3
|
|
2518
2615
|
end
|
|
2616
|
+
|
|
2617
|
+
# The status of automated DNS provisioning.
|
|
2618
|
+
module AutoDnsStatus
|
|
2619
|
+
# Unspecified status. This means status is missing from dependency service.
|
|
2620
|
+
AUTO_DNS_STATUS_UNSPECIFIED = 0
|
|
2621
|
+
|
|
2622
|
+
# DNS provisioning is OK.
|
|
2623
|
+
AUTO_DNS_OK = 1
|
|
2624
|
+
|
|
2625
|
+
# DNS provisioning failed.
|
|
2626
|
+
AUTO_DNS_FAILED = 2
|
|
2627
|
+
|
|
2628
|
+
# DNS provisioning status is not recognized by Cloud SQL.
|
|
2629
|
+
AUTO_DNS_UNKNOWN = 3
|
|
2630
|
+
end
|
|
2519
2631
|
end
|
|
2520
2632
|
end
|
|
2521
2633
|
end
|