Class: Fog::KeyVault::AzureRM::Vaults

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/azurerm/models/key_vault/vaults.rb

Overview

This class is giving implementation of all/list and get for key vault.

Instance Method Summary collapse

Instance Method Details

#allObject



9
10
11
12
13
# File 'lib/fog/azurerm/models/key_vault/vaults.rb', line 9

def all
  requires :resource_group
  vaults = service.list_vaults(resource_group).map { |vault| Fog::KeyVault::AzureRM::Vault.parse(vault) }
  load(vaults)
end

#check_vault_exists(resource_group, vault_name) ⇒ Object



21
22
23
# File 'lib/fog/azurerm/models/key_vault/vaults.rb', line 21

def check_vault_exists(resource_group, vault_name)
  service.check_vault_exists(resource_group, vault_name)
end

#get(resource_group, vault_name) ⇒ Object



15
16
17
18
19
# File 'lib/fog/azurerm/models/key_vault/vaults.rb', line 15

def get(resource_group, vault_name)
  vault = service.get_vault(resource_group, vault_name)
  vault_obj = Fog::KeyVault::AzureRM::Vault.new(service: service)
  vault_obj.merge_attributes(Fog::KeyVault::AzureRM::Vault.parse(vault))
end