Skip to main content

app_monitors

Creates, updates, deletes, gets or lists an app_monitors resource.

Overview

Nameapp_monitors
TypeResource
Idaws.rum.app_monitors

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
app_monitor_configurationobjectThis structure contains much of the configuration data for the app monitor.
createdstringThe date and time that this app monitor was created.
custom_eventsobjectA structure that contains information about custom events for this app monitor.
data_storageobjectA structure that contains information about whether this app monitor stores a copy of the telemetry data that RUM collects using CloudWatch Logs.
deobfuscation_configurationobjectA structure that contains the configuration for how an app monitor can deobfuscate stack traces.
domainstringThe top-level internet domain name for which your application has administrative authority. (pattern: <code>(localhost)$|^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|(?=^[a-zA-Z0-9.*-]{4,253}$)(?!..-)(?!.-.)(?!...)(?!.[^.]{64,})^(*.)?(?![-.*])[^*]{1,}.(*|(?!.--)(?=.[a-zA-Z])[^*]{1,}[^*-])</code>)
domain_listarrayList the domain names for which your application has administrative authority.
idstringThe unique ID of this app monitor. (pattern: <code>[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}</code>)
last_modifiedstringThe date and time of the most recent changes to this app monitor's configuration.
namestringThe name of the app monitor. (pattern: <code>(?!.)[.-_#A-Za-z0-9]+</code>)
platformstringThe platform type for this app monitor. Valid values are Web for web applications , Android for Android applications, and iOS for IOS applications. (Web, Android, iOS)
statestringThe current state of the app monitor. (CREATED, DELETING, ACTIVE)
tagsobjectThe list of tag keys and values associated with this app monitor.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_app_monitorselectname, regionRetrieves the complete configuration information for one app monitor.
list_app_monitorsselectregionmaxResults, nextTokenReturns a list of the Amazon CloudWatch RUM app monitors in the account.
create_app_monitorinsertregionCreates a Amazon CloudWatch RUM app monitor, which collects telemetry data from your application and sends that data to RUM. The data includes performance and reliability information such as page load time, client-side errors, and user behavior. You use this operation only to create a new app monitor. To update an existing app monitor, use UpdateAppMonitor instead. After you create an app monitor, sign in to the CloudWatch RUM console to get the JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated?
update_app_monitorupdatename, regionUpdates the configuration of an existing app monitor. When you use this operation, only the parts of the app monitor configuration that you specify in this operation are changed. For any parameters that you omit, the existing values are kept. You can't use this operation to change the tags of an existing app monitor. To change the tags of an existing app monitor, use TagResource. To create a new app monitor, use CreateAppMonitor. After you update an app monitor, sign in to the CloudWatch RUM console to get the updated JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated?
delete_app_monitordeletename, regionDeletes an existing app monitor. This immediately stops the collection of data.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringThe name of the app monitor to delete.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to return in one operation. The default is 50. The maximum that you can specify is 100.
nextTokenstringUse the token returned by the previous operation to request the next page of results.

SELECT examples

Retrieves the complete configuration information for one app monitor.

SELECT
app_monitor_configuration,
created,
custom_events,
data_storage,
deobfuscation_configuration,
domain,
domain_list,
id,
last_modified,
name,
platform,
state,
tags
FROM aws.rum.app_monitors
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a Amazon CloudWatch RUM app monitor, which collects telemetry data from your application and sends that data to RUM. The data includes performance and reliability information such as page load time, client-side errors, and user behavior. You use this operation only to create a new app monitor. To update an existing app monitor, use UpdateAppMonitor instead. After you create an app monitor, sign in to the CloudWatch RUM console to get the JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated?

INSERT INTO aws.rum.app_monitors (
Name,
Domain,
DomainList,
Tags,
AppMonitorConfiguration,
CwLogEnabled,
CustomEvents,
DeobfuscationConfiguration,
Platform,
region
)
SELECT
'{{ Name }}',
'{{ Domain }}',
'{{ DomainList }}',
'{{ Tags }}',
'{{ AppMonitorConfiguration }}',
{{ CwLogEnabled }},
'{{ CustomEvents }}',
'{{ DeobfuscationConfiguration }}',
'{{ Platform }}',
'{{ region }}'
RETURNING
id
;

UPDATE examples

Updates the configuration of an existing app monitor. When you use this operation, only the parts of the app monitor configuration that you specify in this operation are changed. For any parameters that you omit, the existing values are kept. You can't use this operation to change the tags of an existing app monitor. To change the tags of an existing app monitor, use TagResource. To create a new app monitor, use CreateAppMonitor. After you update an app monitor, sign in to the CloudWatch RUM console to get the updated JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated?

UPDATE aws.rum.app_monitors
SET
Domain = '{{ Domain }}',
DomainList = '{{ DomainList }}',
AppMonitorConfiguration = '{{ AppMonitorConfiguration }}',
CwLogEnabled = {{ CwLogEnabled }},
CustomEvents = '{{ CustomEvents }}',
DeobfuscationConfiguration = '{{ DeobfuscationConfiguration }}'
WHERE
name = '{{ name }}' --required
AND region = '{{ region }}' --required;

DELETE examples

Deletes an existing app monitor. This immediately stops the collection of data.

DELETE FROM aws.rum.app_monitors
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
;