Class: AWSCDK::EC2::CfnLaunchTemplate::InstanceRequirementsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnLaunchTemplate::InstanceRequirementsProperty
- Defined in:
- ec2/cfn_launch_template.rb
Overview
The attributes for the instance types.
When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.
You must specify VCpuCount and MemoryMiB . All other attributes are optional. Any unspecified optional attribute is set to its default.
When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.
To limit the list of instance types from which Amazon EC2 can identify matching instance types, you can use one of the following parameters, but not both in the same request:
AllowedInstanceTypes- The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes.ExcludedInstanceTypes- The instance types to exclude from the list, even if they match your specified attributes.
If you specify
InstanceRequirements, you can't specifyInstanceType.Attribute-based instance type selection is only supported when using Auto Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to use the launch template in the launch instance wizard , or with the RunInstances API or AWS::EC2::Instance AWS CloudFormation resource, you can't specify
InstanceRequirements.
For more information, see Specify attributes for instance type selection for EC2 Fleet or Spot Fleet and Spot placement score in the Amazon EC2 User Guide .
Instance Attribute Summary collapse
-
#accelerator_count ⇒ AWSCDK::IResolvable, ...
readonly
The minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips) on an instance.
-
#accelerator_manufacturers ⇒ Array<String>?
readonly
Indicates whether instance types must have accelerators by specific manufacturers.
-
#accelerator_names ⇒ Array<String>?
readonly
The accelerators that must be on the instance type.
-
#accelerator_total_memory_mib ⇒ AWSCDK::IResolvable, ...
readonly
The minimum and maximum amount of total accelerator memory, in MiB.
-
#accelerator_types ⇒ Array<String>?
readonly
The accelerator types that must be on the instance type.
-
#allowed_instance_types ⇒ Array<String>?
readonly
The instance types to apply your specified attributes against.
-
#bare_metal ⇒ String?
readonly
Indicates whether bare metal instance types must be included, excluded, or required.
-
#baseline_ebs_bandwidth_mbps ⇒ AWSCDK::IResolvable, ...
readonly
The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps.
-
#baseline_performance_factors ⇒ AWSCDK::IResolvable, ...
readonly
The baseline performance to consider, using an instance family as a baseline reference.
-
#burstable_performance ⇒ String?
readonly
Indicates whether burstable performance T instance types are included, excluded, or required.
-
#cpu_manufacturers ⇒ Array<String>?
readonly
The CPU manufacturers to include.
-
#excluded_instance_types ⇒ Array<String>?
readonly
The instance types to exclude.
-
#instance_generations ⇒ Array<String>?
readonly
Indicates whether current or previous generation instance types are included.
-
#local_storage ⇒ String?
readonly
Indicates whether instance types with instance store volumes are included, excluded, or required.
-
#local_storage_types ⇒ Array<String>?
readonly
The type of local storage that is required.
-
#max_spot_price_as_percentage_of_optimal_on_demand_price ⇒ Numeric?
readonly
[Price protection] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price.
-
#memory_gib_per_v_cpu ⇒ AWSCDK::IResolvable, ...
readonly
The minimum and maximum amount of memory per vCPU, in GiB.
-
#memory_mib ⇒ AWSCDK::IResolvable, ...
readonly
The minimum and maximum amount of memory, in MiB.
-
#network_bandwidth_gbps ⇒ AWSCDK::IResolvable, ...
readonly
The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
-
#network_interface_count ⇒ AWSCDK::IResolvable, ...
readonly
The minimum and maximum number of network interfaces.
-
#on_demand_max_price_percentage_over_lowest_price ⇒ Numeric?
readonly
[Price protection] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price.
-
#require_hibernate_support ⇒ Boolean, ...
readonly
Indicates whether instance types must support hibernation for On-Demand Instances.
-
#spot_max_price_percentage_over_lowest_price ⇒ Numeric?
readonly
[Price protection] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price.
-
#total_local_storage_gb ⇒ AWSCDK::IResolvable, ...
readonly
The minimum and maximum amount of total local storage, in GB.
-
#v_cpu_count ⇒ AWSCDK::IResolvable, ...
readonly
The minimum and maximum number of vCPUs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(accelerator_count: nil, accelerator_manufacturers: nil, accelerator_names: nil, accelerator_total_memory_mib: nil, accelerator_types: nil, allowed_instance_types: nil, bare_metal: nil, baseline_ebs_bandwidth_mbps: nil, baseline_performance_factors: nil, burstable_performance: nil, cpu_manufacturers: nil, excluded_instance_types: nil, instance_generations: nil, local_storage: nil, local_storage_types: nil, max_spot_price_as_percentage_of_optimal_on_demand_price: nil, memory_gib_per_v_cpu: nil, memory_mib: nil, network_bandwidth_gbps: nil, network_interface_count: nil, on_demand_max_price_percentage_over_lowest_price: nil, require_hibernate_support: nil, spot_max_price_percentage_over_lowest_price: nil, total_local_storage_gb: nil, v_cpu_count: nil) ⇒ InstanceRequirementsProperty
constructor
A new instance of InstanceRequirementsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(accelerator_count: nil, accelerator_manufacturers: nil, accelerator_names: nil, accelerator_total_memory_mib: nil, accelerator_types: nil, allowed_instance_types: nil, bare_metal: nil, baseline_ebs_bandwidth_mbps: nil, baseline_performance_factors: nil, burstable_performance: nil, cpu_manufacturers: nil, excluded_instance_types: nil, instance_generations: nil, local_storage: nil, local_storage_types: nil, max_spot_price_as_percentage_of_optimal_on_demand_price: nil, memory_gib_per_v_cpu: nil, memory_mib: nil, network_bandwidth_gbps: nil, network_interface_count: nil, on_demand_max_price_percentage_over_lowest_price: nil, require_hibernate_support: nil, spot_max_price_percentage_over_lowest_price: nil, total_local_storage_gb: nil, v_cpu_count: nil) ⇒ InstanceRequirementsProperty
Returns a new instance of InstanceRequirementsProperty.
1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 |
# File 'ec2/cfn_launch_template.rb', line 1620 def initialize(accelerator_count: nil, accelerator_manufacturers: nil, accelerator_names: nil, accelerator_total_memory_mib: nil, accelerator_types: nil, allowed_instance_types: nil, bare_metal: nil, baseline_ebs_bandwidth_mbps: nil, baseline_performance_factors: nil, burstable_performance: nil, cpu_manufacturers: nil, excluded_instance_types: nil, instance_generations: nil, local_storage: nil, local_storage_types: nil, max_spot_price_as_percentage_of_optimal_on_demand_price: nil, memory_gib_per_v_cpu: nil, memory_mib: nil, network_bandwidth_gbps: nil, network_interface_count: nil, on_demand_max_price_percentage_over_lowest_price: nil, require_hibernate_support: nil, spot_max_price_percentage_over_lowest_price: nil, total_local_storage_gb: nil, v_cpu_count: nil) @accelerator_count = accelerator_count.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::AcceleratorCountProperty.new(**accelerator_count.transform_keys(&:to_sym)) : accelerator_count Jsii::Type.check_type(@accelerator_count, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuQWNjZWxlcmF0b3JDb3VudFByb3BlcnR5In1dfX0=")), "acceleratorCount") unless @accelerator_count.nil? @accelerator_manufacturers = accelerator_manufacturers Jsii::Type.check_type(@accelerator_manufacturers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "acceleratorManufacturers") unless @accelerator_manufacturers.nil? @accelerator_names = accelerator_names Jsii::Type.check_type(@accelerator_names, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "acceleratorNames") unless @accelerator_names.nil? @accelerator_total_memory_mib = accelerator_total_memory_mib.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::AcceleratorTotalMemoryMiBProperty.new(**accelerator_total_memory_mib.transform_keys(&:to_sym)) : accelerator_total_memory_mib Jsii::Type.check_type(@accelerator_total_memory_mib, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuQWNjZWxlcmF0b3JUb3RhbE1lbW9yeU1pQlByb3BlcnR5In1dfX0=")), "acceleratorTotalMemoryMiB") unless @accelerator_total_memory_mib.nil? @accelerator_types = accelerator_types Jsii::Type.check_type(@accelerator_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "acceleratorTypes") unless @accelerator_types.nil? @allowed_instance_types = allowed_instance_types Jsii::Type.check_type(@allowed_instance_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowedInstanceTypes") unless @allowed_instance_types.nil? @bare_metal = Jsii::Type.check_type(@bare_metal, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "bareMetal") unless @bare_metal.nil? @baseline_ebs_bandwidth_mbps = baseline_ebs_bandwidth_mbps.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::BaselineEbsBandwidthMbpsProperty.new(**baseline_ebs_bandwidth_mbps.transform_keys(&:to_sym)) : baseline_ebs_bandwidth_mbps Jsii::Type.check_type(@baseline_ebs_bandwidth_mbps, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuQmFzZWxpbmVFYnNCYW5kd2lkdGhNYnBzUHJvcGVydHkifV19fQ==")), "baselineEbsBandwidthMbps") unless @baseline_ebs_bandwidth_mbps.nil? @baseline_performance_factors = baseline_performance_factors.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::BaselinePerformanceFactorsProperty.new(**baseline_performance_factors.transform_keys(&:to_sym)) : baseline_performance_factors Jsii::Type.check_type(@baseline_performance_factors, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuQmFzZWxpbmVQZXJmb3JtYW5jZUZhY3RvcnNQcm9wZXJ0eSJ9XX19")), "baselinePerformanceFactors") unless @baseline_performance_factors.nil? @burstable_performance = burstable_performance Jsii::Type.check_type(@burstable_performance, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "burstablePerformance") unless @burstable_performance.nil? @cpu_manufacturers = cpu_manufacturers Jsii::Type.check_type(@cpu_manufacturers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "cpuManufacturers") unless @cpu_manufacturers.nil? @excluded_instance_types = excluded_instance_types Jsii::Type.check_type(@excluded_instance_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludedInstanceTypes") unless @excluded_instance_types.nil? @instance_generations = instance_generations Jsii::Type.check_type(@instance_generations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "instanceGenerations") unless @instance_generations.nil? @local_storage = local_storage Jsii::Type.check_type(@local_storage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "localStorage") unless @local_storage.nil? @local_storage_types = local_storage_types Jsii::Type.check_type(@local_storage_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "localStorageTypes") unless @local_storage_types.nil? @max_spot_price_as_percentage_of_optimal_on_demand_price = max_spot_price_as_percentage_of_optimal_on_demand_price Jsii::Type.check_type(@max_spot_price_as_percentage_of_optimal_on_demand_price, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxSpotPriceAsPercentageOfOptimalOnDemandPrice") unless @max_spot_price_as_percentage_of_optimal_on_demand_price.nil? @memory_gib_per_v_cpu = memory_gib_per_v_cpu.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::MemoryGiBPerVCpuProperty.new(**memory_gib_per_v_cpu.transform_keys(&:to_sym)) : memory_gib_per_v_cpu Jsii::Type.check_type(@memory_gib_per_v_cpu, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuTWVtb3J5R2lCUGVyVkNwdVByb3BlcnR5In1dfX0=")), "memoryGiBPerVCpu") unless @memory_gib_per_v_cpu.nil? @memory_mib = memory_mib.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::MemoryMiBProperty.new(**memory_mib.transform_keys(&:to_sym)) : memory_mib Jsii::Type.check_type(@memory_mib, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuTWVtb3J5TWlCUHJvcGVydHkifV19fQ==")), "memoryMiB") unless @memory_mib.nil? @network_bandwidth_gbps = network_bandwidth_gbps.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::NetworkBandwidthGbpsProperty.new(**network_bandwidth_gbps.transform_keys(&:to_sym)) : network_bandwidth_gbps Jsii::Type.check_type(@network_bandwidth_gbps, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuTmV0d29ya0JhbmR3aWR0aEdicHNQcm9wZXJ0eSJ9XX19")), "networkBandwidthGbps") unless @network_bandwidth_gbps.nil? @network_interface_count = network_interface_count.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::NetworkInterfaceCountProperty.new(**network_interface_count.transform_keys(&:to_sym)) : network_interface_count Jsii::Type.check_type(@network_interface_count, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuTmV0d29ya0ludGVyZmFjZUNvdW50UHJvcGVydHkifV19fQ==")), "networkInterfaceCount") unless @network_interface_count.nil? @on_demand_max_price_percentage_over_lowest_price = on_demand_max_price_percentage_over_lowest_price Jsii::Type.check_type(@on_demand_max_price_percentage_over_lowest_price, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "onDemandMaxPricePercentageOverLowestPrice") unless @on_demand_max_price_percentage_over_lowest_price.nil? @require_hibernate_support = require_hibernate_support Jsii::Type.check_type(@require_hibernate_support, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "requireHibernateSupport") unless @require_hibernate_support.nil? @spot_max_price_percentage_over_lowest_price = spot_max_price_percentage_over_lowest_price Jsii::Type.check_type(@spot_max_price_percentage_over_lowest_price, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "spotMaxPricePercentageOverLowestPrice") unless @spot_max_price_percentage_over_lowest_price.nil? @total_local_storage_gb = total_local_storage_gb.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::TotalLocalStorageGBProperty.new(**total_local_storage_gb.transform_keys(&:to_sym)) : total_local_storage_gb Jsii::Type.check_type(@total_local_storage_gb, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuVG90YWxMb2NhbFN0b3JhZ2VHQlByb3BlcnR5In1dfX0=")), "totalLocalStorageGb") unless @total_local_storage_gb.nil? @v_cpu_count = v_cpu_count.is_a?(Hash) ? ::AWSCDK::EC2::CfnLaunchTemplate::VCpuCountProperty.new(**v_cpu_count.transform_keys(&:to_sym)) : v_cpu_count Jsii::Type.check_type(@v_cpu_count, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuQ2ZuTGF1bmNoVGVtcGxhdGUuVkNwdUNvdW50UHJvcGVydHkifV19fQ==")), "vCpuCount") unless @v_cpu_count.nil? end |
Instance Attribute Details
#accelerator_count ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum and maximum number of accelerators (GPUs, FPGAs, or AWS Inferentia chips) on an instance.
To exclude accelerator-enabled instance types, set Max to 0 .
Default: No minimum or maximum limits
1681 1682 1683 |
# File 'ec2/cfn_launch_template.rb', line 1681 def accelerator_count @accelerator_count end |
#accelerator_manufacturers ⇒ Array<String>? (readonly)
Indicates whether instance types must have accelerators by specific manufacturers.
- For instance types with AWS devices, specify
amazon-web-services. - For instance types with AMD devices, specify
amd. - For instance types with Habana devices, specify
habana. - For instance types with NVIDIA devices, specify
nvidia. - For instance types with Xilinx devices, specify
xilinx.
Default: Any manufacturer
1694 1695 1696 |
# File 'ec2/cfn_launch_template.rb', line 1694 def accelerator_manufacturers @accelerator_manufacturers end |
#accelerator_names ⇒ Array<String>? (readonly)
The accelerators that must be on the instance type.
- For instance types with NVIDIA A10G GPUs, specify
a10g. - For instance types with NVIDIA A100 GPUs, specify
a100. - For instance types with NVIDIA H100 GPUs, specify
h100. - For instance types with AWS Inferentia chips, specify
inferentia. - For instance types with AWS Inferentia2 chips, specify
inferentia2. - For instance types with Habana Gaudi HL-205 GPUs, specify
gaudi-hl-205. - For instance types with NVIDIA GRID K520 GPUs, specify
k520. - For instance types with NVIDIA K80 GPUs, specify
k80. - For instance types with NVIDIA L4 GPUs, specify
l4. - For instance types with NVIDIA L40S GPUs, specify
l40s. - For instance types with NVIDIA M60 GPUs, specify
m60. - For instance types with AMD Radeon Pro V520 GPUs, specify
radeon-pro-v520. - For instance types with AWS Trainium chips, specify
trainium. - For instance types with AWS Trainium2 chips, specify
trainium2. - For instance types with NVIDIA T4 GPUs, specify
t4. - For instance types with NVIDIA T4G GPUs, specify
t4g. - For instance types with Xilinx U30 cards, specify
u30. - For instance types with Xilinx VU9P FPGAs, specify
vu9p. - For instance types with NVIDIA V100 GPUs, specify
v100.
Default: Any accelerator
1721 1722 1723 |
# File 'ec2/cfn_launch_template.rb', line 1721 def accelerator_names @accelerator_names end |
#accelerator_total_memory_mib ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum and maximum amount of total accelerator memory, in MiB.
Default: No minimum or maximum limits
1728 1729 1730 |
# File 'ec2/cfn_launch_template.rb', line 1728 def accelerator_total_memory_mib @accelerator_total_memory_mib end |
#accelerator_types ⇒ Array<String>? (readonly)
The accelerator types that must be on the instance type.
- For instance types with FPGA accelerators, specify
fpga. - For instance types with GPU accelerators, specify
gpu. - For instance types with Inference accelerators, specify
inference. - For instance types with Media accelerators, specify
media.
Default: Any accelerator type
1740 1741 1742 |
# File 'ec2/cfn_launch_template.rb', line 1740 def accelerator_types @accelerator_types end |
#allowed_instance_types ⇒ Array<String>? (readonly)
The instance types to apply your specified attributes against.
All other instance types are ignored, even if they match your specified attributes.
You can use strings with one or more wild cards, represented by an asterisk ( * ), to allow an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .
For example, if you specify c5* ,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.
If you specify
AllowedInstanceTypes, you can't specifyExcludedInstanceTypes.
Default: All instance types
1755 1756 1757 |
# File 'ec2/cfn_launch_template.rb', line 1755 def allowed_instance_types @allowed_instance_types end |
#bare_metal ⇒ String? (readonly)
Indicates whether bare metal instance types must be included, excluded, or required.
- To include bare metal instance types, specify
included. - To require only bare metal instance types, specify
required. - To exclude bare metal instance types, specify
excluded.
Default: excluded
1766 1767 1768 |
# File 'ec2/cfn_launch_template.rb', line 1766 def @bare_metal end |
#baseline_ebs_bandwidth_mbps ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps.
For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .
Default: No minimum or maximum limits
1775 1776 1777 |
# File 'ec2/cfn_launch_template.rb', line 1775 def baseline_ebs_bandwidth_mbps @baseline_ebs_bandwidth_mbps end |
#baseline_performance_factors ⇒ AWSCDK::IResolvable, ... (readonly)
The baseline performance to consider, using an instance family as a baseline reference.
The instance family establishes the lowest acceptable level of performance. Amazon EC2 uses this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application. Currently, this parameter only supports CPU performance as a baseline performance factor. For more information, see Performance protection in the Amazon EC2 User Guide .
1782 1783 1784 |
# File 'ec2/cfn_launch_template.rb', line 1782 def baseline_performance_factors @baseline_performance_factors end |
#burstable_performance ⇒ String? (readonly)
Indicates whether burstable performance T instance types are included, excluded, or required.
For more information, see Burstable performance instances .
- To include burstable performance instance types, specify
included. - To require only burstable performance instance types, specify
required. - To exclude burstable performance instance types, specify
excluded.
Default: excluded
1795 1796 1797 |
# File 'ec2/cfn_launch_template.rb', line 1795 def burstable_performance @burstable_performance end |
#cpu_manufacturers ⇒ Array<String>? (readonly)
The CPU manufacturers to include.
- For instance types with Intel CPUs, specify
intel. - For instance types with AMD CPUs, specify
amd. - For instance types with AWS CPUs, specify
amazon-web-services. - For instance types with Apple CPUs, specify
apple.
Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.
Default: Any manufacturer
1809 1810 1811 |
# File 'ec2/cfn_launch_template.rb', line 1809 def cpu_manufacturers @cpu_manufacturers end |
#excluded_instance_types ⇒ Array<String>? (readonly)
The instance types to exclude.
You can use strings with one or more wild cards, represented by an asterisk ( * ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .
For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.
If you specify
ExcludedInstanceTypes, you can't specifyAllowedInstanceTypes.
Default: No excluded instance types
1822 1823 1824 |
# File 'ec2/cfn_launch_template.rb', line 1822 def excluded_instance_types @excluded_instance_types end |
#instance_generations ⇒ Array<String>? (readonly)
Indicates whether current or previous generation instance types are included.
The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .
For current generation instance types, specify current .
For previous generation instance types, specify previous .
Default: Current and previous generation instance types
1835 1836 1837 |
# File 'ec2/cfn_launch_template.rb', line 1835 def instance_generations @instance_generations end |
#local_storage ⇒ String? (readonly)
Indicates whether instance types with instance store volumes are included, excluded, or required.
For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .
- To include instance types with instance store volumes, specify
included. - To require only instance types with instance store volumes, specify
required. - To exclude instance types with instance store volumes, specify
excluded.
Default: included
1848 1849 1850 |
# File 'ec2/cfn_launch_template.rb', line 1848 def local_storage @local_storage end |
#local_storage_types ⇒ Array<String>? (readonly)
The type of local storage that is required.
- For instance types with hard disk drive (HDD) storage, specify
hdd. - For instance types with solid state drive (SSD) storage, specify
ssd.
Default: hdd and ssd
1858 1859 1860 |
# File 'ec2/cfn_launch_template.rb', line 1858 def local_storage_types @local_storage_types end |
#max_spot_price_as_percentage_of_optimal_on_demand_price ⇒ Numeric? (readonly)
[Price protection] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price.
The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.
The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is based on the per vCPU or per memory price instead of the per instance price.
Only one of
SpotMaxPricePercentageOverLowestPriceorMaxSpotPriceAsPercentageOfOptimalOnDemandPricecan be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as999999.
1871 1872 1873 |
# File 'ec2/cfn_launch_template.rb', line 1871 def max_spot_price_as_percentage_of_optimal_on_demand_price @max_spot_price_as_percentage_of_optimal_on_demand_price end |
#memory_gib_per_v_cpu ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum and maximum amount of memory per vCPU, in GiB.
Default: No minimum or maximum limits
1878 1879 1880 |
# File 'ec2/cfn_launch_template.rb', line 1878 def memory_gib_per_v_cpu @memory_gib_per_v_cpu end |
#memory_mib ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum and maximum amount of memory, in MiB.
1883 1884 1885 |
# File 'ec2/cfn_launch_template.rb', line 1883 def memory_mib @memory_mib end |
#network_bandwidth_gbps ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
Default: No minimum or maximum limits
1890 1891 1892 |
# File 'ec2/cfn_launch_template.rb', line 1890 def network_bandwidth_gbps @network_bandwidth_gbps end |
#network_interface_count ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum and maximum number of network interfaces.
Default: No minimum or maximum limits
1897 1898 1899 |
# File 'ec2/cfn_launch_template.rb', line 1897 def network_interface_count @network_interface_count end |
#on_demand_max_price_percentage_over_lowest_price ⇒ Numeric? (readonly)
[Price protection] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price.
The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.
The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
To turn off price protection, specify a high value, such as 999999 .
This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .
If you set
TargetCapacityUnitTypetovcpuormemory-mib, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.
Default: 20
1914 1915 1916 |
# File 'ec2/cfn_launch_template.rb', line 1914 def on_demand_max_price_percentage_over_lowest_price @on_demand_max_price_percentage_over_lowest_price end |
#require_hibernate_support ⇒ Boolean, ... (readonly)
Indicates whether instance types must support hibernation for On-Demand Instances.
This parameter is not supported for GetSpotPlacementScores .
Default: false
1923 1924 1925 |
# File 'ec2/cfn_launch_template.rb', line 1923 def require_hibernate_support @require_hibernate_support end |
#spot_max_price_percentage_over_lowest_price ⇒ Numeric? (readonly)
[Price protection] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price.
The identified Spot price is the Spot price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified Spot price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose Spot price exceeds your specified threshold.
The parameter accepts an integer, which Amazon EC2 interprets as a percentage.
If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.
This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .
Only one of
SpotMaxPricePercentageOverLowestPriceorMaxSpotPriceAsPercentageOfOptimalOnDemandPricecan be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as999999.
Default: 100
1940 1941 1942 |
# File 'ec2/cfn_launch_template.rb', line 1940 def spot_max_price_percentage_over_lowest_price @spot_max_price_percentage_over_lowest_price end |
#total_local_storage_gb ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum and maximum amount of total local storage, in GB.
Default: No minimum or maximum limits
1947 1948 1949 |
# File 'ec2/cfn_launch_template.rb', line 1947 def total_local_storage_gb @total_local_storage_gb end |
#v_cpu_count ⇒ AWSCDK::IResolvable, ... (readonly)
The minimum and maximum number of vCPUs.
1952 1953 1954 |
# File 'ec2/cfn_launch_template.rb', line 1952 def v_cpu_count @v_cpu_count end |
Class Method Details
.jsii_properties ⇒ Object
1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 |
# File 'ec2/cfn_launch_template.rb', line 1954 def self.jsii_properties { :accelerator_count => "acceleratorCount", :accelerator_manufacturers => "acceleratorManufacturers", :accelerator_names => "acceleratorNames", :accelerator_total_memory_mib => "acceleratorTotalMemoryMiB", :accelerator_types => "acceleratorTypes", :allowed_instance_types => "allowedInstanceTypes", :bare_metal => "bareMetal", :baseline_ebs_bandwidth_mbps => "baselineEbsBandwidthMbps", :baseline_performance_factors => "baselinePerformanceFactors", :burstable_performance => "burstablePerformance", :cpu_manufacturers => "cpuManufacturers", :excluded_instance_types => "excludedInstanceTypes", :instance_generations => "instanceGenerations", :local_storage => "localStorage", :local_storage_types => "localStorageTypes", :max_spot_price_as_percentage_of_optimal_on_demand_price => "maxSpotPriceAsPercentageOfOptimalOnDemandPrice", :memory_gib_per_v_cpu => "memoryGiBPerVCpu", :memory_mib => "memoryMiB", :network_bandwidth_gbps => "networkBandwidthGbps", :network_interface_count => "networkInterfaceCount", :on_demand_max_price_percentage_over_lowest_price => "onDemandMaxPricePercentageOverLowestPrice", :require_hibernate_support => "requireHibernateSupport", :spot_max_price_percentage_over_lowest_price => "spotMaxPricePercentageOverLowestPrice", :total_local_storage_gb => "totalLocalStorageGb", :v_cpu_count => "vCpuCount", } end |
Instance Method Details
#to_jsii ⇒ Object
1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 |
# File 'ec2/cfn_launch_template.rb', line 1984 def to_jsii result = {} result.merge!({ "acceleratorCount" => @accelerator_count, "acceleratorManufacturers" => @accelerator_manufacturers, "acceleratorNames" => @accelerator_names, "acceleratorTotalMemoryMiB" => @accelerator_total_memory_mib, "acceleratorTypes" => @accelerator_types, "allowedInstanceTypes" => @allowed_instance_types, "bareMetal" => @bare_metal, "baselineEbsBandwidthMbps" => @baseline_ebs_bandwidth_mbps, "baselinePerformanceFactors" => @baseline_performance_factors, "burstablePerformance" => @burstable_performance, "cpuManufacturers" => @cpu_manufacturers, "excludedInstanceTypes" => @excluded_instance_types, "instanceGenerations" => @instance_generations, "localStorage" => @local_storage, "localStorageTypes" => @local_storage_types, "maxSpotPriceAsPercentageOfOptimalOnDemandPrice" => @max_spot_price_as_percentage_of_optimal_on_demand_price, "memoryGiBPerVCpu" => @memory_gib_per_v_cpu, "memoryMiB" => @memory_mib, "networkBandwidthGbps" => @network_bandwidth_gbps, "networkInterfaceCount" => @network_interface_count, "onDemandMaxPricePercentageOverLowestPrice" => @on_demand_max_price_percentage_over_lowest_price, "requireHibernateSupport" => @require_hibernate_support, "spotMaxPricePercentageOverLowestPrice" => @spot_max_price_percentage_over_lowest_price, "totalLocalStorageGb" => @total_local_storage_gb, "vCpuCount" => @v_cpu_count, }) result.compact end |