Class: Fog::Monitoring::OpenStack::AlarmDefinition
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize, #save
Instance Method Details
#create ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/fog/monitoring/openstack/models/alarm_definition.rb', line 22
def create
requires :name, :expression
merge_attributes(
service.create_alarm_definition(attributes).body
)
self
end
|
#destroy ⇒ Object
45
46
47
48
49
|
# File 'lib/fog/monitoring/openstack/models/alarm_definition.rb', line 45
def destroy
requires :id
service.delete_alarm_definition(id)
true
end
|
#patch(attr = nil) ⇒ Object
37
38
39
40
41
42
43
|
# File 'lib/fog/monitoring/openstack/models/alarm_definition.rb', line 37
def patch(attr = nil)
requires :id
merge_attributes(
service.patch_alarm_definition(id, attr || attributes).body
)
self
end
|
#to_s ⇒ Object
51
52
53
|
# File 'lib/fog/monitoring/openstack/models/alarm_definition.rb', line 51
def to_s
name
end
|
#update(attr = nil) ⇒ Object
30
31
32
33
34
35
|
# File 'lib/fog/monitoring/openstack/models/alarm_definition.rb', line 30
def update(attr = nil)
requires :name, :expression
merge_attributes(
service.update_alarm_definition(id, attr || attributes).body
)
end
|