Class: AWSCDK::EC2::CfnCapacityReservationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnCapacityReservationProps
- Defined in:
- ec2/cfn_capacity_reservation_props.rb
Overview
Properties for defining a CfnCapacityReservation.
Instance Attribute Summary collapse
-
#availability_zone ⇒ String?
readonly
The Availability Zone in which to create the Capacity Reservation.
-
#availability_zone_id ⇒ String?
readonly
The ID of the Availability Zone in which the capacity is reserved.
-
#ebs_optimized ⇒ Boolean, ...
readonly
Indicates whether the Capacity Reservation supports EBS-optimized instances.
-
#end_date ⇒ String?
readonly
The date and time at which the Capacity Reservation expires.
-
#end_date_type ⇒ String?
readonly
Indicates the way in which the Capacity Reservation ends.
-
#ephemeral_storage ⇒ Boolean, ...
readonly
Deprecated..
-
#instance_count ⇒ Numeric
readonly
The number of instances for which to reserve capacity.
-
#instance_match_criteria ⇒ String?
readonly
Indicates the type of instance launches that the Capacity Reservation accepts.
-
#instance_platform ⇒ String
readonly
The type of operating system for which to reserve capacity.
-
#instance_type ⇒ String
readonly
The instance type for which to reserve capacity.
-
#out_post_arn ⇒ String?
readonly
Not supported for future-dated Capacity Reservations.
-
#placement_group_arn ⇒ String?
readonly
Not supported for future-dated Capacity Reservations.
-
#tag_specifications ⇒ AWSCDK::IResolvable, ...
readonly
The tags to apply to the Capacity Reservation during launch.
-
#tenancy ⇒ String?
readonly
Indicates the tenancy of the Capacity Reservation.
-
#unused_reservation_billing_owner_id ⇒ String?
readonly
The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(instance_count:, instance_platform:, instance_type:, availability_zone: nil, availability_zone_id: nil, ebs_optimized: nil, end_date: nil, end_date_type: nil, ephemeral_storage: nil, instance_match_criteria: nil, out_post_arn: nil, placement_group_arn: nil, tag_specifications: nil, tenancy: nil, unused_reservation_billing_owner_id: nil) ⇒ CfnCapacityReservationProps
constructor
A new instance of CfnCapacityReservationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(instance_count:, instance_platform:, instance_type:, availability_zone: nil, availability_zone_id: nil, ebs_optimized: nil, end_date: nil, end_date_type: nil, ephemeral_storage: nil, instance_match_criteria: nil, out_post_arn: nil, placement_group_arn: nil, tag_specifications: nil, tenancy: nil, unused_reservation_billing_owner_id: nil) ⇒ CfnCapacityReservationProps
Returns a new instance of CfnCapacityReservationProps.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 24 def initialize(instance_count:, instance_platform:, instance_type:, availability_zone: nil, availability_zone_id: nil, ebs_optimized: nil, end_date: nil, end_date_type: nil, ephemeral_storage: nil, instance_match_criteria: nil, out_post_arn: nil, placement_group_arn: nil, tag_specifications: nil, tenancy: nil, unused_reservation_billing_owner_id: nil) @instance_count = instance_count Jsii::Type.check_type(@instance_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "instanceCount") @instance_platform = instance_platform Jsii::Type.check_type(@instance_platform, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instancePlatform") @instance_type = instance_type Jsii::Type.check_type(@instance_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceType") @availability_zone = availability_zone Jsii::Type.check_type(@availability_zone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZone") unless @availability_zone.nil? @availability_zone_id = availability_zone_id Jsii::Type.check_type(@availability_zone_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "availabilityZoneId") unless @availability_zone_id.nil? @ebs_optimized = ebs_optimized Jsii::Type.check_type(@ebs_optimized, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "ebsOptimized") unless @ebs_optimized.nil? @end_date = end_date Jsii::Type.check_type(@end_date, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endDate") unless @end_date.nil? @end_date_type = end_date_type Jsii::Type.check_type(@end_date_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "endDateType") unless @end_date_type.nil? @ephemeral_storage = ephemeral_storage Jsii::Type.check_type(@ephemeral_storage, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "ephemeralStorage") unless @ephemeral_storage.nil? @instance_match_criteria = instance_match_criteria Jsii::Type.check_type(@instance_match_criteria, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceMatchCriteria") unless @instance_match_criteria.nil? @out_post_arn = out_post_arn Jsii::Type.check_type(@out_post_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outPostArn") unless @out_post_arn.nil? @placement_group_arn = placement_group_arn Jsii::Type.check_type(@placement_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "placementGroupArn") unless @placement_group_arn.nil? @tag_specifications = tag_specifications Jsii::Type.check_type(@tag_specifications, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNmbkNhcGFjaXR5UmVzZXJ2YXRpb24uVGFnU3BlY2lmaWNhdGlvblByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "tagSpecifications") unless @tag_specifications.nil? @tenancy = tenancy Jsii::Type.check_type(@tenancy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tenancy") unless @tenancy.nil? @unused_reservation_billing_owner_id = unused_reservation_billing_owner_id Jsii::Type.check_type(@unused_reservation_billing_owner_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unusedReservationBillingOwnerId") unless @unused_reservation_billing_owner_id.nil? end |
Instance Attribute Details
#availability_zone ⇒ String? (readonly)
The Availability Zone in which to create the Capacity Reservation.
84 85 86 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 84 def availability_zone @availability_zone end |
#availability_zone_id ⇒ String? (readonly)
The ID of the Availability Zone in which the capacity is reserved.
89 90 91 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 89 def availability_zone_id @availability_zone_id end |
#ebs_optimized ⇒ Boolean, ... (readonly)
Indicates whether the Capacity Reservation supports EBS-optimized instances.
This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS- optimized instance.
96 97 98 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 96 def ebs_optimized @ebs_optimized end |
#end_date ⇒ String? (readonly)
The date and time at which the Capacity Reservation expires.
When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.
You must provide an EndDate value if EndDateType is limited . Omit EndDate if EndDateType is unlimited .
If the EndDateType is limited , the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.
If you are requesting a future-dated Capacity Reservation, you can't specify an end date and time that is within the commitment duration.
109 110 111 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 109 def end_date @end_date end |
#end_date_type ⇒ String? (readonly)
Indicates the way in which the Capacity Reservation ends.
A Capacity Reservation can have one of the following end types:
unlimited- The Capacity Reservation remains active until you explicitly cancel it. Do not provide anEndDateif theEndDateTypeisunlimited.limited- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDatevalue if theEndDateTypevalue islimited.
119 120 121 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 119 def end_date_type @end_date_type end |
#ephemeral_storage ⇒ Boolean, ... (readonly)
Deprecated..
124 125 126 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 124 def ephemeral_storage @ephemeral_storage end |
#instance_count ⇒ Numeric (readonly)
The number of instances for which to reserve capacity.
You can request future-dated Capacity Reservations for an instance count with a minimum of 32 vCPUs. For example, if you request a future-dated Capacity Reservation for
m5.xlargeinstances, you must request at least 8 instances ( 8 * m5.xlarge = 32 vCPUs ).
Valid range: 1 - 1000
65 66 67 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 65 def instance_count @instance_count end |
#instance_match_criteria ⇒ String? (readonly)
Indicates the type of instance launches that the Capacity Reservation accepts. The options include:.
open- The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying any additional parameters.targeted- The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
If you are requesting a future-dated Capacity Reservation, you must specify
targeted.
Default: open
136 137 138 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 136 def instance_match_criteria @instance_match_criteria end |
#instance_platform ⇒ String (readonly)
The type of operating system for which to reserve capacity.
70 71 72 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 70 def instance_platform @instance_platform end |
#instance_type ⇒ String (readonly)
The instance type for which to reserve capacity.
You can request future-dated Capacity Reservations for instance types in the C, M, R, I, T, and G instance families only.
For more information, see Instance types in the Amazon EC2 User Guide .
79 80 81 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 79 def instance_type @instance_type end |
#out_post_arn ⇒ String? (readonly)
Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
143 144 145 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 143 def out_post_arn @out_post_arn end |
#placement_group_arn ⇒ String? (readonly)
Not supported for future-dated Capacity Reservations.
The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .
150 151 152 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 150 def placement_group_arn @placement_group_arn end |
#tag_specifications ⇒ AWSCDK::IResolvable, ... (readonly)
The tags to apply to the Capacity Reservation during launch.
155 156 157 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 155 def tag_specifications @tag_specifications end |
#tenancy ⇒ String? (readonly)
Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:.
default- The Capacity Reservation is created on hardware that is shared with other AWS accounts .dedicated- The Capacity Reservation is created on single-tenant hardware that is dedicated to a single AWS account .
163 164 165 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 163 def tenancy @tenancy end |
#unused_reservation_billing_owner_id ⇒ String? (readonly)
The ID of the AWS account to which to assign billing of the unused capacity of the Capacity Reservation.
A request will be sent to the specified account. That account must accept the request for the billing to be assigned to their account. For more information, see Billing assignment for shared Amazon EC2 Capacity Reservations .
You can assign billing only for shared Capacity Reservations. To share a Capacity Reservation, you must add it to a resource share. For more information, see AWS::RAM::ResourceShare .
172 173 174 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 172 def unused_reservation_billing_owner_id @unused_reservation_billing_owner_id end |
Class Method Details
.jsii_properties ⇒ Object
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 174 def self.jsii_properties { :instance_count => "instanceCount", :instance_platform => "instancePlatform", :instance_type => "instanceType", :availability_zone => "availabilityZone", :availability_zone_id => "availabilityZoneId", :ebs_optimized => "ebsOptimized", :end_date => "endDate", :end_date_type => "endDateType", :ephemeral_storage => "ephemeralStorage", :instance_match_criteria => "instanceMatchCriteria", :out_post_arn => "outPostArn", :placement_group_arn => "placementGroupArn", :tag_specifications => "tagSpecifications", :tenancy => "tenancy", :unused_reservation_billing_owner_id => "unusedReservationBillingOwnerId", } end |
Instance Method Details
#to_jsii ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'ec2/cfn_capacity_reservation_props.rb', line 194 def to_jsii result = {} result.merge!({ "instanceCount" => @instance_count, "instancePlatform" => @instance_platform, "instanceType" => @instance_type, "availabilityZone" => @availability_zone, "availabilityZoneId" => @availability_zone_id, "ebsOptimized" => @ebs_optimized, "endDate" => @end_date, "endDateType" => @end_date_type, "ephemeralStorage" => @ephemeral_storage, "instanceMatchCriteria" => @instance_match_criteria, "outPostArn" => @out_post_arn, "placementGroupArn" => @placement_group_arn, "tagSpecifications" => @tag_specifications, "tenancy" => @tenancy, "unusedReservationBillingOwnerId" => @unused_reservation_billing_owner_id, }) result.compact end |