Class: Convection::Model::Template::Resource::AutoScalingGroup

Inherits:
Convection::Model::Template::Resource show all
Defined in:
lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb

Overview

AWS::AutoScaling::AutoScalingGroup

Instance Attribute Summary

Attributes inherited from Convection::Model::Template::Resource

#exist, #name, #parent, #properties, #resource_attributes, #template

Instance Method Summary collapse

Methods inherited from Convection::Model::Template::Resource

#as_attribute, attach_method, #deletion_policy, #depends_on, #initialize, properties, property, #property, #reference, type, #type, #with_output

Methods included from Mixin::Conditional

#condition, #render_condition

Methods included from DSL::Template::Resource

#_terraform_module_dir_to_flag, #_terraform_module_flag_to_dir, attach_resource, attach_resource_collection, resource_collection_dsl_methods, resource_dsl_methods

Methods included from DSL::Helpers

#camel_case, included, method_name, #screaming_snake_case, #snake_case

Methods included from DSL::IntrinsicFunctions

#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_import_value, #fn_not, #fn_or, #fn_ref, #fn_sub, #get_att, #get_azs, included, #join, mixers, #select

Constructor Details

This class inherits a constructor from Convection::Model::Template::Resource

Instance Method Details

#availability_zoneObject #availability_zone(value) ⇒ Object

Overloads:

  • #availability_zoneObject

    Returns the value of the ‘AvailabilityZones’ CloudFormation property.

  • #availability_zone(value) ⇒ Object

    Sets the ‘AvailabilityZones’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘AvailabilityZones’ CloudFormation property to.



12
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 12

property :availability_zone, 'AvailabilityZones', :array

#cooldownObject #cooldown(value) ⇒ Object

Overloads:

  • #cooldownObject

    Returns the value of the ‘Cooldown’ CloudFormation property.

  • #cooldown(value) ⇒ Object

    Sets the ‘Cooldown’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘Cooldown’ CloudFormation property to.



13
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 13

property :cooldown, 'Cooldown'

#desired_capacityObject #desired_capacity(value) ⇒ Object

Overloads:

  • #desired_capacityObject

    Returns the value of the ‘DesiredCapacity’ CloudFormation property.

  • #desired_capacity(value) ⇒ Object

    Sets the ‘DesiredCapacity’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘DesiredCapacity’ CloudFormation property to.



14
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 14

property :desired_capacity, 'DesiredCapacity'

#health_check_grace_periodObject #health_check_grace_period(value) ⇒ Object

Overloads:

  • #health_check_grace_periodObject

    Returns the value of the ‘HealthCheckGracePeriod’ CloudFormation property.

  • #health_check_grace_period(value) ⇒ Object

    Sets the ‘HealthCheckGracePeriod’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘HealthCheckGracePeriod’ CloudFormation property to.



15
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 15

property :health_check_grace_period, 'HealthCheckGracePeriod'

#health_check_typeObject #health_check_type(value) ⇒ Object

Overloads:

  • #health_check_typeObject

    Returns the value of the ‘HealthCheckType’ CloudFormation property.

  • #health_check_type(value) ⇒ Object

    Sets the ‘HealthCheckType’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘HealthCheckType’ CloudFormation property to.



16
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 16

property :health_check_type, 'HealthCheckType'

#instance_idObject #instance_id(value) ⇒ Object

Overloads:

  • #instance_idObject

    Returns the value of the ‘InstanceId’ CloudFormation property.

  • #instance_id(value) ⇒ Object

    Sets the ‘InstanceId’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘InstanceId’ CloudFormation property to.



17
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 17

property :instance_id, 'InstanceId'

#launch_configuration_nameObject #launch_configuration_name(value) ⇒ Object

Overloads:

  • #launch_configuration_nameObject

    Returns the value of the ‘LaunchConfigurationName’ CloudFormation property.

  • #launch_configuration_name(value) ⇒ Object

    Sets the ‘LaunchConfigurationName’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘LaunchConfigurationName’ CloudFormation property to.



18
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 18

property :launch_configuration_name, 'LaunchConfigurationName'

#load_balancer_nameObject #load_balancer_name(value) ⇒ Object

Overloads:

  • #load_balancer_nameObject

    Returns the value of the ‘LoadBalancerNames’ CloudFormation property.

  • #load_balancer_name(value) ⇒ Object

    Sets the ‘LoadBalancerNames’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘LoadBalancerNames’ CloudFormation property to.



19
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 19

property :load_balancer_name, 'LoadBalancerNames', :array

#max_sizeObject #max_size(value) ⇒ Object

Overloads:

  • #max_sizeObject

    Returns the value of the ‘MaxSize’ CloudFormation property.

  • #max_size(value) ⇒ Object

    Sets the ‘MaxSize’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘MaxSize’ CloudFormation property to.



20
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 20

property :max_size, 'MaxSize'

#metrics_collectionObject #metrics_collection(value) ⇒ Object

Overloads:

  • #metrics_collectionObject

    Returns the value of the ‘MetricsCollection’ CloudFormation property.

  • #metrics_collection(value) ⇒ Object

    Sets the ‘MetricsCollection’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘MetricsCollection’ CloudFormation property to.



21
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 21

property :metrics_collection, 'MetricsCollection', :array

#min_sizeObject #min_size(value) ⇒ Object

Overloads:

  • #min_sizeObject

    Returns the value of the ‘MinSize’ CloudFormation property.

  • #min_size(value) ⇒ Object

    Sets the ‘MinSize’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘MinSize’ CloudFormation property to.



22
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 22

property :min_size, 'MinSize'

#notification_configurationObject #notification_configuration(value) ⇒ Object

Overloads:

  • #notification_configurationObject

    Returns the value of the ‘NotificationConfiguration’ CloudFormation property.

  • #notification_configuration(value) ⇒ Object

    Sets the ‘NotificationConfiguration’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘NotificationConfiguration’ CloudFormation property to.



23
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 23

property :notification_configuration, 'NotificationConfiguration'

#placement_groupObject #placement_group(value) ⇒ Object

Overloads:

  • #placement_groupObject

    Returns the value of the ‘PlacementGroup’ CloudFormation property.

  • #placement_group(value) ⇒ Object

    Sets the ‘PlacementGroup’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘PlacementGroup’ CloudFormation property to.



24
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 24

property :placement_group, 'PlacementGroup'

#render(*args) ⇒ Object



29
30
31
32
33
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 29

def render(*args)
  super.tap do |resource|
    render_tags(resource)
  end
end

#tag(key, value, propagate_at_launch: nil) ⇒ Object



35
36
37
38
39
40
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 35

def tag(key, value, propagate_at_launch: nil)
  tags[key] = { value: value }
  tags[key][:propagate_at_launch] = propagate_at_launch unless propagate_at_launch.nil?

  tags[key]
end

#tagsObject



42
43
44
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 42

def tags
  @tags ||= {}
end

#target_group_arn(arn) ⇒ Object



46
47
48
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 46

def target_group_arn(arn)
  target_group_arns << arn
end

#target_group_arnsObject #target_group_arns(value) ⇒ Object

Overloads:

  • #target_group_arnsObject

    Returns the value of the ‘TargetGroupARNs’ CloudFormation property.

  • #target_group_arns(value) ⇒ Object

    Sets the ‘TargetGroupARNs’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘TargetGroupARNs’ CloudFormation property to.



26
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 26

property :target_group_arns, 'TargetGroupARNs', :array

#termination_policieObject #termination_policie(value) ⇒ Object

Overloads:

  • #termination_policieObject

    Returns the value of the ‘TerminationPolicies’ CloudFormation property.

  • #termination_policie(value) ⇒ Object

    Sets the ‘TerminationPolicies’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘TerminationPolicies’ CloudFormation property to.



25
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 25

property :termination_policie, 'TerminationPolicies', :array

#update_policy(&block) ⇒ Object



50
51
52
53
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 50

def update_policy(&block)
  policy = ResourceAttribute::UpdatePolicy.new(self)
  policy.instance_exec(&block) if block
end

#vpc_zone_identifierObject #vpc_zone_identifier(value) ⇒ Object

Overloads:

  • #vpc_zone_identifierObject

    Returns the value of the ‘VPCZoneIdentifier’ CloudFormation property.

  • #vpc_zone_identifier(value) ⇒ Object

    Sets the ‘VPCZoneIdentifier’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘VPCZoneIdentifier’ CloudFormation property to.



27
# File 'lib/convection/model/template/resource/aws_auto_scaling_auto_scaling_group.rb', line 27

property :vpc_zone_identifier, 'VPCZoneIdentifier', :array