Class: Fog::Resources::AzureRM::Deployments

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/azurerm/models/resources/deployments.rb

Overview

Deployments collection class

Instance Method Summary collapse

Instance Method Details

#allObject



9
10
11
12
13
14
15
16
# File 'lib/fog/azurerm/models/resources/deployments.rb', line 9

def all
  requires :resource_group
  deployments = []
  service.list_deployments(resource_group).each do |deployment|
    deployments << Fog::Resources::AzureRM::Deployment.parse(deployment)
  end
  load(deployments)
end

#check_deployment_exists(resource_group_name, deployment_name) ⇒ Object



24
25
26
# File 'lib/fog/azurerm/models/resources/deployments.rb', line 24

def check_deployment_exists(resource_group_name, deployment_name)
  service.check_deployment_exists(resource_group_name, deployment_name)
end

#get(resource_group_name, deployment_name) ⇒ Object



18
19
20
21
22
# File 'lib/fog/azurerm/models/resources/deployments.rb', line 18

def get(resource_group_name, deployment_name)
  deployment = service.get_deployment(resource_group_name, deployment_name)
  deployment_fog = Fog::Resources::AzureRM::Deployment.new(service: service)
  deployment_fog.merge_attributes(Fog::Resources::AzureRM::Deployment.parse(deployment))
end