Monitoring_Operations for the Amazon EC2 REST adapter
This topic illustrates the adapter requests and responses for the Monitoring operations.
Monitor Instances operation
The Monitor Instances operation enables you to monitor a running instance.
The following figure shows a sample <items>
XML element for the Monitor Instances operation.
Sample <items>
XML element for the Monitor Instances operation
<items>
<item>
<parameters>
<instances-set>
<!--Zero or more repetitions:-->
<item>
<instance-id></instance-id>
</item>
</instances-set>
</parameters>
</item>
</items>
The following table shows the adapter request elements for this request.
Adapter request elements for the Monitor Instances 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;
|
<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 |
| Contains the name of the operation: monitor-instances | Yes |
| Contains the set of instance IDs for instances to be monitored | Yes |
The following figure shows a sample adapter request for the Monitor Instances operation.
Sample adapter request for the Monitor Instances operation
<request-data>
<amazon-ec2-rest-request>
<access-key>AKIAI**********GROKA</access-key>
<secret-key>6hXjoZZDv**********cn1y2Yte/jZfnY6WgKCdC</secret-key>
<operation-name>monitor-instances</operation-name>
<region>us-west-2</region>
<parameters>
<instances-set>
<item>
<instance-id>i-3f339636</instance-id>
</item>
</instances-set>
</parameters>
</amazon-ec2-rest-request>
</request-data>
The following figure shows the response for the sample Monitor Instances operation.
Sample adapter response for the Monitor Instances operation
<amazon-ec2-rest-response>
<metadata>
<status>success</status>
</metadata>
<MonitorInstancesResponse>
<instancesSet>
<item>
<instanceId>i-3f339636</instanceId>
<monitoring>
<state>pending</state>
</monitoring>
</item>
</instancesSet>
</MonitorInstancesResponse>
</amazon-ec2-rest-response>
Unmonitor Instances operation
The Unmonitor Instances operation enables you to disable monitoring for a running instance.
The following figure shows a sample <items>
XML element for the Unmonitor Instances operation.
Sample <items>
XML element for the Unmonitor Instances operation
<items>
<item>
<parameters>
<instances-set>
<!--Zero or more repetitions:-->
<item>
<instance-id></instance-id>
</item>
</instances-set>
</parameters>
</item>
</items>
The following table shows the adapter request elements for this request.
Adapter request elements for the Unmonitor Instances 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;
|
<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 |
| Contains the name of the operation: unmonitor-instances | Yes |
| contains the set of instances for which monitoring is to be disabled | Yes |
The following figure shows a sample adapter request for the Unmonitor Instances operation.
Sample adapter request for the Unmonitor Instances operation
<request-data>
<amazon-ec2-rest-request>
<access-key>AKIAI**********GROKA</access-key>
<secret-key>6hXjoZZDv**********cn1y2Yte/jZfnY6WgKCdC</secret-key>
<operation-name>unmonitor-instances</operation-name>
<region>us-east-1</region>
<parameters>
<instances-set>
<item>
<instance-id>
i-bec20890</instance-id>
</item>
</instances-set>
</parameters>
</amazon-ec2-rest-request>
</request-data>
The following figure shows the response for the sample Unmonitor Instances operation.
Sample adapter response for the Unmonitor Instance operation
<amazon-ec2-rest-response>
<metadata>
<status>success</status>
</metadata>
<UnmonitorInstancesResponse>
<instancesSet>
<item>
<instanceId>i-bec20890</instanceId>
<monitoring>
<state>disabling</state>
</monitoring>
</item>
</instancesSet>
</UnmonitorInstancesResponse>
</amazon-ec2-rest-response>
Comments
Log in or register to comment.