Sha256: cbfd169184045d633bfe135f3c821eec2c0d53fb0054e2cf85e1196015fe6fcd

Contents?: true

Size: 883 Bytes

Versions: 46

Compression:

Stored size: 883 Bytes

Contents

module Fog
  module KeyVault
    class AzureRM
      # This class is giving implementation of all/list and get for key vault.
      class Vaults < Fog::Collection
        attribute :resource_group
        model Fog::KeyVault::AzureRM::Vault

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

        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

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

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/models/key_vault/vaults.rb
far-gem-0.5.6 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/models/key_vault/vaults.rb
far-gem-0.5.5 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/models/key_vault/vaults.rb
far-gem-0.5.4 lib/fog/azurerm/models/key_vault/vaults.rb
far-gem-0.5.3 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/models/key_vault/vaults.rb
far-gem-0.5.2 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/models/key_vault/vaults.rb
far-gem-0.5.1 lib/fog/azurerm/models/key_vault/vaults.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/models/key_vault/vaults.rb