Module: Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb
Overview
Path helper methods for the DatabaseAdmin API.
Instance Method Summary collapse
-
#backup_path(project:, instance:, backup:) ⇒ ::String
Create a fully-qualified Backup resource string.
-
#database_path(project:, instance:, database:) ⇒ ::String
Create a fully-qualified Database resource string.
-
#instance_path(project:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
Instance Method Details
#backup_path(project:, instance:, backup:) ⇒ ::String
Create a fully-qualified Backup resource string.
The resource will be in the following format:
projects/{project}/instances/{instance}/backups/{backup}
41 42 43 44 45 46 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb', line 41 def backup_path project:, instance:, backup: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" "projects/#{project}/instances/#{instance}/backups/#{backup}" end |
#database_path(project:, instance:, database:) ⇒ ::String
Create a fully-qualified Database resource string.
The resource will be in the following format:
projects/{project}/instances/{instance}/databases/{database}
60 61 62 63 64 65 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb', line 60 def database_path project:, instance:, database: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" "projects/#{project}/instances/#{instance}/databases/#{database}" 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}
78 79 80 81 82 |
# File 'lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb', line 78 def instance_path project:, instance: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/instances/#{instance}" end |