Module: Google::Cloud::Tasks::V2beta3::CloudTasks::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- Defined in:
- lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb
Overview
Path helper methods for the CloudTasks API.
Instance Method Summary collapse
-
#cmek_config_path(project:, location:) ⇒ ::String
Create a fully-qualified CmekConfig resource string.
-
#crypto_key_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKey resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#queue_path(project:, location:, queue:) ⇒ ::String
Create a fully-qualified Queue resource string.
-
#task_path(project:, location:, queue:, task:) ⇒ ::String
Create a fully-qualified Task resource string.
Instance Method Details
#cmek_config_path(project:, location:) ⇒ ::String
Create a fully-qualified CmekConfig resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/cmekConfig
38 39 40 41 42 |
# File 'lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb', line 38 def cmek_config_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}/cmekConfig" end |
#crypto_key_path(project:, location:, key_ring:, crypto_key:) ⇒ ::String
Create a fully-qualified CryptoKey resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
57 58 59 60 61 62 63 |
# File 'lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb', line 57 def crypto_key_path project:, location:, key_ring:, crypto_key: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" 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}
76 77 78 79 80 |
# File 'lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb', line 76 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#queue_path(project:, location:, queue:) ⇒ ::String
Create a fully-qualified Queue resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/queues/{queue}
94 95 96 97 98 99 |
# File 'lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb', line 94 def queue_path project:, location:, queue: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/queues/#{queue}" end |
#task_path(project:, location:, queue:, task:) ⇒ ::String
Create a fully-qualified Task resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/queues/{queue}/tasks/{task}
114 115 116 117 118 119 120 |
# File 'lib/google/cloud/tasks/v2beta3/cloud_tasks/paths.rb', line 114 def task_path project:, location:, queue:, task: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" raise ::ArgumentError, "queue cannot contain /" if queue.to_s.include? "/" "projects/#{project}/locations/#{location}/queues/#{queue}/tasks/#{task}" end |