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 InstanceAttributeclone()booleanequals(Object obj)List<InstanceBlockDeviceMapping>getBlockDeviceMappings()The block device mapping of the instance.BooleangetDisableApiTermination()If the value istrue, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.BooleangetEbsOptimized()Indicates whether the instance is optimized for EBS I/O.List<GroupIdentifier>getGroups()The security groups associated with the instance.StringgetInstanceId()The ID of the instance.StringgetInstanceInitiatedShutdownBehavior()Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).StringgetInstanceType()The instance type.StringgetKernelId()The kernel ID.List<ProductCode>getProductCodes()A list of product codes.StringgetRamdiskId()The RAM disk ID.StringgetRootDeviceName()The name of the root device (for example,/dev/sda1or/dev/xvda).BooleangetSourceDestCheck()Indicates whether source/destination checking is enabled.StringgetSriovNetSupport()StringgetUserData()The Base64-encoded MIME user data.inthashCode()BooleanisDisableApiTermination()If the value istrue, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.BooleanisEbsOptimized()Indicates whether the instance is optimized for EBS I/O.BooleanisSourceDestCheck()Indicates whether source/destination checking is enabled.voidsetBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)The block device mapping of the instance.voidsetDisableApiTermination(Boolean disableApiTermination)If the value istrue, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.voidsetEbsOptimized(Boolean ebsOptimized)Indicates whether the instance is optimized for EBS I/O.voidsetGroups(Collection<GroupIdentifier> groups)The security groups associated with the instance.voidsetInstanceId(String instanceId)The ID of the instance.voidsetInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).voidsetInstanceType(String instanceType)The instance type.voidsetKernelId(String kernelId)The kernel ID.voidsetProductCodes(Collection<ProductCode> productCodes)A list of product codes.voidsetRamdiskId(String ramdiskId)The RAM disk ID.voidsetRootDeviceName(String rootDeviceName)The name of the root device (for example,/dev/sda1or/dev/xvda).voidsetSourceDestCheck(Boolean sourceDestCheck)Indicates whether source/destination checking is enabled.voidsetSriovNetSupport(String sriovNetSupport)voidsetUserData(String userData)The Base64-encoded MIME user data.StringtoString()Returns a string representation of this object; useful for testing and debugging.InstanceAttributewithBlockDeviceMappings(InstanceBlockDeviceMapping... blockDeviceMappings)The block device mapping of the instance.InstanceAttributewithBlockDeviceMappings(Collection<InstanceBlockDeviceMapping> blockDeviceMappings)The block device mapping of the instance.InstanceAttributewithDisableApiTermination(Boolean disableApiTermination)If the value istrue, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.InstanceAttributewithEbsOptimized(Boolean ebsOptimized)Indicates whether the instance is optimized for EBS I/O.InstanceAttributewithGroups(GroupIdentifier... groups)The security groups associated with the instance.InstanceAttributewithGroups(Collection<GroupIdentifier> groups)The security groups associated with the instance.InstanceAttributewithInstanceId(String instanceId)The ID of the instance.InstanceAttributewithInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).InstanceAttributewithInstanceType(String instanceType)The instance type.InstanceAttributewithKernelId(String kernelId)The kernel ID.InstanceAttributewithProductCodes(ProductCode... productCodes)A list of product codes.InstanceAttributewithProductCodes(Collection<ProductCode> productCodes)A list of product codes.InstanceAttributewithRamdiskId(String ramdiskId)The RAM disk ID.InstanceAttributewithRootDeviceName(String rootDeviceName)The name of the root device (for example,/dev/sda1or/dev/xvda).InstanceAttributewithSourceDestCheck(Boolean sourceDestCheck)Indicates whether source/destination checking is enabled.InstanceAttributewithSriovNetSupport(String sriovNetSupport)InstanceAttributewithUserData(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/sda1or/dev/xvda).- Parameters:
rootDeviceName- The name of the root device (for example,/dev/sda1or/dev/xvda).
-
getRootDeviceName
public String getRootDeviceName()
The name of the root device (for example,
/dev/sda1or/dev/xvda).- Returns:
- The name of the root device (for example,
/dev/sda1or/dev/xvda).
-
withRootDeviceName
public InstanceAttribute withRootDeviceName(String rootDeviceName)
The name of the root device (for example,
/dev/sda1or/dev/xvda).- Parameters:
rootDeviceName- The name of the root device (for example,/dev/sda1or/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
truemeans checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.- Parameters:
sourceDestCheck- Indicates whether source/destination checking is enabled. A value oftruemeans checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.
-
getSourceDestCheck
public Boolean getSourceDestCheck()
Indicates whether source/destination checking is enabled. A value of
truemeans checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.- Returns:
- Indicates whether source/destination checking is enabled. A value
of
truemeans checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.
-
withSourceDestCheck
public InstanceAttribute withSourceDestCheck(Boolean sourceDestCheck)
Indicates whether source/destination checking is enabled. A value of
truemeans checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.- Parameters:
sourceDestCheck- Indicates whether source/destination checking is enabled. A value oftruemeans checking is enabled, andfalsemeans checking is disabled. This value must befalsefor 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
truemeans checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.- Returns:
- Indicates whether source/destination checking is enabled. A value
of
truemeans checking is enabled, andfalsemeans checking is disabled. This value must befalsefor 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:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public InstanceAttribute clone()
-
-