Amazon Elastic Compute Cloud
API Reference (API Version 2011-12-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

DescribeInstanceAttribute

Description

Returns information about an attribute of an instance. You can get information about only one attribute per call. These are the available attributes:

  • instanceType—Instance type (e.g., m1.small)

  • kernel—ID of the kernel associated with the instance

  • ramdisk—ID of the RAM disk associated with the instance

  • userData—MIME, Base64-encoded user data provided to the instance

  • disableApiTermination—Whether the instance can be terminated using the Amazon EC2 API (false means the instance can be terminated with the API)

  • instanceInitiatedShutdownBehavior—Whether the instance stops or terminates when an instance shutdown is initiated (default is stop)

  • rootDeviceName—Root device name of the instance (e.g., /dev/sda1, or xvda)

  • blockDeviceMapping—Block device mapping of the instance

  • sourceDestCheck—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 true means checking is enabled. The value must be false for the instance to perform NAT.

  • groupSet—Security groups the instance belongs to

Request Parameters

NameDescriptionRequired

InstanceId

The instance ID.

Type: String

Default: None

Yes

Attribute

The instance attribute to get.

Type: String

Default: None

Valid Values: instanceType | kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior | rootDeviceName | blockDeviceMapping | sourceDestCheck | groupSet

Yes

Response Elements

The elements in the following table are wrapped in a DescribeInstanceAttributeResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

instanceId

The ID of the instance.

Type: xsd:string

instanceType

The instance type (e.g., m1.small), wrapped in a value element.

Type: xsd:string

kernel

The kernel ID, wrapped in a value element.

Type: xsd:string

ramdisk

The RAM disk ID, wrapped in a value element.

Type: xsd:string

userData

MIME, Base64-encoded user data, wrapped in a value element.

Type: xsd:string

disableApiTermination

Boolean indicating whether the instance can be terminated through the Amazon EC2 API. The value is wrapped in a value element. A value of true means you can't terminate the instance using the API (i.e., the instance is "locked"); a value of false means you can. You must modify this attribute before you can terminate any "locked" instances using the API.

Type: xsd:boolean

instanceInitiatedShutdownBehavior

If an instance shutdown is initiated, this determines whether the instance stops or terminates. The value is wrapped in a value element.

Type: xsd:string

Valid Values: stop | terminate

rootDeviceName

The root device name (e.g., /dev/sda1), wrapped in a value element.

Type: xsd:string

blockDeviceMapping

List of block device mappings for the instance. Each mapping's information is wrapped in an item element.

Type: InstanceBlockDeviceMappingResponseItemType

sourceDestCheck

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 true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, go to NAT Instances in the Amazon Virtual Private Cloud User Guide.

Type: xsd:boolean

groupSet

Security groups the instance belongs to. Each group's information is wrapped in an item element.

Type: GroupItemType

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/2011-12-15/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
  <instanceId>i-10a64379</instanceId>
  <kernel>
    <value>aki-f70657b2</value>
  </kernel>
</DescribeInstanceAttributeResponse>