@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class RunInstancesRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<RunInstancesRequest>
NOOP
Constructor and Description |
---|
RunInstancesRequest()
Default constructor for RunInstancesRequest object.
|
RunInstancesRequest(String imageId,
Integer minCount,
Integer maxCount)
Constructs a new RunInstancesRequest object.
|
Modifier and Type | Method and Description |
---|---|
RunInstancesRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
String |
getAdditionalInfo()
Reserved.
|
List<BlockDeviceMapping> |
getBlockDeviceMappings()
The block device mapping entries.
|
CapacityReservationSpecification |
getCapacityReservationSpecification()
Information about the Capacity Reservation targeting option.
|
String |
getClientToken()
Unique, case-sensitive identifier you provide to ensure the idempotency of the request.
|
CpuOptionsRequest |
getCpuOptions()
The CPU options for the instance.
|
CreditSpecificationRequest |
getCreditSpecification()
The credit option for CPU usage of the T2 or T3 instance.
|
Boolean |
getDisableApiTermination()
If you set this parameter to
true , you can't terminate the instance using the Amazon EC2 console,
CLI, or API; otherwise, you can. |
Request<RunInstancesRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
Boolean |
getEbsOptimized()
Indicates whether the instance is optimized for Amazon EBS I/O.
|
List<ElasticGpuSpecification> |
getElasticGpuSpecification()
An elastic GPU to associate with the instance.
|
List<ElasticInferenceAccelerator> |
getElasticInferenceAccelerators()
An elastic inference accelerator to associate with the instance.
|
HibernationOptionsRequest |
getHibernationOptions()
Indicates whether an instance is enabled for hibernation.
|
IamInstanceProfileSpecification |
getIamInstanceProfile()
The IAM instance profile.
|
String |
getImageId()
The ID of the AMI.
|
String |
getInstanceInitiatedShutdownBehavior()
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
|
InstanceMarketOptionsRequest |
getInstanceMarketOptions()
The market (purchasing) option for the instances.
|
String |
getInstanceType()
The instance type.
|
Integer |
getIpv6AddressCount()
[EC2-VPC] The number of IPv6 addresses to associate with the primary network interface.
|
List<InstanceIpv6Address> |
getIpv6Addresses()
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
String |
getKernelId()
The ID of the kernel.
|
String |
getKeyName()
The name of the key pair.
|
LaunchTemplateSpecification |
getLaunchTemplate()
The launch template to use to launch the instances.
|
List<LicenseConfigurationRequest> |
getLicenseSpecifications()
The license configurations.
|
Integer |
getMaxCount()
The maximum number of instances to launch.
|
Integer |
getMinCount()
The minimum number of instances to launch.
|
Boolean |
getMonitoring()
Specifies whether detailed monitoring is enabled for the instance.
|
List<InstanceNetworkInterfaceSpecification> |
getNetworkInterfaces()
The network interfaces to associate with the instance.
|
Placement |
getPlacement()
The placement for the instance.
|
String |
getPrivateIpAddress()
[EC2-VPC] The primary IPv4 address.
|
String |
getRamdiskId()
The ID of the RAM disk to select.
|
List<String> |
getSecurityGroupIds()
The IDs of the security groups.
|
List<String> |
getSecurityGroups()
[EC2-Classic, default VPC] The names of the security groups.
|
String |
getSubnetId()
[EC2-VPC] The ID of the subnet to launch the instance into.
|
List<TagSpecification> |
getTagSpecifications()
The tags to apply to the resources during launch.
|
String |
getUserData()
The user data to make available to the instance.
|
int |
hashCode() |
Boolean |
isDisableApiTermination()
If you set this parameter to
true , you can't terminate the instance using the Amazon EC2 console,
CLI, or API; otherwise, you can. |
Boolean |
isEbsOptimized()
Indicates whether the instance is optimized for Amazon EBS I/O.
|
Boolean |
isMonitoring()
Specifies whether detailed monitoring is enabled for the instance.
|
void |
setAdditionalInfo(String additionalInfo)
Reserved.
|
void |
setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mapping entries.
|
void |
setCapacityReservationSpecification(CapacityReservationSpecification capacityReservationSpecification)
Information about the Capacity Reservation targeting option.
|
void |
setClientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request.
|
void |
setCpuOptions(CpuOptionsRequest cpuOptions)
The CPU options for the instance.
|
void |
setCreditSpecification(CreditSpecificationRequest creditSpecification)
The credit option for CPU usage of the T2 or T3 instance.
|
void |
setDisableApiTermination(Boolean disableApiTermination)
If you set this parameter to
true , you can't terminate the instance using the Amazon EC2 console,
CLI, or API; otherwise, you can. |
void |
setEbsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for Amazon EBS I/O.
|
void |
setElasticGpuSpecification(Collection<ElasticGpuSpecification> elasticGpuSpecification)
An elastic GPU to associate with the instance.
|
void |
setElasticInferenceAccelerators(Collection<ElasticInferenceAccelerator> elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance.
|
void |
setHibernationOptions(HibernationOptionsRequest hibernationOptions)
Indicates whether an instance is enabled for hibernation.
|
void |
setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.
|
void |
setImageId(String imageId)
The ID of the AMI.
|
void |
setInstanceInitiatedShutdownBehavior(ShutdownBehavior instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
|
void |
setInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
|
void |
setInstanceMarketOptions(InstanceMarketOptionsRequest instanceMarketOptions)
The market (purchasing) option for the instances.
|
void |
setInstanceType(InstanceType instanceType)
The instance type.
|
void |
setInstanceType(String instanceType)
The instance type.
|
void |
setIpv6AddressCount(Integer ipv6AddressCount)
[EC2-VPC] The number of IPv6 addresses to associate with the primary network interface.
|
void |
setIpv6Addresses(Collection<InstanceIpv6Address> ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
void |
setKernelId(String kernelId)
The ID of the kernel.
|
void |
setKeyName(String keyName)
The name of the key pair.
|
void |
setLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use to launch the instances.
|
void |
setLicenseSpecifications(Collection<LicenseConfigurationRequest> licenseSpecifications)
The license configurations.
|
void |
setMaxCount(Integer maxCount)
The maximum number of instances to launch.
|
void |
setMinCount(Integer minCount)
The minimum number of instances to launch.
|
void |
setMonitoring(Boolean monitoring)
Specifies whether detailed monitoring is enabled for the instance.
|
void |
setNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
The network interfaces to associate with the instance.
|
void |
setPlacement(Placement placement)
The placement for the instance.
|
void |
setPrivateIpAddress(String privateIpAddress)
[EC2-VPC] The primary IPv4 address.
|
void |
setRamdiskId(String ramdiskId)
The ID of the RAM disk to select.
|
void |
setSecurityGroupIds(Collection<String> securityGroupIds)
The IDs of the security groups.
|
void |
setSecurityGroups(Collection<String> securityGroups)
[EC2-Classic, default VPC] The names of the security groups.
|
void |
setSubnetId(String subnetId)
[EC2-VPC] The ID of the subnet to launch the instance into.
|
void |
setTagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the resources during launch.
|
void |
setUserData(String userData)
The user data to make available to the instance.
|
String |
toString()
Returns a string representation of this object.
|
RunInstancesRequest |
withAdditionalInfo(String additionalInfo)
Reserved.
|
RunInstancesRequest |
withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
The block device mapping entries.
|
RunInstancesRequest |
withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mapping entries.
|
RunInstancesRequest |
withCapacityReservationSpecification(CapacityReservationSpecification capacityReservationSpecification)
Information about the Capacity Reservation targeting option.
|
RunInstancesRequest |
withClientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request.
|
RunInstancesRequest |
withCpuOptions(CpuOptionsRequest cpuOptions)
The CPU options for the instance.
|
RunInstancesRequest |
withCreditSpecification(CreditSpecificationRequest creditSpecification)
The credit option for CPU usage of the T2 or T3 instance.
|
RunInstancesRequest |
withDisableApiTermination(Boolean disableApiTermination)
If you set this parameter to
true , you can't terminate the instance using the Amazon EC2 console,
CLI, or API; otherwise, you can. |
RunInstancesRequest |
withEbsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for Amazon EBS I/O.
|
RunInstancesRequest |
withElasticGpuSpecification(Collection<ElasticGpuSpecification> elasticGpuSpecification)
An elastic GPU to associate with the instance.
|
RunInstancesRequest |
withElasticGpuSpecification(ElasticGpuSpecification... elasticGpuSpecification)
An elastic GPU to associate with the instance.
|
RunInstancesRequest |
withElasticInferenceAccelerators(Collection<ElasticInferenceAccelerator> elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance.
|
RunInstancesRequest |
withElasticInferenceAccelerators(ElasticInferenceAccelerator... elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance.
|
RunInstancesRequest |
withHibernationOptions(HibernationOptionsRequest hibernationOptions)
Indicates whether an instance is enabled for hibernation.
|
RunInstancesRequest |
withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.
|
RunInstancesRequest |
withImageId(String imageId)
The ID of the AMI.
|
RunInstancesRequest |
withInstanceInitiatedShutdownBehavior(ShutdownBehavior instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
|
RunInstancesRequest |
withInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
|
RunInstancesRequest |
withInstanceMarketOptions(InstanceMarketOptionsRequest instanceMarketOptions)
The market (purchasing) option for the instances.
|
RunInstancesRequest |
withInstanceType(InstanceType instanceType)
The instance type.
|
RunInstancesRequest |
withInstanceType(String instanceType)
The instance type.
|
RunInstancesRequest |
withIpv6AddressCount(Integer ipv6AddressCount)
[EC2-VPC] The number of IPv6 addresses to associate with the primary network interface.
|
RunInstancesRequest |
withIpv6Addresses(Collection<InstanceIpv6Address> ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
RunInstancesRequest |
withIpv6Addresses(InstanceIpv6Address... ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
RunInstancesRequest |
withKernelId(String kernelId)
The ID of the kernel.
|
RunInstancesRequest |
withKeyName(String keyName)
The name of the key pair.
|
RunInstancesRequest |
withLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use to launch the instances.
|
RunInstancesRequest |
withLicenseSpecifications(Collection<LicenseConfigurationRequest> licenseSpecifications)
The license configurations.
|
RunInstancesRequest |
withLicenseSpecifications(LicenseConfigurationRequest... licenseSpecifications)
The license configurations.
|
RunInstancesRequest |
withMaxCount(Integer maxCount)
The maximum number of instances to launch.
|
RunInstancesRequest |
withMinCount(Integer minCount)
The minimum number of instances to launch.
|
RunInstancesRequest |
withMonitoring(Boolean monitoring)
Specifies whether detailed monitoring is enabled for the instance.
|
RunInstancesRequest |
withNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
The network interfaces to associate with the instance.
|
RunInstancesRequest |
withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
The network interfaces to associate with the instance.
|
RunInstancesRequest |
withPlacement(Placement placement)
The placement for the instance.
|
RunInstancesRequest |
withPrivateIpAddress(String privateIpAddress)
[EC2-VPC] The primary IPv4 address.
|
RunInstancesRequest |
withRamdiskId(String ramdiskId)
The ID of the RAM disk to select.
|
RunInstancesRequest |
withSecurityGroupIds(Collection<String> securityGroupIds)
The IDs of the security groups.
|
RunInstancesRequest |
withSecurityGroupIds(String... securityGroupIds)
The IDs of the security groups.
|
RunInstancesRequest |
withSecurityGroups(Collection<String> securityGroups)
[EC2-Classic, default VPC] The names of the security groups.
|
RunInstancesRequest |
withSecurityGroups(String... securityGroups)
[EC2-Classic, default VPC] The names of the security groups.
|
RunInstancesRequest |
withSubnetId(String subnetId)
[EC2-VPC] The ID of the subnet to launch the instance into.
|
RunInstancesRequest |
withTagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the resources during launch.
|
RunInstancesRequest |
withTagSpecifications(TagSpecification... tagSpecifications)
The tags to apply to the resources during launch.
|
RunInstancesRequest |
withUserData(String userData)
The user data to make available to the instance.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public RunInstancesRequest()
public RunInstancesRequest(String imageId, Integer minCount, Integer maxCount)
imageId
- The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch
template.minCount
- The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2
can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
maxCount
- The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the
target Availability Zone, Amazon EC2 launches the largest possible number of instances above
MinCount
.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
public List<BlockDeviceMapping> getBlockDeviceMappings()
The block device mapping entries.
public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mapping entries.
blockDeviceMappings
- The block device mapping entries.public RunInstancesRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
The block device mapping entries.
NOTE: This method appends the values to the existing list (if any). Use
setBlockDeviceMappings(java.util.Collection)
or withBlockDeviceMappings(java.util.Collection)
if you want to override the existing values.
blockDeviceMappings
- The block device mapping entries.public RunInstancesRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mapping entries.
blockDeviceMappings
- The block device mapping entries.public void setImageId(String imageId)
The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
imageId
- The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch
template.public String getImageId()
The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
public RunInstancesRequest withImageId(String imageId)
The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
imageId
- The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch
template.public void setInstanceType(String instanceType)
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default: m1.small
instanceType
- The instance type. For more information, see Instance Types in the
Amazon Elastic Compute Cloud User Guide.
Default: m1.small
InstanceType
public String getInstanceType()
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default: m1.small
Default: m1.small
InstanceType
public RunInstancesRequest withInstanceType(String instanceType)
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default: m1.small
instanceType
- The instance type. For more information, see Instance Types in the
Amazon Elastic Compute Cloud User Guide.
Default: m1.small
InstanceType
public void setInstanceType(InstanceType instanceType)
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default: m1.small
instanceType
- The instance type. For more information, see Instance Types in the
Amazon Elastic Compute Cloud User Guide.
Default: m1.small
InstanceType
public RunInstancesRequest withInstanceType(InstanceType instanceType)
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default: m1.small
instanceType
- The instance type. For more information, see Instance Types in the
Amazon Elastic Compute Cloud User Guide.
Default: m1.small
InstanceType
public void setIpv6AddressCount(Integer ipv6AddressCount)
[EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6AddressCount
- [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses
the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign
specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum
number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
public Integer getIpv6AddressCount()
[EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
You cannot specify this option and the network interfaces option in the same request.
public RunInstancesRequest withIpv6AddressCount(Integer ipv6AddressCount)
[EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6AddressCount
- [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses
the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign
specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum
number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
public List<InstanceIpv6Address> getIpv6Addresses()
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
You cannot specify this option and the network interfaces option in the same request.
public void setIpv6Addresses(Collection<InstanceIpv6Address> ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6Addresses
- [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
You cannot specify this option and the option to assign a number of IPv6 addresses in the same request.
You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
public RunInstancesRequest withIpv6Addresses(InstanceIpv6Address... ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
NOTE: This method appends the values to the existing list (if any). Use
setIpv6Addresses(java.util.Collection)
or withIpv6Addresses(java.util.Collection)
if you want
to override the existing values.
ipv6Addresses
- [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
You cannot specify this option and the option to assign a number of IPv6 addresses in the same request.
You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
public RunInstancesRequest withIpv6Addresses(Collection<InstanceIpv6Address> ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6Addresses
- [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
You cannot specify this option and the option to assign a number of IPv6 addresses in the same request.
You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
public void setKernelId(String kernelId)
The ID of the kernel.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
kernelId
- The ID of the kernel. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
public String getKernelId()
The ID of the kernel.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
public RunInstancesRequest withKernelId(String kernelId)
The ID of the kernel.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
kernelId
- The ID of the kernel. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
public void setKeyName(String keyName)
The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
keyName
- The name of the key pair. You can create a key pair using CreateKeyPair or
ImportKeyPair.<
/p> If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
public String getKeyName()
The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
public RunInstancesRequest withKeyName(String keyName)
The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
keyName
- The name of the key pair. You can create a key pair using CreateKeyPair or
ImportKeyPair.<
/p> If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
public void setMaxCount(Integer maxCount)
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target
Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount
.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
maxCount
- The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the
target Availability Zone, Amazon EC2 launches the largest possible number of instances above
MinCount
.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
public Integer getMaxCount()
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target
Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount
.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
MinCount
.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
public RunInstancesRequest withMaxCount(Integer maxCount)
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target
Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount
.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
maxCount
- The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the
target Availability Zone, Amazon EC2 launches the largest possible number of instances above
MinCount
.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
public void setMinCount(Integer minCount)
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
minCount
- The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2
can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
public Integer getMinCount()
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
public RunInstancesRequest withMinCount(Integer minCount)
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
minCount
- The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2
can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
public void setMonitoring(Boolean monitoring)
Specifies whether detailed monitoring is enabled for the instance.
monitoring
- Specifies whether detailed monitoring is enabled for the instance.public Boolean getMonitoring()
Specifies whether detailed monitoring is enabled for the instance.
public RunInstancesRequest withMonitoring(Boolean monitoring)
Specifies whether detailed monitoring is enabled for the instance.
monitoring
- Specifies whether detailed monitoring is enabled for the instance.public Boolean isMonitoring()
Specifies whether detailed monitoring is enabled for the instance.
public void setPlacement(Placement placement)
The placement for the instance.
placement
- The placement for the instance.public Placement getPlacement()
The placement for the instance.
public RunInstancesRequest withPlacement(Placement placement)
The placement for the instance.
placement
- The placement for the instance.public void setRamdiskId(String ramdiskId)
The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the AWS Resource Center and search for the kernel ID.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
ramdiskId
- The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel
requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go
to the AWS Resource Center and search for the kernel ID. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
public String getRamdiskId()
The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the AWS Resource Center and search for the kernel ID.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
public RunInstancesRequest withRamdiskId(String ramdiskId)
The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the AWS Resource Center and search for the kernel ID.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
ramdiskId
- The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel
requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go
to the AWS Resource Center and search for the kernel ID. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide.
public List<String> getSecurityGroupIds()
The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
If you specify a network interface, you must specify any security groups as part of the network interface.
public void setSecurityGroupIds(Collection<String> securityGroupIds)
The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
securityGroupIds
- The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
public RunInstancesRequest withSecurityGroupIds(String... securityGroupIds)
The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
NOTE: This method appends the values to the existing list (if any). Use
setSecurityGroupIds(java.util.Collection)
or withSecurityGroupIds(java.util.Collection)
if you
want to override the existing values.
securityGroupIds
- The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
public RunInstancesRequest withSecurityGroupIds(Collection<String> securityGroupIds)
The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
securityGroupIds
- The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
public List<String> getSecurityGroups()
[EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
public void setSecurityGroups(Collection<String> securityGroups)
[EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
securityGroups
- [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security
group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
public RunInstancesRequest withSecurityGroups(String... securityGroups)
[EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
NOTE: This method appends the values to the existing list (if any). Use
setSecurityGroups(java.util.Collection)
or withSecurityGroups(java.util.Collection)
if you want
to override the existing values.
securityGroups
- [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security
group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
public RunInstancesRequest withSecurityGroups(Collection<String> securityGroups)
[EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
securityGroups
- [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security
group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
public void setSubnetId(String subnetId)
[EC2-VPC] The ID of the subnet to launch the instance into.
You cannot specify this option and the network interfaces option in the same request.
subnetId
- [EC2-VPC] The ID of the subnet to launch the instance into.
You cannot specify this option and the network interfaces option in the same request.
public String getSubnetId()
[EC2-VPC] The ID of the subnet to launch the instance into.
You cannot specify this option and the network interfaces option in the same request.
You cannot specify this option and the network interfaces option in the same request.
public RunInstancesRequest withSubnetId(String subnetId)
[EC2-VPC] The ID of the subnet to launch the instance into.
You cannot specify this option and the network interfaces option in the same request.
subnetId
- [EC2-VPC] The ID of the subnet to launch the instance into.
You cannot specify this option and the network interfaces option in the same request.
public void setUserData(String userData)
The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.
userData
- The user data to make available to the instance. For more information, see Running Commands on Your Linux
Instance at Launch (Linux) and Adding User Data (Windows). If you are using a command line tool, base64-encoding is performed for
you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is
limited to 16 KB.public String getUserData()
The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.
public RunInstancesRequest withUserData(String userData)
The user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.
userData
- The user data to make available to the instance. For more information, see Running Commands on Your Linux
Instance at Launch (Linux) and Adding User Data (Windows). If you are using a command line tool, base64-encoding is performed for
you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is
limited to 16 KB.public void setAdditionalInfo(String additionalInfo)
Reserved.
additionalInfo
- Reserved.public String getAdditionalInfo()
Reserved.
public RunInstancesRequest withAdditionalInfo(String additionalInfo)
Reserved.
additionalInfo
- Reserved.public void setClientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
clientToken
- Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more
information, see Ensuring
Idempotency.
Constraints: Maximum 64 ASCII characters
public String getClientToken()
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
Constraints: Maximum 64 ASCII characters
public RunInstancesRequest withClientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
clientToken
- Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more
information, see Ensuring
Idempotency.
Constraints: Maximum 64 ASCII characters
public void setDisableApiTermination(Boolean disableApiTermination)
If you set this parameter to true
, you can't terminate the instance using the Amazon EC2 console,
CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
to
terminate
, you can terminate the instance by running the shutdown command from the instance.
Default: false
disableApiTermination
- If you set this parameter to true
, you can't terminate the instance using the Amazon EC2
console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
to
terminate
, you can terminate the instance by running the shutdown command from the
instance.
Default: false
public Boolean getDisableApiTermination()
If you set this parameter to true
, you can't terminate the instance using the Amazon EC2 console,
CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
to
terminate
, you can terminate the instance by running the shutdown command from the instance.
Default: false
true
, you can't terminate the instance using the Amazon EC2
console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
to
terminate
, you can terminate the instance by running the shutdown command from the
instance.
Default: false
public RunInstancesRequest withDisableApiTermination(Boolean disableApiTermination)
If you set this parameter to true
, you can't terminate the instance using the Amazon EC2 console,
CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
to
terminate
, you can terminate the instance by running the shutdown command from the instance.
Default: false
disableApiTermination
- If you set this parameter to true
, you can't terminate the instance using the Amazon EC2
console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
to
terminate
, you can terminate the instance by running the shutdown command from the
instance.
Default: false
public Boolean isDisableApiTermination()
If you set this parameter to true
, you can't terminate the instance using the Amazon EC2 console,
CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
to
terminate
, you can terminate the instance by running the shutdown command from the instance.
Default: false
true
, you can't terminate the instance using the Amazon EC2
console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
to
terminate
, you can terminate the instance by running the shutdown command from the
instance.
Default: false
public void setEbsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default: false
ebsOptimized
- Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated
throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O
performance. This optimization isn't available with all instance types. Additional usage charges apply
when using an EBS-optimized instance.
Default: false
public Boolean getEbsOptimized()
Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default: false
Default: false
public RunInstancesRequest withEbsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default: false
ebsOptimized
- Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated
throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O
performance. This optimization isn't available with all instance types. Additional usage charges apply
when using an EBS-optimized instance.
Default: false
public Boolean isEbsOptimized()
Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default: false
Default: false
public void setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.
iamInstanceProfile
- The IAM instance profile.public IamInstanceProfileSpecification getIamInstanceProfile()
The IAM instance profile.
public RunInstancesRequest withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.
iamInstanceProfile
- The IAM instance profile.public void setInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
instanceInitiatedShutdownBehavior
- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
Default: stop
ShutdownBehavior
public String getInstanceInitiatedShutdownBehavior()
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
Default: stop
ShutdownBehavior
public RunInstancesRequest withInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
instanceInitiatedShutdownBehavior
- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
Default: stop
ShutdownBehavior
public void setInstanceInitiatedShutdownBehavior(ShutdownBehavior instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
instanceInitiatedShutdownBehavior
- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
Default: stop
ShutdownBehavior
public RunInstancesRequest withInstanceInitiatedShutdownBehavior(ShutdownBehavior instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
instanceInitiatedShutdownBehavior
- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
Default: stop
ShutdownBehavior
public List<InstanceNetworkInterfaceSpecification> getNetworkInterfaces()
The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups as part of the network interface.
public void setNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups as part of the network interface.
networkInterfaces
- The network interfaces to associate with the instance. If you specify a network interface, you must
specify any security groups as part of the network interface.public RunInstancesRequest withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups as part of the network interface.
NOTE: This method appends the values to the existing list (if any). Use
setNetworkInterfaces(java.util.Collection)
or withNetworkInterfaces(java.util.Collection)
if
you want to override the existing values.
networkInterfaces
- The network interfaces to associate with the instance. If you specify a network interface, you must
specify any security groups as part of the network interface.public RunInstancesRequest withNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups as part of the network interface.
networkInterfaces
- The network interfaces to associate with the instance. If you specify a network interface, you must
specify any security groups as part of the network interface.public void setPrivateIpAddress(String privateIpAddress)
[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
You cannot specify this option and the network interfaces option in the same request.
privateIpAddress
- [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the
subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
You cannot specify this option and the network interfaces option in the same request.
public String getPrivateIpAddress()
[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
You cannot specify this option and the network interfaces option in the same request.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
You cannot specify this option and the network interfaces option in the same request.
public RunInstancesRequest withPrivateIpAddress(String privateIpAddress)
[EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
You cannot specify this option and the network interfaces option in the same request.
privateIpAddress
- [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the
subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
You cannot specify this option and the network interfaces option in the same request.
public List<ElasticGpuSpecification> getElasticGpuSpecification()
An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon Elastic Compute Cloud User Guide.
public void setElasticGpuSpecification(Collection<ElasticGpuSpecification> elasticGpuSpecification)
An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon Elastic Compute Cloud User Guide.
elasticGpuSpecification
- An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to
your Windows instance to accelerate the graphics performance of your applications. For more information,
see Amazon EC2
Elastic GPUs in the Amazon Elastic Compute Cloud User Guide.public RunInstancesRequest withElasticGpuSpecification(ElasticGpuSpecification... elasticGpuSpecification)
An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon Elastic Compute Cloud User Guide.
NOTE: This method appends the values to the existing list (if any). Use
setElasticGpuSpecification(java.util.Collection)
or
withElasticGpuSpecification(java.util.Collection)
if you want to override the existing values.
elasticGpuSpecification
- An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to
your Windows instance to accelerate the graphics performance of your applications. For more information,
see Amazon EC2
Elastic GPUs in the Amazon Elastic Compute Cloud User Guide.public RunInstancesRequest withElasticGpuSpecification(Collection<ElasticGpuSpecification> elasticGpuSpecification)
An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon Elastic Compute Cloud User Guide.
elasticGpuSpecification
- An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to
your Windows instance to accelerate the graphics performance of your applications. For more information,
see Amazon EC2
Elastic GPUs in the Amazon Elastic Compute Cloud User Guide.public List<ElasticInferenceAccelerator> getElasticInferenceAccelerators()
An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
public void setElasticInferenceAccelerators(Collection<ElasticInferenceAccelerator> elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
elasticInferenceAccelerators
- An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a
resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference
workloads.public RunInstancesRequest withElasticInferenceAccelerators(ElasticInferenceAccelerator... elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
NOTE: This method appends the values to the existing list (if any). Use
setElasticInferenceAccelerators(java.util.Collection)
or
withElasticInferenceAccelerators(java.util.Collection)
if you want to override the existing values.
elasticInferenceAccelerators
- An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a
resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference
workloads.public RunInstancesRequest withElasticInferenceAccelerators(Collection<ElasticInferenceAccelerator> elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
elasticInferenceAccelerators
- An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a
resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference
workloads.public List<TagSpecification> getTagSpecifications()
The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.
public void setTagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.
tagSpecifications
- The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The
specified tags are applied to all instances or volumes that are created during launch. To tag a resource
after it has been created, see CreateTags.public RunInstancesRequest withTagSpecifications(TagSpecification... tagSpecifications)
The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.
NOTE: This method appends the values to the existing list (if any). Use
setTagSpecifications(java.util.Collection)
or withTagSpecifications(java.util.Collection)
if
you want to override the existing values.
tagSpecifications
- The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The
specified tags are applied to all instances or volumes that are created during launch. To tag a resource
after it has been created, see CreateTags.public RunInstancesRequest withTagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.
tagSpecifications
- The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The
specified tags are applied to all instances or volumes that are created during launch. To tag a resource
after it has been created, see CreateTags.public void setLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.
launchTemplate
- The launch template to use to launch the instances. Any parameters that you specify in RunInstances
override the same parameters in the launch template. You can specify either the name or ID of a launch
template, but not both.public LaunchTemplateSpecification getLaunchTemplate()
The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.
public RunInstancesRequest withLaunchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.
launchTemplate
- The launch template to use to launch the instances. Any parameters that you specify in RunInstances
override the same parameters in the launch template. You can specify either the name or ID of a launch
template, but not both.public void setInstanceMarketOptions(InstanceMarketOptionsRequest instanceMarketOptions)
The market (purchasing) option for the instances.
For RunInstances, persistent Spot Instance requests are only supported when
InstanceInterruptionBehavior is set to either hibernate
or stop
.
instanceMarketOptions
- The market (purchasing) option for the instances.
For RunInstances, persistent Spot Instance requests are only supported when
InstanceInterruptionBehavior is set to either hibernate
or stop
.
public InstanceMarketOptionsRequest getInstanceMarketOptions()
The market (purchasing) option for the instances.
For RunInstances, persistent Spot Instance requests are only supported when
InstanceInterruptionBehavior is set to either hibernate
or stop
.
For RunInstances, persistent Spot Instance requests are only supported when
InstanceInterruptionBehavior is set to either hibernate
or stop
.
public RunInstancesRequest withInstanceMarketOptions(InstanceMarketOptionsRequest instanceMarketOptions)
The market (purchasing) option for the instances.
For RunInstances, persistent Spot Instance requests are only supported when
InstanceInterruptionBehavior is set to either hibernate
or stop
.
instanceMarketOptions
- The market (purchasing) option for the instances.
For RunInstances, persistent Spot Instance requests are only supported when
InstanceInterruptionBehavior is set to either hibernate
or stop
.
public void setCreditSpecification(CreditSpecificationRequest creditSpecification)
The credit option for CPU usage of the T2 or T3 instance. Valid values are standard
and
unlimited
. To change this attribute after launch, use
ModifyInstanceCreditSpecification. For more information, see Burstable
Performance Instances in the Amazon Elastic Compute Cloud User Guide.
Default: standard
(T2 instances) or unlimited
(T3 instances)
creditSpecification
- The credit option for CPU usage of the T2 or T3 instance. Valid values are standard
and
unlimited
. To change this attribute after launch, use
ModifyInstanceCreditSpecification. For more information, see Burstable
Performance Instances in the Amazon Elastic Compute Cloud User Guide.
Default: standard
(T2 instances) or unlimited
(T3 instances)
public CreditSpecificationRequest getCreditSpecification()
The credit option for CPU usage of the T2 or T3 instance. Valid values are standard
and
unlimited
. To change this attribute after launch, use
ModifyInstanceCreditSpecification. For more information, see Burstable
Performance Instances in the Amazon Elastic Compute Cloud User Guide.
Default: standard
(T2 instances) or unlimited
(T3 instances)
standard
and
unlimited
. To change this attribute after launch, use
ModifyInstanceCreditSpecification. For more information, see Burstable
Performance Instances in the Amazon Elastic Compute Cloud User Guide.
Default: standard
(T2 instances) or unlimited
(T3 instances)
public RunInstancesRequest withCreditSpecification(CreditSpecificationRequest creditSpecification)
The credit option for CPU usage of the T2 or T3 instance. Valid values are standard
and
unlimited
. To change this attribute after launch, use
ModifyInstanceCreditSpecification. For more information, see Burstable
Performance Instances in the Amazon Elastic Compute Cloud User Guide.
Default: standard
(T2 instances) or unlimited
(T3 instances)
creditSpecification
- The credit option for CPU usage of the T2 or T3 instance. Valid values are standard
and
unlimited
. To change this attribute after launch, use
ModifyInstanceCreditSpecification. For more information, see Burstable
Performance Instances in the Amazon Elastic Compute Cloud User Guide.
Default: standard
(T2 instances) or unlimited
(T3 instances)
public void setCpuOptions(CpuOptionsRequest cpuOptions)
The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.
cpuOptions
- The CPU options for the instance. For more information, see Optimizing CPU
Options in the Amazon Elastic Compute Cloud User Guide.public CpuOptionsRequest getCpuOptions()
The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.
public RunInstancesRequest withCpuOptions(CpuOptionsRequest cpuOptions)
The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.
cpuOptions
- The CPU options for the instance. For more information, see Optimizing CPU
Options in the Amazon Elastic Compute Cloud User Guide.public void setCapacityReservationSpecification(CapacityReservationSpecification capacityReservationSpecification)
Information about the Capacity Reservation targeting option. If you do not specify this parameter, the instance's
Capacity Reservation preference defaults to open
, which enables it to run in any open Capacity
Reservation that has matching attributes (instance type, platform, Availability Zone).
capacityReservationSpecification
- Information about the Capacity Reservation targeting option. If you do not specify this parameter, the
instance's Capacity Reservation preference defaults to open
, which enables it to run in any
open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).public CapacityReservationSpecification getCapacityReservationSpecification()
Information about the Capacity Reservation targeting option. If you do not specify this parameter, the instance's
Capacity Reservation preference defaults to open
, which enables it to run in any open Capacity
Reservation that has matching attributes (instance type, platform, Availability Zone).
open
, which enables it to run in any
open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).public RunInstancesRequest withCapacityReservationSpecification(CapacityReservationSpecification capacityReservationSpecification)
Information about the Capacity Reservation targeting option. If you do not specify this parameter, the instance's
Capacity Reservation preference defaults to open
, which enables it to run in any open Capacity
Reservation that has matching attributes (instance type, platform, Availability Zone).
capacityReservationSpecification
- Information about the Capacity Reservation targeting option. If you do not specify this parameter, the
instance's Capacity Reservation preference defaults to open
, which enables it to run in any
open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).public void setHibernationOptions(HibernationOptionsRequest hibernationOptions)
Indicates whether an instance is enabled for hibernation. For more information, see Hibernate Your Instance in the Amazon Elastic Compute Cloud User Guide.
hibernationOptions
- Indicates whether an instance is enabled for hibernation. For more information, see Hibernate Your Instance in
the Amazon Elastic Compute Cloud User Guide.public HibernationOptionsRequest getHibernationOptions()
Indicates whether an instance is enabled for hibernation. For more information, see Hibernate Your Instance in the Amazon Elastic Compute Cloud User Guide.
public RunInstancesRequest withHibernationOptions(HibernationOptionsRequest hibernationOptions)
Indicates whether an instance is enabled for hibernation. For more information, see Hibernate Your Instance in the Amazon Elastic Compute Cloud User Guide.
hibernationOptions
- Indicates whether an instance is enabled for hibernation. For more information, see Hibernate Your Instance in
the Amazon Elastic Compute Cloud User Guide.public List<LicenseConfigurationRequest> getLicenseSpecifications()
The license configurations.
public void setLicenseSpecifications(Collection<LicenseConfigurationRequest> licenseSpecifications)
The license configurations.
licenseSpecifications
- The license configurations.public RunInstancesRequest withLicenseSpecifications(LicenseConfigurationRequest... licenseSpecifications)
The license configurations.
NOTE: This method appends the values to the existing list (if any). Use
setLicenseSpecifications(java.util.Collection)
or
withLicenseSpecifications(java.util.Collection)
if you want to override the existing values.
licenseSpecifications
- The license configurations.public RunInstancesRequest withLicenseSpecifications(Collection<LicenseConfigurationRequest> licenseSpecifications)
The license configurations.
licenseSpecifications
- The license configurations.public Request<RunInstancesRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<RunInstancesRequest>
public String toString()
toString
in class Object
Object.toString()
public RunInstancesRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.