Class: ESP::Suppression::Region

Inherits:
Resource show all
Defined in:
lib/esp/resources/suppression/region.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Dirty

#changed_attributes, #original_attributes, #original_attributes=

Methods included from LoadWithOriginalAttributes

#load

Class Method Details

.create(attributes = {}) ⇒ ESP::Suppression::Region

Create a suppression for a region.

If you pass an alert_id, include the reason and all other params will be ignored, and the suppression will be created based on that alert.

call-seq -> super.create(attributes={})

Examples:

When Not Creating for Alert

create(regions: ['us_east_1'], external_account_ids: [5], reason: 'My very good reason for creating this suppression')

When Creating for Alert

create(alert_id: 5, reason: 'My very good reason for creating this suppression')

Parameters:

  • attributes (Hash) (defaults to: {})

    Required hash of region suppression attributes.

    Valid Attributes

    See API documentation for valid arguments

Returns:



# File 'lib/esp/resources/suppression/region.rb', line 51

.findvoid

This method returns an undefined value.

Not Implemented. You cannot search for Suppression::Region.

Regular ARELlike methods are disabled. Use the ESP::Suppression object to search suppressions.



19
20
21
# File 'lib/esp/resources/suppression/region.rb', line 19

def self.find(*)
  fail ESP::NotImplementedError, 'Regular ARELlike methods are disabled.  Use the ESP::Suppression object to search suppressions'
end

.wherevoid

This method returns an undefined value.

Not Implemented. You cannot search for Suppression::Region.

Regular ARELlike methods are disabled. Use the ESP::Suppression object to search suppressions.



10
11
12
# File 'lib/esp/resources/suppression/region.rb', line 10

def self.where(*)
  fail ESP::NotImplementedError, 'Regular ARELlike methods are disabled.  Use the ESP::Suppression object to search suppressions'
end

Instance Method Details

#destroyvoid

This method returns an undefined value.

Not Implemented. You cannot destroy a Suppression::Region.



33
34
35
# File 'lib/esp/resources/suppression/region.rb', line 33

def destroy
  fail ESP::NotImplementedError
end

#saveBoolean

Create a suppression for a region.

If you set an alert_id, set the reason and all other params will be ignored, and the suppression will be created based on that alert.

Valid Attributes

See API documentation for valid arguments

Examples:

When Not Creating for Alert

suppression = new(regions: ['us_east_1'], external_account_ids: [5], reason: 'My very good reason for creating this suppression')
suppression.save

When Creating for Alert

suppression = new(alert_id: 5, reason: 'My very good reason for creating this suppression')
suppression.save

Returns:

  • (Boolean)


# File 'lib/esp/resources/suppression/region.rb', line 68

#updatevoid

This method returns an undefined value.

Not Implemented. You cannot update a Suppression::Region.



26
27
28
# File 'lib/esp/resources/suppression/region.rb', line 26

def update
  fail ESP::NotImplementedError
end