Class: Fog::Resources::AzureRM::ResourceGroup
- Inherits:
-
Model
- Object
- Model
- Fog::Resources::AzureRM::ResourceGroup
- Defined in:
- lib/fog/azurerm/models/resources/resource_group.rb
Overview
This class is giving implementation of create/save and delete/destroy for resource group.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.parse(resource_group) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/fog/azurerm/models/resources/resource_group.rb', line 11 def self.parse(resource_group) hash = {} hash['id'] = resource_group.id hash['name'] = resource_group.name hash['location'] = resource_group.location hash end |
Instance Method Details
#destroy ⇒ Object
26 27 28 |
# File 'lib/fog/azurerm/models/resources/resource_group.rb', line 26 def destroy service.delete_resource_group(name) end |
#save ⇒ Object
19 20 21 22 23 24 |
# File 'lib/fog/azurerm/models/resources/resource_group.rb', line 19 def save requires :name requires :location resource_group = service.create_resource_group(name, location) merge_attributes(Fog::Resources::AzureRM::ResourceGroup.parse(resource_group)) end |