Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

describeInstanceAttribute

Describes the specified attribute of the specified instance. You can specify only one attribute at a time.

Samples

import aws.sdk.kotlin.services.ec2.model.InstanceAttributeName

fun main() { 
   //sampleStart 
   // This example describes the blockDeviceMapping attribute of the specified instance.
val resp = ec2Client.describeInstanceAttribute {
    instanceId = "i-1234567890abcdef0"
    attribute = InstanceAttributeName.fromValue("blockDeviceMapping")
} 
   //sampleEnd
}
import aws.sdk.kotlin.services.ec2.model.InstanceAttributeName

fun main() { 
   //sampleStart 
   // This example describes the instance type of the specified instance.
val resp = ec2Client.describeInstanceAttribute {
    instanceId = "i-1234567890abcdef0"
    attribute = InstanceAttributeName.fromValue("instanceType")
} 
   //sampleEnd
}