Sha256: 210df2982a6bc0009011d8e698566f998a37608fbf749bd0e2eb47f7af35d602

Contents?: true

Size: 812 Bytes

Versions: 42

Compression:

Stored size: 812 Bytes

Contents

module Awspec::Type
  class CodedeployDeploymentGroup < ResourceBase
    attr_accessor :application_name

    def initialize(group)
      super
      @display_name = group
    end

    def resource_via_client
      @resource_via_client ||= find_codedeploy_deployment_group(application_name, @display_name)
    end

    def id
      @id ||= resource_via_client.deployment_group_id if resource_via_client
    end

    def application_name
      @application_name || 'default'
    end

    def has_autoscaling_group?(asg_name)
      asgs = resource_via_client.auto_scaling_groups
      res = asgs.find do |asg|
        asg.name == asg_name
      end
      return true if res
      asg2 = find_autoscaling_group(asg_name)
      return true if asgs.include? asg2.auto_scaling_group_name
      false
    end
  end
end

Version data entries

42 entries across 42 versions & 3 rubygems

Version Path
awspec-1.25.1 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.25.0 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.24.4 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.24.3 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.24.2 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.24.1 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.24.0 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.23.0 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.22.1 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.22.0 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.21.1 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.21.0 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.20.0 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.19.2 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.19.1 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.19.0 lib/awspec/type/codedeploy_deployment_group.rb
cthiesfork-awspec-1.2.4 lib/awspec/type/codedeploy_deployment_group.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/type/codedeploy_deployment_group.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/type/codedeploy_deployment_group.rb
awspec-1.18.6 lib/awspec/type/codedeploy_deployment_group.rb