@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.720Z") @Stability(value=Stable) public class CfnAppMonitor extends CfnResource implements IInspectable
Creates a CloudWatch RUM app monitor, which you can use to collect telemetry data from your application and send it to CloudWatch RUM. The data includes performance and reliability information such as page load time, client-side errors, and user behavior.
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?
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.rum.*;
CfnAppMonitor cfnAppMonitor = CfnAppMonitor.Builder.create(this, "MyCfnAppMonitor")
.domain("domain")
.name("name")
// the properties below are optional
.appMonitorConfiguration(AppMonitorConfigurationProperty.builder()
.allowCookies(false)
.enableXRay(false)
.excludedPages(List.of("excludedPages"))
.favoritePages(List.of("favoritePages"))
.guestRoleArn("guestRoleArn")
.identityPoolId("identityPoolId")
.includedPages(List.of("includedPages"))
.sessionSampleRate(123)
.telemetries(List.of("telemetries"))
.build())
.cwLogEnabled(false)
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnAppMonitor.AppMonitorConfigurationProperty
This structure contains much of the configuration data for the app monitor.
|
static class |
CfnAppMonitor.Builder
A fluent builder for
CfnAppMonitor. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnAppMonitor(software.constructs.Construct scope,
String id,
CfnAppMonitorProps props)
Create a new `AWS::RUM::AppMonitor`.
|
protected |
CfnAppMonitor(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnAppMonitor(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAppMonitorConfiguration()
A structure that contains much of the configuration data for the app monitor.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getCwLogEnabled()
Data collected by CloudWatch RUM is kept by RUM for 30 days and then deleted.
|
String |
getDomain()
The top-level internet domain name for which your application has administrative authority.
|
String |
getName()
A name for the app monitor.
|
TagManager |
getTags()
Assigns one or more tags (key-value pairs) to the app monitor.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAppMonitorConfiguration(CfnAppMonitor.AppMonitorConfigurationProperty value)
A structure that contains much of the configuration data for the app monitor.
|
void |
setAppMonitorConfiguration(IResolvable value)
A structure that contains much of the configuration data for the app monitor.
|
void |
setCwLogEnabled(Boolean value)
Data collected by CloudWatch RUM is kept by RUM for 30 days and then deleted.
|
void |
setCwLogEnabled(IResolvable value)
Data collected by CloudWatch RUM is kept by RUM for 30 days and then deleted.
|
void |
setDomain(String value)
The top-level internet domain name for which your application has administrative authority.
|
void |
setName(String value)
A name for the app monitor.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnAppMonitor(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAppMonitor(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnAppMonitor(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnAppMonitorProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
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 AWS 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 AWS resources .
@Stability(value=Stable) @NotNull public String getDomain()
This parameter is required.
@Stability(value=Stable)
public void setDomain(@NotNull
String value)
This parameter is required.
@Stability(value=Stable) @NotNull public String getName()
This parameter is required.
@Stability(value=Stable)
public void setName(@NotNull
String value)
This parameter is required.
@Stability(value=Stable) @Nullable public Object getAppMonitorConfiguration()
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 AWS .
If you omit this argument, the sample rate used for CloudWatch RUM is set to 10% of the user sessions.
@Stability(value=Stable)
public void setAppMonitorConfiguration(@Nullable
CfnAppMonitor.AppMonitorConfigurationProperty value)
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 AWS .
If you omit this argument, the sample rate used for CloudWatch RUM is set to 10% of the user sessions.
@Stability(value=Stable)
public void setAppMonitorConfiguration(@Nullable
IResolvable value)
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 AWS .
If you omit this argument, the sample rate used for CloudWatch RUM is set to 10% of the user sessions.
@Stability(value=Stable) @Nullable public Object getCwLogEnabled()
This parameter specifies whether CloudWatch 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 .
@Stability(value=Stable)
public void setCwLogEnabled(@Nullable
Boolean value)
This parameter specifies whether CloudWatch 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 .
@Stability(value=Stable)
public void setCwLogEnabled(@Nullable
IResolvable value)
This parameter specifies whether CloudWatch 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 .
Copyright © 2022. All rights reserved.