Module: Google::Cloud::Run::V2::Executions::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/run/v2/executions/paths.rb
Overview
Path helper methods for the Executions API.
Instance Method Summary collapse
-
#execution_path(project:, location:, job:, execution:) ⇒ ::String
Create a fully-qualified Execution resource string.
-
#job_path(project:, location:, job:) ⇒ ::String
Create a fully-qualified Job resource string.
Instance Method Details
#execution_path(project:, location:, job:, execution:) ⇒ ::String
Create a fully-qualified Execution resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/jobs/{job}/executions/{execution}
40 41 42 43 44 45 46 |
# File 'lib/google/cloud/run/v2/executions/paths.rb', line 40 def execution_path project:, location:, job:, execution: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "job cannot contain /" if job.to_s.include? "/" "projects/#{project}/locations/#{location}/jobs/#{job}/executions/#{execution}" end |
#job_path(project:, location:, job:) ⇒ ::String
Create a fully-qualified Job resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/jobs/{job}
60 61 62 63 64 65 |
# File 'lib/google/cloud/run/v2/executions/paths.rb', line 60 def job_path project:, location:, job: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/jobs/#{job}" end |