google-cloud-bigtable-admin-v2 0.7.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f957b42081e774eafd429667f47915de887c7c3754d35ffa986e92bf40d38699
4
- data.tar.gz: c54f97421477a2f7a47025c7a37bfc6e4f936e7a0b9728ba84cf1473b21ccbee
3
+ metadata.gz: 45eeaf71ba8faefde2f2a52ab796329a34c201a0eea5bc1f896cce55a9a20740
4
+ data.tar.gz: e9d8b2de77dd4e0f14d39819c3a7b3a82d107ce3ab919d9755f2e7624fa0fffa
5
5
  SHA512:
6
- metadata.gz: f401388b8e6a2dcd7ff540089ea80f3925f6ba01975254deb6e7d9f372037287886385f1c2a603643d9abec62b9f6dd522ff83ebc4f88dd1ec9d85e22723a1e7
7
- data.tar.gz: 823fdc5ac4247f90d76c47ea891782eb4e235cd202839b5cc869a629453ba5abe02fdcb5f190d2fb8a635bd7a264112d282f1558f9f5ccbf4c49b89f5c4ee1f9
6
+ metadata.gz: 9616e9674ebbd0505f5c94f96c9d7a813eb6d6947728c2c1a6181e92f7b1a63a799686009fb64f938d796ed6502336f4bffd98dc9977bfbb916afa50bc9ab573
7
+ data.tar.gz: e5fb3cd64bb7c8fe90979b68002f7656bf32b84ea27af57dde206edb8678a2e29f9a7913b32b8087b32c77c37cb69729a97ef8cff4335803b3f4da3711864e58
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Bigtable Admin V2 API
2
+ --title="Cloud Bigtable Admin V2 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -24,7 +24,7 @@ In order to use this library, you first need to go through the following steps:
24
24
 
25
25
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
26
26
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
27
- 1. [Enable the API.](https://console.cloud.google.com/apis/library/bigtable.googleapis.com)
27
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com)
28
28
  1. {file:AUTHENTICATION.md Set up authentication.}
29
29
 
30
30
  ## Quick Start
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Bigtable::Admin::V2::CreateInstanceRequest.new # (req
37
37
  response = client.create_instance request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-bigtable-admin-v2/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigtable-admin-v2/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/bigtable)
@@ -81,6 +81,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
81
81
  optional :request_time, :message, 2, "google.protobuf.Timestamp"
82
82
  optional :finish_time, :message, 3, "google.protobuf.Timestamp"
83
83
  end
84
+ add_message "google.bigtable.admin.v2.PartialUpdateClusterMetadata" do
85
+ optional :request_time, :message, 1, "google.protobuf.Timestamp"
86
+ optional :finish_time, :message, 2, "google.protobuf.Timestamp"
87
+ optional :original_request, :message, 3, "google.bigtable.admin.v2.PartialUpdateClusterRequest"
88
+ end
89
+ add_message "google.bigtable.admin.v2.PartialUpdateClusterRequest" do
90
+ optional :cluster, :message, 1, "google.bigtable.admin.v2.Cluster"
91
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
92
+ end
84
93
  add_message "google.bigtable.admin.v2.CreateAppProfileRequest" do
85
94
  optional :parent, :string, 1
86
95
  optional :app_profile_id, :string, 2
@@ -111,6 +120,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
111
120
  end
112
121
  add_message "google.bigtable.admin.v2.UpdateAppProfileMetadata" do
113
122
  end
123
+ add_message "google.bigtable.admin.v2.ListHotTabletsRequest" do
124
+ optional :parent, :string, 1
125
+ optional :start_time, :message, 2, "google.protobuf.Timestamp"
126
+ optional :end_time, :message, 3, "google.protobuf.Timestamp"
127
+ optional :page_size, :int32, 4
128
+ optional :page_token, :string, 5
129
+ end
130
+ add_message "google.bigtable.admin.v2.ListHotTabletsResponse" do
131
+ repeated :hot_tablets, :message, 1, "google.bigtable.admin.v2.HotTablet"
132
+ optional :next_page_token, :string, 2
133
+ end
114
134
  end
115
135
  end
116
136
 
@@ -134,6 +154,8 @@ module Google
134
154
  UpdateInstanceMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UpdateInstanceMetadata").msgclass
135
155
  CreateClusterMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.CreateClusterMetadata").msgclass
136
156
  UpdateClusterMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UpdateClusterMetadata").msgclass
157
+ PartialUpdateClusterMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.PartialUpdateClusterMetadata").msgclass
158
+ PartialUpdateClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.PartialUpdateClusterRequest").msgclass
137
159
  CreateAppProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.CreateAppProfileRequest").msgclass
138
160
  GetAppProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.GetAppProfileRequest").msgclass
139
161
  ListAppProfilesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.ListAppProfilesRequest").msgclass
@@ -141,6 +163,8 @@ module Google
141
163
  UpdateAppProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UpdateAppProfileRequest").msgclass
142
164
  DeleteAppProfileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.DeleteAppProfileRequest").msgclass
143
165
  UpdateAppProfileMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UpdateAppProfileMetadata").msgclass
166
+ ListHotTabletsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.ListHotTabletsRequest").msgclass
167
+ ListHotTabletsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.ListHotTabletsResponse").msgclass
144
168
  end
145
169
  end
146
170
  end
@@ -37,6 +37,12 @@ module Google
37
37
  self.service_name = 'google.bigtable.admin.v2.BigtableInstanceAdmin'
38
38
 
39
39
  # Create an instance within a project.
40
+ #
41
+ # Note that exactly one of Cluster.serve_nodes and
42
+ # Cluster.cluster_config.cluster_autoscaling_config can be set. If
43
+ # serve_nodes is set to non-zero, then the cluster is manually scaled. If
44
+ # cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
45
+ # enabled.
40
46
  rpc :CreateInstance, ::Google::Cloud::Bigtable::Admin::V2::CreateInstanceRequest, ::Google::Longrunning::Operation
41
47
  # Gets information about an instance.
42
48
  rpc :GetInstance, ::Google::Cloud::Bigtable::Admin::V2::GetInstanceRequest, ::Google::Cloud::Bigtable::Admin::V2::Instance
@@ -52,13 +58,36 @@ module Google
52
58
  # Delete an instance from a project.
53
59
  rpc :DeleteInstance, ::Google::Cloud::Bigtable::Admin::V2::DeleteInstanceRequest, ::Google::Protobuf::Empty
54
60
  # Creates a cluster within an instance.
61
+ #
62
+ # Note that exactly one of Cluster.serve_nodes and
63
+ # Cluster.cluster_config.cluster_autoscaling_config can be set. If
64
+ # serve_nodes is set to non-zero, then the cluster is manually scaled. If
65
+ # cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
66
+ # enabled.
55
67
  rpc :CreateCluster, ::Google::Cloud::Bigtable::Admin::V2::CreateClusterRequest, ::Google::Longrunning::Operation
56
68
  # Gets information about a cluster.
57
69
  rpc :GetCluster, ::Google::Cloud::Bigtable::Admin::V2::GetClusterRequest, ::Google::Cloud::Bigtable::Admin::V2::Cluster
58
70
  # Lists information about clusters in an instance.
59
71
  rpc :ListClusters, ::Google::Cloud::Bigtable::Admin::V2::ListClustersRequest, ::Google::Cloud::Bigtable::Admin::V2::ListClustersResponse
60
72
  # Updates a cluster within an instance.
73
+ #
74
+ # Note that UpdateCluster does not support updating
75
+ # cluster_config.cluster_autoscaling_config. In order to update it, you
76
+ # must use PartialUpdateCluster.
61
77
  rpc :UpdateCluster, ::Google::Cloud::Bigtable::Admin::V2::Cluster, ::Google::Longrunning::Operation
78
+ # Partially updates a cluster within a project. This method is the preferred
79
+ # way to update a Cluster.
80
+ #
81
+ # To enable and update autoscaling, set
82
+ # cluster_config.cluster_autoscaling_config. When autoscaling is enabled,
83
+ # serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it
84
+ # are ignored. Note that an update cannot simultaneously set serve_nodes to
85
+ # non-zero and cluster_config.cluster_autoscaling_config to non-empty, and
86
+ # also specify both in the update_mask.
87
+ #
88
+ # To disable autoscaling, clear cluster_config.cluster_autoscaling_config,
89
+ # and explicitly set a serve_node count via the update_mask.
90
+ rpc :PartialUpdateCluster, ::Google::Cloud::Bigtable::Admin::V2::PartialUpdateClusterRequest, ::Google::Longrunning::Operation
62
91
  # Deletes a cluster from an instance.
63
92
  rpc :DeleteCluster, ::Google::Cloud::Bigtable::Admin::V2::DeleteClusterRequest, ::Google::Protobuf::Empty
64
93
  # Creates an app profile within an instance.
@@ -79,6 +108,9 @@ module Google
79
108
  rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
80
109
  # Returns permissions that the caller has on the specified instance resource.
81
110
  rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
111
+ # Lists hot tablets in a cluster, within the time range provided. Hot
112
+ # tablets are ordered based on CPU usage.
113
+ rpc :ListHotTablets, ::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest, ::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsResponse
82
114
  end
83
115
 
84
116
  Stub = Service.rpc_stub_class
@@ -2,6 +2,7 @@
2
2
  # source: google/bigtable/admin/v2/common.proto
3
3
 
4
4
  require 'google/protobuf/timestamp_pb'
5
+ require 'google/api/annotations_pb'
5
6
  require 'google/protobuf'
6
7
 
7
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -28,6 +28,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
28
28
  value :PRODUCTION, 1
29
29
  value :DEVELOPMENT, 2
30
30
  end
31
+ add_message "google.bigtable.admin.v2.AutoscalingTargets" do
32
+ optional :cpu_utilization_percent, :int32, 2
33
+ end
34
+ add_message "google.bigtable.admin.v2.AutoscalingLimits" do
35
+ optional :min_serve_nodes, :int32, 1
36
+ optional :max_serve_nodes, :int32, 2
37
+ end
31
38
  add_message "google.bigtable.admin.v2.Cluster" do
32
39
  optional :name, :string, 1
33
40
  optional :location, :string, 2
@@ -35,6 +42,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
35
42
  optional :serve_nodes, :int32, 4
36
43
  optional :default_storage_type, :enum, 5, "google.bigtable.admin.v2.StorageType"
37
44
  optional :encryption_config, :message, 6, "google.bigtable.admin.v2.Cluster.EncryptionConfig"
45
+ oneof :config do
46
+ optional :cluster_config, :message, 7, "google.bigtable.admin.v2.Cluster.ClusterConfig"
47
+ end
48
+ end
49
+ add_message "google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig" do
50
+ optional :autoscaling_limits, :message, 1, "google.bigtable.admin.v2.AutoscalingLimits"
51
+ optional :autoscaling_targets, :message, 2, "google.bigtable.admin.v2.AutoscalingTargets"
52
+ end
53
+ add_message "google.bigtable.admin.v2.Cluster.ClusterConfig" do
54
+ optional :cluster_autoscaling_config, :message, 1, "google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig"
38
55
  end
39
56
  add_message "google.bigtable.admin.v2.Cluster.EncryptionConfig" do
40
57
  optional :kms_key_name, :string, 1
@@ -62,6 +79,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
62
79
  optional :cluster_id, :string, 1
63
80
  optional :allow_transactional_writes, :bool, 2
64
81
  end
82
+ add_message "google.bigtable.admin.v2.HotTablet" do
83
+ optional :name, :string, 1
84
+ optional :table_name, :string, 2
85
+ optional :start_time, :message, 3, "google.protobuf.Timestamp"
86
+ optional :end_time, :message, 4, "google.protobuf.Timestamp"
87
+ optional :start_key, :string, 5
88
+ optional :end_key, :string, 6
89
+ optional :node_cpu_usage_percent, :float, 7
90
+ end
65
91
  end
66
92
  end
67
93
 
@@ -73,12 +99,17 @@ module Google
73
99
  Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Instance").msgclass
74
100
  Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Instance.State").enummodule
75
101
  Instance::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Instance.Type").enummodule
102
+ AutoscalingTargets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.AutoscalingTargets").msgclass
103
+ AutoscalingLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.AutoscalingLimits").msgclass
76
104
  Cluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Cluster").msgclass
105
+ Cluster::ClusterAutoscalingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig").msgclass
106
+ Cluster::ClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Cluster.ClusterConfig").msgclass
77
107
  Cluster::EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Cluster.EncryptionConfig").msgclass
78
108
  Cluster::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.Cluster.State").enummodule
79
109
  AppProfile = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.AppProfile").msgclass
80
110
  AppProfile::MultiClusterRoutingUseAny = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny").msgclass
81
111
  AppProfile::SingleClusterRouting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.AppProfile.SingleClusterRouting").msgclass
112
+ HotTablet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.HotTablet").msgclass
82
113
  end
83
114
  end
84
115
  end
@@ -108,6 +108,11 @@ module Google
108
108
  initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
109
109
  }
110
110
 
111
+ default_config.rpcs.partial_update_cluster.timeout = 60.0
112
+ default_config.rpcs.partial_update_cluster.retry_policy = {
113
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
114
+ }
115
+
111
116
  default_config.rpcs.delete_cluster.timeout = 60.0
112
117
 
113
118
  default_config.rpcs.create_app_profile.timeout = 60.0
@@ -141,6 +146,11 @@ module Google
141
146
  initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
142
147
  }
143
148
 
149
+ default_config.rpcs.list_hot_tablets.timeout = 60.0
150
+ default_config.rpcs.list_hot_tablets.retry_policy = {
151
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4]
152
+ }
153
+
144
154
  default_config
145
155
  end
146
156
  yield @configure if block_given?
@@ -212,6 +222,7 @@ module Google
212
222
 
213
223
  @operations_client = Operations.new do |config|
214
224
  config.credentials = credentials
225
+ config.quota_project = @quota_project_id
215
226
  config.endpoint = @config.endpoint
216
227
  end
217
228
 
@@ -236,6 +247,12 @@ module Google
236
247
  ##
237
248
  # Create an instance within a project.
238
249
  #
250
+ # Note that exactly one of Cluster.serve_nodes and
251
+ # Cluster.cluster_config.cluster_autoscaling_config can be set. If
252
+ # serve_nodes is set to non-zero, then the cluster is manually scaled. If
253
+ # cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
254
+ # enabled.
255
+ #
239
256
  # @overload create_instance(request, options = nil)
240
257
  # Pass arguments to `create_instance` via a request object, either of type
241
258
  # {::Google::Cloud::Bigtable::Admin::V2::CreateInstanceRequest} or an equivalent Hash.
@@ -806,6 +823,12 @@ module Google
806
823
  ##
807
824
  # Creates a cluster within an instance.
808
825
  #
826
+ # Note that exactly one of Cluster.serve_nodes and
827
+ # Cluster.cluster_config.cluster_autoscaling_config can be set. If
828
+ # serve_nodes is set to non-zero, then the cluster is manually scaled. If
829
+ # cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is
830
+ # enabled.
831
+ #
809
832
  # @overload create_cluster(request, options = nil)
810
833
  # Pass arguments to `create_cluster` via a request object, either of type
811
834
  # {::Google::Cloud::Bigtable::Admin::V2::CreateClusterRequest} or an equivalent Hash.
@@ -1084,6 +1107,10 @@ module Google
1084
1107
  ##
1085
1108
  # Updates a cluster within an instance.
1086
1109
  #
1110
+ # Note that UpdateCluster does not support updating
1111
+ # cluster_config.cluster_autoscaling_config. In order to update it, you
1112
+ # must use PartialUpdateCluster.
1113
+ #
1087
1114
  # @overload update_cluster(request, options = nil)
1088
1115
  # Pass arguments to `update_cluster` via a request object, either of type
1089
1116
  # {::Google::Cloud::Bigtable::Admin::V2::Cluster} or an equivalent Hash.
@@ -1094,7 +1121,7 @@ module Google
1094
1121
  # @param options [::Gapic::CallOptions, ::Hash]
1095
1122
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1096
1123
  #
1097
- # @overload update_cluster(location: nil, serve_nodes: nil, default_storage_type: nil, encryption_config: nil)
1124
+ # @overload update_cluster(location: nil, serve_nodes: nil, cluster_config: nil, default_storage_type: nil, encryption_config: nil)
1098
1125
  # Pass arguments to `update_cluster` via keyword arguments. Note that at
1099
1126
  # least one keyword argument is required. To specify no parameters, or to keep all
1100
1127
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1106,8 +1133,10 @@ module Google
1106
1133
  # cluster. Currently only zones are supported, so values should be of the
1107
1134
  # form `projects/{project}/locations/{zone}`.
1108
1135
  # @param serve_nodes [::Integer]
1109
- # Required. The number of nodes allocated to this cluster. More nodes enable
1110
- # higher throughput and more consistent performance.
1136
+ # The number of nodes allocated to this cluster. More nodes enable higher
1137
+ # throughput and more consistent performance.
1138
+ # @param cluster_config [::Google::Cloud::Bigtable::Admin::V2::Cluster::ClusterConfig, ::Hash]
1139
+ # Configuration for this cluster.
1111
1140
  # @param default_storage_type [::Google::Cloud::Bigtable::Admin::V2::StorageType]
1112
1141
  # (`CreationOnly`)
1113
1142
  # The type of storage used by this cluster to serve its
@@ -1187,6 +1216,113 @@ module Google
1187
1216
  raise ::Google::Cloud::Error.from_error(e)
1188
1217
  end
1189
1218
 
1219
+ ##
1220
+ # Partially updates a cluster within a project. This method is the preferred
1221
+ # way to update a Cluster.
1222
+ #
1223
+ # To enable and update autoscaling, set
1224
+ # cluster_config.cluster_autoscaling_config. When autoscaling is enabled,
1225
+ # serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it
1226
+ # are ignored. Note that an update cannot simultaneously set serve_nodes to
1227
+ # non-zero and cluster_config.cluster_autoscaling_config to non-empty, and
1228
+ # also specify both in the update_mask.
1229
+ #
1230
+ # To disable autoscaling, clear cluster_config.cluster_autoscaling_config,
1231
+ # and explicitly set a serve_node count via the update_mask.
1232
+ #
1233
+ # @overload partial_update_cluster(request, options = nil)
1234
+ # Pass arguments to `partial_update_cluster` via a request object, either of type
1235
+ # {::Google::Cloud::Bigtable::Admin::V2::PartialUpdateClusterRequest} or an equivalent Hash.
1236
+ #
1237
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::PartialUpdateClusterRequest, ::Hash]
1238
+ # A request object representing the call parameters. Required. To specify no
1239
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1240
+ # @param options [::Gapic::CallOptions, ::Hash]
1241
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1242
+ #
1243
+ # @overload partial_update_cluster(cluster: nil, update_mask: nil)
1244
+ # Pass arguments to `partial_update_cluster` via keyword arguments. Note that at
1245
+ # least one keyword argument is required. To specify no parameters, or to keep all
1246
+ # the default parameter values, pass an empty Hash as a request object (see above).
1247
+ #
1248
+ # @param cluster [::Google::Cloud::Bigtable::Admin::V2::Cluster, ::Hash]
1249
+ # Required. The Cluster which contains the partial updates to be applied, subject to
1250
+ # the update_mask.
1251
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1252
+ # Required. The subset of Cluster fields which should be replaced.
1253
+ #
1254
+ # @yield [response, operation] Access the result along with the RPC operation
1255
+ # @yieldparam response [::Gapic::Operation]
1256
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1257
+ #
1258
+ # @return [::Gapic::Operation]
1259
+ #
1260
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1261
+ #
1262
+ # @example Basic example
1263
+ # require "google/cloud/bigtable/admin/v2"
1264
+ #
1265
+ # # Create a client object. The client can be reused for multiple calls.
1266
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
1267
+ #
1268
+ # # Create a request. To set request fields, pass in keyword arguments.
1269
+ # request = Google::Cloud::Bigtable::Admin::V2::PartialUpdateClusterRequest.new
1270
+ #
1271
+ # # Call the partial_update_cluster method.
1272
+ # result = client.partial_update_cluster request
1273
+ #
1274
+ # # The returned object is of type Gapic::Operation. You can use this
1275
+ # # object to check the status of an operation, cancel it, or wait
1276
+ # # for results. Here is how to block until completion:
1277
+ # result.wait_until_done! timeout: 60
1278
+ # if result.response?
1279
+ # p result.response
1280
+ # else
1281
+ # puts "Error!"
1282
+ # end
1283
+ #
1284
+ def partial_update_cluster request, options = nil
1285
+ raise ::ArgumentError, "request must be provided" if request.nil?
1286
+
1287
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::PartialUpdateClusterRequest
1288
+
1289
+ # Converts hash and nil to an options object
1290
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1291
+
1292
+ # Customize the options with defaults
1293
+ metadata = @config.rpcs.partial_update_cluster.metadata.to_h
1294
+
1295
+ # Set x-goog-api-client and x-goog-user-project headers
1296
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1297
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1298
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
1299
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1300
+
1301
+ header_params = {}
1302
+ if request.cluster&.name
1303
+ header_params["cluster.name"] = request.cluster.name
1304
+ end
1305
+
1306
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1307
+ metadata[:"x-goog-request-params"] ||= request_params_header
1308
+
1309
+ options.apply_defaults timeout: @config.rpcs.partial_update_cluster.timeout,
1310
+ metadata: metadata,
1311
+ retry_policy: @config.rpcs.partial_update_cluster.retry_policy
1312
+
1313
+ options.apply_defaults timeout: @config.timeout,
1314
+ metadata: @config.metadata,
1315
+ retry_policy: @config.retry_policy
1316
+
1317
+ @bigtable_instance_admin_stub.call_rpc :partial_update_cluster, request, options: options do |response, operation|
1318
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1319
+ yield response, operation if block_given?
1320
+ return response
1321
+ end
1322
+ rescue ::GRPC::BadStatus => e
1323
+ raise ::Google::Cloud::Error.from_error(e)
1324
+ end
1325
+
1190
1326
  ##
1191
1327
  # Deletes a cluster from an instance.
1192
1328
  #
@@ -2022,6 +2158,122 @@ module Google
2022
2158
  raise ::Google::Cloud::Error.from_error(e)
2023
2159
  end
2024
2160
 
2161
+ ##
2162
+ # Lists hot tablets in a cluster, within the time range provided. Hot
2163
+ # tablets are ordered based on CPU usage.
2164
+ #
2165
+ # @overload list_hot_tablets(request, options = nil)
2166
+ # Pass arguments to `list_hot_tablets` via a request object, either of type
2167
+ # {::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest} or an equivalent Hash.
2168
+ #
2169
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest, ::Hash]
2170
+ # A request object representing the call parameters. Required. To specify no
2171
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2172
+ # @param options [::Gapic::CallOptions, ::Hash]
2173
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2174
+ #
2175
+ # @overload list_hot_tablets(parent: nil, start_time: nil, end_time: nil, page_size: nil, page_token: nil)
2176
+ # Pass arguments to `list_hot_tablets` via keyword arguments. Note that at
2177
+ # least one keyword argument is required. To specify no parameters, or to keep all
2178
+ # the default parameter values, pass an empty Hash as a request object (see above).
2179
+ #
2180
+ # @param parent [::String]
2181
+ # Required. The cluster name to list hot tablets.
2182
+ # Value is in the following form:
2183
+ # `projects/{project}/instances/{instance}/clusters/{cluster}`.
2184
+ # @param start_time [::Google::Protobuf::Timestamp, ::Hash]
2185
+ # The start time to list hot tablets. The hot tablets in the response will
2186
+ # have start times between the requested start time and end time. Start time
2187
+ # defaults to Now if it is unset, and end time defaults to Now - 24 hours if
2188
+ # it is unset. The start time should be less than the end time, and the
2189
+ # maximum allowed time range between start time and end time is 48 hours.
2190
+ # Start time and end time should have values between Now and Now - 14 days.
2191
+ # @param end_time [::Google::Protobuf::Timestamp, ::Hash]
2192
+ # The end time to list hot tablets.
2193
+ # @param page_size [::Integer]
2194
+ # Maximum number of results per page.
2195
+ #
2196
+ # A page_size that is empty or zero lets the server choose the number of
2197
+ # items to return. A page_size which is strictly positive will return at most
2198
+ # that many items. A negative page_size will cause an error.
2199
+ #
2200
+ # Following the first request, subsequent paginated calls do not need a
2201
+ # page_size field. If a page_size is set in subsequent calls, it must match
2202
+ # the page_size given in the first request.
2203
+ # @param page_token [::String]
2204
+ # The value of `next_page_token` returned by a previous call.
2205
+ #
2206
+ # @yield [response, operation] Access the result along with the RPC operation
2207
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::HotTablet>]
2208
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2209
+ #
2210
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::HotTablet>]
2211
+ #
2212
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2213
+ #
2214
+ # @example Basic example
2215
+ # require "google/cloud/bigtable/admin/v2"
2216
+ #
2217
+ # # Create a client object. The client can be reused for multiple calls.
2218
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
2219
+ #
2220
+ # # Create a request. To set request fields, pass in keyword arguments.
2221
+ # request = Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest.new
2222
+ #
2223
+ # # Call the list_hot_tablets method.
2224
+ # result = client.list_hot_tablets request
2225
+ #
2226
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2227
+ # # iterate over all elements by calling #each, and the enumerable
2228
+ # # will lazily make API calls to fetch subsequent pages. Other
2229
+ # # methods are also available for managing paging directly.
2230
+ # result.each do |response|
2231
+ # # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::HotTablet.
2232
+ # p response
2233
+ # end
2234
+ #
2235
+ def list_hot_tablets request, options = nil
2236
+ raise ::ArgumentError, "request must be provided" if request.nil?
2237
+
2238
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::ListHotTabletsRequest
2239
+
2240
+ # Converts hash and nil to an options object
2241
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2242
+
2243
+ # Customize the options with defaults
2244
+ metadata = @config.rpcs.list_hot_tablets.metadata.to_h
2245
+
2246
+ # Set x-goog-api-client and x-goog-user-project headers
2247
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2248
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2249
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
2250
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2251
+
2252
+ header_params = {}
2253
+ if request.parent
2254
+ header_params["parent"] = request.parent
2255
+ end
2256
+
2257
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2258
+ metadata[:"x-goog-request-params"] ||= request_params_header
2259
+
2260
+ options.apply_defaults timeout: @config.rpcs.list_hot_tablets.timeout,
2261
+ metadata: metadata,
2262
+ retry_policy: @config.rpcs.list_hot_tablets.retry_policy
2263
+
2264
+ options.apply_defaults timeout: @config.timeout,
2265
+ metadata: @config.metadata,
2266
+ retry_policy: @config.retry_policy
2267
+
2268
+ @bigtable_instance_admin_stub.call_rpc :list_hot_tablets, request, options: options do |response, operation|
2269
+ response = ::Gapic::PagedEnumerable.new @bigtable_instance_admin_stub, :list_hot_tablets, request, response, operation, options
2270
+ yield response, operation if block_given?
2271
+ return response
2272
+ end
2273
+ rescue ::GRPC::BadStatus => e
2274
+ raise ::Google::Cloud::Error.from_error(e)
2275
+ end
2276
+
2025
2277
  ##
2026
2278
  # Configuration class for the BigtableInstanceAdmin API.
2027
2279
  #
@@ -2208,6 +2460,11 @@ module Google
2208
2460
  #
2209
2461
  attr_reader :update_cluster
2210
2462
  ##
2463
+ # RPC-specific configuration for `partial_update_cluster`
2464
+ # @return [::Gapic::Config::Method]
2465
+ #
2466
+ attr_reader :partial_update_cluster
2467
+ ##
2211
2468
  # RPC-specific configuration for `delete_cluster`
2212
2469
  # @return [::Gapic::Config::Method]
2213
2470
  #
@@ -2252,6 +2509,11 @@ module Google
2252
2509
  # @return [::Gapic::Config::Method]
2253
2510
  #
2254
2511
  attr_reader :test_iam_permissions
2512
+ ##
2513
+ # RPC-specific configuration for `list_hot_tablets`
2514
+ # @return [::Gapic::Config::Method]
2515
+ #
2516
+ attr_reader :list_hot_tablets
2255
2517
 
2256
2518
  # @private
2257
2519
  def initialize parent_rpcs = nil
@@ -2275,6 +2537,8 @@ module Google
2275
2537
  @list_clusters = ::Gapic::Config::Method.new list_clusters_config
2276
2538
  update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
2277
2539
  @update_cluster = ::Gapic::Config::Method.new update_cluster_config
2540
+ partial_update_cluster_config = parent_rpcs.partial_update_cluster if parent_rpcs.respond_to? :partial_update_cluster
2541
+ @partial_update_cluster = ::Gapic::Config::Method.new partial_update_cluster_config
2278
2542
  delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
2279
2543
  @delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
2280
2544
  create_app_profile_config = parent_rpcs.create_app_profile if parent_rpcs.respond_to? :create_app_profile
@@ -2293,6 +2557,8 @@ module Google
2293
2557
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
2294
2558
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
2295
2559
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
2560
+ list_hot_tablets_config = parent_rpcs.list_hot_tablets if parent_rpcs.respond_to? :list_hot_tablets
2561
+ @list_hot_tablets = ::Gapic::Config::Method.new list_hot_tablets_config
2296
2562
 
2297
2563
  yield self if block_given?
2298
2564
  end
@@ -210,6 +210,7 @@ module Google
210
210
 
211
211
  @operations_client = Operations.new do |config|
212
212
  config.credentials = credentials
213
+ config.quota_project = @quota_project_id
213
214
  config.endpoint = @config.endpoint
214
215
  end
215
216
 
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigtable
23
23
  module Admin
24
24
  module V2
25
- VERSION = "0.7.1"
25
+ VERSION = "0.9.0"
26
26
  end
27
27
  end
28
28
  end
@@ -27,6 +27,8 @@ module Google
27
27
  ##
28
28
  # To load this package, including all its services, and instantiate a client:
29
29
  #
30
+ # @example
31
+ #
30
32
  # require "google/cloud/bigtable/admin/v2"
31
33
  # client = ::Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
32
34
  #
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -257,6 +257,34 @@ module Google
257
257
  extend ::Google::Protobuf::MessageExts::ClassMethods
258
258
  end
259
259
 
260
+ # The metadata for the Operation returned by PartialUpdateCluster.
261
+ # @!attribute [rw] request_time
262
+ # @return [::Google::Protobuf::Timestamp]
263
+ # The time at which the original request was received.
264
+ # @!attribute [rw] finish_time
265
+ # @return [::Google::Protobuf::Timestamp]
266
+ # The time at which the operation failed or was completed successfully.
267
+ # @!attribute [rw] original_request
268
+ # @return [::Google::Cloud::Bigtable::Admin::V2::PartialUpdateClusterRequest]
269
+ # The original request for PartialUpdateCluster.
270
+ class PartialUpdateClusterMetadata
271
+ include ::Google::Protobuf::MessageExts
272
+ extend ::Google::Protobuf::MessageExts::ClassMethods
273
+ end
274
+
275
+ # Request message for BigtableInstanceAdmin.PartialUpdateCluster.
276
+ # @!attribute [rw] cluster
277
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Cluster]
278
+ # Required. The Cluster which contains the partial updates to be applied, subject to
279
+ # the update_mask.
280
+ # @!attribute [rw] update_mask
281
+ # @return [::Google::Protobuf::FieldMask]
282
+ # Required. The subset of Cluster fields which should be replaced.
283
+ class PartialUpdateClusterRequest
284
+ include ::Google::Protobuf::MessageExts
285
+ extend ::Google::Protobuf::MessageExts::ClassMethods
286
+ end
287
+
260
288
  # Request message for BigtableInstanceAdmin.CreateAppProfile.
261
289
  # @!attribute [rw] parent
262
290
  # @return [::String]
@@ -371,6 +399,60 @@ module Google
371
399
  include ::Google::Protobuf::MessageExts
372
400
  extend ::Google::Protobuf::MessageExts::ClassMethods
373
401
  end
402
+
403
+ # Request message for BigtableInstanceAdmin.ListHotTablets.
404
+ # @!attribute [rw] parent
405
+ # @return [::String]
406
+ # Required. The cluster name to list hot tablets.
407
+ # Value is in the following form:
408
+ # `projects/{project}/instances/{instance}/clusters/{cluster}`.
409
+ # @!attribute [rw] start_time
410
+ # @return [::Google::Protobuf::Timestamp]
411
+ # The start time to list hot tablets. The hot tablets in the response will
412
+ # have start times between the requested start time and end time. Start time
413
+ # defaults to Now if it is unset, and end time defaults to Now - 24 hours if
414
+ # it is unset. The start time should be less than the end time, and the
415
+ # maximum allowed time range between start time and end time is 48 hours.
416
+ # Start time and end time should have values between Now and Now - 14 days.
417
+ # @!attribute [rw] end_time
418
+ # @return [::Google::Protobuf::Timestamp]
419
+ # The end time to list hot tablets.
420
+ # @!attribute [rw] page_size
421
+ # @return [::Integer]
422
+ # Maximum number of results per page.
423
+ #
424
+ # A page_size that is empty or zero lets the server choose the number of
425
+ # items to return. A page_size which is strictly positive will return at most
426
+ # that many items. A negative page_size will cause an error.
427
+ #
428
+ # Following the first request, subsequent paginated calls do not need a
429
+ # page_size field. If a page_size is set in subsequent calls, it must match
430
+ # the page_size given in the first request.
431
+ # @!attribute [rw] page_token
432
+ # @return [::String]
433
+ # The value of `next_page_token` returned by a previous call.
434
+ class ListHotTabletsRequest
435
+ include ::Google::Protobuf::MessageExts
436
+ extend ::Google::Protobuf::MessageExts::ClassMethods
437
+ end
438
+
439
+ # Response message for BigtableInstanceAdmin.ListHotTablets.
440
+ # @!attribute [rw] hot_tablets
441
+ # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::HotTablet>]
442
+ # List of hot tablets in the tables of the requested cluster that fall
443
+ # within the requested time range. Hot tablets are ordered by node cpu usage
444
+ # percent. If there are multiple hot tablets that correspond to the same
445
+ # tablet within a 15-minute interval, only the hot tablet with the highest
446
+ # node cpu usage will be included in the response.
447
+ # @!attribute [rw] next_page_token
448
+ # @return [::String]
449
+ # Set if not all hot tablets could be returned in a single response.
450
+ # Pass this value to `page_token` in another request to get the next
451
+ # page of results.
452
+ class ListHotTabletsResponse
453
+ include ::Google::Protobuf::MessageExts
454
+ extend ::Google::Protobuf::MessageExts::ClassMethods
455
+ end
374
456
  end
375
457
  end
376
458
  end
@@ -109,6 +109,29 @@ module Google
109
109
  end
110
110
  end
111
111
 
112
+ # The Autoscaling targets for a Cluster. These determine the recommended nodes.
113
+ # @!attribute [rw] cpu_utilization_percent
114
+ # @return [::Integer]
115
+ # The cpu utilization that the Autoscaler should be trying to achieve.
116
+ # This number is on a scale from 0 (no utilization) to
117
+ # 100 (total utilization).
118
+ class AutoscalingTargets
119
+ include ::Google::Protobuf::MessageExts
120
+ extend ::Google::Protobuf::MessageExts::ClassMethods
121
+ end
122
+
123
+ # Limits for the number of nodes a Cluster can autoscale up/down to.
124
+ # @!attribute [rw] min_serve_nodes
125
+ # @return [::Integer]
126
+ # Required. Minimum number of nodes to scale down to.
127
+ # @!attribute [rw] max_serve_nodes
128
+ # @return [::Integer]
129
+ # Required. Maximum number of nodes to scale up to.
130
+ class AutoscalingLimits
131
+ include ::Google::Protobuf::MessageExts
132
+ extend ::Google::Protobuf::MessageExts::ClassMethods
133
+ end
134
+
112
135
  # A resizable group of nodes in a particular cloud location, capable
113
136
  # of serving all {::Google::Cloud::Bigtable::Admin::V2::Table Tables} in the parent
114
137
  # {::Google::Cloud::Bigtable::Admin::V2::Instance Instance}.
@@ -128,8 +151,11 @@ module Google
128
151
  # The current state of the cluster.
129
152
  # @!attribute [rw] serve_nodes
130
153
  # @return [::Integer]
131
- # Required. The number of nodes allocated to this cluster. More nodes enable
132
- # higher throughput and more consistent performance.
154
+ # The number of nodes allocated to this cluster. More nodes enable higher
155
+ # throughput and more consistent performance.
156
+ # @!attribute [rw] cluster_config
157
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Cluster::ClusterConfig]
158
+ # Configuration for this cluster.
133
159
  # @!attribute [rw] default_storage_type
134
160
  # @return [::Google::Cloud::Bigtable::Admin::V2::StorageType]
135
161
  # (`CreationOnly`)
@@ -142,6 +168,27 @@ module Google
142
168
  include ::Google::Protobuf::MessageExts
143
169
  extend ::Google::Protobuf::MessageExts::ClassMethods
144
170
 
171
+ # Autoscaling config for a cluster.
172
+ # @!attribute [rw] autoscaling_limits
173
+ # @return [::Google::Cloud::Bigtable::Admin::V2::AutoscalingLimits]
174
+ # Required. Autoscaling limits for this cluster.
175
+ # @!attribute [rw] autoscaling_targets
176
+ # @return [::Google::Cloud::Bigtable::Admin::V2::AutoscalingTargets]
177
+ # Required. Autoscaling targets for this cluster.
178
+ class ClusterAutoscalingConfig
179
+ include ::Google::Protobuf::MessageExts
180
+ extend ::Google::Protobuf::MessageExts::ClassMethods
181
+ end
182
+
183
+ # Configuration for a cluster.
184
+ # @!attribute [rw] cluster_autoscaling_config
185
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Cluster::ClusterAutoscalingConfig]
186
+ # Autoscaling configuration for this cluster.
187
+ class ClusterConfig
188
+ include ::Google::Protobuf::MessageExts
189
+ extend ::Google::Protobuf::MessageExts::ClassMethods
190
+ end
191
+
145
192
  # Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected
146
193
  # cluster.
147
194
  # @!attribute [rw] kms_key_name
@@ -245,6 +292,42 @@ module Google
245
292
  extend ::Google::Protobuf::MessageExts::ClassMethods
246
293
  end
247
294
  end
295
+
296
+ # A tablet is a defined by a start and end key and is explained in
297
+ # https://cloud.google.com/bigtable/docs/overview#architecture and
298
+ # https://cloud.google.com/bigtable/docs/performance#optimization.
299
+ # A Hot tablet is a tablet that exhibits high average cpu usage during the time
300
+ # interval from start time to end time.
301
+ # @!attribute [rw] name
302
+ # @return [::String]
303
+ # The unique name of the hot tablet. Values are of the form
304
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`.
305
+ # @!attribute [rw] table_name
306
+ # @return [::String]
307
+ # Name of the table that contains the tablet. Values are of the form
308
+ # `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
309
+ # @!attribute [r] start_time
310
+ # @return [::Google::Protobuf::Timestamp]
311
+ # Output only. The start time of the hot tablet.
312
+ # @!attribute [r] end_time
313
+ # @return [::Google::Protobuf::Timestamp]
314
+ # Output only. The end time of the hot tablet.
315
+ # @!attribute [rw] start_key
316
+ # @return [::String]
317
+ # Tablet Start Key (inclusive).
318
+ # @!attribute [rw] end_key
319
+ # @return [::String]
320
+ # Tablet End Key (inclusive).
321
+ # @!attribute [r] node_cpu_usage_percent
322
+ # @return [::Float]
323
+ # Output only. The average CPU usage spent by a node on this tablet over the start_time to
324
+ # end_time time range. The percentage is the amount of CPU used by the node
325
+ # to serve the tablet, from 0% (tablet was not interacted with) to 100% (the
326
+ # node spent all cycles serving the hot tablet).
327
+ class HotTablet
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
248
331
  end
249
332
  end
250
333
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigtable-admin-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-08 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.2.17
250
+ rubygems_version: 3.3.5
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: API Client library for the Cloud Bigtable Admin V2 API