class AWS::Glacier::Vault
@attr_reader [Time] last_inventory_date
@attr_reader [Time] creation_date
@attr_reader [Integer] number_of_archives
@attr_reader [Integer] size_in_bytes
@attr_reader [String] arn
def archives
-
(ArchiveCollection)
-
def archives ArchiveCollection.new(self) end
def configure_notifications topic, events
-
(VaultNotificationConfiguration)
-
Parameters:
-
events
(Array
) -- An array of one or more events for -
topic
(String, SNS::Topic
) -- The SNS topic ARN string or an
def configure_notifications topic, events topic_arn = topic.is_a?(String) ? topic : topic.arn cfg = VaultNotificationConfiguration.new cfg.sns_topic = SNS::Topic.new(topic_arn, :config => config) cfg.events = events cfg self.notification_configuration = cfg end
def delete
-
(nil)
-
def delete client.delete_vault(resource_options) nil end
def exists?
-
(Boolean)
- Returns `true` if the vault exists.
def exists? client.describe_vault(:vault_name => name, :account_id => account_id) true rescue Errors::ResourceNotFoundException false end
def get_resource attr = nil
def get_resource attr = nil client.describe_vault(resource_options) end
def initialize name, options = {}
(**options)
-
:account_id
(String
) --
Parameters:
-
options
(Hash
) -- -
name
(String
) --
def initialize name, options = {} @name = name super end
def notification_configuration
-
(VaultNotificationConfiguration, nil)
-
def notification_configuration resp = client.get_vault_notifications(resource_options) cfg = VaultNotificationConfiguration.new cfg.sns_topic = SNS::Topic.new(resp[:sns_topic], :config => config) cfg.events = resp[:events] cfg rescue Errors::ResourceNotFoundException nil end
def notification_configuration= cfg
-
cfg
(VaultNotificationConfiguration
) --
def notification_configuration= cfg if cfg opts = {} opts.merge!(resource_options) opts[:vault_notification_config] = {} opts[:vault_notification_config][:sns_topic] = cfg.sns_topic.arn opts[:vault_notification_config][:events] = cfg.events client.set_vault_notifications(opts) else client.delete_vault_notifications(resource_options) end end
def resource_identifiers
def resource_identifiers [ [:vault_name, name], [:account_id, account_id], ] end