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

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


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

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)


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

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)


179
180
181
182
183
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 179

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)


196
197
198
199
200
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 196

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)


214
215
216
217
218
219
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 214

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)


233
234
235
236
237
238
# File 'lib/google/cloud/backupdr/v1/backupdr/paths.rb', line 233

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