ModifyInstanceAttribute
Description
Modifies an attribute of an instance.
Request Parameters
Name | Description | Required |
---|---|---|
|
Type: |
Ancestor: None
Children: instanceId
, instanceType
, kernel
, ramdisk
, data
, userData
, disableApiTermination
, instanceInitiatedShutdownBehavior
, and blockDeviceMapping
instanceId
The instance ID.
Type: xsd:string
Default: None
Ancestor: ModifyInstanceAttributeType
Children: None
Yes
instanceType
The instance type (e.g., m1.small, c1.medium, m2.2xlarge, and so on).
Type: AttributeValueType
Ancestor: ModifyInstanceAttributeType
Children: value
No
value
ID of the item.
Type: xsd:string
Default: None
Ancestor: instanceType
Children: None
kernel
Kernel set.
Type: NullableAttributeValueType
Ancestor: ModifyInstanceAttributeType
Children: value
value
ID of the parent element.
Type: xsd:string
Default: None
Ancestor: kernel
Children: None
ramdisk
RAM disk set.
Type: NullableAttributeValueType
Ancestor: ModifyInstanceAttributeType
Children: value
value
ID of the parent element.
Type: xsd:string
Default: None
Ancestor: ramdisk
Children: None
data
MIME, Base64-encoded user data.
Type: xsd:string
Default: None
Ancestor: ModifyInstanceAttributeType
Children: None
No
userData
MIME, Base64-encoded user data.
Type: AttributeValueType
Ancestor: ModifyInstanceAttributeType
Children: value
No
value
ID of the item.
Type: xsd:string
Default: None
Ancestor: userData
Children: None
disableApiTermination
Specifies whether the instance can be terminated. You must modify this attribute before you can terminate any "locked" instances.
Type: AttributeBooleanValueType
Ancestor: ModifyInstanceAttributeType
Children: value
No
value
Generic boolean value.
Type: xsd:boolean
Valid Values: true
| false
Default: false
Ancestor: disableApiTermination
Children: None
Yes
instanceInitiatedShutdownBehavior
Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.
Type: AttributeValueType
Ancestor: ModifyInstanceAttributeType
Children: value
No
value
ID of the item.
Type: xsd:string
Default: None
Ancestor: instanceInitiatedShutdownBehavior
Children: None
blockDeviceMapping
Block device mapping set.
Type: InstanceBlockDeviceMappingType
Ancestor: ModifyInstanceAttributeType
Children: item
item
The item element.
Type: InstanceBlockDeviceMappingItemType
Ancestor: blockDeviceMapping
Children: deviceName
, virtualName
, ebs
, and noDevice
deviceName
The device name (e.g., /dev/sdh).
Type: xsd:string
Default: None
Ancestor: item
Children: None
No
virtualName
The virtual device name.
Type: xsd:string
Default: None
Ancestor: item
Children: None
No
ebs
Specifies parameters used to automatically setup Amazon EBS volumes when the instance is launched.
Type: InstanceEbsBlockDeviceType
Ancestor: item
Children: volumeId
Yes
volumeId
The ID of the Amazon EBS volume.
Type: xsd:string
Default: None
Ancestor: ebs
Children: None
Yes
noDevice
Specifies the device name (e.g., /dev/sdb) to suppress during instance launch.
Type: EmptyElementType
Ancestor: item
Children: none
No
none
This element contains no options.
Type: xsd:string
Default: None
Ancestor: noDevice
Children: None
No
Response Elements
Name | Description |
---|---|
|
Type: ModifyInstanceAttributeResponseType Ancestor: None Children: |
|
The ID of the request. Type: xsd:string Ancestor: Children: None |
|
Returns true if successful. Otherwise, returns an error. Type: xsd:boolean Ancestor: Children: None |
Examples
Example Request
This example changed the kernel for the instance.
<ModifyInstanceAttribute xmlns="http://ec2.amazonaws.com/doc/2009-10-31/"> <instanceId>i-10a64379</instanceId> <kernel> <value>aki-f70657b2</value> </kernel> </ModifyInstanceAttribute>
Example Response
<ModifyInstanceAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-10-31/"> <return>true</return> </ModifyInstanceAttributeResponse>