Class: AWSCDK::EC2::CfnLaunchTemplate::CapacityReservationTargetProperty

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capacity_reservation_id: nil, capacity_reservation_resource_group_arn: nil) ⇒ CapacityReservationTargetProperty

Returns a new instance of CapacityReservationTargetProperty.

Parameters:

  • capacity_reservation_id (String, nil) (defaults to: nil)

    The ID of the Capacity Reservation in which to run the instance.

  • capacity_reservation_resource_group_arn (String, nil) (defaults to: nil)

    The ARN of the Capacity Reservation resource group in which to run the instance.



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_idString? (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_arnString? (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_propertiesObject



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_jsiiObject



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