create_app_monitor
async
¶
create_app_monitor(
name: AppMonitorName,
*,
config_overrides: Optional[AsyncRUMClientConfig] = None,
domain: Optional[AppMonitorDomain] = None,
domain_list: Optional[AppMonitorDomainList] = None,
tags: Optional[TagMap] = None,
app_monitor_configuration: Optional[AppMonitorConfiguration] = None,
cw_log_enabled: Optional[bool] = None,
custom_events: Optional[CustomEvents] = None,
deobfuscation_configuration: Optional[DeobfuscationConfiguration] = None,
platform: Optional[AppMonitorPlatform] = None,
) -> CreateAppMonitorResponse
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?
Parameters:
-
name(AppMonitorName) –A name for the app monitor.
-
domain(Optional[AppMonitorDomain], default:None) –The top-level internet domain name for which your application has administrative authority.
-
domain_list(Optional[AppMonitorDomainList], default:None) –List the domain names for which your application has administrative authority. The
CreateAppMonitorrequires either the domain or the domain list. -
tags(Optional[TagMap], default:None) –Assigns one or more tags (key-value pairs) to the app monitor.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
You can associate as many as 50 tags with an app monitor.
For more information, see Tagging Amazon Web Services resources.
-
app_monitor_configuration(Optional[AppMonitorConfiguration], default:None) –A structure that contains much of the configuration data for the app monitor. If you are using Amazon Cognito for authorization, you must include this structure in your request, and it must include the ID of the Amazon Cognito identity pool to use for authorization. If you don't include
AppMonitorConfiguration, you must set up your own authorization method. For more information, see Authorize your application to send data to Amazon Web Services.If you omit this argument, the sample rate used for RUM is set to 10% of the user sessions.
-
cw_log_enabled(Optional[bool], default:None) –Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges.
If you omit this parameter, the default is
false. -
custom_events(Optional[CustomEvents], default:None) –Specifies whether this app monitor allows the web client to define and send custom events. If you omit this parameter, custom events are
DISABLED.For more information about custom events, see Send custom events.
-
deobfuscation_configuration(Optional[DeobfuscationConfiguration], default:None) –A structure that contains the configuration for how an app monitor can deobfuscate stack traces.
-
platform(Optional[AppMonitorPlatform], default:None) –The platform type for the app monitor. Valid values are
Webfor web applications,Androidfor Android applications, andiOSfor IOS applications. If you omit this parameter, the default isWeb.
Raises:
-
AccessDeniedException–You don't have sufficient permissions to perform this action.
-
ConflictException–This operation attempted to create a resource that already exists.
-
InternalServerException–Internal service exception.
-
ResourceNotFoundException–Resource not found.
-
ServiceQuotaExceededException–This request exceeds a service quota.
-
ThrottlingException–The request was throttled because of quota limits.
-
ValidationException–One of the arguments for the request is not valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_rum/_services/async_rum.py
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 | |