Class: Google::Apis::AutoscalerV1beta2::AutoscalerService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::AutoscalerV1beta2::AutoscalerService
- Defined in:
- generated/google/apis/autoscaler_v1beta2/service.rb
Overview
Google Compute Engine Autoscaler API
The Google Compute Engine Autoscaler API provides autoscaling for groups of Cloud VMs.
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_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Deletes the specified Autoscaler resource.
-
#delete_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes the specified zone-specific operation resource.
-
#get_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Autoscaler
Gets the specified Autoscaler resource.
-
#get_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Retrieves the specified zone-specific operation resource.
-
#initialize ⇒ AutoscalerService
constructor
A new instance of AutoscalerService.
-
#insert_autoscaler(project, zone, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Adds new Autoscaler resource.
-
#list_autoscalers(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse
Lists all Autoscaler resources in this zone.
-
#list_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::OperationList
Retrieves the list of operation resources contained within the specified zone.
- #list_zones(filter: nil, max_results: nil, page_token: nil, project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::ZoneList
-
#patch_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Update the entire content of the Autoscaler resource.
-
#update_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Update the entire content of the Autoscaler resource.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Constructor Details
#initialize ⇒ AutoscalerService
Returns a new instance of AutoscalerService.
52 53 54 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 52 def initialize super('https://www.googleapis.com/', 'autoscaler/v1beta2/') 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/autoscaler_v1beta2/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/autoscaler_v1beta2/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/autoscaler_v1beta2/service.rb', line 50 def user_ip @user_ip end |
Instance Method Details
#delete_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Deletes the specified Autoscaler resource.
84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 84 def delete_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}', ) command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation command.response_class = Google::Apis::AutoscalerV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['autoscaler'] = autoscaler unless autoscaler.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_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes the specified zone-specific operation resource.
337 338 339 340 341 342 343 344 345 346 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 337 def delete_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '{project}/zones/{zone}/operations/{operation}', ) command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['operation'] = operation unless operation.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_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Autoscaler
Gets the specified Autoscaler resource.
125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 125 def get_autoscaler(project, zone, autoscaler, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}', ) command.response_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation command.response_class = Google::Apis::AutoscalerV1beta2::Autoscaler command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['autoscaler'] = autoscaler unless autoscaler.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_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Retrieves the specified zone-specific operation resource.
373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 373 def get_zone_operation(project, zone, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/operations/{operation}', ) command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation command.response_class = Google::Apis::AutoscalerV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['operation'] = operation unless operation.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_autoscaler(project, zone, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Adds new Autoscaler resource.
165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 165 def insert_autoscaler(project, zone, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{project}/zones/{zone}/autoscalers', ) command.request_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation command.request_object = autoscaler_object command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation command.response_class = Google::Apis::AutoscalerV1beta2::Operation command.params['project'] = project unless project.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_autoscalers(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse
Lists all Autoscaler resources in this zone.
208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 208 def list_autoscalers(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{project}/zones/{zone}/autoscalers', ) command.response_representation = Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse::Representation command.response_class = Google::Apis::AutoscalerV1beta2::ListAutoscalerResponse command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.query['filter'] = filter unless filter.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_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::OperationList
Retrieves the list of operation resources contained within the specified zone.
413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 413 def list_zone_operations(project, zone, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{project}/zones/{zone}/operations', ) command.response_representation = Google::Apis::AutoscalerV1beta2::OperationList::Representation command.response_class = Google::Apis::AutoscalerV1beta2::OperationList command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.query['filter'] = filter unless filter.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_zones(filter: nil, max_results: nil, page_token: nil, project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::ZoneList
454 455 456 457 458 459 460 461 462 463 464 465 466 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 454 def list_zones(filter: nil, max_results: nil, page_token: nil, project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'zones', ) command.response_representation = Google::Apis::AutoscalerV1beta2::ZoneList::Representation command.response_class = Google::Apis::AutoscalerV1beta2::ZoneList command.query['filter'] = filter unless filter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['project'] = project unless project.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 |
#patch_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Update the entire content of the Autoscaler resource. This method supports patch semantics.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 253 def patch_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}', ) command.request_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation command.request_object = autoscaler_object command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation command.response_class = Google::Apis::AutoscalerV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['autoscaler'] = autoscaler unless autoscaler.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 |
#update_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AutoscalerV1beta2::Operation
Update the entire content of the Autoscaler resource.
297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'generated/google/apis/autoscaler_v1beta2/service.rb', line 297 def update_autoscaler(project, zone, autoscaler, autoscaler_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'projects/{project}/zones/{zone}/autoscalers/{autoscaler}', ) command.request_representation = Google::Apis::AutoscalerV1beta2::Autoscaler::Representation command.request_object = autoscaler_object command.response_representation = Google::Apis::AutoscalerV1beta2::Operation::Representation command.response_class = Google::Apis::AutoscalerV1beta2::Operation command.params['project'] = project unless project.nil? command.params['zone'] = zone unless zone.nil? command.params['autoscaler'] = autoscaler unless autoscaler.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 |