Module: Google::Cloud::CloudDMS::V1::DataMigrationService::Paths

Extended by:
Paths
Included in:
Client, Paths
Defined in:
lib/google/cloud/cloud_dms/v1/data_migration_service/paths.rb

Overview

Path helper methods for the DataMigrationService API.

Instance Method Summary collapse

Instance Method Details

#connection_profile_path(project:, location:, connection_profile:) ⇒ ::String

Create a fully-qualified ConnectionProfile resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/connectionProfiles/{connection_profile}

Parameters:

  • project (String)
  • location (String)
  • connection_profile (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/paths.rb', line 39

def connection_profile_path project:, location:, connection_profile:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/connectionProfiles/#{connection_profile}"
end

#conversion_workspace_path(project:, location:, conversion_workspace:) ⇒ ::String

Create a fully-qualified ConversionWorkspace resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}

Parameters:

  • project (String)
  • location (String)
  • conversion_workspace (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


58
59
60
61
62
63
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/paths.rb', line 58

def conversion_workspace_path project:, location:, conversion_workspace:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/conversionWorkspaces/#{conversion_workspace}"
end

#location_path(project:, location:) ⇒ ::String

Create a fully-qualified Location resource string.

The resource will be in the following format:

projects/{project}/locations/{location}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


76
77
78
79
80
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/paths.rb', line 76

def location_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}"
end

#mapping_rule_path(project:, location:, conversion_workspace:, mapping_rule:) ⇒ ::String

Create a fully-qualified MappingRule resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}/mappingRules/{mapping_rule}

Parameters:

  • project (String)
  • location (String)
  • conversion_workspace (String)
  • mapping_rule (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


95
96
97
98
99
100
101
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/paths.rb', line 95

def mapping_rule_path project:, location:, conversion_workspace:, mapping_rule:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "conversion_workspace cannot contain /" if conversion_workspace.to_s.include? "/"

  "projects/#{project}/locations/#{location}/conversionWorkspaces/#{conversion_workspace}/mappingRules/#{mapping_rule}"
end

#migration_job_path(project:, location:, migration_job:) ⇒ ::String

Create a fully-qualified MigrationJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/migrationJobs/{migration_job}

Parameters:

  • project (String)
  • location (String)
  • migration_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


115
116
117
118
119
120
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/paths.rb', line 115

def migration_job_path project:, location:, migration_job:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/migrationJobs/#{migration_job}"
end

#networks_path(project:, network:) ⇒ ::String

Create a fully-qualified Networks resource string.

The resource will be in the following format:

projects/{project}/global/networks/{network}

Parameters:

  • project (String)
  • network (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


133
134
135
136
137
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/paths.rb', line 133

def networks_path project:, network:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/global/networks/#{network}"
end

#private_connection_path(project:, location:, private_connection:) ⇒ ::String

Create a fully-qualified PrivateConnection resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/privateConnections/{private_connection}

Parameters:

  • project (String)
  • location (String)
  • private_connection (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


151
152
153
154
155
156
# File 'lib/google/cloud/cloud_dms/v1/data_migration_service/paths.rb', line 151

def private_connection_path project:, location:, private_connection:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/privateConnections/#{private_connection}"
end