Class: AWSCDK::EC2::CfnCapacityReservation::TagSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnCapacityReservation::TagSpecificationProperty
- Defined in:
- ec2/cfn_capacity_reservation.rb
Overview
An array of key-value pairs to apply to this resource.
For more information, see Tag .
Instance Attribute Summary collapse
-
#resource_type ⇒ String?
readonly
The type of resource to tag.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags to apply to the resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(resource_type: nil, tags: nil) ⇒ TagSpecificationProperty
constructor
A new instance of TagSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(resource_type: nil, tags: nil) ⇒ TagSpecificationProperty
Returns a new instance of TagSpecificationProperty.
956 957 958 959 960 961 |
# File 'ec2/cfn_capacity_reservation.rb', line 956 def initialize(resource_type: nil, tags: nil) @resource_type = resource_type Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType") unless @resource_type.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#resource_type ⇒ String? (readonly)
The type of resource to tag.
Specify capacity-reservation .
969 970 971 |
# File 'ec2/cfn_capacity_reservation.rb', line 969 def resource_type @resource_type end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags to apply to the resource.
974 975 976 |
# File 'ec2/cfn_capacity_reservation.rb', line 974 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
976 977 978 979 980 981 |
# File 'ec2/cfn_capacity_reservation.rb', line 976 def self.jsii_properties { :resource_type => "resourceType", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
983 984 985 986 987 988 989 990 |
# File 'ec2/cfn_capacity_reservation.rb', line 983 def to_jsii result = {} result.merge!({ "resourceType" => @resource_type, "tags" => @tags, }) result.compact end |