com.amazonaws.services.ec2.model
Class RunInstancesRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.RunInstancesRequest

public class RunInstancesRequest
extends AmazonWebServiceRequest

Container for the parameters to the RunInstances operation.

The RunInstances operation launches a specified number of instances.

If Amazon EC2 cannot launch the minimum number AMIs you request, no instances launch. If there is insufficient capacity to launch the maximum number of AMIs you request, Amazon EC2 launches as many as possible to satisfy the requested maximum values.

Every instance is launched in a security group. If you do not specify a security group at launch, the instances start in your default security group. For more information on creating security groups, see CreateSecurityGroup.

An optional instance type can be specified. For information about instance types, see Instance Types.

You can provide an optional key pair ID for each image in the launch request (for more information, see CreateKeyPair). All instances that are created from images that use this key pair will have access to the associated public key at boot. You can use this key to provide secure access to an instance of an image on a per-instance basis. Amazon EC2 public images use this feature to provide secure access without passwords.

IMPORTANT: Launching public images without a key pair ID will leave them inaccessible. The public key material is made available to the instance at boot time by placing it in the openssh_id.pub file on a logical device that is exposed to the instance as /dev/sda2 (the ephemeral store). The format of this file is suitable for use as an entry within ~/.ssh/authorized_keys (the OpenSSH format). This can be done at boot (e.g., as part of rc.local) allowing for secure access without passwords. Optional user data can be provided in the launch request. All instances that collectively comprise the launch request have access to this data For more information, see Instance Metadata.

NOTE: If any of the AMIs have a product code attached for which the user has not subscribed, the RunInstances call will fail.

IMPORTANT: We strongly recommend using the 2.6.18 Xen stock kernel with the c1.medium and c1.xlarge instances. Although the default Amazon EC2 kernels will work, the new kernels provide greater stability and performance for these instance types. For more information about kernels, see Kernels, RAM Disks, and Block Device Mappings.

See Also:
AmazonEC2.runInstances(RunInstancesRequest)

Constructor Summary
RunInstancesRequest()
          Default constructor for a new RunInstancesRequest object.
RunInstancesRequest(String imageId, Integer minCount, Integer maxCount)
          Constructs a new RunInstancesRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getAdditionalInfo()
          Returns the value of the AdditionalInfo property for this object.
 String getAddressingType()
          Returns the value of the AddressingType property for this object.
 List<BlockDeviceMapping> getBlockDeviceMappings()
          Specifies how block devices are exposed to the instance.
 String getClientToken()
          Unique, case-sensitive identifier you provide to ensure idempotency of the request.
 Boolean getDisableApiTermination()
          Specifies whether the instance can be terminated using the APIs.
 Boolean getEbsOptimized()
          Returns the value of the EbsOptimized property for this object.
 IamInstanceProfileSpecification getIamInstanceProfile()
          Returns the value of the IamInstanceProfile property for this object.
 String getImageId()
          Unique ID of a machine image, returned by a call to DescribeImages.
 String getInstanceInitiatedShutdownBehavior()
          Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.
 String getInstanceType()
          Specifies the instance type for the launched instances.
 String getKernelId()
          The ID of the kernel with which to launch the instance.
 String getKeyName()
          The name of the key pair.
 InstanceLicenseSpecification getLicense()
          Specifies active licenses in use and attached to an Amazon EC2 instance.
 Integer getMaxCount()
          Maximum number of instances to launch.
 Integer getMinCount()
          Minimum number of instances to launch.
 Boolean getMonitoring()
          Enables monitoring for the instance.
 List<InstanceNetworkInterfaceSpecification> getNetworkInterfaces()
          Returns the value of the NetworkInterfaces property for this object.
 Placement getPlacement()
          Specifies the placement constraints (Availability Zones) for launching the instances.
 String getPrivateIpAddress()
          If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.
 String getRamdiskId()
          The ID of the RAM disk with which to launch the instance.
 List<String> getSecurityGroupIds()
          Returns the value of the SecurityGroupIds property for this object.
 List<String> getSecurityGroups()
          The names of the security groups into which the instances will be launched.
 String getSubnetId()
          Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.
 String getUserData()
          Specifies additional information to make available to the instance(s).
 int hashCode()
           
 Boolean isDisableApiTermination()
          Specifies whether the instance can be terminated using the APIs.
 Boolean isEbsOptimized()
          Returns the value of the EbsOptimized property for this object.
 Boolean isMonitoring()
          Enables monitoring for the instance.
 void setAdditionalInfo(String additionalInfo)
          Sets the value of the AdditionalInfo property for this object.
 void setAddressingType(String addressingType)
          Sets the value of the AddressingType property for this object.
 void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
          Specifies how block devices are exposed to the instance.
 void setClientToken(String clientToken)
          Unique, case-sensitive identifier you provide to ensure idempotency of the request.
 void setDisableApiTermination(Boolean disableApiTermination)
          Specifies whether the instance can be terminated using the APIs.
 void setEbsOptimized(Boolean ebsOptimized)
          Sets the value of the EbsOptimized property for this object.
 void setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
          Sets the value of the IamInstanceProfile property for this object.
 void setImageId(String imageId)
          Unique ID of a machine image, returned by a call to DescribeImages.
 void setInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
          Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.
 void setInstanceType(InstanceType instanceType)
          Specifies the instance type for the launched instances.
 void setInstanceType(String instanceType)
          Specifies the instance type for the launched instances.
 void setKernelId(String kernelId)
          The ID of the kernel with which to launch the instance.
 void setKeyName(String keyName)
          The name of the key pair.
 void setLicense(InstanceLicenseSpecification license)
          Specifies active licenses in use and attached to an Amazon EC2 instance.
 void setMaxCount(Integer maxCount)
          Maximum number of instances to launch.
 void setMinCount(Integer minCount)
          Minimum number of instances to launch.
 void setMonitoring(Boolean monitoring)
          Enables monitoring for the instance.
 void setNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
          Sets the value of the NetworkInterfaces property for this object.
 void setPlacement(Placement placement)
          Specifies the placement constraints (Availability Zones) for launching the instances.
 void setPrivateIpAddress(String privateIpAddress)
          If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.
 void setRamdiskId(String ramdiskId)
          The ID of the RAM disk with which to launch the instance.
 void setSecurityGroupIds(Collection<String> securityGroupIds)
          Sets the value of the SecurityGroupIds property for this object.
 void setSecurityGroups(Collection<String> securityGroups)
          The names of the security groups into which the instances will be launched.
 void setSubnetId(String subnetId)
          Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.
 void setUserData(String userData)
          Specifies additional information to make available to the instance(s).
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 RunInstancesRequest withAdditionalInfo(String additionalInfo)
          Sets the value of the AdditionalInfo property for this object.
 RunInstancesRequest withAddressingType(String addressingType)
          Sets the value of the AddressingType property for this object.
 RunInstancesRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
          Specifies how block devices are exposed to the instance.
 RunInstancesRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
          Specifies how block devices are exposed to the instance.
 RunInstancesRequest withClientToken(String clientToken)
          Unique, case-sensitive identifier you provide to ensure idempotency of the request.
 RunInstancesRequest withDisableApiTermination(Boolean disableApiTermination)
          Specifies whether the instance can be terminated using the APIs.
 RunInstancesRequest withEbsOptimized(Boolean ebsOptimized)
          Sets the value of the EbsOptimized property for this object.
 RunInstancesRequest withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
          Sets the value of the IamInstanceProfile property for this object.
 RunInstancesRequest withImageId(String imageId)
          Unique ID of a machine image, returned by a call to DescribeImages.
 RunInstancesRequest withInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
          Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.
 RunInstancesRequest withInstanceType(InstanceType instanceType)
          Specifies the instance type for the launched instances.
 RunInstancesRequest withInstanceType(String instanceType)
          Specifies the instance type for the launched instances.
 RunInstancesRequest withKernelId(String kernelId)
          The ID of the kernel with which to launch the instance.
 RunInstancesRequest withKeyName(String keyName)
          The name of the key pair.
 RunInstancesRequest withLicense(InstanceLicenseSpecification license)
          Specifies active licenses in use and attached to an Amazon EC2 instance.
 RunInstancesRequest withMaxCount(Integer maxCount)
          Maximum number of instances to launch.
 RunInstancesRequest withMinCount(Integer minCount)
          Minimum number of instances to launch.
 RunInstancesRequest withMonitoring(Boolean monitoring)
          Enables monitoring for the instance.
 RunInstancesRequest withNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
          Sets the value of the NetworkInterfaces property for this object.
 RunInstancesRequest withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
          Sets the value of the NetworkInterfaces property for this object.
 RunInstancesRequest withPlacement(Placement placement)
          Specifies the placement constraints (Availability Zones) for launching the instances.
 RunInstancesRequest withPrivateIpAddress(String privateIpAddress)
          If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.
 RunInstancesRequest withRamdiskId(String ramdiskId)
          The ID of the RAM disk with which to launch the instance.
 RunInstancesRequest withSecurityGroupIds(Collection<String> securityGroupIds)
          Sets the value of the SecurityGroupIds property for this object.
 RunInstancesRequest withSecurityGroupIds(String... securityGroupIds)
          Sets the value of the SecurityGroupIds property for this object.
 RunInstancesRequest withSecurityGroups(Collection<String> securityGroups)
          The names of the security groups into which the instances will be launched.
 RunInstancesRequest withSecurityGroups(String... securityGroups)
          The names of the security groups into which the instances will be launched.
 RunInstancesRequest withSubnetId(String subnetId)
          Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.
 RunInstancesRequest withUserData(String userData)
          Specifies additional information to make available to the instance(s).
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RunInstancesRequest

public RunInstancesRequest()
Default constructor for a new RunInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


RunInstancesRequest

public RunInstancesRequest(String imageId,
                           Integer minCount,
                           Integer maxCount)
Constructs a new RunInstancesRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
imageId - Unique ID of a machine image, returned by a call to DescribeImages.
minCount - Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.
maxCount - Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead.

Between 1 and the maximum number allowed for your account (default: 20).

Method Detail

getImageId

public String getImageId()
Unique ID of a machine image, returned by a call to DescribeImages.

Returns:
Unique ID of a machine image, returned by a call to DescribeImages.

setImageId

public void setImageId(String imageId)
Unique ID of a machine image, returned by a call to DescribeImages.

Parameters:
imageId - Unique ID of a machine image, returned by a call to DescribeImages.

withImageId

public RunInstancesRequest withImageId(String imageId)
Unique ID of a machine image, returned by a call to DescribeImages.

Returns a reference to this object so that method calls can be chained together.

Parameters:
imageId - Unique ID of a machine image, returned by a call to DescribeImages.
Returns:
A reference to this updated object so that method calls can be chained together.

getMinCount

public Integer getMinCount()
Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.

Returns:
Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.

setMinCount

public void setMinCount(Integer minCount)
Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.

Parameters:
minCount - Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.

withMinCount

public RunInstancesRequest withMinCount(Integer minCount)
Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.

Returns a reference to this object so that method calls can be chained together.

Parameters:
minCount - Minimum number of instances to launch. If the value is more than Amazon EC2 can launch, no instances are launched at all.
Returns:
A reference to this updated object so that method calls can be chained together.

getMaxCount

public Integer getMaxCount()
Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead.

Between 1 and the maximum number allowed for your account (default: 20).

Returns:
Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead.

Between 1 and the maximum number allowed for your account (default: 20).


setMaxCount

public void setMaxCount(Integer maxCount)
Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead.

Between 1 and the maximum number allowed for your account (default: 20).

Parameters:
maxCount - Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead.

Between 1 and the maximum number allowed for your account (default: 20).


withMaxCount

public RunInstancesRequest withMaxCount(Integer maxCount)
Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead.

Between 1 and the maximum number allowed for your account (default: 20).

Returns a reference to this object so that method calls can be chained together.

Parameters:
maxCount - Maximum number of instances to launch. If the value is more than Amazon EC2 can launch, the largest possible number above minCount will be launched instead.

Between 1 and the maximum number allowed for your account (default: 20).

Returns:
A reference to this updated object so that method calls can be chained together.

getKeyName

public String getKeyName()
The name of the key pair.

Returns:
The name of the key pair.

setKeyName

public void setKeyName(String keyName)
The name of the key pair.

Parameters:
keyName - The name of the key pair.

withKeyName

public RunInstancesRequest withKeyName(String keyName)
The name of the key pair.

Returns a reference to this object so that method calls can be chained together.

Parameters:
keyName - The name of the key pair.
Returns:
A reference to this updated object so that method calls can be chained together.

getSecurityGroups

public List<String> getSecurityGroups()
The names of the security groups into which the instances will be launched.

Returns:
The names of the security groups into which the instances will be launched.

setSecurityGroups

public void setSecurityGroups(Collection<String> securityGroups)
The names of the security groups into which the instances will be launched.

Parameters:
securityGroups - The names of the security groups into which the instances will be launched.

withSecurityGroups

public RunInstancesRequest withSecurityGroups(String... securityGroups)
The names of the security groups into which the instances will be launched.

Returns a reference to this object so that method calls can be chained together.

Parameters:
securityGroups - The names of the security groups into which the instances will be launched.
Returns:
A reference to this updated object so that method calls can be chained together.

withSecurityGroups

public RunInstancesRequest withSecurityGroups(Collection<String> securityGroups)
The names of the security groups into which the instances will be launched.

Returns a reference to this object so that method calls can be chained together.

Parameters:
securityGroups - The names of the security groups into which the instances will be launched.
Returns:
A reference to this updated object so that method calls can be chained together.

getSecurityGroupIds

public List<String> getSecurityGroupIds()
Returns the value of the SecurityGroupIds property for this object.

Returns:
The value of the SecurityGroupIds property for this object.

setSecurityGroupIds

public void setSecurityGroupIds(Collection<String> securityGroupIds)
Sets the value of the SecurityGroupIds property for this object.

Parameters:
securityGroupIds - The new value for the SecurityGroupIds property for this object.

withSecurityGroupIds

public RunInstancesRequest withSecurityGroupIds(String... securityGroupIds)
Sets the value of the SecurityGroupIds property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
securityGroupIds - The new value for the SecurityGroupIds property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

withSecurityGroupIds

public RunInstancesRequest withSecurityGroupIds(Collection<String> securityGroupIds)
Sets the value of the SecurityGroupIds property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
securityGroupIds - The new value for the SecurityGroupIds property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

getUserData

public String getUserData()
Specifies additional information to make available to the instance(s).

Returns:
Specifies additional information to make available to the instance(s).

setUserData

public void setUserData(String userData)
Specifies additional information to make available to the instance(s).

Parameters:
userData - Specifies additional information to make available to the instance(s).

withUserData

public RunInstancesRequest withUserData(String userData)
Specifies additional information to make available to the instance(s).

Returns a reference to this object so that method calls can be chained together.

Parameters:
userData - Specifies additional information to make available to the instance(s).
Returns:
A reference to this updated object so that method calls can be chained together.

getAddressingType

public String getAddressingType()
Returns the value of the AddressingType property for this object.

Returns:
The value of the AddressingType property for this object.

setAddressingType

public void setAddressingType(String addressingType)
Sets the value of the AddressingType property for this object.

Parameters:
addressingType - The new value for the AddressingType property for this object.

withAddressingType

public RunInstancesRequest withAddressingType(String addressingType)
Sets the value of the AddressingType property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
addressingType - The new value for the AddressingType property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

getInstanceType

public String getInstanceType()
Specifies the instance type for the launched instances.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, c1.medium, c1.xlarge, hi1.4xlarge, cc1.4xlarge, cc2.8xlarge, cg1.4xlarge

Returns:
Specifies the instance type for the launched instances.
See Also:
InstanceType

setInstanceType

public void setInstanceType(String instanceType)
Specifies the instance type for the launched instances.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, c1.medium, c1.xlarge, hi1.4xlarge, cc1.4xlarge, cc2.8xlarge, cg1.4xlarge

Parameters:
instanceType - Specifies the instance type for the launched instances.
See Also:
InstanceType

withInstanceType

public RunInstancesRequest withInstanceType(String instanceType)
Specifies the instance type for the launched instances.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, c1.medium, c1.xlarge, hi1.4xlarge, cc1.4xlarge, cc2.8xlarge, cg1.4xlarge

Parameters:
instanceType - Specifies the instance type for the launched instances.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
InstanceType

setInstanceType

public void setInstanceType(InstanceType instanceType)
Specifies the instance type for the launched instances.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, c1.medium, c1.xlarge, hi1.4xlarge, cc1.4xlarge, cc2.8xlarge, cg1.4xlarge

Parameters:
instanceType - Specifies the instance type for the launched instances.
See Also:
InstanceType

withInstanceType

public RunInstancesRequest withInstanceType(InstanceType instanceType)
Specifies the instance type for the launched instances.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, c1.medium, c1.xlarge, hi1.4xlarge, cc1.4xlarge, cc2.8xlarge, cg1.4xlarge

Parameters:
instanceType - Specifies the instance type for the launched instances.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
InstanceType

getPlacement

public Placement getPlacement()
Specifies the placement constraints (Availability Zones) for launching the instances.

Returns:
Specifies the placement constraints (Availability Zones) for launching the instances.

setPlacement

public void setPlacement(Placement placement)
Specifies the placement constraints (Availability Zones) for launching the instances.

Parameters:
placement - Specifies the placement constraints (Availability Zones) for launching the instances.

withPlacement

public RunInstancesRequest withPlacement(Placement placement)
Specifies the placement constraints (Availability Zones) for launching the instances.

Returns a reference to this object so that method calls can be chained together.

Parameters:
placement - Specifies the placement constraints (Availability Zones) for launching the instances.
Returns:
A reference to this updated object so that method calls can be chained together.

getKernelId

public String getKernelId()
The ID of the kernel with which to launch the instance.

Returns:
The ID of the kernel with which to launch the instance.

setKernelId

public void setKernelId(String kernelId)
The ID of the kernel with which to launch the instance.

Parameters:
kernelId - The ID of the kernel with which to launch the instance.

withKernelId

public RunInstancesRequest withKernelId(String kernelId)
The ID of the kernel with which to launch the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
kernelId - The ID of the kernel with which to launch the instance.
Returns:
A reference to this updated object so that method calls can be chained together.

getRamdiskId

public String getRamdiskId()
The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.

Returns:
The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.

setRamdiskId

public void setRamdiskId(String ramdiskId)
The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.

Parameters:
ramdiskId - The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.

withRamdiskId

public RunInstancesRequest withRamdiskId(String ramdiskId)
The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.

Returns a reference to this object so that method calls can be chained together.

Parameters:
ramdiskId - The ID of the RAM disk with which to launch the instance. Some kernels require additional drivers at launch. Check the kernel requirements for information on whether you need to specify a RAM disk. To find kernel requirements, go to the Resource Center and search for the kernel ID.
Returns:
A reference to this updated object so that method calls can be chained together.

getBlockDeviceMappings

public List<BlockDeviceMapping> getBlockDeviceMappings()
Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.

Returns:
Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.

setBlockDeviceMappings

public void setBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.

Parameters:
blockDeviceMappings - Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.

withBlockDeviceMappings

public RunInstancesRequest withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.

Returns a reference to this object so that method calls can be chained together.

Parameters:
blockDeviceMappings - Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.
Returns:
A reference to this updated object so that method calls can be chained together.

withBlockDeviceMappings

public RunInstancesRequest withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.

Returns a reference to this object so that method calls can be chained together.

Parameters:
blockDeviceMappings - Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.
Returns:
A reference to this updated object so that method calls can be chained together.

isMonitoring

public Boolean isMonitoring()
Enables monitoring for the instance.

Returns:
Enables monitoring for the instance.

setMonitoring

public void setMonitoring(Boolean monitoring)
Enables monitoring for the instance.

Parameters:
monitoring - Enables monitoring for the instance.

withMonitoring

public RunInstancesRequest withMonitoring(Boolean monitoring)
Enables monitoring for the instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
monitoring - Enables monitoring for the instance.
Returns:
A reference to this updated object so that method calls can be chained together.

getMonitoring

public Boolean getMonitoring()
Enables monitoring for the instance.

Returns:
Enables monitoring for the instance.

getSubnetId

public String getSubnetId()
Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.

Returns:
Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.

setSubnetId

public void setSubnetId(String subnetId)
Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.

Parameters:
subnetId - Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.

withSubnetId

public RunInstancesRequest withSubnetId(String subnetId)
Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.

Returns a reference to this object so that method calls can be chained together.

Parameters:
subnetId - Specifies the subnet ID within which to launch the instance(s) for Amazon Virtual Private Cloud.
Returns:
A reference to this updated object so that method calls can be chained together.

isDisableApiTermination

public Boolean isDisableApiTermination()
Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.

Returns:
Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.

setDisableApiTermination

public void setDisableApiTermination(Boolean disableApiTermination)
Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.

Parameters:
disableApiTermination - Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.

withDisableApiTermination

public RunInstancesRequest withDisableApiTermination(Boolean disableApiTermination)
Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.

Returns a reference to this object so that method calls can be chained together.

Parameters:
disableApiTermination - Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.
Returns:
A reference to this updated object so that method calls can be chained together.

getDisableApiTermination

public Boolean getDisableApiTermination()
Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.

Returns:
Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs.

getInstanceInitiatedShutdownBehavior

public String getInstanceInitiatedShutdownBehavior()
Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.

Returns:
Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.

setInstanceInitiatedShutdownBehavior

public void setInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.

Parameters:
instanceInitiatedShutdownBehavior - Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.

withInstanceInitiatedShutdownBehavior

public RunInstancesRequest withInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceInitiatedShutdownBehavior - Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.
Returns:
A reference to this updated object so that method calls can be chained together.

getLicense

public InstanceLicenseSpecification getLicense()
Specifies active licenses in use and attached to an Amazon EC2 instance.

Returns:
Specifies active licenses in use and attached to an Amazon EC2 instance.

setLicense

public void setLicense(InstanceLicenseSpecification license)
Specifies active licenses in use and attached to an Amazon EC2 instance.

Parameters:
license - Specifies active licenses in use and attached to an Amazon EC2 instance.

withLicense

public RunInstancesRequest withLicense(InstanceLicenseSpecification license)
Specifies active licenses in use and attached to an Amazon EC2 instance.

Returns a reference to this object so that method calls can be chained together.

Parameters:
license - Specifies active licenses in use and attached to an Amazon EC2 instance.
Returns:
A reference to this updated object so that method calls can be chained together.

getPrivateIpAddress

public String getPrivateIpAddress()
If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.

Returns:
If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.

setPrivateIpAddress

public void setPrivateIpAddress(String privateIpAddress)
If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.

Parameters:
privateIpAddress - If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.

withPrivateIpAddress

public RunInstancesRequest withPrivateIpAddress(String privateIpAddress)
If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.

Returns a reference to this object so that method calls can be chained together.

Parameters:
privateIpAddress - If you're using Amazon Virtual Private Cloud, you can optionally use this parameter to assign the instance a specific available IP address from the subnet.
Returns:
A reference to this updated object so that method calls can be chained together.

getClientToken

public String getClientToken()
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, go to How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

Returns:
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, go to How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

setClientToken

public void setClientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, go to How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

Parameters:
clientToken - Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, go to How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

withClientToken

public RunInstancesRequest withClientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, go to How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.

Returns a reference to this object so that method calls can be chained together.

Parameters:
clientToken - Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, go to How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
Returns:
A reference to this updated object so that method calls can be chained together.

getAdditionalInfo

public String getAdditionalInfo()
Returns the value of the AdditionalInfo property for this object.

Returns:
The value of the AdditionalInfo property for this object.

setAdditionalInfo

public void setAdditionalInfo(String additionalInfo)
Sets the value of the AdditionalInfo property for this object.

Parameters:
additionalInfo - The new value for the AdditionalInfo property for this object.

withAdditionalInfo

public RunInstancesRequest withAdditionalInfo(String additionalInfo)
Sets the value of the AdditionalInfo property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
additionalInfo - The new value for the AdditionalInfo property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

getNetworkInterfaces

public List<InstanceNetworkInterfaceSpecification> getNetworkInterfaces()
Returns the value of the NetworkInterfaces property for this object.

Returns:
The value of the NetworkInterfaces property for this object.

setNetworkInterfaces

public void setNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
Sets the value of the NetworkInterfaces property for this object.

Parameters:
networkInterfaces - The new value for the NetworkInterfaces property for this object.

withNetworkInterfaces

public RunInstancesRequest withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
Sets the value of the NetworkInterfaces property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
networkInterfaces - The new value for the NetworkInterfaces property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

withNetworkInterfaces

public RunInstancesRequest withNetworkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
Sets the value of the NetworkInterfaces property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
networkInterfaces - The new value for the NetworkInterfaces property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

getIamInstanceProfile

public IamInstanceProfileSpecification getIamInstanceProfile()
Returns the value of the IamInstanceProfile property for this object.

Returns:
The value of the IamInstanceProfile property for this object.

setIamInstanceProfile

public void setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
Sets the value of the IamInstanceProfile property for this object.

Parameters:
iamInstanceProfile - The new value for the IamInstanceProfile property for this object.

withIamInstanceProfile

public RunInstancesRequest withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
Sets the value of the IamInstanceProfile property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
iamInstanceProfile - The new value for the IamInstanceProfile property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

isEbsOptimized

public Boolean isEbsOptimized()
Returns the value of the EbsOptimized property for this object.

Returns:
The value of the EbsOptimized property for this object.

setEbsOptimized

public void setEbsOptimized(Boolean ebsOptimized)
Sets the value of the EbsOptimized property for this object.

Parameters:
ebsOptimized - The new value for the EbsOptimized property for this object.

withEbsOptimized

public RunInstancesRequest withEbsOptimized(Boolean ebsOptimized)
Sets the value of the EbsOptimized property for this object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
ebsOptimized - The new value for the EbsOptimized property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

getEbsOptimized

public Boolean getEbsOptimized()
Returns the value of the EbsOptimized property for this object.

Returns:
The value of the EbsOptimized property for this object.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.