Amazon Elastic Compute Cloud
API Reference (API Version 2014-10-01)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.

MonitorInstances

Enables monitoring for a running instance. For more information about monitoring instances, see Monitoring Your Instances and Volumes in the Amazon Elastic Compute Cloud User Guide.

Request Parameters

For information about the common parameters that all actions use, see Common Query Parameters.

InstanceId.N

One or more instance IDs.

Type: String list

Required: Yes

DryRun

Type: Boolean

Required: No

Response Elements

The following elements are returned.

instancesSet

Monitoring information for one or more instances.

Type: InstanceMonitoring list

requestId

The ID of the request.

Type: String

Errors

For information about the errors that are common to all actions, see Common Client Errors.

Examples

Example

This example enables monitoring for two instances.

Sample Request

https://ec2.amazonaws.com/?Action=MonitorInstances
&InstanceId.1=i-43a4412a
&InstanceId.2=i-23a3397d
&AUTHPARAMS

Sample Response

<MonitorInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2014-10-01/">
    <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
    <instancesSet>
      <item>
        <instanceId>i-43a4412a</instanceId>
        <monitoring>
          <state>pending</state>
        </monitoring>
    </item>
    <item>
      <instanceId>i-23a3397d</instanceId>
        <monitoring>
          <state>pending</state>
        </monitoring>
      </item>
    </instancesSet>
</MonitorInstancesResponse>