com.amazonaws.services.ec2.model
Class ModifyInstanceAttributeRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.ModifyInstanceAttributeRequest
All Implemented Interfaces:
DryRunSupportedRequest<ModifyInstanceAttributeRequest>, java.io.Serializable

public class ModifyInstanceAttributeRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<ModifyInstanceAttributeRequest>

Container for the parameters to the ModifyInstanceAttribute operation.

Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.

To modify some attributes, the instance must be stopped. For more information, see Modifying Attributes of a Stopped Instance in the Amazon Elastic Compute Cloud User Guide .

See Also:
AmazonEC2.modifyInstanceAttribute(ModifyInstanceAttributeRequest), Serialized Form

Constructor Summary
ModifyInstanceAttributeRequest()
          Default constructor for a new ModifyInstanceAttributeRequest object.
ModifyInstanceAttributeRequest(java.lang.String instanceId, InstanceAttributeName attribute)
          Constructs a new ModifyInstanceAttributeRequest object.
ModifyInstanceAttributeRequest(java.lang.String instanceId, java.lang.String attribute)
          Constructs a new ModifyInstanceAttributeRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAttribute()
          The name of the attribute.
 java.util.List<InstanceBlockDeviceMappingSpecification> getBlockDeviceMappings()
          Modifies the DeleteOnTermination attribute for volumes that are currently attached.
 java.lang.Boolean getDisableApiTermination()
          Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.
 Request<ModifyInstanceAttributeRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.lang.Boolean getEbsOptimized()
          Specifies whether the instance is optimized for EBS I/O.
 java.util.List<java.lang.String> getGroups()
          [EC2-VPC] Changes the security groups of the instance.
 java.lang.String getInstanceId()
          The ID of the instance.
 java.lang.String getInstanceInitiatedShutdownBehavior()
          Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
 java.lang.String getInstanceType()
          Changes the instance type to the specified value.
 java.lang.String getKernel()
          Changes the instance's kernel to the specified value.
 java.lang.String getRamdisk()
          Changes the instance's RAM disk to the specified value.
 java.lang.Boolean getSourceDestCheck()
          Specifies whether source/destination checking is enabled.
 java.lang.String getSriovNetSupport()
          Set to simple to enable enhanced networking for the instance.
 java.lang.String getUserData()
          Changes the instance's user data to the specified value.
 java.lang.String getValue()
          A new value for the attribute.
 int hashCode()
           
 java.lang.Boolean isDisableApiTermination()
          Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.
 java.lang.Boolean isEbsOptimized()
          Specifies whether the instance is optimized for EBS I/O.
 java.lang.Boolean isSourceDestCheck()
          Specifies whether source/destination checking is enabled.
 void setAttribute(InstanceAttributeName attribute)
          The name of the attribute.
 void setAttribute(java.lang.String attribute)
          The name of the attribute.
 void setBlockDeviceMappings(java.util.Collection<InstanceBlockDeviceMappingSpecification> blockDeviceMappings)
          Modifies the DeleteOnTermination attribute for volumes that are currently attached.
 void setDisableApiTermination(java.lang.Boolean disableApiTermination)
          Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.
 void setEbsOptimized(java.lang.Boolean ebsOptimized)
          Specifies whether the instance is optimized for EBS I/O.
 void setGroups(java.util.Collection<java.lang.String> groups)
          [EC2-VPC] Changes the security groups of the instance.
 void setInstanceId(java.lang.String instanceId)
          The ID of the instance.
 void setInstanceInitiatedShutdownBehavior(java.lang.String instanceInitiatedShutdownBehavior)
          Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
 void setInstanceType(java.lang.String instanceType)
          Changes the instance type to the specified value.
 void setKernel(java.lang.String kernel)
          Changes the instance's kernel to the specified value.
 void setRamdisk(java.lang.String ramdisk)
          Changes the instance's RAM disk to the specified value.
 void setSourceDestCheck(java.lang.Boolean sourceDestCheck)
          Specifies whether source/destination checking is enabled.
 void setSriovNetSupport(java.lang.String sriovNetSupport)
          Set to simple to enable enhanced networking for the instance.
 void setUserData(java.lang.String userData)
          Changes the instance's user data to the specified value.
 void setValue(java.lang.String value)
          A new value for the attribute.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 ModifyInstanceAttributeRequest withAttribute(InstanceAttributeName attribute)
          The name of the attribute.
 ModifyInstanceAttributeRequest withAttribute(java.lang.String attribute)
          The name of the attribute.
 ModifyInstanceAttributeRequest withBlockDeviceMappings(java.util.Collection<InstanceBlockDeviceMappingSpecification> blockDeviceMappings)
          Modifies the DeleteOnTermination attribute for volumes that are currently attached.
 ModifyInstanceAttributeRequest withBlockDeviceMappings(InstanceBlockDeviceMappingSpecification... blockDeviceMappings)
          Modifies the DeleteOnTermination attribute for volumes that are currently attached.
 ModifyInstanceAttributeRequest withDisableApiTermination(java.lang.Boolean disableApiTermination)
          Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.
 ModifyInstanceAttributeRequest withEbsOptimized(java.lang.Boolean ebsOptimized)
          Specifies whether the instance is optimized for EBS I/O.
 ModifyInstanceAttributeRequest withGroups(java.util.Collection<java.lang.String> groups)
          [EC2-VPC] Changes the security groups of the instance.
 ModifyInstanceAttributeRequest withGroups(java.lang.String... groups)
          [EC2-VPC] Changes the security groups of the instance.
 ModifyInstanceAttributeRequest withInstanceId(java.lang.String instanceId)
          The ID of the instance.
 ModifyInstanceAttributeRequest withInstanceInitiatedShutdownBehavior(java.lang.String instanceInitiatedShutdownBehavior)
          Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
 ModifyInstanceAttributeRequest withInstanceType(java.lang.String instanceType)
          Changes the instance type to the specified value.
 ModifyInstanceAttributeRequest withKernel(java.lang.String kernel)
          Changes the instance's kernel to the specified value.
 ModifyInstanceAttributeRequest withRamdisk(java.lang.String ramdisk)
          Changes the instance's RAM disk to the specified value.
 ModifyInstanceAttributeRequest withSourceDestCheck(java.lang.Boolean sourceDestCheck)
          Specifies whether source/destination checking is enabled.
 ModifyInstanceAttributeRequest withSriovNetSupport(java.lang.String sriovNetSupport)
          Set to simple to enable enhanced networking for the instance.
 ModifyInstanceAttributeRequest withUserData(java.lang.String userData)
          Changes the instance's user data to the specified value.
 ModifyInstanceAttributeRequest withValue(java.lang.String value)
          A new value for the attribute.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModifyInstanceAttributeRequest

public ModifyInstanceAttributeRequest()
Default constructor for a new ModifyInstanceAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


ModifyInstanceAttributeRequest

public ModifyInstanceAttributeRequest(java.lang.String instanceId,
                                      java.lang.String attribute)
Constructs a new ModifyInstanceAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
instanceId - The ID of the instance.
attribute - The name of the attribute.

ModifyInstanceAttributeRequest

public ModifyInstanceAttributeRequest(java.lang.String instanceId,
                                      InstanceAttributeName attribute)
Constructs a new ModifyInstanceAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
instanceId - The ID of the instance.
attribute - The name of the attribute.
Method Detail

getInstanceId

public java.lang.String getInstanceId()
The ID of the instance.

Returns:
The ID of the instance.

setInstanceId

public void setInstanceId(java.lang.String instanceId)
The ID of the instance.

Parameters:
instanceId - The ID of the instance.

withInstanceId

public ModifyInstanceAttributeRequest withInstanceId(java.lang.String instanceId)
The ID of the instance.

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

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

getAttribute

public java.lang.String getAttribute()
The name of the attribute.

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Returns:
The name of the attribute.
See Also:
InstanceAttributeName

setAttribute

public void setAttribute(java.lang.String attribute)
The name of the attribute.

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Parameters:
attribute - The name of the attribute.
See Also:
InstanceAttributeName

withAttribute

public ModifyInstanceAttributeRequest withAttribute(java.lang.String attribute)
The name of the attribute.

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

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Parameters:
attribute - The name of the attribute.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
InstanceAttributeName

setAttribute

public void setAttribute(InstanceAttributeName attribute)
The name of the attribute.

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Parameters:
attribute - The name of the attribute.
See Also:
InstanceAttributeName

withAttribute

public ModifyInstanceAttributeRequest withAttribute(InstanceAttributeName attribute)
The name of the attribute.

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

Constraints:
Allowed Values: instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, blockDeviceMapping, productCodes, sourceDestCheck, groupSet, ebsOptimized, sriovNetSupport

Parameters:
attribute - The name of the attribute.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
InstanceAttributeName

getValue

public java.lang.String getValue()
A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.

Returns:
A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.

setValue

public void setValue(java.lang.String value)
A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.

Parameters:
value - A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.

withValue

public ModifyInstanceAttributeRequest withValue(java.lang.String value)
A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.

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

Parameters:
value - A new value for the attribute. Use only with the kernel, ramdisk, userData, disableApiTermination, or intanceInitiateShutdownBehavior attribute.
Returns:
A reference to this updated object so that method calls can be chained together.

getBlockDeviceMappings

public java.util.List<InstanceBlockDeviceMappingSpecification> getBlockDeviceMappings()
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

Returns:
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.


setBlockDeviceMappings

public void setBlockDeviceMappings(java.util.Collection<InstanceBlockDeviceMappingSpecification> blockDeviceMappings)
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

Parameters:
blockDeviceMappings - Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.


withBlockDeviceMappings

public ModifyInstanceAttributeRequest withBlockDeviceMappings(InstanceBlockDeviceMappingSpecification... blockDeviceMappings)
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

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

Parameters:
blockDeviceMappings - Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

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

withBlockDeviceMappings

public ModifyInstanceAttributeRequest withBlockDeviceMappings(java.util.Collection<InstanceBlockDeviceMappingSpecification> blockDeviceMappings)
Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

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

Parameters:
blockDeviceMappings - Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination, the default is true and the volume is deleted when the instance is terminated.

To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Updating the Block Device Mapping when Launching an Instance in the Amazon Elastic Compute Cloud User Guide.

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

isSourceDestCheck

public java.lang.Boolean isSourceDestCheck()
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

Returns:
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

setSourceDestCheck

public void setSourceDestCheck(java.lang.Boolean sourceDestCheck)
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

Parameters:
sourceDestCheck - Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

withSourceDestCheck

public ModifyInstanceAttributeRequest withSourceDestCheck(java.lang.Boolean sourceDestCheck)
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

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

Parameters:
sourceDestCheck - Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.
Returns:
A reference to this updated object so that method calls can be chained together.

getSourceDestCheck

public java.lang.Boolean getSourceDestCheck()
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

Returns:
Specifies whether source/destination checking is enabled. A value of true means that checking is enabled, and false means checking is disabled. This value must be false for a NAT instance to perform NAT.

isDisableApiTermination

public java.lang.Boolean isDisableApiTermination()
Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.

Returns:
Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.

setDisableApiTermination

public void setDisableApiTermination(java.lang.Boolean disableApiTermination)
Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.

Parameters:
disableApiTermination - Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.

withDisableApiTermination

public ModifyInstanceAttributeRequest withDisableApiTermination(java.lang.Boolean disableApiTermination)
Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.

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

Parameters:
disableApiTermination - Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.
Returns:
A reference to this updated object so that method calls can be chained together.

getDisableApiTermination

public java.lang.Boolean getDisableApiTermination()
Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.

Returns:
Specifies whether to disable the ability to terminate the instance using the Amazon EC2 console, CLI, and API.

getInstanceType

public java.lang.String getInstanceType()
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.

Returns:
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.

setInstanceType

public void setInstanceType(java.lang.String instanceType)
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.

Parameters:
instanceType - Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.

withInstanceType

public ModifyInstanceAttributeRequest withInstanceType(java.lang.String instanceType)
Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.

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

Parameters:
instanceType - Changes the instance type to the specified value. For more information, see Instance Types. If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.
Returns:
A reference to this updated object so that method calls can be chained together.

getKernel

public java.lang.String getKernel()
Changes the instance's kernel to the specified value.

Returns:
Changes the instance's kernel to the specified value.

setKernel

public void setKernel(java.lang.String kernel)
Changes the instance's kernel to the specified value.

Parameters:
kernel - Changes the instance's kernel to the specified value.

withKernel

public ModifyInstanceAttributeRequest withKernel(java.lang.String kernel)
Changes the instance's kernel to the specified value.

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

Parameters:
kernel - Changes the instance's kernel to the specified value.
Returns:
A reference to this updated object so that method calls can be chained together.

getRamdisk

public java.lang.String getRamdisk()
Changes the instance's RAM disk to the specified value.

Returns:
Changes the instance's RAM disk to the specified value.

setRamdisk

public void setRamdisk(java.lang.String ramdisk)
Changes the instance's RAM disk to the specified value.

Parameters:
ramdisk - Changes the instance's RAM disk to the specified value.

withRamdisk

public ModifyInstanceAttributeRequest withRamdisk(java.lang.String ramdisk)
Changes the instance's RAM disk to the specified value.

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

Parameters:
ramdisk - Changes the instance's RAM disk to the specified value.
Returns:
A reference to this updated object so that method calls can be chained together.

getUserData

public java.lang.String getUserData()
Changes the instance's user data to the specified value.

Returns:
Changes the instance's user data to the specified value.

setUserData

public void setUserData(java.lang.String userData)
Changes the instance's user data to the specified value.

Parameters:
userData - Changes the instance's user data to the specified value.

withUserData

public ModifyInstanceAttributeRequest withUserData(java.lang.String userData)
Changes the instance's user data to the specified value.

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

Parameters:
userData - Changes the instance's user data to the specified value.
Returns:
A reference to this updated object so that method calls can be chained together.

getInstanceInitiatedShutdownBehavior

public java.lang.String getInstanceInitiatedShutdownBehavior()
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

Returns:
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

setInstanceInitiatedShutdownBehavior

public void setInstanceInitiatedShutdownBehavior(java.lang.String instanceInitiatedShutdownBehavior)
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

Parameters:
instanceInitiatedShutdownBehavior - Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

withInstanceInitiatedShutdownBehavior

public ModifyInstanceAttributeRequest withInstanceInitiatedShutdownBehavior(java.lang.String instanceInitiatedShutdownBehavior)
Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

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

Parameters:
instanceInitiatedShutdownBehavior - Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Returns:
A reference to this updated object so that method calls can be chained together.

getGroups

public java.util.List<java.lang.String> getGroups()
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

For example, if you want the instance to be in sg-1a1a1a1a and sg-9b9b9b9b, specify GroupId.1=sg-1a1a1a1a and GroupId.2=sg-9b9b9b9b.

Returns:
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

For example, if you want the instance to be in sg-1a1a1a1a and sg-9b9b9b9b, specify GroupId.1=sg-1a1a1a1a and GroupId.2=sg-9b9b9b9b.


setGroups

public void setGroups(java.util.Collection<java.lang.String> groups)
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

For example, if you want the instance to be in sg-1a1a1a1a and sg-9b9b9b9b, specify GroupId.1=sg-1a1a1a1a and GroupId.2=sg-9b9b9b9b.

Parameters:
groups - [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

For example, if you want the instance to be in sg-1a1a1a1a and sg-9b9b9b9b, specify GroupId.1=sg-1a1a1a1a and GroupId.2=sg-9b9b9b9b.


withGroups

public ModifyInstanceAttributeRequest withGroups(java.lang.String... groups)
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

For example, if you want the instance to be in sg-1a1a1a1a and sg-9b9b9b9b, specify GroupId.1=sg-1a1a1a1a and GroupId.2=sg-9b9b9b9b.

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

Parameters:
groups - [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

For example, if you want the instance to be in sg-1a1a1a1a and sg-9b9b9b9b, specify GroupId.1=sg-1a1a1a1a and GroupId.2=sg-9b9b9b9b.

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

withGroups

public ModifyInstanceAttributeRequest withGroups(java.util.Collection<java.lang.String> groups)
[EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

For example, if you want the instance to be in sg-1a1a1a1a and sg-9b9b9b9b, specify GroupId.1=sg-1a1a1a1a and GroupId.2=sg-9b9b9b9b.

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

Parameters:
groups - [EC2-VPC] Changes the security groups of the instance. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

For example, if you want the instance to be in sg-1a1a1a1a and sg-9b9b9b9b, specify GroupId.1=sg-1a1a1a1a and GroupId.2=sg-9b9b9b9b.

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

isEbsOptimized

public java.lang.Boolean isEbsOptimized()
Specifies 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.

Returns:
Specifies 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.

setEbsOptimized

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

Parameters:
ebsOptimized - Specifies 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.

withEbsOptimized

public ModifyInstanceAttributeRequest withEbsOptimized(java.lang.Boolean ebsOptimized)
Specifies 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.

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

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

getEbsOptimized

public java.lang.Boolean getEbsOptimized()
Specifies 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.

Returns:
Specifies 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.

getSriovNetSupport

public java.lang.String getSriovNetSupport()
Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

Returns:
Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.


setSriovNetSupport

public void setSriovNetSupport(java.lang.String sriovNetSupport)
Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

Parameters:
sriovNetSupport - Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.


withSriovNetSupport

public ModifyInstanceAttributeRequest withSriovNetSupport(java.lang.String sriovNetSupport)
Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

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

Parameters:
sriovNetSupport - Set to simple to enable enhanced networking for the instance.

There is no way to disable enhanced networking at this time.

This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

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

getDryRunRequest

public Request<ModifyInstanceAttributeRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.

Specified by:
getDryRunRequest in interface DryRunSupportedRequest<ModifyInstanceAttributeRequest>

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.