google-cloud-spanner-admin-instance-v1 0.13.2 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,6 +60,25 @@ module Google
60
60
  "projects/#{project}/instanceConfigs/#{instance_config}"
61
61
  end
62
62
 
63
+ ##
64
+ # Create a fully-qualified InstancePartition resource string.
65
+ #
66
+ # The resource will be in the following format:
67
+ #
68
+ # `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
69
+ #
70
+ # @param project [String]
71
+ # @param instance [String]
72
+ # @param instance_partition [String]
73
+ #
74
+ # @return [::String]
75
+ def instance_partition_path project:, instance:, instance_partition:
76
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
77
+ raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
78
+
79
+ "projects/#{project}/instances/#{instance}/instancePartitions/#{instance_partition}"
80
+ end
81
+
63
82
  ##
64
83
  # Create a fully-qualified Project resource string.
65
84
  #