ec2-describe-instance-attribute

Description

Returns information about an attribute of an instance. Only one attribute can be specified per call.

Syntax

ec2-describe-instance-attribute instance_id { --block-device-mapping | --disable-api-termination | --instance-initiated-shutdown-behavior | --instance-type type | --kernel kernel | --ramdisk ramdisk | --root-device-name | --user-data data}

Options

NameDescriptionRequired

instance_id

The instance ID.

Type: String

Default: Describes all instances.

Example: i-43a4412a

Yes

--instance-type type

The instance type of the instance.

Type: String

Default: m1.small

Example: m1.large

No

--kernel

Describes the ID of the kernel associated with the AMI.

Type: String

Default: None

Example: --kernel

No

--ramdisk

Describes the ID of the RAM disk associated with the AMI.

Type: String

Default: None

Example: --ramdisk

No

--user-data data

MIME, Base64-encoded user data.

Type: String

Default: None

Example:

No

--disable-api-termination

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

Example: --disable-api-termination

No

--instance-initiated-shutdown-behavior

Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down.

Type: Boolean

Valid Values: stop | terminate

Default: true

Example: --instance-initiated-shutdown-behavior

No

--root-device-name name

The root device name (e.g., /dev/sda1).

Type: String

Default: None

Example: --root-device-name

No

--block-device-mapping

Describes the mapping that defines native device names to use when exposing virtual devices.

Type: String

Default: None

Example: -block-device-mapping

No

Output

The command returns a table that contains the following information:

  • Attribute type identifier

  • ID of the instances

  • Attribute value type or attribute list item value type

  • Attribute or attribute list item value

Amazon EC2 displays errors on stderr.

Examples

Example Request

This example lists the kernel ID of the i-10a64379 instance.

PROMPT> ec2-describe-instance-attribute i-10a64379 --kernel
ATTRIBUTE i-10a64379 kernel aki-f70657b2