Module: Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Paths
- Extended by:
- Paths
- Defined in:
- lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb
Overview
Path helper methods for the InstanceAdmin API.
Instance Method Summary collapse
-
#instance_config_path(project:, instance_config:) ⇒ ::String
Create a fully-qualified InstanceConfig resource string.
-
#instance_path(project:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
-
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
Instance Method Details
#instance_config_path(project:, instance_config:) ⇒ ::String
Create a fully-qualified InstanceConfig resource string.
The resource will be in the following format:
projects/{project}/instanceConfigs/{instance_config}
57 58 59 60 61 |
# File 'lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb', line 57 def instance_config_path project:, instance_config: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/instanceConfigs/#{instance_config}" end |
#instance_path(project:, instance:) ⇒ ::String
Create a fully-qualified Instance resource string.
The resource will be in the following format:
projects/{project}/instances/{instance}
40 41 42 43 44 |
# File 'lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb', line 40 def instance_path project:, instance: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" "projects/#{project}/instances/#{instance}" end |
#project_path(project:) ⇒ ::String
Create a fully-qualified Project resource string.
The resource will be in the following format:
projects/{project}
73 74 75 |
# File 'lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb', line 73 def project_path project: "projects/#{project}" end |