Sha256: a0181ed735acf34ef76c4dd0b0c631877cd86d0a0d405c2b97d7cdd6ab7b749f
Contents?: true
Size: 1.27 KB
Versions: 4
Compression:
Stored size: 1.27 KB
Contents
require 'fog/huaweicloud/models/model' module Fog module Monitoring class HuaweiCloud class AlarmDefinition < Fog::HuaweiCloud::Model identity :id attribute :links attribute :name attribute :description attribute :expression attribute :deterministic attribute :expression_data attribute :match_by attribute :severity attribute :actions_enabled attribute :alarm_actions attribute :ok_actions attribute :undetermined_actions def create requires :name, :expression merge_attributes( service.create_alarm_definition(attributes).body ) self end def update(attr = nil) requires :name, :expression merge_attributes( service.update_alarm_definition(id, attr || attributes).body ) end def patch(attr = nil) requires :id merge_attributes( service.patch_alarm_definition(id, attr || attributes).body ) self end def destroy requires :id service.delete_alarm_definition(id) true end def to_s name end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems