google-cloud-spanner-admin-instance-v1 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,7 @@ module Google
23
23
  module Admin
24
24
  module Instance
25
25
  module V1
26
- VERSION = "0.7.0"
26
+ VERSION = "0.8.0"
27
27
  end
28
28
  end
29
29
  end
@@ -0,0 +1,30 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/spanner/admin/instance/v1/common.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/timestamp_pb'
7
+
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("google/spanner/admin/instance/v1/common.proto", :syntax => :proto3) do
10
+ add_message "google.spanner.admin.instance.v1.OperationProgress" do
11
+ optional :progress_percent, :int32, 1
12
+ optional :start_time, :message, 2, "google.protobuf.Timestamp"
13
+ optional :end_time, :message, 3, "google.protobuf.Timestamp"
14
+ end
15
+ end
16
+ end
17
+
18
+ module Google
19
+ module Cloud
20
+ module Spanner
21
+ module Admin
22
+ module Instance
23
+ module V1
24
+ OperationProgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.OperationProgress").msgclass
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -13,6 +13,7 @@ require 'google/longrunning/operations_pb'
13
13
  require 'google/protobuf/empty_pb'
14
14
  require 'google/protobuf/field_mask_pb'
15
15
  require 'google/protobuf/timestamp_pb'
16
+ require 'google/spanner/admin/instance/v1/common_pb'
16
17
 
17
18
  Google::Protobuf::DescriptorPool.generated_pool.build do
18
19
  add_file("google/spanner/admin/instance/v1/spanner_instance_admin.proto", :syntax => :proto3) do
@@ -30,8 +31,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
30
31
  add_message "google.spanner.admin.instance.v1.InstanceConfig" do
31
32
  optional :name, :string, 1
32
33
  optional :display_name, :string, 2
34
+ optional :config_type, :enum, 5, "google.spanner.admin.instance.v1.InstanceConfig.Type"
33
35
  repeated :replicas, :message, 3, "google.spanner.admin.instance.v1.ReplicaInfo"
36
+ repeated :optional_replicas, :message, 6, "google.spanner.admin.instance.v1.ReplicaInfo"
37
+ optional :base_config, :string, 7
38
+ map :labels, :string, :string, 8
39
+ optional :etag, :string, 9
34
40
  repeated :leader_options, :string, 4
41
+ optional :reconciling, :bool, 10
42
+ optional :state, :enum, 11, "google.spanner.admin.instance.v1.InstanceConfig.State"
43
+ end
44
+ add_enum "google.spanner.admin.instance.v1.InstanceConfig.Type" do
45
+ value :TYPE_UNSPECIFIED, 0
46
+ value :GOOGLE_MANAGED, 1
47
+ value :USER_MANAGED, 2
48
+ end
49
+ add_enum "google.spanner.admin.instance.v1.InstanceConfig.State" do
50
+ value :STATE_UNSPECIFIED, 0
51
+ value :CREATING, 1
52
+ value :READY, 2
35
53
  end
36
54
  add_message "google.spanner.admin.instance.v1.Instance" do
37
55
  optional :name, :string, 1
@@ -62,6 +80,32 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
62
80
  add_message "google.spanner.admin.instance.v1.GetInstanceConfigRequest" do
63
81
  optional :name, :string, 1
64
82
  end
83
+ add_message "google.spanner.admin.instance.v1.CreateInstanceConfigRequest" do
84
+ optional :parent, :string, 1
85
+ optional :instance_config_id, :string, 2
86
+ optional :instance_config, :message, 3, "google.spanner.admin.instance.v1.InstanceConfig"
87
+ optional :validate_only, :bool, 4
88
+ end
89
+ add_message "google.spanner.admin.instance.v1.UpdateInstanceConfigRequest" do
90
+ optional :instance_config, :message, 1, "google.spanner.admin.instance.v1.InstanceConfig"
91
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
92
+ optional :validate_only, :bool, 3
93
+ end
94
+ add_message "google.spanner.admin.instance.v1.DeleteInstanceConfigRequest" do
95
+ optional :name, :string, 1
96
+ optional :etag, :string, 2
97
+ optional :validate_only, :bool, 3
98
+ end
99
+ add_message "google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest" do
100
+ optional :parent, :string, 1
101
+ optional :filter, :string, 2
102
+ optional :page_size, :int32, 3
103
+ optional :page_token, :string, 4
104
+ end
105
+ add_message "google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse" do
106
+ repeated :operations, :message, 1, "google.longrunning.Operation"
107
+ optional :next_page_token, :string, 2
108
+ end
65
109
  add_message "google.spanner.admin.instance.v1.GetInstanceRequest" do
66
110
  optional :name, :string, 1
67
111
  optional :field_mask, :message, 2, "google.protobuf.FieldMask"
@@ -100,6 +144,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
100
144
  optional :cancel_time, :message, 3, "google.protobuf.Timestamp"
101
145
  optional :end_time, :message, 4, "google.protobuf.Timestamp"
102
146
  end
147
+ add_message "google.spanner.admin.instance.v1.CreateInstanceConfigMetadata" do
148
+ optional :instance_config, :message, 1, "google.spanner.admin.instance.v1.InstanceConfig"
149
+ optional :progress, :message, 2, "google.spanner.admin.instance.v1.OperationProgress"
150
+ optional :cancel_time, :message, 3, "google.protobuf.Timestamp"
151
+ end
152
+ add_message "google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata" do
153
+ optional :instance_config, :message, 1, "google.spanner.admin.instance.v1.InstanceConfig"
154
+ optional :progress, :message, 2, "google.spanner.admin.instance.v1.OperationProgress"
155
+ optional :cancel_time, :message, 3, "google.protobuf.Timestamp"
156
+ end
103
157
  end
104
158
  end
105
159
 
@@ -112,11 +166,18 @@ module Google
112
166
  ReplicaInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo").msgclass
113
167
  ReplicaInfo::ReplicaType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ReplicaInfo.ReplicaType").enummodule
114
168
  InstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig").msgclass
169
+ InstanceConfig::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.Type").enummodule
170
+ InstanceConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.InstanceConfig.State").enummodule
115
171
  Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance").msgclass
116
172
  Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.Instance.State").enummodule
117
173
  ListInstanceConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigsRequest").msgclass
118
174
  ListInstanceConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigsResponse").msgclass
119
175
  GetInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstanceConfigRequest").msgclass
176
+ CreateInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceConfigRequest").msgclass
177
+ UpdateInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceConfigRequest").msgclass
178
+ DeleteInstanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.DeleteInstanceConfigRequest").msgclass
179
+ ListInstanceConfigOperationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigOperationsRequest").msgclass
180
+ ListInstanceConfigOperationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse").msgclass
120
181
  GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.GetInstanceRequest").msgclass
121
182
  CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceRequest").msgclass
122
183
  ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.ListInstancesRequest").msgclass
@@ -125,6 +186,8 @@ module Google
125
186
  DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.DeleteInstanceRequest").msgclass
126
187
  CreateInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceMetadata").msgclass
127
188
  UpdateInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceMetadata").msgclass
189
+ CreateInstanceConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.CreateInstanceConfigMetadata").msgclass
190
+ UpdateInstanceConfigMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata").msgclass
128
191
  end
129
192
  end
130
193
  end
@@ -59,6 +59,114 @@ module Google
59
59
  rpc :ListInstanceConfigs, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsResponse
60
60
  # Gets information about a particular instance configuration.
61
61
  rpc :GetInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig
62
+ # Creates an instance config and begins preparing it to be used. The
63
+ # returned [long-running operation][google.longrunning.Operation]
64
+ # can be used to track the progress of preparing the new
65
+ # instance config. The instance config name is assigned by the caller. If the
66
+ # named instance config already exists, `CreateInstanceConfig` returns
67
+ # `ALREADY_EXISTS`.
68
+ #
69
+ # Immediately after the request returns:
70
+ #
71
+ # * The instance config is readable via the API, with all requested
72
+ # attributes. The instance config's
73
+ # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
74
+ # field is set to true. Its state is `CREATING`.
75
+ #
76
+ # While the operation is pending:
77
+ #
78
+ # * Cancelling the operation renders the instance config immediately
79
+ # unreadable via the API.
80
+ # * Except for deleting the creating resource, all other attempts to modify
81
+ # the instance config are rejected.
82
+ #
83
+ # Upon completion of the returned operation:
84
+ #
85
+ # * Instances can be created using the instance configuration.
86
+ # * The instance config's
87
+ # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
88
+ # field becomes false. Its state becomes `READY`.
89
+ #
90
+ # The returned [long-running operation][google.longrunning.Operation] will
91
+ # have a name of the format
92
+ # `<instance_config_name>/operations/<operation_id>` and can be used to track
93
+ # creation of the instance config. The
94
+ # [metadata][google.longrunning.Operation.metadata] field type is
95
+ # [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
96
+ # The [response][google.longrunning.Operation.response] field type is
97
+ # [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if
98
+ # successful.
99
+ #
100
+ # Authorization requires `spanner.instanceConfigs.create` permission on
101
+ # the resource
102
+ # [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].
103
+ rpc :CreateInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceConfigRequest, ::Google::Longrunning::Operation
104
+ # Updates an instance config. The returned
105
+ # [long-running operation][google.longrunning.Operation] can be used to track
106
+ # the progress of updating the instance. If the named instance config does
107
+ # not exist, returns `NOT_FOUND`.
108
+ #
109
+ # Only user managed configurations can be updated.
110
+ #
111
+ # Immediately after the request returns:
112
+ #
113
+ # * The instance config's
114
+ # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
115
+ # field is set to true.
116
+ #
117
+ # While the operation is pending:
118
+ #
119
+ # * Cancelling the operation sets its metadata's
120
+ # [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time].
121
+ # The operation is guaranteed to succeed at undoing all changes, after
122
+ # which point it terminates with a `CANCELLED` status.
123
+ # * All other attempts to modify the instance config are rejected.
124
+ # * Reading the instance config via the API continues to give the
125
+ # pre-request values.
126
+ #
127
+ # Upon completion of the returned operation:
128
+ #
129
+ # * Creating instances using the instance configuration uses the new
130
+ # values.
131
+ # * The instance config's new values are readable via the API.
132
+ # * The instance config's
133
+ # [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
134
+ # field becomes false.
135
+ #
136
+ # The returned [long-running operation][google.longrunning.Operation] will
137
+ # have a name of the format
138
+ # `<instance_config_name>/operations/<operation_id>` and can be used to track
139
+ # the instance config modification. The
140
+ # [metadata][google.longrunning.Operation.metadata] field type is
141
+ # [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].
142
+ # The [response][google.longrunning.Operation.response] field type is
143
+ # [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if
144
+ # successful.
145
+ #
146
+ # Authorization requires `spanner.instanceConfigs.update` permission on
147
+ # the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].
148
+ rpc :UpdateInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceConfigRequest, ::Google::Longrunning::Operation
149
+ # Deletes the instance config. Deletion is only allowed when no
150
+ # instances are using the configuration. If any instances are using
151
+ # the config, returns `FAILED_PRECONDITION`.
152
+ #
153
+ # Only user managed configurations can be deleted.
154
+ #
155
+ # Authorization requires `spanner.instanceConfigs.delete` permission on
156
+ # the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].
157
+ rpc :DeleteInstanceConfig, ::Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceConfigRequest, ::Google::Protobuf::Empty
158
+ # Lists the user-managed instance config [long-running
159
+ # operations][google.longrunning.Operation] in the given project. An instance
160
+ # config operation has a name of the form
161
+ # `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
162
+ # The long-running operation
163
+ # [metadata][google.longrunning.Operation.metadata] field type
164
+ # `metadata.type_url` describes the type of the metadata. Operations returned
165
+ # include those that have completed/failed/canceled within the last 7 days,
166
+ # and pending operations. Operations returned are ordered by
167
+ # `operation.metadata.value.start_time` in descending order starting
168
+ # from the most recently started operation.
169
+ rpc :ListInstanceConfigOperations, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigOperationsResponse
62
170
  # Lists all instances in the given project.
63
171
  rpc :ListInstances, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest, ::Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesResponse
64
172
  # Gets information about a particular instance.
@@ -112,9 +220,9 @@ module Google
112
220
  # Until completion of the returned operation:
113
221
  #
114
222
  # * 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,
223
+ # [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time],
224
+ # and begins restoring resources to their pre-request values. The
225
+ # operation is guaranteed to succeed at undoing all resource changes,
118
226
  # after which point it terminates with a `CANCELLED` status.
119
227
  # * All other attempts to modify the instance are rejected.
120
228
  # * Reading the instance via the API continues to give the pre-request
@@ -26,8 +26,6 @@ module Google
26
26
  # service Foo {
27
27
  # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
28
28
  # }
29
- #
30
- # The JSON representation for `Empty` is empty JSON object `{}`.
31
29
  class Empty
32
30
  include ::Google::Protobuf::MessageExts
33
31
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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
+ # Encapsulates progress related information for a Cloud Spanner long
27
+ # running instance operations.
28
+ # @!attribute [rw] progress_percent
29
+ # @return [::Integer]
30
+ # Percent completion of the operation.
31
+ # Values are between 0 and 100 inclusive.
32
+ # @!attribute [rw] start_time
33
+ # @return [::Google::Protobuf::Timestamp]
34
+ # Time the request was received.
35
+ # @!attribute [rw] end_time
36
+ # @return [::Google::Protobuf::Timestamp]
37
+ # If set, the time at which this operation failed or was completed
38
+ # successfully.
39
+ class OperationProgress
40
+ include ::Google::Protobuf::MessageExts
41
+ extend ::Google::Protobuf::MessageExts::ClassMethods
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end