Class InstanceAttribute
- All Implemented Interfaces:
Serializable
,Cloneable
Describes an instance attribute.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The block device mapping of the instance.If the value istrue
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.Indicates whether the instance is optimized for EBS I/O.The security groups associated with the instance.The ID of the instance.Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).The instance type.The kernel ID.A list of product codes.The RAM disk ID.The name of the root device (for example,/dev/sda1
or/dev/xvda
).Indicates whether source/destination checking is enabled.The Base64-encoded MIME user data.int
hashCode()
If the value istrue
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.Indicates whether the instance is optimized for EBS I/O.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.toString()
Returns a string representation of this object; useful for testing and debugging.withBlockDeviceMappings
(InstanceBlockDeviceMapping... blockDeviceMappings) The block device mapping of the instance.withBlockDeviceMappings
(Collection<InstanceBlockDeviceMapping> blockDeviceMappings) The block device mapping of the instance.withDisableApiTermination
(Boolean disableApiTermination) If the value istrue
, you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.withEbsOptimized
(Boolean ebsOptimized) Indicates whether the instance is optimized for EBS I/O.withGroups
(GroupIdentifier... groups) The security groups associated with the instance.withGroups
(Collection<GroupIdentifier> groups) The security groups associated with the instance.withInstanceId
(String instanceId) The ID of the instance.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).withInstanceType
(String instanceType) The instance type.withKernelId
(String kernelId) The kernel ID.withProductCodes
(ProductCode... productCodes) A list of product codes.withProductCodes
(Collection<ProductCode> productCodes) A list of product codes.withRamdiskId
(String ramdiskId) The RAM disk ID.withRootDeviceName
(String rootDeviceName) The name of the root device (for example,/dev/sda1
or/dev/xvda
).withSourceDestCheck
(Boolean sourceDestCheck) Indicates whether source/destination checking is enabled.withSriovNetSupport
(String sriovNetSupport) withUserData
(String userData) The Base64-encoded MIME user data.
-
Constructor Details
-
InstanceAttribute
public InstanceAttribute()
-
-
Method Details
-
setInstanceId
The ID of the instance.
- Parameters:
instanceId
- The ID of the instance.
-
getInstanceId
The ID of the instance.
- Returns:
- The ID of the instance.
-
withInstanceId
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
The instance type.
- Parameters:
instanceType
- The instance type.
-
getInstanceType
The instance type.
- Returns:
- The instance type.
-
withInstanceType
The instance type.
- Parameters:
instanceType
- The instance type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKernelId
The kernel ID.
- Parameters:
kernelId
- The kernel ID.
-
getKernelId
The kernel ID.
- Returns:
- The kernel ID.
-
withKernelId
The kernel ID.
- Parameters:
kernelId
- The kernel ID.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRamdiskId
The RAM disk ID.
- Parameters:
ramdiskId
- The RAM disk ID.
-
getRamdiskId
The RAM disk ID.
- Returns:
- The RAM disk ID.
-
withRamdiskId
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
The Base64-encoded MIME user data.
- Parameters:
userData
- The Base64-encoded MIME user data.
-
getUserData
The Base64-encoded MIME user data.
- Returns:
- The Base64-encoded MIME user data.
-
withUserData
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
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
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
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
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
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
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
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
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
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
The block device mapping of the instance.
- Returns:
- The block device mapping of the instance.
-
setBlockDeviceMappings
The block device mapping of the instance.
- Parameters:
blockDeviceMappings
- The block device mapping of the instance.
-
withBlockDeviceMappings
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
A list of product codes.
- Returns:
- A list of product codes.
-
setProductCodes
A list of product codes.
- Parameters:
productCodes
- A list of product codes.
-
withProductCodes
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
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
Indicates whether the instance is optimized for EBS I/O.
- Parameters:
ebsOptimized
- Indicates whether the instance is optimized for EBS I/O.
-
getEbsOptimized
Indicates whether the instance is optimized for EBS I/O.
- Returns:
- Indicates whether the instance is optimized for EBS I/O.
-
withEbsOptimized
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
Indicates whether the instance is optimized for EBS I/O.
- Returns:
- Indicates whether the instance is optimized for EBS I/O.
-
setSriovNetSupport
- Parameters:
sriovNetSupport
-
-
getSriovNetSupport
- Returns:
-
withSriovNetSupport
- Parameters:
sriovNetSupport
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSourceDestCheck
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
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
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
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
The security groups associated with the instance.
- Returns:
- The security groups associated with the instance.
-
setGroups
The security groups associated with the instance.
- Parameters:
groups
- The security groups associated with the instance.
-
withGroups
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
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
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-