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_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_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}
118 119 120 121 122 123 124 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 118 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}
137 138 139 140 141 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 137 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}
155 156 157 158 159 160 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 155 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}
174 175 176 177 178 179 |
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 174 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 |