PutRumEvents
Sends telemetry events about your application performance and user behavior to CloudWatch RUM. The code 
      snippet that RUM generates for you to add to your application includes PutRumEvents operations to 
      send this data to RUM.
Each PutRumEvents operation can send a batch of events from one user session.
Request Syntax
POST /appmonitors/Id/ HTTP/1.1
Content-type: application/json
{
   "Alias": "string",
   "AppMonitorDetails": { 
      "id": "string",
      "name": "string",
      "version": "string"
   },
   "BatchId": "string",
   "RumEvents": [ 
      { 
         "details": "string",
         "id": "string",
         "metadata": "string",
         "timestamp": number,
         "type": "string"
      }
   ],
   "UserDetails": { 
      "sessionId": "string",
      "userId": "string"
   }
}URI Request Parameters
The request uses the following URI parameters.
- Id
- 
               The ID of the app monitor that is sending this data. Length Constraints: Fixed length of 36. Pattern: [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}Required: Yes 
Request Body
The request accepts the following data in JSON format.
- Alias
- 
               If the app monitor uses a resource-based policy that requires PutRumEventsrequests to specify a certain alias, specify that alias here. This alias will be compared to therum:aliascontext key in the resource-based policy. For more information, see Using resource-based policies with CloudWatch RUM.Type: String Length Constraints: Minimum length of 1. Maximum length of 255. Required: No 
- AppMonitorDetails
- 
               A structure that contains information about the app monitor that collected this telemetry information. Type: AppMonitorDetails object Required: Yes 
- BatchId
- 
               A unique identifier for this batch of RUM event data. Type: String Length Constraints: Fixed length of 36. Pattern: [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}Required: Yes 
- RumEvents
- 
               An array of structures that contain the telemetry event data. Type: Array of RumEvent objects Required: Yes 
- UserDetails
- 
               A structure that contains information about the user session that this batch of events was collected from. Type: UserDetails object Required: Yes 
Response Syntax
HTTP/1.1 200
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
- 
               You don't have sufficient permissions to perform this action. HTTP Status Code: 403 
- InternalServerException
- 
               Internal service exception. - retryAfterSeconds
- 
                        The value of a parameter in the request caused an error. 
 HTTP Status Code: 500 
- ResourceNotFoundException
- 
               Resource not found. - resourceName
- 
                        The name of the resource that is associated with the error. 
- resourceType
- 
                        The type of the resource that is associated with the error. 
 HTTP Status Code: 404 
- ThrottlingException
- 
               The request was throttled because of quota limits. - quotaCode
- 
                        The ID of the service quota that was exceeded. 
- retryAfterSeconds
- 
                        The value of a parameter in the request caused an error. 
- serviceCode
- 
                        The ID of the service that is associated with the error. 
 HTTP Status Code: 429 
- ValidationException
- 
               One of the arguments for the request is not valid. HTTP Status Code: 400 
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: