Module: Google::Cloud::Config::V1::Config::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/config/v1/config/paths.rb
Overview
Path helper methods for the Config API.
Instance Method Summary collapse
-
#deployment_path(project:, location:, deployment:) ⇒ ::String
Create a fully-qualified Deployment resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#resource_path(project:, location:, deployment:, revision:, resource:) ⇒ ::String
Create a fully-qualified Resource resource string.
-
#revision_path(project:, location:, deployment:, revision:) ⇒ ::String
Create a fully-qualified Revision resource string.
-
#service_account_path(project:, service_account:) ⇒ ::String
Create a fully-qualified ServiceAccount resource string.
-
#worker_pool_path(project:, location:, worker_pool:) ⇒ ::String
Create a fully-qualified WorkerPool resource string.
Instance Method Details
#deployment_path(project:, location:, deployment:) ⇒ ::String
Create a fully-qualified Deployment resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/deployments/{deployment}
39 40 41 42 43 44 |
# File 'lib/google/cloud/config/v1/config/paths.rb', line 39 def deployment_path project:, location:, deployment: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/deployments/#{deployment}" 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}
57 58 59 60 61 |
# File 'lib/google/cloud/config/v1/config/paths.rb', line 57 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#resource_path(project:, location:, deployment:, revision:, resource:) ⇒ ::String
Create a fully-qualified Resource resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}
77 78 79 80 81 82 83 84 |
# File 'lib/google/cloud/config/v1/config/paths.rb', line 77 def resource_path project:, location:, deployment:, revision:, resource: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "deployment cannot contain /" if deployment.to_s.include? "/" raise ::ArgumentError, "revision cannot contain /" if revision.to_s.include? "/" "projects/#{project}/locations/#{location}/deployments/#{deployment}/revisions/#{revision}/resources/#{resource}" end |
#revision_path(project:, location:, deployment:, revision:) ⇒ ::String
Create a fully-qualified Revision resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}
99 100 101 102 103 104 105 |
# File 'lib/google/cloud/config/v1/config/paths.rb', line 99 def revision_path project:, location:, deployment:, revision: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "deployment cannot contain /" if deployment.to_s.include? "/" "projects/#{project}/locations/#{location}/deployments/#{deployment}/revisions/#{revision}" end |
#service_account_path(project:, service_account:) ⇒ ::String
Create a fully-qualified ServiceAccount resource string.
The resource will be in the following format:
projects/{project}/serviceAccounts/{service_account}
118 119 120 121 122 |
# File 'lib/google/cloud/config/v1/config/paths.rb', line 118 def service_account_path project:, service_account: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/serviceAccounts/#{service_account}" end |
#worker_pool_path(project:, location:, worker_pool:) ⇒ ::String
Create a fully-qualified WorkerPool resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/workerPools/{worker_pool}
136 137 138 139 140 141 |
# File 'lib/google/cloud/config/v1/config/paths.rb', line 136 def worker_pool_path project:, location:, worker_pool: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/workerPools/#{worker_pool}" end |