Class InstanceAttribute
- java.lang.Object
-
- com.amazonaws.services.ec2.model.InstanceAttribute
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class InstanceAttribute extends Object implements Serializable, Cloneable
Describes an instance attribute.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InstanceAttribute()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstanceAttribute
clone()
boolean
equals(Object obj)
List<InstanceBlockDeviceMapping>
getBlockDeviceMappings()
The block device mapping of the instance.Boolean
getDisableApiTermination()
If the value istrue
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.Boolean
getEbsOptimized()
Indicates whether the instance is optimized for EBS I/O.List<GroupIdentifier>
getGroups()
The security groups associated with the instance.String
getInstanceId()
The ID of the instance.String
getInstanceInitiatedShutdownBehavior()
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).String
getInstanceType()
The instance type.String
getKernelId()
The kernel ID.List<ProductCode>
getProductCodes()
A list of product codes.String
getRamdiskId()
The RAM disk ID.String
getRootDeviceName()
The name of the root device (for example,/dev/sda1
or/dev/xvda
).Boolean
getSourceDestCheck()
Indicates whether source/destination checking is enabled.String
getSriovNetSupport()
String
getUserData()
The Base64-encoded MIME user data.int
hashCode()
Boolean
isDisableApiTermination()
If the value istrue
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.Boolean
isEbsOptimized()
Indicates whether the instance is optimized for EBS I/O.Boolean
isSourceDestCheck()
Indicates whether source/destination checking is enabled.void
setBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)
The block device mapping of the instance.void
setDisableApiTermination(Boolean disableApiTermination)
If the value istrue
, you can't terminate the instance through 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
setGroups(Collection<GroupIdentifier> groups)
The security groups associated with the instance.void
setInstanceId(String instanceId)
The ID of the instance.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(String instanceType)
The instance type.void
setKernelId(String kernelId)
The kernel ID.void
setProductCodes(Collection<ProductCode> productCodes)
A list of product codes.void
setRamdiskId(String ramdiskId)
The RAM disk ID.void
setRootDeviceName(String rootDeviceName)
The name of the root device (for example,/dev/sda1
or/dev/xvda
).void
setSourceDestCheck(Boolean sourceDestCheck)
Indicates whether source/destination checking is enabled.void
setSriovNetSupport(String sriovNetSupport)
void
setUserData(String userData)
The Base64-encoded MIME user data.String
toString()
Returns a string representation of this object; useful for testing and debugging.InstanceAttribute
withBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings)
The block device mapping of the instance.InstanceAttribute
withBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)
The block device mapping of the instance.InstanceAttribute
withDisableApiTermination(Boolean disableApiTermination)
If the value istrue
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.InstanceAttribute
withEbsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for EBS I/O.InstanceAttribute
withGroups(GroupIdentifier... groups)
The security groups associated with the instance.InstanceAttribute
withGroups(Collection<GroupIdentifier> groups)
The security groups associated with the instance.InstanceAttribute
withInstanceId(String instanceId)
The ID of the instance.InstanceAttribute
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).InstanceAttribute
withInstanceType(String instanceType)
The instance type.InstanceAttribute
withKernelId(String kernelId)
The kernel ID.InstanceAttribute
withProductCodes(ProductCode... productCodes)
A list of product codes.InstanceAttribute
withProductCodes(Collection<ProductCode> productCodes)
A list of product codes.InstanceAttribute
withRamdiskId(String ramdiskId)
The RAM disk ID.InstanceAttribute
withRootDeviceName(String rootDeviceName)
The name of the root device (for example,/dev/sda1
or/dev/xvda
).InstanceAttribute
withSourceDestCheck(Boolean sourceDestCheck)
Indicates whether source/destination checking is enabled.InstanceAttribute
withSriovNetSupport(String sriovNetSupport)
InstanceAttribute
withUserData(String userData)
The Base64-encoded MIME user data.
-
-
-
Method Detail
-
setInstanceId
public void setInstanceId(String instanceId)
The ID of the instance.
- Parameters:
instanceId
- The ID of the instance.
-
getInstanceId
public String getInstanceId()
The ID of the instance.
- Returns:
- The ID of the instance.
-
withInstanceId
public InstanceAttribute withInstanceId(String instanceId)
The ID of the instance.
- Parameters:
instanceId
- The ID of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceType
public void setInstanceType(String instanceType)
The instance type.
- Parameters:
instanceType
- The instance type.
-
getInstanceType
public String getInstanceType()
The instance type.
- Returns:
- The instance type.
-
withInstanceType
public InstanceAttribute withInstanceType(String instanceType)
The instance type.
- Parameters:
instanceType
- The instance type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKernelId
public void setKernelId(String kernelId)
The kernel ID.
- Parameters:
kernelId
- The kernel ID.
-
getKernelId
public String getKernelId()
The kernel ID.
- Returns:
- The kernel ID.
-
withKernelId
public InstanceAttribute withKernelId(String kernelId)
The kernel ID.
- Parameters:
kernelId
- The kernel ID.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRamdiskId
public void setRamdiskId(String ramdiskId)
The RAM disk ID.
- Parameters:
ramdiskId
- The RAM disk ID.
-
getRamdiskId
public String getRamdiskId()
The RAM disk ID.
- Returns:
- The RAM disk ID.
-
withRamdiskId
public InstanceAttribute withRamdiskId(String ramdiskId)
The RAM disk ID.
- Parameters:
ramdiskId
- The RAM disk ID.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUserData
public void setUserData(String userData)
The Base64-encoded MIME user data.
- Parameters:
userData
- The Base64-encoded MIME user data.
-
getUserData
public String getUserData()
The Base64-encoded MIME user data.
- Returns:
- The Base64-encoded MIME user data.
-
withUserData
public InstanceAttribute withUserData(String userData)
The Base64-encoded MIME user data.
- Parameters:
userData
- The Base64-encoded MIME user data.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDisableApiTermination
public void setDisableApiTermination(Boolean disableApiTermination)
If the value is
true
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.- Parameters:
disableApiTermination
- If the value istrue
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.
-
getDisableApiTermination
public Boolean getDisableApiTermination()
If the value is
true
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.- Returns:
- If the value is
true
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.
-
withDisableApiTermination
public InstanceAttribute withDisableApiTermination(Boolean disableApiTermination)
If the value is
true
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.- Parameters:
disableApiTermination
- If the value istrue
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isDisableApiTermination
public Boolean isDisableApiTermination()
If the value is
true
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.- Returns:
- If the value is
true
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.
-
setInstanceInitiatedShutdownBehavior
public void setInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
- Parameters:
instanceInitiatedShutdownBehavior
- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
-
getInstanceInitiatedShutdownBehavior
public String getInstanceInitiatedShutdownBehavior()
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
- Returns:
- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
-
withInstanceInitiatedShutdownBehavior
public InstanceAttribute 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).
- Parameters:
instanceInitiatedShutdownBehavior
- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRootDeviceName
public void setRootDeviceName(String rootDeviceName)
The name of the root device (for example,
/dev/sda1
or/dev/xvda
).- Parameters:
rootDeviceName
- The name of the root device (for example,/dev/sda1
or/dev/xvda
).
-
getRootDeviceName
public String getRootDeviceName()
The name of the root device (for example,
/dev/sda1
or/dev/xvda
).- Returns:
- The name of the root device (for example,
/dev/sda1
or/dev/xvda
).
-
withRootDeviceName
public InstanceAttribute withRootDeviceName(String rootDeviceName)
The name of the root device (for example,
/dev/sda1
or/dev/xvda
).- Parameters:
rootDeviceName
- The name of the root device (for example,/dev/sda1
or/dev/xvda
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBlockDeviceMappings
public List<InstanceBlockDeviceMapping> getBlockDeviceMappings()
The block device mapping of the instance.
- Returns:
- The block device mapping of the instance.
-
setBlockDeviceMappings
public void setBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)
The block device mapping of the instance.
- Parameters:
blockDeviceMappings
- The block device mapping of the instance.
-
withBlockDeviceMappings
public InstanceAttribute withBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings)
The block device mapping of the instance.
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 of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBlockDeviceMappings
public InstanceAttribute withBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)
The block device mapping of the instance.
- Parameters:
blockDeviceMappings
- The block device mapping of the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getProductCodes
public List<ProductCode> getProductCodes()
A list of product codes.
- Returns:
- A list of product codes.
-
setProductCodes
public void setProductCodes(Collection<ProductCode> productCodes)
A list of product codes.
- Parameters:
productCodes
- A list of product codes.
-
withProductCodes
public InstanceAttribute withProductCodes(ProductCode... productCodes)
A list of product codes.
NOTE: This method appends the values to the existing list (if any). Use
setProductCodes(java.util.Collection)
orwithProductCodes(java.util.Collection)
if you want to override the existing values.- Parameters:
productCodes
- A list of product codes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withProductCodes
public InstanceAttribute withProductCodes(Collection<ProductCode> productCodes)
A list of product codes.
- Parameters:
productCodes
- A list of product codes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEbsOptimized
public void setEbsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for EBS I/O.
- Parameters:
ebsOptimized
- Indicates whether the instance is optimized for EBS I/O.
-
getEbsOptimized
public Boolean getEbsOptimized()
Indicates whether the instance is optimized for EBS I/O.
- Returns:
- Indicates whether the instance is optimized for EBS I/O.
-
withEbsOptimized
public InstanceAttribute withEbsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for EBS I/O.
- Parameters:
ebsOptimized
- Indicates whether the instance is optimized for EBS I/O.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEbsOptimized
public Boolean isEbsOptimized()
Indicates whether the instance is optimized for EBS I/O.
- Returns:
- Indicates whether the instance is optimized for EBS I/O.
-
setSriovNetSupport
public void setSriovNetSupport(String sriovNetSupport)
- Parameters:
sriovNetSupport
-
-
getSriovNetSupport
public String getSriovNetSupport()
- Returns:
-
withSriovNetSupport
public InstanceAttribute withSriovNetSupport(String sriovNetSupport)
- Parameters:
sriovNetSupport
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSourceDestCheck
public void setSourceDestCheck(Boolean sourceDestCheck)
Indicates whether source/destination checking is enabled. A value of
true
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT.- Parameters:
sourceDestCheck
- Indicates whether source/destination checking is enabled. A value oftrue
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT.
-
getSourceDestCheck
public Boolean getSourceDestCheck()
Indicates whether source/destination checking is enabled. A value of
true
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT.- Returns:
- Indicates whether source/destination checking is enabled. A value
of
true
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT.
-
withSourceDestCheck
public InstanceAttribute withSourceDestCheck(Boolean sourceDestCheck)
Indicates whether source/destination checking is enabled. A value of
true
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT.- Parameters:
sourceDestCheck
- Indicates whether source/destination checking is enabled. A value oftrue
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isSourceDestCheck
public Boolean isSourceDestCheck()
Indicates whether source/destination checking is enabled. A value of
true
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT.- Returns:
- Indicates whether source/destination checking is enabled. A value
of
true
means checking is enabled, andfalse
means checking is disabled. This value must befalse
for a NAT instance to perform NAT.
-
getGroups
public List<GroupIdentifier> getGroups()
The security groups associated with the instance.
- Returns:
- The security groups associated with the instance.
-
setGroups
public void setGroups(Collection<GroupIdentifier> groups)
The security groups associated with the instance.
- Parameters:
groups
- The security groups associated with the instance.
-
withGroups
public InstanceAttribute withGroups(GroupIdentifier... groups)
The security groups associated with the instance.
NOTE: This method appends the values to the existing list (if any). Use
setGroups(java.util.Collection)
orwithGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
groups
- The security groups associated with the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withGroups
public InstanceAttribute withGroups(Collection<GroupIdentifier> groups)
The security groups associated with the instance.
- Parameters:
groups
- The security groups associated with the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public InstanceAttribute clone()
-
-