Module: Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Paths

Extended by:
Paths
Included in:
Client, 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

Instance Method Details

#authorized_view_path(project:, instance:, table:, authorized_view:) ⇒ ::String

Create a fully-qualified AuthorizedView resource string.

The resource will be in the following format:

projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}

Parameters:

  • project (String)
  • instance (String)
  • table (String)
  • authorized_view (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


41
42
43
44
45
46
47
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 41

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

  "projects/#{project}/instances/#{instance}/tables/#{table}/authorizedViews/#{authorized_view}"
end

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

Parameters:

  • project (String)
  • instance (String)
  • cluster (String)
  • backup (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


62
63
64
65
66
67
68
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 62

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}

Parameters:

  • project (String)
  • instance (String)
  • cluster (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


82
83
84
85
86
87
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 82

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}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


103
104
105
106
107
108
109
110
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 103

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}

Parameters:

  • project (String)
  • instance (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


123
124
125
126
127
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 123

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}

Parameters:

  • project (String)
  • instance (String)
  • cluster (String)
  • snapshot (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


142
143
144
145
146
147
148
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 142

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}

Parameters:

  • project (String)
  • instance (String)
  • table (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


162
163
164
165
166
167
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb', line 162

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