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

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


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}

Parameters:

  • project (String)
  • location (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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}

Parameters:

  • project (String)
  • service_account (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

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)


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}

Parameters:

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

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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