Class: Google::Apis::ReplicapoolV1beta1::ReplicapoolService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::ReplicapoolV1beta1::ReplicapoolService
- Defined in:
- generated/google/apis/replicapool_v1beta1/service.rb
Overview
Replica Pool API
The Replica Pool API allows users to declaratively provision and manage groups of Google Compute Engine instances based on a common template.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#delete_pool(project_name, zone, pool_name, pools_delete_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes a replica pool.
-
#delete_replica(project_name, zone, pool_name, replica_name, replicas_delete_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Replica
Deletes a replica from the pool.
-
#get_pool(project_name, zone, pool_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Pool
Gets information about a single replica pool.
-
#get_replica(project_name, zone, pool_name, replica_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Replica
Gets information about a specific replica.
-
#initialize ⇒ ReplicapoolService
constructor
A new instance of ReplicapoolService.
-
#insert_pool(project_name, zone, pool_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Pool
Inserts a new replica pool.
-
#list_pools(project_name, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::PoolsListResponse
List all replica pools.
-
#list_replicas(project_name, zone, pool_name, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::ReplicasListResponse
Lists all replicas in a pool.
-
#resize_pool(project_name, zone, pool_name, num_replicas: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Pool
Resize a pool.
-
#restart_replica(project_name, zone, pool_name, replica_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Replica
Restarts a replica in a pool.
-
#updatetemplate_pool(project_name, zone, pool_name, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Update the template used by the pool.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ ReplicapoolService
Returns a new instance of ReplicapoolService
50 51 52 53 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 50 def initialize super('https://www.googleapis.com/', 'replicapool/v1beta1/projects/') @batch_path = 'batch/replicapool/v1beta1' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
39 40 41 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
44 45 46 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
48 49 50 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 48 def user_ip @user_ip end |
Instance Method Details
#delete_pool(project_name, zone, pool_name, pools_delete_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a replica pool.
82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 82 def delete_pool(project_name, zone, pool_name, pools_delete_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/pools/{poolName}', ) command.request_representation = Google::Apis::ReplicapoolV1beta1::PoolsDeleteRequest::Representation command.request_object = pools_delete_request_object command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['poolName'] = pool_name unless pool_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_replica(project_name, zone, pool_name, replica_name, replicas_delete_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Replica
Deletes a replica from the pool.
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 332 def delete_replica(project_name, zone, pool_name, replica_name, replicas_delete_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/pools/{poolName}/replicas/{replicaName}', ) command.request_representation = Google::Apis::ReplicapoolV1beta1::ReplicasDeleteRequest::Representation command.request_object = replicas_delete_request_object command.response_representation = Google::Apis::ReplicapoolV1beta1::Replica::Representation command.response_class = Google::Apis::ReplicapoolV1beta1::Replica command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['poolName'] = pool_name unless pool_name.nil? command.params['replicaName'] = replica_name unless replica_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_pool(project_name, zone, pool_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Pool
Gets information about a single replica pool.
121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 121 def get_pool(project_name, zone, pool_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{projectName}/zones/{zone}/pools/{poolName}', ) command.response_representation = Google::Apis::ReplicapoolV1beta1::Pool::Representation command.response_class = Google::Apis::ReplicapoolV1beta1::Pool command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['poolName'] = pool_name unless pool_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_replica(project_name, zone, pool_name, replica_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Replica
Gets information about a specific replica.
376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 376 def get_replica(project_name, zone, pool_name, replica_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{projectName}/zones/{zone}/pools/{poolName}/replicas/{replicaName}', ) command.response_representation = Google::Apis::ReplicapoolV1beta1::Replica::Representation command.response_class = Google::Apis::ReplicapoolV1beta1::Replica command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['poolName'] = pool_name unless pool_name.nil? command.params['replicaName'] = replica_name unless replica_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_pool(project_name, zone, pool_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Pool
Inserts a new replica pool.
159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 159 def insert_pool(project_name, zone, pool_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/pools', ) command.request_representation = Google::Apis::ReplicapoolV1beta1::Pool::Representation command.request_object = pool_object command.response_representation = Google::Apis::ReplicapoolV1beta1::Pool::Representation command.response_class = Google::Apis::ReplicapoolV1beta1::Pool command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_pools(project_name, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::PoolsListResponse
List all replica pools.
203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 203 def list_pools(project_name, zone, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{projectName}/zones/{zone}/pools', ) command.response_representation = Google::Apis::ReplicapoolV1beta1::PoolsListResponse::Representation command.response_class = Google::Apis::ReplicapoolV1beta1::PoolsListResponse command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_replicas(project_name, zone, pool_name, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::ReplicasListResponse
Lists all replicas in a pool.
422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 422 def list_replicas(project_name, zone, pool_name, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{projectName}/zones/{zone}/pools/{poolName}/replicas', ) command.response_representation = Google::Apis::ReplicapoolV1beta1::ReplicasListResponse::Representation command.response_class = Google::Apis::ReplicapoolV1beta1::ReplicasListResponse command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['poolName'] = pool_name unless pool_name.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#resize_pool(project_name, zone, pool_name, num_replicas: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Pool
Resize a pool. This is an asynchronous operation, and multiple overlapping resize requests can be made. Replica Pools will use the information from the last resize request.
249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 249 def resize_pool(project_name, zone, pool_name, num_replicas: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/pools/{poolName}/resize', ) command.response_representation = Google::Apis::ReplicapoolV1beta1::Pool::Representation command.response_class = Google::Apis::ReplicapoolV1beta1::Pool command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['poolName'] = pool_name unless pool_name.nil? command.query['numReplicas'] = num_replicas unless num_replicas.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#restart_replica(project_name, zone, pool_name, replica_name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ReplicapoolV1beta1::Replica
Restarts a replica in a pool.
465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 465 def restart_replica(project_name, zone, pool_name, replica_name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/pools/{poolName}/replicas/{replicaName}/restart', ) command.response_representation = Google::Apis::ReplicapoolV1beta1::Replica::Representation command.response_class = Google::Apis::ReplicapoolV1beta1::Replica command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['poolName'] = pool_name unless pool_name.nil? command.params['replicaName'] = replica_name unless replica_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#updatetemplate_pool(project_name, zone, pool_name, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Update the template used by the pool.
290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 290 def updatetemplate_pool(project_name, zone, pool_name, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{projectName}/zones/{zone}/pools/{poolName}/updateTemplate', ) command.request_representation = Google::Apis::ReplicapoolV1beta1::Template::Representation command.request_object = template_object command.params['projectName'] = project_name unless project_name.nil? command.params['zone'] = zone unless zone.nil? command.params['poolName'] = pool_name unless pool_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |