Class: Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdminClient
- Inherits:
-
Object
- Object
- Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdminClient
- Defined in:
- lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb
Overview
Service for creating, configuring, and deleting Cloud Bigtable Instances and Clusters. Provides access to the Instance and Cluster schemas only, not the tables' metadata or data stored in those tables.
Constant Summary collapse
- SERVICE_ADDRESS =
The default address of the service.
"bigtableadmin.googleapis.com".freeze
- DEFAULT_SERVICE_PORT =
The default port of the service.
443
- GRPC_INTERCEPTORS =
The default set of gRPC interceptors.
[]
- DEFAULT_TIMEOUT =
30
- ALL_SCOPES =
The scopes needed to make gRPC calls to all of the methods defined in this service.
[ "https://www.googleapis.com/auth/bigtable.admin", "https://www.googleapis.com/auth/bigtable.admin.cluster", "https://www.googleapis.com/auth/bigtable.admin.instance", "https://www.googleapis.com/auth/bigtable.admin.table", "https://www.googleapis.com/auth/cloud-bigtable.admin", "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster", "https://www.googleapis.com/auth/cloud-bigtable.admin.table", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ].freeze
Class Method Summary collapse
-
.app_profile_path(project, instance, app_profile) ⇒ String
Returns a fully-qualified app_profile resource name string.
-
.cluster_path(project, instance, cluster) ⇒ String
Returns a fully-qualified cluster resource name string.
-
.instance_path(project, instance) ⇒ String
Returns a fully-qualified instance resource name string.
-
.location_path(project, location) ⇒ String
Returns a fully-qualified location resource name string.
-
.project_path(project) ⇒ String
Returns a fully-qualified project resource name string.
Instance Method Summary collapse
-
#create_app_profile(parent, app_profile_id, app_profile, ignore_warnings: nil, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::AppProfile
Creates an app profile within an instance.
-
#create_cluster(parent, cluster_id, cluster, options: nil) ⇒ Google::Gax::Operation
Creates a cluster within an instance.
-
#create_instance(parent, instance_id, instance, clusters, options: nil) ⇒ Google::Gax::Operation
Create an instance within a project.
-
#delete_app_profile(name, ignore_warnings, options: nil) {|result, operation| ... } ⇒ Object
Deletes an app profile from an instance.
-
#delete_cluster(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes a cluster from an instance.
-
#delete_instance(name, options: nil) {|result, operation| ... } ⇒ Object
Delete an instance from a project.
-
#get_app_profile(name, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::AppProfile
Gets information about an app profile.
-
#get_cluster(name, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::Cluster
Gets information about a cluster.
-
#get_iam_policy(resource, options: nil) {|result, operation| ... } ⇒ Google::Iam::V1::Policy
Gets the access control policy for an instance resource.
-
#get_instance(name, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::Instance
Gets information about an instance.
-
#initialize(credentials: nil, scopes: ALL_SCOPES, client_config: {}, timeout: DEFAULT_TIMEOUT, metadata: nil, exception_transformer: nil, lib_name: nil, lib_version: "") ⇒ BigtableInstanceAdminClient
constructor
A new instance of BigtableInstanceAdminClient.
-
#list_app_profiles(parent, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Bigtable::Admin::V2::AppProfile>
Lists information about app profiles in an instance.
-
#list_clusters(parent, page_token: nil, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::ListClustersResponse
Lists information about clusters in an instance.
-
#list_instances(parent, page_token: nil, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::ListInstancesResponse
Lists information about instances in a project.
-
#partial_update_instance(instance, update_mask, options: nil) ⇒ Google::Gax::Operation
Partially updates an instance within a project.
-
#set_iam_policy(resource, policy, options: nil) {|result, operation| ... } ⇒ Google::Iam::V1::Policy
Sets the access control policy on an instance resource.
-
#test_iam_permissions(resource, permissions, options: nil) {|result, operation| ... } ⇒ Google::Iam::V1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified instance resource.
-
#update_app_profile(app_profile, update_mask, ignore_warnings: nil, options: nil) ⇒ Google::Gax::Operation
Updates an app profile within an instance.
-
#update_cluster(name, serve_nodes, location: nil, state: nil, default_storage_type: nil, options: nil) ⇒ Google::Gax::Operation
Updates a cluster within an instance.
-
#update_instance(name, display_name, type, labels, state: nil, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::Instance
Updates an instance within a project.
Constructor Details
#initialize(credentials: nil, scopes: ALL_SCOPES, client_config: {}, timeout: DEFAULT_TIMEOUT, metadata: nil, exception_transformer: nil, lib_name: nil, lib_version: "") ⇒ BigtableInstanceAdminClient
Returns a new instance of BigtableInstanceAdminClient
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 203 def initialize \ credentials: nil, scopes: ALL_SCOPES, client_config: {}, timeout: DEFAULT_TIMEOUT, metadata: nil, exception_transformer: nil, lib_name: nil, lib_version: "" # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "google/gax/grpc" require "google/bigtable/admin/v2/bigtable_instance_admin_services_pb" credentials ||= Google::Cloud::Bigtable::Admin::V2::Credentials.default @operations_client = OperationsClient.new( credentials: credentials, scopes: scopes, client_config: client_config, timeout: timeout, lib_name: lib_name, lib_version: lib_version, ) if credentials.is_a?(String) || credentials.is_a?(Hash) updater_proc = Google::Cloud::Bigtable::Admin::V2::Credentials.new(credentials).updater_proc end if credentials.is_a?(GRPC::Core::Channel) channel = credentials end if credentials.is_a?(GRPC::Core::ChannelCredentials) chan_creds = credentials end if credentials.is_a?(Proc) updater_proc = credentials end if credentials.is_a?(Google::Auth::Credentials) updater_proc = credentials.updater_proc end package_version = Gem.loaded_specs['google-cloud-bigtable'].version.version google_api_client = "gl-ruby/#{RUBY_VERSION}" google_api_client << " #{lib_name}/#{lib_version}" if lib_name google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}" google_api_client << " grpc/#{GRPC::VERSION}" google_api_client.freeze headers = { :"x-goog-api-client" => google_api_client } headers.merge!() unless .nil? client_config_file = Pathname.new(__dir__).join( "bigtable_instance_admin_client_config.json" ) defaults = client_config_file.open do |f| Google::Gax.construct_settings( "google.bigtable.admin.v2.BigtableInstanceAdmin", JSON.parse(f.read), client_config, Google::Gax::Grpc::STATUS_CODE_NAMES, timeout, page_descriptors: PAGE_DESCRIPTORS, errors: Google::Gax::Grpc::API_ERRORS, metadata: headers ) end # Allow overriding the service path/port in subclasses. service_path = self.class::SERVICE_ADDRESS port = self.class::DEFAULT_SERVICE_PORT interceptors = self.class::GRPC_INTERCEPTORS @bigtable_instance_admin_stub = Google::Gax::Grpc.create_stub( service_path, port, chan_creds: chan_creds, channel: channel, updater_proc: updater_proc, scopes: scopes, interceptors: interceptors, &Google::Bigtable::Admin::V2::BigtableInstanceAdmin::Stub.method(:new) ) @create_instance = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:create_instance), defaults["create_instance"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'parent' => request.parent} end ) @get_instance = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:get_instance), defaults["get_instance"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'name' => request.name} end ) @list_instances = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:list_instances), defaults["list_instances"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'parent' => request.parent} end ) @update_instance = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:update_instance), defaults["update_instance"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'name' => request.name} end ) @partial_update_instance = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:partial_update_instance), defaults["partial_update_instance"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'instance.name' => request.instance.name} end ) @delete_instance = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:delete_instance), defaults["delete_instance"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'name' => request.name} end ) @create_cluster = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:create_cluster), defaults["create_cluster"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'parent' => request.parent} end ) @get_cluster = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:get_cluster), defaults["get_cluster"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'name' => request.name} end ) @list_clusters = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:list_clusters), defaults["list_clusters"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'parent' => request.parent} end ) @update_cluster = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:update_cluster), defaults["update_cluster"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'name' => request.name} end ) @delete_cluster = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:delete_cluster), defaults["delete_cluster"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'name' => request.name} end ) @create_app_profile = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:create_app_profile), defaults["create_app_profile"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'parent' => request.parent} end ) @get_app_profile = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:get_app_profile), defaults["get_app_profile"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'name' => request.name} end ) @list_app_profiles = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:list_app_profiles), defaults["list_app_profiles"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'parent' => request.parent} end ) @update_app_profile = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:update_app_profile), defaults["update_app_profile"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'app_profile.name' => request.app_profile.name} end ) @delete_app_profile = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:delete_app_profile), defaults["delete_app_profile"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'name' => request.name} end ) @get_iam_policy = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:get_iam_policy), defaults["get_iam_policy"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'resource' => request.resource} end ) @set_iam_policy = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:set_iam_policy), defaults["set_iam_policy"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'resource' => request.resource} end ) @test_iam_permissions = Google::Gax.create_api_call( @bigtable_instance_admin_stub.method(:test_iam_permissions), defaults["test_iam_permissions"], exception_transformer: exception_transformer, params_extractor: proc do |request| {'resource' => request.resource} end ) end |
Class Method Details
.app_profile_path(project, instance, app_profile) ⇒ String
Returns a fully-qualified app_profile resource name string.
142 143 144 145 146 147 148 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 142 def self.app_profile_path project, instance, app_profile APP_PROFILE_PATH_TEMPLATE.render( :"project" => project, :"instance" => instance, :"app_profile" => app_profile ) end |
.cluster_path(project, instance, cluster) ⇒ String
Returns a fully-qualified cluster resource name string.
155 156 157 158 159 160 161 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 155 def self.cluster_path project, instance, cluster CLUSTER_PATH_TEMPLATE.render( :"project" => project, :"instance" => instance, :"cluster" => cluster ) end |
.instance_path(project, instance) ⇒ String
Returns a fully-qualified instance resource name string.
130 131 132 133 134 135 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 130 def self.instance_path project, instance INSTANCE_PATH_TEMPLATE.render( :"project" => project, :"instance" => instance ) end |
.location_path(project, location) ⇒ String
Returns a fully-qualified location resource name string.
167 168 169 170 171 172 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 167 def self.location_path project, location LOCATION_PATH_TEMPLATE.render( :"project" => project, :"location" => location ) end |
.project_path(project) ⇒ String
Returns a fully-qualified project resource name string.
120 121 122 123 124 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 120 def self.project_path project PROJECT_PATH_TEMPLATE.render( :"project" => project ) end |
Instance Method Details
#create_app_profile(parent, app_profile_id, app_profile, ignore_warnings: nil, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::AppProfile
Creates an app profile within an instance.
1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 1083 def create_app_profile \ parent, app_profile_id, app_profile, ignore_warnings: nil, options: nil, &block req = { parent: parent, app_profile_id: app_profile_id, app_profile: app_profile, ignore_warnings: ignore_warnings }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::CreateAppProfileRequest) @create_app_profile.call(req, , &block) end |
#create_cluster(parent, cluster_id, cluster, options: nil) ⇒ Google::Gax::Operation
Creates a cluster within an instance.
835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 835 def create_cluster \ parent, cluster_id, cluster, options: nil req = { parent: parent, cluster_id: cluster_id, cluster: cluster }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::CreateClusterRequest) operation = Google::Gax::Operation.new( @create_cluster.call(req, ), @operations_client, Google::Bigtable::Admin::V2::Cluster, Google::Bigtable::Admin::V2::CreateClusterMetadata, call_options: ) operation.on_done { |operation| yield(operation) } if block_given? operation end |
#create_instance(parent, instance_id, instance, clusters, options: nil) ⇒ Google::Gax::Operation
Create an instance within a project.
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 511 def create_instance \ parent, instance_id, instance, clusters, options: nil req = { parent: parent, instance_id: instance_id, instance: instance, clusters: clusters }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::CreateInstanceRequest) operation = Google::Gax::Operation.new( @create_instance.call(req, ), @operations_client, Google::Bigtable::Admin::V2::Instance, Google::Bigtable::Admin::V2::CreateInstanceMetadata, call_options: ) operation.on_done { |operation| yield(operation) } if block_given? operation end |
#delete_app_profile(name, ignore_warnings, options: nil) {|result, operation| ... } ⇒ Object
Deletes an app profile from an instance.
1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 1281 def delete_app_profile \ name, ignore_warnings, options: nil, &block req = { name: name, ignore_warnings: ignore_warnings }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::DeleteAppProfileRequest) @delete_app_profile.call(req, , &block) nil end |
#delete_cluster(name, options: nil) {|result, operation| ... } ⇒ Object
Deletes a cluster from an instance.
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 1033 def delete_cluster \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::DeleteClusterRequest) @delete_cluster.call(req, , &block) nil end |
#delete_instance(name, options: nil) {|result, operation| ... } ⇒ Object
Delete an instance from a project.
764 765 766 767 768 769 770 771 772 773 774 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 764 def delete_instance \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::DeleteInstanceRequest) @delete_instance.call(req, , &block) nil end |
#get_app_profile(name, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::AppProfile
Gets information about an app profile.
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 1120 def get_app_profile \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::GetAppProfileRequest) @get_app_profile.call(req, , &block) end |
#get_cluster(name, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::Cluster
Gets information about a cluster.
877 878 879 880 881 882 883 884 885 886 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 877 def get_cluster \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::GetClusterRequest) @get_cluster.call(req, , &block) end |
#get_iam_policy(resource, options: nil) {|result, operation| ... } ⇒ Google::Iam::V1::Policy
Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set.
1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 1317 def get_iam_policy \ resource, options: nil, &block req = { resource: resource }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Iam::V1::GetIamPolicyRequest) @get_iam_policy.call(req, , &block) end |
#get_instance(name, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::Instance
Gets information about an instance.
555 556 557 558 559 560 561 562 563 564 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 555 def get_instance \ name, options: nil, &block req = { name: name }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::GetInstanceRequest) @get_instance.call(req, , &block) end |
#list_app_profiles(parent, options: nil) {|result, operation| ... } ⇒ Google::Gax::PagedEnumerable<Google::Bigtable::Admin::V2::AppProfile>
Lists information about app profiles in an instance.
1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 1168 def list_app_profiles \ parent, options: nil, &block req = { parent: parent }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::ListAppProfilesRequest) @list_app_profiles.call(req, , &block) end |
#list_clusters(parent, page_token: nil, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::ListClustersResponse
Lists information about clusters in an instance.
912 913 914 915 916 917 918 919 920 921 922 923 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 912 def list_clusters \ parent, page_token: nil, options: nil, &block req = { parent: parent, page_token: page_token }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::ListClustersRequest) @list_clusters.call(req, , &block) end |
#list_instances(parent, page_token: nil, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::ListInstancesResponse
Lists information about instances in a project.
588 589 590 591 592 593 594 595 596 597 598 599 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 588 def list_instances \ parent, page_token: nil, options: nil, &block req = { parent: parent, page_token: page_token }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::ListInstancesRequest) @list_instances.call(req, , &block) end |
#partial_update_instance(instance, update_mask, options: nil) ⇒ Google::Gax::Operation
Partially updates an instance within a project.
725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 725 def partial_update_instance \ instance, update_mask, options: nil req = { instance: instance, update_mask: update_mask }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::PartialUpdateInstanceRequest) operation = Google::Gax::Operation.new( @partial_update_instance.call(req, ), @operations_client, Google::Bigtable::Admin::V2::Instance, Google::Bigtable::Admin::V2::UpdateInstanceMetadata, call_options: ) operation.on_done { |operation| yield(operation) } if block_given? operation end |
#set_iam_policy(resource, policy, options: nil) {|result, operation| ... } ⇒ Google::Iam::V1::Policy
Sets the access control policy on an instance resource. Replaces any existing policy.
1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 1360 def set_iam_policy \ resource, policy, options: nil, &block req = { resource: resource, policy: policy }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Iam::V1::SetIamPolicyRequest) @set_iam_policy.call(req, , &block) end |
#test_iam_permissions(resource, permissions, options: nil) {|result, operation| ... } ⇒ Google::Iam::V1::TestIamPermissionsResponse
Returns permissions that the caller has on the specified instance resource.
1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 1402 def \ resource, , options: nil, &block req = { resource: resource, permissions: }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Iam::V1::TestIamPermissionsRequest) @test_iam_permissions.call(req, , &block) end |
#update_app_profile(app_profile, update_mask, ignore_warnings: nil, options: nil) ⇒ Google::Gax::Operation
Updates an app profile within an instance.
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 1235 def update_app_profile \ app_profile, update_mask, ignore_warnings: nil, options: nil req = { app_profile: app_profile, update_mask: update_mask, ignore_warnings: ignore_warnings }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::UpdateAppProfileRequest) operation = Google::Gax::Operation.new( @update_app_profile.call(req, ), @operations_client, Google::Bigtable::Admin::V2::AppProfile, Google::Bigtable::Admin::V2::UpdateAppProfileMetadata, call_options: ) operation.on_done { |operation| yield(operation) } if block_given? operation end |
#update_cluster(name, serve_nodes, location: nil, state: nil, default_storage_type: nil, options: nil) ⇒ Google::Gax::Operation
Updates a cluster within an instance.
988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 988 def update_cluster \ name, serve_nodes, location: nil, state: nil, default_storage_type: nil, options: nil req = { name: name, serve_nodes: serve_nodes, location: location, state: state, default_storage_type: default_storage_type }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::Cluster) operation = Google::Gax::Operation.new( @update_cluster.call(req, ), @operations_client, Google::Bigtable::Admin::V2::Cluster, Google::Bigtable::Admin::V2::UpdateClusterMetadata, call_options: ) operation.on_done { |operation| yield(operation) } if block_given? operation end |
#update_instance(name, display_name, type, labels, state: nil, options: nil) {|result, operation| ... } ⇒ Google::Bigtable::Admin::V2::Instance
Updates an instance within a project.
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 |
# File 'lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin_client.rb', line 652 def update_instance \ name, display_name, type, labels, state: nil, options: nil, &block req = { name: name, display_name: display_name, type: type, labels: labels, state: state }.delete_if { |_, v| v.nil? } req = Google::Gax::to_proto(req, Google::Bigtable::Admin::V2::Instance) @update_instance.call(req, , &block) end |