Module: Google::Cloud::Tpu::V1::Tpu::Paths
Overview
Path helper methods for the Tpu API.
Instance Method Summary collapse
-
#accelerator_type_path(project:, location:, accelerator_type:) ⇒ ::String
Create a fully-qualified AcceleratorType resource string.
-
#location_path(project:, location:) ⇒ ::String
Create a fully-qualified Location resource string.
-
#node_path(project:, location:, node:) ⇒ ::String
Create a fully-qualified Node resource string.
-
#tensor_flow_version_path(project:, location:, tensor_flow_version:) ⇒ ::String
Create a fully-qualified TensorFlowVersion resource string.
Instance Method Details
#accelerator_type_path(project:, location:, accelerator_type:) ⇒ ::String
Create a fully-qualified AcceleratorType resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}
39 40 41 42 43 44 |
# File 'lib/google/cloud/tpu/v1/tpu/paths.rb', line 39 def accelerator_type_path project:, location:, accelerator_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}/acceleratorTypes/#{accelerator_type}" 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}
57 58 59 60 61 |
# File 'lib/google/cloud/tpu/v1/tpu/paths.rb', line 57 def location_path project:, location: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/locations/#{location}" end |
#node_path(project:, location:, node:) ⇒ ::String
Create a fully-qualified Node resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/nodes/{node}
75 76 77 78 79 80 |
# File 'lib/google/cloud/tpu/v1/tpu/paths.rb', line 75 def node_path project:, location:, node: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" "projects/#{project}/locations/#{location}/nodes/#{node}" end |
#tensor_flow_version_path(project:, location:, tensor_flow_version:) ⇒ ::String
Create a fully-qualified TensorFlowVersion resource string.
The resource will be in the following format:
projects/{project}/locations/{location}/tensorFlowVersions/{tensor_flow_version}
94 95 96 97 98 99 |
# File 'lib/google/cloud/tpu/v1/tpu/paths.rb', line 94 def tensor_flow_version_path project:, location:, tensor_flow_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}/tensorFlowVersions/#{tensor_flow_version}" end |