Class: Google::Cloud::CloudDMS::V1::DataMigrationService::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb

Overview

Client for the DataMigrationService service.

Database Migration service

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#connection_profile_path, #conversion_workspace_path, #location_path, #mapping_rule_path, #migration_job_path, #networks_path, #private_connection_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new DataMigrationService client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the DataMigrationService client.

Yield Parameters:



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 203

def initialize
  # These require statements are intentionally placed here to initialize
  # the gRPC module only when it's required.
  # See https://github.com/googleapis/toolkit/issues/446
  require "gapic/grpc"
  require "google/cloud/clouddms/v1/clouddms_services_pb"

  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end
  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @data_migration_service_stub = ::Gapic::ServiceStub.new(
    ::Google::Cloud::CloudDMS::V1::DataMigrationService::Stub,
    credentials: credentials,
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    channel_args: @config.channel_args,
    interceptors: @config.interceptors,
    channel_pool_config: @config.channel_pool,
    logger: @config.logger
  )

  @data_migration_service_stub.stub_logger&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @data_migration_service_stub.endpoint
    config.universe_domain = @data_migration_service_stub.universe_domain
    config.logger = @data_migration_service_stub.logger if config.respond_to? :logger=
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @data_migration_service_stub.endpoint
    config.universe_domain = @data_migration_service_stub.universe_domain
    config.logger = @data_migration_service_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Client (readonly)

Get the associated client for mix-in of the IAMPolicy.

Returns:

  • (Google::Iam::V1::IAMPolicy::Client)


296
297
298
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 296

def iam_policy_client
  @iam_policy_client
end

#location_clientGoogle::Cloud::Location::Locations::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Client)


289
290
291
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 289

def location_client
  @location_client
end

#operations_client::Google::Cloud::CloudDMS::V1::DataMigrationService::Operations (readonly)

Get the associated client for long-running operations.



282
283
284
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 282

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the DataMigrationService Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all DataMigrationService clients
::Google::Cloud::CloudDMS::V1::DataMigrationService::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 64

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "CloudDMS", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.timeout = 60.0
    default_config.retry_policy = {
      initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
    }

    default_config.rpcs.list_migration_jobs.timeout = 60.0

    default_config.rpcs.get_migration_job.timeout = 60.0

    default_config.rpcs.create_migration_job.timeout = 60.0

    default_config.rpcs.update_migration_job.timeout = 60.0

    default_config.rpcs.delete_migration_job.timeout = 60.0

    default_config.rpcs.start_migration_job.timeout = 60.0

    default_config.rpcs.stop_migration_job.timeout = 60.0

    default_config.rpcs.resume_migration_job.timeout = 60.0

    default_config.rpcs.promote_migration_job.timeout = 60.0

    default_config.rpcs.verify_migration_job.timeout = 60.0

    default_config.rpcs.restart_migration_job.timeout = 60.0

    default_config.rpcs.generate_ssh_script.timeout = 60.0

    default_config.rpcs.list_connection_profiles.timeout = 60.0

    default_config.rpcs.get_connection_profile.timeout = 60.0

    default_config.rpcs.create_connection_profile.timeout = 60.0

    default_config.rpcs.update_connection_profile.timeout = 60.0

    default_config.rpcs.delete_connection_profile.timeout = 60.0

    default_config.rpcs.create_private_connection.timeout = 60.0

    default_config.rpcs.get_private_connection.timeout = 60.0

    default_config.rpcs.list_private_connections.timeout = 60.0

    default_config.rpcs.delete_private_connection.timeout = 60.0

    default_config.rpcs.get_conversion_workspace.timeout = 60.0

    default_config.rpcs.list_conversion_workspaces.timeout = 60.0

    default_config.rpcs.create_conversion_workspace.timeout = 60.0

    default_config.rpcs.update_conversion_workspace.timeout = 60.0

    default_config.rpcs.delete_conversion_workspace.timeout = 60.0

    default_config.rpcs.seed_conversion_workspace.timeout = 60.0

    default_config.rpcs.import_mapping_rules.timeout = 60.0

    default_config.rpcs.convert_conversion_workspace.timeout = 60.0

    default_config.rpcs.commit_conversion_workspace.timeout = 60.0

    default_config.rpcs.rollback_conversion_workspace.timeout = 60.0

    default_config.rpcs.apply_conversion_workspace.timeout = 60.0

    default_config.rpcs.describe_database_entities.timeout = 60.0

    default_config.rpcs.search_background_jobs.timeout = 60.0

    default_config.rpcs.describe_conversion_workspace_revisions.timeout = 60.0

    default_config.rpcs.fetch_static_ips.timeout = 60.0

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#apply_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation #apply_conversion_workspace(name: nil, filter: nil, dry_run: nil, auto_commit: nil, connection_profile: nil) ⇒ ::Gapic::Operation

Applies draft tree onto a specific destination database.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::ApplyConversionWorkspaceRequest.new

# Call the apply_conversion_workspace method.
result = client.apply_conversion_workspace request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #apply_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to apply_conversion_workspace via a request object, either of type ApplyConversionWorkspaceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::ApplyConversionWorkspaceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #apply_conversion_workspace(name: nil, filter: nil, dry_run: nil, auto_commit: nil, connection_profile: nil) ⇒ ::Gapic::Operation

    Pass arguments to apply_conversion_workspace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the conversion workspace resource for which to apply the draft tree. Must be in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    • filter (::String) (defaults to: nil)

      Filter which entities to apply. Leaving this field empty will apply all of the entities. Supports Google AIP 160 based filtering.

    • dry_run (::Boolean) (defaults to: nil)

      Optional. Only validates the apply process, but doesn't change the destination database. Only works for PostgreSQL destination connection profile.

    • auto_commit (::Boolean) (defaults to: nil)

      Optional. Specifies whether the conversion workspace is to be committed automatically after the apply.

    • connection_profile (::String) (defaults to: nil)

      Optional. Fully qualified (Uri) name of the destination connection profile.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 4009

def apply_conversion_workspace request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ApplyConversionWorkspaceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.apply_conversion_workspace..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.apply_conversion_workspace.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.apply_conversion_workspace.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :apply_conversion_workspace, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#commit_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation #commit_conversion_workspace(name: nil, commit_name: nil) ⇒ ::Gapic::Operation

Marks all the data in the conversion workspace as committed.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::CommitConversionWorkspaceRequest.new

# Call the commit_conversion_workspace method.
result = client.commit_conversion_workspace request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #commit_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to commit_conversion_workspace via a request object, either of type CommitConversionWorkspaceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::CommitConversionWorkspaceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #commit_conversion_workspace(name: nil, commit_name: nil) ⇒ ::Gapic::Operation

    Pass arguments to commit_conversion_workspace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the conversion workspace resource to commit.

    • commit_name (::String) (defaults to: nil)

      Optional. Optional name of the commit.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3806

def commit_conversion_workspace request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::CommitConversionWorkspaceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.commit_conversion_workspace..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.commit_conversion_workspace.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.commit_conversion_workspace.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :commit_conversion_workspace, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#configure {|config| ... } ⇒ Client::Configuration

Configure the DataMigrationService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



173
174
175
176
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 173

def configure
  yield @config if block_given?
  @config
end

#convert_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation #convert_conversion_workspace(name: nil, auto_commit: nil, filter: nil, convert_full_path: nil) ⇒ ::Gapic::Operation

Creates a draft tree schema for the destination database.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::ConvertConversionWorkspaceRequest.new

# Call the convert_conversion_workspace method.
result = client.convert_conversion_workspace request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #convert_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to convert_conversion_workspace via a request object, either of type ConvertConversionWorkspaceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::ConvertConversionWorkspaceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #convert_conversion_workspace(name: nil, auto_commit: nil, filter: nil, convert_full_path: nil) ⇒ ::Gapic::Operation

    Pass arguments to convert_conversion_workspace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Name of the conversion workspace resource to convert in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    • auto_commit (::Boolean) (defaults to: nil)

      Optional. Specifies whether the conversion workspace is to be committed automatically after the conversion.

    • filter (::String) (defaults to: nil)

      Optional. Filter the entities to convert. Leaving this field empty will convert all of the entities. Supports Google AIP-160 style filtering.

    • convert_full_path (::Boolean) (defaults to: nil)

      Optional. Automatically convert the full entity path for each entity specified by the filter. For example, if the filter specifies a table, that table schema (and database if there is one) will also be converted.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3710

def convert_conversion_workspace request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ConvertConversionWorkspaceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.convert_conversion_workspace..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.convert_conversion_workspace.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.convert_conversion_workspace.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :convert_conversion_workspace, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_connection_profile(request, options = nil) ⇒ ::Gapic::Operation #create_connection_profile(parent: nil, connection_profile_id: nil, connection_profile: nil, request_id: nil, validate_only: nil, skip_validation: nil) ⇒ ::Gapic::Operation

Creates a new connection profile in a given project and location.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::CreateConnectionProfileRequest.new

# Call the create_connection_profile method.
result = client.create_connection_profile request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_connection_profile(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_connection_profile via a request object, either of type CreateConnectionProfileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::CreateConnectionProfileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_connection_profile(parent: nil, connection_profile_id: nil, connection_profile: nil, request_id: nil, validate_only: nil, skip_validation: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_connection_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent which owns this collection of connection profiles.

    • connection_profile_id (::String) (defaults to: nil)

      Required. The connection profile identifier.

    • connection_profile (::Google::Cloud::CloudDMS::V1::ConnectionProfile, ::Hash) (defaults to: nil)

      Required. The create request body including the connection profile data

    • request_id (::String) (defaults to: nil)

      Optional. A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the connection profile, but don't create any resources. The default is false. Only supported for Oracle connection profiles.

    • skip_validation (::Boolean) (defaults to: nil)

      Optional. Create the connection profile without validating it. The default is false. Only supported for Oracle connection profiles.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1874

def create_connection_profile request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::CreateConnectionProfileRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_connection_profile..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_connection_profile.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_connection_profile.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :create_connection_profile, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation #create_conversion_workspace(parent: nil, conversion_workspace_id: nil, conversion_workspace: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new conversion workspace in a given project and location.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::CreateConversionWorkspaceRequest.new

# Call the create_conversion_workspace method.
result = client.create_conversion_workspace request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_conversion_workspace via a request object, either of type CreateConversionWorkspaceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::CreateConversionWorkspaceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_conversion_workspace(parent: nil, conversion_workspace_id: nil, conversion_workspace: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_conversion_workspace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent which owns this collection of conversion workspaces.

    • conversion_workspace_id (::String) (defaults to: nil)

      Required. The ID of the conversion workspace to create.

    • conversion_workspace (::Google::Cloud::CloudDMS::V1::ConversionWorkspace, ::Hash) (defaults to: nil)

      Required. Represents a conversion workspace object.

    • request_id (::String) (defaults to: nil)

      A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2801

def create_conversion_workspace request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::CreateConversionWorkspaceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_conversion_workspace..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_conversion_workspace.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_conversion_workspace.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :create_conversion_workspace, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_mapping_rule(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::MappingRule #create_mapping_rule(parent: nil, mapping_rule_id: nil, mapping_rule: nil, request_id: nil) ⇒ ::Google::Cloud::CloudDMS::V1::MappingRule

Creates a new mapping rule for a given conversion workspace.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::CreateMappingRuleRequest.new

# Call the create_mapping_rule method.
result = client.create_mapping_rule request

# The returned object is of type Google::Cloud::CloudDMS::V1::MappingRule.
p result

Overloads:

  • #create_mapping_rule(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::MappingRule

    Pass arguments to create_mapping_rule via a request object, either of type CreateMappingRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::CreateMappingRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_mapping_rule(parent: nil, mapping_rule_id: nil, mapping_rule: nil, request_id: nil) ⇒ ::Google::Cloud::CloudDMS::V1::MappingRule

    Pass arguments to create_mapping_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent which owns this collection of mapping rules.

    • mapping_rule_id (::String) (defaults to: nil)

      Required. The ID of the rule to create.

    • mapping_rule (::Google::Cloud::CloudDMS::V1::MappingRule, ::Hash) (defaults to: nil)

      Required. Represents a mapping rule object.

    • request_id (::String) (defaults to: nil)

      A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3112

def create_mapping_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::CreateMappingRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_mapping_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_mapping_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_mapping_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :create_mapping_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_migration_job(request, options = nil) ⇒ ::Gapic::Operation #create_migration_job(parent: nil, migration_job_id: nil, migration_job: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a new migration job in a given project and location.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::CreateMigrationJobRequest.new

# Call the create_migration_job method.
result = client.create_migration_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_migration_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_migration_job via a request object, either of type CreateMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::CreateMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_migration_job(parent: nil, migration_job_id: nil, migration_job: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent which owns this collection of migration jobs.

    • migration_job_id (::String) (defaults to: nil)

      Required. The ID of the instance to create.

    • migration_job (::Google::Cloud::CloudDMS::V1::MigrationJob, ::Hash) (defaults to: nil)

      Required. Represents a migration job object.

    • request_id (::String) (defaults to: nil)

      Optional. A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 574

def create_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::CreateMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :create_migration_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_private_connection(request, options = nil) ⇒ ::Gapic::Operation #create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil, skip_validation: nil) ⇒ ::Gapic::Operation

Creates a new private connection in a given project and location.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::CreatePrivateConnectionRequest.new

# Call the create_private_connection method.
result = client.create_private_connection request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_private_connection(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_private_connection via a request object, either of type CreatePrivateConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::CreatePrivateConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_private_connection(parent: nil, private_connection_id: nil, private_connection: nil, request_id: nil, skip_validation: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_private_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent that owns the collection of PrivateConnections.

    • private_connection_id (::String) (defaults to: nil)

      Required. The private connection identifier.

    • private_connection (::Google::Cloud::CloudDMS::V1::PrivateConnection, ::Hash) (defaults to: nil)

      Required. The private connection resource to create.

    • request_id (::String) (defaults to: nil)

      Optional. A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

    • skip_validation (::Boolean) (defaults to: nil)

      Optional. If set to true, will skip validations.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2202

def create_private_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::CreatePrivateConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_private_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_private_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_private_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :create_private_connection, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_connection_profile(request, options = nil) ⇒ ::Gapic::Operation #delete_connection_profile(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::DeleteConnectionProfileRequest.new

# Call the delete_connection_profile method.
result = client.delete_connection_profile request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_connection_profile(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_connection_profile via a request object, either of type Google::Cloud::CloudDMS::V1::DeleteConnectionProfileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::DeleteConnectionProfileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_connection_profile(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_connection_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the connection profile resource to delete.

    • request_id (::String) (defaults to: nil)

      A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

    • force (::Boolean) (defaults to: nil)

      In case of force delete, the CloudSQL replica database is also deleted (only for CloudSQL connection profile).

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2094

def delete_connection_profile request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::DeleteConnectionProfileRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_connection_profile..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_connection_profile.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_connection_profile.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :delete_connection_profile, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation #delete_conversion_workspace(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

Deletes a single conversion workspace.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::DeleteConversionWorkspaceRequest.new

# Call the delete_conversion_workspace method.
result = client.delete_conversion_workspace request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_conversion_workspace via a request object, either of type Google::Cloud::CloudDMS::V1::DeleteConversionWorkspaceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::DeleteConversionWorkspaceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_conversion_workspace(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_conversion_workspace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the conversion workspace resource to delete.

    • request_id (::String) (defaults to: nil)

      A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

    • force (::Boolean) (defaults to: nil)

      Force delete the conversion workspace, even if there's a running migration that is using the workspace.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3011

def delete_conversion_workspace request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::DeleteConversionWorkspaceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_conversion_workspace..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_conversion_workspace.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_conversion_workspace.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :delete_conversion_workspace, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_mapping_rule(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_mapping_rule(name: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty

Deletes a single mapping rule.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::DeleteMappingRuleRequest.new

# Call the delete_mapping_rule method.
result = client.delete_mapping_rule request

# The returned object is of type Google::Protobuf::Empty.
p result

Overloads:

  • #delete_mapping_rule(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_mapping_rule via a request object, either of type Google::Cloud::CloudDMS::V1::DeleteMappingRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::DeleteMappingRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_mapping_rule(name: nil, request_id: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_mapping_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the mapping rule resource to delete.

    • request_id (::String) (defaults to: nil)

      Optional. A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3205

def delete_mapping_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::DeleteMappingRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_mapping_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_mapping_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_mapping_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :delete_mapping_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_migration_job(request, options = nil) ⇒ ::Gapic::Operation #delete_migration_job(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

Deletes a single migration job.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::DeleteMigrationJobRequest.new

# Call the delete_migration_job method.
result = client.delete_migration_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_migration_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_migration_job via a request object, either of type Google::Cloud::CloudDMS::V1::DeleteMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::DeleteMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_migration_job(name: nil, request_id: nil, force: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the migration job resource to delete.

    • request_id (::String) (defaults to: nil)

      A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

    • force (::Boolean) (defaults to: nil)

      The destination CloudSQL connection profile is always deleted with the migration job. In case of force delete, the destination CloudSQL replica database is also deleted.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 785

def delete_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::DeleteMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :delete_migration_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_private_connection(request, options = nil) ⇒ ::Gapic::Operation #delete_private_connection(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a single Database Migration Service private connection.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::DeletePrivateConnectionRequest.new

# Call the delete_private_connection method.
result = client.delete_private_connection request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_private_connection(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_private_connection via a request object, either of type Google::Cloud::CloudDMS::V1::DeletePrivateConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::DeletePrivateConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_private_connection(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_private_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the private connection to delete.

    • request_id (::String) (defaults to: nil)

      Optional. A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2500

def delete_private_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::DeletePrivateConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_private_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_private_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_private_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :delete_private_connection, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#describe_conversion_workspace_revisions(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::DescribeConversionWorkspaceRevisionsResponse #describe_conversion_workspace_revisions(conversion_workspace: nil, commit_id: nil) ⇒ ::Google::Cloud::CloudDMS::V1::DescribeConversionWorkspaceRevisionsResponse

Retrieves a list of committed revisions of a specific conversion workspace.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::DescribeConversionWorkspaceRevisionsRequest.new

# Call the describe_conversion_workspace_revisions method.
result = client.describe_conversion_workspace_revisions request

# The returned object is of type Google::Cloud::CloudDMS::V1::DescribeConversionWorkspaceRevisionsResponse.
p result

Overloads:

  • #describe_conversion_workspace_revisions(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::DescribeConversionWorkspaceRevisionsResponse

    Pass arguments to describe_conversion_workspace_revisions via a request object, either of type Google::Cloud::CloudDMS::V1::DescribeConversionWorkspaceRevisionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::DescribeConversionWorkspaceRevisionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #describe_conversion_workspace_revisions(conversion_workspace: nil, commit_id: nil) ⇒ ::Google::Cloud::CloudDMS::V1::DescribeConversionWorkspaceRevisionsResponse

    Pass arguments to describe_conversion_workspace_revisions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • conversion_workspace (::String) (defaults to: nil)

      Required. Name of the conversion workspace resource whose revisions are listed. Must be in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    • commit_id (::String) (defaults to: nil)

      Optional. Optional filter to request a specific commit ID.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 4324

def describe_conversion_workspace_revisions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::DescribeConversionWorkspaceRevisionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.describe_conversion_workspace_revisions..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.conversion_workspace
    header_params["conversion_workspace"] = request.conversion_workspace
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.describe_conversion_workspace_revisions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.describe_conversion_workspace_revisions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :describe_conversion_workspace_revisions, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#describe_database_entities(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::DatabaseEntity> #describe_database_entities(conversion_workspace: nil, page_size: nil, page_token: nil, tree: nil, uncommitted: nil, commit_id: nil, filter: nil, view: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::DatabaseEntity>

Describes the database entities tree for a specific conversion workspace and a specific tree type.

Database entities are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are simple data objects describing the structure of the client database.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::DescribeDatabaseEntitiesRequest.new

# Call the describe_database_entities method.
result = client.describe_database_entities request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CloudDMS::V1::DatabaseEntity.
  p item
end

Overloads:

  • #describe_database_entities(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::DatabaseEntity>

    Pass arguments to describe_database_entities via a request object, either of type Google::Cloud::CloudDMS::V1::DescribeDatabaseEntitiesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::DescribeDatabaseEntitiesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #describe_database_entities(conversion_workspace: nil, page_size: nil, page_token: nil, tree: nil, uncommitted: nil, commit_id: nil, filter: nil, view: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::DatabaseEntity>

    Pass arguments to describe_database_entities via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • conversion_workspace (::String) (defaults to: nil)

      Required. Name of the conversion workspace resource whose database entities are described. Must be in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of entities to return. The service may return fewer entities than the value specifies.

    • page_token (::String) (defaults to: nil)

      Optional. The nextPageToken value received in the previous call to conversionWorkspace.describeDatabaseEntities, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to conversionWorkspace.describeDatabaseEntities must match the call that provided the page token.

    • tree (::Google::Cloud::CloudDMS::V1::DescribeDatabaseEntitiesRequest::DBTreeType) (defaults to: nil)

      Required. The tree to fetch.

    • uncommitted (::Boolean) (defaults to: nil)

      Optional. Whether to retrieve the latest committed version of the entities or the latest version. This field is ignored if a specific commit_id is specified.

    • commit_id (::String) (defaults to: nil)

      Optional. Request a specific commit ID. If not specified, the entities from the latest commit are returned.

    • filter (::String) (defaults to: nil)

      Optional. Filter the returned entities based on AIP-160 standard.

    • view (::Google::Cloud::CloudDMS::V1::DatabaseEntityView) (defaults to: nil)

      Optional. Results view based on AIP-157

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 4130

def describe_database_entities request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::DescribeDatabaseEntitiesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.describe_database_entities..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.conversion_workspace
    header_params["conversion_workspace"] = request.conversion_workspace
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.describe_database_entities.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.describe_database_entities.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :describe_database_entities, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @data_migration_service_stub, :describe_database_entities, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#fetch_static_ips(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::FetchStaticIpsResponse #fetch_static_ips(name: nil, page_size: nil, page_token: nil) ⇒ ::Google::Cloud::CloudDMS::V1::FetchStaticIpsResponse

Fetches a set of static IP addresses that need to be allowlisted by the customer when using the static-IP connectivity method.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::FetchStaticIpsRequest.new

# Call the fetch_static_ips method.
result = client.fetch_static_ips request

# The returned object is of type Google::Cloud::CloudDMS::V1::FetchStaticIpsResponse.
p result

Overloads:

  • #fetch_static_ips(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::FetchStaticIpsResponse

    Pass arguments to fetch_static_ips via a request object, either of type FetchStaticIpsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::FetchStaticIpsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #fetch_static_ips(name: nil, page_size: nil, page_token: nil) ⇒ ::Google::Cloud::CloudDMS::V1::FetchStaticIpsResponse

    Pass arguments to fetch_static_ips via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name for the location for which static IPs should be returned. Must be in the format projects/*/locations/*.

    • page_size (::Integer) (defaults to: nil)

      Maximum number of IPs to return.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous FetchStaticIps call.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 4415

def fetch_static_ips request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::FetchStaticIpsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.fetch_static_ips..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.fetch_static_ips.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.fetch_static_ips.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :fetch_static_ips, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#generate_ssh_script(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::SshScript #generate_ssh_script(migration_job: nil, vm: nil, vm_creation_config: nil, vm_selection_config: nil, vm_port: nil) ⇒ ::Google::Cloud::CloudDMS::V1::SshScript

Generate a SSH configuration script to configure the reverse SSH connectivity.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::GenerateSshScriptRequest.new

# Call the generate_ssh_script method.
result = client.generate_ssh_script request

# The returned object is of type Google::Cloud::CloudDMS::V1::SshScript.
p result

Overloads:

  • #generate_ssh_script(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::SshScript

    Pass arguments to generate_ssh_script via a request object, either of type GenerateSshScriptRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::GenerateSshScriptRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #generate_ssh_script(migration_job: nil, vm: nil, vm_creation_config: nil, vm_selection_config: nil, vm_port: nil) ⇒ ::Google::Cloud::CloudDMS::V1::SshScript

    Pass arguments to generate_ssh_script via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • migration_job (::String) (defaults to: nil)

      Name of the migration job resource to generate the SSH script.

    • vm (::String) (defaults to: nil)

      Required. Bastion VM Instance name to use or to create.

    • vm_creation_config (::Google::Cloud::CloudDMS::V1::VmCreationConfig, ::Hash) (defaults to: nil)

      The VM creation configuration

    • vm_selection_config (::Google::Cloud::CloudDMS::V1::VmSelectionConfig, ::Hash) (defaults to: nil)

      The VM selection configuration

    • vm_port (::Integer) (defaults to: nil)

      The port that will be open on the bastion host.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1462

def generate_ssh_script request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GenerateSshScriptRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.generate_ssh_script..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.migration_job
    header_params["migration_job"] = request.migration_job
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.generate_ssh_script.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.generate_ssh_script.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :generate_ssh_script, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#generate_tcp_proxy_script(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::TcpProxyScript #generate_tcp_proxy_script(migration_job: nil, vm_name: nil, vm_machine_type: nil, vm_zone: nil, vm_subnet: nil) ⇒ ::Google::Cloud::CloudDMS::V1::TcpProxyScript

Generate a TCP Proxy configuration script to configure a cloud-hosted VM running a TCP Proxy.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::GenerateTcpProxyScriptRequest.new

# Call the generate_tcp_proxy_script method.
result = client.generate_tcp_proxy_script request

# The returned object is of type Google::Cloud::CloudDMS::V1::TcpProxyScript.
p result

Overloads:

  • #generate_tcp_proxy_script(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::TcpProxyScript

    Pass arguments to generate_tcp_proxy_script via a request object, either of type GenerateTcpProxyScriptRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::GenerateTcpProxyScriptRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #generate_tcp_proxy_script(migration_job: nil, vm_name: nil, vm_machine_type: nil, vm_zone: nil, vm_subnet: nil) ⇒ ::Google::Cloud::CloudDMS::V1::TcpProxyScript

    Pass arguments to generate_tcp_proxy_script via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • migration_job (::String) (defaults to: nil)

      Name of the migration job resource to generate the TCP Proxy script.

    • vm_name (::String) (defaults to: nil)

      Required. The name of the Compute instance that will host the proxy.

    • vm_machine_type (::String) (defaults to: nil)

      Required. The type of the Compute instance that will host the proxy.

    • vm_zone (::String) (defaults to: nil)

      Optional. The Google Cloud Platform zone to create the VM in. The fully qualified name of the zone must be specified, including the region name, for example "us-central1-b". If not specified, uses the "-b" zone of the destination Connection Profile's region.

    • vm_subnet (::String) (defaults to: nil)

      Required. The name of the subnet the Compute instance will use for private connectivity. Must be supplied in the form of projects/{project}/regions/{region}/subnetworks/{subnetwork}. Note: the region for the subnet must match the Compute instance region.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1562

def generate_tcp_proxy_script request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GenerateTcpProxyScriptRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.generate_tcp_proxy_script..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.migration_job
    header_params["migration_job"] = request.migration_job
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.generate_tcp_proxy_script.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.generate_tcp_proxy_script.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :generate_tcp_proxy_script, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_connection_profile(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::ConnectionProfile #get_connection_profile(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::ConnectionProfile

Gets details of a single connection profile.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::GetConnectionProfileRequest.new

# Call the get_connection_profile method.
result = client.get_connection_profile request

# The returned object is of type Google::Cloud::CloudDMS::V1::ConnectionProfile.
p result

Overloads:

  • #get_connection_profile(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::ConnectionProfile

    Pass arguments to get_connection_profile via a request object, either of type GetConnectionProfileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::GetConnectionProfileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_connection_profile(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::ConnectionProfile

    Pass arguments to get_connection_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the connection profile resource to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1762

def get_connection_profile request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GetConnectionProfileRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_connection_profile..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_connection_profile.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_connection_profile.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :get_connection_profile, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_conversion_workspace(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::ConversionWorkspace #get_conversion_workspace(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::ConversionWorkspace

Gets details of a single conversion workspace.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::GetConversionWorkspaceRequest.new

# Call the get_conversion_workspace method.
result = client.get_conversion_workspace request

# The returned object is of type Google::Cloud::CloudDMS::V1::ConversionWorkspace.
p result

Overloads:

  • #get_conversion_workspace(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::ConversionWorkspace

    Pass arguments to get_conversion_workspace via a request object, either of type GetConversionWorkspaceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::GetConversionWorkspaceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_conversion_workspace(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::ConversionWorkspace

    Pass arguments to get_conversion_workspace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the conversion workspace resource to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2587

def get_conversion_workspace request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GetConversionWorkspaceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_conversion_workspace..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_conversion_workspace.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_conversion_workspace.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :get_conversion_workspace, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_mapping_rule(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::MappingRule #get_mapping_rule(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::MappingRule

Gets the details of a mapping rule.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::GetMappingRuleRequest.new

# Call the get_mapping_rule method.
result = client.get_mapping_rule request

# The returned object is of type Google::Cloud::CloudDMS::V1::MappingRule.
p result

Overloads:

  • #get_mapping_rule(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::MappingRule

    Pass arguments to get_mapping_rule via a request object, either of type GetMappingRuleRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::GetMappingRuleRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_mapping_rule(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::MappingRule

    Pass arguments to get_mapping_rule via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the mapping rule resource to get. Example: conversionWorkspaces/123/mappingRules/rule123

      In order to retrieve a previous revision of the mapping rule, also provide the revision ID. Example: conversionWorkspace/123/mappingRules/rule123@c7cfa2a8c7cfa2a8c7cfa2a8c7cfa2a8

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3398

def get_mapping_rule request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GetMappingRuleRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_mapping_rule..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_mapping_rule.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_mapping_rule.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :get_mapping_rule, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_migration_job(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::MigrationJob #get_migration_job(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::MigrationJob

Gets details of a single migration job.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::GetMigrationJobRequest.new

# Call the get_migration_job method.
result = client.get_migration_job request

# The returned object is of type Google::Cloud::CloudDMS::V1::MigrationJob.
p result

Overloads:

  • #get_migration_job(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::MigrationJob

    Pass arguments to get_migration_job via a request object, either of type GetMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::GetMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_migration_job(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::MigrationJob

    Pass arguments to get_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the migration job resource to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 468

def get_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GetMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :get_migration_job, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_private_connection(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::PrivateConnection #get_private_connection(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::PrivateConnection

Gets details of a single private connection.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::GetPrivateConnectionRequest.new

# Call the get_private_connection method.
result = client.get_private_connection request

# The returned object is of type Google::Cloud::CloudDMS::V1::PrivateConnection.
p result

Overloads:

  • #get_private_connection(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::PrivateConnection

    Pass arguments to get_private_connection via a request object, either of type GetPrivateConnectionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::GetPrivateConnectionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_private_connection(name: nil) ⇒ ::Google::Cloud::CloudDMS::V1::PrivateConnection

    Pass arguments to get_private_connection via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the private connection to get.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2289

def get_private_connection request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::GetPrivateConnectionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_private_connection..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_private_connection.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_private_connection.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :get_private_connection, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#import_mapping_rules(request, options = nil) ⇒ ::Gapic::Operation #import_mapping_rules(parent: nil, rules_format: nil, rules_files: nil, auto_commit: nil) ⇒ ::Gapic::Operation

Imports the mapping rules for a given conversion workspace. Supports various formats of external rules files.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::ImportMappingRulesRequest.new

# Call the import_mapping_rules method.
result = client.import_mapping_rules request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #import_mapping_rules(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to import_mapping_rules via a request object, either of type ImportMappingRulesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::ImportMappingRulesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #import_mapping_rules(parent: nil, rules_format: nil, rules_files: nil, auto_commit: nil) ⇒ ::Gapic::Operation

    Pass arguments to import_mapping_rules via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Name of the conversion workspace resource to import the rules to in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    • rules_format (::Google::Cloud::CloudDMS::V1::ImportRulesFileFormat) (defaults to: nil)

      Required. The format of the rules content file.

    • rules_files (::Array<::Google::Cloud::CloudDMS::V1::ImportMappingRulesRequest::RulesFile, ::Hash>) (defaults to: nil)

      Required. One or more rules files.

    • auto_commit (::Boolean) (defaults to: nil)

      Required. Should the conversion workspace be committed automatically after the import operation.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3605

def import_mapping_rules request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ImportMappingRulesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.import_mapping_rules..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.import_mapping_rules.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.import_mapping_rules.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :import_mapping_rules, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_connection_profiles(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConnectionProfile> #list_connection_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConnectionProfile>

Retrieves a list of all connection profiles in a given project and location.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::ListConnectionProfilesRequest.new

# Call the list_connection_profiles method.
result = client.list_connection_profiles request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CloudDMS::V1::ConnectionProfile.
  p item
end

Overloads:

  • #list_connection_profiles(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConnectionProfile>

    Pass arguments to list_connection_profiles via a request object, either of type ListConnectionProfilesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::ListConnectionProfilesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_connection_profiles(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConnectionProfile>

    Pass arguments to list_connection_profiles via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent which owns this collection of connection profiles.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of connection profiles to return. The service may return fewer than this value. If unspecified, at most 50 connection profiles will be returned. The maximum value is 1000; values above 1000 are coerced to 1000.

    • page_token (::String) (defaults to: nil)

      A page token, received from a previous ListConnectionProfiles call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListConnectionProfiles must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      A filter expression that filters connection profiles listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, list connection profiles created this year by specifying createTime %gt; 2020-01-01T00:00:00.000000000Z. You can also filter nested fields. For example, you could specify mySql.username = %lt;my_username%gt; to list all connection profiles configured to connect with a specific username.

    • order_by (::String) (defaults to: nil)

      A comma-separated list of fields to order results according to.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1675

def list_connection_profiles request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ListConnectionProfilesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_connection_profiles..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_connection_profiles.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_connection_profiles.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :list_connection_profiles, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @data_migration_service_stub, :list_connection_profiles, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_conversion_workspaces(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConversionWorkspace> #list_conversion_workspaces(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConversionWorkspace>

Lists conversion workspaces in a given project and location.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::ListConversionWorkspacesRequest.new

# Call the list_conversion_workspaces method.
result = client.list_conversion_workspaces request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CloudDMS::V1::ConversionWorkspace.
  p item
end

Overloads:

  • #list_conversion_workspaces(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConversionWorkspace>

    Pass arguments to list_conversion_workspaces via a request object, either of type ListConversionWorkspacesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::ListConversionWorkspacesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_conversion_workspaces(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::ConversionWorkspace>

    Pass arguments to list_conversion_workspaces via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent which owns this collection of conversion workspaces.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of conversion workspaces to return. The service may return fewer than this value. If unspecified, at most 50 sets are returned.

    • page_token (::String) (defaults to: nil)

      The nextPageToken value received in the previous call to conversionWorkspaces.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to conversionWorkspaces.list must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      A filter expression that filters conversion workspaces listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, list conversion workspaces created this year by specifying createTime %gt; 2020-01-01T00:00:00.000000000Z. You can also filter nested fields. For example, you could specify source.version = "12.c.1" to select all conversion workspaces with source database version equal to 12.c.1.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2695

def list_conversion_workspaces request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ListConversionWorkspacesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_conversion_workspaces..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_conversion_workspaces.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_conversion_workspaces.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :list_conversion_workspaces, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @data_migration_service_stub, :list_conversion_workspaces, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_mapping_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MappingRule> #list_mapping_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MappingRule>

Lists the mapping rules for a specific conversion workspace.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::ListMappingRulesRequest.new

# Call the list_mapping_rules method.
result = client.list_mapping_rules request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CloudDMS::V1::MappingRule.
  p item
end

Overloads:

  • #list_mapping_rules(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MappingRule>

    Pass arguments to list_mapping_rules via a request object, either of type ListMappingRulesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::ListMappingRulesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_mapping_rules(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MappingRule>

    Pass arguments to list_mapping_rules via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. Name of the conversion workspace resource whose mapping rules are listed in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of rules to return. The service may return fewer than this value.

    • page_token (::String) (defaults to: nil)

      The nextPageToken value received in the previous call to mappingRules.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to mappingRules.list must match the call that provided the page token.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3305

def list_mapping_rules request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ListMappingRulesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_mapping_rules..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_mapping_rules.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_mapping_rules.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :list_mapping_rules, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @data_migration_service_stub, :list_mapping_rules, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_migration_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MigrationJob> #list_migration_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MigrationJob>

Lists migration jobs in a given project and location.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::ListMigrationJobsRequest.new

# Call the list_migration_jobs method.
result = client.list_migration_jobs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CloudDMS::V1::MigrationJob.
  p item
end

Overloads:

  • #list_migration_jobs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MigrationJob>

    Pass arguments to list_migration_jobs via a request object, either of type ListMigrationJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::ListMigrationJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_migration_jobs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::MigrationJob>

    Pass arguments to list_migration_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent which owns this collection of migrationJobs.

    • page_size (::Integer) (defaults to: nil)

      The maximum number of migration jobs to return. The service may return fewer than this value. If unspecified, at most 50 migration jobs will be returned. The maximum value is 1000; values above 1000 are coerced to 1000.

    • page_token (::String) (defaults to: nil)

      The nextPageToken value received in the previous call to migrationJobs.list, used in the subsequent request to retrieve the next page of results. On first call this should be left blank. When paginating, all other parameters provided to migrationJobs.list must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      A filter expression that filters migration jobs listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, list migration jobs created this year by specifying createTime %gt; 2020-01-01T00:00:00.000000000Z. You can also filter nested fields. For example, you could specify reverseSshConnectivity.vmIp = "1.2.3.4" to select all migration jobs connecting through the specific SSH tunnel bastion.

    • order_by (::String) (defaults to: nil)

      Sort the results based on the migration job name. Valid values are: "name", "name asc", and "name desc".

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 381

def list_migration_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ListMigrationJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_migration_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_migration_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_migration_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :list_migration_jobs, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @data_migration_service_stub, :list_migration_jobs, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_private_connections(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::PrivateConnection> #list_private_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::PrivateConnection>

Retrieves a list of private connections in a given project and location.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::ListPrivateConnectionsRequest.new

# Call the list_private_connections method.
result = client.list_private_connections request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::CloudDMS::V1::PrivateConnection.
  p item
end

Overloads:

  • #list_private_connections(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::PrivateConnection>

    Pass arguments to list_private_connections via a request object, either of type ListPrivateConnectionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::ListPrivateConnectionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_private_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::CloudDMS::V1::PrivateConnection>

    Pass arguments to list_private_connections via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent that owns the collection of private connections.

    • page_size (::Integer) (defaults to: nil)

      Maximum number of private connections to return. If unspecified, at most 50 private connections that are returned. The maximum value is 1000; values above 1000 are coerced to 1000.

    • page_token (::String) (defaults to: nil)

      Page token received from a previous ListPrivateConnections call. Provide this to retrieve the subsequent page.

      When paginating, all other parameters provided to ListPrivateConnections must match the call that provided the page token.

    • filter (::String) (defaults to: nil)

      A filter expression that filters private connections listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <. For example, list private connections created this year by specifying createTime %gt; 2021-01-01T00:00:00.000000000Z.

    • order_by (::String) (defaults to: nil)

      Order by fields for the result.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2398

def list_private_connections request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ListPrivateConnectionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_private_connections..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.parent
    header_params["parent"] = request.parent
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_private_connections.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_private_connections.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :list_private_connections, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @data_migration_service_stub, :list_private_connections, request, response, operation, options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


303
304
305
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 303

def logger
  @data_migration_service_stub.logger
end

#promote_migration_job(request, options = nil) ⇒ ::Gapic::Operation #promote_migration_job(name: nil) ⇒ ::Gapic::Operation

Promote a migration job, stopping replication to the destination and promoting the destination to be a standalone database.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::PromoteMigrationJobRequest.new

# Call the promote_migration_job method.
result = client.promote_migration_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #promote_migration_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to promote_migration_job via a request object, either of type PromoteMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::PromoteMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #promote_migration_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to promote_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Name of the migration job resource to promote.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1166

def promote_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::PromoteMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.promote_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.promote_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.promote_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :promote_migration_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#restart_migration_job(request, options = nil) ⇒ ::Gapic::Operation #restart_migration_job(name: nil, skip_validation: nil) ⇒ ::Gapic::Operation

Restart a stopped or failed migration job, resetting the destination instance to its original state and starting the migration process from scratch.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::RestartMigrationJobRequest.new

# Call the restart_migration_job method.
result = client.restart_migration_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #restart_migration_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to restart_migration_job via a request object, either of type RestartMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::RestartMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #restart_migration_job(name: nil, skip_validation: nil) ⇒ ::Gapic::Operation

    Pass arguments to restart_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Name of the migration job resource to restart.

    • skip_validation (::Boolean) (defaults to: nil)

      Optional. Restart the migration job without running prior configuration verification. Defaults to false.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1366

def restart_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::RestartMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.restart_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.restart_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.restart_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :restart_migration_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#resume_migration_job(request, options = nil) ⇒ ::Gapic::Operation #resume_migration_job(name: nil) ⇒ ::Gapic::Operation

Resume a migration job that is currently stopped and is resumable (was stopped during CDC phase).

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::ResumeMigrationJobRequest.new

# Call the resume_migration_job method.
result = client.resume_migration_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #resume_migration_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to resume_migration_job via a request object, either of type ResumeMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::ResumeMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #resume_migration_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to resume_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Name of the migration job resource to resume.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1071

def resume_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::ResumeMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.resume_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.resume_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.resume_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :resume_migration_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#rollback_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation #rollback_conversion_workspace(name: nil) ⇒ ::Gapic::Operation

Rolls back a conversion workspace to the last committed snapshot.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::RollbackConversionWorkspaceRequest.new

# Call the rollback_conversion_workspace method.
result = client.rollback_conversion_workspace request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #rollback_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to rollback_conversion_workspace via a request object, either of type RollbackConversionWorkspaceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::RollbackConversionWorkspaceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #rollback_conversion_workspace(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to rollback_conversion_workspace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. Name of the conversion workspace resource to roll back to.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3900

def rollback_conversion_workspace request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::RollbackConversionWorkspaceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.rollback_conversion_workspace..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.rollback_conversion_workspace.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.rollback_conversion_workspace.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :rollback_conversion_workspace, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#search_background_jobs(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::SearchBackgroundJobsResponse #search_background_jobs(conversion_workspace: nil, return_most_recent_per_job_type: nil, max_size: nil, completed_until_time: nil) ⇒ ::Google::Cloud::CloudDMS::V1::SearchBackgroundJobsResponse

Searches/lists the background jobs for a specific conversion workspace.

The background jobs are not resources like conversion workspaces or mapping rules, and they can't be created, updated or deleted. Instead, they are a way to expose the data plane jobs log.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::SearchBackgroundJobsRequest.new

# Call the search_background_jobs method.
result = client.search_background_jobs request

# The returned object is of type Google::Cloud::CloudDMS::V1::SearchBackgroundJobsResponse.
p result

Overloads:

  • #search_background_jobs(request, options = nil) ⇒ ::Google::Cloud::CloudDMS::V1::SearchBackgroundJobsResponse

    Pass arguments to search_background_jobs via a request object, either of type SearchBackgroundJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::SearchBackgroundJobsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #search_background_jobs(conversion_workspace: nil, return_most_recent_per_job_type: nil, max_size: nil, completed_until_time: nil) ⇒ ::Google::Cloud::CloudDMS::V1::SearchBackgroundJobsResponse

    Pass arguments to search_background_jobs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • conversion_workspace (::String) (defaults to: nil)

      Required. Name of the conversion workspace resource whose jobs are listed, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    • return_most_recent_per_job_type (::Boolean) (defaults to: nil)

      Optional. Whether or not to return just the most recent job per job type,

    • max_size (::Integer) (defaults to: nil)

      Optional. The maximum number of jobs to return. The service may return fewer than this value. If unspecified, at most 100 jobs are returned. The maximum value is 100; values above 100 are coerced to 100.

    • completed_until_time (::Google::Protobuf::Timestamp, ::Hash) (defaults to: nil)

      Optional. If provided, only returns jobs that completed until (not including) the given timestamp.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 4234

def search_background_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::SearchBackgroundJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.search_background_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.conversion_workspace
    header_params["conversion_workspace"] = request.conversion_workspace
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.search_background_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.search_background_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :search_background_jobs, request, options: options do |response, operation|
    yield response, operation if block_given?
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#seed_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation #seed_conversion_workspace(name: nil, auto_commit: nil, source_connection_profile: nil, destination_connection_profile: nil) ⇒ ::Gapic::Operation

Imports a snapshot of the source database into the conversion workspace.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::SeedConversionWorkspaceRequest.new

# Call the seed_conversion_workspace method.
result = client.seed_conversion_workspace request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #seed_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to seed_conversion_workspace via a request object, either of type SeedConversionWorkspaceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::SeedConversionWorkspaceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #seed_conversion_workspace(name: nil, auto_commit: nil, source_connection_profile: nil, destination_connection_profile: nil) ⇒ ::Gapic::Operation

    Pass arguments to seed_conversion_workspace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Name of the conversion workspace resource to seed with new database structure, in the form of: projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.

    • auto_commit (::Boolean) (defaults to: nil)

      Should the conversion workspace be committed automatically after the seed operation.

    • source_connection_profile (::String) (defaults to: nil)

      Optional. Fully qualified (Uri) name of the source connection profile.

    • destination_connection_profile (::String) (defaults to: nil)

      Optional. Fully qualified (Uri) name of the destination connection profile.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3501

def seed_conversion_workspace request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::SeedConversionWorkspaceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.seed_conversion_workspace..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.seed_conversion_workspace.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.seed_conversion_workspace.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :seed_conversion_workspace, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#start_migration_job(request, options = nil) ⇒ ::Gapic::Operation #start_migration_job(name: nil, skip_validation: nil) ⇒ ::Gapic::Operation

Start an already created migration job.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::StartMigrationJobRequest.new

# Call the start_migration_job method.
result = client.start_migration_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #start_migration_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to start_migration_job via a request object, either of type StartMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::StartMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #start_migration_job(name: nil, skip_validation: nil) ⇒ ::Gapic::Operation

    Pass arguments to start_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Name of the migration job resource to start.

    • skip_validation (::Boolean) (defaults to: nil)

      Optional. Start the migration job without running prior configuration verification. Defaults to false.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 882

def start_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::StartMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.start_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.start_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.start_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :start_migration_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#stop_migration_job(request, options = nil) ⇒ ::Gapic::Operation #stop_migration_job(name: nil) ⇒ ::Gapic::Operation

Stops a running migration job.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::StopMigrationJobRequest.new

# Call the stop_migration_job method.
result = client.stop_migration_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #stop_migration_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to stop_migration_job via a request object, either of type StopMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::StopMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #stop_migration_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to stop_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Name of the migration job resource to stop.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 976

def stop_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::StopMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.stop_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.stop_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.stop_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :stop_migration_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


183
184
185
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 183

def universe_domain
  @data_migration_service_stub.universe_domain
end

#update_connection_profile(request, options = nil) ⇒ ::Gapic::Operation #update_connection_profile(update_mask: nil, connection_profile: nil, request_id: nil, validate_only: nil, skip_validation: nil) ⇒ ::Gapic::Operation

Update the configuration of a single connection profile.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::UpdateConnectionProfileRequest.new

# Call the update_connection_profile method.
result = client.update_connection_profile request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_connection_profile(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_connection_profile via a request object, either of type UpdateConnectionProfileRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::UpdateConnectionProfileRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_connection_profile(update_mask: nil, connection_profile: nil, request_id: nil, validate_only: nil, skip_validation: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_connection_profile via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource.

    • connection_profile (::Google::Cloud::CloudDMS::V1::ConnectionProfile, ::Hash) (defaults to: nil)

      Required. The connection profile parameters to update.

    • request_id (::String) (defaults to: nil)

      Optional. A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. Only validate the connection profile, but don't update any resources. The default is false. Only supported for Oracle connection profiles.

    • skip_validation (::Boolean) (defaults to: nil)

      Optional. Update the connection profile without validating it. The default is false. Only supported for Oracle connection profiles.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1987

def update_connection_profile request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::UpdateConnectionProfileRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_connection_profile..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.connection_profile&.name
    header_params["connection_profile.name"] = request.connection_profile.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_connection_profile.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_connection_profile.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :update_connection_profile, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation #update_conversion_workspace(update_mask: nil, conversion_workspace: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single conversion workspace.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::UpdateConversionWorkspaceRequest.new

# Call the update_conversion_workspace method.
result = client.update_conversion_workspace request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_conversion_workspace(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_conversion_workspace via a request object, either of type UpdateConversionWorkspaceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::UpdateConversionWorkspaceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_conversion_workspace(update_mask: nil, conversion_workspace: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_conversion_workspace via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource.

    • conversion_workspace (::Google::Cloud::CloudDMS::V1::ConversionWorkspace, ::Hash) (defaults to: nil)

      Required. The conversion workspace parameters to update.

    • request_id (::String) (defaults to: nil)

      A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2906

def update_conversion_workspace request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::UpdateConversionWorkspaceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_conversion_workspace..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.conversion_workspace&.name
    header_params["conversion_workspace.name"] = request.conversion_workspace.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_conversion_workspace.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_conversion_workspace.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :update_conversion_workspace, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_migration_job(request, options = nil) ⇒ ::Gapic::Operation #update_migration_job(update_mask: nil, migration_job: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single migration job.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::UpdateMigrationJobRequest.new

# Call the update_migration_job method.
result = client.update_migration_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_migration_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_migration_job via a request object, either of type UpdateMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::UpdateMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_migration_job(update_mask: nil, migration_job: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Required. Field mask is used to specify the fields to be overwritten by the update in the conversion workspace resource.

    • migration_job (::Google::Cloud::CloudDMS::V1::MigrationJob, ::Hash) (defaults to: nil)

      Required. The migration job parameters to update.

    • request_id (::String) (defaults to: nil)

      A unique ID used to identify the request. If the server receives two requests with the same ID, then the second request is ignored.

      It is recommended to always set this value to a UUID.

      The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 679

def update_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::UpdateMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.migration_job&.name
    header_params["migration_job.name"] = request.migration_job.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :update_migration_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end

#verify_migration_job(request, options = nil) ⇒ ::Gapic::Operation #verify_migration_job(name: nil, update_mask: nil, migration_job: nil) ⇒ ::Gapic::Operation

Verify a migration job, making sure the destination can reach the source and that all configuration and prerequisites are met.

Examples:

Basic example

require "google/cloud/cloud_dms/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::CloudDMS::V1::DataMigrationService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::CloudDMS::V1::VerifyMigrationJobRequest.new

# Call the verify_migration_job method.
result = client.verify_migration_job request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #verify_migration_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to verify_migration_job via a request object, either of type VerifyMigrationJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::CloudDMS::V1::VerifyMigrationJobRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #verify_migration_job(name: nil, update_mask: nil, migration_job: nil) ⇒ ::Gapic::Operation

    Pass arguments to verify_migration_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Name of the migration job resource to verify.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the changed fields to be verified. It will not update the migration job.

    • migration_job (::Google::Cloud::CloudDMS::V1::MigrationJob, ::Hash) (defaults to: nil)

      Optional. The changed migration job parameters to verify. It will not update the migration job.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1267

def verify_migration_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudDMS::V1::VerifyMigrationJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.verify_migration_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::CloudDMS::V1::VERSION
  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  header_params = {}
  if request.name
    header_params["name"] = request.name
  end

  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.verify_migration_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.verify_migration_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_migration_service_stub.call_rpc :verify_migration_job, request, options: options do |response, operation|
    response = ::Gapic::Operation.new response, @operations_client, options: options
    yield response, operation if block_given?
    throw :response, response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end