Class: AWSCDK::EC2::CfnSpotFleet::SpotFleetTagSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnSpotFleet::SpotFleetTagSpecificationProperty
- Defined in:
- ec2/cfn_spot_fleet.rb
Overview
The tags for a Spot Fleet resource.
Instance Attribute Summary collapse
-
#resource_type ⇒ String?
readonly
The type of resource.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(resource_type: nil, tags: nil) ⇒ SpotFleetTagSpecificationProperty
constructor
A new instance of SpotFleetTagSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(resource_type: nil, tags: nil) ⇒ SpotFleetTagSpecificationProperty
Returns a new instance of SpotFleetTagSpecificationProperty.
2940 2941 2942 2943 2944 2945 |
# File 'ec2/cfn_spot_fleet.rb', line 2940 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.
Currently, the only resource type that is supported is instance . To tag the Spot Fleet request on creation, use the TagSpecifications parameter in [SpotFleetRequestConfigData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html) .
2953 2954 2955 |
# File 'ec2/cfn_spot_fleet.rb', line 2953 def resource_type @resource_type end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags.
2958 2959 2960 |
# File 'ec2/cfn_spot_fleet.rb', line 2958 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
2960 2961 2962 2963 2964 2965 |
# File 'ec2/cfn_spot_fleet.rb', line 2960 def self.jsii_properties { :resource_type => "resourceType", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
2967 2968 2969 2970 2971 2972 2973 2974 |
# File 'ec2/cfn_spot_fleet.rb', line 2967 def to_jsii result = {} result.merge!({ "resourceType" => @resource_type, "tags" => @tags, }) result.compact end |