Class: AWSCDK::EC2::CfnLaunchTemplate::CapacityReservationTargetProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnLaunchTemplate::CapacityReservationTargetProperty
- Defined in:
- ec2/cfn_launch_template.rb
Overview
Specifies a target Capacity Reservation.
CapacityReservationTarget is a property of the Amazon EC2 LaunchTemplate LaunchTemplateData property type.
Instance Attribute Summary collapse
-
#capacity_reservation_id ⇒ String?
readonly
The ID of the Capacity Reservation in which to run the instance.
-
#capacity_reservation_resource_group_arn ⇒ String?
readonly
The ARN of the Capacity Reservation resource group in which to run the instance.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(capacity_reservation_id: nil, capacity_reservation_resource_group_arn: nil) ⇒ CapacityReservationTargetProperty
constructor
A new instance of CapacityReservationTargetProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(capacity_reservation_id: nil, capacity_reservation_resource_group_arn: nil) ⇒ CapacityReservationTargetProperty
Returns a new instance of CapacityReservationTargetProperty.
888 889 890 891 892 893 |
# File 'ec2/cfn_launch_template.rb', line 888 def initialize(capacity_reservation_id: nil, capacity_reservation_resource_group_arn: nil) @capacity_reservation_id = capacity_reservation_id Jsii::Type.check_type(@capacity_reservation_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "capacityReservationId") unless @capacity_reservation_id.nil? @capacity_reservation_resource_group_arn = capacity_reservation_resource_group_arn Jsii::Type.check_type(@capacity_reservation_resource_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "capacityReservationResourceGroupArn") unless @capacity_reservation_resource_group_arn.nil? end |
Instance Attribute Details
#capacity_reservation_id ⇒ String? (readonly)
The ID of the Capacity Reservation in which to run the instance.
899 900 901 |
# File 'ec2/cfn_launch_template.rb', line 899 def capacity_reservation_id @capacity_reservation_id end |
#capacity_reservation_resource_group_arn ⇒ String? (readonly)
The ARN of the Capacity Reservation resource group in which to run the instance.
904 905 906 |
# File 'ec2/cfn_launch_template.rb', line 904 def capacity_reservation_resource_group_arn @capacity_reservation_resource_group_arn end |
Class Method Details
.jsii_properties ⇒ Object
906 907 908 909 910 911 |
# File 'ec2/cfn_launch_template.rb', line 906 def self.jsii_properties { :capacity_reservation_id => "capacityReservationId", :capacity_reservation_resource_group_arn => "capacityReservationResourceGroupArn", } end |
Instance Method Details
#to_jsii ⇒ Object
913 914 915 916 917 918 919 920 |
# File 'ec2/cfn_launch_template.rb', line 913 def to_jsii result = {} result.merge!({ "capacityReservationId" => @capacity_reservation_id, "capacityReservationResourceGroupArn" => @capacity_reservation_resource_group_arn, }) result.compact end |