google-cloud-sql-v1 0.2.0 → 0.5.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/AUTHENTICATION.md +4 -4
- data/README.md +9 -2
- data/lib/google/cloud/sql/v1/blue_green_deployments_service/client.rb +899 -0
- data/lib/google/cloud/sql/v1/blue_green_deployments_service/credentials.rb +48 -0
- data/lib/google/cloud/sql/v1/blue_green_deployments_service/paths.rb +86 -0
- data/lib/google/cloud/sql/v1/blue_green_deployments_service/rest/client.rb +821 -0
- data/lib/google/cloud/sql/v1/blue_green_deployments_service/rest/service_stub.rb +388 -0
- data/lib/google/cloud/sql/v1/blue_green_deployments_service/rest.rb +52 -0
- data/lib/google/cloud/sql/v1/blue_green_deployments_service.rb +55 -0
- data/lib/google/cloud/sql/v1/cloud_sql_backups_pb.rb +1 -1
- data/lib/google/cloud/sql/v1/cloud_sql_blue_green_deployments_pb.rb +45 -0
- data/lib/google/cloud/sql/v1/cloud_sql_blue_green_deployments_services_pb.rb +54 -0
- data/lib/google/cloud/sql/v1/cloud_sql_databases_pb.rb +2 -1
- data/lib/google/cloud/sql/v1/cloud_sql_instances_pb.rb +7 -1
- data/lib/google/cloud/sql/v1/cloud_sql_operations_pb.rb +1 -1
- data/lib/google/cloud/sql/v1/cloud_sql_resources_pb.rb +5 -1
- data/lib/google/cloud/sql/v1/cloud_sql_ssl_certs_pb.rb +2 -1
- data/lib/google/cloud/sql/v1/cloud_sql_users_pb.rb +1 -1
- data/lib/google/cloud/sql/v1/cloud_sql_workload_captures_pb.rb +35 -0
- data/lib/google/cloud/sql/v1/cloud_sql_workload_captures_services_pb.rb +60 -0
- data/lib/google/cloud/sql/v1/rest.rb +2 -0
- data/lib/google/cloud/sql/v1/sql_backup_runs_service/client.rb +2 -0
- data/lib/google/cloud/sql/v1/sql_backup_runs_service/paths.rb +77 -0
- data/lib/google/cloud/sql/v1/sql_backup_runs_service/rest/client.rb +2 -0
- data/lib/google/cloud/sql/v1/sql_backup_runs_service/rest.rb +1 -0
- data/lib/google/cloud/sql/v1/sql_backup_runs_service.rb +1 -0
- data/lib/google/cloud/sql/v1/sql_backups_service/paths.rb +63 -0
- data/lib/google/cloud/sql/v1/sql_databases_service/client.rb +18 -6
- data/lib/google/cloud/sql/v1/sql_databases_service/rest/client.rb +18 -6
- data/lib/google/cloud/sql/v1/sql_instances_service/client.rb +131 -44
- data/lib/google/cloud/sql/v1/sql_instances_service/paths.rb +108 -0
- data/lib/google/cloud/sql/v1/sql_instances_service/rest/client.rb +126 -42
- data/lib/google/cloud/sql/v1/sql_operations_service/client.rb +9 -3
- data/lib/google/cloud/sql/v1/sql_operations_service/rest/client.rb +9 -3
- data/lib/google/cloud/sql/v1/sql_users_service/client.rb +23 -5
- data/lib/google/cloud/sql/v1/sql_users_service/rest/client.rb +23 -5
- data/lib/google/cloud/sql/v1/sql_workload_captures_service/client.rb +906 -0
- data/lib/google/cloud/sql/v1/sql_workload_captures_service/credentials.rb +48 -0
- data/lib/google/cloud/sql/v1/sql_workload_captures_service/rest/client.rb +810 -0
- data/lib/google/cloud/sql/v1/sql_workload_captures_service/rest/service_stub.rb +396 -0
- data/lib/google/cloud/sql/v1/sql_workload_captures_service/rest.rb +51 -0
- data/lib/google/cloud/sql/v1/sql_workload_captures_service.rb +54 -0
- data/lib/google/cloud/sql/v1/version.rb +1 -1
- data/lib/google/cloud/sql/v1.rb +2 -6
- data/proto_docs/google/api/routing.rb +463 -0
- data/proto_docs/google/cloud/sql/v1/cloud_sql_blue_green_deployments.rb +399 -0
- data/proto_docs/google/cloud/sql/v1/cloud_sql_databases.rb +15 -0
- data/proto_docs/google/cloud/sql/v1/cloud_sql_instances.rb +248 -2
- data/proto_docs/google/cloud/sql/v1/cloud_sql_operations.rb +9 -0
- data/proto_docs/google/cloud/sql/v1/cloud_sql_resources.rb +116 -3
- data/proto_docs/google/cloud/sql/v1/cloud_sql_users.rb +32 -4
- data/proto_docs/google/cloud/sql/v1/cloud_sql_workload_captures.rb +170 -0
- data/proto_docs/google/protobuf/timestamp.rb +7 -6
- metadata +24 -3
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: google/cloud/sql/v1/cloud_sql_workload_captures.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/api/annotations_pb'
|
|
8
|
+
require 'google/api/client_pb'
|
|
9
|
+
require 'google/api/field_behavior_pb'
|
|
10
|
+
require 'google/api/resource_pb'
|
|
11
|
+
require 'google/cloud/sql/v1/cloud_sql_resources_pb'
|
|
12
|
+
require 'google/protobuf/timestamp_pb'
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
descriptor_data = "\n5google/cloud/sql/v1/cloud_sql_workload_captures.proto\x12\x13google.cloud.sql.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/sql/v1/cloud_sql_resources.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaa\x01\n\x1cWorkloadCapturesStartRequest\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12]\n\x1estart_workload_capture_context\x18\x64 \x01(\x0b\x32\x30.google.cloud.sql.v1.StartWorkloadCaptureContextB\x03\xe0\x41\x01\"\xa7\x01\n\x1bWorkloadCapturesStopRequest\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dstop_workload_capture_context\x18\x64 \x01(\x0b\x32/.google.cloud.sql.v1.StopWorkloadCaptureContextB\x03\xe0\x41\x01\"\xc8\x01\n\"WorkloadCapturesStartReplayRequest\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12[\n\x1dstart_workload_replay_context\x18\x64 \x01(\x0b\x32/.google.cloud.sql.v1.StartWorkloadReplayContextB\x03\xe0\x41\x02\x12\x18\n\x0bworkload_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xab\x01\n!WorkloadCapturesStopReplayRequest\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x1cstop_workload_replay_context\x18\x64 \x01(\x0b\x32..google.cloud.sql.v1.StopWorkloadReplayContextB\x03\xe0\x41\x01\"M\n\x1eSqlWorkloadCapturesListRequest\x12\x14\n\x07project\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08instance\x18\x02 \x01(\tB\x03\xe0\x41\x02\"m\n\x1cWorkloadCapturesListResponse\x12?\n\x11workload_captures\x18\x01 \x03(\x0b\x32$.google.cloud.sql.v1.WorkloadCapture\x12\x0c\n\x04kind\x18\x02 \x01(\t\"\xbb\x04\n\x0fWorkloadCapture\x12\x18\n\x0bworkload_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x0fsource_instance\x18\x02 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/Instance\x12O\n\x16workload_capture_state\x18\x03 \x01(\x0e\x32*.google.cloud.sql.v1.WorkloadCapture.StateB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x0freplay_instance\x18\x06 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n sqladmin.googleapis.com/InstanceH\x00\x88\x01\x01\x12 \n\x0eretention_days\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1b\n\tbackup_id\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x02\x88\x01\x01\"V\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0e\n\nTERMINATED\x10\x04\x42\x12\n\x10_replay_instanceB\x11\n\x0f_retention_daysB\x0c\n\n_backup_id2\xad\x08\n\x1aSqlWorkloadCapturesService\x12\xa9\x01\n\x05Start\x12\x31.google.cloud.sql.v1.WorkloadCapturesStartRequest\x1a\x1e.google.cloud.sql.v1.Operation\"M\x82\xd3\xe4\x93\x02G\"B/v1/projects/{project}/instances/{instance}/workloadCaptures:start:\x01*\x12\xa6\x01\n\x04Stop\x12\x30.google.cloud.sql.v1.WorkloadCapturesStopRequest\x1a\x1e.google.cloud.sql.v1.Operation\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/projects/{project}/instances/{instance}/workloadCaptures:stop:\x01*\x12\xc9\x01\n\x0bStartReplay\x12\x37.google.cloud.sql.v1.WorkloadCapturesStartReplayRequest\x1a\x1e.google.cloud.sql.v1.Operation\"a\x82\xd3\xe4\x93\x02[\"V/v1/projects/{project}/instances/{instance}/workloadCaptures/{workload_id}:startReplay:\x01*\x12\xb8\x01\n\nStopReplay\x12\x36.google.cloud.sql.v1.WorkloadCapturesStopReplayRequest\x1a\x1e.google.cloud.sql.v1.Operation\"R\x82\xd3\xe4\x93\x02L\"G/v1/projects/{project}/instances/{instance}/workloadCaptures:stopReplay:\x01*\x12\xb4\x01\n\x04List\x12\x33.google.cloud.sql.v1.SqlWorkloadCapturesListRequest\x1a\x31.google.cloud.sql.v1.WorkloadCapturesListResponse\"D\x82\xd3\xe4\x93\x02>\x12</v1/projects/{project}/instances/{instance}/workloadCaptures\x1a|\xca\x41\x17sqladmin.googleapis.com\xd2\x41_https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/sqlservice.adminBe\n\x17\x63om.google.cloud.sql.v1B\x1d\x43loudSqlWorkloadCapturesProtoP\x01Z)cloud.google.com/go/sql/apiv1/sqlpb;sqlpbb\x06proto3"
|
|
16
|
+
|
|
17
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Cloud
|
|
22
|
+
module Sql
|
|
23
|
+
module V1
|
|
24
|
+
WorkloadCapturesStartRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.sql.v1.WorkloadCapturesStartRequest").msgclass
|
|
25
|
+
WorkloadCapturesStopRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.sql.v1.WorkloadCapturesStopRequest").msgclass
|
|
26
|
+
WorkloadCapturesStartReplayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.sql.v1.WorkloadCapturesStartReplayRequest").msgclass
|
|
27
|
+
WorkloadCapturesStopReplayRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.sql.v1.WorkloadCapturesStopReplayRequest").msgclass
|
|
28
|
+
SqlWorkloadCapturesListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.sql.v1.SqlWorkloadCapturesListRequest").msgclass
|
|
29
|
+
WorkloadCapturesListResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.sql.v1.WorkloadCapturesListResponse").msgclass
|
|
30
|
+
WorkloadCapture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.sql.v1.WorkloadCapture").msgclass
|
|
31
|
+
WorkloadCapture::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.sql.v1.WorkloadCapture.State").enummodule
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: google/cloud/sql/v1/cloud_sql_workload_captures.proto for package 'google.cloud.sql.v1'
|
|
3
|
+
# Original file comments:
|
|
4
|
+
# Copyright 2026 Google LLC
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
# you may not use this file except in compliance with the License.
|
|
8
|
+
# You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
# See the License for the specific language governing permissions and
|
|
16
|
+
# limitations under the License.
|
|
17
|
+
#
|
|
18
|
+
|
|
19
|
+
require 'grpc'
|
|
20
|
+
require 'google/cloud/sql/v1/cloud_sql_workload_captures_pb'
|
|
21
|
+
|
|
22
|
+
module Google
|
|
23
|
+
module Cloud
|
|
24
|
+
module Sql
|
|
25
|
+
module V1
|
|
26
|
+
module SqlWorkloadCapturesService
|
|
27
|
+
# Cloud SQL Workload Captures service.
|
|
28
|
+
class Service
|
|
29
|
+
|
|
30
|
+
include ::GRPC::GenericService
|
|
31
|
+
|
|
32
|
+
self.marshal_class_method = :encode
|
|
33
|
+
self.unmarshal_class_method = :decode
|
|
34
|
+
self.service_name = 'google.cloud.sql.v1.SqlWorkloadCapturesService'
|
|
35
|
+
|
|
36
|
+
# Starts capturing the SQL queries, transactions, and other operations
|
|
37
|
+
# executed on the primary instance. This traffic is securely stored and forms
|
|
38
|
+
# a "captured workload". This workload can be replayed later on a different
|
|
39
|
+
# instance to safely test performance impacts, database upgrades,
|
|
40
|
+
# configuration changes etc. before applying them to production.
|
|
41
|
+
rpc :Start, ::Google::Cloud::Sql::V1::WorkloadCapturesStartRequest, ::Google::Cloud::Sql::V1::Operation
|
|
42
|
+
# Stops capturing the query traffic and related operations executed on the
|
|
43
|
+
# primary instance.
|
|
44
|
+
rpc :Stop, ::Google::Cloud::Sql::V1::WorkloadCapturesStopRequest, ::Google::Cloud::Sql::V1::Operation
|
|
45
|
+
# Starts executing a captured workload on a separate Cloud SQL instance
|
|
46
|
+
# provisioned for workload replay. This target instance simulates the
|
|
47
|
+
# production environment without affecting the primary instance.
|
|
48
|
+
rpc :StartReplay, ::Google::Cloud::Sql::V1::WorkloadCapturesStartReplayRequest, ::Google::Cloud::Sql::V1::Operation
|
|
49
|
+
# Stops an active workload replay on the target Cloud SQL replay instance.
|
|
50
|
+
rpc :StopReplay, ::Google::Cloud::Sql::V1::WorkloadCapturesStopReplayRequest, ::Google::Cloud::Sql::V1::Operation
|
|
51
|
+
# Lists all captured workloads associated with the instance.
|
|
52
|
+
rpc :List, ::Google::Cloud::Sql::V1::SqlWorkloadCapturesListRequest, ::Google::Cloud::Sql::V1::WorkloadCapturesListResponse
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
Stub = Service.rpc_stub_class
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
require "google/cloud/sql/v1/sql_backup_runs_service/rest"
|
|
20
20
|
require "google/cloud/sql/v1/sql_instances_service/rest"
|
|
21
21
|
require "google/cloud/sql/v1/sql_backups_service/rest"
|
|
22
|
+
require "google/cloud/sql/v1/blue_green_deployments_service/rest"
|
|
22
23
|
require "google/cloud/sql/v1/sql_connect_service/rest"
|
|
23
24
|
require "google/cloud/sql/v1/sql_databases_service/rest"
|
|
24
25
|
require "google/cloud/sql/v1/sql_flags_service/rest"
|
|
@@ -26,6 +27,7 @@ require "google/cloud/sql/v1/sql_operations_service/rest"
|
|
|
26
27
|
require "google/cloud/sql/v1/sql_ssl_certs_service/rest"
|
|
27
28
|
require "google/cloud/sql/v1/sql_tiers_service/rest"
|
|
28
29
|
require "google/cloud/sql/v1/sql_users_service/rest"
|
|
30
|
+
require "google/cloud/sql/v1/sql_workload_captures_service/rest"
|
|
29
31
|
require "google/cloud/sql/v1/version"
|
|
30
32
|
|
|
31
33
|
module Google
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Cloud
|
|
22
|
+
module Sql
|
|
23
|
+
module V1
|
|
24
|
+
module SqlBackupRunsService
|
|
25
|
+
# Path helper methods for the SqlBackupRunsService API.
|
|
26
|
+
module Paths
|
|
27
|
+
##
|
|
28
|
+
# Create a fully-qualified CryptoKey resource string.
|
|
29
|
+
#
|
|
30
|
+
# The resource will be in the following format:
|
|
31
|
+
#
|
|
32
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
|
|
33
|
+
#
|
|
34
|
+
# @param project [String]
|
|
35
|
+
# @param location [String]
|
|
36
|
+
# @param key_ring [String]
|
|
37
|
+
# @param crypto_key [String]
|
|
38
|
+
#
|
|
39
|
+
# @return [::String]
|
|
40
|
+
def crypto_key_path project:, location:, key_ring:, crypto_key:
|
|
41
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
42
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
43
|
+
raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
|
|
44
|
+
|
|
45
|
+
"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
##
|
|
49
|
+
# Create a fully-qualified CryptoKeyVersion resource string.
|
|
50
|
+
#
|
|
51
|
+
# The resource will be in the following format:
|
|
52
|
+
#
|
|
53
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`
|
|
54
|
+
#
|
|
55
|
+
# @param project [String]
|
|
56
|
+
# @param location [String]
|
|
57
|
+
# @param key_ring [String]
|
|
58
|
+
# @param crypto_key [String]
|
|
59
|
+
# @param crypto_key_version [String]
|
|
60
|
+
#
|
|
61
|
+
# @return [::String]
|
|
62
|
+
def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version:
|
|
63
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
64
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
65
|
+
raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
|
|
66
|
+
raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/"
|
|
67
|
+
|
|
68
|
+
"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
extend self
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -23,6 +23,7 @@ require "gapic/config/method"
|
|
|
23
23
|
require "google/cloud/sql/v1/version"
|
|
24
24
|
|
|
25
25
|
require "google/cloud/sql/v1/sql_backup_runs_service/credentials"
|
|
26
|
+
require "google/cloud/sql/v1/sql_backup_runs_service/paths"
|
|
26
27
|
require "google/cloud/sql/v1/sql_backup_runs_service/rest/client"
|
|
27
28
|
|
|
28
29
|
module Google
|
|
@@ -23,6 +23,7 @@ require "gapic/config/method"
|
|
|
23
23
|
require "google/cloud/sql/v1/version"
|
|
24
24
|
|
|
25
25
|
require "google/cloud/sql/v1/sql_backup_runs_service/credentials"
|
|
26
|
+
require "google/cloud/sql/v1/sql_backup_runs_service/paths"
|
|
26
27
|
require "google/cloud/sql/v1/sql_backup_runs_service/client"
|
|
27
28
|
require "google/cloud/sql/v1/sql_backup_runs_service/rest"
|
|
28
29
|
|
|
@@ -41,6 +41,69 @@ module Google
|
|
|
41
41
|
"projects/#{project}/backups/#{backup}"
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
##
|
|
45
|
+
# Create a fully-qualified CryptoKey resource string.
|
|
46
|
+
#
|
|
47
|
+
# The resource will be in the following format:
|
|
48
|
+
#
|
|
49
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
|
|
50
|
+
#
|
|
51
|
+
# @param project [String]
|
|
52
|
+
# @param location [String]
|
|
53
|
+
# @param key_ring [String]
|
|
54
|
+
# @param crypto_key [String]
|
|
55
|
+
#
|
|
56
|
+
# @return [::String]
|
|
57
|
+
def crypto_key_path project:, location:, key_ring:, crypto_key:
|
|
58
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
59
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
60
|
+
raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
|
|
61
|
+
|
|
62
|
+
"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
##
|
|
66
|
+
# Create a fully-qualified CryptoKeyVersion resource string.
|
|
67
|
+
#
|
|
68
|
+
# The resource will be in the following format:
|
|
69
|
+
#
|
|
70
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`
|
|
71
|
+
#
|
|
72
|
+
# @param project [String]
|
|
73
|
+
# @param location [String]
|
|
74
|
+
# @param key_ring [String]
|
|
75
|
+
# @param crypto_key [String]
|
|
76
|
+
# @param crypto_key_version [String]
|
|
77
|
+
#
|
|
78
|
+
# @return [::String]
|
|
79
|
+
def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version:
|
|
80
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
81
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
|
82
|
+
raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
|
|
83
|
+
raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/"
|
|
84
|
+
|
|
85
|
+
"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
##
|
|
89
|
+
# Create a fully-qualified NetworkAttachment resource string.
|
|
90
|
+
#
|
|
91
|
+
# The resource will be in the following format:
|
|
92
|
+
#
|
|
93
|
+
# `projects/{project}/regions/{region}/networkAttachments/{network_attachment}`
|
|
94
|
+
#
|
|
95
|
+
# @param project [String]
|
|
96
|
+
# @param region [String]
|
|
97
|
+
# @param network_attachment [String]
|
|
98
|
+
#
|
|
99
|
+
# @return [::String]
|
|
100
|
+
def network_attachment_path project:, region:, network_attachment:
|
|
101
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
|
102
|
+
raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"
|
|
103
|
+
|
|
104
|
+
"projects/#{project}/regions/#{region}/networkAttachments/#{network_attachment}"
|
|
105
|
+
end
|
|
106
|
+
|
|
44
107
|
##
|
|
45
108
|
# Create a fully-qualified Project resource string.
|
|
46
109
|
#
|
|
@@ -212,7 +212,7 @@ module Google
|
|
|
212
212
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
213
213
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
214
214
|
#
|
|
215
|
-
# @overload delete(database: nil, instance: nil, project: nil)
|
|
215
|
+
# @overload delete(database: nil, instance: nil, project: nil, location: nil)
|
|
216
216
|
# Pass arguments to `delete` via keyword arguments. Note that at
|
|
217
217
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
218
218
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -223,6 +223,8 @@ module Google
|
|
|
223
223
|
# Database instance ID. This does not include the project ID.
|
|
224
224
|
# @param project [::String]
|
|
225
225
|
# Project ID of the project that contains the instance.
|
|
226
|
+
# @param location [::String]
|
|
227
|
+
# Optional. Region of the Cloud SQL instance.
|
|
226
228
|
#
|
|
227
229
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
228
230
|
# @yieldparam response [::Google::Cloud::Sql::V1::Operation]
|
|
@@ -308,7 +310,7 @@ module Google
|
|
|
308
310
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
309
311
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
310
312
|
#
|
|
311
|
-
# @overload get(database: nil, instance: nil, project: nil)
|
|
313
|
+
# @overload get(database: nil, instance: nil, project: nil, location: nil)
|
|
312
314
|
# Pass arguments to `get` via keyword arguments. Note that at
|
|
313
315
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
314
316
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -319,6 +321,8 @@ module Google
|
|
|
319
321
|
# Database instance ID. This does not include the project ID.
|
|
320
322
|
# @param project [::String]
|
|
321
323
|
# Project ID of the project that contains the instance.
|
|
324
|
+
# @param location [::String]
|
|
325
|
+
# Optional. Region of the Cloud SQL instance.
|
|
322
326
|
#
|
|
323
327
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
324
328
|
# @yieldparam response [::Google::Cloud::Sql::V1::Database]
|
|
@@ -406,7 +410,7 @@ module Google
|
|
|
406
410
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
407
411
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
408
412
|
#
|
|
409
|
-
# @overload insert(instance: nil, project: nil, body: nil)
|
|
413
|
+
# @overload insert(instance: nil, project: nil, body: nil, location: nil)
|
|
410
414
|
# Pass arguments to `insert` via keyword arguments. Note that at
|
|
411
415
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
412
416
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -416,6 +420,8 @@ module Google
|
|
|
416
420
|
# @param project [::String]
|
|
417
421
|
# Project ID of the project that contains the instance.
|
|
418
422
|
# @param body [::Google::Cloud::Sql::V1::Database, ::Hash]
|
|
423
|
+
# @param location [::String]
|
|
424
|
+
# Optional. Region of the Cloud SQL instance.
|
|
419
425
|
#
|
|
420
426
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
421
427
|
# @yieldparam response [::Google::Cloud::Sql::V1::Operation]
|
|
@@ -497,7 +503,7 @@ module Google
|
|
|
497
503
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
498
504
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
499
505
|
#
|
|
500
|
-
# @overload list(instance: nil, project: nil)
|
|
506
|
+
# @overload list(instance: nil, project: nil, location: nil)
|
|
501
507
|
# Pass arguments to `list` via keyword arguments. Note that at
|
|
502
508
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
503
509
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -506,6 +512,8 @@ module Google
|
|
|
506
512
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
507
513
|
# @param project [::String]
|
|
508
514
|
# Project ID of the project that contains the instance.
|
|
515
|
+
# @param location [::String]
|
|
516
|
+
# Optional. Region of the Cloud SQL instance.
|
|
509
517
|
#
|
|
510
518
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
511
519
|
# @yieldparam response [::Google::Cloud::Sql::V1::DatabasesListResponse]
|
|
@@ -588,7 +596,7 @@ module Google
|
|
|
588
596
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
589
597
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
590
598
|
#
|
|
591
|
-
# @overload patch(database: nil, instance: nil, project: nil, body: nil)
|
|
599
|
+
# @overload patch(database: nil, instance: nil, project: nil, body: nil, location: nil)
|
|
592
600
|
# Pass arguments to `patch` via keyword arguments. Note that at
|
|
593
601
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
594
602
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -600,6 +608,8 @@ module Google
|
|
|
600
608
|
# @param project [::String]
|
|
601
609
|
# Project ID of the project that contains the instance.
|
|
602
610
|
# @param body [::Google::Cloud::Sql::V1::Database, ::Hash]
|
|
611
|
+
# @param location [::String]
|
|
612
|
+
# Optional. Region of the Cloud SQL instance.
|
|
603
613
|
#
|
|
604
614
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
605
615
|
# @yieldparam response [::Google::Cloud::Sql::V1::Operation]
|
|
@@ -685,7 +695,7 @@ module Google
|
|
|
685
695
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
686
696
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
687
697
|
#
|
|
688
|
-
# @overload update(database: nil, instance: nil, project: nil, body: nil)
|
|
698
|
+
# @overload update(database: nil, instance: nil, project: nil, body: nil, location: nil)
|
|
689
699
|
# Pass arguments to `update` via keyword arguments. Note that at
|
|
690
700
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
691
701
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -697,6 +707,8 @@ module Google
|
|
|
697
707
|
# @param project [::String]
|
|
698
708
|
# Project ID of the project that contains the instance.
|
|
699
709
|
# @param body [::Google::Cloud::Sql::V1::Database, ::Hash]
|
|
710
|
+
# @param location [::String]
|
|
711
|
+
# Optional. Region of the Cloud SQL instance.
|
|
700
712
|
#
|
|
701
713
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
702
714
|
# @yieldparam response [::Google::Cloud::Sql::V1::Operation]
|
|
@@ -205,7 +205,7 @@ module Google
|
|
|
205
205
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
206
206
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
207
207
|
#
|
|
208
|
-
# @overload delete(database: nil, instance: nil, project: nil)
|
|
208
|
+
# @overload delete(database: nil, instance: nil, project: nil, location: nil)
|
|
209
209
|
# Pass arguments to `delete` via keyword arguments. Note that at
|
|
210
210
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
211
211
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -216,6 +216,8 @@ module Google
|
|
|
216
216
|
# Database instance ID. This does not include the project ID.
|
|
217
217
|
# @param project [::String]
|
|
218
218
|
# Project ID of the project that contains the instance.
|
|
219
|
+
# @param location [::String]
|
|
220
|
+
# Optional. Region of the Cloud SQL instance.
|
|
219
221
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
220
222
|
# @yieldparam result [::Google::Cloud::Sql::V1::Operation]
|
|
221
223
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -288,7 +290,7 @@ module Google
|
|
|
288
290
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
289
291
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
290
292
|
#
|
|
291
|
-
# @overload get(database: nil, instance: nil, project: nil)
|
|
293
|
+
# @overload get(database: nil, instance: nil, project: nil, location: nil)
|
|
292
294
|
# Pass arguments to `get` via keyword arguments. Note that at
|
|
293
295
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
294
296
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -299,6 +301,8 @@ module Google
|
|
|
299
301
|
# Database instance ID. This does not include the project ID.
|
|
300
302
|
# @param project [::String]
|
|
301
303
|
# Project ID of the project that contains the instance.
|
|
304
|
+
# @param location [::String]
|
|
305
|
+
# Optional. Region of the Cloud SQL instance.
|
|
302
306
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
303
307
|
# @yieldparam result [::Google::Cloud::Sql::V1::Database]
|
|
304
308
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -373,7 +377,7 @@ module Google
|
|
|
373
377
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
374
378
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
375
379
|
#
|
|
376
|
-
# @overload insert(instance: nil, project: nil, body: nil)
|
|
380
|
+
# @overload insert(instance: nil, project: nil, body: nil, location: nil)
|
|
377
381
|
# Pass arguments to `insert` via keyword arguments. Note that at
|
|
378
382
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
379
383
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -383,6 +387,8 @@ module Google
|
|
|
383
387
|
# @param project [::String]
|
|
384
388
|
# Project ID of the project that contains the instance.
|
|
385
389
|
# @param body [::Google::Cloud::Sql::V1::Database, ::Hash]
|
|
390
|
+
# @param location [::String]
|
|
391
|
+
# Optional. Region of the Cloud SQL instance.
|
|
386
392
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
387
393
|
# @yieldparam result [::Google::Cloud::Sql::V1::Operation]
|
|
388
394
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -454,7 +460,7 @@ module Google
|
|
|
454
460
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
455
461
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
456
462
|
#
|
|
457
|
-
# @overload list(instance: nil, project: nil)
|
|
463
|
+
# @overload list(instance: nil, project: nil, location: nil)
|
|
458
464
|
# Pass arguments to `list` via keyword arguments. Note that at
|
|
459
465
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
460
466
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -463,6 +469,8 @@ module Google
|
|
|
463
469
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
464
470
|
# @param project [::String]
|
|
465
471
|
# Project ID of the project that contains the instance.
|
|
472
|
+
# @param location [::String]
|
|
473
|
+
# Optional. Region of the Cloud SQL instance.
|
|
466
474
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
467
475
|
# @yieldparam result [::Google::Cloud::Sql::V1::DatabasesListResponse]
|
|
468
476
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -535,7 +543,7 @@ module Google
|
|
|
535
543
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
536
544
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
537
545
|
#
|
|
538
|
-
# @overload patch(database: nil, instance: nil, project: nil, body: nil)
|
|
546
|
+
# @overload patch(database: nil, instance: nil, project: nil, body: nil, location: nil)
|
|
539
547
|
# Pass arguments to `patch` via keyword arguments. Note that at
|
|
540
548
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
541
549
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -547,6 +555,8 @@ module Google
|
|
|
547
555
|
# @param project [::String]
|
|
548
556
|
# Project ID of the project that contains the instance.
|
|
549
557
|
# @param body [::Google::Cloud::Sql::V1::Database, ::Hash]
|
|
558
|
+
# @param location [::String]
|
|
559
|
+
# Optional. Region of the Cloud SQL instance.
|
|
550
560
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
551
561
|
# @yieldparam result [::Google::Cloud::Sql::V1::Operation]
|
|
552
562
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
@@ -619,7 +629,7 @@ module Google
|
|
|
619
629
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
620
630
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
621
631
|
#
|
|
622
|
-
# @overload update(database: nil, instance: nil, project: nil, body: nil)
|
|
632
|
+
# @overload update(database: nil, instance: nil, project: nil, body: nil, location: nil)
|
|
623
633
|
# Pass arguments to `update` via keyword arguments. Note that at
|
|
624
634
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
625
635
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -631,6 +641,8 @@ module Google
|
|
|
631
641
|
# @param project [::String]
|
|
632
642
|
# Project ID of the project that contains the instance.
|
|
633
643
|
# @param body [::Google::Cloud::Sql::V1::Database, ::Hash]
|
|
644
|
+
# @param location [::String]
|
|
645
|
+
# Optional. Region of the Cloud SQL instance.
|
|
634
646
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
635
647
|
# @yieldparam result [::Google::Cloud::Sql::V1::Operation]
|
|
636
648
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|