Class: AWSCDK::Autoscaling::CfnAutoScalingGroup::TagPropertyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Autoscaling::CfnAutoScalingGroup::TagPropertyProperty
- Defined in:
- autoscaling/cfn_auto_scaling_group.rb
Overview
A structure that specifies a tag for the Tags property of AWS::AutoScaling::AutoScalingGroup resource.
For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide . You can find a sample template snippet in the Examples section of the AWS::AutoScaling::AutoScalingGroup resource.
CloudFormation adds the following tags to all Auto Scaling groups and associated instances:
- aws:cloudformation:stack-name
- aws:cloudformation:stack-id
- aws:cloudformation:logical-id
Instance Attribute Summary collapse
-
#key ⇒ String
readonly
The tag key.
-
#propagate_at_launch ⇒ Boolean, AWSCDK::IResolvable
readonly
Set to
trueif you want CloudFormation to copy the tag to EC2 instances that are launched as part of the Auto Scaling group. -
#value ⇒ String
readonly
The tag value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key:, propagate_at_launch:, value:) ⇒ TagPropertyProperty
constructor
A new instance of TagPropertyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(key:, propagate_at_launch:, value:) ⇒ TagPropertyProperty
Returns a new instance of TagPropertyProperty.
2811 2812 2813 2814 2815 2816 2817 2818 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2811 def initialize(key:, propagate_at_launch:, value:) @key = key Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") @propagate_at_launch = propagate_at_launch Jsii::Type.check_type(@propagate_at_launch, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "propagateAtLaunch") @value = value Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") end |
Instance Attribute Details
#key ⇒ String (readonly)
The tag key.
2824 2825 2826 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2824 def key @key end |
#propagate_at_launch ⇒ Boolean, AWSCDK::IResolvable (readonly)
Set to true if you want CloudFormation to copy the tag to EC2 instances that are launched as part of the Auto Scaling group.
Set to false if you want the tag attached only to the Auto Scaling group and not copied to any instances launched as part of the Auto Scaling group.
2831 2832 2833 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2831 def propagate_at_launch @propagate_at_launch end |
#value ⇒ String (readonly)
The tag value.
2836 2837 2838 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2836 def value @value end |
Class Method Details
.jsii_properties ⇒ Object
2838 2839 2840 2841 2842 2843 2844 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2838 def self.jsii_properties { :key => "key", :propagate_at_launch => "propagateAtLaunch", :value => "value", } end |
Instance Method Details
#to_jsii ⇒ Object
2846 2847 2848 2849 2850 2851 2852 2853 2854 |
# File 'autoscaling/cfn_auto_scaling_group.rb', line 2846 def to_jsii result = {} result.merge!({ "key" => @key, "propagateAtLaunch" => @propagate_at_launch, "value" => @value, }) result.compact end |