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_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKey resource string.
-
#crypto_key_version_path(project:, location:, key_ring:, crypto_key:, crypto_key_version:) ⇒ ::String
Create a fully-qualified CryptoKeyVersion resource string.
-
#database_path(project:, location:, cluster:, database:) ⇒ ::String
Create a fully-qualified Database 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.
-
#service_attachment_path(project:, region:, service_attachment:) ⇒ ::String
Create a fully-qualified ServiceAttachment 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_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKey resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
78 79 80 81 82 83 84 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 78 def crypto_key_path project:, location:, key_ring:, crypto_key: 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? "/" "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" 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}
100 101 102 103 104 105 106 107 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 100 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 |
#database_path(project:, location:, cluster:, database:) ⇒ ::String
Create a fully-qualified Database resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/clusters/{cluster}/databases/{database}
122 123 124 125 126 127 128 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 122 def database_path project:, location:, cluster:, database: 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}/databases/#{database}" 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}
143 144 145 146 147 148 149 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 143 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}
162 163 164 165 166 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 162 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}
179 180 181 182 183 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 179 def network_path project:, network: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/global/networks/#{network}" end |
#service_attachment_path(project:, region:, service_attachment:) ⇒ ::String
Create a fully-qualified ServiceAttachment resource string.
The resource will be in the following format:
projects/{project}/regions/{region}/serviceAttachments/{service_attachment}
197 198 199 200 201 202 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 197 def project:, region:, service_attachment: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" "projects/#{project}/regions/#{region}/serviceAttachments/#{}" 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}
217 218 219 220 221 222 223 |
# File 'lib/google/cloud/alloy_db/v1beta/alloy_db_admin/paths.rb', line 217 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 |