Module: Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb
Overview
Path helper methods for the BigtableTableAdmin API.
Instance Method Summary collapse
-
#backup_path(project:, instance:, cluster:, backup:) ⇒ ::String
Create a fully-qualified Backup resource string.
-
#cluster_path(project:, instance:, cluster:) ⇒ ::String
Create a fully-qualified Cluster resource string.
-
#crypto_key_version_path(project:, location:, key_ring:, crypto_key:, crypto_key_version:) ⇒ ::String
Create a fully-qualified CryptoKeyVersion resource string.
-
#instance_path(project:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
-
#snapshot_path(project:, instance:, cluster:, snapshot:) ⇒ ::String
Create a fully-qualified Snapshot resource string.
-
#table_path(project:, instance:, table:) ⇒ ::String
Create a fully-qualified Table resource string.
Instance Method Details
#backup_path(project:, instance:, cluster:, backup:) ⇒ ::String
Create a fully-qualified Backup resource string.
The resource will be in the following format:
projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}
41 42 43 44 45 46 47 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 41 def backup_path project:, instance:, cluster:, backup: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" raise ::ArgumentError, "cluster cannot contain /" if cluster.to_s.include? "/" "projects/#{project}/instances/#{instance}/clusters/#{cluster}/backups/#{backup}" end |
#cluster_path(project:, instance:, cluster:) ⇒ ::String
Create a fully-qualified Cluster resource string.
The resource will be in the following format:
projects/{project}/instances/{instance}/clusters/{cluster}
61 62 63 64 65 66 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 61 def cluster_path project:, instance:, cluster: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" "projects/#{project}/instances/#{instance}/clusters/#{cluster}" 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}
82 83 84 85 86 87 88 89 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 82 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 |
#instance_path(project:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
The resource will be in the following format:
projects/{project}/instances/{instance}
102 103 104 105 106 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 102 def instance_path project:, instance: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/instances/#{instance}" end |
#snapshot_path(project:, instance:, cluster:, snapshot:) ⇒ ::String
Create a fully-qualified Snapshot resource string.
The resource will be in the following format:
projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}
121 122 123 124 125 126 127 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 121 def snapshot_path project:, instance:, cluster:, snapshot: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" raise ::ArgumentError, "cluster cannot contain /" if cluster.to_s.include? "/" "projects/#{project}/instances/#{instance}/clusters/#{cluster}/snapshots/#{snapshot}" end |
#table_path(project:, instance:, table:) ⇒ ::String
Create a fully-qualified Table resource string.
The resource will be in the following format:
projects/{project}/instances/{instance}/tables/{table}
141 142 143 144 145 146 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 141 def table_path project:, instance:, table: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" "projects/#{project}/instances/#{instance}/tables/#{table}" end |