Module: Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Paths
- Extended by:
- Paths
- Included in:
- Client, Paths, Rest::Client
- 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_partition_path(project:, instance:, instance_partition:) ⇒ ::String
Create a fully-qualified InstancePartition 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_partition_path(project:, instance:, instance_partition:) ⇒ ::String
Create a fully-qualified InstancePartition resource string.
The resource will be in the following format:
projects/{project}/instances/{instance}/instancePartitions/{instance_partition}
75 76 77 78 79 80 |
# File 'lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb', line 75 def instance_partition_path project:, instance:, instance_partition: raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" "projects/#{project}/instances/#{instance}/instancePartitions/#{instance_partition}" 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}
92 93 94 |
# File 'lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb', line 92 def project_path project: "projects/#{project}" end |