com.amazonaws.services.ec2.model
Class LaunchSpecification

java.lang.Object
  extended by com.amazonaws.services.ec2.model.LaunchSpecification
All Implemented Interfaces:
java.io.Serializable

public class LaunchSpecification
extends java.lang.Object
implements java.io.Serializable

Describes the launch specification of a Spot Instance.

See Also:
Serialized Form

Constructor Summary
LaunchSpecification()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAddressingType()
          

 java.util.List<GroupIdentifier> getAllSecurityGroups()
          One or more security groups.
 java.util.List<BlockDeviceMapping> getBlockDeviceMappings()
          One or more block device mapping entries.
 java.lang.Boolean getEbsOptimized()
          Indicates whether the instance is optimized for EBS I/O.
 IamInstanceProfileSpecification getIamInstanceProfile()
          The IAM instance profile.
 java.lang.String getImageId()
          The ID of the AMI.
 java.lang.String getInstanceType()
          The instance type.
 java.lang.String getKernelId()
          The ID of the kernel.
 java.lang.String getKeyName()
          The name of the key pair.
 java.lang.Boolean getMonitoringEnabled()
          Enables monitoring for the instance.
 java.util.List<InstanceNetworkInterfaceSpecification> getNetworkInterfaces()
          One or more network interfaces.
 SpotPlacement getPlacement()
          The placement information for the instance.
 java.lang.String getRamdiskId()
          The ID of the RAM disk.
 java.util.List<java.lang.String> getSecurityGroups()
          One or more security groups.
 java.lang.String getSubnetId()
          The ID of the subnet in which to launch the Spot Instance.
 java.lang.String getUserData()
          The Base64-encoded MIME user data to make available to the instances.
 int hashCode()
           
 java.lang.Boolean isEbsOptimized()
          Indicates whether the instance is optimized for EBS I/O.
 java.lang.Boolean isMonitoringEnabled()
          Enables monitoring for the instance.
 void setAddressingType(java.lang.String addressingType)
          

 void setAllSecurityGroups(java.util.Collection<GroupIdentifier> allSecurityGroups)
          One or more security groups.
 void setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
          One or more block device mapping entries.
 void setEbsOptimized(java.lang.Boolean ebsOptimized)
          Indicates whether the instance is optimized for EBS I/O.
 void setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
          The IAM instance profile.
 void setImageId(java.lang.String imageId)
          The ID of the AMI.
 void setInstanceType(InstanceType instanceType)
          The instance type.
 void setInstanceType(java.lang.String instanceType)
          The instance type.
 void setKernelId(java.lang.String kernelId)
          The ID of the kernel.
 void setKeyName(java.lang.String keyName)
          The name of the key pair.
 void setMonitoringEnabled(java.lang.Boolean monitoringEnabled)
          Enables monitoring for the instance.
 void setNetworkInterfaces(java.util.Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
          One or more network interfaces.
 void setPlacement(SpotPlacement placement)
          The placement information for the instance.
 void setRamdiskId(java.lang.String ramdiskId)
          The ID of the RAM disk.
 void setSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
          One or more security groups.
 void setSubnetId(java.lang.String subnetId)
          The ID of the subnet in which to launch the Spot Instance.
 void setUserData(java.lang.String userData)
          The Base64-encoded MIME user data to make available to the instances.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 LaunchSpecification withAddressingType(java.lang.String addressingType)
          

 LaunchSpecification withAllSecurityGroups(java.util.Collection<GroupIdentifier> allSecurityGroups)
          One or more security groups.
 LaunchSpecification withAllSecurityGroups(GroupIdentifier... allSecurityGroups)
          One or more security groups.
 LaunchSpecification withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
          One or more block device mapping entries.
 LaunchSpecification withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
          One or more block device mapping entries.
 LaunchSpecification withEbsOptimized(java.lang.Boolean ebsOptimized)
          Indicates whether the instance is optimized for EBS I/O.
 LaunchSpecification withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
          The IAM instance profile.
 LaunchSpecification withImageId(java.lang.String imageId)
          The ID of the AMI.
 LaunchSpecification withInstanceType(InstanceType instanceType)
          The instance type.
 LaunchSpecification withInstanceType(java.lang.String instanceType)
          The instance type.
 LaunchSpecification withKernelId(java.lang.String kernelId)
          The ID of the kernel.
 LaunchSpecification withKeyName(java.lang.String keyName)
          The name of the key pair.
 LaunchSpecification withMonitoringEnabled(java.lang.Boolean monitoringEnabled)
          Enables monitoring for the instance.
 LaunchSpecification withNetworkInterfaces(java.util.Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
          One or more network interfaces.
 LaunchSpecification withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
          One or more network interfaces.
 LaunchSpecification withPlacement(SpotPlacement placement)
          The placement information for the instance.
 LaunchSpecification withRamdiskId(java.lang.String ramdiskId)
          The ID of the RAM disk.
 LaunchSpecification withSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
          One or more security groups.
 LaunchSpecification withSecurityGroups(java.lang.String... securityGroups)
          One or more security groups.
 LaunchSpecification withSubnetId(java.lang.String subnetId)
          The ID of the subnet in which to launch the Spot Instance.
 LaunchSpecification withUserData(java.lang.String userData)
          The Base64-encoded MIME user data to make available to the instances.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LaunchSpecification

public LaunchSpecification()
Method Detail

getImageId

public java.lang.String getImageId()
The ID of the AMI.

Returns:
The ID of the AMI.

setImageId

public void setImageId(java.lang.String imageId)
The ID of the AMI.

Parameters:
imageId - The ID of the AMI.

withImageId

public LaunchSpecification withImageId(java.lang.String imageId)
The ID of the AMI.

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

Parameters:
imageId - The ID of the AMI.
Returns:
A reference to this updated object so that method calls can be chained together.

getKeyName

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

Returns:
The name of the key pair.

setKeyName

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

Parameters:
keyName - The name of the key pair.

withKeyName

public LaunchSpecification withKeyName(java.lang.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.

getAllSecurityGroups

public java.util.List<GroupIdentifier> getAllSecurityGroups()
One or more security groups.

Returns:
One or more security groups.

setAllSecurityGroups

public void setAllSecurityGroups(java.util.Collection<GroupIdentifier> allSecurityGroups)
One or more security groups.

Parameters:
allSecurityGroups - One or more security groups.

withAllSecurityGroups

public LaunchSpecification withAllSecurityGroups(GroupIdentifier... allSecurityGroups)
One or more security groups.

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

Parameters:
allSecurityGroups - One or more security groups.
Returns:
A reference to this updated object so that method calls can be chained together.

withAllSecurityGroups

public LaunchSpecification withAllSecurityGroups(java.util.Collection<GroupIdentifier> allSecurityGroups)
One or more security groups.

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

Parameters:
allSecurityGroups - One or more security groups.
Returns:
A reference to this updated object so that method calls can be chained together.

getSecurityGroups

public java.util.List<java.lang.String> getSecurityGroups()
One or more security groups.

Returns:
One or more security groups.

setSecurityGroups

public void setSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
One or more security groups.

Parameters:
securityGroups - One or more security groups.

withSecurityGroups

public LaunchSpecification withSecurityGroups(java.lang.String... securityGroups)
One or more security groups.

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

Parameters:
securityGroups - One or more security groups.
Returns:
A reference to this updated object so that method calls can be chained together.

withSecurityGroups

public LaunchSpecification withSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
One or more security groups.

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

Parameters:
securityGroups - One or more security groups.
Returns:
A reference to this updated object so that method calls can be chained together.

getUserData

public java.lang.String getUserData()
The Base64-encoded MIME user data to make available to the instances.

Returns:
The Base64-encoded MIME user data to make available to the instances.

setUserData

public void setUserData(java.lang.String userData)
The Base64-encoded MIME user data to make available to the instances.

Parameters:
userData - The Base64-encoded MIME user data to make available to the instances.

withUserData

public LaunchSpecification withUserData(java.lang.String userData)
The Base64-encoded MIME user data to make available to the instances.

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

Parameters:
userData - The Base64-encoded MIME user data to make available to the instances.
Returns:
A reference to this updated object so that method calls can be chained together.

getAddressingType

public java.lang.String getAddressingType()

Returns:


setAddressingType

public void setAddressingType(java.lang.String addressingType)

Parameters:
addressingType -


withAddressingType

public LaunchSpecification withAddressingType(java.lang.String addressingType)

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

Parameters:
addressingType -

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

getInstanceType

public java.lang.String getInstanceType()
The instance type.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge

Returns:
The instance type.
See Also:
InstanceType

setInstanceType

public void setInstanceType(java.lang.String instanceType)
The instance type.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge

Parameters:
instanceType - The instance type.
See Also:
InstanceType

withInstanceType

public LaunchSpecification withInstanceType(java.lang.String instanceType)
The instance type.

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, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge

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

setInstanceType

public void setInstanceType(InstanceType instanceType)
The instance type.

Constraints:
Allowed Values: t1.micro, m1.small, m1.medium, m1.large, m1.xlarge, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge

Parameters:
instanceType - The instance type.
See Also:
InstanceType

withInstanceType

public LaunchSpecification withInstanceType(InstanceType instanceType)
The instance type.

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, m3.medium, m3.large, m3.xlarge, m3.2xlarge, m2.xlarge, m2.2xlarge, m2.4xlarge, cr1.8xlarge, i2.xlarge, i2.2xlarge, i2.4xlarge, i2.8xlarge, hi1.4xlarge, hs1.8xlarge, c1.medium, c1.xlarge, c3.large, c3.xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, cc1.4xlarge, cc2.8xlarge, g2.2xlarge, cg1.4xlarge, r3.large, r3.xlarge, r3.2xlarge, r3.4xlarge, r3.8xlarge

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

getPlacement

public SpotPlacement getPlacement()
The placement information for the instance.

Returns:
The placement information for the instance.

setPlacement

public void setPlacement(SpotPlacement placement)
The placement information for the instance.

Parameters:
placement - The placement information for the instance.

withPlacement

public LaunchSpecification withPlacement(SpotPlacement placement)
The placement information for the instance.

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

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

getKernelId

public java.lang.String getKernelId()
The ID of the kernel.

Returns:
The ID of the kernel.

setKernelId

public void setKernelId(java.lang.String kernelId)
The ID of the kernel.

Parameters:
kernelId - The ID of the kernel.

withKernelId

public LaunchSpecification withKernelId(java.lang.String kernelId)
The ID of the kernel.

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

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

getRamdiskId

public java.lang.String getRamdiskId()
The ID of the RAM disk.

Returns:
The ID of the RAM disk.

setRamdiskId

public void setRamdiskId(java.lang.String ramdiskId)
The ID of the RAM disk.

Parameters:
ramdiskId - The ID of the RAM disk.

withRamdiskId

public LaunchSpecification withRamdiskId(java.lang.String ramdiskId)
The ID of the RAM disk.

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

Parameters:
ramdiskId - The ID of the RAM disk.
Returns:
A reference to this updated object so that method calls can be chained together.

getBlockDeviceMappings

public java.util.List<BlockDeviceMapping> getBlockDeviceMappings()
One or more block device mapping entries.

Returns:
One or more block device mapping entries.

setBlockDeviceMappings

public void setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.

Parameters:
blockDeviceMappings - One or more block device mapping entries.

withBlockDeviceMappings

public LaunchSpecification withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
One or more block device mapping entries.

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

Parameters:
blockDeviceMappings - One or more block device mapping entries.
Returns:
A reference to this updated object so that method calls can be chained together.

withBlockDeviceMappings

public LaunchSpecification withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.

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

Parameters:
blockDeviceMappings - One or more block device mapping entries.
Returns:
A reference to this updated object so that method calls can be chained together.

isMonitoringEnabled

public java.lang.Boolean isMonitoringEnabled()
Enables monitoring for the instance.

Default: Disabled

Returns:
Enables monitoring for the instance.

Default: Disabled


setMonitoringEnabled

public void setMonitoringEnabled(java.lang.Boolean monitoringEnabled)
Enables monitoring for the instance.

Default: Disabled

Parameters:
monitoringEnabled - Enables monitoring for the instance.

Default: Disabled


withMonitoringEnabled

public LaunchSpecification withMonitoringEnabled(java.lang.Boolean monitoringEnabled)
Enables monitoring for the instance.

Default: Disabled

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

Parameters:
monitoringEnabled - Enables monitoring for the instance.

Default: Disabled

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

getMonitoringEnabled

public java.lang.Boolean getMonitoringEnabled()
Enables monitoring for the instance.

Default: Disabled

Returns:
Enables monitoring for the instance.

Default: Disabled


getSubnetId

public java.lang.String getSubnetId()
The ID of the subnet in which to launch the Spot Instance.

Returns:
The ID of the subnet in which to launch the Spot Instance.

setSubnetId

public void setSubnetId(java.lang.String subnetId)
The ID of the subnet in which to launch the Spot Instance.

Parameters:
subnetId - The ID of the subnet in which to launch the Spot Instance.

withSubnetId

public LaunchSpecification withSubnetId(java.lang.String subnetId)
The ID of the subnet in which to launch the Spot Instance.

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

Parameters:
subnetId - The ID of the subnet in which to launch the Spot Instance.
Returns:
A reference to this updated object so that method calls can be chained together.

getNetworkInterfaces

public java.util.List<InstanceNetworkInterfaceSpecification> getNetworkInterfaces()
One or more network interfaces.

Returns:
One or more network interfaces.

setNetworkInterfaces

public void setNetworkInterfaces(java.util.Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
One or more network interfaces.

Parameters:
networkInterfaces - One or more network interfaces.

withNetworkInterfaces

public LaunchSpecification withNetworkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
One or more network interfaces.

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

Parameters:
networkInterfaces - One or more network interfaces.
Returns:
A reference to this updated object so that method calls can be chained together.

withNetworkInterfaces

public LaunchSpecification withNetworkInterfaces(java.util.Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
One or more network interfaces.

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

Parameters:
networkInterfaces - One or more network interfaces.
Returns:
A reference to this updated object so that method calls can be chained together.

getIamInstanceProfile

public IamInstanceProfileSpecification getIamInstanceProfile()
The IAM instance profile.

Returns:
The IAM instance profile.

setIamInstanceProfile

public void setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.

Parameters:
iamInstanceProfile - The IAM instance profile.

withIamInstanceProfile

public LaunchSpecification withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.

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

Parameters:
iamInstanceProfile - The IAM instance profile.
Returns:
A reference to this updated object so that method calls can be chained together.

isEbsOptimized

public java.lang.Boolean 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


setEbsOptimized

public void setEbsOptimized(java.lang.Boolean 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

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


withEbsOptimized

public LaunchSpecification withEbsOptimized(java.lang.Boolean 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 a reference to this object so that method calls can be chained together.

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:
A reference to this updated object so that method calls can be chained together.

getEbsOptimized

public java.lang.Boolean 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


toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


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