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

#automation_path(project:, location:, delivery_pipeline:, automation:) ⇒ ::String

Create a fully-qualified Automation resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def automation_path project:, location:, delivery_pipeline:, automation:
  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}/automations/#{automation}"
end

#automation_run_path(project:, location:, delivery_pipeline:, automation_run:) ⇒ ::String

Create a fully-qualified AutomationRun resource string.

The resource will be in the following format:

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

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


61
62
63
64
65
66
67
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 61

def automation_run_path project:, location:, delivery_pipeline:, automation_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? "/"

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

#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)


81
82
83
84
85
86
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 81

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)


100
101
102
103
104
105
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 100

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)


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

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

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

#custom_target_type_path(project:, location:, custom_target_type:) ⇒ ::String

Create a fully-qualified CustomTargetType resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/customTargetTypes/{custom_target_type}

Parameters:

  • project (String)
  • location (String)
  • custom_target_type (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/locations/#{location}/customTargetTypes/#{custom_target_type}"
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)


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

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

#deploy_policy_path(project:, location:, deploy_policy:) ⇒ ::String

Create a fully-qualified DeployPolicy resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/deployPolicies/{deploy_policy}

Parameters:

  • project (String)
  • location (String)
  • deploy_policy (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

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

Parameters:

  • project (String)
  • location (String)
  • job (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


193
194
195
196
197
198
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 193

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

#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)


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

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)


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

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)


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

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)


274
275
276
277
278
279
280
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 274

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

#repository_path(project:, location:, connection:, repository:) ⇒ ::String

Create a fully-qualified Repository resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}

Parameters:

  • project (String)
  • location (String)
  • connection (String)
  • repository (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


295
296
297
298
299
300
301
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 295

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

  "projects/#{project}/locations/#{location}/connections/#{connection}/repositories/#{repository}"
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)


317
318
319
320
321
322
323
324
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 317

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)


338
339
340
341
342
343
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 338

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)


357
358
359
360
361
362
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 357

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)


376
377
378
379
380
381
# File 'lib/google/cloud/deploy/v1/cloud_deploy/paths.rb', line 376

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