Module: Google::Cloud::Run::V2::Services::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/run/v2/services/paths.rb
Overview
Path helper methods for the Services API.
Instance Method Summary collapse
-
#connector_path(project:, location:, connector:) ⇒ ::String
Create a fully-qualified Connector resource string.
-
#crypto_key_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKey resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#revision_path(project:, location:, service:, revision:) ⇒ ::String
Create a fully-qualified Revision resource string.
-
#secret_path(project:, secret:) ⇒ ::String
Create a fully-qualified Secret resource string.
-
#secret_version_path(project:, secret:, version:) ⇒ ::String
Create a fully-qualified SecretVersion resource string.
-
#service_path(project:, location:, service:) ⇒ ::String
Create a fully-qualified Service resource string.
Instance Method Details
#connector_path(project:, location:, connector:) ⇒ ::String
Create a fully-qualified Connector resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/connectors/{connector}
39 40 41 42 43 44 |
# File 'lib/google/cloud/run/v2/services/paths.rb', line 39 def connector_path project:, location:, connector: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/connectors/#{connector}" 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}
59 60 61 62 63 64 65 |
# File 'lib/google/cloud/run/v2/services/paths.rb', line 59 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 |
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
The resource will be in the following format:
projects/{project}/locations/{location}
78 79 80 81 82 |
# File 'lib/google/cloud/run/v2/services/paths.rb', line 78 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#revision_path(project:, location:, service:, revision:) ⇒ ::String
Create a fully-qualified Revision resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/services/{service}/revisions/{revision}
97 98 99 100 101 102 103 |
# File 'lib/google/cloud/run/v2/services/paths.rb', line 97 def revision_path project:, location:, service:, revision: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/" "projects/#{project}/locations/#{location}/services/#{service}/revisions/#{revision}" end |
#secret_path(project:, secret:) ⇒ ::String
Create a fully-qualified Secret resource string.
The resource will be in the following format:
projects/{project}/secrets/{secret}
116 117 118 119 120 |
# File 'lib/google/cloud/run/v2/services/paths.rb', line 116 def secret_path project:, secret: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/secrets/#{secret}" end |
#secret_version_path(project:, secret:, version:) ⇒ ::String
Create a fully-qualified SecretVersion resource string.
The resource will be in the following format:
projects/{project}/secrets/{secret}/versions/{version}
134 135 136 137 138 139 |
# File 'lib/google/cloud/run/v2/services/paths.rb', line 134 def secret_version_path project:, secret:, version: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" "projects/#{project}/secrets/#{secret}/versions/#{version}" end |
#service_path(project:, location:, service:) ⇒ ::String
Create a fully-qualified Service resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/services/{service}
153 154 155 156 157 158 |
# File 'lib/google/cloud/run/v2/services/paths.rb', line 153 def service_path project:, location:, service: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/services/#{service}" end |