Class RunInstancesRequest
- All Implemented Interfaces:
ReadLimitInfo
,DryRunSupportedRequest<RunInstancesRequest>
,Serializable
,Cloneable
Contains the parameters for RunInstances.
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for RunInstancesRequest object.RunInstancesRequest
(String imageId, Integer minCount, Integer maxCount) Constructs a new RunInstancesRequest object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a shallow clone of this request.boolean
Reserved.The block device mapping.Unique, case-sensitive identifier you provide to ensure the idempotency of the request.If you set this parameter totrue
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.This method is intended for internal use only.Indicates whether the instance is optimized for EBS I/O.The IAM instance profile.The ID of the AMI, which you can get by calling DescribeImages.Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).The instance type.The ID of the kernel.The name of the key pair.The maximum number of instances to launch.The minimum number of instances to launch.The monitoring for the instance.One or more network interfaces.The placement for the instance.[EC2-VPC] The primary IP address.The ID of the RAM disk.One or more security group IDs.[EC2-Classic, default VPC] One or more security group names.[EC2-VPC] The ID of the subnet to launch the instance into.Data to configure the instance, or a script to run during instance launch.int
hashCode()
If you set this parameter totrue
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.Indicates whether the instance is optimized for EBS I/O.The monitoring for the instance.void
setAdditionalInfo
(String additionalInfo) Reserved.void
setBlockDeviceMappings
(Collection<BlockDeviceMapping> blockDeviceMappings) The block device mapping.void
setClientToken
(String clientToken) Unique, case-sensitive identifier you provide to ensure the idempotency of the request.void
setDisableApiTermination
(Boolean disableApiTermination) If you set this parameter totrue
, 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 EBS I/O.void
setIamInstanceProfile
(IamInstanceProfileSpecification iamInstanceProfile) The IAM instance profile.void
setImageId
(String imageId) The ID of the AMI, which you can get by calling DescribeImages.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
setInstanceType
(InstanceType instanceType) The instance type.void
setInstanceType
(String instanceType) The instance type.void
setKernelId
(String kernelId) The ID of the kernel.void
setKeyName
(String keyName) The name of the key pair.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) The monitoring for the instance.void
setNetworkInterfaces
(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces) One or more network interfaces.void
setPlacement
(Placement placement) The placement for the instance.void
setPrivateIpAddress
(String privateIpAddress) [EC2-VPC] The primary IP address.void
setRamdiskId
(String ramdiskId) The ID of the RAM disk.void
setSecurityGroupIds
(Collection<String> securityGroupIds) One or more security group IDs.void
setSecurityGroups
(Collection<String> securityGroups) [EC2-Classic, default VPC] One or more security group names.void
setSubnetId
(String subnetId) [EC2-VPC] The ID of the subnet to launch the instance into.void
setUserData
(String userData) Data to configure the instance, or a script to run during instance launch.toString()
Returns a string representation of this object; useful for testing and debugging.withAdditionalInfo
(String additionalInfo) Reserved.withBlockDeviceMappings
(BlockDeviceMapping... blockDeviceMappings) The block device mapping.withBlockDeviceMappings
(Collection<BlockDeviceMapping> blockDeviceMappings) The block device mapping.withClientToken
(String clientToken) Unique, case-sensitive identifier you provide to ensure the idempotency of the request.withDisableApiTermination
(Boolean disableApiTermination) If you set this parameter totrue
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.withEbsOptimized
(Boolean ebsOptimized) Indicates whether the instance is optimized for EBS I/O.withIamInstanceProfile
(IamInstanceProfileSpecification iamInstanceProfile) The IAM instance profile.withImageId
(String imageId) The ID of the AMI, which you can get by calling DescribeImages.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).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).withInstanceType
(InstanceType instanceType) The instance type.withInstanceType
(String instanceType) The instance type.withKernelId
(String kernelId) The ID of the kernel.withKeyName
(String keyName) The name of the key pair.withMaxCount
(Integer maxCount) The maximum number of instances to launch.withMinCount
(Integer minCount) The minimum number of instances to launch.withMonitoring
(Boolean monitoring) The monitoring for the instance.withNetworkInterfaces
(InstanceNetworkInterfaceSpecification... networkInterfaces) One or more network interfaces.withNetworkInterfaces
(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces) One or more network interfaces.withPlacement
(Placement placement) The placement for the instance.withPrivateIpAddress
(String privateIpAddress) [EC2-VPC] The primary IP address.withRamdiskId
(String ramdiskId) The ID of the RAM disk.withSecurityGroupIds
(String... securityGroupIds) One or more security group IDs.withSecurityGroupIds
(Collection<String> securityGroupIds) One or more security group IDs.withSecurityGroups
(String... securityGroups) [EC2-Classic, default VPC] One or more security group names.withSecurityGroups
(Collection<String> securityGroups) [EC2-Classic, default VPC] One or more security group names.withSubnetId
(String subnetId) [EC2-VPC] The ID of the subnet to launch the instance into.withUserData
(String userData) Data to configure the instance, or a script to run during instance launch.Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Constructor Details
-
RunInstancesRequest
public RunInstancesRequest()Default constructor for RunInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
RunInstancesRequest
Constructs a new RunInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
imageId
- The ID of the AMI, which you can get by calling DescribeImages.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 aboveMinCount
.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.
-
-
Method Details
-
setImageId
The ID of the AMI, which you can get by calling DescribeImages.
- Parameters:
imageId
- The ID of the AMI, which you can get by calling DescribeImages.
-
getImageId
The ID of the AMI, which you can get by calling DescribeImages.
- Returns:
- The ID of the AMI, which you can get by calling DescribeImages.
-
withImageId
The ID of the AMI, which you can get by calling DescribeImages.
- Parameters:
imageId
- The ID of the AMI, which you can get by calling DescribeImages.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMinCount
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.
- Parameters:
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.
-
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.
- Returns:
- 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.
-
withMinCount
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMaxCount
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.
- Parameters:
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 aboveMinCount
.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.
-
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.
- Returns:
- 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.
-
withMaxCount
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.
- Parameters:
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 aboveMinCount
.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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKeyName
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.
- Parameters:
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.
-
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.
- Returns:
- 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.
-
withKeyName
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getSecurityGroups
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
- Returns:
- [EC2-Classic, default VPC] One or more security group names. For
a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
-
setSecurityGroups
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
- Parameters:
securityGroups
- [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.Default: Amazon EC2 uses the default security group.
-
withSecurityGroups
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
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)
orwithSecurityGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
securityGroups
- [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.Default: Amazon EC2 uses the default security group.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSecurityGroups
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
- Parameters:
securityGroups
- [EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.Default: Amazon EC2 uses the default security group.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getSecurityGroupIds
One or more security group IDs. You can create a security group using CreateSecurityGroup.
Default: Amazon EC2 uses the default security group.
- Returns:
- One or more security group IDs. You can create a security group
using CreateSecurityGroup.
Default: Amazon EC2 uses the default security group.
-
setSecurityGroupIds
One or more security group IDs. You can create a security group using CreateSecurityGroup.
Default: Amazon EC2 uses the default security group.
- Parameters:
securityGroupIds
- One or more security group IDs. You can create a security group using CreateSecurityGroup.Default: Amazon EC2 uses the default security group.
-
withSecurityGroupIds
One or more security group IDs. You can create a security group using CreateSecurityGroup.
Default: Amazon EC2 uses the default security group.
NOTE: This method appends the values to the existing list (if any). Use
setSecurityGroupIds(java.util.Collection)
orwithSecurityGroupIds(java.util.Collection)
if you want to override the existing values.- Parameters:
securityGroupIds
- One or more security group IDs. You can create a security group using CreateSecurityGroup.Default: Amazon EC2 uses the default security group.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSecurityGroupIds
One or more security group IDs. You can create a security group using CreateSecurityGroup.
Default: Amazon EC2 uses the default security group.
- Parameters:
securityGroupIds
- One or more security group IDs. You can create a security group using CreateSecurityGroup.Default: Amazon EC2 uses the default security group.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUserData
Data to configure the instance, or a script to run during instance launch. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). For API calls, the text must be base64-encoded. For command line tools, the encoding is performed for you, and you can load the text from a file.
- Parameters:
userData
- Data to configure the instance, or a script to run during instance launch. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). For API calls, the text must be base64-encoded. For command line tools, the encoding is performed for you, and you can load the text from a file.
-
getUserData
Data to configure the instance, or a script to run during instance launch. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). For API calls, the text must be base64-encoded. For command line tools, the encoding is performed for you, and you can load the text from a file.
- Returns:
- Data to configure the instance, or a script to run during instance launch. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). For API calls, the text must be base64-encoded. For command line tools, the encoding is performed for you, and you can load the text from a file.
-
withUserData
Data to configure the instance, or a script to run during instance launch. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). For API calls, the text must be base64-encoded. For command line tools, the encoding is performed for you, and you can load the text from a file.
- Parameters:
userData
- Data to configure the instance, or a script to run during instance launch. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). For API calls, the text must be base64-encoded. For command line tools, the encoding is performed for you, and you can load the text from a file.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceType
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default:
m1.small
- Parameters:
instanceType
- The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.Default:
m1.small
- See Also:
-
getInstanceType
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default:
m1.small
- Returns:
- The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User
Guide.
Default:
m1.small
- See Also:
-
withInstanceType
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default:
m1.small
- Parameters:
instanceType
- The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.Default:
m1.small
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setInstanceType
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default:
m1.small
- Parameters:
instanceType
- The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.Default:
m1.small
- See Also:
-
withInstanceType
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default:
m1.small
- Parameters:
instanceType
- The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.Default:
m1.small
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setPlacement
The placement for the instance.
- Parameters:
placement
- The placement for the instance.
-
getPlacement
The placement for the instance.
- Returns:
- The placement for the instance.
-
withPlacement
The placement for the instance.
- Parameters:
placement
- The placement for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKernelId
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.
- Parameters:
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.
-
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.
- Returns:
- 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.
-
withKernelId
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRamdiskId
The ID of the RAM disk.
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.
- Parameters:
ramdiskId
- The ID of the RAM disk.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.
-
getRamdiskId
The ID of the RAM disk.
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.
- Returns:
- The ID of the RAM disk.
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.
-
withRamdiskId
The ID of the RAM disk.
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.
- Parameters:
ramdiskId
- The ID of the RAM disk.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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBlockDeviceMappings
The block device mapping.
- Returns:
- The block device mapping.
-
setBlockDeviceMappings
The block device mapping.
- Parameters:
blockDeviceMappings
- The block device mapping.
-
withBlockDeviceMappings
The block device mapping.
NOTE: This method appends the values to the existing list (if any). Use
setBlockDeviceMappings(java.util.Collection)
orwithBlockDeviceMappings(java.util.Collection)
if you want to override the existing values.- Parameters:
blockDeviceMappings
- The block device mapping.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBlockDeviceMappings
public RunInstancesRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings) The block device mapping.
- Parameters:
blockDeviceMappings
- The block device mapping.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMonitoring
The monitoring for the instance.
- Parameters:
monitoring
- The monitoring for the instance.
-
getMonitoring
The monitoring for the instance.
- Returns:
- The monitoring for the instance.
-
withMonitoring
The monitoring for the instance.
- Parameters:
monitoring
- The monitoring for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isMonitoring
The monitoring for the instance.
- Returns:
- The monitoring for the instance.
-
setSubnetId
[EC2-VPC] The ID of the subnet to launch the instance into.
- Parameters:
subnetId
- [EC2-VPC] The ID of the subnet to launch the instance into.
-
getSubnetId
[EC2-VPC] The ID of the subnet to launch the instance into.
- Returns:
- [EC2-VPC] The ID of the subnet to launch the instance into.
-
withSubnetId
[EC2-VPC] The ID of the subnet to launch the instance into.
- Parameters:
subnetId
- [EC2-VPC] The ID of the subnet to launch the instance into.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDisableApiTermination
If you set this parameter to
true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this parameter totrue
and then later want to be able to terminate the instance, you must first change the value of thedisableApiTermination
attribute tofalse
using ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.Default:
false
- Parameters:
disableApiTermination
- If you set this parameter totrue
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this parameter totrue
and then later want to be able to terminate the instance, you must first change the value of thedisableApiTermination
attribute tofalse
using ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.Default:
false
-
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. If you set this parameter totrue
and then later want to be able to terminate the instance, you must first change the value of thedisableApiTermination
attribute tofalse
using ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.Default:
false
- Returns:
- If you set this parameter to
true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this parameter totrue
and then later want to be able to terminate the instance, you must first change the value of thedisableApiTermination
attribute tofalse
using ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.Default:
false
-
withDisableApiTermination
If you set this parameter to
true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this parameter totrue
and then later want to be able to terminate the instance, you must first change the value of thedisableApiTermination
attribute tofalse
using ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.Default:
false
- Parameters:
disableApiTermination
- If you set this parameter totrue
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this parameter totrue
and then later want to be able to terminate the instance, you must first change the value of thedisableApiTermination
attribute tofalse
using ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.Default:
false
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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. If you set this parameter totrue
and then later want to be able to terminate the instance, you must first change the value of thedisableApiTermination
attribute tofalse
using ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.Default:
false
- Returns:
- If you set this parameter to
true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this parameter totrue
and then later want to be able to terminate the instance, you must first change the value of thedisableApiTermination
attribute tofalse
using ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.Default:
false
-
setInstanceInitiatedShutdownBehavior
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default:
stop
- Parameters:
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
- See Also:
-
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
- Returns:
- Indicates whether an instance stops or terminates when you
initiate shutdown from the instance (using the operating system
command for system shutdown).
Default:
stop
- See Also:
-
withInstanceInitiatedShutdownBehavior
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
- Parameters:
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
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setInstanceInitiatedShutdownBehavior
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
- Parameters:
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
- See Also:
-
withInstanceInitiatedShutdownBehavior
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
- Parameters:
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
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setPrivateIpAddress
[EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.
Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if
PrivateIpAddresses.n.Primary
is set totrue
andPrivateIpAddresses.n.PrivateIpAddress
is set to an IP address.Default: We select an IP address from the IP address range of the subnet.
- Parameters:
privateIpAddress
- [EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if
PrivateIpAddresses.n.Primary
is set totrue
andPrivateIpAddresses.n.PrivateIpAddress
is set to an IP address.Default: We select an IP address from the IP address range of the subnet.
-
getPrivateIpAddress
[EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.
Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if
PrivateIpAddresses.n.Primary
is set totrue
andPrivateIpAddresses.n.PrivateIpAddress
is set to an IP address.Default: We select an IP address from the IP address range of the subnet.
- Returns:
- [EC2-VPC] The primary IP address. You must specify a value from
the IP address range of the subnet.
Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if
PrivateIpAddresses.n.Primary
is set totrue
andPrivateIpAddresses.n.PrivateIpAddress
is set to an IP address.Default: We select an IP address from the IP address range of the subnet.
-
withPrivateIpAddress
[EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.
Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if
PrivateIpAddresses.n.Primary
is set totrue
andPrivateIpAddresses.n.PrivateIpAddress
is set to an IP address.Default: We select an IP address from the IP address range of the subnet.
- Parameters:
privateIpAddress
- [EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if
PrivateIpAddresses.n.Primary
is set totrue
andPrivateIpAddresses.n.PrivateIpAddress
is set to an IP address.Default: We select an IP address from the IP address range of the subnet.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setClientToken
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
- Parameters:
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
-
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
- Returns:
- Unique, case-sensitive identifier you provide to ensure the
idempotency of the request. For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
-
withClientToken
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
- Parameters:
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
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAdditionalInfo
Reserved.
- Parameters:
additionalInfo
- Reserved.
-
getAdditionalInfo
Reserved.
- Returns:
- Reserved.
-
withAdditionalInfo
Reserved.
- Parameters:
additionalInfo
- Reserved.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getNetworkInterfaces
One or more network interfaces.
- Returns:
- One or more network interfaces.
-
setNetworkInterfaces
public void setNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces) One or more network interfaces.
- Parameters:
networkInterfaces
- One or more network interfaces.
-
withNetworkInterfaces
public RunInstancesRequest withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces) One or more network interfaces.
NOTE: This method appends the values to the existing list (if any). Use
setNetworkInterfaces(java.util.Collection)
orwithNetworkInterfaces(java.util.Collection)
if you want to override the existing values.- Parameters:
networkInterfaces
- One or more network interfaces.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withNetworkInterfaces
public RunInstancesRequest withNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces) One or more network interfaces.
- Parameters:
networkInterfaces
- One or more network interfaces.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIamInstanceProfile
The IAM instance profile.
- Parameters:
iamInstanceProfile
- The IAM instance profile.
-
getIamInstanceProfile
The IAM instance profile.
- Returns:
- The IAM instance profile.
-
withIamInstanceProfile
public RunInstancesRequest withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile) The IAM instance profile.
- Parameters:
iamInstanceProfile
- The IAM instance profile.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEbsOptimized
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal 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
- Parameters:
ebsOptimized
- Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal 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
-
getEbsOptimized
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal 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
- Returns:
- Indicates whether the instance is optimized for EBS I/O. This
optimization provides dedicated throughput to Amazon EBS and an
optimized configuration stack to provide optimal 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
-
withEbsOptimized
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal 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
- Parameters:
ebsOptimized
- Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal 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
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEbsOptimized
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal 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
- Returns:
- Indicates whether the instance is optimized for EBS I/O. This
optimization provides dedicated throughput to Amazon EBS and an
optimized configuration stack to provide optimal 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
-
getDryRunRequest
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.- Specified by:
getDryRunRequest
in interfaceDryRunSupportedRequest<RunInstancesRequest>
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
-