google-cloud-cloud_dms-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google-cloud-cloud_dms-v1.rb +21 -0
- data/lib/google/cloud/cloud_dms/v1.rb +38 -0
- data/lib/google/cloud/cloud_dms/v1/data_migration_service.rb +50 -0
- data/lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb +1745 -0
- data/lib/google/cloud/cloud_dms/v1/data_migration_service/credentials.rb +51 -0
- data/lib/google/cloud/cloud_dms/v1/data_migration_service/operations.rb +655 -0
- data/lib/google/cloud/cloud_dms/v1/data_migration_service/paths.rb +88 -0
- data/lib/google/cloud/cloud_dms/v1/version.rb +28 -0
- data/lib/google/cloud/clouddms/v1/clouddms_pb.rb +158 -0
- data/lib/google/cloud/clouddms/v1/clouddms_resources_pb.rb +268 -0
- data/lib/google/cloud/clouddms/v1/clouddms_services_pb.rb +85 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +65 -0
- data/proto_docs/google/api/resource.rb +283 -0
- data/proto_docs/google/cloud/clouddms/v1/clouddms.rb +427 -0
- data/proto_docs/google/cloud/clouddms/v1/clouddms_resources.rb +757 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +222 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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
|
+
# This gem does not autoload during Bundler.require. To load this gem,
|
20
|
+
# issue explicit require statements for the packages desired, e.g.:
|
21
|
+
# require "google/cloud/cloud_dms/v1"
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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
|
+
require "google/cloud/cloud_dms/v1/data_migration_service"
|
20
|
+
require "google/cloud/cloud_dms/v1/version"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module CloudDMS
|
25
|
+
##
|
26
|
+
# To load this package, including all its services, and instantiate a client:
|
27
|
+
#
|
28
|
+
# require "google/cloud/cloud_dms/v1"
|
29
|
+
# client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new
|
30
|
+
#
|
31
|
+
module V1
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
helper_path = ::File.join __dir__, "v1", "_helpers.rb"
|
38
|
+
require "google/cloud/cloud_dms/v1/_helpers" if ::File.file? helper_path
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/cloud_dms/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/cloud_dms/v1/data_migration_service/credentials"
|
26
|
+
require "google/cloud/cloud_dms/v1/data_migration_service/paths"
|
27
|
+
require "google/cloud/cloud_dms/v1/data_migration_service/operations"
|
28
|
+
require "google/cloud/cloud_dms/v1/data_migration_service/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module CloudDMS
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# Database Migration service
|
36
|
+
#
|
37
|
+
# To load this service and instantiate a client:
|
38
|
+
#
|
39
|
+
# require "google/cloud/cloud_dms/v1/data_migration_service"
|
40
|
+
# client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new
|
41
|
+
#
|
42
|
+
module DataMigrationService
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
helper_path = ::File.join __dir__, "data_migration_service", "helpers.rb"
|
50
|
+
require "google/cloud/cloud_dms/v1/data_migration_service/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,1745 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/clouddms/v1/clouddms_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module CloudDMS
|
25
|
+
module V1
|
26
|
+
module DataMigrationService
|
27
|
+
##
|
28
|
+
# Client for the DataMigrationService service.
|
29
|
+
#
|
30
|
+
# Database Migration service
|
31
|
+
#
|
32
|
+
class Client
|
33
|
+
include Paths
|
34
|
+
|
35
|
+
# @private
|
36
|
+
attr_reader :data_migration_service_stub
|
37
|
+
|
38
|
+
##
|
39
|
+
# Configure the DataMigrationService Client class.
|
40
|
+
#
|
41
|
+
# See {::Google::Cloud::CloudDMS::V1::DataMigrationService::Client::Configuration}
|
42
|
+
# for a description of the configuration fields.
|
43
|
+
#
|
44
|
+
# ## Example
|
45
|
+
#
|
46
|
+
# To modify the configuration for all DataMigrationService clients:
|
47
|
+
#
|
48
|
+
# ::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# @yield [config] Configure the Client client.
|
53
|
+
# @yieldparam config [Client::Configuration]
|
54
|
+
#
|
55
|
+
# @return [Client::Configuration]
|
56
|
+
#
|
57
|
+
def self.configure
|
58
|
+
@configure ||= begin
|
59
|
+
namespace = ["Google", "Cloud", "CloudDMS", "V1"]
|
60
|
+
parent_config = while namespace.any?
|
61
|
+
parent_name = namespace.join "::"
|
62
|
+
parent_const = const_get parent_name
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
|
+
namespace.pop
|
65
|
+
end
|
66
|
+
default_config = Client::Configuration.new parent_config
|
67
|
+
|
68
|
+
default_config.timeout = 60.0
|
69
|
+
default_config.retry_policy = {
|
70
|
+
initial_delay: 1.0,
|
71
|
+
max_delay: 10.0,
|
72
|
+
multiplier: 1.3,
|
73
|
+
retry_codes: [14]
|
74
|
+
}
|
75
|
+
|
76
|
+
default_config.rpcs.list_migration_jobs.timeout = 60.0
|
77
|
+
|
78
|
+
default_config.rpcs.get_migration_job.timeout = 60.0
|
79
|
+
|
80
|
+
default_config.rpcs.create_migration_job.timeout = 60.0
|
81
|
+
|
82
|
+
default_config.rpcs.update_migration_job.timeout = 60.0
|
83
|
+
|
84
|
+
default_config.rpcs.delete_migration_job.timeout = 60.0
|
85
|
+
|
86
|
+
default_config.rpcs.start_migration_job.timeout = 60.0
|
87
|
+
|
88
|
+
default_config.rpcs.stop_migration_job.timeout = 60.0
|
89
|
+
|
90
|
+
default_config.rpcs.resume_migration_job.timeout = 60.0
|
91
|
+
|
92
|
+
default_config.rpcs.promote_migration_job.timeout = 60.0
|
93
|
+
|
94
|
+
default_config.rpcs.verify_migration_job.timeout = 60.0
|
95
|
+
|
96
|
+
default_config.rpcs.restart_migration_job.timeout = 60.0
|
97
|
+
|
98
|
+
default_config.rpcs.generate_ssh_script.timeout = 60.0
|
99
|
+
|
100
|
+
default_config.rpcs.list_connection_profiles.timeout = 60.0
|
101
|
+
|
102
|
+
default_config.rpcs.get_connection_profile.timeout = 60.0
|
103
|
+
|
104
|
+
default_config.rpcs.create_connection_profile.timeout = 60.0
|
105
|
+
|
106
|
+
default_config.rpcs.update_connection_profile.timeout = 60.0
|
107
|
+
|
108
|
+
default_config.rpcs.delete_connection_profile.timeout = 60.0
|
109
|
+
|
110
|
+
default_config
|
111
|
+
end
|
112
|
+
yield @configure if block_given?
|
113
|
+
@configure
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# Configure the DataMigrationService Client instance.
|
118
|
+
#
|
119
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
120
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
121
|
+
# should be made on {Client.configure}.
|
122
|
+
#
|
123
|
+
# See {::Google::Cloud::CloudDMS::V1::DataMigrationService::Client::Configuration}
|
124
|
+
# for a description of the configuration fields.
|
125
|
+
#
|
126
|
+
# @yield [config] Configure the Client client.
|
127
|
+
# @yieldparam config [Client::Configuration]
|
128
|
+
#
|
129
|
+
# @return [Client::Configuration]
|
130
|
+
#
|
131
|
+
def configure
|
132
|
+
yield @config if block_given?
|
133
|
+
@config
|
134
|
+
end
|
135
|
+
|
136
|
+
##
|
137
|
+
# Create a new DataMigrationService client object.
|
138
|
+
#
|
139
|
+
# ## Examples
|
140
|
+
#
|
141
|
+
# To create a new DataMigrationService client with the default
|
142
|
+
# configuration:
|
143
|
+
#
|
144
|
+
# client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new
|
145
|
+
#
|
146
|
+
# To create a new DataMigrationService client with a custom
|
147
|
+
# configuration:
|
148
|
+
#
|
149
|
+
# client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new do |config|
|
150
|
+
# config.timeout = 10.0
|
151
|
+
# end
|
152
|
+
#
|
153
|
+
# @yield [config] Configure the DataMigrationService client.
|
154
|
+
# @yieldparam config [Client::Configuration]
|
155
|
+
#
|
156
|
+
def initialize
|
157
|
+
# These require statements are intentionally placed here to initialize
|
158
|
+
# the gRPC module only when it's required.
|
159
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
160
|
+
require "gapic/grpc"
|
161
|
+
require "google/cloud/clouddms/v1/clouddms_services_pb"
|
162
|
+
|
163
|
+
# Create the configuration object
|
164
|
+
@config = Configuration.new Client.configure
|
165
|
+
|
166
|
+
# Yield the configuration if needed
|
167
|
+
yield @config if block_given?
|
168
|
+
|
169
|
+
# Create credentials
|
170
|
+
credentials = @config.credentials
|
171
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
172
|
+
# but only if the default endpoint does not have a region prefix.
|
173
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
174
|
+
@config.endpoint == Client.configure.endpoint &&
|
175
|
+
!@config.endpoint.split(".").first.include?("-")
|
176
|
+
credentials ||= Credentials.default scope: @config.scope,
|
177
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
178
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
179
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
180
|
+
end
|
181
|
+
@quota_project_id = @config.quota_project
|
182
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
183
|
+
|
184
|
+
@operations_client = Operations.new do |config|
|
185
|
+
config.credentials = credentials
|
186
|
+
config.endpoint = @config.endpoint
|
187
|
+
end
|
188
|
+
|
189
|
+
@data_migration_service_stub = ::Gapic::ServiceStub.new(
|
190
|
+
::Google::Cloud::CloudDMS::V1::DataMigrationService::Stub,
|
191
|
+
credentials: credentials,
|
192
|
+
endpoint: @config.endpoint,
|
193
|
+
channel_args: @config.channel_args,
|
194
|
+
interceptors: @config.interceptors
|
195
|
+
)
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# Get the associated client for long-running operations.
|
200
|
+
#
|
201
|
+
# @return [::Google::Cloud::CloudDMS::V1::DataMigrationService::Operations]
|
202
|
+
#
|
203
|
+
attr_reader :operations_client
|
204
|
+
|
205
|
+
# Service calls
|
206
|
+
|
207
|
+
##
|
208
|
+
# Lists migration jobs in a given project and location.
|
209
|
+
#
|
210
|
+
# @overload list_migration_jobs(request, options = nil)
|
211
|
+
# Pass arguments to `list_migration_jobs` via a request object, either of type
|
212
|
+
# {::Google::Cloud::CloudDMS::V1::ListMigrationJobsRequest} or an equivalent Hash.
|
213
|
+
#
|
214
|
+
# @param request [::Google::Cloud::CloudDMS::V1::ListMigrationJobsRequest, ::Hash]
|
215
|
+
# A request object representing the call parameters. Required. To specify no
|
216
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
217
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
218
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
219
|
+
#
|
220
|
+
# @overload list_migration_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
221
|
+
# Pass arguments to `list_migration_jobs` via keyword arguments. Note that at
|
222
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
223
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
224
|
+
#
|
225
|
+
# @param parent [::String]
|
226
|
+
# Required. The parent, which owns this collection of migrationJobs.
|
227
|
+
# @param page_size [::Integer]
|
228
|
+
# The maximum number of migration jobs to return. The service may return
|
229
|
+
# fewer than this value. If unspecified, at most 50 migration jobs will be
|
230
|
+
# returned. The maximum value is 1000; values above 1000 will be coerced to
|
231
|
+
# 1000.
|
232
|
+
# @param page_token [::String]
|
233
|
+
# The nextPageToken value received in the previous call to
|
234
|
+
# migrationJobs.list, used in the subsequent request to retrieve the next
|
235
|
+
# page of results. On first call this should be left blank. When paginating,
|
236
|
+
# all other parameters provided to migrationJobs.list must match the call
|
237
|
+
# that provided the page token.
|
238
|
+
# @param filter [::String]
|
239
|
+
# A filter expression that filters migration jobs listed in the response.
|
240
|
+
# The expression must specify the field name, a comparison operator, and the
|
241
|
+
# value that you want to use for filtering. The value must be a string,
|
242
|
+
# a number, or a boolean. The comparison operator must be
|
243
|
+
# either =, !=, >, or <. For example, list migration jobs created this year
|
244
|
+
# by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
|
245
|
+
# You can also filter nested fields. For example, you could specify
|
246
|
+
# **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
|
247
|
+
# jobs connecting through the specific SSH tunnel bastion.
|
248
|
+
# @param order_by [::String]
|
249
|
+
# Sort the results based on the migration job name.
|
250
|
+
# Valid values are: "name", "name asc", and "name desc".
|
251
|
+
#
|
252
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
253
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MigrationJob>]
|
254
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
255
|
+
#
|
256
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MigrationJob>]
|
257
|
+
#
|
258
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
259
|
+
#
|
260
|
+
def list_migration_jobs request, options = nil
|
261
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
262
|
+
|
263
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ListMigrationJobsRequest
|
264
|
+
|
265
|
+
# Converts hash and nil to an options object
|
266
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
267
|
+
|
268
|
+
# Customize the options with defaults
|
269
|
+
metadata = @config.rpcs.list_migration_jobs.metadata.to_h
|
270
|
+
|
271
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
272
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
273
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
274
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
275
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
276
|
+
|
277
|
+
header_params = {
|
278
|
+
"parent" => request.parent
|
279
|
+
}
|
280
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
281
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
282
|
+
|
283
|
+
options.apply_defaults timeout: @config.rpcs.list_migration_jobs.timeout,
|
284
|
+
metadata: metadata,
|
285
|
+
retry_policy: @config.rpcs.list_migration_jobs.retry_policy
|
286
|
+
options.apply_defaults metadata: @config.metadata,
|
287
|
+
retry_policy: @config.retry_policy
|
288
|
+
|
289
|
+
@data_migration_service_stub.call_rpc :list_migration_jobs, request, options: options do |response, operation|
|
290
|
+
response = ::Gapic::PagedEnumerable.new @data_migration_service_stub, :list_migration_jobs, request, response, operation, options
|
291
|
+
yield response, operation if block_given?
|
292
|
+
return response
|
293
|
+
end
|
294
|
+
rescue ::GRPC::BadStatus => e
|
295
|
+
raise ::Google::Cloud::Error.from_error(e)
|
296
|
+
end
|
297
|
+
|
298
|
+
##
|
299
|
+
# Gets details of a single migration job.
|
300
|
+
#
|
301
|
+
# @overload get_migration_job(request, options = nil)
|
302
|
+
# Pass arguments to `get_migration_job` via a request object, either of type
|
303
|
+
# {::Google::Cloud::CloudDMS::V1::GetMigrationJobRequest} or an equivalent Hash.
|
304
|
+
#
|
305
|
+
# @param request [::Google::Cloud::CloudDMS::V1::GetMigrationJobRequest, ::Hash]
|
306
|
+
# A request object representing the call parameters. Required. To specify no
|
307
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
308
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
309
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
310
|
+
#
|
311
|
+
# @overload get_migration_job(name: nil)
|
312
|
+
# Pass arguments to `get_migration_job` via keyword arguments. Note that at
|
313
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
314
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
315
|
+
#
|
316
|
+
# @param name [::String]
|
317
|
+
# Required. Name of the migration job resource to get.
|
318
|
+
#
|
319
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
320
|
+
# @yieldparam response [::Google::Cloud::CloudDMS::V1::MigrationJob]
|
321
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
322
|
+
#
|
323
|
+
# @return [::Google::Cloud::CloudDMS::V1::MigrationJob]
|
324
|
+
#
|
325
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
326
|
+
#
|
327
|
+
def get_migration_job request, options = nil
|
328
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
329
|
+
|
330
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GetMigrationJobRequest
|
331
|
+
|
332
|
+
# Converts hash and nil to an options object
|
333
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
334
|
+
|
335
|
+
# Customize the options with defaults
|
336
|
+
metadata = @config.rpcs.get_migration_job.metadata.to_h
|
337
|
+
|
338
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
339
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
340
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
341
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
342
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
343
|
+
|
344
|
+
header_params = {
|
345
|
+
"name" => request.name
|
346
|
+
}
|
347
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
348
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
349
|
+
|
350
|
+
options.apply_defaults timeout: @config.rpcs.get_migration_job.timeout,
|
351
|
+
metadata: metadata,
|
352
|
+
retry_policy: @config.rpcs.get_migration_job.retry_policy
|
353
|
+
options.apply_defaults metadata: @config.metadata,
|
354
|
+
retry_policy: @config.retry_policy
|
355
|
+
|
356
|
+
@data_migration_service_stub.call_rpc :get_migration_job, request, options: options do |response, operation|
|
357
|
+
yield response, operation if block_given?
|
358
|
+
return response
|
359
|
+
end
|
360
|
+
rescue ::GRPC::BadStatus => e
|
361
|
+
raise ::Google::Cloud::Error.from_error(e)
|
362
|
+
end
|
363
|
+
|
364
|
+
##
|
365
|
+
# Creates a new migration job in a given project and location.
|
366
|
+
#
|
367
|
+
# @overload create_migration_job(request, options = nil)
|
368
|
+
# Pass arguments to `create_migration_job` via a request object, either of type
|
369
|
+
# {::Google::Cloud::CloudDMS::V1::CreateMigrationJobRequest} or an equivalent Hash.
|
370
|
+
#
|
371
|
+
# @param request [::Google::Cloud::CloudDMS::V1::CreateMigrationJobRequest, ::Hash]
|
372
|
+
# A request object representing the call parameters. Required. To specify no
|
373
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
374
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
375
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
376
|
+
#
|
377
|
+
# @overload create_migration_job(parent: nil, migration_job_id: nil, migration_job: nil, request_id: nil)
|
378
|
+
# Pass arguments to `create_migration_job` via keyword arguments. Note that at
|
379
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
380
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
381
|
+
#
|
382
|
+
# @param parent [::String]
|
383
|
+
# Required. The parent, which owns this collection of migration jobs.
|
384
|
+
# @param migration_job_id [::String]
|
385
|
+
# Required. The ID of the instance to create.
|
386
|
+
# @param migration_job [::Google::Cloud::CloudDMS::V1::MigrationJob, ::Hash]
|
387
|
+
# Required. Represents a [migration
|
388
|
+
# job](https://cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.migrationJobs)
|
389
|
+
# object.
|
390
|
+
# @param request_id [::String]
|
391
|
+
# A unique id used to identify the request. If the server receives two
|
392
|
+
# requests with the same id, then the second request will be ignored.
|
393
|
+
#
|
394
|
+
# It is recommended to always set this value to a UUID.
|
395
|
+
#
|
396
|
+
# The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
397
|
+
# (_), and hyphens (-). The maximum length is 40 characters.
|
398
|
+
#
|
399
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
400
|
+
# @yieldparam response [::Gapic::Operation]
|
401
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
402
|
+
#
|
403
|
+
# @return [::Gapic::Operation]
|
404
|
+
#
|
405
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
406
|
+
#
|
407
|
+
def create_migration_job request, options = nil
|
408
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
409
|
+
|
410
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::CreateMigrationJobRequest
|
411
|
+
|
412
|
+
# Converts hash and nil to an options object
|
413
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
414
|
+
|
415
|
+
# Customize the options with defaults
|
416
|
+
metadata = @config.rpcs.create_migration_job.metadata.to_h
|
417
|
+
|
418
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
419
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
420
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
421
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
422
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
423
|
+
|
424
|
+
header_params = {
|
425
|
+
"parent" => request.parent
|
426
|
+
}
|
427
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
428
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
429
|
+
|
430
|
+
options.apply_defaults timeout: @config.rpcs.create_migration_job.timeout,
|
431
|
+
metadata: metadata,
|
432
|
+
retry_policy: @config.rpcs.create_migration_job.retry_policy
|
433
|
+
options.apply_defaults metadata: @config.metadata,
|
434
|
+
retry_policy: @config.retry_policy
|
435
|
+
|
436
|
+
@data_migration_service_stub.call_rpc :create_migration_job, request, options: options do |response, operation|
|
437
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
438
|
+
yield response, operation if block_given?
|
439
|
+
return response
|
440
|
+
end
|
441
|
+
rescue ::GRPC::BadStatus => e
|
442
|
+
raise ::Google::Cloud::Error.from_error(e)
|
443
|
+
end
|
444
|
+
|
445
|
+
##
|
446
|
+
# Updates the parameters of a single migration job.
|
447
|
+
#
|
448
|
+
# @overload update_migration_job(request, options = nil)
|
449
|
+
# Pass arguments to `update_migration_job` via a request object, either of type
|
450
|
+
# {::Google::Cloud::CloudDMS::V1::UpdateMigrationJobRequest} or an equivalent Hash.
|
451
|
+
#
|
452
|
+
# @param request [::Google::Cloud::CloudDMS::V1::UpdateMigrationJobRequest, ::Hash]
|
453
|
+
# A request object representing the call parameters. Required. To specify no
|
454
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
455
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
456
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
457
|
+
#
|
458
|
+
# @overload update_migration_job(update_mask: nil, migration_job: nil, request_id: nil)
|
459
|
+
# Pass arguments to `update_migration_job` via keyword arguments. Note that at
|
460
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
461
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
462
|
+
#
|
463
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
464
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
465
|
+
# migration job resource by the update.
|
466
|
+
# @param migration_job [::Google::Cloud::CloudDMS::V1::MigrationJob, ::Hash]
|
467
|
+
# Required. The migration job parameters to update.
|
468
|
+
# @param request_id [::String]
|
469
|
+
# A unique id used to identify the request. If the server receives two
|
470
|
+
# requests with the same id, then the second request will be ignored.
|
471
|
+
#
|
472
|
+
# It is recommended to always set this value to a UUID.
|
473
|
+
#
|
474
|
+
# The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
475
|
+
# (_), and hyphens (-). The maximum length is 40 characters.
|
476
|
+
#
|
477
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
478
|
+
# @yieldparam response [::Gapic::Operation]
|
479
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
480
|
+
#
|
481
|
+
# @return [::Gapic::Operation]
|
482
|
+
#
|
483
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
484
|
+
#
|
485
|
+
def update_migration_job request, options = nil
|
486
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
487
|
+
|
488
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::UpdateMigrationJobRequest
|
489
|
+
|
490
|
+
# Converts hash and nil to an options object
|
491
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
492
|
+
|
493
|
+
# Customize the options with defaults
|
494
|
+
metadata = @config.rpcs.update_migration_job.metadata.to_h
|
495
|
+
|
496
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
497
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
498
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
499
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
500
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
501
|
+
|
502
|
+
header_params = {
|
503
|
+
"migration_job.name" => request.migration_job.name
|
504
|
+
}
|
505
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
506
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
507
|
+
|
508
|
+
options.apply_defaults timeout: @config.rpcs.update_migration_job.timeout,
|
509
|
+
metadata: metadata,
|
510
|
+
retry_policy: @config.rpcs.update_migration_job.retry_policy
|
511
|
+
options.apply_defaults metadata: @config.metadata,
|
512
|
+
retry_policy: @config.retry_policy
|
513
|
+
|
514
|
+
@data_migration_service_stub.call_rpc :update_migration_job, request, options: options do |response, operation|
|
515
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
516
|
+
yield response, operation if block_given?
|
517
|
+
return response
|
518
|
+
end
|
519
|
+
rescue ::GRPC::BadStatus => e
|
520
|
+
raise ::Google::Cloud::Error.from_error(e)
|
521
|
+
end
|
522
|
+
|
523
|
+
##
|
524
|
+
# Deletes a single migration job.
|
525
|
+
#
|
526
|
+
# @overload delete_migration_job(request, options = nil)
|
527
|
+
# Pass arguments to `delete_migration_job` via a request object, either of type
|
528
|
+
# {::Google::Cloud::CloudDMS::V1::DeleteMigrationJobRequest} or an equivalent Hash.
|
529
|
+
#
|
530
|
+
# @param request [::Google::Cloud::CloudDMS::V1::DeleteMigrationJobRequest, ::Hash]
|
531
|
+
# A request object representing the call parameters. Required. To specify no
|
532
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
533
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
534
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
535
|
+
#
|
536
|
+
# @overload delete_migration_job(name: nil, request_id: nil, force: nil)
|
537
|
+
# Pass arguments to `delete_migration_job` via keyword arguments. Note that at
|
538
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
539
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
540
|
+
#
|
541
|
+
# @param name [::String]
|
542
|
+
# Required. Name of the migration job resource to delete.
|
543
|
+
# @param request_id [::String]
|
544
|
+
# A unique id used to identify the request. If the server receives two
|
545
|
+
# requests with the same id, then the second request will be ignored.
|
546
|
+
#
|
547
|
+
# It is recommended to always set this value to a UUID.
|
548
|
+
#
|
549
|
+
# The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
550
|
+
# (_), and hyphens (-). The maximum length is 40 characters.
|
551
|
+
# @param force [::Boolean]
|
552
|
+
# The destination CloudSQL connection profile is always deleted with the
|
553
|
+
# migration job. In case of force delete, the destination CloudSQL replica
|
554
|
+
# database is also deleted.
|
555
|
+
#
|
556
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
557
|
+
# @yieldparam response [::Gapic::Operation]
|
558
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
559
|
+
#
|
560
|
+
# @return [::Gapic::Operation]
|
561
|
+
#
|
562
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
563
|
+
#
|
564
|
+
def delete_migration_job request, options = nil
|
565
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
566
|
+
|
567
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::DeleteMigrationJobRequest
|
568
|
+
|
569
|
+
# Converts hash and nil to an options object
|
570
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
571
|
+
|
572
|
+
# Customize the options with defaults
|
573
|
+
metadata = @config.rpcs.delete_migration_job.metadata.to_h
|
574
|
+
|
575
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
576
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
577
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
578
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
579
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
580
|
+
|
581
|
+
header_params = {
|
582
|
+
"name" => request.name
|
583
|
+
}
|
584
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
585
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
586
|
+
|
587
|
+
options.apply_defaults timeout: @config.rpcs.delete_migration_job.timeout,
|
588
|
+
metadata: metadata,
|
589
|
+
retry_policy: @config.rpcs.delete_migration_job.retry_policy
|
590
|
+
options.apply_defaults metadata: @config.metadata,
|
591
|
+
retry_policy: @config.retry_policy
|
592
|
+
|
593
|
+
@data_migration_service_stub.call_rpc :delete_migration_job, request, options: options do |response, operation|
|
594
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
595
|
+
yield response, operation if block_given?
|
596
|
+
return response
|
597
|
+
end
|
598
|
+
rescue ::GRPC::BadStatus => e
|
599
|
+
raise ::Google::Cloud::Error.from_error(e)
|
600
|
+
end
|
601
|
+
|
602
|
+
##
|
603
|
+
# Start an already created migration job.
|
604
|
+
#
|
605
|
+
# @overload start_migration_job(request, options = nil)
|
606
|
+
# Pass arguments to `start_migration_job` via a request object, either of type
|
607
|
+
# {::Google::Cloud::CloudDMS::V1::StartMigrationJobRequest} or an equivalent Hash.
|
608
|
+
#
|
609
|
+
# @param request [::Google::Cloud::CloudDMS::V1::StartMigrationJobRequest, ::Hash]
|
610
|
+
# A request object representing the call parameters. Required. To specify no
|
611
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
612
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
613
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
614
|
+
#
|
615
|
+
# @overload start_migration_job(name: nil)
|
616
|
+
# Pass arguments to `start_migration_job` via keyword arguments. Note that at
|
617
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
618
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
619
|
+
#
|
620
|
+
# @param name [::String]
|
621
|
+
# Name of the migration job resource to start.
|
622
|
+
#
|
623
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
624
|
+
# @yieldparam response [::Gapic::Operation]
|
625
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
626
|
+
#
|
627
|
+
# @return [::Gapic::Operation]
|
628
|
+
#
|
629
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
630
|
+
#
|
631
|
+
def start_migration_job request, options = nil
|
632
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
633
|
+
|
634
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::StartMigrationJobRequest
|
635
|
+
|
636
|
+
# Converts hash and nil to an options object
|
637
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
638
|
+
|
639
|
+
# Customize the options with defaults
|
640
|
+
metadata = @config.rpcs.start_migration_job.metadata.to_h
|
641
|
+
|
642
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
643
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
644
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
645
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
646
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
647
|
+
|
648
|
+
header_params = {
|
649
|
+
"name" => request.name
|
650
|
+
}
|
651
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
652
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
653
|
+
|
654
|
+
options.apply_defaults timeout: @config.rpcs.start_migration_job.timeout,
|
655
|
+
metadata: metadata,
|
656
|
+
retry_policy: @config.rpcs.start_migration_job.retry_policy
|
657
|
+
options.apply_defaults metadata: @config.metadata,
|
658
|
+
retry_policy: @config.retry_policy
|
659
|
+
|
660
|
+
@data_migration_service_stub.call_rpc :start_migration_job, request, options: options do |response, operation|
|
661
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
662
|
+
yield response, operation if block_given?
|
663
|
+
return response
|
664
|
+
end
|
665
|
+
rescue ::GRPC::BadStatus => e
|
666
|
+
raise ::Google::Cloud::Error.from_error(e)
|
667
|
+
end
|
668
|
+
|
669
|
+
##
|
670
|
+
# Stops a running migration job.
|
671
|
+
#
|
672
|
+
# @overload stop_migration_job(request, options = nil)
|
673
|
+
# Pass arguments to `stop_migration_job` via a request object, either of type
|
674
|
+
# {::Google::Cloud::CloudDMS::V1::StopMigrationJobRequest} or an equivalent Hash.
|
675
|
+
#
|
676
|
+
# @param request [::Google::Cloud::CloudDMS::V1::StopMigrationJobRequest, ::Hash]
|
677
|
+
# A request object representing the call parameters. Required. To specify no
|
678
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
679
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
680
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
681
|
+
#
|
682
|
+
# @overload stop_migration_job(name: nil)
|
683
|
+
# Pass arguments to `stop_migration_job` via keyword arguments. Note that at
|
684
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
685
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
686
|
+
#
|
687
|
+
# @param name [::String]
|
688
|
+
# Name of the migration job resource to stop.
|
689
|
+
#
|
690
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
691
|
+
# @yieldparam response [::Gapic::Operation]
|
692
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
693
|
+
#
|
694
|
+
# @return [::Gapic::Operation]
|
695
|
+
#
|
696
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
697
|
+
#
|
698
|
+
def stop_migration_job request, options = nil
|
699
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
700
|
+
|
701
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::StopMigrationJobRequest
|
702
|
+
|
703
|
+
# Converts hash and nil to an options object
|
704
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
705
|
+
|
706
|
+
# Customize the options with defaults
|
707
|
+
metadata = @config.rpcs.stop_migration_job.metadata.to_h
|
708
|
+
|
709
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
710
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
711
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
712
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
713
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
714
|
+
|
715
|
+
header_params = {
|
716
|
+
"name" => request.name
|
717
|
+
}
|
718
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
719
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
720
|
+
|
721
|
+
options.apply_defaults timeout: @config.rpcs.stop_migration_job.timeout,
|
722
|
+
metadata: metadata,
|
723
|
+
retry_policy: @config.rpcs.stop_migration_job.retry_policy
|
724
|
+
options.apply_defaults metadata: @config.metadata,
|
725
|
+
retry_policy: @config.retry_policy
|
726
|
+
|
727
|
+
@data_migration_service_stub.call_rpc :stop_migration_job, request, options: options do |response, operation|
|
728
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
729
|
+
yield response, operation if block_given?
|
730
|
+
return response
|
731
|
+
end
|
732
|
+
rescue ::GRPC::BadStatus => e
|
733
|
+
raise ::Google::Cloud::Error.from_error(e)
|
734
|
+
end
|
735
|
+
|
736
|
+
##
|
737
|
+
# Resume a migration job that is currently stopped and is resumable (was
|
738
|
+
# stopped during CDC phase).
|
739
|
+
#
|
740
|
+
# @overload resume_migration_job(request, options = nil)
|
741
|
+
# Pass arguments to `resume_migration_job` via a request object, either of type
|
742
|
+
# {::Google::Cloud::CloudDMS::V1::ResumeMigrationJobRequest} or an equivalent Hash.
|
743
|
+
#
|
744
|
+
# @param request [::Google::Cloud::CloudDMS::V1::ResumeMigrationJobRequest, ::Hash]
|
745
|
+
# A request object representing the call parameters. Required. To specify no
|
746
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
747
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
748
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
749
|
+
#
|
750
|
+
# @overload resume_migration_job(name: nil)
|
751
|
+
# Pass arguments to `resume_migration_job` via keyword arguments. Note that at
|
752
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
753
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
754
|
+
#
|
755
|
+
# @param name [::String]
|
756
|
+
# Name of the migration job resource to resume.
|
757
|
+
#
|
758
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
759
|
+
# @yieldparam response [::Gapic::Operation]
|
760
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
761
|
+
#
|
762
|
+
# @return [::Gapic::Operation]
|
763
|
+
#
|
764
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
765
|
+
#
|
766
|
+
def resume_migration_job request, options = nil
|
767
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
768
|
+
|
769
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ResumeMigrationJobRequest
|
770
|
+
|
771
|
+
# Converts hash and nil to an options object
|
772
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
773
|
+
|
774
|
+
# Customize the options with defaults
|
775
|
+
metadata = @config.rpcs.resume_migration_job.metadata.to_h
|
776
|
+
|
777
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
778
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
779
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
780
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
781
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
782
|
+
|
783
|
+
header_params = {
|
784
|
+
"name" => request.name
|
785
|
+
}
|
786
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
787
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
788
|
+
|
789
|
+
options.apply_defaults timeout: @config.rpcs.resume_migration_job.timeout,
|
790
|
+
metadata: metadata,
|
791
|
+
retry_policy: @config.rpcs.resume_migration_job.retry_policy
|
792
|
+
options.apply_defaults metadata: @config.metadata,
|
793
|
+
retry_policy: @config.retry_policy
|
794
|
+
|
795
|
+
@data_migration_service_stub.call_rpc :resume_migration_job, request, options: options do |response, operation|
|
796
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
797
|
+
yield response, operation if block_given?
|
798
|
+
return response
|
799
|
+
end
|
800
|
+
rescue ::GRPC::BadStatus => e
|
801
|
+
raise ::Google::Cloud::Error.from_error(e)
|
802
|
+
end
|
803
|
+
|
804
|
+
##
|
805
|
+
# Promote a migration job, stopping replication to the destination and
|
806
|
+
# promoting the destination to be a standalone database.
|
807
|
+
#
|
808
|
+
# @overload promote_migration_job(request, options = nil)
|
809
|
+
# Pass arguments to `promote_migration_job` via a request object, either of type
|
810
|
+
# {::Google::Cloud::CloudDMS::V1::PromoteMigrationJobRequest} or an equivalent Hash.
|
811
|
+
#
|
812
|
+
# @param request [::Google::Cloud::CloudDMS::V1::PromoteMigrationJobRequest, ::Hash]
|
813
|
+
# A request object representing the call parameters. Required. To specify no
|
814
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
815
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
816
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
817
|
+
#
|
818
|
+
# @overload promote_migration_job(name: nil)
|
819
|
+
# Pass arguments to `promote_migration_job` via keyword arguments. Note that at
|
820
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
821
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
822
|
+
#
|
823
|
+
# @param name [::String]
|
824
|
+
# Name of the migration job resource to promote.
|
825
|
+
#
|
826
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
827
|
+
# @yieldparam response [::Gapic::Operation]
|
828
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
829
|
+
#
|
830
|
+
# @return [::Gapic::Operation]
|
831
|
+
#
|
832
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
833
|
+
#
|
834
|
+
def promote_migration_job request, options = nil
|
835
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
836
|
+
|
837
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::PromoteMigrationJobRequest
|
838
|
+
|
839
|
+
# Converts hash and nil to an options object
|
840
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
841
|
+
|
842
|
+
# Customize the options with defaults
|
843
|
+
metadata = @config.rpcs.promote_migration_job.metadata.to_h
|
844
|
+
|
845
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
846
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
847
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
848
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
849
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
850
|
+
|
851
|
+
header_params = {
|
852
|
+
"name" => request.name
|
853
|
+
}
|
854
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
855
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
856
|
+
|
857
|
+
options.apply_defaults timeout: @config.rpcs.promote_migration_job.timeout,
|
858
|
+
metadata: metadata,
|
859
|
+
retry_policy: @config.rpcs.promote_migration_job.retry_policy
|
860
|
+
options.apply_defaults metadata: @config.metadata,
|
861
|
+
retry_policy: @config.retry_policy
|
862
|
+
|
863
|
+
@data_migration_service_stub.call_rpc :promote_migration_job, request, options: options do |response, operation|
|
864
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
865
|
+
yield response, operation if block_given?
|
866
|
+
return response
|
867
|
+
end
|
868
|
+
rescue ::GRPC::BadStatus => e
|
869
|
+
raise ::Google::Cloud::Error.from_error(e)
|
870
|
+
end
|
871
|
+
|
872
|
+
##
|
873
|
+
# Verify a migration job, making sure the destination can reach the source
|
874
|
+
# and that all configuration and prerequisites are met.
|
875
|
+
#
|
876
|
+
# @overload verify_migration_job(request, options = nil)
|
877
|
+
# Pass arguments to `verify_migration_job` via a request object, either of type
|
878
|
+
# {::Google::Cloud::CloudDMS::V1::VerifyMigrationJobRequest} or an equivalent Hash.
|
879
|
+
#
|
880
|
+
# @param request [::Google::Cloud::CloudDMS::V1::VerifyMigrationJobRequest, ::Hash]
|
881
|
+
# A request object representing the call parameters. Required. To specify no
|
882
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
883
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
884
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
885
|
+
#
|
886
|
+
# @overload verify_migration_job(name: nil)
|
887
|
+
# Pass arguments to `verify_migration_job` via keyword arguments. Note that at
|
888
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
889
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
890
|
+
#
|
891
|
+
# @param name [::String]
|
892
|
+
# Name of the migration job resource to verify.
|
893
|
+
#
|
894
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
895
|
+
# @yieldparam response [::Gapic::Operation]
|
896
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
897
|
+
#
|
898
|
+
# @return [::Gapic::Operation]
|
899
|
+
#
|
900
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
901
|
+
#
|
902
|
+
def verify_migration_job request, options = nil
|
903
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
904
|
+
|
905
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::VerifyMigrationJobRequest
|
906
|
+
|
907
|
+
# Converts hash and nil to an options object
|
908
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
909
|
+
|
910
|
+
# Customize the options with defaults
|
911
|
+
metadata = @config.rpcs.verify_migration_job.metadata.to_h
|
912
|
+
|
913
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
914
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
915
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
916
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
917
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
918
|
+
|
919
|
+
header_params = {
|
920
|
+
"name" => request.name
|
921
|
+
}
|
922
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
923
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
924
|
+
|
925
|
+
options.apply_defaults timeout: @config.rpcs.verify_migration_job.timeout,
|
926
|
+
metadata: metadata,
|
927
|
+
retry_policy: @config.rpcs.verify_migration_job.retry_policy
|
928
|
+
options.apply_defaults metadata: @config.metadata,
|
929
|
+
retry_policy: @config.retry_policy
|
930
|
+
|
931
|
+
@data_migration_service_stub.call_rpc :verify_migration_job, request, options: options do |response, operation|
|
932
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
933
|
+
yield response, operation if block_given?
|
934
|
+
return response
|
935
|
+
end
|
936
|
+
rescue ::GRPC::BadStatus => e
|
937
|
+
raise ::Google::Cloud::Error.from_error(e)
|
938
|
+
end
|
939
|
+
|
940
|
+
##
|
941
|
+
# Restart a stopped or failed migration job, resetting the destination
|
942
|
+
# instance to its original state and starting the migration process from
|
943
|
+
# scratch.
|
944
|
+
#
|
945
|
+
# @overload restart_migration_job(request, options = nil)
|
946
|
+
# Pass arguments to `restart_migration_job` via a request object, either of type
|
947
|
+
# {::Google::Cloud::CloudDMS::V1::RestartMigrationJobRequest} or an equivalent Hash.
|
948
|
+
#
|
949
|
+
# @param request [::Google::Cloud::CloudDMS::V1::RestartMigrationJobRequest, ::Hash]
|
950
|
+
# A request object representing the call parameters. Required. To specify no
|
951
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
952
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
953
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
954
|
+
#
|
955
|
+
# @overload restart_migration_job(name: nil)
|
956
|
+
# Pass arguments to `restart_migration_job` via keyword arguments. Note that at
|
957
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
958
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
959
|
+
#
|
960
|
+
# @param name [::String]
|
961
|
+
# Name of the migration job resource to restart.
|
962
|
+
#
|
963
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
964
|
+
# @yieldparam response [::Gapic::Operation]
|
965
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
966
|
+
#
|
967
|
+
# @return [::Gapic::Operation]
|
968
|
+
#
|
969
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
970
|
+
#
|
971
|
+
def restart_migration_job request, options = nil
|
972
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
973
|
+
|
974
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::RestartMigrationJobRequest
|
975
|
+
|
976
|
+
# Converts hash and nil to an options object
|
977
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
978
|
+
|
979
|
+
# Customize the options with defaults
|
980
|
+
metadata = @config.rpcs.restart_migration_job.metadata.to_h
|
981
|
+
|
982
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
983
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
984
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
985
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
986
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
987
|
+
|
988
|
+
header_params = {
|
989
|
+
"name" => request.name
|
990
|
+
}
|
991
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
992
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
993
|
+
|
994
|
+
options.apply_defaults timeout: @config.rpcs.restart_migration_job.timeout,
|
995
|
+
metadata: metadata,
|
996
|
+
retry_policy: @config.rpcs.restart_migration_job.retry_policy
|
997
|
+
options.apply_defaults metadata: @config.metadata,
|
998
|
+
retry_policy: @config.retry_policy
|
999
|
+
|
1000
|
+
@data_migration_service_stub.call_rpc :restart_migration_job, request, options: options do |response, operation|
|
1001
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1002
|
+
yield response, operation if block_given?
|
1003
|
+
return response
|
1004
|
+
end
|
1005
|
+
rescue ::GRPC::BadStatus => e
|
1006
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
##
|
1010
|
+
# Generate a SSH configuration script to configure the reverse SSH
|
1011
|
+
# connectivity.
|
1012
|
+
#
|
1013
|
+
# @overload generate_ssh_script(request, options = nil)
|
1014
|
+
# Pass arguments to `generate_ssh_script` via a request object, either of type
|
1015
|
+
# {::Google::Cloud::CloudDMS::V1::GenerateSshScriptRequest} or an equivalent Hash.
|
1016
|
+
#
|
1017
|
+
# @param request [::Google::Cloud::CloudDMS::V1::GenerateSshScriptRequest, ::Hash]
|
1018
|
+
# A request object representing the call parameters. Required. To specify no
|
1019
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1020
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1021
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1022
|
+
#
|
1023
|
+
# @overload generate_ssh_script(migration_job: nil, vm: nil, vm_creation_config: nil, vm_selection_config: nil, vm_port: nil)
|
1024
|
+
# Pass arguments to `generate_ssh_script` via keyword arguments. Note that at
|
1025
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1026
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1027
|
+
#
|
1028
|
+
# @param migration_job [::String]
|
1029
|
+
# Name of the migration job resource to generate the SSH script.
|
1030
|
+
# @param vm [::String]
|
1031
|
+
# Required. Bastion VM Instance name to use or to create.
|
1032
|
+
# @param vm_creation_config [::Google::Cloud::CloudDMS::V1::VmCreationConfig, ::Hash]
|
1033
|
+
# The VM creation configuration
|
1034
|
+
# @param vm_selection_config [::Google::Cloud::CloudDMS::V1::VmSelectionConfig, ::Hash]
|
1035
|
+
# The VM selection configuration
|
1036
|
+
# @param vm_port [::Integer]
|
1037
|
+
# The port that will be open on the bastion host
|
1038
|
+
#
|
1039
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1040
|
+
# @yieldparam response [::Google::Cloud::CloudDMS::V1::SshScript]
|
1041
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1042
|
+
#
|
1043
|
+
# @return [::Google::Cloud::CloudDMS::V1::SshScript]
|
1044
|
+
#
|
1045
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1046
|
+
#
|
1047
|
+
def generate_ssh_script request, options = nil
|
1048
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1049
|
+
|
1050
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GenerateSshScriptRequest
|
1051
|
+
|
1052
|
+
# Converts hash and nil to an options object
|
1053
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1054
|
+
|
1055
|
+
# Customize the options with defaults
|
1056
|
+
metadata = @config.rpcs.generate_ssh_script.metadata.to_h
|
1057
|
+
|
1058
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1059
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1060
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1061
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
1062
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1063
|
+
|
1064
|
+
header_params = {
|
1065
|
+
"migration_job" => request.migration_job
|
1066
|
+
}
|
1067
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1068
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1069
|
+
|
1070
|
+
options.apply_defaults timeout: @config.rpcs.generate_ssh_script.timeout,
|
1071
|
+
metadata: metadata,
|
1072
|
+
retry_policy: @config.rpcs.generate_ssh_script.retry_policy
|
1073
|
+
options.apply_defaults metadata: @config.metadata,
|
1074
|
+
retry_policy: @config.retry_policy
|
1075
|
+
|
1076
|
+
@data_migration_service_stub.call_rpc :generate_ssh_script, request, options: options do |response, operation|
|
1077
|
+
yield response, operation if block_given?
|
1078
|
+
return response
|
1079
|
+
end
|
1080
|
+
rescue ::GRPC::BadStatus => e
|
1081
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
##
|
1085
|
+
# Retrieve a list of all connection profiles in a given project and location.
|
1086
|
+
#
|
1087
|
+
# @overload list_connection_profiles(request, options = nil)
|
1088
|
+
# Pass arguments to `list_connection_profiles` via a request object, either of type
|
1089
|
+
# {::Google::Cloud::CloudDMS::V1::ListConnectionProfilesRequest} or an equivalent Hash.
|
1090
|
+
#
|
1091
|
+
# @param request [::Google::Cloud::CloudDMS::V1::ListConnectionProfilesRequest, ::Hash]
|
1092
|
+
# A request object representing the call parameters. Required. To specify no
|
1093
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1094
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1095
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1096
|
+
#
|
1097
|
+
# @overload list_connection_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1098
|
+
# Pass arguments to `list_connection_profiles` via keyword arguments. Note that at
|
1099
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1100
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1101
|
+
#
|
1102
|
+
# @param parent [::String]
|
1103
|
+
# Required. The parent, which owns this collection of connection profiles.
|
1104
|
+
# @param page_size [::Integer]
|
1105
|
+
# The maximum number of connection profiles to return. The service may return
|
1106
|
+
# fewer than this value. If unspecified, at most 50 connection profiles will
|
1107
|
+
# be returned. The maximum value is 1000; values above 1000 will be coerced
|
1108
|
+
# to 1000.
|
1109
|
+
# @param page_token [::String]
|
1110
|
+
# A page token, received from a previous `ListConnectionProfiles` call.
|
1111
|
+
# Provide this to retrieve the subsequent page.
|
1112
|
+
#
|
1113
|
+
# When paginating, all other parameters provided to `ListConnectionProfiles`
|
1114
|
+
# must match the call that provided the page token.
|
1115
|
+
# @param filter [::String]
|
1116
|
+
# A filter expression that filters connection profiles listed in the
|
1117
|
+
# response. The expression must specify the field name, a comparison
|
1118
|
+
# operator, and the value that you want to use for filtering. The value must
|
1119
|
+
# be a string, a number, or a boolean. The comparison operator must be either
|
1120
|
+
# =, !=, >, or <. For example, list connection profiles created this year by
|
1121
|
+
# specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
|
1122
|
+
# also filter nested fields. For example, you could specify **mySql.username
|
1123
|
+
# = %lt;my_username%gt;** to list all connection profiles configured to
|
1124
|
+
# connect with a specific username.
|
1125
|
+
# @param order_by [::String]
|
1126
|
+
# the order by fields for the result.
|
1127
|
+
#
|
1128
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1129
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConnectionProfile>]
|
1130
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1131
|
+
#
|
1132
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConnectionProfile>]
|
1133
|
+
#
|
1134
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1135
|
+
#
|
1136
|
+
def list_connection_profiles request, options = nil
|
1137
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1138
|
+
|
1139
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ListConnectionProfilesRequest
|
1140
|
+
|
1141
|
+
# Converts hash and nil to an options object
|
1142
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1143
|
+
|
1144
|
+
# Customize the options with defaults
|
1145
|
+
metadata = @config.rpcs.list_connection_profiles.metadata.to_h
|
1146
|
+
|
1147
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1148
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1149
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1150
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
1151
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1152
|
+
|
1153
|
+
header_params = {
|
1154
|
+
"parent" => request.parent
|
1155
|
+
}
|
1156
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1157
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1158
|
+
|
1159
|
+
options.apply_defaults timeout: @config.rpcs.list_connection_profiles.timeout,
|
1160
|
+
metadata: metadata,
|
1161
|
+
retry_policy: @config.rpcs.list_connection_profiles.retry_policy
|
1162
|
+
options.apply_defaults metadata: @config.metadata,
|
1163
|
+
retry_policy: @config.retry_policy
|
1164
|
+
|
1165
|
+
@data_migration_service_stub.call_rpc :list_connection_profiles, request, options: options do |response, operation|
|
1166
|
+
response = ::Gapic::PagedEnumerable.new @data_migration_service_stub, :list_connection_profiles, request, response, operation, options
|
1167
|
+
yield response, operation if block_given?
|
1168
|
+
return response
|
1169
|
+
end
|
1170
|
+
rescue ::GRPC::BadStatus => e
|
1171
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
##
|
1175
|
+
# Gets details of a single connection profile.
|
1176
|
+
#
|
1177
|
+
# @overload get_connection_profile(request, options = nil)
|
1178
|
+
# Pass arguments to `get_connection_profile` via a request object, either of type
|
1179
|
+
# {::Google::Cloud::CloudDMS::V1::GetConnectionProfileRequest} or an equivalent Hash.
|
1180
|
+
#
|
1181
|
+
# @param request [::Google::Cloud::CloudDMS::V1::GetConnectionProfileRequest, ::Hash]
|
1182
|
+
# A request object representing the call parameters. Required. To specify no
|
1183
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1184
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1185
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1186
|
+
#
|
1187
|
+
# @overload get_connection_profile(name: nil)
|
1188
|
+
# Pass arguments to `get_connection_profile` via keyword arguments. Note that at
|
1189
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1190
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1191
|
+
#
|
1192
|
+
# @param name [::String]
|
1193
|
+
# Required. Name of the connection profile resource to get.
|
1194
|
+
#
|
1195
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1196
|
+
# @yieldparam response [::Google::Cloud::CloudDMS::V1::ConnectionProfile]
|
1197
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1198
|
+
#
|
1199
|
+
# @return [::Google::Cloud::CloudDMS::V1::ConnectionProfile]
|
1200
|
+
#
|
1201
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1202
|
+
#
|
1203
|
+
def get_connection_profile request, options = nil
|
1204
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1205
|
+
|
1206
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GetConnectionProfileRequest
|
1207
|
+
|
1208
|
+
# Converts hash and nil to an options object
|
1209
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1210
|
+
|
1211
|
+
# Customize the options with defaults
|
1212
|
+
metadata = @config.rpcs.get_connection_profile.metadata.to_h
|
1213
|
+
|
1214
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1215
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1216
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1217
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
1218
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1219
|
+
|
1220
|
+
header_params = {
|
1221
|
+
"name" => request.name
|
1222
|
+
}
|
1223
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1224
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1225
|
+
|
1226
|
+
options.apply_defaults timeout: @config.rpcs.get_connection_profile.timeout,
|
1227
|
+
metadata: metadata,
|
1228
|
+
retry_policy: @config.rpcs.get_connection_profile.retry_policy
|
1229
|
+
options.apply_defaults metadata: @config.metadata,
|
1230
|
+
retry_policy: @config.retry_policy
|
1231
|
+
|
1232
|
+
@data_migration_service_stub.call_rpc :get_connection_profile, request, options: options do |response, operation|
|
1233
|
+
yield response, operation if block_given?
|
1234
|
+
return response
|
1235
|
+
end
|
1236
|
+
rescue ::GRPC::BadStatus => e
|
1237
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1238
|
+
end
|
1239
|
+
|
1240
|
+
##
|
1241
|
+
# Creates a new connection profile in a given project and location.
|
1242
|
+
#
|
1243
|
+
# @overload create_connection_profile(request, options = nil)
|
1244
|
+
# Pass arguments to `create_connection_profile` via a request object, either of type
|
1245
|
+
# {::Google::Cloud::CloudDMS::V1::CreateConnectionProfileRequest} or an equivalent Hash.
|
1246
|
+
#
|
1247
|
+
# @param request [::Google::Cloud::CloudDMS::V1::CreateConnectionProfileRequest, ::Hash]
|
1248
|
+
# A request object representing the call parameters. Required. To specify no
|
1249
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1250
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1251
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1252
|
+
#
|
1253
|
+
# @overload create_connection_profile(parent: nil, connection_profile_id: nil, connection_profile: nil, request_id: nil)
|
1254
|
+
# Pass arguments to `create_connection_profile` via keyword arguments. Note that at
|
1255
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1256
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1257
|
+
#
|
1258
|
+
# @param parent [::String]
|
1259
|
+
# Required. The parent, which owns this collection of connection profiles.
|
1260
|
+
# @param connection_profile_id [::String]
|
1261
|
+
# Required. The connection profile identifier.
|
1262
|
+
# @param connection_profile [::Google::Cloud::CloudDMS::V1::ConnectionProfile, ::Hash]
|
1263
|
+
# Required. The create request body including the connection profile data
|
1264
|
+
# @param request_id [::String]
|
1265
|
+
# A unique id used to identify the request. If the server receives two
|
1266
|
+
# requests with the same id, then the second request will be ignored.
|
1267
|
+
#
|
1268
|
+
# It is recommended to always set this value to a UUID.
|
1269
|
+
#
|
1270
|
+
# The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
1271
|
+
# (_), and hyphens (-). The maximum length is 40 characters.
|
1272
|
+
#
|
1273
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1274
|
+
# @yieldparam response [::Gapic::Operation]
|
1275
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1276
|
+
#
|
1277
|
+
# @return [::Gapic::Operation]
|
1278
|
+
#
|
1279
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1280
|
+
#
|
1281
|
+
def create_connection_profile request, options = nil
|
1282
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1283
|
+
|
1284
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::CreateConnectionProfileRequest
|
1285
|
+
|
1286
|
+
# Converts hash and nil to an options object
|
1287
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1288
|
+
|
1289
|
+
# Customize the options with defaults
|
1290
|
+
metadata = @config.rpcs.create_connection_profile.metadata.to_h
|
1291
|
+
|
1292
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1293
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1294
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1295
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
1296
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1297
|
+
|
1298
|
+
header_params = {
|
1299
|
+
"parent" => request.parent
|
1300
|
+
}
|
1301
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1302
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1303
|
+
|
1304
|
+
options.apply_defaults timeout: @config.rpcs.create_connection_profile.timeout,
|
1305
|
+
metadata: metadata,
|
1306
|
+
retry_policy: @config.rpcs.create_connection_profile.retry_policy
|
1307
|
+
options.apply_defaults metadata: @config.metadata,
|
1308
|
+
retry_policy: @config.retry_policy
|
1309
|
+
|
1310
|
+
@data_migration_service_stub.call_rpc :create_connection_profile, request, options: options do |response, operation|
|
1311
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1312
|
+
yield response, operation if block_given?
|
1313
|
+
return response
|
1314
|
+
end
|
1315
|
+
rescue ::GRPC::BadStatus => e
|
1316
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1317
|
+
end
|
1318
|
+
|
1319
|
+
##
|
1320
|
+
# Update the configuration of a single connection profile.
|
1321
|
+
#
|
1322
|
+
# @overload update_connection_profile(request, options = nil)
|
1323
|
+
# Pass arguments to `update_connection_profile` via a request object, either of type
|
1324
|
+
# {::Google::Cloud::CloudDMS::V1::UpdateConnectionProfileRequest} or an equivalent Hash.
|
1325
|
+
#
|
1326
|
+
# @param request [::Google::Cloud::CloudDMS::V1::UpdateConnectionProfileRequest, ::Hash]
|
1327
|
+
# A request object representing the call parameters. Required. To specify no
|
1328
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1329
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1330
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1331
|
+
#
|
1332
|
+
# @overload update_connection_profile(update_mask: nil, connection_profile: nil, request_id: nil)
|
1333
|
+
# Pass arguments to `update_connection_profile` via keyword arguments. Note that at
|
1334
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1335
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1336
|
+
#
|
1337
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1338
|
+
# Required. Field mask is used to specify the fields to be overwritten in the
|
1339
|
+
# connection profile resource by the update.
|
1340
|
+
# @param connection_profile [::Google::Cloud::CloudDMS::V1::ConnectionProfile, ::Hash]
|
1341
|
+
# Required. The connection profile parameters to update.
|
1342
|
+
# @param request_id [::String]
|
1343
|
+
# A unique id used to identify the request. If the server receives two
|
1344
|
+
# requests with the same id, then the second request will be ignored.
|
1345
|
+
#
|
1346
|
+
# It is recommended to always set this value to a UUID.
|
1347
|
+
#
|
1348
|
+
# The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
1349
|
+
# (_), and hyphens (-). The maximum length is 40 characters.
|
1350
|
+
#
|
1351
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1352
|
+
# @yieldparam response [::Gapic::Operation]
|
1353
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1354
|
+
#
|
1355
|
+
# @return [::Gapic::Operation]
|
1356
|
+
#
|
1357
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1358
|
+
#
|
1359
|
+
def update_connection_profile request, options = nil
|
1360
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1361
|
+
|
1362
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::UpdateConnectionProfileRequest
|
1363
|
+
|
1364
|
+
# Converts hash and nil to an options object
|
1365
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1366
|
+
|
1367
|
+
# Customize the options with defaults
|
1368
|
+
metadata = @config.rpcs.update_connection_profile.metadata.to_h
|
1369
|
+
|
1370
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1371
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1372
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1373
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
1374
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1375
|
+
|
1376
|
+
header_params = {
|
1377
|
+
"connection_profile.name" => request.connection_profile.name
|
1378
|
+
}
|
1379
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1380
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1381
|
+
|
1382
|
+
options.apply_defaults timeout: @config.rpcs.update_connection_profile.timeout,
|
1383
|
+
metadata: metadata,
|
1384
|
+
retry_policy: @config.rpcs.update_connection_profile.retry_policy
|
1385
|
+
options.apply_defaults metadata: @config.metadata,
|
1386
|
+
retry_policy: @config.retry_policy
|
1387
|
+
|
1388
|
+
@data_migration_service_stub.call_rpc :update_connection_profile, request, options: options do |response, operation|
|
1389
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1390
|
+
yield response, operation if block_given?
|
1391
|
+
return response
|
1392
|
+
end
|
1393
|
+
rescue ::GRPC::BadStatus => e
|
1394
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1395
|
+
end
|
1396
|
+
|
1397
|
+
##
|
1398
|
+
# Deletes a single Database Migration Service connection profile.
|
1399
|
+
# A connection profile can only be deleted if it is not in use by any
|
1400
|
+
# active migration jobs.
|
1401
|
+
#
|
1402
|
+
# @overload delete_connection_profile(request, options = nil)
|
1403
|
+
# Pass arguments to `delete_connection_profile` via a request object, either of type
|
1404
|
+
# {::Google::Cloud::CloudDMS::V1::DeleteConnectionProfileRequest} or an equivalent Hash.
|
1405
|
+
#
|
1406
|
+
# @param request [::Google::Cloud::CloudDMS::V1::DeleteConnectionProfileRequest, ::Hash]
|
1407
|
+
# A request object representing the call parameters. Required. To specify no
|
1408
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1409
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1410
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1411
|
+
#
|
1412
|
+
# @overload delete_connection_profile(name: nil, request_id: nil, force: nil)
|
1413
|
+
# Pass arguments to `delete_connection_profile` via keyword arguments. Note that at
|
1414
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1415
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1416
|
+
#
|
1417
|
+
# @param name [::String]
|
1418
|
+
# Required. Name of the connection profile resource to delete.
|
1419
|
+
# @param request_id [::String]
|
1420
|
+
# A unique id used to identify the request. If the server receives two
|
1421
|
+
# requests with the same id, then the second request will be ignored.
|
1422
|
+
#
|
1423
|
+
# It is recommended to always set this value to a UUID.
|
1424
|
+
#
|
1425
|
+
# The id must contain only letters (a-z, A-Z), numbers (0-9), underscores
|
1426
|
+
# (_), and hyphens (-). The maximum length is 40 characters.
|
1427
|
+
# @param force [::Boolean]
|
1428
|
+
# In case of force delete, the CloudSQL replica database is also deleted
|
1429
|
+
# (only for CloudSQL connection profile).
|
1430
|
+
#
|
1431
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1432
|
+
# @yieldparam response [::Gapic::Operation]
|
1433
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1434
|
+
#
|
1435
|
+
# @return [::Gapic::Operation]
|
1436
|
+
#
|
1437
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1438
|
+
#
|
1439
|
+
def delete_connection_profile request, options = nil
|
1440
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1441
|
+
|
1442
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::DeleteConnectionProfileRequest
|
1443
|
+
|
1444
|
+
# Converts hash and nil to an options object
|
1445
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1446
|
+
|
1447
|
+
# Customize the options with defaults
|
1448
|
+
metadata = @config.rpcs.delete_connection_profile.metadata.to_h
|
1449
|
+
|
1450
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1451
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1452
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1453
|
+
gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
|
1454
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1455
|
+
|
1456
|
+
header_params = {
|
1457
|
+
"name" => request.name
|
1458
|
+
}
|
1459
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1460
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1461
|
+
|
1462
|
+
options.apply_defaults timeout: @config.rpcs.delete_connection_profile.timeout,
|
1463
|
+
metadata: metadata,
|
1464
|
+
retry_policy: @config.rpcs.delete_connection_profile.retry_policy
|
1465
|
+
options.apply_defaults metadata: @config.metadata,
|
1466
|
+
retry_policy: @config.retry_policy
|
1467
|
+
|
1468
|
+
@data_migration_service_stub.call_rpc :delete_connection_profile, request, options: options do |response, operation|
|
1469
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1470
|
+
yield response, operation if block_given?
|
1471
|
+
return response
|
1472
|
+
end
|
1473
|
+
rescue ::GRPC::BadStatus => e
|
1474
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1475
|
+
end
|
1476
|
+
|
1477
|
+
##
|
1478
|
+
# Configuration class for the DataMigrationService API.
|
1479
|
+
#
|
1480
|
+
# This class represents the configuration for DataMigrationService,
|
1481
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1482
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1483
|
+
# applied individually to specific RPCs. See
|
1484
|
+
# {::Google::Cloud::CloudDMS::V1::DataMigrationService::Client::Configuration::Rpcs}
|
1485
|
+
# for a list of RPCs that can be configured independently.
|
1486
|
+
#
|
1487
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1488
|
+
# on construction.
|
1489
|
+
#
|
1490
|
+
# # Examples
|
1491
|
+
#
|
1492
|
+
# To modify the global config, setting the timeout for list_migration_jobs
|
1493
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1494
|
+
#
|
1495
|
+
# ::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.configure do |config|
|
1496
|
+
# config.timeout = 10.0
|
1497
|
+
# config.rpcs.list_migration_jobs.timeout = 20.0
|
1498
|
+
# end
|
1499
|
+
#
|
1500
|
+
# To apply the above configuration only to a new client:
|
1501
|
+
#
|
1502
|
+
# client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new do |config|
|
1503
|
+
# config.timeout = 10.0
|
1504
|
+
# config.rpcs.list_migration_jobs.timeout = 20.0
|
1505
|
+
# end
|
1506
|
+
#
|
1507
|
+
# @!attribute [rw] endpoint
|
1508
|
+
# The hostname or hostname:port of the service endpoint.
|
1509
|
+
# Defaults to `"datamigration.googleapis.com"`.
|
1510
|
+
# @return [::String]
|
1511
|
+
# @!attribute [rw] credentials
|
1512
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1513
|
+
# * (`String`) The path to a service account key file in JSON format
|
1514
|
+
# * (`Hash`) A service account key as a Hash
|
1515
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1516
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1517
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1518
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1519
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1520
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1521
|
+
# * (`nil`) indicating no credentials
|
1522
|
+
# @return [::Object]
|
1523
|
+
# @!attribute [rw] scope
|
1524
|
+
# The OAuth scopes
|
1525
|
+
# @return [::Array<::String>]
|
1526
|
+
# @!attribute [rw] lib_name
|
1527
|
+
# The library name as recorded in instrumentation and logging
|
1528
|
+
# @return [::String]
|
1529
|
+
# @!attribute [rw] lib_version
|
1530
|
+
# The library version as recorded in instrumentation and logging
|
1531
|
+
# @return [::String]
|
1532
|
+
# @!attribute [rw] channel_args
|
1533
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1534
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1535
|
+
# @return [::Hash]
|
1536
|
+
# @!attribute [rw] interceptors
|
1537
|
+
# An array of interceptors that are run before calls are executed.
|
1538
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1539
|
+
# @!attribute [rw] timeout
|
1540
|
+
# The call timeout in seconds.
|
1541
|
+
# @return [::Numeric]
|
1542
|
+
# @!attribute [rw] metadata
|
1543
|
+
# Additional gRPC headers to be sent with the call.
|
1544
|
+
# @return [::Hash{::Symbol=>::String}]
|
1545
|
+
# @!attribute [rw] retry_policy
|
1546
|
+
# The retry policy. The value is a hash with the following keys:
|
1547
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1548
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1549
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1550
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1551
|
+
# trigger a retry.
|
1552
|
+
# @return [::Hash]
|
1553
|
+
# @!attribute [rw] quota_project
|
1554
|
+
# A separate project against which to charge quota.
|
1555
|
+
# @return [::String]
|
1556
|
+
#
|
1557
|
+
class Configuration
|
1558
|
+
extend ::Gapic::Config
|
1559
|
+
|
1560
|
+
config_attr :endpoint, "datamigration.googleapis.com", ::String
|
1561
|
+
config_attr :credentials, nil do |value|
|
1562
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1563
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1564
|
+
allowed.any? { |klass| klass === value }
|
1565
|
+
end
|
1566
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1567
|
+
config_attr :lib_name, nil, ::String, nil
|
1568
|
+
config_attr :lib_version, nil, ::String, nil
|
1569
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1570
|
+
config_attr :interceptors, nil, ::Array, nil
|
1571
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1572
|
+
config_attr :metadata, nil, ::Hash, nil
|
1573
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1574
|
+
config_attr :quota_project, nil, ::String, nil
|
1575
|
+
|
1576
|
+
# @private
|
1577
|
+
def initialize parent_config = nil
|
1578
|
+
@parent_config = parent_config unless parent_config.nil?
|
1579
|
+
|
1580
|
+
yield self if block_given?
|
1581
|
+
end
|
1582
|
+
|
1583
|
+
##
|
1584
|
+
# Configurations for individual RPCs
|
1585
|
+
# @return [Rpcs]
|
1586
|
+
#
|
1587
|
+
def rpcs
|
1588
|
+
@rpcs ||= begin
|
1589
|
+
parent_rpcs = nil
|
1590
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1591
|
+
Rpcs.new parent_rpcs
|
1592
|
+
end
|
1593
|
+
end
|
1594
|
+
|
1595
|
+
##
|
1596
|
+
# Configuration RPC class for the DataMigrationService API.
|
1597
|
+
#
|
1598
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1599
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1600
|
+
# the following configuration fields:
|
1601
|
+
#
|
1602
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1603
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1604
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1605
|
+
# include the following keys:
|
1606
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1607
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1608
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1609
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1610
|
+
# trigger a retry.
|
1611
|
+
#
|
1612
|
+
class Rpcs
|
1613
|
+
##
|
1614
|
+
# RPC-specific configuration for `list_migration_jobs`
|
1615
|
+
# @return [::Gapic::Config::Method]
|
1616
|
+
#
|
1617
|
+
attr_reader :list_migration_jobs
|
1618
|
+
##
|
1619
|
+
# RPC-specific configuration for `get_migration_job`
|
1620
|
+
# @return [::Gapic::Config::Method]
|
1621
|
+
#
|
1622
|
+
attr_reader :get_migration_job
|
1623
|
+
##
|
1624
|
+
# RPC-specific configuration for `create_migration_job`
|
1625
|
+
# @return [::Gapic::Config::Method]
|
1626
|
+
#
|
1627
|
+
attr_reader :create_migration_job
|
1628
|
+
##
|
1629
|
+
# RPC-specific configuration for `update_migration_job`
|
1630
|
+
# @return [::Gapic::Config::Method]
|
1631
|
+
#
|
1632
|
+
attr_reader :update_migration_job
|
1633
|
+
##
|
1634
|
+
# RPC-specific configuration for `delete_migration_job`
|
1635
|
+
# @return [::Gapic::Config::Method]
|
1636
|
+
#
|
1637
|
+
attr_reader :delete_migration_job
|
1638
|
+
##
|
1639
|
+
# RPC-specific configuration for `start_migration_job`
|
1640
|
+
# @return [::Gapic::Config::Method]
|
1641
|
+
#
|
1642
|
+
attr_reader :start_migration_job
|
1643
|
+
##
|
1644
|
+
# RPC-specific configuration for `stop_migration_job`
|
1645
|
+
# @return [::Gapic::Config::Method]
|
1646
|
+
#
|
1647
|
+
attr_reader :stop_migration_job
|
1648
|
+
##
|
1649
|
+
# RPC-specific configuration for `resume_migration_job`
|
1650
|
+
# @return [::Gapic::Config::Method]
|
1651
|
+
#
|
1652
|
+
attr_reader :resume_migration_job
|
1653
|
+
##
|
1654
|
+
# RPC-specific configuration for `promote_migration_job`
|
1655
|
+
# @return [::Gapic::Config::Method]
|
1656
|
+
#
|
1657
|
+
attr_reader :promote_migration_job
|
1658
|
+
##
|
1659
|
+
# RPC-specific configuration for `verify_migration_job`
|
1660
|
+
# @return [::Gapic::Config::Method]
|
1661
|
+
#
|
1662
|
+
attr_reader :verify_migration_job
|
1663
|
+
##
|
1664
|
+
# RPC-specific configuration for `restart_migration_job`
|
1665
|
+
# @return [::Gapic::Config::Method]
|
1666
|
+
#
|
1667
|
+
attr_reader :restart_migration_job
|
1668
|
+
##
|
1669
|
+
# RPC-specific configuration for `generate_ssh_script`
|
1670
|
+
# @return [::Gapic::Config::Method]
|
1671
|
+
#
|
1672
|
+
attr_reader :generate_ssh_script
|
1673
|
+
##
|
1674
|
+
# RPC-specific configuration for `list_connection_profiles`
|
1675
|
+
# @return [::Gapic::Config::Method]
|
1676
|
+
#
|
1677
|
+
attr_reader :list_connection_profiles
|
1678
|
+
##
|
1679
|
+
# RPC-specific configuration for `get_connection_profile`
|
1680
|
+
# @return [::Gapic::Config::Method]
|
1681
|
+
#
|
1682
|
+
attr_reader :get_connection_profile
|
1683
|
+
##
|
1684
|
+
# RPC-specific configuration for `create_connection_profile`
|
1685
|
+
# @return [::Gapic::Config::Method]
|
1686
|
+
#
|
1687
|
+
attr_reader :create_connection_profile
|
1688
|
+
##
|
1689
|
+
# RPC-specific configuration for `update_connection_profile`
|
1690
|
+
# @return [::Gapic::Config::Method]
|
1691
|
+
#
|
1692
|
+
attr_reader :update_connection_profile
|
1693
|
+
##
|
1694
|
+
# RPC-specific configuration for `delete_connection_profile`
|
1695
|
+
# @return [::Gapic::Config::Method]
|
1696
|
+
#
|
1697
|
+
attr_reader :delete_connection_profile
|
1698
|
+
|
1699
|
+
# @private
|
1700
|
+
def initialize parent_rpcs = nil
|
1701
|
+
list_migration_jobs_config = parent_rpcs.list_migration_jobs if parent_rpcs.respond_to? :list_migration_jobs
|
1702
|
+
@list_migration_jobs = ::Gapic::Config::Method.new list_migration_jobs_config
|
1703
|
+
get_migration_job_config = parent_rpcs.get_migration_job if parent_rpcs.respond_to? :get_migration_job
|
1704
|
+
@get_migration_job = ::Gapic::Config::Method.new get_migration_job_config
|
1705
|
+
create_migration_job_config = parent_rpcs.create_migration_job if parent_rpcs.respond_to? :create_migration_job
|
1706
|
+
@create_migration_job = ::Gapic::Config::Method.new create_migration_job_config
|
1707
|
+
update_migration_job_config = parent_rpcs.update_migration_job if parent_rpcs.respond_to? :update_migration_job
|
1708
|
+
@update_migration_job = ::Gapic::Config::Method.new update_migration_job_config
|
1709
|
+
delete_migration_job_config = parent_rpcs.delete_migration_job if parent_rpcs.respond_to? :delete_migration_job
|
1710
|
+
@delete_migration_job = ::Gapic::Config::Method.new delete_migration_job_config
|
1711
|
+
start_migration_job_config = parent_rpcs.start_migration_job if parent_rpcs.respond_to? :start_migration_job
|
1712
|
+
@start_migration_job = ::Gapic::Config::Method.new start_migration_job_config
|
1713
|
+
stop_migration_job_config = parent_rpcs.stop_migration_job if parent_rpcs.respond_to? :stop_migration_job
|
1714
|
+
@stop_migration_job = ::Gapic::Config::Method.new stop_migration_job_config
|
1715
|
+
resume_migration_job_config = parent_rpcs.resume_migration_job if parent_rpcs.respond_to? :resume_migration_job
|
1716
|
+
@resume_migration_job = ::Gapic::Config::Method.new resume_migration_job_config
|
1717
|
+
promote_migration_job_config = parent_rpcs.promote_migration_job if parent_rpcs.respond_to? :promote_migration_job
|
1718
|
+
@promote_migration_job = ::Gapic::Config::Method.new promote_migration_job_config
|
1719
|
+
verify_migration_job_config = parent_rpcs.verify_migration_job if parent_rpcs.respond_to? :verify_migration_job
|
1720
|
+
@verify_migration_job = ::Gapic::Config::Method.new verify_migration_job_config
|
1721
|
+
restart_migration_job_config = parent_rpcs.restart_migration_job if parent_rpcs.respond_to? :restart_migration_job
|
1722
|
+
@restart_migration_job = ::Gapic::Config::Method.new restart_migration_job_config
|
1723
|
+
generate_ssh_script_config = parent_rpcs.generate_ssh_script if parent_rpcs.respond_to? :generate_ssh_script
|
1724
|
+
@generate_ssh_script = ::Gapic::Config::Method.new generate_ssh_script_config
|
1725
|
+
list_connection_profiles_config = parent_rpcs.list_connection_profiles if parent_rpcs.respond_to? :list_connection_profiles
|
1726
|
+
@list_connection_profiles = ::Gapic::Config::Method.new list_connection_profiles_config
|
1727
|
+
get_connection_profile_config = parent_rpcs.get_connection_profile if parent_rpcs.respond_to? :get_connection_profile
|
1728
|
+
@get_connection_profile = ::Gapic::Config::Method.new get_connection_profile_config
|
1729
|
+
create_connection_profile_config = parent_rpcs.create_connection_profile if parent_rpcs.respond_to? :create_connection_profile
|
1730
|
+
@create_connection_profile = ::Gapic::Config::Method.new create_connection_profile_config
|
1731
|
+
update_connection_profile_config = parent_rpcs.update_connection_profile if parent_rpcs.respond_to? :update_connection_profile
|
1732
|
+
@update_connection_profile = ::Gapic::Config::Method.new update_connection_profile_config
|
1733
|
+
delete_connection_profile_config = parent_rpcs.delete_connection_profile if parent_rpcs.respond_to? :delete_connection_profile
|
1734
|
+
@delete_connection_profile = ::Gapic::Config::Method.new delete_connection_profile_config
|
1735
|
+
|
1736
|
+
yield self if block_given?
|
1737
|
+
end
|
1738
|
+
end
|
1739
|
+
end
|
1740
|
+
end
|
1741
|
+
end
|
1742
|
+
end
|
1743
|
+
end
|
1744
|
+
end
|
1745
|
+
end
|