public class LaunchSpecification
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes the launch specification for an instance.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
addressingType
Deprecated.
|
private SdkInternalList<GroupIdentifier> |
allSecurityGroups
One or more security groups.
|
private SdkInternalList<BlockDeviceMapping> |
blockDeviceMappings
One or more block device mapping entries.
|
private java.lang.Boolean |
ebsOptimized
Indicates whether the instance is optimized for EBS I/O.
|
private IamInstanceProfileSpecification |
iamInstanceProfile
The IAM instance profile.
|
private java.lang.String |
imageId
The ID of the AMI.
|
private java.lang.String |
instanceType
The instance type.
|
private java.lang.String |
kernelId
The ID of the kernel.
|
private java.lang.String |
keyName
The name of the key pair.
|
private java.lang.Boolean |
monitoringEnabled |
private SdkInternalList<InstanceNetworkInterfaceSpecification> |
networkInterfaces
One or more network interfaces.
|
private SpotPlacement |
placement
The placement information for the instance.
|
private java.lang.String |
ramdiskId
The ID of the RAM disk.
|
private SdkInternalList<java.lang.String> |
securityGroups
One or more security group names.
|
private java.lang.String |
subnetId
The ID of the subnet in which to launch the instance.
|
private java.lang.String |
userData
The Base64-encoded MIME user data to make available to the instances.
|
Constructor and Description |
---|
LaunchSpecification() |
Modifier and Type | Method and Description |
---|---|
LaunchSpecification |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAddressingType()
Deprecated.
|
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() |
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 group names.
|
java.lang.String |
getSubnetId()
The ID of the subnet in which to launch the 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() |
void |
setAddressingType(java.lang.String addressingType)
Deprecated.
|
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) |
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 group names.
|
void |
setSubnetId(java.lang.String subnetId)
The ID of the subnet in which to launch the 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)
Deprecated.
|
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) |
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 group names.
|
LaunchSpecification |
withSecurityGroups(java.lang.String... securityGroups)
One or more security group names.
|
LaunchSpecification |
withSubnetId(java.lang.String subnetId)
The ID of the subnet in which to launch the instance.
|
LaunchSpecification |
withUserData(java.lang.String userData)
The Base64-encoded MIME user data to make available to the instances.
|
private java.lang.String imageId
The ID of the AMI.
private java.lang.String keyName
The name of the key pair.
private java.lang.String userData
The Base64-encoded MIME user data to make available to the instances.
private java.lang.String addressingType
Deprecated.
private java.lang.String instanceType
The instance type.
private SpotPlacement placement
The placement information for the instance.
private java.lang.String kernelId
The ID of the kernel.
private java.lang.String ramdiskId
The ID of the RAM disk.
private SdkInternalList<BlockDeviceMapping> blockDeviceMappings
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
private java.lang.String subnetId
The ID of the subnet in which to launch the instance.
private SdkInternalList<InstanceNetworkInterfaceSpecification> networkInterfaces
One or more network interfaces.
private IamInstanceProfileSpecification iamInstanceProfile
The IAM instance profile.
private 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
private SdkInternalList<GroupIdentifier> allSecurityGroups
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
private java.lang.Boolean monitoringEnabled
private SdkInternalList<java.lang.String> securityGroups
One or more security group names.
public void setImageId(java.lang.String imageId)
The ID of the AMI.
imageId
- The ID of the AMI.public java.lang.String getImageId()
The ID of the AMI.
public LaunchSpecification withImageId(java.lang.String imageId)
The ID of the AMI.
imageId
- The ID of the AMI.public void setKeyName(java.lang.String keyName)
The name of the key pair.
keyName
- The name of the key pair.public java.lang.String getKeyName()
The name of the key pair.
public LaunchSpecification withKeyName(java.lang.String keyName)
The name of the key pair.
keyName
- The name of the key pair.public void setUserData(java.lang.String userData)
The Base64-encoded MIME user data to make available to the instances.
userData
- The Base64-encoded MIME user data to make available to the
instances.public java.lang.String getUserData()
The Base64-encoded MIME user data to make available to the instances.
public LaunchSpecification withUserData(java.lang.String userData)
The Base64-encoded MIME user data to make available to the instances.
userData
- The Base64-encoded MIME user data to make available to the
instances.public void setAddressingType(java.lang.String addressingType)
Deprecated.
addressingType
- Deprecated.public java.lang.String getAddressingType()
Deprecated.
public LaunchSpecification withAddressingType(java.lang.String addressingType)
Deprecated.
addressingType
- Deprecated.public void setInstanceType(java.lang.String instanceType)
The instance type.
instanceType
- The instance type.InstanceType
public java.lang.String getInstanceType()
The instance type.
InstanceType
public LaunchSpecification withInstanceType(java.lang.String instanceType)
The instance type.
instanceType
- The instance type.InstanceType
public void setInstanceType(InstanceType instanceType)
The instance type.
instanceType
- The instance type.InstanceType
public LaunchSpecification withInstanceType(InstanceType instanceType)
The instance type.
instanceType
- The instance type.InstanceType
public void setPlacement(SpotPlacement placement)
The placement information for the instance.
placement
- The placement information for the instance.public SpotPlacement getPlacement()
The placement information for the instance.
public LaunchSpecification withPlacement(SpotPlacement placement)
The placement information for the instance.
placement
- The placement information for the instance.public void setKernelId(java.lang.String kernelId)
The ID of the kernel.
kernelId
- The ID of the kernel.public java.lang.String getKernelId()
The ID of the kernel.
public LaunchSpecification withKernelId(java.lang.String kernelId)
The ID of the kernel.
kernelId
- The ID of the kernel.public void setRamdiskId(java.lang.String ramdiskId)
The ID of the RAM disk.
ramdiskId
- The ID of the RAM disk.public java.lang.String getRamdiskId()
The ID of the RAM disk.
public LaunchSpecification withRamdiskId(java.lang.String ramdiskId)
The ID of the RAM disk.
ramdiskId
- The ID of the RAM disk.public java.util.List<BlockDeviceMapping> getBlockDeviceMappings()
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
public void setBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
blockDeviceMappings
- One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
public LaunchSpecification withBlockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
NOTE: This method appends the values to the existing list (if
any). Use setBlockDeviceMappings(java.util.Collection)
or
withBlockDeviceMappings(java.util.Collection)
if you want to
override the existing values.
blockDeviceMappings
- One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
public LaunchSpecification withBlockDeviceMappings(java.util.Collection<BlockDeviceMapping> blockDeviceMappings)
One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
blockDeviceMappings
- One or more block device mapping entries.
Although you can specify encrypted EBS volumes in this block device mapping for your Spot Instances, these volumes are not encrypted.
public void setSubnetId(java.lang.String subnetId)
The ID of the subnet in which to launch the instance.
subnetId
- The ID of the subnet in which to launch the instance.public java.lang.String getSubnetId()
The ID of the subnet in which to launch the instance.
public LaunchSpecification withSubnetId(java.lang.String subnetId)
The ID of the subnet in which to launch the instance.
subnetId
- The ID of the subnet in which to launch the instance.public java.util.List<InstanceNetworkInterfaceSpecification> getNetworkInterfaces()
One or more network interfaces.
public void setNetworkInterfaces(java.util.Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
One or more network interfaces.
networkInterfaces
- One or more network interfaces.public LaunchSpecification 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)
or
withNetworkInterfaces(java.util.Collection)
if you want to
override the existing values.
networkInterfaces
- One or more network interfaces.public LaunchSpecification withNetworkInterfaces(java.util.Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
One or more network interfaces.
networkInterfaces
- One or more network interfaces.public void setIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.
iamInstanceProfile
- The IAM instance profile.public IamInstanceProfileSpecification getIamInstanceProfile()
The IAM instance profile.
public LaunchSpecification withIamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The IAM instance profile.
iamInstanceProfile
- The IAM instance profile.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
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
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
Default: false
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
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
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
Default: false
public java.util.List<GroupIdentifier> getAllSecurityGroups()
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
public void setAllSecurityGroups(java.util.Collection<GroupIdentifier> allSecurityGroups)
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
allSecurityGroups
- One or more security groups. When requesting instances in a VPC,
you must specify the IDs of the security groups. When requesting
instances in EC2-Classic, you can specify the names or the IDs of
the security groups.public LaunchSpecification withAllSecurityGroups(GroupIdentifier... allSecurityGroups)
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
NOTE: This method appends the values to the existing list (if
any). Use setAllSecurityGroups(java.util.Collection)
or
withAllSecurityGroups(java.util.Collection)
if you want to
override the existing values.
allSecurityGroups
- One or more security groups. When requesting instances in a VPC,
you must specify the IDs of the security groups. When requesting
instances in EC2-Classic, you can specify the names or the IDs of
the security groups.public LaunchSpecification withAllSecurityGroups(java.util.Collection<GroupIdentifier> allSecurityGroups)
One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.
allSecurityGroups
- One or more security groups. When requesting instances in a VPC,
you must specify the IDs of the security groups. When requesting
instances in EC2-Classic, you can specify the names or the IDs of
the security groups.public void setMonitoringEnabled(java.lang.Boolean monitoringEnabled)
monitoringEnabled
- public java.lang.Boolean getMonitoringEnabled()
public LaunchSpecification withMonitoringEnabled(java.lang.Boolean monitoringEnabled)
monitoringEnabled
- public java.lang.Boolean isMonitoringEnabled()
public java.util.List<java.lang.String> getSecurityGroups()
One or more security group names.
public void setSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
One or more security group names.
securityGroups
- One or more security group names.public LaunchSpecification withSecurityGroups(java.lang.String... securityGroups)
One or more security group names.
NOTE: This method appends the values to the existing list (if
any). Use setSecurityGroups(java.util.Collection)
or
withSecurityGroups(java.util.Collection)
if you want to override
the existing values.
securityGroups
- One or more security group names.public LaunchSpecification withSecurityGroups(java.util.Collection<java.lang.String> securityGroups)
One or more security group names.
securityGroups
- One or more security group names.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public LaunchSpecification clone()
clone
in class java.lang.Object