Class ModifyInstanceAttributeRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.ec2.model.ModifyInstanceAttributeRequest
-
- All Implemented Interfaces:
ReadLimitInfo,DryRunSupportedRequest<ModifyInstanceAttributeRequest>,Serializable,Cloneable
public class ModifyInstanceAttributeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<ModifyInstanceAttributeRequest>
Contains the parameters for ModifyInstanceAttribute.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description ModifyInstanceAttributeRequest()Default constructor for ModifyInstanceAttributeRequest object.ModifyInstanceAttributeRequest(String instanceId, InstanceAttributeName attribute)Constructs a new ModifyInstanceAttributeRequest object.ModifyInstanceAttributeRequest(String instanceId, String attribute)Constructs a new ModifyInstanceAttributeRequest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModifyInstanceAttributeRequestclone()Creates a shallow clone of this request.booleanequals(Object obj)StringgetAttribute()The name of the attribute.List<InstanceBlockDeviceMappingSpecification>getBlockDeviceMappings()Modifies theDeleteOnTerminationattribute for volumes that are currently attached.BooleangetDisableApiTermination()If the value istrue, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.Request<ModifyInstanceAttributeRequest>getDryRunRequest()This method is intended for internal use only.BooleangetEbsOptimized()Specifies whether the instance is optimized for EBS I/O.List<String>getGroups()[EC2-VPC] Changes the security groups of the instance.StringgetInstanceId()The ID of the instance.StringgetInstanceInitiatedShutdownBehavior()Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).StringgetInstanceType()Changes the instance type to the specified value.StringgetKernel()Changes the instance's kernel to the specified value.StringgetRamdisk()Changes the instance's RAM disk to the specified value.BooleangetSourceDestCheck()Specifies whether source/destination checking is enabled.StringgetSriovNetSupport()Set tosimpleto enable enhanced networking for the instance.StringgetUserData()Changes the instance's user data to the specified base64-encoded value.StringgetValue()A new value for the attribute.inthashCode()BooleanisDisableApiTermination()If the value istrue, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.BooleanisEbsOptimized()Specifies whether the instance is optimized for EBS I/O.BooleanisSourceDestCheck()Specifies whether source/destination checking is enabled.voidsetAttribute(InstanceAttributeName attribute)The name of the attribute.voidsetAttribute(String attribute)The name of the attribute.voidsetBlockDeviceMappings(Collection<InstanceBlockDeviceMappingSpecification> blockDeviceMappings)Modifies theDeleteOnTerminationattribute for volumes that are currently attached.voidsetDisableApiTermination(Boolean disableApiTermination)If the value istrue, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.voidsetEbsOptimized(Boolean ebsOptimized)Specifies whether the instance is optimized for EBS I/O.voidsetGroups(Collection<String> groups)[EC2-VPC] Changes the security groups of the instance.voidsetInstanceId(String instanceId)The ID of the instance.voidsetInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).voidsetInstanceType(String instanceType)Changes the instance type to the specified value.voidsetKernel(String kernel)Changes the instance's kernel to the specified value.voidsetRamdisk(String ramdisk)Changes the instance's RAM disk to the specified value.voidsetSourceDestCheck(Boolean sourceDestCheck)Specifies whether source/destination checking is enabled.voidsetSriovNetSupport(String sriovNetSupport)Set tosimpleto enable enhanced networking for the instance.voidsetUserData(String userData)Changes the instance's user data to the specified base64-encoded value.voidsetValue(String value)A new value for the attribute.StringtoString()Returns a string representation of this object; useful for testing and debugging.ModifyInstanceAttributeRequestwithAttribute(InstanceAttributeName attribute)The name of the attribute.ModifyInstanceAttributeRequestwithAttribute(String attribute)The name of the attribute.ModifyInstanceAttributeRequestwithBlockDeviceMappings(InstanceBlockDeviceMappingSpecification... blockDeviceMappings)Modifies theDeleteOnTerminationattribute for volumes that are currently attached.ModifyInstanceAttributeRequestwithBlockDeviceMappings(Collection<InstanceBlockDeviceMappingSpecification> blockDeviceMappings)Modifies theDeleteOnTerminationattribute for volumes that are currently attached.ModifyInstanceAttributeRequestwithDisableApiTermination(Boolean disableApiTermination)If the value istrue, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can.ModifyInstanceAttributeRequestwithEbsOptimized(Boolean ebsOptimized)Specifies whether the instance is optimized for EBS I/O.ModifyInstanceAttributeRequestwithGroups(String... groups)[EC2-VPC] Changes the security groups of the instance.ModifyInstanceAttributeRequestwithGroups(Collection<String> groups)[EC2-VPC] Changes the security groups of the instance.ModifyInstanceAttributeRequestwithInstanceId(String instanceId)The ID of the instance.ModifyInstanceAttributeRequestwithInstanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).ModifyInstanceAttributeRequestwithInstanceType(String instanceType)Changes the instance type to the specified value.ModifyInstanceAttributeRequestwithKernel(String kernel)Changes the instance's kernel to the specified value.ModifyInstanceAttributeRequestwithRamdisk(String ramdisk)Changes the instance's RAM disk to the specified value.ModifyInstanceAttributeRequestwithSourceDestCheck(Boolean sourceDestCheck)Specifies whether source/destination checking is enabled.ModifyInstanceAttributeRequestwithSriovNetSupport(String sriovNetSupport)Set tosimpleto enable enhanced networking for the instance.ModifyInstanceAttributeRequestwithUserData(String userData)Changes the instance's user data to the specified base64-encoded value.ModifyInstanceAttributeRequestwithValue(String value)A new value for the attribute.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
-
-
-
Constructor Detail
-
ModifyInstanceAttributeRequest
public ModifyInstanceAttributeRequest()
Default constructor for ModifyInstanceAttributeRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
-
ModifyInstanceAttributeRequest
public ModifyInstanceAttributeRequest(String instanceId, 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(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
-
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 ModifyInstanceAttributeRequest 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.
-
setAttribute
public void setAttribute(String attribute)
The name of the attribute.
- Parameters:
attribute- The name of the attribute.- See Also:
InstanceAttributeName
-
getAttribute
public String getAttribute()
The name of the attribute.
- Returns:
- The name of the attribute.
- See Also:
InstanceAttributeName
-
withAttribute
public ModifyInstanceAttributeRequest withAttribute(String attribute)
The name of the attribute.
- Parameters:
attribute- The name of the attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceAttributeName
-
setAttribute
public void setAttribute(InstanceAttributeName attribute)
The name of the attribute.
- Parameters:
attribute- The name of the attribute.- See Also:
InstanceAttributeName
-
withAttribute
public ModifyInstanceAttributeRequest withAttribute(InstanceAttributeName attribute)
The name of the attribute.
- Parameters:
attribute- The name of the attribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceAttributeName
-
setValue
public void setValue(String value)
A new value for the attribute. Use only with the
kernel,ramdisk,userData,disableApiTermination, orinstanceInitiatedShutdownBehaviorattribute.- Parameters:
value- A new value for the attribute. Use only with thekernel,ramdisk,userData,disableApiTermination, orinstanceInitiatedShutdownBehaviorattribute.
-
getValue
public String getValue()
A new value for the attribute. Use only with the
kernel,ramdisk,userData,disableApiTermination, orinstanceInitiatedShutdownBehaviorattribute.- Returns:
- A new value for the attribute. Use only with the
kernel,ramdisk,userData,disableApiTermination, orinstanceInitiatedShutdownBehaviorattribute.
-
withValue
public ModifyInstanceAttributeRequest withValue(String value)
A new value for the attribute. Use only with the
kernel,ramdisk,userData,disableApiTermination, orinstanceInitiatedShutdownBehaviorattribute.- Parameters:
value- A new value for the attribute. Use only with thekernel,ramdisk,userData,disableApiTermination, orinstanceInitiatedShutdownBehaviorattribute.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBlockDeviceMappings
public List<InstanceBlockDeviceMappingSpecification> getBlockDeviceMappings()
Modifies the
DeleteOnTerminationattribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified forDeleteOnTermination, the default istrueand 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
DeleteOnTerminationattribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified forDeleteOnTermination, the default istrueand 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(Collection<InstanceBlockDeviceMappingSpecification> blockDeviceMappings)
Modifies the
DeleteOnTerminationattribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified forDeleteOnTermination, the default istrueand 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 theDeleteOnTerminationattribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified forDeleteOnTermination, the default istrueand 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
DeleteOnTerminationattribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified forDeleteOnTermination, the default istrueand 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.
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- Modifies theDeleteOnTerminationattribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified forDeleteOnTermination, the default istrueand 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:
- Returns a reference to this object so that method calls can be chained together.
-
withBlockDeviceMappings
public ModifyInstanceAttributeRequest withBlockDeviceMappings(Collection<InstanceBlockDeviceMappingSpecification> blockDeviceMappings)
Modifies the
DeleteOnTerminationattribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified forDeleteOnTermination, the default istrueand 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 theDeleteOnTerminationattribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified forDeleteOnTermination, the default istrueand 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:
- Returns a reference to this object so that method calls can be chained together.
-
setSourceDestCheck
public void setSourceDestCheck(Boolean sourceDestCheck)
Specifies whether source/destination checking is enabled. A value of
truemeans that checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.- Parameters:
sourceDestCheck- Specifies whether source/destination checking is enabled. A value oftruemeans that checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.
-
getSourceDestCheck
public Boolean getSourceDestCheck()
Specifies whether source/destination checking is enabled. A value of
truemeans that checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.- Returns:
- Specifies whether source/destination checking is enabled. A value
of
truemeans that checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.
-
withSourceDestCheck
public ModifyInstanceAttributeRequest withSourceDestCheck(Boolean sourceDestCheck)
Specifies whether source/destination checking is enabled. A value of
truemeans that checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.- Parameters:
sourceDestCheck- Specifies whether source/destination checking is enabled. A value oftruemeans that 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()
Specifies whether source/destination checking is enabled. A value of
truemeans that checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.- Returns:
- Specifies whether source/destination checking is enabled. A value
of
truemeans that checking is enabled, andfalsemeans checking is disabled. This value must befalsefor a NAT instance to perform NAT.
-
setDisableApiTermination
public void setDisableApiTermination(Boolean disableApiTermination)
If the value is
true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.- Parameters:
disableApiTermination- If the value istrue, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.
-
getDisableApiTermination
public Boolean getDisableApiTermination()
If the value is
true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.- Returns:
- If the value is
true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.
-
withDisableApiTermination
public ModifyInstanceAttributeRequest withDisableApiTermination(Boolean disableApiTermination)
If the value is
true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.- Parameters:
disableApiTermination- If the value istrue, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.- 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 using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.- Returns:
- If the value is
true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this paramater for Spot Instances.
-
setInstanceType
public void setInstanceType(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 isInvalidInstanceAttributeValue.
-
getInstanceType
public 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.
-
withInstanceType
public ModifyInstanceAttributeRequest withInstanceType(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 isInvalidInstanceAttributeValue.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKernel
public void setKernel(String kernel)
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
- Parameters:
kernel- Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
-
getKernel
public String getKernel()
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
- Returns:
- Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
-
withKernel
public ModifyInstanceAttributeRequest withKernel(String kernel)
Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
- Parameters:
kernel- Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRamdisk
public void setRamdisk(String ramdisk)
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
- Parameters:
ramdisk- Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
-
getRamdisk
public String getRamdisk()
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
- Returns:
- Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
-
withRamdisk
public ModifyInstanceAttributeRequest withRamdisk(String ramdisk)
Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.
- Parameters:
ramdisk- Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUserData
public void setUserData(String userData)
Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.
- Parameters:
userData- Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.
-
getUserData
public String getUserData()
Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.
- Returns:
- Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.
-
withUserData
public ModifyInstanceAttributeRequest withUserData(String userData)
Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.
- Parameters:
userData- Changes the instance's user data to the specified base64-encoded value. For command line tools, base64 encoding is performed for you.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceInitiatedShutdownBehavior
public void setInstanceInitiatedShutdownBehavior(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).
-
getInstanceInitiatedShutdownBehavior
public 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).
-
withInstanceInitiatedShutdownBehavior
public ModifyInstanceAttributeRequest withInstanceInitiatedShutdownBehavior(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).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getGroups
public List<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.
- 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.
-
setGroups
public void setGroups(Collection<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.
- 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.
-
withGroups
public ModifyInstanceAttributeRequest withGroups(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.
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- [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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withGroups
public ModifyInstanceAttributeRequest withGroups(Collection<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.
- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEbsOptimized
public void setEbsOptimized(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.
-
getEbsOptimized
public 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.
-
withEbsOptimized
public ModifyInstanceAttributeRequest withEbsOptimized(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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEbsOptimized
public 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.
-
setSriovNetSupport
public void setSriovNetSupport(String sriovNetSupport)
Set to
simpleto 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 tosimpleto 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.
-
getSriovNetSupport
public String getSriovNetSupport()
Set to
simpleto 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
simpleto 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(String sriovNetSupport)
Set to
simpleto 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 tosimpleto 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:
- Returns a reference to this 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:
getDryRunRequestin interfaceDryRunSupportedRequest<ModifyInstanceAttributeRequest>
-
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 ModifyInstanceAttributeRequest clone()
Description copied from class:AmazonWebServiceRequestCreates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clonein classAmazonWebServiceRequest- See Also:
Object.clone()
-
-