Module: Google::Cloud::BackupDR::V1::BackupDR::Paths

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

Overview

Path helper methods for the BackupDR API.

Instance Method Summary collapse

Instance Method Details

#backup_path(project:, location:, backupvault:, datasource:, backup:) ⇒ ::String

Create a fully-qualified Backup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}

Parameters:

  • project (String)
  • location (String)
  • backupvault (String)
  • datasource (String)
  • backup (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def backup_path project:, location:, backupvault:, datasource:, backup:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "backupvault cannot contain /" if backupvault.to_s.include? "/"
  raise ::ArgumentError, "datasource cannot contain /" if datasource.to_s.include? "/"

  "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}/backups/#{backup}"
end

#backup_plan_association_path(project:, location:, backup_plan_association:) ⇒ ::String

Create a fully-qualified BackupPlanAssociation resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}

Parameters:

  • project (String)
  • location (String)
  • backup_plan_association (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


81
82
83
84
85
86
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 81

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

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

#backup_plan_path(project:, location:, backup_plan:) ⇒ ::String

Create a fully-qualified BackupPlan resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/backupPlans/{backup_plan}

Parameters:

  • project (String)
  • location (String)
  • backup_plan (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


62
63
64
65
66
67
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 62

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

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

#backup_plan_revision_path(project:, location:, backup_plan:, revision:) ⇒ ::String

Create a fully-qualified BackupPlanRevision resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}

Parameters:

  • project (String)
  • location (String)
  • backup_plan (String)
  • revision (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


101
102
103
104
105
106
107
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 101

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

  "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/revisions/#{revision}"
end

#backup_vault_path(project:, location:, backupvault:) ⇒ ::String

Create a fully-qualified BackupVault resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/backupVaults/{backupvault}

Parameters:

  • project (String)
  • location (String)
  • backupvault (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


121
122
123
124
125
126
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 121

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

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

#cluster_path(project:, location:, cluster:) ⇒ ::String

Create a fully-qualified Cluster resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/clusters/{cluster}

Parameters:

  • project (String)
  • location (String)
  • cluster (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


140
141
142
143
144
145
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 140

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

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

#crypto_key_path(project:, location:, ring:, key:) ⇒ ::String

Create a fully-qualified CryptoKey resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}

Parameters:

  • project (String)
  • location (String)
  • ring (String)
  • key (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


160
161
162
163
164
165
166
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 160

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

  "projects/#{project}/locations/#{location}/keyRings/#{ring}/cryptoKeys/#{key}"
end

#crypto_key_version_path(project:, location:, key_ring:, crypto_key:, crypto_key_version:) ⇒ ::String

Create a fully-qualified CryptoKeyVersion resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version:
  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? "/"
  raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/"

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

#data_source_path(project:, location:, backupvault:, datasource:) ⇒ ::String

Create a fully-qualified DataSource resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}

Parameters:

  • project (String)
  • location (String)
  • backupvault (String)
  • datasource (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/backupVaults/#{backupvault}/dataSources/#{datasource}"
end

#data_source_reference_path(project:, location:, data_source_reference:) ⇒ ::String

Create a fully-qualified DataSourceReference resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}

Parameters:

  • project (String)
  • location (String)
  • data_source_reference (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


224
225
226
227
228
229
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 224

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

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

#instance_path(project:, instance:) ⇒ ::String

Create a fully-qualified Instance resource string.

The resource will be in the following format:

projects/{project}/instances/{instance}

Parameters:

  • project (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/instances/#{instance}"
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)


259
260
261
262
263
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 259

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

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

#management_server_path(project:, location:, managementserver:) ⇒ ::String

Create a fully-qualified ManagementServer resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/managementServers/{managementserver}

Parameters:

  • project (String)
  • location (String)
  • managementserver (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


277
278
279
280
281
282
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 277

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

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

#storage_pool_path(project:, zone:, storage_pool:) ⇒ ::String

Create a fully-qualified StoragePool resource string.

The resource will be in the following format:

projects/{project}/zones/{zone}/storagePools/{storage_pool}

Parameters:

  • project (String)
  • zone (String)
  • storage_pool (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


296
297
298
299
300
301
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 296

def storage_pool_path project:, zone:, storage_pool:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "zone cannot contain /" if zone.to_s.include? "/"

  "projects/#{project}/zones/#{zone}/storagePools/#{storage_pool}"
end