Sha256: c6e01dc4fd54674c27a3e3d36e935803b3adbeda48a2e6e975bd0ebe2e4a9441
Contents?: true
Size: 920 Bytes
Versions: 43
Compression:
Stored size: 920 Bytes
Contents
module Fog module Resources class AzureRM # This class is giving implementation of create/save and # delete/destroy for resource group. class ResourceGroup < Fog::Model identity :name attribute :id attribute :location attribute :tags def self.parse(resource_group) hash = {} hash['id'] = resource_group.id hash['name'] = resource_group.name hash['location'] = resource_group.location hash['tags'] = resource_group.tags hash end def save requires :name requires :location resource_group = service.create_resource_group(name, location, tags) merge_attributes(Fog::Resources::AzureRM::ResourceGroup.parse(resource_group)) end def destroy service.delete_resource_group(name) end end end end end
Version data entries
43 entries across 43 versions & 4 rubygems