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

Instance Method Details

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

Create a fully-qualified AutoMigrationConfig resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/autoMigrationConfig

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


38
39
40
41
42
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 38

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

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

#deployment_group_path(project:, location:, deployment_group:) ⇒ ::String

Create a fully-qualified DeploymentGroup resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/deploymentGroups/{deployment_group}

Parameters:

  • project (String)
  • location (String)
  • deployment_group (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


75
76
77
78
79
80
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 75

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

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

#deployment_group_revision_path(project:, location:, deployment_group:, revision:) ⇒ ::String

Create a fully-qualified DeploymentGroupRevision resource string.

The resource will be in the following format:

projects/{project}/locations/{location}/deploymentGroups/{deployment_group}/revisions/{revision}

Parameters:

  • project (String)
  • location (String)
  • deployment_group (String)
  • revision (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


95
96
97
98
99
100
101
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 95

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

  "projects/#{project}/locations/#{location}/deploymentGroups/#{deployment_group}/revisions/#{revision}"
end

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

Parameters:

  • project (String)
  • location (String)
  • deployment (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


56
57
58
59
60
61
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 56

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}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


114
115
116
117
118
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 114

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}

Parameters:

  • project (String)
  • location (String)
  • preview (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


132
133
134
135
136
137
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 132

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}

Parameters:

  • project (String)
  • location (String)
  • preview (String)
  • resource_change (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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}

Parameters:

  • project (String)
  • location (String)
  • preview (String)
  • resource_drift (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


196
197
198
199
200
201
202
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 196

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}

Parameters:

  • project (String)
  • location (String)
  • deployment (String)
  • revision (String)
  • resource (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


153
154
155
156
157
158
159
160
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 153

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}

Parameters:

  • project (String)
  • location (String)
  • deployment (String)
  • revision (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


217
218
219
220
221
222
223
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 217

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}

Parameters:

  • project (String)
  • service_account (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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

  "projects/#{project}/serviceAccounts/#{}"
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}

Parameters:

  • project (String)
  • location (String)
  • terraform_version (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


273
274
275
276
277
278
# File 'lib/google/cloud/config_service/v1/config/paths.rb', line 273

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