DescribeInstanceAttribute
Description
Returns information about an attribute of an instance. Only one attribute can be specified per call.
Request Parameters
| Name | Description | Required |
|---|---|---|
| The instance ID. Type: String Default: Describes all instances. | Yes |
| The instance type of the instance. Type: String Default: m1.small | No |
| Describes the ID of the kernel associated with the AMI. Type: String Default: None | No |
| Describes the ID of the RAM disk associated with the AMI. Type: String Default: None | No |
| MIME, Base64-encoded user data. Type: String Default: None | No |
| Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs. Type: Boolean Default: true | No |
| Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down. Type: Boolean Valid Values: Default: true | No |
| The root device name (e.g., /dev/sda1). Type: String Default: None | No |
| Describes the mapping that defines native device names to use when exposing virtual devices. Type: String Default: None | No |
Response Elements
| Name | Description |
|---|---|
|
Type: |
Ancestor: None
Children: requestId, instanceId, instanceType, kernel, ramdisk, userData, disableApiTermination, instanceInitiatedShutdownBehavior, rootDeviceName, and blockDeviceMapping
requestId
The ID of the request.
Type: xsd:string
Ancestor: DescribeInstanceAttributeResponseType
Children: None
instanceId
The ID of the instance.
Type: xsd:string
Ancestor: DescribeInstanceAttributeResponseType
Children: None
instanceType
The instance type (e.g., m1.small, c1.medium, m2.2xlarge, and so on).
Type: NullableAttributeValueType
Ancestor: DescribeInstanceAttributeResponseType
Children:
kernel
The kernel ID.
Type: NullableAttributeValueType
Ancestor: DescribeInstanceAttributeResponseType
Children:
ramdisk
The RAM disk ID.
Type: NullableAttributeValueType
Ancestor: DescribeInstanceAttributeResponseType
Children:
userData
MIME, Base64-encoded user data.
Type: NullableAttributeValueType
Ancestor: DescribeInstanceAttributeResponseType
Children:
disableApiTermination
Specifies whether the instance can be terminated. You must modify this attribute before you can terminate any "locked" instances.
Type: NullableAttributeBooleanValueType
Ancestor: DescribeInstanceAttributeResponseType
Children:
instanceInitiatedShutdownBehavior
Specifies whether the instance's Amazon EBS volumes are deleted when the instance is shut down.
Type: NullableAttributeBooleanValueType
Ancestor: DescribeInstanceAttributeResponseType
Children:
rootDeviceName
The root device name (e.g., /dev/sda1).
Type: NullableAttributeValueType
Ancestor: DescribeInstanceAttributeResponseType
Children:
blockDeviceMapping
Specifies how block devices are exposed to the instance. Each mapping is made up of a virtualName and a deviceName.
Type: InstanceBlockDeviceMappingResponseType
Ancestor: DescribeInstanceAttributeResponseType
Children: item
item
The item element.
Type: InstanceBlockDeviceMappingResponseItemType
Ancestor: blockDeviceMapping
Children: deviceName, ebs
deviceName
Specifies how the device is exposed to the instance (e.g., /dev/sdh).
Type: xsd:string
Ancestor: item
Children: None
ebs
Specifies parameters used to automatically setup Amazon EBS volumes when the instance is launched.
Type: EbsInstanceBlockDeviceMappingResponseType
Ancestor: item
Children: volumeId, status, attachTime, and deleteOnTermination
volumeId
The ID of the Amazon EBS volume.
Type: xsd:string
Ancestor: ebs
Children: None
status
Attachment state.
Type: xsd:string
Valid Values: attaching | attached | detaching | detached
Ancestor: ebs
Children: None
attachTime
Time stamp when the attachment initiated.
Type: xsd:dateTime
Ancestor: ebs
Children: None
deleteOnTermination
Specifies whether the Amazon EBS volume is deleted on instance termination.
Type: xsd:boolean
Ancestor: ebs
Children: None
Examples
Example Request
This example lists the kernel ID of the i-10a64379 instance.
https://ec2.amazonaws.com/?Action=DescribeInstanceAttribute&InstanceId=i-10a64379&Attribute=kernel&AuthParams
Example Response
<DescribeInstanceAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2009-10-31/">
<instanceId>i-10a64379</instanceId>
<kernel>
<value>aki-f70657b2</value>
</kernel>
</DescribeInstanceAttributeResponse>