Module: Google::Cloud::Deploy::V1::CloudDeploy::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/cloud/deploy/v1/cloud_deploy/paths.rb

Overview

Path helper methods for the CloudDeploy API.

Instance Method Summary collapse

Instance Method Details

#build_path(project:, location:, build:) ⇒ ::String

Create a fully-qualified Build resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/builds/{build}

Parameters:

  • project (String)
  • location (String)
  • build (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


39
40
41
42
43
44
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 39

def build_path project:, location:, build:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/builds/#{build}"
end

#cluster_path(project:, location:, cluster:) ⇒ ::String

Create a fully-qualified Cluster resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/clusters/{cluster}

Parameters:

  • project (String)
  • location (String)
  • cluster (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


58
59
60
61
62
63
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 58

def cluster_path project:, location:, cluster:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/clusters/#{cluster}"
end

#config_path(project:, location:) ⇒ ::String

Create a fully-qualified Config resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/config

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


76
77
78
79
80
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 76

def config_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}/config"
end

#delivery_pipeline_path(project:, location:, delivery_pipeline:) ⇒ ::String

Create a fully-qualified DeliveryPipeline resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}

Parameters:

  • project (String)
  • location (String)
  • delivery_pipeline (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


94
95
96
97
98
99
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 94

def delivery_pipeline_path project:, location:, delivery_pipeline:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/deliveryPipelines/#{delivery_pipeline}"
end

#job_run_path(project:, location:, delivery_pipeline:, release:, rollout:, job_run:) ⇒ ::String

Create a fully-qualified JobRun resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}

Parameters:

  • project (String)
  • location (String)
  • delivery_pipeline (String)
  • release (String)
  • rollout (String)
  • job_run (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


116
117
118
119
120
121
122
123
124
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 116

def job_run_path project:, location:, delivery_pipeline:, release:, rollout:, job_run:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "delivery_pipeline cannot contain /" if delivery_pipeline.to_s.include? "/"
  raise ::ArgumentError, "release cannot contain /" if release.to_s.include? "/"
  raise ::ArgumentError, "rollout cannot contain /" if rollout.to_s.include? "/"

  "projects/#{project}/locations/#{location}/deliveryPipelines/#{delivery_pipeline}/releases/#{release}/rollouts/#{rollout}/jobRuns/#{job_run}"
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}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


137
138
139
140
141
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 137

def location_path project:, location:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"

  "projects/#{project}/locations/#{location}"
end

#membership_path(project:, location:, membership:) ⇒ ::String

Create a fully-qualified Membership resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/memberships/{membership}

Parameters:

  • project (String)
  • location (String)
  • membership (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


155
156
157
158
159
160
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 155

def membership_path project:, location:, membership:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/memberships/#{membership}"
end

#release_path(project:, location:, delivery_pipeline:, release:) ⇒ ::String

Create a fully-qualified Release resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}

Parameters:

  • project (String)
  • location (String)
  • delivery_pipeline (String)
  • release (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


175
176
177
178
179
180
181
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 175

def release_path project:, location:, delivery_pipeline:, release:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "delivery_pipeline cannot contain /" if delivery_pipeline.to_s.include? "/"

  "projects/#{project}/locations/#{location}/deliveryPipelines/#{delivery_pipeline}/releases/#{release}"
end

#rollout_path(project:, location:, delivery_pipeline:, release:, rollout:) ⇒ ::String

Create a fully-qualified Rollout resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}

Parameters:

  • project (String)
  • location (String)
  • delivery_pipeline (String)
  • release (String)
  • rollout (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


197
198
199
200
201
202
203
204
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 197

def rollout_path project:, location:, delivery_pipeline:, release:, rollout:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
  raise ::ArgumentError, "delivery_pipeline cannot contain /" if delivery_pipeline.to_s.include? "/"
  raise ::ArgumentError, "release cannot contain /" if release.to_s.include? "/"

  "projects/#{project}/locations/#{location}/deliveryPipelines/#{delivery_pipeline}/releases/#{release}/rollouts/#{rollout}"
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}

Parameters:

  • project (String)
  • location (String)
  • service (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


218
219
220
221
222
223
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 218

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

#target_path(project:, location:, target:) ⇒ ::String

Create a fully-qualified Target resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/targets/{target}

Parameters:

  • project (String)
  • location (String)
  • target (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


237
238
239
240
241
242
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 237

def target_path project:, location:, target:
  raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
  raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"

  "projects/#{project}/locations/#{location}/targets/#{target}"
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}

Parameters:

  • project (String)
  • location (String)
  • worker_pool (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


256
257
258
259
260
261
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 256

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