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;

  • You must specify the Access Key and theSecret Key together in the configuration or the adapter request.
  • If you specify both the keys in the adapter request and in the adapter configuration, the key values in the request override the values in the configuration.
  • If only the Access Key is specified, the adapter ignores the value.
<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;

  • You must specify the Access Key and theSecret Key together in the configuration or the adapter request.
  • If you specify both the keys in the adapter request and in the adapter configuration, the key values in the request override the values in the configuration.
  • If only the Secret Access Key is specified, the adapter ignores the value.
<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:

  • us-east-1
  • us-west-2 (default)
  • us-west-1
  • eu-west-1
  • ap-southeast-1
  • ap-northeast-1
  • ap-southeast-2
  • sa-east-1

No

<operation-name>

Contains the name of the operation: monitor-instances

Yes

<instances-set>

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>

Back to top

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;

  • You must specify the Access Key and theSecret Key together in the configuration or the adapter request.
  • If you specify both the keys in the adapter request and in the adapter configuration, the key values in the request override the values in the configuration.
  • If only the Access Key is specified, the adapter ignores the value.
<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;

  • You must specify the Access Key and theSecret Key together in the configuration or the adapter request.
  • If you specify both the keys in the adapter request and in the adapter configuration, the key values in the request override the values in the configuration.
  • If only the Secret Access Key is specified, the adapter ignores the value.
<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:

  • us-east-1
  • us-west-2 (default)
  • us-west-1
  • eu-west-1
  • ap-southeast-1
  • ap-northeast-1
  • ap-southeast-2
  • sa-east-1

No

<operation-name>

Contains the name of the operation: unmonitor-instances

Yes

<instances-set>

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>

Back to top

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*