class Fog::Rackspace::AutoScale::GroupConfig
Public Instance Methods
reload()
click to toggle source
Reloads group configuration
# File lib/fog/rackspace/models/auto_scale/group_config.rb, line 67 def reload if group.id data = service.get_group_config(group.id) merge_attributes data.body['groupConfiguration'] end end
save()
click to toggle source
Saves group configuration. This method will only save existing group configurations. New group configurations are created when a scaling group is created
@return [Boolean] true if group config was saved
# File lib/fog/rackspace/models/auto_scale/group_config.rb, line 57 def save if group.id update true else raise "New #{self.class} are created when a new Fog::Rackspace::AutoScale::Group is created" end end
update()
click to toggle source
Update this group's configuration
@return [Boolean] returns true if group config has been updated
@raise [Fog::Rackspace::AutoScale:::NotFound] - HTTP 404 @raise [Fog::Rackspace::AutoScale:::BadRequest] - HTTP 400 @raise [Fog::Rackspace::AutoScale:::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::AutoScale:::ServiceError]
# File lib/fog/rackspace/models/auto_scale/group_config.rb, line 41 def update options = {} options['name'] = name unless name.nil? options['cooldown'] = cooldown unless cooldown.nil? options['minEntities'] = min_entities options['maxEntities'] = max_entities options['metadata'] = metadata unless metadata.nil? service.update_group_config(group.id, options) true end