Module: Google::Cloud::VMMigration::V1::VMMigration::Paths

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

Overview

Path helper methods for the VmMigration API.

Instance Method Summary collapse

Instance Method Details

#clone_job_path(project:, location:, source:, migrating_vm:, clone_job:) ⇒ ::String

Create a fully-qualified CloneJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}

Parameters:

  • project (String)
  • location (String)
  • source (String)
  • migrating_vm (String)
  • clone_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


41
42
43
44
45
46
47
48
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 41

def clone_job_path project:, location:, source:, migrating_vm:, clone_job:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
  raise ::ArgumentError, "migrating_vm cannot contain /" if migrating_vm.to_s.include? "/"

  "projects/#{project}/locations/#{location}/sources/#{source}/migratingVms/#{migrating_vm}/cloneJobs/#{clone_job}"
end

#crypto_key_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String

Create a fully-qualified CryptoKey resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}

Parameters:

  • project (String)
  • location (String)
  • key_ring (String)
  • crypto_key (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


63
64
65
66
67
68
69
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 63

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

  "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
end

#cutover_job_path(project:, location:, source:, migrating_vm:, cutover_job:) ⇒ ::String

Create a fully-qualified CutoverJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}

Parameters:

  • project (String)
  • location (String)
  • source (String)
  • migrating_vm (String)
  • cutover_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


85
86
87
88
89
90
91
92
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 85

def cutover_job_path project:, location:, source:, migrating_vm:, cutover_job:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
  raise ::ArgumentError, "migrating_vm cannot contain /" if migrating_vm.to_s.include? "/"

  "projects/#{project}/locations/#{location}/sources/#{source}/migratingVms/#{migrating_vm}/cutoverJobs/#{cutover_job}"
end

#datacenter_connector_path(project:, location:, source:, datacenter_connector:) ⇒ ::String

Create a fully-qualified DatacenterConnector resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}

Parameters:

  • project (String)
  • location (String)
  • source (String)
  • datacenter_connector (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


107
108
109
110
111
112
113
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 107

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

  "projects/#{project}/locations/#{location}/sources/#{source}/datacenterConnectors/#{datacenter_connector}"
end

#disk_migration_job_path(project:, location:, source:, disk_migration_job:) ⇒ ::String

Create a fully-qualified DiskMigrationJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/sources/{source}/diskMigrationJobs/{disk_migration_job}

Parameters:

  • project (String)
  • location (String)
  • source (String)
  • disk_migration_job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


128
129
130
131
132
133
134
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 128

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

  "projects/#{project}/locations/#{location}/sources/#{source}/diskMigrationJobs/#{disk_migration_job}"
end

#group_path(project:, location:, group:) ⇒ ::String

Create a fully-qualified Group resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/groups/{group}

Parameters:

  • project (String)
  • location (String)
  • group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


148
149
150
151
152
153
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 148

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

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

#image_import_job_path(project:, location:, job:, result:) ⇒ ::String

Create a fully-qualified ImageImportJob resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/imageImports/{job}/imageImportJobs/{result}

Parameters:

  • project (String)
  • location (String)
  • job (String)
  • result (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


204
205
206
207
208
209
210
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 204

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

  "projects/#{project}/locations/#{location}/imageImports/#{job}/imageImportJobs/#{result}"
end

#image_import_path(project:, location:, job:) ⇒ ::String

Create a fully-qualified ImageImport resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/imageImports/{job}

Parameters:

  • project (String)
  • location (String)
  • job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


184
185
186
187
188
189
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 184

def image_import_path project:, location:, 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}/imageImports/#{job}"
end

#image_path(project:, image:) ⇒ ::String

Create a fully-qualified Image resource string.

The resource will be in the following format:

projects/{project}/global/images/{image}

Parameters:

  • project (String)
  • image (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


166
167
168
169
170
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 166

def image_path project:, image:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/global/images/#{image}"
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)


223
224
225
226
227
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 223

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

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

#migrating_vm_path(project:, location:, source:, migrating_vm:) ⇒ ::String

Create a fully-qualified MigratingVm resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}

Parameters:

  • project (String)
  • location (String)
  • source (String)
  • migrating_vm (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


242
243
244
245
246
247
248
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 242

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

  "projects/#{project}/locations/#{location}/sources/#{source}/migratingVms/#{migrating_vm}"
end

#replication_cycle_path(project:, location:, source:, migrating_vm:, replication_cycle:) ⇒ ::String

Create a fully-qualified ReplicationCycle resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/replicationCycles/{replication_cycle}

Parameters:

  • project (String)
  • location (String)
  • source (String)
  • migrating_vm (String)
  • replication_cycle (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


264
265
266
267
268
269
270
271
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 264

def replication_cycle_path project:, location:, source:, migrating_vm:, replication_cycle:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "source cannot contain /" if source.to_s.include? "/"
  raise ::ArgumentError, "migrating_vm cannot contain /" if migrating_vm.to_s.include? "/"

  "projects/#{project}/locations/#{location}/sources/#{source}/migratingVms/#{migrating_vm}/replicationCycles/#{replication_cycle}"
end

#service_account_path(project:, service_account:) ⇒ ::String

Create a fully-qualified ServiceAccount resource string.

The resource will be in the following format:

projects/{project}/serviceAccounts/{service_account}

Parameters:

  • project (String)
  • service_account (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


284
285
286
287
288
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 284

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

  "projects/#{project}/serviceAccounts/#{}"
end

#source_path(project:, location:, source:) ⇒ ::String

Create a fully-qualified Source resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/sources/{source}

Parameters:

  • project (String)
  • location (String)
  • source (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


302
303
304
305
306
307
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 302

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

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

#target_project_path(project:, location:, target_project:) ⇒ ::String

Create a fully-qualified TargetProject resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/targetProjects/{target_project}

Parameters:

  • project (String)
  • location (String)
  • target_project (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


321
322
323
324
325
326
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 321

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

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

#utilization_report_path(project:, location:, source:, utilization_report:) ⇒ ::String

Create a fully-qualified UtilizationReport resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/sources/{source}/utilizationReports/{utilization_report}

Parameters:

  • project (String)
  • location (String)
  • source (String)
  • utilization_report (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


341
342
343
344
345
346
347
# File 'lib/google/cloud/vm_migration/v1/vm_migration/paths.rb', line 341

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

  "projects/#{project}/locations/#{location}/sources/#{source}/utilizationReports/#{utilization_report}"
end