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
-
#backup_path(project:, location:, backupvault:, datasource:, backup:) ⇒ ::String
Create a fully-qualified Backup resource string.
-
#backup_plan_association_path(project:, location:, backup_plan_association:) ⇒ ::String
Create a fully-qualified BackupPlanAssociation resource string.
-
#backup_plan_path(project:, location:, backup_plan:) ⇒ ::String
Create a fully-qualified BackupPlan resource string.
-
#backup_plan_revision_path(project:, location:, backup_plan:, revision:) ⇒ ::String
Create a fully-qualified BackupPlanRevision resource string.
-
#backup_vault_path(project:, location:, backupvault:) ⇒ ::String
Create a fully-qualified BackupVault resource string.
-
#data_source_path(project:, location:, backupvault:, datasource:) ⇒ ::String
Create a fully-qualified DataSource resource string.
-
#data_source_reference_path(project:, location:, data_source_reference:) ⇒ ::String
Create a fully-qualified DataSourceReference resource string.
-
#instance_path(project:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#management_server_path(project:, location:, managementserver:) ⇒ ::String
Create a fully-qualified ManagementServer resource string.
-
#storage_pool_path(project:, zone:, storage_pool:) ⇒ ::String
Create a fully-qualified StoragePool resource string.
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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}
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 |