Describe Instance Attribute operation for the Amazon EC2 REST adapter
The Describe Instance Attribute operation enables you to retrieve information about an attribute of an instance. You can obtain information about only one attribute for each call.
The following figure shows a sample <items> XML element for the Describe Instance Attribute operation.
Sample <items> XML element for the Describe Instance Attribute operation
<item>
<parameters>
<instance-id></instance-id>
<!-You have a CHOICE of one the next 8 items at this level->
<instance-type/>
<kernel/>
<ramdisk/>
<user-data/>
<disable-api-termination/>
<instance-initiated-shutdown-behavior/>
<root-device-name/>
<block-device-mapping/>
</parameters>
</item>
</items>
The following table shows the elements for this adapter request.
Adapter request elements for the Describe Instance Attribute operation
Element | Definition | Required |
---|---|---|
<access-key> | Specifies the Amazon Web Services (AWS) access key You need to generate the AWS access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<secret-key> | Specifies the AWS secret access key You need to generate the AWS secret access key by going to the Security Credentials tab in the AWS console. | Conditional;
|
<session-token> | Specifies the temporary session token generated using the AWS APIs. | Conditional; You must specify the Access Key and Secret Key as well in the configuration or the adapter request, else the <session-token> value is ignored. |
<region> | Specifies the region with which you want the adapter to communicate Amazon EC2 is hosted in multiple locations world-wide. You must specify the region in which you want the adapter to perform the actions. Valid values:
| No |
<operation-name> | Contains the name of the operation: describe-instance-attribute | Yes |
<instance-id> | Specifies the instance ID for the instance whose attribute information is to be retrieved | Yes |
<instance-type> | Specifies the type of the instance | Conditional; required if the following attributes are absent:
|
<kernel> | Specifies the kernel ID for the instance | Conditional; required if the following attributes are absent:
|
<ramdisk> | Specifies the RAM disk ID for the instance | Conditional; required if the following attributes are absent:
|
<user-data> | Specifies the user data for the instance | Conditional; required if the following attributes are absent:
|
<instance-initiated-shutdown-behavior> | Specifies whether the Amazon EBS volumes for the instances are stopped or terminated when the instance is shut down | Conditional; required if the following attributes are absent:
|
<root-device-name> | Specifies the root device name of the instance | Conditional; required if the following attributes are absent:
|
<block-device-mapping> | Specifies the block device mapping set | Conditional; required if the following attributes are absent:
|
<disable-api-termination> | Specifies whether the instance can be terminated by using the Amazon EC2 Console, CLM, and API
| Conditional; required if the following attributes are absent:
|
The following figure shows a sample adapter request for the Describe Instance Attribute operation.
Sample adapter request for the Describe Instance Attribute operation
<operation-name>describe-instance-attribute</operation-name>
<parameters>
<instance-id>i-65be346c</instance-id>
<instance-type />
</parameters>
</amazon-ec2-rest-request>
The following figure shows the response for the sample Describe Instance Attribute operation.
Sample adapter response for the Describe Instance Attribute operation
<metadata>
<status>success</status>
</metadata>
<DescribeInstanceAttributeResponse>
<instanceId>i-65be346c</instanceId>
<instanceType>
<value>t1.micro</value>
</instanceType>
</DescribeInstanceAttributeResponse>
</amazon-ec2-rest-response>