Module: Google::Cloud::AlloyDB::V1beta::AlloyDBAdmin::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb
Overview
Path helper methods for the AlloyDBAdmin API.
Instance Method Summary collapse
-
#backup_path(project:, location:, backup:) ⇒ ::String
Create a fully-qualified Backup resource string.
-
#cluster_path(project:, location:, 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:, location:, cluster:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#network_path(project:, network:) ⇒ ::String
Create a fully-qualified Network resource string.
-
#user_path(project:, location:, cluster:, user:) ⇒ ::String
Create a fully-qualified User resource string.
Instance Method Details
#backup_path(project:, location:, backup:) ⇒ ::String
Create a fully-qualified Backup resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/backups/{backup}
39 40 41 42 43 44 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 39 def backup_path project:, location:, backup: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/backups/#{backup}" end |
#cluster_path(project:, location:, cluster:) ⇒ ::String
Create a fully-qualified Cluster resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/clusters/{cluster}
58 59 60 61 62 63 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 58 def cluster_path project:, location:, cluster: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/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}
79 80 81 82 83 84 85 86 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 79 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:, location:, cluster:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/clusters/{cluster}/instances/{instance}
101 102 103 104 105 106 107 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 101 def instance_path project:, location:, cluster:, instance: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "cluster cannot contain /" if cluster.to_s.include? "/" "projects/#{project}/locations/#{location}/clusters/#{cluster}/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}
120 121 122 123 124 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 120 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#network_path(project:, network:) ⇒ ::String
Create a fully-qualified Network resource string.
The resource will be in the following format:
projects/{project}/global/networks/{network}
137 138 139 140 141 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 137 def network_path project:, network: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/global/networks/#{network}" end |
#user_path(project:, location:, cluster:, user:) ⇒ ::String
Create a fully-qualified User resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/clusters/{cluster}/users/{user}
156 157 158 159 160 161 162 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 156 def user_path project:, location:, cluster:, user: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "cluster cannot contain /" if cluster.to_s.include? "/" "projects/#{project}/locations/#{location}/clusters/#{cluster}/users/#{user}" end |