Returns information about an attribute of an instance. Only one attribute can be specified per call.
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}
| Name | Description | Required |
|---|---|---|
|
|
The instance ID. Type: String Default: Describes all instances. Example: i-43a4412a |
Yes |
|
|
The instance type of the instance. Type: String Default: m1.small Example: m1.large |
No |
|
|
Describes the ID of the kernel associated with the AMI. Type: String Default: None Example: --kernel |
No |
|
|
Describes the ID of the RAM disk associated with the AMI. Type: String Default: None Example: --ramdisk |
No |
|
|
MIME, Base64-encoded user data. Type: String Default: None Example: |
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 Example: --disable-api-termination |
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 Example: --instance-initiated-shutdown-behavior |
No |
|
|
The root device name (e.g., /dev/sda1). Type: String Default: None Example: --root-device-name |
No |
|
|
Describes the mapping that defines native device names to use when exposing virtual devices. Type: String Default: None Example: -block-device-mapping |
No |
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.
This example lists the kernel ID of the i-10a64379 instance.
PROMPT>ec2-describe-instance-attribute i-10a64379 --kernelATTRIBUTE i-10a64379 kernel aki-f70657b2