You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::CloudWatch::Resource
- Inherits:
 - 
      Resources::Resource
      
        
- Object
 - Resources::Resource
 - Aws::CloudWatch::Resource
 
 
- Defined in:
 - (unknown)
 
Overview
This class provides a resource oriented interface for CloudWatch. To create a resource object:
resource = Aws::CloudWatch::Resource.new
You can supply a client object with custom configuration that will be
used for all resource operations.  If you do not pass :client,
a default client will be constructed.
client = Aws::CloudWatch::Client.new(region: 'us-west-2')
resource = Aws::CloudWatch::Resource.new(client: client)
Resource Resource Classes
Aws::CloudWatch::Resource has the following resource classes:
Attribute Summary collapse
Instance Attribute Summary
Attributes inherited from Resources::Resource
Instance Method Summary collapse
- 
  
    
      #alarm(name)  ⇒ Alarm 
    
    
  
  
  
  
  
  
  
  
  
    
 - 
  
    
      #alarms(options = {})  ⇒ Collection<Alarm> 
    
    
  
  
  
  
  
  
  
  
  
    
Returns a Collection of Alarm resources.
 - 
  
    
      #composite_alarm(name)  ⇒ CompositeAlarm 
    
    
  
  
  
  
  
  
  
  
  
    
 - 
  
    
      #composite_alarms(options = {})  ⇒ Collection<CompositeAlarm> 
    
    
  
  
  
  
  
  
  
  
  
    
Returns a Collection of CompositeAlarm resources.
 - 
  
    
      #initialize  ⇒ Object 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
 - 
  
    
      #metric(namespace, name)  ⇒ Metric 
    
    
  
  
  
  
  
  
  
  
  
    
 - 
  
    
      #metrics(options = {})  ⇒ Collection<Metric> 
    
    
  
  
  
  
  
  
  
  
  
    
Returns a Collection of Metric resources.
 
Methods inherited from Resources::Resource
add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until
Methods included from Resources::OperationMethods
#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations
Constructor Details
#initialize(options = {}) ⇒ Object #initialize(options = {}) ⇒ Object
Instance Method Details
#alarm(name) ⇒ Alarm
#alarms(options = {}) ⇒ Collection<Alarm>
Returns a Collection of Alarm resources. No API requests are made until you call an enumerable method on the collection. Client#describe_alarms will be called multiple times until every Alarm has been yielded.
#composite_alarm(name) ⇒ CompositeAlarm
#composite_alarms(options = {}) ⇒ Collection<CompositeAlarm>
Returns a Collection of CompositeAlarm resources. No API requests are made until you call an enumerable method on the collection. Client#describe_alarms will be called multiple times until every CompositeAlarm has been yielded.
#metric(namespace, name) ⇒ Metric
#metrics(options = {}) ⇒ Collection<Metric>
Returns a Collection of Metric resources. No API requests are made until you call an enumerable method on the collection. Client#list_metrics will be called multiple times until every Metric has been yielded.