Module: Google::Cloud::AlloyDB::V1alpha::AlloyDBCloudSQLAdmin::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/paths.rb
Overview
Path helper methods for the AlloyDBCloudSQLAdmin 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.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#network_path(project:, network:) ⇒ ::String
Create a fully-qualified Network 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/v1alpha/alloy_db_cloud_sql_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/v1alpha/alloy_db_cloud_sql_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/v1alpha/alloy_db_cloud_sql_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 |
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
99 100 101 102 103 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/paths.rb', line 99 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}
116 117 118 119 120 |
# File 'lib/google/cloud/alloy_db/v1alpha/alloy_db_cloud_sql_admin/paths.rb', line 116 def network_path project:, network: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/global/networks/#{network}" end |