com.amazonaws.services.ec2.model.InstanceRequirements Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* 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 specify InstanceType
.
*
*
* 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, you can't specify InstanceRequirements
.
*
*
*
* For more information, see Create a mixed instances group using attribute-based instance type selection in the Amazon EC2 Auto Scaling
* User Guide, and also Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot placement score in the
* Amazon EC2 User Guide.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class InstanceRequirements implements Serializable, Cloneable {
/**
*
* The minimum and maximum number of vCPUs.
*
*/
private VCpuCountRange vCpuCount;
/**
*
* The minimum and maximum amount of memory, in MiB.
*
*/
private MemoryMiB memoryMiB;
/**
*
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
*
*/
private com.amazonaws.internal.SdkInternalList cpuManufacturers;
/**
*
* The minimum and maximum amount of memory per vCPU, in GiB.
*
*
* Default: No minimum or maximum limits
*
*/
private MemoryGiBPerVCpu memoryGiBPerVCpu;
/**
*
* 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 specify AllowedInstanceTypes
.
*
*
*
* Default: No excluded instance types
*
*/
private com.amazonaws.internal.SdkInternalList excludedInstanceTypes;
/**
*
* 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
*
*/
private com.amazonaws.internal.SdkInternalList instanceGenerations;
/**
*
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
* .
*
*
*
* Default: 100
*
*/
private Integer spotMaxPricePercentageOverLowestPrice;
/**
*
* [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 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.
*
*
*
* Default: 20
*
*/
private Integer onDemandMaxPricePercentageOverLowestPrice;
/**
*
* 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
*
*/
private String bareMetal;
/**
*
* 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
*
*/
private String burstablePerformance;
/**
*
* Indicates whether instance types must support hibernation for On-Demand Instances.
*
*
* This parameter is not supported for GetSpotPlacementScores.
*
*
* Default: false
*
*/
private Boolean requireHibernateSupport;
/**
*
* The minimum and maximum number of network interfaces.
*
*
* Default: No minimum or maximum limits
*
*/
private NetworkInterfaceCount networkInterfaceCount;
/**
*
* 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
*
*/
private String localStorage;
/**
*
* 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
*
*/
private com.amazonaws.internal.SdkInternalList localStorageTypes;
/**
*
* The minimum and maximum amount of total local storage, in GB.
*
*
* Default: No minimum or maximum limits
*
*/
private TotalLocalStorageGB totalLocalStorageGB;
/**
*
* 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
*
*/
private BaselineEbsBandwidthMbps baselineEbsBandwidthMbps;
/**
*
* The accelerator types that must be on the instance type.
*
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
*
*/
private com.amazonaws.internal.SdkInternalList acceleratorTypes;
/**
*
* The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an
* instance.
*
*
* To exclude accelerator-enabled instance types, set Max
to 0
.
*
*
* Default: No minimum or maximum limits
*
*/
private AcceleratorCount acceleratorCount;
/**
*
* Indicates whether instance types must have accelerators by specific manufacturers.
*
*
* -
*
* For instance types with Amazon Web Services 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
*
*/
private com.amazonaws.internal.SdkInternalList acceleratorManufacturers;
/**
*
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
*
*/
private com.amazonaws.internal.SdkInternalList acceleratorNames;
/**
*
* The minimum and maximum amount of total accelerator memory, in MiB.
*
*
* Default: No minimum or maximum limits
*
*/
private AcceleratorTotalMemoryMiB acceleratorTotalMemoryMiB;
/**
*
* The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
*
*
* Default: No minimum or maximum limits
*
*/
private NetworkBandwidthGbps networkBandwidthGbps;
/**
*
* 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 specify ExcludedInstanceTypes
.
*
*
*
* Default: All instance types
*
*/
private com.amazonaws.internal.SdkInternalList allowedInstanceTypes;
/**
*
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
* .
*
*
*/
private Integer maxSpotPriceAsPercentageOfOptimalOnDemandPrice;
/**
*
* The minimum and maximum number of vCPUs.
*
*
* @param vCpuCount
* The minimum and maximum number of vCPUs.
*/
public void setVCpuCount(VCpuCountRange vCpuCount) {
this.vCpuCount = vCpuCount;
}
/**
*
* The minimum and maximum number of vCPUs.
*
*
* @return The minimum and maximum number of vCPUs.
*/
public VCpuCountRange getVCpuCount() {
return this.vCpuCount;
}
/**
*
* The minimum and maximum number of vCPUs.
*
*
* @param vCpuCount
* The minimum and maximum number of vCPUs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withVCpuCount(VCpuCountRange vCpuCount) {
setVCpuCount(vCpuCount);
return this;
}
/**
*
* The minimum and maximum amount of memory, in MiB.
*
*
* @param memoryMiB
* The minimum and maximum amount of memory, in MiB.
*/
public void setMemoryMiB(MemoryMiB memoryMiB) {
this.memoryMiB = memoryMiB;
}
/**
*
* The minimum and maximum amount of memory, in MiB.
*
*
* @return The minimum and maximum amount of memory, in MiB.
*/
public MemoryMiB getMemoryMiB() {
return this.memoryMiB;
}
/**
*
* The minimum and maximum amount of memory, in MiB.
*
*
* @param memoryMiB
* The minimum and maximum amount of memory, in MiB.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withMemoryMiB(MemoryMiB memoryMiB) {
setMemoryMiB(memoryMiB);
return this;
}
/**
*
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
*
*
* @return 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
* @see CpuManufacturer
*/
public java.util.List getCpuManufacturers() {
if (cpuManufacturers == null) {
cpuManufacturers = new com.amazonaws.internal.SdkInternalList();
}
return cpuManufacturers;
}
/**
*
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
*
*
* @param cpuManufacturers
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
* @see CpuManufacturer
*/
public void setCpuManufacturers(java.util.Collection cpuManufacturers) {
if (cpuManufacturers == null) {
this.cpuManufacturers = null;
return;
}
this.cpuManufacturers = new com.amazonaws.internal.SdkInternalList(cpuManufacturers);
}
/**
*
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCpuManufacturers(java.util.Collection)} or {@link #withCpuManufacturers(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param cpuManufacturers
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see CpuManufacturer
*/
public InstanceRequirements withCpuManufacturers(String... cpuManufacturers) {
if (this.cpuManufacturers == null) {
setCpuManufacturers(new com.amazonaws.internal.SdkInternalList(cpuManufacturers.length));
}
for (String ele : cpuManufacturers) {
this.cpuManufacturers.add(ele);
}
return this;
}
/**
*
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
*
*
* @param cpuManufacturers
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see CpuManufacturer
*/
public InstanceRequirements withCpuManufacturers(java.util.Collection cpuManufacturers) {
setCpuManufacturers(cpuManufacturers);
return this;
}
/**
*
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
*
*
* @param cpuManufacturers
* 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 Amazon Web Services CPUs, specify amazon-web-services
.
*
*
*
*
*
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see CpuManufacturer
*/
public InstanceRequirements withCpuManufacturers(CpuManufacturer... cpuManufacturers) {
com.amazonaws.internal.SdkInternalList cpuManufacturersCopy = new com.amazonaws.internal.SdkInternalList(cpuManufacturers.length);
for (CpuManufacturer value : cpuManufacturers) {
cpuManufacturersCopy.add(value.toString());
}
if (getCpuManufacturers() == null) {
setCpuManufacturers(cpuManufacturersCopy);
} else {
getCpuManufacturers().addAll(cpuManufacturersCopy);
}
return this;
}
/**
*
* The minimum and maximum amount of memory per vCPU, in GiB.
*
*
* Default: No minimum or maximum limits
*
*
* @param memoryGiBPerVCpu
* The minimum and maximum amount of memory per vCPU, in GiB.
*
* Default: No minimum or maximum limits
*/
public void setMemoryGiBPerVCpu(MemoryGiBPerVCpu memoryGiBPerVCpu) {
this.memoryGiBPerVCpu = memoryGiBPerVCpu;
}
/**
*
* The minimum and maximum amount of memory per vCPU, in GiB.
*
*
* Default: No minimum or maximum limits
*
*
* @return The minimum and maximum amount of memory per vCPU, in GiB.
*
* Default: No minimum or maximum limits
*/
public MemoryGiBPerVCpu getMemoryGiBPerVCpu() {
return this.memoryGiBPerVCpu;
}
/**
*
* The minimum and maximum amount of memory per vCPU, in GiB.
*
*
* Default: No minimum or maximum limits
*
*
* @param memoryGiBPerVCpu
* The minimum and maximum amount of memory per vCPU, in GiB.
*
* Default: No minimum or maximum limits
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withMemoryGiBPerVCpu(MemoryGiBPerVCpu memoryGiBPerVCpu) {
setMemoryGiBPerVCpu(memoryGiBPerVCpu);
return this;
}
/**
*
* 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 specify AllowedInstanceTypes
.
*
*
*
* Default: No excluded instance types
*
*
* @return 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 specify AllowedInstanceTypes
.
*
*
*
* Default: No excluded instance types
*/
public java.util.List getExcludedInstanceTypes() {
if (excludedInstanceTypes == null) {
excludedInstanceTypes = new com.amazonaws.internal.SdkInternalList();
}
return excludedInstanceTypes;
}
/**
*
* 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 specify AllowedInstanceTypes
.
*
*
*
* Default: No excluded instance types
*
*
* @param excludedInstanceTypes
* 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 specify AllowedInstanceTypes
.
*
*
*
* Default: No excluded instance types
*/
public void setExcludedInstanceTypes(java.util.Collection excludedInstanceTypes) {
if (excludedInstanceTypes == null) {
this.excludedInstanceTypes = null;
return;
}
this.excludedInstanceTypes = new com.amazonaws.internal.SdkInternalList(excludedInstanceTypes);
}
/**
*
* 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 specify AllowedInstanceTypes
.
*
*
*
* Default: No excluded instance types
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setExcludedInstanceTypes(java.util.Collection)} or
* {@link #withExcludedInstanceTypes(java.util.Collection)} if you want to override the existing values.
*
*
* @param excludedInstanceTypes
* 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 specify AllowedInstanceTypes
.
*
*
*
* Default: No excluded instance types
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withExcludedInstanceTypes(String... excludedInstanceTypes) {
if (this.excludedInstanceTypes == null) {
setExcludedInstanceTypes(new com.amazonaws.internal.SdkInternalList(excludedInstanceTypes.length));
}
for (String ele : excludedInstanceTypes) {
this.excludedInstanceTypes.add(ele);
}
return this;
}
/**
*
* 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 specify AllowedInstanceTypes
.
*
*
*
* Default: No excluded instance types
*
*
* @param excludedInstanceTypes
* 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 specify AllowedInstanceTypes
.
*
*
*
* Default: No excluded instance types
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withExcludedInstanceTypes(java.util.Collection excludedInstanceTypes) {
setExcludedInstanceTypes(excludedInstanceTypes);
return this;
}
/**
*
* 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
*
*
* @return 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
* @see InstanceGeneration
*/
public java.util.List getInstanceGenerations() {
if (instanceGenerations == null) {
instanceGenerations = new com.amazonaws.internal.SdkInternalList();
}
return instanceGenerations;
}
/**
*
* 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
*
*
* @param instanceGenerations
* 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
* @see InstanceGeneration
*/
public void setInstanceGenerations(java.util.Collection instanceGenerations) {
if (instanceGenerations == null) {
this.instanceGenerations = null;
return;
}
this.instanceGenerations = new com.amazonaws.internal.SdkInternalList(instanceGenerations);
}
/**
*
* 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
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInstanceGenerations(java.util.Collection)} or {@link #withInstanceGenerations(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param instanceGenerations
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceGeneration
*/
public InstanceRequirements withInstanceGenerations(String... instanceGenerations) {
if (this.instanceGenerations == null) {
setInstanceGenerations(new com.amazonaws.internal.SdkInternalList(instanceGenerations.length));
}
for (String ele : instanceGenerations) {
this.instanceGenerations.add(ele);
}
return this;
}
/**
*
* 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
*
*
* @param instanceGenerations
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceGeneration
*/
public InstanceRequirements withInstanceGenerations(java.util.Collection instanceGenerations) {
setInstanceGenerations(instanceGenerations);
return this;
}
/**
*
* 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
*
*
* @param instanceGenerations
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceGeneration
*/
public InstanceRequirements withInstanceGenerations(InstanceGeneration... instanceGenerations) {
com.amazonaws.internal.SdkInternalList instanceGenerationsCopy = new com.amazonaws.internal.SdkInternalList(instanceGenerations.length);
for (InstanceGeneration value : instanceGenerations) {
instanceGenerationsCopy.add(value.toString());
}
if (getInstanceGenerations() == null) {
setInstanceGenerations(instanceGenerationsCopy);
} else {
getInstanceGenerations().addAll(instanceGenerationsCopy);
}
return this;
}
/**
*
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
* .
*
*
*
* Default: 100
*
*
* @param spotMaxPricePercentageOverLowestPrice
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
.
*
*
*
* Default: 100
*/
public void setSpotMaxPricePercentageOverLowestPrice(Integer spotMaxPricePercentageOverLowestPrice) {
this.spotMaxPricePercentageOverLowestPrice = spotMaxPricePercentageOverLowestPrice;
}
/**
*
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
* .
*
*
*
* Default: 100
*
*
* @return [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
.
*
*
*
* Default: 100
*/
public Integer getSpotMaxPricePercentageOverLowestPrice() {
return this.spotMaxPricePercentageOverLowestPrice;
}
/**
*
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
* .
*
*
*
* Default: 100
*
*
* @param spotMaxPricePercentageOverLowestPrice
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
.
*
*
*
* Default: 100
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withSpotMaxPricePercentageOverLowestPrice(Integer spotMaxPricePercentageOverLowestPrice) {
setSpotMaxPricePercentageOverLowestPrice(spotMaxPricePercentageOverLowestPrice);
return this;
}
/**
*
* [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 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.
*
*
*
* Default: 20
*
*
* @param onDemandMaxPricePercentageOverLowestPrice
* [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 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.
*
*
*
* Default: 20
*/
public void setOnDemandMaxPricePercentageOverLowestPrice(Integer onDemandMaxPricePercentageOverLowestPrice) {
this.onDemandMaxPricePercentageOverLowestPrice = onDemandMaxPricePercentageOverLowestPrice;
}
/**
*
* [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 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.
*
*
*
* Default: 20
*
*
* @return [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 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.
*
*
*
* Default: 20
*/
public Integer getOnDemandMaxPricePercentageOverLowestPrice() {
return this.onDemandMaxPricePercentageOverLowestPrice;
}
/**
*
* [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 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.
*
*
*
* Default: 20
*
*
* @param onDemandMaxPricePercentageOverLowestPrice
* [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 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.
*
*
*
* Default: 20
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withOnDemandMaxPricePercentageOverLowestPrice(Integer onDemandMaxPricePercentageOverLowestPrice) {
setOnDemandMaxPricePercentageOverLowestPrice(onDemandMaxPricePercentageOverLowestPrice);
return this;
}
/**
*
* 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
*
*
* @param bareMetal
* 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
* @see BareMetal
*/
public void setBareMetal(String bareMetal) {
this.bareMetal = bareMetal;
}
/**
*
* 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
*
*
* @return 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
* @see BareMetal
*/
public String getBareMetal() {
return this.bareMetal;
}
/**
*
* 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
*
*
* @param bareMetal
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see BareMetal
*/
public InstanceRequirements withBareMetal(String bareMetal) {
setBareMetal(bareMetal);
return this;
}
/**
*
* 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
*
*
* @param bareMetal
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see BareMetal
*/
public InstanceRequirements withBareMetal(BareMetal bareMetal) {
this.bareMetal = bareMetal.toString();
return this;
}
/**
*
* 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
*
*
* @param burstablePerformance
* 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
* @see BurstablePerformance
*/
public void setBurstablePerformance(String burstablePerformance) {
this.burstablePerformance = burstablePerformance;
}
/**
*
* 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
*
*
* @return 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
* @see BurstablePerformance
*/
public String getBurstablePerformance() {
return this.burstablePerformance;
}
/**
*
* 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
*
*
* @param burstablePerformance
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see BurstablePerformance
*/
public InstanceRequirements withBurstablePerformance(String burstablePerformance) {
setBurstablePerformance(burstablePerformance);
return this;
}
/**
*
* 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
*
*
* @param burstablePerformance
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see BurstablePerformance
*/
public InstanceRequirements withBurstablePerformance(BurstablePerformance burstablePerformance) {
this.burstablePerformance = burstablePerformance.toString();
return this;
}
/**
*
* Indicates whether instance types must support hibernation for On-Demand Instances.
*
*
* This parameter is not supported for GetSpotPlacementScores.
*
*
* Default: false
*
*
* @param requireHibernateSupport
* Indicates whether instance types must support hibernation for On-Demand Instances.
*
* This parameter is not supported for GetSpotPlacementScores.
*
*
* Default: false
*/
public void setRequireHibernateSupport(Boolean requireHibernateSupport) {
this.requireHibernateSupport = requireHibernateSupport;
}
/**
*
* Indicates whether instance types must support hibernation for On-Demand Instances.
*
*
* This parameter is not supported for GetSpotPlacementScores.
*
*
* Default: false
*
*
* @return Indicates whether instance types must support hibernation for On-Demand Instances.
*
* This parameter is not supported for GetSpotPlacementScores.
*
*
* Default: false
*/
public Boolean getRequireHibernateSupport() {
return this.requireHibernateSupport;
}
/**
*
* Indicates whether instance types must support hibernation for On-Demand Instances.
*
*
* This parameter is not supported for GetSpotPlacementScores.
*
*
* Default: false
*
*
* @param requireHibernateSupport
* Indicates whether instance types must support hibernation for On-Demand Instances.
*
* This parameter is not supported for GetSpotPlacementScores.
*
*
* Default: false
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withRequireHibernateSupport(Boolean requireHibernateSupport) {
setRequireHibernateSupport(requireHibernateSupport);
return this;
}
/**
*
* Indicates whether instance types must support hibernation for On-Demand Instances.
*
*
* This parameter is not supported for GetSpotPlacementScores.
*
*
* Default: false
*
*
* @return Indicates whether instance types must support hibernation for On-Demand Instances.
*
* This parameter is not supported for GetSpotPlacementScores.
*
*
* Default: false
*/
public Boolean isRequireHibernateSupport() {
return this.requireHibernateSupport;
}
/**
*
* The minimum and maximum number of network interfaces.
*
*
* Default: No minimum or maximum limits
*
*
* @param networkInterfaceCount
* The minimum and maximum number of network interfaces.
*
* Default: No minimum or maximum limits
*/
public void setNetworkInterfaceCount(NetworkInterfaceCount networkInterfaceCount) {
this.networkInterfaceCount = networkInterfaceCount;
}
/**
*
* The minimum and maximum number of network interfaces.
*
*
* Default: No minimum or maximum limits
*
*
* @return The minimum and maximum number of network interfaces.
*
* Default: No minimum or maximum limits
*/
public NetworkInterfaceCount getNetworkInterfaceCount() {
return this.networkInterfaceCount;
}
/**
*
* The minimum and maximum number of network interfaces.
*
*
* Default: No minimum or maximum limits
*
*
* @param networkInterfaceCount
* The minimum and maximum number of network interfaces.
*
* Default: No minimum or maximum limits
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withNetworkInterfaceCount(NetworkInterfaceCount networkInterfaceCount) {
setNetworkInterfaceCount(networkInterfaceCount);
return this;
}
/**
*
* 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
*
*
* @param localStorage
* 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
* @see LocalStorage
*/
public void setLocalStorage(String localStorage) {
this.localStorage = localStorage;
}
/**
*
* 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
*
*
* @return 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
* @see LocalStorage
*/
public String getLocalStorage() {
return this.localStorage;
}
/**
*
* 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
*
*
* @param localStorage
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see LocalStorage
*/
public InstanceRequirements withLocalStorage(String localStorage) {
setLocalStorage(localStorage);
return this;
}
/**
*
* 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
*
*
* @param localStorage
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see LocalStorage
*/
public InstanceRequirements withLocalStorage(LocalStorage localStorage) {
this.localStorage = localStorage.toString();
return this;
}
/**
*
* 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
*
*
* @return 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
* @see LocalStorageType
*/
public java.util.List getLocalStorageTypes() {
if (localStorageTypes == null) {
localStorageTypes = new com.amazonaws.internal.SdkInternalList();
}
return localStorageTypes;
}
/**
*
* 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
*
*
* @param localStorageTypes
* 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
* @see LocalStorageType
*/
public void setLocalStorageTypes(java.util.Collection localStorageTypes) {
if (localStorageTypes == null) {
this.localStorageTypes = null;
return;
}
this.localStorageTypes = new com.amazonaws.internal.SdkInternalList(localStorageTypes);
}
/**
*
* 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
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLocalStorageTypes(java.util.Collection)} or {@link #withLocalStorageTypes(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param localStorageTypes
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see LocalStorageType
*/
public InstanceRequirements withLocalStorageTypes(String... localStorageTypes) {
if (this.localStorageTypes == null) {
setLocalStorageTypes(new com.amazonaws.internal.SdkInternalList(localStorageTypes.length));
}
for (String ele : localStorageTypes) {
this.localStorageTypes.add(ele);
}
return this;
}
/**
*
* 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
*
*
* @param localStorageTypes
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see LocalStorageType
*/
public InstanceRequirements withLocalStorageTypes(java.util.Collection localStorageTypes) {
setLocalStorageTypes(localStorageTypes);
return this;
}
/**
*
* 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
*
*
* @param localStorageTypes
* 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see LocalStorageType
*/
public InstanceRequirements withLocalStorageTypes(LocalStorageType... localStorageTypes) {
com.amazonaws.internal.SdkInternalList localStorageTypesCopy = new com.amazonaws.internal.SdkInternalList(localStorageTypes.length);
for (LocalStorageType value : localStorageTypes) {
localStorageTypesCopy.add(value.toString());
}
if (getLocalStorageTypes() == null) {
setLocalStorageTypes(localStorageTypesCopy);
} else {
getLocalStorageTypes().addAll(localStorageTypesCopy);
}
return this;
}
/**
*
* The minimum and maximum amount of total local storage, in GB.
*
*
* Default: No minimum or maximum limits
*
*
* @param totalLocalStorageGB
* The minimum and maximum amount of total local storage, in GB.
*
* Default: No minimum or maximum limits
*/
public void setTotalLocalStorageGB(TotalLocalStorageGB totalLocalStorageGB) {
this.totalLocalStorageGB = totalLocalStorageGB;
}
/**
*
* The minimum and maximum amount of total local storage, in GB.
*
*
* Default: No minimum or maximum limits
*
*
* @return The minimum and maximum amount of total local storage, in GB.
*
* Default: No minimum or maximum limits
*/
public TotalLocalStorageGB getTotalLocalStorageGB() {
return this.totalLocalStorageGB;
}
/**
*
* The minimum and maximum amount of total local storage, in GB.
*
*
* Default: No minimum or maximum limits
*
*
* @param totalLocalStorageGB
* The minimum and maximum amount of total local storage, in GB.
*
* Default: No minimum or maximum limits
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withTotalLocalStorageGB(TotalLocalStorageGB totalLocalStorageGB) {
setTotalLocalStorageGB(totalLocalStorageGB);
return this;
}
/**
*
* 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
*
*
* @param baselineEbsBandwidthMbps
* 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
*/
public void setBaselineEbsBandwidthMbps(BaselineEbsBandwidthMbps baselineEbsBandwidthMbps) {
this.baselineEbsBandwidthMbps = baselineEbsBandwidthMbps;
}
/**
*
* 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
*
*
* @return 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
*/
public BaselineEbsBandwidthMbps getBaselineEbsBandwidthMbps() {
return this.baselineEbsBandwidthMbps;
}
/**
*
* 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
*
*
* @param baselineEbsBandwidthMbps
* 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
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withBaselineEbsBandwidthMbps(BaselineEbsBandwidthMbps baselineEbsBandwidthMbps) {
setBaselineEbsBandwidthMbps(baselineEbsBandwidthMbps);
return this;
}
/**
*
* The accelerator types that must be on the instance type.
*
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
*
*
* @return The accelerator types that must be on the instance type.
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
* @see AcceleratorType
*/
public java.util.List getAcceleratorTypes() {
if (acceleratorTypes == null) {
acceleratorTypes = new com.amazonaws.internal.SdkInternalList();
}
return acceleratorTypes;
}
/**
*
* The accelerator types that must be on the instance type.
*
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
*
*
* @param acceleratorTypes
* The accelerator types that must be on the instance type.
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
* @see AcceleratorType
*/
public void setAcceleratorTypes(java.util.Collection acceleratorTypes) {
if (acceleratorTypes == null) {
this.acceleratorTypes = null;
return;
}
this.acceleratorTypes = new com.amazonaws.internal.SdkInternalList(acceleratorTypes);
}
/**
*
* The accelerator types that must be on the instance type.
*
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAcceleratorTypes(java.util.Collection)} or {@link #withAcceleratorTypes(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param acceleratorTypes
* The accelerator types that must be on the instance type.
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorType
*/
public InstanceRequirements withAcceleratorTypes(String... acceleratorTypes) {
if (this.acceleratorTypes == null) {
setAcceleratorTypes(new com.amazonaws.internal.SdkInternalList(acceleratorTypes.length));
}
for (String ele : acceleratorTypes) {
this.acceleratorTypes.add(ele);
}
return this;
}
/**
*
* The accelerator types that must be on the instance type.
*
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
*
*
* @param acceleratorTypes
* The accelerator types that must be on the instance type.
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorType
*/
public InstanceRequirements withAcceleratorTypes(java.util.Collection acceleratorTypes) {
setAcceleratorTypes(acceleratorTypes);
return this;
}
/**
*
* The accelerator types that must be on the instance type.
*
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
*
*
* @param acceleratorTypes
* The accelerator types that must be on the instance type.
*
* -
*
* For instance types with GPU accelerators, specify gpu
.
*
*
* -
*
* For instance types with FPGA accelerators, specify fpga
.
*
*
* -
*
* For instance types with inference accelerators, specify inference
.
*
*
*
*
* Default: Any accelerator type
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorType
*/
public InstanceRequirements withAcceleratorTypes(AcceleratorType... acceleratorTypes) {
com.amazonaws.internal.SdkInternalList acceleratorTypesCopy = new com.amazonaws.internal.SdkInternalList(acceleratorTypes.length);
for (AcceleratorType value : acceleratorTypes) {
acceleratorTypesCopy.add(value.toString());
}
if (getAcceleratorTypes() == null) {
setAcceleratorTypes(acceleratorTypesCopy);
} else {
getAcceleratorTypes().addAll(acceleratorTypesCopy);
}
return this;
}
/**
*
* The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an
* instance.
*
*
* To exclude accelerator-enabled instance types, set Max
to 0
.
*
*
* Default: No minimum or maximum limits
*
*
* @param acceleratorCount
* The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on
* an instance.
*
* To exclude accelerator-enabled instance types, set Max
to 0
.
*
*
* Default: No minimum or maximum limits
*/
public void setAcceleratorCount(AcceleratorCount acceleratorCount) {
this.acceleratorCount = acceleratorCount;
}
/**
*
* The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an
* instance.
*
*
* To exclude accelerator-enabled instance types, set Max
to 0
.
*
*
* Default: No minimum or maximum limits
*
*
* @return The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on
* an instance.
*
* To exclude accelerator-enabled instance types, set Max
to 0
.
*
*
* Default: No minimum or maximum limits
*/
public AcceleratorCount getAcceleratorCount() {
return this.acceleratorCount;
}
/**
*
* The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an
* instance.
*
*
* To exclude accelerator-enabled instance types, set Max
to 0
.
*
*
* Default: No minimum or maximum limits
*
*
* @param acceleratorCount
* The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on
* an instance.
*
* To exclude accelerator-enabled instance types, set Max
to 0
.
*
*
* Default: No minimum or maximum limits
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withAcceleratorCount(AcceleratorCount acceleratorCount) {
setAcceleratorCount(acceleratorCount);
return this;
}
/**
*
* Indicates whether instance types must have accelerators by specific manufacturers.
*
*
* -
*
* For instance types with Amazon Web Services 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
*
*
* @return Indicates whether instance types must have accelerators by specific manufacturers.
*
* -
*
* For instance types with Amazon Web Services 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
* @see AcceleratorManufacturer
*/
public java.util.List getAcceleratorManufacturers() {
if (acceleratorManufacturers == null) {
acceleratorManufacturers = new com.amazonaws.internal.SdkInternalList();
}
return acceleratorManufacturers;
}
/**
*
* Indicates whether instance types must have accelerators by specific manufacturers.
*
*
* -
*
* For instance types with Amazon Web Services 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
*
*
* @param acceleratorManufacturers
* Indicates whether instance types must have accelerators by specific manufacturers.
*
* -
*
* For instance types with Amazon Web Services 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
* @see AcceleratorManufacturer
*/
public void setAcceleratorManufacturers(java.util.Collection acceleratorManufacturers) {
if (acceleratorManufacturers == null) {
this.acceleratorManufacturers = null;
return;
}
this.acceleratorManufacturers = new com.amazonaws.internal.SdkInternalList(acceleratorManufacturers);
}
/**
*
* Indicates whether instance types must have accelerators by specific manufacturers.
*
*
* -
*
* For instance types with Amazon Web Services 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
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAcceleratorManufacturers(java.util.Collection)} or
* {@link #withAcceleratorManufacturers(java.util.Collection)} if you want to override the existing values.
*
*
* @param acceleratorManufacturers
* Indicates whether instance types must have accelerators by specific manufacturers.
*
* -
*
* For instance types with Amazon Web Services 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorManufacturer
*/
public InstanceRequirements withAcceleratorManufacturers(String... acceleratorManufacturers) {
if (this.acceleratorManufacturers == null) {
setAcceleratorManufacturers(new com.amazonaws.internal.SdkInternalList(acceleratorManufacturers.length));
}
for (String ele : acceleratorManufacturers) {
this.acceleratorManufacturers.add(ele);
}
return this;
}
/**
*
* Indicates whether instance types must have accelerators by specific manufacturers.
*
*
* -
*
* For instance types with Amazon Web Services 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
*
*
* @param acceleratorManufacturers
* Indicates whether instance types must have accelerators by specific manufacturers.
*
* -
*
* For instance types with Amazon Web Services 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorManufacturer
*/
public InstanceRequirements withAcceleratorManufacturers(java.util.Collection acceleratorManufacturers) {
setAcceleratorManufacturers(acceleratorManufacturers);
return this;
}
/**
*
* Indicates whether instance types must have accelerators by specific manufacturers.
*
*
* -
*
* For instance types with Amazon Web Services 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
*
*
* @param acceleratorManufacturers
* Indicates whether instance types must have accelerators by specific manufacturers.
*
* -
*
* For instance types with Amazon Web Services 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
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorManufacturer
*/
public InstanceRequirements withAcceleratorManufacturers(AcceleratorManufacturer... acceleratorManufacturers) {
com.amazonaws.internal.SdkInternalList acceleratorManufacturersCopy = new com.amazonaws.internal.SdkInternalList(
acceleratorManufacturers.length);
for (AcceleratorManufacturer value : acceleratorManufacturers) {
acceleratorManufacturersCopy.add(value.toString());
}
if (getAcceleratorManufacturers() == null) {
setAcceleratorManufacturers(acceleratorManufacturersCopy);
} else {
getAcceleratorManufacturers().addAll(acceleratorManufacturersCopy);
}
return this;
}
/**
*
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
*
*
* @return 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
* @see AcceleratorName
*/
public java.util.List getAcceleratorNames() {
if (acceleratorNames == null) {
acceleratorNames = new com.amazonaws.internal.SdkInternalList();
}
return acceleratorNames;
}
/**
*
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
*
*
* @param acceleratorNames
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
* @see AcceleratorName
*/
public void setAcceleratorNames(java.util.Collection acceleratorNames) {
if (acceleratorNames == null) {
this.acceleratorNames = null;
return;
}
this.acceleratorNames = new com.amazonaws.internal.SdkInternalList(acceleratorNames);
}
/**
*
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAcceleratorNames(java.util.Collection)} or {@link #withAcceleratorNames(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param acceleratorNames
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorName
*/
public InstanceRequirements withAcceleratorNames(String... acceleratorNames) {
if (this.acceleratorNames == null) {
setAcceleratorNames(new com.amazonaws.internal.SdkInternalList(acceleratorNames.length));
}
for (String ele : acceleratorNames) {
this.acceleratorNames.add(ele);
}
return this;
}
/**
*
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
*
*
* @param acceleratorNames
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorName
*/
public InstanceRequirements withAcceleratorNames(java.util.Collection acceleratorNames) {
setAcceleratorNames(acceleratorNames);
return this;
}
/**
*
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
*
*
* @param acceleratorNames
* 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 Amazon Web Services Inferentia chips, specify inferentia
.
*
*
* -
*
* For instance types with NVIDIA GRID K520 GPUs, specify k520
.
*
*
* -
*
* For instance types with NVIDIA K80 GPUs, specify k80
.
*
*
* -
*
* 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 NVIDIA T4 GPUs, specify t4
.
*
*
* -
*
* For instance types with NVIDIA T4G GPUs, specify t4g
.
*
*
* -
*
* For instance types with Xilinx VU9P FPGAs, specify vu9p
.
*
*
* -
*
* For instance types with NVIDIA V100 GPUs, specify v100
.
*
*
*
*
* Default: Any accelerator
* @return Returns a reference to this object so that method calls can be chained together.
* @see AcceleratorName
*/
public InstanceRequirements withAcceleratorNames(AcceleratorName... acceleratorNames) {
com.amazonaws.internal.SdkInternalList acceleratorNamesCopy = new com.amazonaws.internal.SdkInternalList(acceleratorNames.length);
for (AcceleratorName value : acceleratorNames) {
acceleratorNamesCopy.add(value.toString());
}
if (getAcceleratorNames() == null) {
setAcceleratorNames(acceleratorNamesCopy);
} else {
getAcceleratorNames().addAll(acceleratorNamesCopy);
}
return this;
}
/**
*
* The minimum and maximum amount of total accelerator memory, in MiB.
*
*
* Default: No minimum or maximum limits
*
*
* @param acceleratorTotalMemoryMiB
* The minimum and maximum amount of total accelerator memory, in MiB.
*
* Default: No minimum or maximum limits
*/
public void setAcceleratorTotalMemoryMiB(AcceleratorTotalMemoryMiB acceleratorTotalMemoryMiB) {
this.acceleratorTotalMemoryMiB = acceleratorTotalMemoryMiB;
}
/**
*
* The minimum and maximum amount of total accelerator memory, in MiB.
*
*
* Default: No minimum or maximum limits
*
*
* @return The minimum and maximum amount of total accelerator memory, in MiB.
*
* Default: No minimum or maximum limits
*/
public AcceleratorTotalMemoryMiB getAcceleratorTotalMemoryMiB() {
return this.acceleratorTotalMemoryMiB;
}
/**
*
* The minimum and maximum amount of total accelerator memory, in MiB.
*
*
* Default: No minimum or maximum limits
*
*
* @param acceleratorTotalMemoryMiB
* The minimum and maximum amount of total accelerator memory, in MiB.
*
* Default: No minimum or maximum limits
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withAcceleratorTotalMemoryMiB(AcceleratorTotalMemoryMiB acceleratorTotalMemoryMiB) {
setAcceleratorTotalMemoryMiB(acceleratorTotalMemoryMiB);
return this;
}
/**
*
* The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
*
*
* Default: No minimum or maximum limits
*
*
* @param networkBandwidthGbps
* The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
*
* Default: No minimum or maximum limits
*/
public void setNetworkBandwidthGbps(NetworkBandwidthGbps networkBandwidthGbps) {
this.networkBandwidthGbps = networkBandwidthGbps;
}
/**
*
* The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
*
*
* Default: No minimum or maximum limits
*
*
* @return The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
*
* Default: No minimum or maximum limits
*/
public NetworkBandwidthGbps getNetworkBandwidthGbps() {
return this.networkBandwidthGbps;
}
/**
*
* The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
*
*
* Default: No minimum or maximum limits
*
*
* @param networkBandwidthGbps
* The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).
*
* Default: No minimum or maximum limits
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withNetworkBandwidthGbps(NetworkBandwidthGbps networkBandwidthGbps) {
setNetworkBandwidthGbps(networkBandwidthGbps);
return this;
}
/**
*
* 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 specify ExcludedInstanceTypes
.
*
*
*
* Default: All instance types
*
*
* @return 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 specify ExcludedInstanceTypes
.
*
*
*
* Default: All instance types
*/
public java.util.List getAllowedInstanceTypes() {
if (allowedInstanceTypes == null) {
allowedInstanceTypes = new com.amazonaws.internal.SdkInternalList();
}
return allowedInstanceTypes;
}
/**
*
* 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 specify ExcludedInstanceTypes
.
*
*
*
* Default: All instance types
*
*
* @param allowedInstanceTypes
* 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 specify ExcludedInstanceTypes
.
*
*
*
* Default: All instance types
*/
public void setAllowedInstanceTypes(java.util.Collection allowedInstanceTypes) {
if (allowedInstanceTypes == null) {
this.allowedInstanceTypes = null;
return;
}
this.allowedInstanceTypes = new com.amazonaws.internal.SdkInternalList(allowedInstanceTypes);
}
/**
*
* 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 specify ExcludedInstanceTypes
.
*
*
*
* Default: All instance types
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAllowedInstanceTypes(java.util.Collection)} or {@link #withAllowedInstanceTypes(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param allowedInstanceTypes
* 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 specify ExcludedInstanceTypes
.
*
*
*
* Default: All instance types
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withAllowedInstanceTypes(String... allowedInstanceTypes) {
if (this.allowedInstanceTypes == null) {
setAllowedInstanceTypes(new com.amazonaws.internal.SdkInternalList(allowedInstanceTypes.length));
}
for (String ele : allowedInstanceTypes) {
this.allowedInstanceTypes.add(ele);
}
return this;
}
/**
*
* 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 specify ExcludedInstanceTypes
.
*
*
*
* Default: All instance types
*
*
* @param allowedInstanceTypes
* 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 specify ExcludedInstanceTypes
.
*
*
*
* Default: All instance types
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withAllowedInstanceTypes(java.util.Collection allowedInstanceTypes) {
setAllowedInstanceTypes(allowedInstanceTypes);
return this;
}
/**
*
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
* .
*
*
*
* @param maxSpotPriceAsPercentageOfOptimalOnDemandPrice
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
.
*
*/
public void setMaxSpotPriceAsPercentageOfOptimalOnDemandPrice(Integer maxSpotPriceAsPercentageOfOptimalOnDemandPrice) {
this.maxSpotPriceAsPercentageOfOptimalOnDemandPrice = maxSpotPriceAsPercentageOfOptimalOnDemandPrice;
}
/**
*
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
* .
*
*
*
* @return [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
.
*
*/
public Integer getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice() {
return this.maxSpotPriceAsPercentageOfOptimalOnDemandPrice;
}
/**
*
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
* .
*
*
*
* @param maxSpotPriceAsPercentageOfOptimalOnDemandPrice
* [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 SpotMaxPricePercentageOverLowestPrice
or
* MaxSpotPriceAsPercentageOfOptimalOnDemandPrice
can 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 as 999999
.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public InstanceRequirements withMaxSpotPriceAsPercentageOfOptimalOnDemandPrice(Integer maxSpotPriceAsPercentageOfOptimalOnDemandPrice) {
setMaxSpotPriceAsPercentageOfOptimalOnDemandPrice(maxSpotPriceAsPercentageOfOptimalOnDemandPrice);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getVCpuCount() != null)
sb.append("VCpuCount: ").append(getVCpuCount()).append(",");
if (getMemoryMiB() != null)
sb.append("MemoryMiB: ").append(getMemoryMiB()).append(",");
if (getCpuManufacturers() != null)
sb.append("CpuManufacturers: ").append(getCpuManufacturers()).append(",");
if (getMemoryGiBPerVCpu() != null)
sb.append("MemoryGiBPerVCpu: ").append(getMemoryGiBPerVCpu()).append(",");
if (getExcludedInstanceTypes() != null)
sb.append("ExcludedInstanceTypes: ").append(getExcludedInstanceTypes()).append(",");
if (getInstanceGenerations() != null)
sb.append("InstanceGenerations: ").append(getInstanceGenerations()).append(",");
if (getSpotMaxPricePercentageOverLowestPrice() != null)
sb.append("SpotMaxPricePercentageOverLowestPrice: ").append(getSpotMaxPricePercentageOverLowestPrice()).append(",");
if (getOnDemandMaxPricePercentageOverLowestPrice() != null)
sb.append("OnDemandMaxPricePercentageOverLowestPrice: ").append(getOnDemandMaxPricePercentageOverLowestPrice()).append(",");
if (getBareMetal() != null)
sb.append("BareMetal: ").append(getBareMetal()).append(",");
if (getBurstablePerformance() != null)
sb.append("BurstablePerformance: ").append(getBurstablePerformance()).append(",");
if (getRequireHibernateSupport() != null)
sb.append("RequireHibernateSupport: ").append(getRequireHibernateSupport()).append(",");
if (getNetworkInterfaceCount() != null)
sb.append("NetworkInterfaceCount: ").append(getNetworkInterfaceCount()).append(",");
if (getLocalStorage() != null)
sb.append("LocalStorage: ").append(getLocalStorage()).append(",");
if (getLocalStorageTypes() != null)
sb.append("LocalStorageTypes: ").append(getLocalStorageTypes()).append(",");
if (getTotalLocalStorageGB() != null)
sb.append("TotalLocalStorageGB: ").append(getTotalLocalStorageGB()).append(",");
if (getBaselineEbsBandwidthMbps() != null)
sb.append("BaselineEbsBandwidthMbps: ").append(getBaselineEbsBandwidthMbps()).append(",");
if (getAcceleratorTypes() != null)
sb.append("AcceleratorTypes: ").append(getAcceleratorTypes()).append(",");
if (getAcceleratorCount() != null)
sb.append("AcceleratorCount: ").append(getAcceleratorCount()).append(",");
if (getAcceleratorManufacturers() != null)
sb.append("AcceleratorManufacturers: ").append(getAcceleratorManufacturers()).append(",");
if (getAcceleratorNames() != null)
sb.append("AcceleratorNames: ").append(getAcceleratorNames()).append(",");
if (getAcceleratorTotalMemoryMiB() != null)
sb.append("AcceleratorTotalMemoryMiB: ").append(getAcceleratorTotalMemoryMiB()).append(",");
if (getNetworkBandwidthGbps() != null)
sb.append("NetworkBandwidthGbps: ").append(getNetworkBandwidthGbps()).append(",");
if (getAllowedInstanceTypes() != null)
sb.append("AllowedInstanceTypes: ").append(getAllowedInstanceTypes()).append(",");
if (getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice() != null)
sb.append("MaxSpotPriceAsPercentageOfOptimalOnDemandPrice: ").append(getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof InstanceRequirements == false)
return false;
InstanceRequirements other = (InstanceRequirements) obj;
if (other.getVCpuCount() == null ^ this.getVCpuCount() == null)
return false;
if (other.getVCpuCount() != null && other.getVCpuCount().equals(this.getVCpuCount()) == false)
return false;
if (other.getMemoryMiB() == null ^ this.getMemoryMiB() == null)
return false;
if (other.getMemoryMiB() != null && other.getMemoryMiB().equals(this.getMemoryMiB()) == false)
return false;
if (other.getCpuManufacturers() == null ^ this.getCpuManufacturers() == null)
return false;
if (other.getCpuManufacturers() != null && other.getCpuManufacturers().equals(this.getCpuManufacturers()) == false)
return false;
if (other.getMemoryGiBPerVCpu() == null ^ this.getMemoryGiBPerVCpu() == null)
return false;
if (other.getMemoryGiBPerVCpu() != null && other.getMemoryGiBPerVCpu().equals(this.getMemoryGiBPerVCpu()) == false)
return false;
if (other.getExcludedInstanceTypes() == null ^ this.getExcludedInstanceTypes() == null)
return false;
if (other.getExcludedInstanceTypes() != null && other.getExcludedInstanceTypes().equals(this.getExcludedInstanceTypes()) == false)
return false;
if (other.getInstanceGenerations() == null ^ this.getInstanceGenerations() == null)
return false;
if (other.getInstanceGenerations() != null && other.getInstanceGenerations().equals(this.getInstanceGenerations()) == false)
return false;
if (other.getSpotMaxPricePercentageOverLowestPrice() == null ^ this.getSpotMaxPricePercentageOverLowestPrice() == null)
return false;
if (other.getSpotMaxPricePercentageOverLowestPrice() != null
&& other.getSpotMaxPricePercentageOverLowestPrice().equals(this.getSpotMaxPricePercentageOverLowestPrice()) == false)
return false;
if (other.getOnDemandMaxPricePercentageOverLowestPrice() == null ^ this.getOnDemandMaxPricePercentageOverLowestPrice() == null)
return false;
if (other.getOnDemandMaxPricePercentageOverLowestPrice() != null
&& other.getOnDemandMaxPricePercentageOverLowestPrice().equals(this.getOnDemandMaxPricePercentageOverLowestPrice()) == false)
return false;
if (other.getBareMetal() == null ^ this.getBareMetal() == null)
return false;
if (other.getBareMetal() != null && other.getBareMetal().equals(this.getBareMetal()) == false)
return false;
if (other.getBurstablePerformance() == null ^ this.getBurstablePerformance() == null)
return false;
if (other.getBurstablePerformance() != null && other.getBurstablePerformance().equals(this.getBurstablePerformance()) == false)
return false;
if (other.getRequireHibernateSupport() == null ^ this.getRequireHibernateSupport() == null)
return false;
if (other.getRequireHibernateSupport() != null && other.getRequireHibernateSupport().equals(this.getRequireHibernateSupport()) == false)
return false;
if (other.getNetworkInterfaceCount() == null ^ this.getNetworkInterfaceCount() == null)
return false;
if (other.getNetworkInterfaceCount() != null && other.getNetworkInterfaceCount().equals(this.getNetworkInterfaceCount()) == false)
return false;
if (other.getLocalStorage() == null ^ this.getLocalStorage() == null)
return false;
if (other.getLocalStorage() != null && other.getLocalStorage().equals(this.getLocalStorage()) == false)
return false;
if (other.getLocalStorageTypes() == null ^ this.getLocalStorageTypes() == null)
return false;
if (other.getLocalStorageTypes() != null && other.getLocalStorageTypes().equals(this.getLocalStorageTypes()) == false)
return false;
if (other.getTotalLocalStorageGB() == null ^ this.getTotalLocalStorageGB() == null)
return false;
if (other.getTotalLocalStorageGB() != null && other.getTotalLocalStorageGB().equals(this.getTotalLocalStorageGB()) == false)
return false;
if (other.getBaselineEbsBandwidthMbps() == null ^ this.getBaselineEbsBandwidthMbps() == null)
return false;
if (other.getBaselineEbsBandwidthMbps() != null && other.getBaselineEbsBandwidthMbps().equals(this.getBaselineEbsBandwidthMbps()) == false)
return false;
if (other.getAcceleratorTypes() == null ^ this.getAcceleratorTypes() == null)
return false;
if (other.getAcceleratorTypes() != null && other.getAcceleratorTypes().equals(this.getAcceleratorTypes()) == false)
return false;
if (other.getAcceleratorCount() == null ^ this.getAcceleratorCount() == null)
return false;
if (other.getAcceleratorCount() != null && other.getAcceleratorCount().equals(this.getAcceleratorCount()) == false)
return false;
if (other.getAcceleratorManufacturers() == null ^ this.getAcceleratorManufacturers() == null)
return false;
if (other.getAcceleratorManufacturers() != null && other.getAcceleratorManufacturers().equals(this.getAcceleratorManufacturers()) == false)
return false;
if (other.getAcceleratorNames() == null ^ this.getAcceleratorNames() == null)
return false;
if (other.getAcceleratorNames() != null && other.getAcceleratorNames().equals(this.getAcceleratorNames()) == false)
return false;
if (other.getAcceleratorTotalMemoryMiB() == null ^ this.getAcceleratorTotalMemoryMiB() == null)
return false;
if (other.getAcceleratorTotalMemoryMiB() != null && other.getAcceleratorTotalMemoryMiB().equals(this.getAcceleratorTotalMemoryMiB()) == false)
return false;
if (other.getNetworkBandwidthGbps() == null ^ this.getNetworkBandwidthGbps() == null)
return false;
if (other.getNetworkBandwidthGbps() != null && other.getNetworkBandwidthGbps().equals(this.getNetworkBandwidthGbps()) == false)
return false;
if (other.getAllowedInstanceTypes() == null ^ this.getAllowedInstanceTypes() == null)
return false;
if (other.getAllowedInstanceTypes() != null && other.getAllowedInstanceTypes().equals(this.getAllowedInstanceTypes()) == false)
return false;
if (other.getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice() == null ^ this.getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice() == null)
return false;
if (other.getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice() != null
&& other.getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice().equals(this.getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getVCpuCount() == null) ? 0 : getVCpuCount().hashCode());
hashCode = prime * hashCode + ((getMemoryMiB() == null) ? 0 : getMemoryMiB().hashCode());
hashCode = prime * hashCode + ((getCpuManufacturers() == null) ? 0 : getCpuManufacturers().hashCode());
hashCode = prime * hashCode + ((getMemoryGiBPerVCpu() == null) ? 0 : getMemoryGiBPerVCpu().hashCode());
hashCode = prime * hashCode + ((getExcludedInstanceTypes() == null) ? 0 : getExcludedInstanceTypes().hashCode());
hashCode = prime * hashCode + ((getInstanceGenerations() == null) ? 0 : getInstanceGenerations().hashCode());
hashCode = prime * hashCode + ((getSpotMaxPricePercentageOverLowestPrice() == null) ? 0 : getSpotMaxPricePercentageOverLowestPrice().hashCode());
hashCode = prime * hashCode
+ ((getOnDemandMaxPricePercentageOverLowestPrice() == null) ? 0 : getOnDemandMaxPricePercentageOverLowestPrice().hashCode());
hashCode = prime * hashCode + ((getBareMetal() == null) ? 0 : getBareMetal().hashCode());
hashCode = prime * hashCode + ((getBurstablePerformance() == null) ? 0 : getBurstablePerformance().hashCode());
hashCode = prime * hashCode + ((getRequireHibernateSupport() == null) ? 0 : getRequireHibernateSupport().hashCode());
hashCode = prime * hashCode + ((getNetworkInterfaceCount() == null) ? 0 : getNetworkInterfaceCount().hashCode());
hashCode = prime * hashCode + ((getLocalStorage() == null) ? 0 : getLocalStorage().hashCode());
hashCode = prime * hashCode + ((getLocalStorageTypes() == null) ? 0 : getLocalStorageTypes().hashCode());
hashCode = prime * hashCode + ((getTotalLocalStorageGB() == null) ? 0 : getTotalLocalStorageGB().hashCode());
hashCode = prime * hashCode + ((getBaselineEbsBandwidthMbps() == null) ? 0 : getBaselineEbsBandwidthMbps().hashCode());
hashCode = prime * hashCode + ((getAcceleratorTypes() == null) ? 0 : getAcceleratorTypes().hashCode());
hashCode = prime * hashCode + ((getAcceleratorCount() == null) ? 0 : getAcceleratorCount().hashCode());
hashCode = prime * hashCode + ((getAcceleratorManufacturers() == null) ? 0 : getAcceleratorManufacturers().hashCode());
hashCode = prime * hashCode + ((getAcceleratorNames() == null) ? 0 : getAcceleratorNames().hashCode());
hashCode = prime * hashCode + ((getAcceleratorTotalMemoryMiB() == null) ? 0 : getAcceleratorTotalMemoryMiB().hashCode());
hashCode = prime * hashCode + ((getNetworkBandwidthGbps() == null) ? 0 : getNetworkBandwidthGbps().hashCode());
hashCode = prime * hashCode + ((getAllowedInstanceTypes() == null) ? 0 : getAllowedInstanceTypes().hashCode());
hashCode = prime * hashCode
+ ((getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice() == null) ? 0 : getMaxSpotPriceAsPercentageOfOptimalOnDemandPrice().hashCode());
return hashCode;
}
@Override
public InstanceRequirements clone() {
try {
return (InstanceRequirements) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}