google-cloud-sql-v1 0.8.0 → 0.9.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/lib/google/cloud/sql/v1/cloud_sql_instances_pb.rb +14 -1
- data/lib/google/cloud/sql/v1/cloud_sql_instances_services_pb.rb +11 -0
- data/lib/google/cloud/sql/v1/cloud_sql_resources_pb.rb +10 -1
- data/lib/google/cloud/sql/v1/cloud_sql_ssl_certs_pb.rb +6 -1
- data/lib/google/cloud/sql/v1/cloud_sql_ssl_certs_services_pb.rb +9 -0
- data/lib/google/cloud/sql/v1/cloud_sql_workload_captures_pb.rb +2 -1
- data/lib/google/cloud/sql/v1/sql_backups_service/paths.rb +17 -0
- data/lib/google/cloud/sql/v1/sql_instances_service/client.rb +409 -0
- data/lib/google/cloud/sql/v1/sql_instances_service/paths.rb +17 -0
- data/lib/google/cloud/sql/v1/sql_instances_service/rest/client.rb +369 -0
- data/lib/google/cloud/sql/v1/sql_instances_service/rest/service_stub.rb +250 -0
- data/lib/google/cloud/sql/v1/sql_ssl_certs_service/client.rb +317 -0
- data/lib/google/cloud/sql/v1/sql_ssl_certs_service/rest/client.rb +281 -0
- data/lib/google/cloud/sql/v1/sql_ssl_certs_service/rest/service_stub.rb +189 -0
- data/lib/google/cloud/sql/v1/version.rb +1 -1
- data/proto_docs/google/cloud/sql/v1/cloud_sql_instances.rb +298 -0
- data/proto_docs/google/cloud/sql/v1/cloud_sql_resources.rb +192 -0
- data/proto_docs/google/cloud/sql/v1/cloud_sql_ssl_certs.rb +69 -0
- data/proto_docs/google/cloud/sql/v1/cloud_sql_workload_captures.rb +16 -0
- metadata +1 -1
|
@@ -2324,6 +2324,194 @@ module Google
|
|
|
2324
2324
|
raise ::Google::Cloud::Error.from_error(e)
|
|
2325
2325
|
end
|
|
2326
2326
|
|
|
2327
|
+
##
|
|
2328
|
+
# Starts a Cloud SQL instance.
|
|
2329
|
+
#
|
|
2330
|
+
# @overload start(request, options = nil)
|
|
2331
|
+
# Pass arguments to `start` via a request object, either of type
|
|
2332
|
+
# {::Google::Cloud::Sql::V1::SqlInstancesStartRequest} or an equivalent Hash.
|
|
2333
|
+
#
|
|
2334
|
+
# @param request [::Google::Cloud::Sql::V1::SqlInstancesStartRequest, ::Hash]
|
|
2335
|
+
# A request object representing the call parameters. Required. To specify no
|
|
2336
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
2337
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
2338
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
2339
|
+
#
|
|
2340
|
+
# @overload start(instance: nil, project: nil, location: nil)
|
|
2341
|
+
# Pass arguments to `start` via keyword arguments. Note that at
|
|
2342
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
2343
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
2344
|
+
#
|
|
2345
|
+
# @param instance [::String]
|
|
2346
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
|
2347
|
+
# @param project [::String]
|
|
2348
|
+
# Required. Project ID of the project that contains the instance to be
|
|
2349
|
+
# started.
|
|
2350
|
+
# @param location [::String]
|
|
2351
|
+
# Optional. The region of the Cloud SQL instance, for example `us-central1`.
|
|
2352
|
+
# If omitted, the region is determined from the instance.
|
|
2353
|
+
#
|
|
2354
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
2355
|
+
# @yieldparam response [::Google::Cloud::Sql::V1::Operation]
|
|
2356
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
2357
|
+
#
|
|
2358
|
+
# @return [::Google::Cloud::Sql::V1::Operation]
|
|
2359
|
+
#
|
|
2360
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
2361
|
+
#
|
|
2362
|
+
# @example Basic example
|
|
2363
|
+
# require "google/cloud/sql/v1"
|
|
2364
|
+
#
|
|
2365
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
2366
|
+
# client = Google::Cloud::Sql::V1::SqlInstancesService::Client.new
|
|
2367
|
+
#
|
|
2368
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
2369
|
+
# request = Google::Cloud::Sql::V1::SqlInstancesStartRequest.new
|
|
2370
|
+
#
|
|
2371
|
+
# # Call the start method.
|
|
2372
|
+
# result = client.start request
|
|
2373
|
+
#
|
|
2374
|
+
# # The returned object is of type Google::Cloud::Sql::V1::Operation.
|
|
2375
|
+
# p result
|
|
2376
|
+
#
|
|
2377
|
+
def start request, options = nil
|
|
2378
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
2379
|
+
|
|
2380
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::SqlInstancesStartRequest
|
|
2381
|
+
|
|
2382
|
+
# Converts hash and nil to an options object
|
|
2383
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
2384
|
+
|
|
2385
|
+
# Customize the options with defaults
|
|
2386
|
+
metadata = @config.rpcs.start.metadata.to_h
|
|
2387
|
+
|
|
2388
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
2389
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
2390
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
2391
|
+
gapic_version: ::Google::Cloud::Sql::V1::VERSION
|
|
2392
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
2393
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
2394
|
+
|
|
2395
|
+
header_params = {}
|
|
2396
|
+
if request.project
|
|
2397
|
+
header_params["project"] = request.project
|
|
2398
|
+
end
|
|
2399
|
+
if request.instance
|
|
2400
|
+
header_params["instance"] = request.instance
|
|
2401
|
+
end
|
|
2402
|
+
|
|
2403
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
2404
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
2405
|
+
|
|
2406
|
+
options.apply_defaults timeout: @config.rpcs.start.timeout,
|
|
2407
|
+
metadata: metadata,
|
|
2408
|
+
retry_policy: @config.rpcs.start.retry_policy
|
|
2409
|
+
|
|
2410
|
+
options.apply_defaults timeout: @config.timeout,
|
|
2411
|
+
metadata: @config.metadata,
|
|
2412
|
+
retry_policy: @config.retry_policy
|
|
2413
|
+
|
|
2414
|
+
@sql_instances_service_stub.call_rpc :start, request, options: options do |response, operation|
|
|
2415
|
+
yield response, operation if block_given?
|
|
2416
|
+
end
|
|
2417
|
+
rescue ::GRPC::BadStatus => e
|
|
2418
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
2419
|
+
end
|
|
2420
|
+
|
|
2421
|
+
##
|
|
2422
|
+
# Stops a Cloud SQL instance.
|
|
2423
|
+
#
|
|
2424
|
+
# @overload stop(request, options = nil)
|
|
2425
|
+
# Pass arguments to `stop` via a request object, either of type
|
|
2426
|
+
# {::Google::Cloud::Sql::V1::SqlInstancesStopRequest} or an equivalent Hash.
|
|
2427
|
+
#
|
|
2428
|
+
# @param request [::Google::Cloud::Sql::V1::SqlInstancesStopRequest, ::Hash]
|
|
2429
|
+
# A request object representing the call parameters. Required. To specify no
|
|
2430
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
2431
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
2432
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
2433
|
+
#
|
|
2434
|
+
# @overload stop(instance: nil, project: nil, location: nil)
|
|
2435
|
+
# Pass arguments to `stop` via keyword arguments. Note that at
|
|
2436
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
2437
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
2438
|
+
#
|
|
2439
|
+
# @param instance [::String]
|
|
2440
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
|
2441
|
+
# @param project [::String]
|
|
2442
|
+
# Required. Project ID of the project that contains the instance to be
|
|
2443
|
+
# stopped.
|
|
2444
|
+
# @param location [::String]
|
|
2445
|
+
# Optional. The region of the Cloud SQL instance, for example `us-central1`.
|
|
2446
|
+
# If omitted, the region is determined from the instance.
|
|
2447
|
+
#
|
|
2448
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
2449
|
+
# @yieldparam response [::Google::Cloud::Sql::V1::Operation]
|
|
2450
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
2451
|
+
#
|
|
2452
|
+
# @return [::Google::Cloud::Sql::V1::Operation]
|
|
2453
|
+
#
|
|
2454
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
2455
|
+
#
|
|
2456
|
+
# @example Basic example
|
|
2457
|
+
# require "google/cloud/sql/v1"
|
|
2458
|
+
#
|
|
2459
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
2460
|
+
# client = Google::Cloud::Sql::V1::SqlInstancesService::Client.new
|
|
2461
|
+
#
|
|
2462
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
2463
|
+
# request = Google::Cloud::Sql::V1::SqlInstancesStopRequest.new
|
|
2464
|
+
#
|
|
2465
|
+
# # Call the stop method.
|
|
2466
|
+
# result = client.stop request
|
|
2467
|
+
#
|
|
2468
|
+
# # The returned object is of type Google::Cloud::Sql::V1::Operation.
|
|
2469
|
+
# p result
|
|
2470
|
+
#
|
|
2471
|
+
def stop request, options = nil
|
|
2472
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
2473
|
+
|
|
2474
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::SqlInstancesStopRequest
|
|
2475
|
+
|
|
2476
|
+
# Converts hash and nil to an options object
|
|
2477
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
2478
|
+
|
|
2479
|
+
# Customize the options with defaults
|
|
2480
|
+
metadata = @config.rpcs.stop.metadata.to_h
|
|
2481
|
+
|
|
2482
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
2483
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
2484
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
2485
|
+
gapic_version: ::Google::Cloud::Sql::V1::VERSION
|
|
2486
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
2487
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
2488
|
+
|
|
2489
|
+
header_params = {}
|
|
2490
|
+
if request.project
|
|
2491
|
+
header_params["project"] = request.project
|
|
2492
|
+
end
|
|
2493
|
+
if request.instance
|
|
2494
|
+
header_params["instance"] = request.instance
|
|
2495
|
+
end
|
|
2496
|
+
|
|
2497
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
2498
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
2499
|
+
|
|
2500
|
+
options.apply_defaults timeout: @config.rpcs.stop.timeout,
|
|
2501
|
+
metadata: metadata,
|
|
2502
|
+
retry_policy: @config.rpcs.stop.retry_policy
|
|
2503
|
+
|
|
2504
|
+
options.apply_defaults timeout: @config.timeout,
|
|
2505
|
+
metadata: @config.metadata,
|
|
2506
|
+
retry_policy: @config.retry_policy
|
|
2507
|
+
|
|
2508
|
+
@sql_instances_service_stub.call_rpc :stop, request, options: options do |response, operation|
|
|
2509
|
+
yield response, operation if block_given?
|
|
2510
|
+
end
|
|
2511
|
+
rescue ::GRPC::BadStatus => e
|
|
2512
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
2513
|
+
end
|
|
2514
|
+
|
|
2327
2515
|
##
|
|
2328
2516
|
# Restores a backup of a Cloud SQL instance. Using this operation might cause
|
|
2329
2517
|
# your instance to restart.
|
|
@@ -3859,6 +4047,100 @@ module Google
|
|
|
3859
4047
|
raise ::Google::Cloud::Error.from_error(e)
|
|
3860
4048
|
end
|
|
3861
4049
|
|
|
4050
|
+
##
|
|
4051
|
+
# Execute SQL statements in read-only mode.
|
|
4052
|
+
#
|
|
4053
|
+
# @overload execute_sql_read_only(request, options = nil)
|
|
4054
|
+
# Pass arguments to `execute_sql_read_only` via a request object, either of type
|
|
4055
|
+
# {::Google::Cloud::Sql::V1::SqlInstancesExecuteSqlReadOnlyRequest} or an equivalent Hash.
|
|
4056
|
+
#
|
|
4057
|
+
# @param request [::Google::Cloud::Sql::V1::SqlInstancesExecuteSqlReadOnlyRequest, ::Hash]
|
|
4058
|
+
# A request object representing the call parameters. Required. To specify no
|
|
4059
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
4060
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
4061
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
4062
|
+
#
|
|
4063
|
+
# @overload execute_sql_read_only(instance: nil, project: nil, body: nil, location: nil)
|
|
4064
|
+
# Pass arguments to `execute_sql_read_only` via keyword arguments. Note that at
|
|
4065
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
4066
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
4067
|
+
#
|
|
4068
|
+
# @param instance [::String]
|
|
4069
|
+
# Required. Database instance ID. This does not include the project ID.
|
|
4070
|
+
# @param project [::String]
|
|
4071
|
+
# Required. Project ID of the project that contains the instance.
|
|
4072
|
+
# @param body [::Google::Cloud::Sql::V1::ExecuteSqlReadOnlyPayload, ::Hash]
|
|
4073
|
+
# Required. The request body.
|
|
4074
|
+
# @param location [::String]
|
|
4075
|
+
# Optional. Region of the Cloud SQL instance.
|
|
4076
|
+
#
|
|
4077
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
4078
|
+
# @yieldparam response [::Google::Cloud::Sql::V1::SqlInstancesExecuteSqlReadOnlyResponse]
|
|
4079
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
4080
|
+
#
|
|
4081
|
+
# @return [::Google::Cloud::Sql::V1::SqlInstancesExecuteSqlReadOnlyResponse]
|
|
4082
|
+
#
|
|
4083
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
4084
|
+
#
|
|
4085
|
+
# @example Basic example
|
|
4086
|
+
# require "google/cloud/sql/v1"
|
|
4087
|
+
#
|
|
4088
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
4089
|
+
# client = Google::Cloud::Sql::V1::SqlInstancesService::Client.new
|
|
4090
|
+
#
|
|
4091
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
4092
|
+
# request = Google::Cloud::Sql::V1::SqlInstancesExecuteSqlReadOnlyRequest.new
|
|
4093
|
+
#
|
|
4094
|
+
# # Call the execute_sql_read_only method.
|
|
4095
|
+
# result = client.execute_sql_read_only request
|
|
4096
|
+
#
|
|
4097
|
+
# # The returned object is of type Google::Cloud::Sql::V1::SqlInstancesExecuteSqlReadOnlyResponse.
|
|
4098
|
+
# p result
|
|
4099
|
+
#
|
|
4100
|
+
def execute_sql_read_only request, options = nil
|
|
4101
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
4102
|
+
|
|
4103
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::SqlInstancesExecuteSqlReadOnlyRequest
|
|
4104
|
+
|
|
4105
|
+
# Converts hash and nil to an options object
|
|
4106
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
4107
|
+
|
|
4108
|
+
# Customize the options with defaults
|
|
4109
|
+
metadata = @config.rpcs.execute_sql_read_only.metadata.to_h
|
|
4110
|
+
|
|
4111
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
4112
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
4113
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
4114
|
+
gapic_version: ::Google::Cloud::Sql::V1::VERSION
|
|
4115
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
4116
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
4117
|
+
|
|
4118
|
+
header_params = {}
|
|
4119
|
+
if request.project
|
|
4120
|
+
header_params["project"] = request.project
|
|
4121
|
+
end
|
|
4122
|
+
if request.instance
|
|
4123
|
+
header_params["instance"] = request.instance
|
|
4124
|
+
end
|
|
4125
|
+
|
|
4126
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
4127
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
4128
|
+
|
|
4129
|
+
options.apply_defaults timeout: @config.rpcs.execute_sql_read_only.timeout,
|
|
4130
|
+
metadata: metadata,
|
|
4131
|
+
retry_policy: @config.rpcs.execute_sql_read_only.retry_policy
|
|
4132
|
+
|
|
4133
|
+
options.apply_defaults timeout: @config.timeout,
|
|
4134
|
+
metadata: @config.metadata,
|
|
4135
|
+
retry_policy: @config.retry_policy
|
|
4136
|
+
|
|
4137
|
+
@sql_instances_service_stub.call_rpc :execute_sql_read_only, request, options: options do |response, operation|
|
|
4138
|
+
yield response, operation if block_given?
|
|
4139
|
+
end
|
|
4140
|
+
rescue ::GRPC::BadStatus => e
|
|
4141
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
4142
|
+
end
|
|
4143
|
+
|
|
3862
4144
|
##
|
|
3863
4145
|
# Execute SQL statements.
|
|
3864
4146
|
#
|
|
@@ -4331,6 +4613,105 @@ module Google
|
|
|
4331
4613
|
raise ::Google::Cloud::Error.from_error(e)
|
|
4332
4614
|
end
|
|
4333
4615
|
|
|
4616
|
+
##
|
|
4617
|
+
# Repairs and recreates networking resources for a Cloud SQL instance. For
|
|
4618
|
+
# Private Service Connect (PSC), this operation recreates PSC DNS write
|
|
4619
|
+
# endpoints on specified VPC networks and reconciles Private Service Connect
|
|
4620
|
+
# connectivity infrastructure for the instance.
|
|
4621
|
+
#
|
|
4622
|
+
# @overload reconcile_networking(request, options = nil)
|
|
4623
|
+
# Pass arguments to `reconcile_networking` via a request object, either of type
|
|
4624
|
+
# {::Google::Cloud::Sql::V1::SqlInstancesReconcileNetworkingRequest} or an equivalent Hash.
|
|
4625
|
+
#
|
|
4626
|
+
# @param request [::Google::Cloud::Sql::V1::SqlInstancesReconcileNetworkingRequest, ::Hash]
|
|
4627
|
+
# A request object representing the call parameters. Required. To specify no
|
|
4628
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
4629
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
4630
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
4631
|
+
#
|
|
4632
|
+
# @overload reconcile_networking(instance: nil, project: nil, psc_dns: nil, location: nil)
|
|
4633
|
+
# Pass arguments to `reconcile_networking` via keyword arguments. Note that at
|
|
4634
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
4635
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
4636
|
+
#
|
|
4637
|
+
# @param instance [::String]
|
|
4638
|
+
# Required. Cloud SQL instance ID.
|
|
4639
|
+
# @param project [::String]
|
|
4640
|
+
# Required. Project ID of the project that contains the instance.
|
|
4641
|
+
# @param psc_dns [::Google::Cloud::Sql::V1::PscDnsReconcileNetworkingRequest, ::Hash]
|
|
4642
|
+
# Request to recreate Private Service Connect DNS write endpoints and
|
|
4643
|
+
# reconcile Private Service Connect connectivity infrastructure for the
|
|
4644
|
+
# instance.
|
|
4645
|
+
# @param location [::String]
|
|
4646
|
+
# Optional. Region of the Cloud SQL instance.
|
|
4647
|
+
#
|
|
4648
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
4649
|
+
# @yieldparam response [::Google::Cloud::Sql::V1::Operation]
|
|
4650
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
4651
|
+
#
|
|
4652
|
+
# @return [::Google::Cloud::Sql::V1::Operation]
|
|
4653
|
+
#
|
|
4654
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
4655
|
+
#
|
|
4656
|
+
# @example Basic example
|
|
4657
|
+
# require "google/cloud/sql/v1"
|
|
4658
|
+
#
|
|
4659
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
4660
|
+
# client = Google::Cloud::Sql::V1::SqlInstancesService::Client.new
|
|
4661
|
+
#
|
|
4662
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
4663
|
+
# request = Google::Cloud::Sql::V1::SqlInstancesReconcileNetworkingRequest.new
|
|
4664
|
+
#
|
|
4665
|
+
# # Call the reconcile_networking method.
|
|
4666
|
+
# result = client.reconcile_networking request
|
|
4667
|
+
#
|
|
4668
|
+
# # The returned object is of type Google::Cloud::Sql::V1::Operation.
|
|
4669
|
+
# p result
|
|
4670
|
+
#
|
|
4671
|
+
def reconcile_networking request, options = nil
|
|
4672
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
4673
|
+
|
|
4674
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Sql::V1::SqlInstancesReconcileNetworkingRequest
|
|
4675
|
+
|
|
4676
|
+
# Converts hash and nil to an options object
|
|
4677
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
4678
|
+
|
|
4679
|
+
# Customize the options with defaults
|
|
4680
|
+
metadata = @config.rpcs.reconcile_networking.metadata.to_h
|
|
4681
|
+
|
|
4682
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
4683
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
4684
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
4685
|
+
gapic_version: ::Google::Cloud::Sql::V1::VERSION
|
|
4686
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
4687
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
4688
|
+
|
|
4689
|
+
header_params = {}
|
|
4690
|
+
if request.project
|
|
4691
|
+
header_params["project"] = request.project
|
|
4692
|
+
end
|
|
4693
|
+
if request.instance
|
|
4694
|
+
header_params["instance"] = request.instance
|
|
4695
|
+
end
|
|
4696
|
+
|
|
4697
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
4698
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
4699
|
+
|
|
4700
|
+
options.apply_defaults timeout: @config.rpcs.reconcile_networking.timeout,
|
|
4701
|
+
metadata: metadata,
|
|
4702
|
+
retry_policy: @config.rpcs.reconcile_networking.retry_policy
|
|
4703
|
+
|
|
4704
|
+
options.apply_defaults timeout: @config.timeout,
|
|
4705
|
+
metadata: @config.metadata,
|
|
4706
|
+
retry_policy: @config.retry_policy
|
|
4707
|
+
|
|
4708
|
+
@sql_instances_service_stub.call_rpc :reconcile_networking, request, options: options do |response, operation|
|
|
4709
|
+
yield response, operation if block_given?
|
|
4710
|
+
end
|
|
4711
|
+
rescue ::GRPC::BadStatus => e
|
|
4712
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
4713
|
+
end
|
|
4714
|
+
|
|
4334
4715
|
##
|
|
4335
4716
|
# Configuration class for the SqlInstancesService API.
|
|
4336
4717
|
#
|
|
@@ -4627,6 +5008,16 @@ module Google
|
|
|
4627
5008
|
#
|
|
4628
5009
|
attr_reader :restart
|
|
4629
5010
|
##
|
|
5011
|
+
# RPC-specific configuration for `start`
|
|
5012
|
+
# @return [::Gapic::Config::Method]
|
|
5013
|
+
#
|
|
5014
|
+
attr_reader :start
|
|
5015
|
+
##
|
|
5016
|
+
# RPC-specific configuration for `stop`
|
|
5017
|
+
# @return [::Gapic::Config::Method]
|
|
5018
|
+
#
|
|
5019
|
+
attr_reader :stop
|
|
5020
|
+
##
|
|
4630
5021
|
# RPC-specific configuration for `restore_backup`
|
|
4631
5022
|
# @return [::Gapic::Config::Method]
|
|
4632
5023
|
#
|
|
@@ -4707,6 +5098,11 @@ module Google
|
|
|
4707
5098
|
#
|
|
4708
5099
|
attr_reader :get_latest_recovery_time
|
|
4709
5100
|
##
|
|
5101
|
+
# RPC-specific configuration for `execute_sql_read_only`
|
|
5102
|
+
# @return [::Gapic::Config::Method]
|
|
5103
|
+
#
|
|
5104
|
+
attr_reader :execute_sql_read_only
|
|
5105
|
+
##
|
|
4710
5106
|
# RPC-specific configuration for `execute_sql`
|
|
4711
5107
|
# @return [::Gapic::Config::Method]
|
|
4712
5108
|
#
|
|
@@ -4731,6 +5127,11 @@ module Google
|
|
|
4731
5127
|
# @return [::Gapic::Config::Method]
|
|
4732
5128
|
#
|
|
4733
5129
|
attr_reader :point_in_time_restore
|
|
5130
|
+
##
|
|
5131
|
+
# RPC-specific configuration for `reconcile_networking`
|
|
5132
|
+
# @return [::Gapic::Config::Method]
|
|
5133
|
+
#
|
|
5134
|
+
attr_reader :reconcile_networking
|
|
4734
5135
|
|
|
4735
5136
|
# @private
|
|
4736
5137
|
def initialize parent_rpcs = nil
|
|
@@ -4778,6 +5179,10 @@ module Google
|
|
|
4778
5179
|
@reset_ssl_config = ::Gapic::Config::Method.new reset_ssl_config_config
|
|
4779
5180
|
restart_config = parent_rpcs.restart if parent_rpcs.respond_to? :restart
|
|
4780
5181
|
@restart = ::Gapic::Config::Method.new restart_config
|
|
5182
|
+
start_config = parent_rpcs.start if parent_rpcs.respond_to? :start
|
|
5183
|
+
@start = ::Gapic::Config::Method.new start_config
|
|
5184
|
+
stop_config = parent_rpcs.stop if parent_rpcs.respond_to? :stop
|
|
5185
|
+
@stop = ::Gapic::Config::Method.new stop_config
|
|
4781
5186
|
restore_backup_config = parent_rpcs.restore_backup if parent_rpcs.respond_to? :restore_backup
|
|
4782
5187
|
@restore_backup = ::Gapic::Config::Method.new restore_backup_config
|
|
4783
5188
|
rotate_server_ca_config = parent_rpcs.rotate_server_ca if parent_rpcs.respond_to? :rotate_server_ca
|
|
@@ -4810,6 +5215,8 @@ module Google
|
|
|
4810
5215
|
@reset_replica_size = ::Gapic::Config::Method.new reset_replica_size_config
|
|
4811
5216
|
get_latest_recovery_time_config = parent_rpcs.get_latest_recovery_time if parent_rpcs.respond_to? :get_latest_recovery_time
|
|
4812
5217
|
@get_latest_recovery_time = ::Gapic::Config::Method.new get_latest_recovery_time_config
|
|
5218
|
+
execute_sql_read_only_config = parent_rpcs.execute_sql_read_only if parent_rpcs.respond_to? :execute_sql_read_only
|
|
5219
|
+
@execute_sql_read_only = ::Gapic::Config::Method.new execute_sql_read_only_config
|
|
4813
5220
|
execute_sql_config = parent_rpcs.execute_sql if parent_rpcs.respond_to? :execute_sql
|
|
4814
5221
|
@execute_sql = ::Gapic::Config::Method.new execute_sql_config
|
|
4815
5222
|
acquire_ssrs_lease_config = parent_rpcs.acquire_ssrs_lease if parent_rpcs.respond_to? :acquire_ssrs_lease
|
|
@@ -4820,6 +5227,8 @@ module Google
|
|
|
4820
5227
|
@pre_check_major_version_upgrade = ::Gapic::Config::Method.new pre_check_major_version_upgrade_config
|
|
4821
5228
|
point_in_time_restore_config = parent_rpcs.point_in_time_restore if parent_rpcs.respond_to? :point_in_time_restore
|
|
4822
5229
|
@point_in_time_restore = ::Gapic::Config::Method.new point_in_time_restore_config
|
|
5230
|
+
reconcile_networking_config = parent_rpcs.reconcile_networking if parent_rpcs.respond_to? :reconcile_networking
|
|
5231
|
+
@reconcile_networking = ::Gapic::Config::Method.new reconcile_networking_config
|
|
4823
5232
|
|
|
4824
5233
|
yield self if block_given?
|
|
4825
5234
|
end
|
|
@@ -113,6 +113,23 @@ module Google
|
|
|
113
113
|
"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
##
|
|
117
|
+
# Create a fully-qualified Instance resource string.
|
|
118
|
+
#
|
|
119
|
+
# The resource will be in the following format:
|
|
120
|
+
#
|
|
121
|
+
# `projects/{project}/instances/{instance}`
|
|
122
|
+
#
|
|
123
|
+
# @param project [String]
|
|
124
|
+
# @param instance [String]
|
|
125
|
+
#
|
|
126
|
+
# @return [::String]
|
|
127
|
+
def instance_path project:, instance:
|
|
128
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
129
|
+
|
|
130
|
+
"projects/#{project}/instances/#{instance}"
|
|
131
|
+
end
|
|
132
|
+
|
|
116
133
|
##
|
|
117
134
|
# Create a fully-qualified Network resource string.
|
|
118
135
|
#
|