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
# 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
  )

  @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
  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
  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)


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

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)


276
277
278
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 276

def location_client
  @location_client
end

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

Get the associated client for long-running operations.



269
270
271
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 269

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.



3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3996

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?
    return 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.



3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3793

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?
    return 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.



3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3697

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?
    return 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.



1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1856

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?
    return 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.



2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2785

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?
    return 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.



3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3096

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?
    return response
  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.



553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 553

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?
    return 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.



2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2184

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?
    return 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.



2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2076

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?
    return 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.



2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2995

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?
    return 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.



3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3190

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?
    return response
  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.



764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 764

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?
    return 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.



2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2483

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?
    return 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.



4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 4312

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?
    return response
  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.



4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 4117

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?
    return 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.



4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 4404

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?
    return response
  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.



1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1441

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?
    return response
  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.



1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1542

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?
    return response
  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.



1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1743

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?
    return response
  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.



2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2570

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?
    return response
  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.



3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3384

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?
    return response
  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.



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 446

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?
    return response
  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.



2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2271

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?
    return response
  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.



3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3592

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?
    return 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.



1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1656

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?
    return 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.



2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2679

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?
    return 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.



3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3291

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?
    return 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.



359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 359

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?
    return 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.



2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2381

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?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
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.



1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1145

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?
    return 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.



1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1345

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?
    return 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.



1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1050

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?
    return 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.



3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3887

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?
    return 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.



4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 4221

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?
    return response
  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.



3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 3488

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?
    return 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.



861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 861

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?
    return 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.



955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 955

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?
    return 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.



1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1969

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?
    return 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.



2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
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
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 2890

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?
    return 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.



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 658

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?
    return 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.



1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/client.rb', line 1246

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?
    return response
  end
rescue ::GRPC::BadStatus => e
  raise ::Google::Cloud::Error.from_error(e)
end