Class: AWS::SimpleDB::DomainMetadata
- Inherits:
-
Object
- Object
- AWS::SimpleDB::DomainMetadata
- Defined in:
- lib/aws/simple_db/domain_metadata.rb
Overview
SimpleDB can report on the amount of data stored in a domain, the number of items, etc.
Instance Attribute Summary collapse
-
#domain ⇒ Domain
readonly
The domain this metadata is describing.
Instance Method Summary collapse
-
#attribute_name_count ⇒ Integer
The number of unique attribute names in the #domain.
-
#attribute_names_size_bytes ⇒ Integer
The total size of all unique attribute names, in bytes.
-
#attribute_value_count ⇒ Integer
The number of all attribute name/value pairs in the #domain.
-
#attribute_values_size_bytes ⇒ Integer
The total size of all attribute values, in bytes.
- #initialize(domain, options = {}) ⇒ DomainMetadata constructor
-
#item_count ⇒ Integer
The number of all items in the #domain.
-
#item_names_size_bytes ⇒ Integer
The total size of all item names in the #domain, in bytes.
-
#timestamp ⇒ Integer
The data and time when metadata was calculated in Epoch (UNIX) time.
-
#to_h ⇒ Hash
A hash of all of the metadata attributes for this #domain.
Constructor Details
#initialize(domain, options = {}) ⇒ DomainMetadata
53 54 55 56 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 53 def initialize domain, = {} @domain = domain super end |
Instance Attribute Details
#domain ⇒ Domain (readonly)
Returns The domain this metadata is describing.
59 60 61 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 59 def domain @domain end |
Instance Method Details
#attribute_name_count ⇒ Integer
Returns The number of unique attribute names in the #domain.
74 75 76 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 74 def attribute_name_count self.to_h[:attribute_name_count] end |
#attribute_names_size_bytes ⇒ Integer
Returns The total size of all unique attribute names, in bytes.
80 81 82 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 80 def attribute_names_size_bytes self.to_h[:attribute_names_size_bytes] end |
#attribute_value_count ⇒ Integer
Returns The number of all attribute name/value pairs in the #domain.
86 87 88 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 86 def attribute_value_count self.to_h[:attribute_value_count] end |
#attribute_values_size_bytes ⇒ Integer
Returns The total size of all attribute values, in bytes.
91 92 93 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 91 def attribute_values_size_bytes self.to_h[:attribute_values_size_bytes] end |
#item_count ⇒ Integer
Returns The number of all items in the #domain.
62 63 64 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 62 def item_count self.to_h[:item_count] end |
#item_names_size_bytes ⇒ Integer
Returns The total size of all item names in the #domain, in bytes.
68 69 70 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 68 def item_names_size_bytes self.to_h[:item_names_size_bytes] end |
#timestamp ⇒ Integer
Returns The data and time when metadata was calculated in Epoch (UNIX) time.
97 98 99 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 97 def self.to_h[:timestamp] end |
#to_h ⇒ Hash
Returns A hash of all of the metadata attributes for this #domain.
103 104 105 106 |
# File 'lib/aws/simple_db/domain_metadata.rb', line 103 def to_h = client.(:domain_name => domain.name) ATTRIBUTES.inject({}) {|h,attr| h[attr] = .send(attr); h } end |