Sha256: c08b12560918dc54562935d9b1e6221d246239d4f9115890beb465f3ee07606a

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

module Fog
  module Resources
    class AzureRM
      class Real
        def delete_resource_group(name)
          begin
            Fog::Logger.debug "Deleting Resource Group: #{name}."
            promise = @rmc.resource_groups.delete(name)
            result = promise.value!
            Fog::Logger.debug "Resource Group #{name} deleted successfully."
            result
          rescue  MsRestAzure::AzureOperationError => e
            msg = "Exception deleting Resource Group #{name}. #{e.body['error']['message']}"
            raise msg
          end
        end
      end

      class Mock
        def delete_resource_group(name)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-azure-rm-0.0.1 lib/fog/azurerm/requests/resources/delete_resource_group.rb
fog-azure-rm-0.0.0 lib/fog/azurerm/requests/resources/delete_resource_group.rb