google-cloud-spanner-admin-instance-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +169 -0
- data/LICENSE.md +203 -0
- data/README.md +75 -0
- data/lib/google-cloud-spanner-admin-instance-v1.rb +21 -0
- data/lib/google/cloud/spanner/admin/instance/v1.rb +39 -0
- data/lib/google/cloud/spanner/admin/instance/v1/instance_admin.rb +74 -0
- data/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb +1291 -0
- data/lib/google/cloud/spanner/admin/instance/v1/instance_admin/credentials.rb +56 -0
- data/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb +574 -0
- data/lib/google/cloud/spanner/admin/instance/v1/instance_admin/paths.rb +85 -0
- data/lib/google/cloud/spanner/admin/instance/v1/version.rb +32 -0
- data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb +128 -0
- data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +182 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +59 -0
- data/proto_docs/google/api/resource.rb +247 -0
- data/proto_docs/google/iam/v1/iam_policy.rb +80 -0
- data/proto_docs/google/iam/v1/options.rb +40 -0
- data/proto_docs/google/iam/v1/policy.rb +248 -0
- data/proto_docs/google/longrunning/operations.rb +150 -0
- data/proto_docs/google/protobuf/any.rb +138 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +120 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/spanner/admin/instance/v1/spanner_instance_admin.rb +391 -0
- data/proto_docs/google/type/expr.rb +52 -0
- metadata +231 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Spanner
|
23
|
+
module Admin
|
24
|
+
module Instance
|
25
|
+
module V1
|
26
|
+
module InstanceAdmin
|
27
|
+
# Path helper methods for the InstanceAdmin API.
|
28
|
+
module Paths
|
29
|
+
##
|
30
|
+
# Create a fully-qualified Instance resource string.
|
31
|
+
#
|
32
|
+
# The resource will be in the following format:
|
33
|
+
#
|
34
|
+
# `projects/{project}/instances/{instance}`
|
35
|
+
#
|
36
|
+
# @param project [String]
|
37
|
+
# @param instance [String]
|
38
|
+
#
|
39
|
+
# @return [::String]
|
40
|
+
def instance_path project:, instance:
|
41
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/instances/#{instance}"
|
44
|
+
end
|
45
|
+
|
46
|
+
##
|
47
|
+
# Create a fully-qualified InstanceConfig resource string.
|
48
|
+
#
|
49
|
+
# The resource will be in the following format:
|
50
|
+
#
|
51
|
+
# `projects/{project}/instanceConfigs/{instance_config}`
|
52
|
+
#
|
53
|
+
# @param project [String]
|
54
|
+
# @param instance_config [String]
|
55
|
+
#
|
56
|
+
# @return [::String]
|
57
|
+
def instance_config_path project:, instance_config:
|
58
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
59
|
+
|
60
|
+
"projects/#{project}/instanceConfigs/#{instance_config}"
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Create a fully-qualified Project resource string.
|
65
|
+
#
|
66
|
+
# The resource will be in the following format:
|
67
|
+
#
|
68
|
+
# `projects/{project}`
|
69
|
+
#
|
70
|
+
# @param project [String]
|
71
|
+
#
|
72
|
+
# @return [::String]
|
73
|
+
def project_path project:
|
74
|
+
"projects/#{project}"
|
75
|
+
end
|
76
|
+
|
77
|
+
extend self
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Spanner
|
23
|
+
module Admin
|
24
|
+
module Instance
|
25
|
+
module V1
|
26
|
+
VERSION = "0.1.0"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,128 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/spanner/admin/instance/v1/spanner_instance_admin.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/client_pb'
|
8
|
+
require 'google/api/field_behavior_pb'
|
9
|
+
require 'google/api/resource_pb'
|
10
|
+
require 'google/iam/v1/iam_policy_pb'
|
11
|
+
require 'google/iam/v1/policy_pb'
|
12
|
+
require 'google/longrunning/operations_pb'
|
13
|
+
require 'google/protobuf/empty_pb'
|
14
|
+
require 'google/protobuf/field_mask_pb'
|
15
|
+
require 'google/protobuf/timestamp_pb'
|
16
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
|
+
add_file("google/spanner/admin/instance/v1/spanner_instance_admin.proto", :syntax => :proto3) do
|
18
|
+
add_message "google.spanner.admin.instance.v1.ReplicaInfo" do
|
19
|
+
optional :location, :string, 1
|
20
|
+
optional :type, :enum, 2, "google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType"
|
21
|
+
optional :default_leader_location, :bool, 3
|
22
|
+
end
|
23
|
+
add_enum "google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType" do
|
24
|
+
value :TYPE_UNSPECIFIED, 0
|
25
|
+
value :READ_WRITE, 1
|
26
|
+
value :READ_ONLY, 2
|
27
|
+
value :WITNESS, 3
|
28
|
+
end
|
29
|
+
add_message "google.spanner.admin.instance.v1.InstanceConfig" do
|
30
|
+
optional :name, :string, 1
|
31
|
+
optional :display_name, :string, 2
|
32
|
+
repeated :replicas, :message, 3, "google.spanner.admin.instance.v1.ReplicaInfo"
|
33
|
+
end
|
34
|
+
add_message "google.spanner.admin.instance.v1.Instance" do
|
35
|
+
optional :name, :string, 1
|
36
|
+
optional :config, :string, 2
|
37
|
+
optional :display_name, :string, 3
|
38
|
+
optional :node_count, :int32, 5
|
39
|
+
optional :state, :enum, 6, "google.spanner.admin.instance.v1.Instance.State"
|
40
|
+
map :labels, :string, :string, 7
|
41
|
+
repeated :endpoint_uris, :string, 8
|
42
|
+
end
|
43
|
+
add_enum "google.spanner.admin.instance.v1.Instance.State" do
|
44
|
+
value :STATE_UNSPECIFIED, 0
|
45
|
+
value :CREATING, 1
|
46
|
+
value :READY, 2
|
47
|
+
end
|
48
|
+
add_message "google.spanner.admin.instance.v1.ListInstanceConfigsRequest" do
|
49
|
+
optional :parent, :string, 1
|
50
|
+
optional :page_size, :int32, 2
|
51
|
+
optional :page_token, :string, 3
|
52
|
+
end
|
53
|
+
add_message "google.spanner.admin.instance.v1.ListInstanceConfigsResponse" do
|
54
|
+
repeated :instance_configs, :message, 1, "google.spanner.admin.instance.v1.InstanceConfig"
|
55
|
+
optional :next_page_token, :string, 2
|
56
|
+
end
|
57
|
+
add_message "google.spanner.admin.instance.v1.GetInstanceConfigRequest" do
|
58
|
+
optional :name, :string, 1
|
59
|
+
end
|
60
|
+
add_message "google.spanner.admin.instance.v1.GetInstanceRequest" do
|
61
|
+
optional :name, :string, 1
|
62
|
+
optional :field_mask, :message, 2, "google.protobuf.FieldMask"
|
63
|
+
end
|
64
|
+
add_message "google.spanner.admin.instance.v1.CreateInstanceRequest" do
|
65
|
+
optional :parent, :string, 1
|
66
|
+
optional :instance_id, :string, 2
|
67
|
+
optional :instance, :message, 3, "google.spanner.admin.instance.v1.Instance"
|
68
|
+
end
|
69
|
+
add_message "google.spanner.admin.instance.v1.ListInstancesRequest" do
|
70
|
+
optional :parent, :string, 1
|
71
|
+
optional :page_size, :int32, 2
|
72
|
+
optional :page_token, :string, 3
|
73
|
+
optional :filter, :string, 4
|
74
|
+
end
|
75
|
+
add_message "google.spanner.admin.instance.v1.ListInstancesResponse" do
|
76
|
+
repeated :instances, :message, 1, "google.spanner.admin.instance.v1.Instance"
|
77
|
+
optional :next_page_token, :string, 2
|
78
|
+
end
|
79
|
+
add_message "google.spanner.admin.instance.v1.UpdateInstanceRequest" do
|
80
|
+
optional :instance, :message, 1, "google.spanner.admin.instance.v1.Instance"
|
81
|
+
optional :field_mask, :message, 2, "google.protobuf.FieldMask"
|
82
|
+
end
|
83
|
+
add_message "google.spanner.admin.instance.v1.DeleteInstanceRequest" do
|
84
|
+
optional :name, :string, 1
|
85
|
+
end
|
86
|
+
add_message "google.spanner.admin.instance.v1.CreateInstanceMetadata" do
|
87
|
+
optional :instance, :message, 1, "google.spanner.admin.instance.v1.Instance"
|
88
|
+
optional :start_time, :message, 2, "google.protobuf.Timestamp"
|
89
|
+
optional :cancel_time, :message, 3, "google.protobuf.Timestamp"
|
90
|
+
optional :end_time, :message, 4, "google.protobuf.Timestamp"
|
91
|
+
end
|
92
|
+
add_message "google.spanner.admin.instance.v1.UpdateInstanceMetadata" do
|
93
|
+
optional :instance, :message, 1, "google.spanner.admin.instance.v1.Instance"
|
94
|
+
optional :start_time, :message, 2, "google.protobuf.Timestamp"
|
95
|
+
optional :cancel_time, :message, 3, "google.protobuf.Timestamp"
|
96
|
+
optional :end_time, :message, 4, "google.protobuf.Timestamp"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
module Google
|
102
|
+
module Cloud
|
103
|
+
module Spanner
|
104
|
+
module Admin
|
105
|
+
module Instance
|
106
|
+
module V1
|
107
|
+
ReplicaInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo").msgclass
|
108
|
+
ReplicaInfo::ReplicaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType").enummodule
|
109
|
+
InstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig").msgclass
|
110
|
+
Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance").msgclass
|
111
|
+
Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.State").enummodule
|
112
|
+
ListInstanceConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigsRequest").msgclass
|
113
|
+
ListInstanceConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigsResponse").msgclass
|
114
|
+
GetInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstanceConfigRequest").msgclass
|
115
|
+
GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstanceRequest").msgclass
|
116
|
+
CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceRequest").msgclass
|
117
|
+
ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancesRequest").msgclass
|
118
|
+
ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancesResponse").msgclass
|
119
|
+
UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceRequest").msgclass
|
120
|
+
DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.DeleteInstanceRequest").msgclass
|
121
|
+
CreateInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceMetadata").msgclass
|
122
|
+
UpdateInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceMetadata").msgclass
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
@@ -0,0 +1,182 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/spanner/admin/instance/v1/spanner_instance_admin.proto for package 'Google.Cloud.Spanner.Admin.Instance.V1'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2020 Google LLC
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'grpc'
|
20
|
+
require 'google/spanner/admin/instance/v1/spanner_instance_admin_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Spanner
|
25
|
+
module Admin
|
26
|
+
module Instance
|
27
|
+
module V1
|
28
|
+
module InstanceAdmin
|
29
|
+
# Cloud Spanner Instance Admin API
|
30
|
+
#
|
31
|
+
# The Cloud Spanner Instance Admin API can be used to create, delete,
|
32
|
+
# modify and list instances. Instances are dedicated Cloud Spanner serving
|
33
|
+
# and storage resources to be used by Cloud Spanner databases.
|
34
|
+
#
|
35
|
+
# Each instance has a "configuration", which dictates where the
|
36
|
+
# serving resources for the Cloud Spanner instance are located (e.g.,
|
37
|
+
# US-central, Europe). Configurations are created by Google based on
|
38
|
+
# resource availability.
|
39
|
+
#
|
40
|
+
# Cloud Spanner billing is based on the instances that exist and their
|
41
|
+
# sizes. After an instance exists, there are no additional
|
42
|
+
# per-database or per-operation charges for use of the instance
|
43
|
+
# (though there may be additional network bandwidth charges).
|
44
|
+
# Instances offer isolation: problems with databases in one instance
|
45
|
+
# will not affect other instances. However, within an instance
|
46
|
+
# databases can affect each other. For example, if one database in an
|
47
|
+
# instance receives a lot of requests and consumes most of the
|
48
|
+
# instance resources, fewer resources are available for other
|
49
|
+
# databases in that instance, and their performance may suffer.
|
50
|
+
class Service
|
51
|
+
|
52
|
+
include GRPC::GenericService
|
53
|
+
|
54
|
+
self.marshal_class_method = :encode
|
55
|
+
self.unmarshal_class_method = :decode
|
56
|
+
self.service_name = 'google.spanner.admin.instance.v1.InstanceAdmin'
|
57
|
+
|
58
|
+
# Lists the supported instance configurations for a given project.
|
59
|
+
rpc :ListInstanceConfigs, Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse
|
60
|
+
# Gets information about a particular instance configuration.
|
61
|
+
rpc :GetInstanceConfig, Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig
|
62
|
+
# Lists all instances in the given project.
|
63
|
+
rpc :ListInstances, Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse
|
64
|
+
# Gets information about a particular instance.
|
65
|
+
rpc :GetInstance, Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest, Google::Cloud::Spanner::Admin::Instance::V1::Instance
|
66
|
+
# Creates an instance and begins preparing it to begin serving. The
|
67
|
+
# returned [long-running operation][google.longrunning.Operation]
|
68
|
+
# can be used to track the progress of preparing the new
|
69
|
+
# instance. The instance name is assigned by the caller. If the
|
70
|
+
# named instance already exists, `CreateInstance` returns
|
71
|
+
# `ALREADY_EXISTS`.
|
72
|
+
#
|
73
|
+
# Immediately upon completion of this request:
|
74
|
+
#
|
75
|
+
# * The instance is readable via the API, with all requested attributes
|
76
|
+
# but no allocated resources. Its state is `CREATING`.
|
77
|
+
#
|
78
|
+
# Until completion of the returned operation:
|
79
|
+
#
|
80
|
+
# * Cancelling the operation renders the instance immediately unreadable
|
81
|
+
# via the API.
|
82
|
+
# * The instance can be deleted.
|
83
|
+
# * All other attempts to modify the instance are rejected.
|
84
|
+
#
|
85
|
+
# Upon completion of the returned operation:
|
86
|
+
#
|
87
|
+
# * Billing for all successfully-allocated resources begins (some types
|
88
|
+
# may have lower than the requested levels).
|
89
|
+
# * Databases can be created in the instance.
|
90
|
+
# * The instance's allocated resource levels are readable via the API.
|
91
|
+
# * The instance's state becomes `READY`.
|
92
|
+
#
|
93
|
+
# The returned [long-running operation][google.longrunning.Operation] will
|
94
|
+
# have a name of the format `<instance_name>/operations/<operation_id>` and
|
95
|
+
# can be used to track creation of the instance. The
|
96
|
+
# [metadata][google.longrunning.Operation.metadata] field type is
|
97
|
+
# [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].
|
98
|
+
# The [response][google.longrunning.Operation.response] field type is
|
99
|
+
# [Instance][google.spanner.admin.instance.v1.Instance], if successful.
|
100
|
+
rpc :CreateInstance, Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest, Google::Longrunning::Operation
|
101
|
+
# Updates an instance, and begins allocating or releasing resources
|
102
|
+
# as requested. The returned [long-running
|
103
|
+
# operation][google.longrunning.Operation] can be used to track the
|
104
|
+
# progress of updating the instance. If the named instance does not
|
105
|
+
# exist, returns `NOT_FOUND`.
|
106
|
+
#
|
107
|
+
# Immediately upon completion of this request:
|
108
|
+
#
|
109
|
+
# * For resource types for which a decrease in the instance's allocation
|
110
|
+
# has been requested, billing is based on the newly-requested level.
|
111
|
+
#
|
112
|
+
# Until completion of the returned operation:
|
113
|
+
#
|
114
|
+
# * Cancelling the operation sets its metadata's
|
115
|
+
# [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins
|
116
|
+
# restoring resources to their pre-request values. The operation
|
117
|
+
# is guaranteed to succeed at undoing all resource changes,
|
118
|
+
# after which point it terminates with a `CANCELLED` status.
|
119
|
+
# * All other attempts to modify the instance are rejected.
|
120
|
+
# * Reading the instance via the API continues to give the pre-request
|
121
|
+
# resource levels.
|
122
|
+
#
|
123
|
+
# Upon completion of the returned operation:
|
124
|
+
#
|
125
|
+
# * Billing begins for all successfully-allocated resources (some types
|
126
|
+
# may have lower than the requested levels).
|
127
|
+
# * All newly-reserved resources are available for serving the instance's
|
128
|
+
# tables.
|
129
|
+
# * The instance's new resource levels are readable via the API.
|
130
|
+
#
|
131
|
+
# The returned [long-running operation][google.longrunning.Operation] will
|
132
|
+
# have a name of the format `<instance_name>/operations/<operation_id>` and
|
133
|
+
# can be used to track the instance modification. The
|
134
|
+
# [metadata][google.longrunning.Operation.metadata] field type is
|
135
|
+
# [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].
|
136
|
+
# The [response][google.longrunning.Operation.response] field type is
|
137
|
+
# [Instance][google.spanner.admin.instance.v1.Instance], if successful.
|
138
|
+
#
|
139
|
+
# Authorization requires `spanner.instances.update` permission on
|
140
|
+
# resource [name][google.spanner.admin.instance.v1.Instance.name].
|
141
|
+
rpc :UpdateInstance, Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest, Google::Longrunning::Operation
|
142
|
+
# Deletes an instance.
|
143
|
+
#
|
144
|
+
# Immediately upon completion of the request:
|
145
|
+
#
|
146
|
+
# * Billing ceases for all of the instance's reserved resources.
|
147
|
+
#
|
148
|
+
# Soon afterward:
|
149
|
+
#
|
150
|
+
# * The instance and *all of its databases* immediately and
|
151
|
+
# irrevocably disappear from the API. All data in the databases
|
152
|
+
# is permanently deleted.
|
153
|
+
rpc :DeleteInstance, Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest, Google::Protobuf::Empty
|
154
|
+
# Sets the access control policy on an instance resource. Replaces any
|
155
|
+
# existing policy.
|
156
|
+
#
|
157
|
+
# Authorization requires `spanner.instances.setIamPolicy` on
|
158
|
+
# [resource][google.iam.v1.SetIamPolicyRequest.resource].
|
159
|
+
rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
|
160
|
+
# Gets the access control policy for an instance resource. Returns an empty
|
161
|
+
# policy if an instance exists but does not have a policy set.
|
162
|
+
#
|
163
|
+
# Authorization requires `spanner.instances.getIamPolicy` on
|
164
|
+
# [resource][google.iam.v1.GetIamPolicyRequest.resource].
|
165
|
+
rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
|
166
|
+
# Returns permissions that the caller has on the specified instance resource.
|
167
|
+
#
|
168
|
+
# Attempting this RPC on a non-existent Cloud Spanner instance resource will
|
169
|
+
# result in a NOT_FOUND error if the user has `spanner.instances.list`
|
170
|
+
# permission on the containing Google Cloud Project. Otherwise returns an
|
171
|
+
# empty set of permissions.
|
172
|
+
rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
|
173
|
+
end
|
174
|
+
|
175
|
+
Stub = Service.rpc_stub_class
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2020 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Api
|
22
|
+
# An indicator of the behavior of a given field (for example, that a field
|
23
|
+
# is required in requests, or given as output but ignored as input).
|
24
|
+
# This **does not** change the behavior in protocol buffers itself; it only
|
25
|
+
# denotes the behavior and may affect how API tooling handles the field.
|
26
|
+
#
|
27
|
+
# Note: This enum **may** receive new values in the future.
|
28
|
+
module FieldBehavior
|
29
|
+
# Conventional default for enums. Do not use this.
|
30
|
+
FIELD_BEHAVIOR_UNSPECIFIED = 0
|
31
|
+
|
32
|
+
# Specifically denotes a field as optional.
|
33
|
+
# While all fields in protocol buffers are optional, this may be specified
|
34
|
+
# for emphasis if appropriate.
|
35
|
+
OPTIONAL = 1
|
36
|
+
|
37
|
+
# Denotes a field as required.
|
38
|
+
# This indicates that the field **must** be provided as part of the request,
|
39
|
+
# and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
|
40
|
+
REQUIRED = 2
|
41
|
+
|
42
|
+
# Denotes a field as output only.
|
43
|
+
# This indicates that the field is provided in responses, but including the
|
44
|
+
# field in a request does nothing (the server *must* ignore it and
|
45
|
+
# *must not* throw an error as a result of the field's presence).
|
46
|
+
OUTPUT_ONLY = 3
|
47
|
+
|
48
|
+
# Denotes a field as input only.
|
49
|
+
# This indicates that the field is provided in requests, and the
|
50
|
+
# corresponding field is not included in output.
|
51
|
+
INPUT_ONLY = 4
|
52
|
+
|
53
|
+
# Denotes a field as immutable.
|
54
|
+
# This indicates that the field may be set once in a request to create a
|
55
|
+
# resource, but may not be changed thereafter.
|
56
|
+
IMMUTABLE = 5
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|