Class: Aws::CloudWatchRUM::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::CloudWatchRUM::Client
- Includes:
- Aws::ClientStubs
- Defined in:
- lib/aws-sdk-cloudwatchrum/client.rb
Overview
An API client for CloudWatchRUM. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::CloudWatchRUM::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#batch_create_rum_metric_definitions(params = {}) ⇒ Types::BatchCreateRumMetricDefinitionsResponse
Specifies the extended metrics and custom metrics that you want a CloudWatch RUM app monitor to send to a destination.
-
#batch_delete_rum_metric_definitions(params = {}) ⇒ Types::BatchDeleteRumMetricDefinitionsResponse
Removes the specified metrics from being sent to an extended metrics destination.
-
#batch_get_rum_metric_definitions(params = {}) ⇒ Types::BatchGetRumMetricDefinitionsResponse
Retrieves the list of metrics and dimensions that a RUM app monitor is sending to a single destination.
-
#create_app_monitor(params = {}) ⇒ Types::CreateAppMonitorResponse
Creates a Amazon CloudWatch RUM app monitor, which collects telemetry data from your application and sends that data to RUM.
-
#delete_app_monitor(params = {}) ⇒ Struct
Deletes an existing app monitor.
-
#delete_resource_policy(params = {}) ⇒ Types::DeleteResourcePolicyResponse
Removes the association of a resource-based policy from an app monitor.
-
#delete_rum_metrics_destination(params = {}) ⇒ Struct
Deletes a destination for CloudWatch RUM extended metrics, so that the specified app monitor stops sending extended metrics to that destination.
-
#get_app_monitor(params = {}) ⇒ Types::GetAppMonitorResponse
Retrieves the complete configuration information for one app monitor.
-
#get_app_monitor_data(params = {}) ⇒ Types::GetAppMonitorDataResponse
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.
-
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Use this operation to retrieve information about a resource-based policy that is attached to an app monitor.
-
#list_app_monitors(params = {}) ⇒ Types::ListAppMonitorsResponse
Returns a list of the Amazon CloudWatch RUM app monitors in the account.
-
#list_rum_metrics_destinations(params = {}) ⇒ Types::ListRumMetricsDestinationsResponse
Returns a list of destinations that you have created to receive RUM extended metrics, for the specified app monitor.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Displays the tags associated with a CloudWatch RUM resource.
-
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
Use this operation to assign a resource-based policy to a CloudWatch RUM app monitor to control access to it.
-
#put_rum_events(params = {}) ⇒ Struct
Sends telemetry events about your application performance and user behavior to CloudWatch RUM.
-
#put_rum_metrics_destination(params = {}) ⇒ Struct
Creates or updates a destination to receive extended metrics from CloudWatch RUM.
-
#tag_resource(params = {}) ⇒ Struct
Assigns one or more tags (key-value pairs) to the specified CloudWatch RUM resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from the specified resource.
-
#update_app_monitor(params = {}) ⇒ Struct
Updates the configuration of an existing app monitor.
-
#update_rum_metric_definition(params = {}) ⇒ Struct
Modifies one existing metric definition for CloudWatch RUM extended metrics.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
467 468 469 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 467 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1748 1749 1750 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1748 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1751 1752 1753 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1751 def errors_module Errors end |
Instance Method Details
#batch_create_rum_metric_definitions(params = {}) ⇒ Types::BatchCreateRumMetricDefinitionsResponse
Specifies the extended metrics and custom metrics that you want a CloudWatch RUM app monitor to send to a destination. Valid destinations include CloudWatch and Evidently.
By default, RUM app monitors send some metrics to CloudWatch. These default metrics are listed in [CloudWatch metrics that you can collect with CloudWatch RUM].
In addition to these default metrics, you can choose to send extended metrics, custom metrics, or both.
-
Extended metrics let you send metrics with additional dimensions that aren’t included in the default metrics. You can also send extended metrics to both Evidently and CloudWatch. The valid dimension names for the additional dimensions for extended metrics are ‘BrowserName`, `CountryCode`, `DeviceType`, `FileType`, `OSName`, and `PageId`. For more information, see [ Extended metrics that you can send to CloudWatch and CloudWatch Evidently].
-
Custom metrics are metrics that you define. You can send custom metrics to CloudWatch. CloudWatch Evidently, or both. With custom metrics, you can use any metric name and namespace. To derive the metrics, you can use any custom events, built-in events, custom attributes, or default attributes.
You can’t send custom metrics to the ‘AWS/RUM` namespace. You must send custom metrics to a custom namespace that you define. The namespace that you use can’t start with ‘AWS/`. CloudWatch RUM prepends `RUM/CustomMetrics/` to the custom namespace that you define, so the final namespace for your metrics in CloudWatch is `RUM/CustomMetrics/your-custom-namespace `.
The maximum number of metric definitions that you can specify in one ‘BatchCreateRumMetricDefinitions` operation is 200.
The maximum number of metric definitions that one destination can contain is 2000.
Extended metrics sent to CloudWatch and RUM custom metrics are charged as CloudWatch custom metrics. Each combination of additional dimension name and dimension value counts as a custom metric. For more information, see [Amazon CloudWatch Pricing].
You must have already created a destination for the metrics before you send them. For more information, see [PutRumMetricsDestination].
If some metric definitions specified in a ‘BatchCreateRumMetricDefinitions` operations are not valid, those metric definitions fail and return errors, but all valid metric definitions in the same operation still succeed.
[1]: docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-metrics.html [2]: docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-vended-metrics.html [3]: aws.amazon.com/cloudwatch/pricing/ [4]: docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_PutRumMetricsDestination.html
609 610 611 612 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 609 def batch_create_rum_metric_definitions(params = {}, = {}) req = build_request(:batch_create_rum_metric_definitions, params) req.send_request() end |
#batch_delete_rum_metric_definitions(params = {}) ⇒ Types::BatchDeleteRumMetricDefinitionsResponse
Removes the specified metrics from being sent to an extended metrics destination.
If some metric definition IDs specified in a ‘BatchDeleteRumMetricDefinitions` operations are not valid, those metric definitions fail and return errors, but all valid metric definition IDs in the same operation are still deleted.
The maximum number of metric definitions that you can specify in one ‘BatchDeleteRumMetricDefinitions` operation is 200.
674 675 676 677 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 674 def batch_delete_rum_metric_definitions(params = {}, = {}) req = build_request(:batch_delete_rum_metric_definitions, params) req.send_request() end |
#batch_get_rum_metric_definitions(params = {}) ⇒ Types::BatchGetRumMetricDefinitionsResponse
Retrieves the list of metrics and dimensions that a RUM app monitor is sending to a single destination.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
742 743 744 745 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 742 def batch_get_rum_metric_definitions(params = {}, = {}) req = build_request(:batch_get_rum_metric_definitions, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1721 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::CloudWatchRUM') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-cloudwatchrum' context[:gem_version] = '1.39.0' Seahorse::Client::Request.new(handlers, context) end |
#create_app_monitor(params = {}) ⇒ Types::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?]
[1]: docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_UpdateAppMonitor.html [2]: docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html
879 880 881 882 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 879 def create_app_monitor(params = {}, = {}) req = build_request(:create_app_monitor, params) req.send_request() end |
#delete_app_monitor(params = {}) ⇒ Struct
Deletes an existing app monitor. This immediately stops the collection of data.
902 903 904 905 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 902 def delete_app_monitor(params = {}, = {}) req = build_request(:delete_app_monitor, params) req.send_request() end |
#delete_resource_policy(params = {}) ⇒ Types::DeleteResourcePolicyResponse
Removes the association of a resource-based policy from an app monitor.
939 940 941 942 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 939 def delete_resource_policy(params = {}, = {}) req = build_request(:delete_resource_policy, params) req.send_request() end |
#delete_rum_metrics_destination(params = {}) ⇒ Struct
Deletes a destination for CloudWatch RUM extended metrics, so that the specified app monitor stops sending extended metrics to that destination.
976 977 978 979 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 976 def delete_rum_metrics_destination(params = {}, = {}) req = build_request(:delete_rum_metrics_destination, params) req.send_request() end |
#get_app_monitor(params = {}) ⇒ Types::GetAppMonitorResponse
Retrieves the complete configuration information for one app monitor.
1031 1032 1033 1034 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1031 def get_app_monitor(params = {}, = {}) req = build_request(:get_app_monitor, params) req.send_request() end |
#get_app_monitor_data(params = {}) ⇒ Types::GetAppMonitorDataResponse
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.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1094 1095 1096 1097 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1094 def get_app_monitor_data(params = {}, = {}) req = build_request(:get_app_monitor_data, params) req.send_request() end |
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Use this operation to retrieve information about a resource-based policy that is attached to an app monitor.
1126 1127 1128 1129 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1126 def get_resource_policy(params = {}, = {}) req = build_request(:get_resource_policy, params) req.send_request() end |
#list_app_monitors(params = {}) ⇒ Types::ListAppMonitorsResponse
Returns a list of the Amazon CloudWatch RUM app monitors in the account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1170 1171 1172 1173 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1170 def list_app_monitors(params = {}, = {}) req = build_request(:list_app_monitors, params) req.send_request() end |
#list_rum_metrics_destinations(params = {}) ⇒ Types::ListRumMetricsDestinationsResponse
Returns a list of destinations that you have created to receive RUM extended metrics, for the specified app monitor.
For more information about extended metrics, see [AddRumMetrics].
[1]: docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_AddRumMetrcs.html
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1226 1227 1228 1229 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1226 def list_rum_metrics_destinations(params = {}, = {}) req = build_request(:list_rum_metrics_destinations, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Displays the tags associated with a CloudWatch RUM resource.
1257 1258 1259 1260 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1257 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
Use this operation to assign a resource-based policy to a CloudWatch RUM app monitor to control access to it. Each app monitor can have one resource-based policy. The maximum size of the policy is 4 KB. To learn more about using resource policies with RUM, see [Using resource-based policies with CloudWatch RUM].
[1]: docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-resource-policies.html
1321 1322 1323 1324 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1321 def put_resource_policy(params = {}, = {}) req = build_request(:put_resource_policy, params) req.send_request() end |
#put_rum_events(params = {}) ⇒ Struct
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.
1394 1395 1396 1397 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1394 def put_rum_events(params = {}, = {}) req = build_request(:put_rum_events, params) req.send_request() end |
#put_rum_metrics_destination(params = {}) ⇒ Struct
Creates or updates a destination to receive extended metrics from CloudWatch RUM. You can send extended metrics to CloudWatch or to a CloudWatch Evidently experiment.
For more information about extended metrics, see [BatchCreateRumMetricDefinitions].
[1]: docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchCreateRumMetricDefinitions.html
1458 1459 1460 1461 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1458 def put_rum_metrics_destination(params = {}, = {}) req = build_request(:put_rum_metrics_destination, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
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].
1509 1510 1511 1512 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1509 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from the specified resource.
1536 1537 1538 1539 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1536 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_app_monitor(params = {}) ⇒ Struct
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?]
[1]: docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_TagResource.html [2]: docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_CreateAppMonitor.html [3]: docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html
1644 1645 1646 1647 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1644 def update_app_monitor(params = {}, = {}) req = build_request(:update_app_monitor, params) req.send_request() end |
#update_rum_metric_definition(params = {}) ⇒ Struct
Modifies one existing metric definition for CloudWatch RUM extended metrics. For more information about extended metrics, see [BatchCreateRumMetricsDefinitions].
[1]: docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchCreateRumMetricsDefinitions.html
1712 1713 1714 1715 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1712 def update_rum_metric_definition(params = {}, = {}) req = build_request(:update_rum_metric_definition, params) req.send_request() end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1741 1742 1743 |
# File 'lib/aws-sdk-cloudwatchrum/client.rb', line 1741 def waiter_names [] end |