Class: Fog::Resources::AzureRM::ResourceGroups
- Inherits:
-
Collection
- Object
- Collection
- Fog::Resources::AzureRM::ResourceGroups
- Defined in:
- lib/fog/azurerm/models/resources/resource_groups.rb
Overview
This class is giving implementation of all/list, get and check name availability for resource groups.
Instance Method Summary collapse
- #all ⇒ Object
- #check_resource_group_exists(resource_group_name) ⇒ Object
- #get(resource_group_name) ⇒ Object
Instance Method Details
#all ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/fog/azurerm/models/resources/resource_groups.rb', line 9 def all resource_groups = [] service.list_resource_groups.each do |resource_group| resource_groups.push(Fog::Resources::AzureRM::ResourceGroup.parse(resource_group)) end load(resource_groups) end |
#check_resource_group_exists(resource_group_name) ⇒ Object
23 24 25 |
# File 'lib/fog/azurerm/models/resources/resource_groups.rb', line 23 def check_resource_group_exists(resource_group_name) service.check_resource_group_exists(resource_group_name) end |
#get(resource_group_name) ⇒ Object
17 18 19 20 21 |
# File 'lib/fog/azurerm/models/resources/resource_groups.rb', line 17 def get(resource_group_name) resource_group = service.get_resource_group(resource_group_name) resource_group_fog = Fog::Resources::AzureRM::ResourceGroup.new(service: service) resource_group_fog.merge_attributes(Fog::Resources::AzureRM::ResourceGroup.parse(resource_group)) end |