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
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
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
52 53 54 55 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 52 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 Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
45 46 47 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 45 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
50 51 52 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 50 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.
86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 86 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.
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 348 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.
127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 127 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.
394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 394 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.
167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 167 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.
213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 213 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.
442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 442 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.
261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 261 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.
487 488 489 490 491 492 493 494 495 496 497 498 499 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 487 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.
304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'generated/google/apis/replicapool_v1beta1/service.rb', line 304 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 |