CloudWatchRUM

Table of Contents

Client

class CloudWatchRUM.Client

A low-level client representing CloudWatch RUM

With Amazon CloudWatch RUM, you can perform real-user monitoring to collect client-side data about your web application performance from actual user sessions in real time. The data collected includes page load times, client-side errors, and user behavior. When you view this data, you can see it all aggregated together and also see breakdowns by the browsers and devices that your customers use.

<p>You can use the collected data to quickly identify and debug client-side performance issues. CloudWatch RUM helps you visualize anomalies in your application performance and find relevant debugging data such as error messages, stack traces, and user sessions. You can also use RUM to understand the range of end-user impact including the number of users, geolocations, and browsers used.</p>

import boto3

client = boto3.client('rum')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
close()

Closes underlying endpoint connections.

create_app_monitor(**kwargs)

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?

See also: AWS API Documentation

Request Syntax

response = client.create_app_monitor(
    AppMonitorConfiguration={
        'AllowCookies': True|False,
        'EnableXRay': True|False,
        'ExcludedPages': [
            'string',
        ],
        'FavoritePages': [
            'string',
        ],
        'GuestRoleArn': 'string',
        'IdentityPoolId': 'string',
        'IncludedPages': [
            'string',
        ],
        'SessionSampleRate': 123.0,
        'Telemetries': [
            'errors'|'performance'|'http',
        ]
    },
    CwLogEnabled=True|False,
    Domain='string',
    Name='string',
    Tags={
        'string': 'string'
    }
)
Parameters
  • AppMonitorConfiguration (dict) --

    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.

    • AllowCookies (boolean) --

      If you set this to true , the RUM web client sets two cookies, a session cookie and a user cookie. The cookies allow the RUM web client to collect data relating to the number of users an application has and the behavior of the application across a sequence of events. Cookies are stored in the top-level domain of the current page.

    • EnableXRay (boolean) --

      If you set this to true , RUM enables X-Ray tracing for the user sessions that RUM samples. RUM adds an X-Ray trace header to allowed HTTP requests. It also records an X-Ray segment for allowed HTTP requests. You can see traces and segments from these user sessions in the X-Ray console and the CloudWatch ServiceLens console. For more information, see What is X-Ray?

    • ExcludedPages (list) --

      A list of URLs in your website or application to exclude from RUM data collection.

      You can't include both ExcludedPages and IncludedPages in the same operation.

      • (string) --
    • FavoritePages (list) --

      A list of pages in the CloudWatch RUM console that are to be displayed with a "favorite" icon.

      • (string) --
    • GuestRoleArn (string) --

      The ARN of the guest IAM role that is attached to the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.

    • IdentityPoolId (string) --

      The ID of the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.

    • IncludedPages (list) --

      If this app monitor is to collect data from only certain pages in your application, this structure lists those pages.

      <p>You can't include both <code>ExcludedPages</code> and <code>IncludedPages</code> in the same operation.</p>
      • (string) --
    • SessionSampleRate (float) --

      Specifies the percentage of user sessions to use for RUM data collection. Choosing a higher percentage gives you more data but also incurs more costs.

      The number you specify is the percentage of user sessions that will be used.

      If you omit this parameter, the default of 10 is used.

    • Telemetries (list) --

      An array that lists the types of telemetry data that this app monitor is to collect.

      • errors indicates that RUM collects data about unhandled JavaScript errors raised by your application.
      • performance indicates that RUM collects performance data about how your application and its resources are loaded and rendered. This includes Core Web Vitals.
      • http indicates that RUM collects data about HTTP errors thrown by your application.
      • (string) --
  • CwLogEnabled (boolean) --

    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 .

  • Domain (string) --

    [REQUIRED]

    The top-level internet domain name for which your application has administrative authority.

  • Name (string) --

    [REQUIRED]

    A name for the app monitor.

  • Tags (dict) --

    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.

    <p>You can associate as many as 50 tags with an app monitor.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a>.</p>
    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{
    'Id': 'string'
}

Response Structure

  • (dict) --

    • Id (string) --

      The unique ID of the new app monitor.

Exceptions

  • CloudWatchRUM.Client.exceptions.ConflictException
  • CloudWatchRUM.Client.exceptions.ServiceQuotaExceededException
  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
  • CloudWatchRUM.Client.exceptions.ThrottlingException
  • CloudWatchRUM.Client.exceptions.AccessDeniedException
delete_app_monitor(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.delete_app_monitor(
    Name='string'
)
Parameters
Name (string) --

[REQUIRED]

The name of the app monitor to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • CloudWatchRUM.Client.exceptions.ConflictException
  • CloudWatchRUM.Client.exceptions.ResourceNotFoundException
  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
  • CloudWatchRUM.Client.exceptions.ThrottlingException
  • CloudWatchRUM.Client.exceptions.AccessDeniedException
get_app_monitor(**kwargs)

Retrieves the complete configuration information for one app monitor.

See also: AWS API Documentation

Request Syntax

response = client.get_app_monitor(
    Name='string'
)
Parameters
Name (string) --

[REQUIRED]

The app monitor to retrieve information for.

Return type
dict
Returns
Response Syntax
{
    'AppMonitor': {
        'AppMonitorConfiguration': {
            'AllowCookies': True|False,
            'EnableXRay': True|False,
            'ExcludedPages': [
                'string',
            ],
            'FavoritePages': [
                'string',
            ],
            'GuestRoleArn': 'string',
            'IdentityPoolId': 'string',
            'IncludedPages': [
                'string',
            ],
            'SessionSampleRate': 123.0,
            'Telemetries': [
                'errors'|'performance'|'http',
            ]
        },
        'Created': 'string',
        'DataStorage': {
            'CwLog': {
                'CwLogEnabled': True|False,
                'CwLogGroup': 'string'
            }
        },
        'Domain': 'string',
        'Id': 'string',
        'LastModified': 'string',
        'Name': 'string',
        'State': 'CREATED'|'DELETING'|'ACTIVE',
        'Tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --
    • AppMonitor (dict) --

      A structure containing all the configuration information for the app monitor.

      • AppMonitorConfiguration (dict) --

        A structure that contains much of the configuration data for the app monitor.

        • AllowCookies (boolean) --

          If you set this to true , the RUM web client sets two cookies, a session cookie and a user cookie. The cookies allow the RUM web client to collect data relating to the number of users an application has and the behavior of the application across a sequence of events. Cookies are stored in the top-level domain of the current page.

        • EnableXRay (boolean) --

          If you set this to true , RUM enables X-Ray tracing for the user sessions that RUM samples. RUM adds an X-Ray trace header to allowed HTTP requests. It also records an X-Ray segment for allowed HTTP requests. You can see traces and segments from these user sessions in the X-Ray console and the CloudWatch ServiceLens console. For more information, see What is X-Ray?

        • ExcludedPages (list) --

          A list of URLs in your website or application to exclude from RUM data collection.

          You can't include both ExcludedPages and IncludedPages in the same operation.

          • (string) --
        • FavoritePages (list) --

          A list of pages in the CloudWatch RUM console that are to be displayed with a "favorite" icon.

          • (string) --
        • GuestRoleArn (string) --

          The ARN of the guest IAM role that is attached to the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.

        • IdentityPoolId (string) --

          The ID of the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.

        • IncludedPages (list) --

          If this app monitor is to collect data from only certain pages in your application, this structure lists those pages.

          <p>You can't include both <code>ExcludedPages</code> and <code>IncludedPages</code> in the same operation.</p>
          • (string) --
        • SessionSampleRate (float) --

          Specifies the percentage of user sessions to use for RUM data collection. Choosing a higher percentage gives you more data but also incurs more costs.

          The number you specify is the percentage of user sessions that will be used.

          If you omit this parameter, the default of 10 is used.

        • Telemetries (list) --

          An array that lists the types of telemetry data that this app monitor is to collect.

          • errors indicates that RUM collects data about unhandled JavaScript errors raised by your application.
          • performance indicates that RUM collects performance data about how your application and its resources are loaded and rendered. This includes Core Web Vitals.
          • http indicates that RUM collects data about HTTP errors thrown by your application.
          • (string) --
      • Created (string) --

        The date and time that this app monitor was created.

      • DataStorage (dict) --

        A structure that contains information about whether this app monitor stores a copy of the telemetry data that RUM collects using CloudWatch Logs.

        • CwLog (dict) --

          A structure that contains the information about whether the app monitor stores copies of the data that RUM collects in CloudWatch Logs. If it does, this structure also contains the name of the log group.

          • CwLogEnabled (boolean) --

            Indicated whether the app monitor stores copies of the data that RUM collects in CloudWatch Logs.

          • CwLogGroup (string) --

            The name of the log group where the copies are stored.

      • Domain (string) --

        The top-level internet domain name for which your application has administrative authority.

      • Id (string) --

        The unique ID of this app monitor.

      • LastModified (string) --

        The date and time of the most recent changes to this app monitor's configuration.

      • Name (string) --

        The name of the app monitor.

      • State (string) --

        The current state of the app monitor.

      • Tags (dict) --

        The list of tag keys and values associated with this app monitor.

        • (string) --
          • (string) --

Exceptions

  • CloudWatchRUM.Client.exceptions.ResourceNotFoundException
  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
  • CloudWatchRUM.Client.exceptions.ThrottlingException
  • CloudWatchRUM.Client.exceptions.AccessDeniedException
get_app_monitor_data(**kwargs)

Retrieves the raw performance events that RUM has collected from your web application, so that you can do your own processing or analysis of this data.

See also: AWS API Documentation

Request Syntax

response = client.get_app_monitor_data(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    Name='string',
    NextToken='string',
    TimeRange={
        'After': 123,
        'Before': 123
    }
)
Parameters
  • Filters (list) --

    An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.

    • (dict) --

      A structure that defines a key and values that you can use to filter the results. The only performance events that are returned are those that have values matching the ones that you specify in one of your QueryFilter structures.

      For example, you could specify Browser as the Name and specify Chrome,Firefox as the Values to return events generated only from those browsers.

      Specifying Invert as the Name works as a "not equal to" filter. For example, specify Invert as the Name and specify Chrome as the value to return all events except events from user sessions with the Chrome browser.

      • Name (string) --

        The name of a key to search for. The filter returns only the events that match the Name and Values that you specify.

        Valid values for Name are Browser | Device | Country | Page | OS | EventType | Invert

      • Values (list) --

        The values of the Name that are to be be included in the returned results.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in one operation.
  • Name (string) --

    [REQUIRED]

    The name of the app monitor that collected the data that you want to retrieve.

  • NextToken (string) -- Use the token returned by the previous operation to request the next page of results.
  • TimeRange (dict) --

    [REQUIRED]

    A structure that defines the time range that you want to retrieve results from.

    • After (integer) -- [REQUIRED]

      The beginning of the time range to retrieve performance events from.

    • Before (integer) --

      The end of the time range to retrieve performance events from. If you omit this, the time range extends to the time that this operation is performed.

Return type

dict

Returns

Response Syntax

{
    'Events': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Events (list) --

      The events that RUM collected that match your request.

      • (string) --
    • NextToken (string) --

      A token that you can use in a subsequent operation to retrieve the next set of results.

Exceptions

  • CloudWatchRUM.Client.exceptions.ResourceNotFoundException
  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
  • CloudWatchRUM.Client.exceptions.ThrottlingException
  • CloudWatchRUM.Client.exceptions.AccessDeniedException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_app_monitors(**kwargs)

Returns a list of the Amazon CloudWatch RUM app monitors in the account.

See also: AWS API Documentation

Request Syntax

response = client.list_app_monitors(
    MaxResults=123,
    NextToken='string'
)
Parameters
  • MaxResults (integer) -- The maximum number of results to return in one operation.
  • NextToken (string) -- Use the token returned by the previous operation to request the next page of results.
Return type

dict

Returns

Response Syntax

{
    'AppMonitorSummaries': [
        {
            'Created': 'string',
            'Id': 'string',
            'LastModified': 'string',
            'Name': 'string',
            'State': 'CREATED'|'DELETING'|'ACTIVE'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AppMonitorSummaries (list) --

      An array of structures that contain information about the returned app monitors.

      • (dict) --

        A structure that includes some data about app monitors and their settings.

        • Created (string) --

          The date and time that the app monitor was created.

        • Id (string) --

          The unique ID of this app monitor.

        • LastModified (string) --

          The date and time of the most recent changes to this app monitor's configuration.

        • Name (string) --

          The name of this app monitor.

        • State (string) --

          The current state of this app monitor.

    • NextToken (string) --

      A token that you can use in a subsequent operation to retrieve the next set of results.

Exceptions

  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
  • CloudWatchRUM.Client.exceptions.ThrottlingException
  • CloudWatchRUM.Client.exceptions.AccessDeniedException
list_tags_for_resource(**kwargs)

Displays the tags associated with a CloudWatch RUM resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    ResourceArn='string'
)
Parameters
ResourceArn (string) --

[REQUIRED]

The ARN of the resource that you want to see the tags of.

Return type
dict
Returns
Response Syntax
{
    'ResourceArn': 'string',
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --
    • ResourceArn (string) --

      The ARN of the resource that you are viewing.

    • Tags (dict) --

      The list of tag keys and values associated with the resource you specified.

      • (string) --
        • (string) --

Exceptions

  • CloudWatchRUM.Client.exceptions.ResourceNotFoundException
  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
put_rum_events(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.put_rum_events(
    AppMonitorDetails={
        'id': 'string',
        'name': 'string',
        'version': 'string'
    },
    BatchId='string',
    Id='string',
    RumEvents=[
        {
            'details': 'string',
            'id': 'string',
            'metadata': 'string',
            'timestamp': datetime(2015, 1, 1),
            'type': 'string'
        },
    ],
    UserDetails={
        'sessionId': 'string',
        'userId': 'string'
    }
)
Parameters
  • AppMonitorDetails (dict) --

    [REQUIRED]

    A structure that contains information about the app monitor that collected this telemetry information.

    • id (string) --

      The unique ID of the app monitor.

    • name (string) --

      The name of the app monitor.

    • version (string) --

      The version of the app monitor.

  • BatchId (string) --

    [REQUIRED]

    A unique identifier for this batch of RUM event data.

  • Id (string) --

    [REQUIRED]

    The ID of the app monitor that is sending this data.

  • RumEvents (list) --

    [REQUIRED]

    An array of structures that contain the telemetry event data.

    • (dict) --

      A structure that contains the information for one performance event that RUM collects from a user session with your application.

      • details (string) -- [REQUIRED]

        A string containing details about the event.

      • id (string) -- [REQUIRED]

        A unique ID for this event.

      • metadata (string) --

        Metadata about this event, which contains a JSON serialization of the identity of the user for this session. The user information comes from information such as the HTTP user-agent request header and document interface.

      • timestamp (datetime) -- [REQUIRED]

        The exact time that this event occurred.

      • type (string) -- [REQUIRED]

        The JSON schema that denotes the type of event this is, such as a page load or a new session.

  • UserDetails (dict) --

    [REQUIRED]

    A structure that contains information about the user session that this batch of events was collected from.

    • sessionId (string) --

      The session ID that the performance events are from.

    • userId (string) --

      The ID of the user for this user session. This ID is generated by RUM and does not include any personally identifiable information about the user.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • CloudWatchRUM.Client.exceptions.ResourceNotFoundException
  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
  • CloudWatchRUM.Client.exceptions.ThrottlingException
  • CloudWatchRUM.Client.exceptions.AccessDeniedException
tag_resource(**kwargs)

Assigns one or more tags (key-value pairs) to the specified CloudWatch RUM resource. Currently, the only resources that can be tagged app monitors.

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 use the TagResource action with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a resource.

For more information, see Tagging Amazon Web Services resources .

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    ResourceArn='string',
    Tags={
        'string': 'string'
    }
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The ARN of the CloudWatch RUM resource that you're adding tags to.

  • Tags (dict) --

    [REQUIRED]

    The list of key-value pairs to associate with the resource.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • CloudWatchRUM.Client.exceptions.ResourceNotFoundException
  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
untag_resource(**kwargs)

Removes one or more tags from the specified resource.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    ResourceArn='string',
    TagKeys=[
        'string',
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The ARN of the CloudWatch RUM resource that you're removing tags from.

  • TagKeys (list) --

    [REQUIRED]

    The list of tag keys to remove from the resource.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • CloudWatchRUM.Client.exceptions.ResourceNotFoundException
  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
update_app_monitor(**kwargs)

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?

See also: AWS API Documentation

Request Syntax

response = client.update_app_monitor(
    AppMonitorConfiguration={
        'AllowCookies': True|False,
        'EnableXRay': True|False,
        'ExcludedPages': [
            'string',
        ],
        'FavoritePages': [
            'string',
        ],
        'GuestRoleArn': 'string',
        'IdentityPoolId': 'string',
        'IncludedPages': [
            'string',
        ],
        'SessionSampleRate': 123.0,
        'Telemetries': [
            'errors'|'performance'|'http',
        ]
    },
    CwLogEnabled=True|False,
    Domain='string',
    Name='string'
)
Parameters
  • AppMonitorConfiguration (dict) --

    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 .

    • AllowCookies (boolean) --

      If you set this to true , the RUM web client sets two cookies, a session cookie and a user cookie. The cookies allow the RUM web client to collect data relating to the number of users an application has and the behavior of the application across a sequence of events. Cookies are stored in the top-level domain of the current page.

    • EnableXRay (boolean) --

      If you set this to true , RUM enables X-Ray tracing for the user sessions that RUM samples. RUM adds an X-Ray trace header to allowed HTTP requests. It also records an X-Ray segment for allowed HTTP requests. You can see traces and segments from these user sessions in the X-Ray console and the CloudWatch ServiceLens console. For more information, see What is X-Ray?

    • ExcludedPages (list) --

      A list of URLs in your website or application to exclude from RUM data collection.

      You can't include both ExcludedPages and IncludedPages in the same operation.

      • (string) --
    • FavoritePages (list) --

      A list of pages in the CloudWatch RUM console that are to be displayed with a "favorite" icon.

      • (string) --
    • GuestRoleArn (string) --

      The ARN of the guest IAM role that is attached to the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.

    • IdentityPoolId (string) --

      The ID of the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.

    • IncludedPages (list) --

      If this app monitor is to collect data from only certain pages in your application, this structure lists those pages.

      <p>You can't include both <code>ExcludedPages</code> and <code>IncludedPages</code> in the same operation.</p>
      • (string) --
    • SessionSampleRate (float) --

      Specifies the percentage of user sessions to use for RUM data collection. Choosing a higher percentage gives you more data but also incurs more costs.

      The number you specify is the percentage of user sessions that will be used.

      If you omit this parameter, the default of 10 is used.

    • Telemetries (list) --

      An array that lists the types of telemetry data that this app monitor is to collect.

      • errors indicates that RUM collects data about unhandled JavaScript errors raised by your application.
      • performance indicates that RUM collects performance data about how your application and its resources are loaded and rendered. This includes Core Web Vitals.
      • http indicates that RUM collects data about HTTP errors thrown by your application.
      • (string) --
  • CwLogEnabled (boolean) -- 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.
  • Domain (string) -- The top-level internet domain name for which your application has administrative authority.
  • Name (string) --

    [REQUIRED]

    The name of the app monitor to update.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • CloudWatchRUM.Client.exceptions.ConflictException
  • CloudWatchRUM.Client.exceptions.ResourceNotFoundException
  • CloudWatchRUM.Client.exceptions.InternalServerException
  • CloudWatchRUM.Client.exceptions.ValidationException
  • CloudWatchRUM.Client.exceptions.ThrottlingException
  • CloudWatchRUM.Client.exceptions.AccessDeniedException

Paginators

The available paginators are:

class CloudWatchRUM.Paginator.GetAppMonitorData
paginator = client.get_paginator('get_app_monitor_data')
paginate(**kwargs)

Creates an iterator that will paginate through responses from CloudWatchRUM.Client.get_app_monitor_data().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    Name='string',
    TimeRange={
        'After': 123,
        'Before': 123
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.

    • (dict) --

      A structure that defines a key and values that you can use to filter the results. The only performance events that are returned are those that have values matching the ones that you specify in one of your QueryFilter structures.

      For example, you could specify Browser as the Name and specify Chrome,Firefox as the Values to return events generated only from those browsers.

      Specifying Invert as the Name works as a "not equal to" filter. For example, specify Invert as the Name and specify Chrome as the value to return all events except events from user sessions with the Chrome browser.

      • Name (string) --

        The name of a key to search for. The filter returns only the events that match the Name and Values that you specify.

        Valid values for Name are Browser | Device | Country | Page | OS | EventType | Invert

      • Values (list) --

        The values of the Name that are to be be included in the returned results.

        • (string) --
  • Name (string) --

    [REQUIRED]

    The name of the app monitor that collected the data that you want to retrieve.

  • TimeRange (dict) --

    [REQUIRED]

    A structure that defines the time range that you want to retrieve results from.

    • After (integer) -- [REQUIRED]

      The beginning of the time range to retrieve performance events from.

    • Before (integer) --

      The end of the time range to retrieve performance events from. If you omit this, the time range extends to the time that this operation is performed.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Events': [
        'string',
    ],

}

Response Structure

  • (dict) --

    • Events (list) --

      The events that RUM collected that match your request.

      • (string) --

class CloudWatchRUM.Paginator.ListAppMonitors
paginator = client.get_paginator('list_app_monitors')
paginate(**kwargs)

Creates an iterator that will paginate through responses from CloudWatchRUM.Client.list_app_monitors().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

  • PageSize (integer) --

    The size of each page.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'AppMonitorSummaries': [
        {
            'Created': 'string',
            'Id': 'string',
            'LastModified': 'string',
            'Name': 'string',
            'State': 'CREATED'|'DELETING'|'ACTIVE'
        },
    ],

}

Response Structure

  • (dict) --
    • AppMonitorSummaries (list) --

      An array of structures that contain information about the returned app monitors.

      • (dict) --

        A structure that includes some data about app monitors and their settings.

        • Created (string) --

          The date and time that the app monitor was created.

        • Id (string) --

          The unique ID of this app monitor.

        • LastModified (string) --

          The date and time of the most recent changes to this app monitor's configuration.

        • Name (string) --

          The name of this app monitor.

        • State (string) --

          The current state of this app monitor.