Class: RightScaleAPI::AlertSpec

Inherits:
RightScaleAPI::Account::SubResource show all
Defined in:
lib/right-scale-api/alert_spec.rb

Instance Attribute Summary

Attributes inherited from RightScaleAPI::Account::SubResource

#account

Instance Method Summary collapse

Methods inherited from RightScaleAPI::Account::SubResource

#collection_uri

Methods inherited from Base

api_name, attributes, #collection_uri, create, #delete, #destroy, get, #get, #head, #initialize, #path, #post, #put, #reload!, #send_request, #update, #uri

Constructor Details

This class inherits a constructor from RightScaleAPI::Base

Instance Method Details

#attach_to(subject) ⇒ Object

params subject – either a Server or a ServerTemplate



16
17
18
19
20
21
22
23
24
# File 'lib/right-scale-api/alert_spec.rb', line 16

def attach_to subject
  .post '/alert_specs_subject', :query => {
    :alert_specs_subject =>{
      :alert_spec_href => uri,
      :subject_href => subject.uri,
      :subject_type => subject.type
    }
  }
end