| Did this page help you? Yes No Tell us about it... |
Modifies an attribute of an instance.
![]() | Note |
|---|---|
| To modify some attributes, the instance must be stopped. For more information, see Using Instance Metadata in the Amazon Elastic Compute Cloud User's Guide. |
![]() | Note |
|---|---|
If you want to add ephemeral storage to an Amazon EBS-backed instance, you must add the ephemeral storage at the time you launch the instance. For more information, go to Overriding the AMI's Block Device Mapping in the Amazon Elastic Compute Cloud User Guide, or to Using Amazon EC2 Instance Storage in the Amazon Elastic Compute Cloud User Guide. |
| Name | Description | Required |
|---|---|---|
|
|
The ID of the instance. Type: String Default: None |
Yes |
|
|
Changes the instance type to the specified value. Type: String Default: None |
No |
|
|
Changes the instance's kernel to the specified value. Type: String Default: None |
No |
|
|
Changes the instance's RAM disk to the specified value. Type: String Default: None |
No |
|
|
Changes the instance's user data to the specified value. Type: String Default: None |
No |
|
|
Changes the instance's Type: Boolean Default: None |
No |
|
|
Changes the instance's
Type: String Default: None Valid Values: |
No |
|
|
Modifies the Type: BlockDeviceMapping Default: None Example: &BlockDeviceMapping1.DeviceName=/dev/sdh &BlockDeviceMapping.1.Ebs.DeleteOnTermination=true| |
No |
|
|
This attribute exists to enable a Network Address
Translation (NAT) instance in a VPC to perform NAT. The
attribute controls whether source/destination checking is
enabled on the instance. A value of Type: Boolean Default: None |
No |
|
|
This attribute is applicable only to instances running in a VPC. Use this parameter when you want to change the security groups that an instance is in. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the group ID and not the group name. For example, if you want the instance to be in sg-1a1a1a1a
and sg-9b9b9b9b, specify Type: String Default: None |
No |
The elements in the following table are wrapped in a
ModifyInstanceAttributeResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
Returns true if successful. Otherwise, returns an error. Type: xsd:boolean |
This example changes the kernel for the instance.
https://ec2.amazonaws.com/?Action=ModifyInstanceAttribute &InstanceId=i-10a64379 &Kernel.Value=aki-f70657b2 &AUTHPARAMS
<ModifyInstanceAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <return>true</return> </ModifyInstanceAttributeResponse>