Module: Google::Cloud::ConfigService::V1::Config::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/config_service/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.
-
#preview_path(project:, location:, preview:) ⇒ ::String
Create a fully-qualified Preview resource string.
-
#resource_change_path(project:, location:, preview:, resource_change:) ⇒ ::String
Create a fully-qualified ResourceChange resource string.
-
#resource_drift_path(project:, location:, preview:, resource_drift:) ⇒ ::String
Create a fully-qualified ResourceDrift 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.
-
#terraform_version_path(project:, location:, terraform_version:) ⇒ ::String
Create a fully-qualified TerraformVersion 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_service/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_service/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 |
#preview_path(project:, location:, preview:) ⇒ ::String
Create a fully-qualified Preview resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/previews/{preview}
75 76 77 78 79 80 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 75 def preview_path project:, location:, preview: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/previews/#{preview}" end |
#resource_change_path(project:, location:, preview:, resource_change:) ⇒ ::String
Create a fully-qualified ResourceChange resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}
118 119 120 121 122 123 124 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 118 def resource_change_path project:, location:, preview:, resource_change: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "preview cannot contain /" if preview.to_s.include? "/" "projects/#{project}/locations/#{location}/previews/#{preview}/resourceChanges/#{resource_change}" end |
#resource_drift_path(project:, location:, preview:, resource_drift:) ⇒ ::String
Create a fully-qualified ResourceDrift resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}
139 140 141 142 143 144 145 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 139 def resource_drift_path project:, location:, preview:, resource_drift: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "preview cannot contain /" if preview.to_s.include? "/" "projects/#{project}/locations/#{location}/previews/#{preview}/resourceDrifts/#{resource_drift}" 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}
96 97 98 99 100 101 102 103 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 96 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}
160 161 162 163 164 165 166 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 160 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}
179 180 181 182 183 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 179 def service_account_path project:, service_account: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/serviceAccounts/#{service_account}" end |
#terraform_version_path(project:, location:, terraform_version:) ⇒ ::String
Create a fully-qualified TerraformVersion resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/terraformVersions/{terraform_version}
197 198 199 200 201 202 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 197 def terraform_version_path project:, location:, terraform_version: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/terraformVersions/#{terraform_version}" 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}
216 217 218 219 220 221 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 216 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 |