Module: Google::Cloud::Dataproc::V1::ClusterController::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/dataproc/v1/cluster_controller/paths.rb
Overview
Path helper methods for the ClusterController API.
Instance Method Summary collapse
-
#cluster_path(project:, location:, cluster:) ⇒ ::String
Create a fully-qualified Cluster resource string.
-
#service_path(project:, location:, service:) ⇒ ::String
Create a fully-qualified Service resource string.
Instance Method Details
#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}
39 40 41 42 43 44 |
# File 'lib/google/cloud/dataproc/v1/cluster_controller/paths.rb', line 39 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 |
#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}
58 59 60 61 62 63 |
# File 'lib/google/cloud/dataproc/v1/cluster_controller/paths.rb', line 58 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 |