Struct aws_sdk_rum::Client
source · pub struct Client { /* private fields */ }
Expand description
Client for CloudWatch RUM
Client for invoking operations on CloudWatch RUM. Each operation on CloudWatch RUM is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_rum::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::retry::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_rum::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_rum::Client::from_conf(config);
Implementations§
source§impl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
source§impl Client
impl Client
sourcepub fn batch_create_rum_metric_definitions(
&self
) -> BatchCreateRumMetricDefinitions
pub fn batch_create_rum_metric_definitions(
&self
) -> BatchCreateRumMetricDefinitions
Constructs a fluent builder for the BatchCreateRumMetricDefinitions
operation.
- The fluent builder is configurable:
app_monitor_name(impl Into<String>)
/set_app_monitor_name(Option<String>)
:The name of the CloudWatch RUM app monitor that is to send the metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:The destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, you must also specify the ARN of the CloudWatchEvidently experiment that will receive the metrics and an IAM role that has permission to write to the experiment.destination_arn(impl Into<String>)
/set_destination_arn(Option<String>)
:This parameter is required if
Destination
isEvidently
. IfDestination
isCloudWatch
, do not use this parameter.This parameter specifies the ARN of the Evidently experiment that is to receive the metrics. You must have already defined this experiment as a valid destination. For more information, see PutRumMetricsDestination.
metric_definitions(Vec<MetricDefinitionRequest>)
/set_metric_definitions(Option<Vec<MetricDefinitionRequest>>)
:An array of structures which define the metrics that you want to send.
- On success, responds with
BatchCreateRumMetricDefinitionsOutput
with field(s):errors(Option<Vec<BatchCreateRumMetricDefinitionsError>>)
:An array of error objects, if the operation caused any errors.
metric_definitions(Option<Vec<MetricDefinition>>)
:An array of structures that define the extended metrics.
- On failure, responds with
SdkError<BatchCreateRumMetricDefinitionsError>
sourcepub fn batch_delete_rum_metric_definitions(
&self
) -> BatchDeleteRumMetricDefinitions
pub fn batch_delete_rum_metric_definitions(
&self
) -> BatchDeleteRumMetricDefinitions
Constructs a fluent builder for the BatchDeleteRumMetricDefinitions
operation.
- The fluent builder is configurable:
app_monitor_name(impl Into<String>)
/set_app_monitor_name(Option<String>)
:The name of the CloudWatch RUM app monitor that is sending these metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:Defines the destination where you want to stop sending the specified metrics. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, you must also specify the ARN of the CloudWatchEvidently experiment that is to be the destination and an IAM role that has permission to write to the experiment.destination_arn(impl Into<String>)
/set_destination_arn(Option<String>)
:This parameter is required if
Destination
isEvidently
. IfDestination
isCloudWatch
, do not use this parameter.This parameter specifies the ARN of the Evidently experiment that was receiving the metrics that are being deleted.
metric_definition_ids(Vec<String>)
/set_metric_definition_ids(Option<Vec<String>>)
:An array of structures which define the metrics that you want to stop sending.
- On success, responds with
BatchDeleteRumMetricDefinitionsOutput
with field(s):errors(Option<Vec<BatchDeleteRumMetricDefinitionsError>>)
:An array of error objects, if the operation caused any errors.
metric_definition_ids(Option<Vec<String>>)
:The IDs of the metric definitions that were deleted.
- On failure, responds with
SdkError<BatchDeleteRumMetricDefinitionsError>
sourcepub fn batch_get_rum_metric_definitions(&self) -> BatchGetRumMetricDefinitions
pub fn batch_get_rum_metric_definitions(&self) -> BatchGetRumMetricDefinitions
Constructs a fluent builder for the BatchGetRumMetricDefinitions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
app_monitor_name(impl Into<String>)
/set_app_monitor_name(Option<String>)
:The name of the CloudWatch RUM app monitor that is sending the metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:The type of destination that you want to view metrics for. Valid values are
CloudWatch
andEvidently
.destination_arn(impl Into<String>)
/set_destination_arn(Option<String>)
:This parameter is required if
Destination
isEvidently
. IfDestination
isCloudWatch
, do not use this parameter.This parameter specifies the ARN of the Evidently experiment that corresponds to the destination.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in one operation. The default is 50. The maximum that you can specify is 100.
To retrieve the remaining results, make another call with the returned
NextToken
value.next_token(impl Into<String>)
/set_next_token(Option<String>)
:Use the token returned by the previous operation to request the next page of results.
- On success, responds with
BatchGetRumMetricDefinitionsOutput
with field(s):metric_definitions(Option<Vec<MetricDefinition>>)
:An array of structures that display information about the metrics that are sent by the specified app monitor to the specified destination.
next_token(Option<String>)
:A token that you can use in a subsequent operation to retrieve the next set of results.
- On failure, responds with
SdkError<BatchGetRumMetricDefinitionsError>
sourcepub fn create_app_monitor(&self) -> CreateAppMonitor
pub fn create_app_monitor(&self) -> CreateAppMonitor
Constructs a fluent builder for the CreateAppMonitor
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:A name for the app monitor.
domain(impl Into<String>)
/set_domain(Option<String>)
:The top-level internet domain name for which your application has administrative authority.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
: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(AppMonitorConfiguration)
/set_app_monitor_configuration(Option<AppMonitorConfiguration>)
: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(bool)
/set_cw_log_enabled(Option<bool>)
: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(CustomEvents)
/set_custom_events(Option<CustomEvents>)
: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.
- On success, responds with
CreateAppMonitorOutput
with field(s):id(Option<String>)
:The unique ID of the new app monitor.
- On failure, responds with
SdkError<CreateAppMonitorError>
sourcepub fn delete_app_monitor(&self) -> DeleteAppMonitor
pub fn delete_app_monitor(&self) -> DeleteAppMonitor
Constructs a fluent builder for the DeleteAppMonitor
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:The name of the app monitor to delete.
- On success, responds with
DeleteAppMonitorOutput
- On failure, responds with
SdkError<DeleteAppMonitorError>
sourcepub fn delete_rum_metrics_destination(&self) -> DeleteRumMetricsDestination
pub fn delete_rum_metrics_destination(&self) -> DeleteRumMetricsDestination
Constructs a fluent builder for the DeleteRumMetricsDestination
operation.
- The fluent builder is configurable:
app_monitor_name(impl Into<String>)
/set_app_monitor_name(Option<String>)
:The name of the app monitor that is sending metrics to the destination that you want to delete.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:The type of destination to delete. Valid values are
CloudWatch
andEvidently
.destination_arn(impl Into<String>)
/set_destination_arn(Option<String>)
:This parameter is required if
Destination
isEvidently
. IfDestination
isCloudWatch
, do not use this parameter. This parameter specifies the ARN of the Evidently experiment that corresponds to the destination to delete.
- On success, responds with
DeleteRumMetricsDestinationOutput
- On failure, responds with
SdkError<DeleteRumMetricsDestinationError>
sourcepub fn get_app_monitor(&self) -> GetAppMonitor
pub fn get_app_monitor(&self) -> GetAppMonitor
Constructs a fluent builder for the GetAppMonitor
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:The app monitor to retrieve information for.
- On success, responds with
GetAppMonitorOutput
with field(s):app_monitor(Option<AppMonitor>)
:A structure containing all the configuration information for the app monitor.
- On failure, responds with
SdkError<GetAppMonitorError>
sourcepub fn get_app_monitor_data(&self) -> GetAppMonitorData
pub fn get_app_monitor_data(&self) -> GetAppMonitorData
Constructs a fluent builder for the GetAppMonitorData
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:The name of the app monitor that collected the data that you want to retrieve.
time_range(TimeRange)
/set_time_range(Option<TimeRange>)
:A structure that defines the time range that you want to retrieve results from.
filters(Vec<QueryFilter>)
/set_filters(Option<Vec<QueryFilter>>)
: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.
max_results(i32)
/set_max_results(i32)
:The maximum number of results to return in one operation.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:Use the token returned by the previous operation to request the next page of results.
- On success, responds with
GetAppMonitorDataOutput
with field(s):events(Option<Vec<String>>)
:The events that RUM collected that match your request.
next_token(Option<String>)
:A token that you can use in a subsequent operation to retrieve the next set of results.
- On failure, responds with
SdkError<GetAppMonitorDataError>
sourcepub fn list_app_monitors(&self) -> ListAppMonitors
pub fn list_app_monitors(&self) -> ListAppMonitors
Constructs a fluent builder for the ListAppMonitors
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in one operation. The default is 50. The maximum that you can specify is 100.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:Use the token returned by the previous operation to request the next page of results.
- On success, responds with
ListAppMonitorsOutput
with field(s):next_token(Option<String>)
:A token that you can use in a subsequent operation to retrieve the next set of results.
app_monitor_summaries(Option<Vec<AppMonitorSummary>>)
:An array of structures that contain information about the returned app monitors.
- On failure, responds with
SdkError<ListAppMonitorsError>
sourcepub fn list_rum_metrics_destinations(&self) -> ListRumMetricsDestinations
pub fn list_rum_metrics_destinations(&self) -> ListRumMetricsDestinations
Constructs a fluent builder for the ListRumMetricsDestinations
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
app_monitor_name(impl Into<String>)
/set_app_monitor_name(Option<String>)
:The name of the app monitor associated with the destinations that you want to retrieve.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return in one operation. The default is 50. The maximum that you can specify is 100.
To retrieve the remaining results, make another call with the returned
NextToken
value.next_token(impl Into<String>)
/set_next_token(Option<String>)
:Use the token returned by the previous operation to request the next page of results.
- On success, responds with
ListRumMetricsDestinationsOutput
with field(s):destinations(Option<Vec<MetricDestinationSummary>>)
:The list of CloudWatch RUM extended metrics destinations associated with the app monitor that you specified.
next_token(Option<String>)
:A token that you can use in a subsequent operation to retrieve the next set of results.
- On failure, responds with
SdkError<ListRumMetricsDestinationsError>
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The ARN of the resource that you want to see the tags of.
- On success, responds with
ListTagsForResourceOutput
with field(s):resource_arn(Option<String>)
:The ARN of the resource that you are viewing.
tags(Option<HashMap<String, String>>)
:The list of tag keys and values associated with the resource you specified.
- On failure, responds with
SdkError<ListTagsForResourceError>
sourcepub fn put_rum_events(&self) -> PutRumEvents
pub fn put_rum_events(&self) -> PutRumEvents
Constructs a fluent builder for the PutRumEvents
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:The ID of the app monitor that is sending this data.
batch_id(impl Into<String>)
/set_batch_id(Option<String>)
:A unique identifier for this batch of RUM event data.
app_monitor_details(AppMonitorDetails)
/set_app_monitor_details(Option<AppMonitorDetails>)
:A structure that contains information about the app monitor that collected this telemetry information.
user_details(UserDetails)
/set_user_details(Option<UserDetails>)
:A structure that contains information about the user session that this batch of events was collected from.
rum_events(Vec<RumEvent>)
/set_rum_events(Option<Vec<RumEvent>>)
:An array of structures that contain the telemetry event data.
- On success, responds with
PutRumEventsOutput
- On failure, responds with
SdkError<PutRumEventsError>
sourcepub fn put_rum_metrics_destination(&self) -> PutRumMetricsDestination
pub fn put_rum_metrics_destination(&self) -> PutRumMetricsDestination
Constructs a fluent builder for the PutRumMetricsDestination
operation.
- The fluent builder is configurable:
app_monitor_name(impl Into<String>)
/set_app_monitor_name(Option<String>)
:The name of the CloudWatch RUM app monitor that will send the metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, you must also specify the ARN of the CloudWatchEvidently experiment that is to be the destination and an IAM role that has permission to write to the experiment.destination_arn(impl Into<String>)
/set_destination_arn(Option<String>)
:Use this parameter only if
Destination
isEvidently
. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.iam_role_arn(impl Into<String>)
/set_iam_role_arn(Option<String>)
:This parameter is required if
Destination
isEvidently
. IfDestination
isCloudWatch
, do not use this parameter.This parameter specifies the ARN of an IAM role that RUM will assume to write to the Evidently experiment that you are sending metrics to. This role must have permission to write to that experiment.
- On success, responds with
PutRumMetricsDestinationOutput
- On failure, responds with
SdkError<PutRumMetricsDestinationError>
sourcepub fn tag_resource(&self) -> TagResource
pub fn tag_resource(&self) -> TagResource
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The ARN of the CloudWatch RUM resource that you’re adding tags to.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:The list of key-value pairs to associate with the resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
sourcepub fn untag_resource(&self) -> UntagResource
pub fn untag_resource(&self) -> UntagResource
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The ARN of the CloudWatch RUM resource that you’re removing tags from.
tag_keys(Vec<String>)
/set_tag_keys(Option<Vec<String>>)
:The list of tag keys to remove from the resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
sourcepub fn update_app_monitor(&self) -> UpdateAppMonitor
pub fn update_app_monitor(&self) -> UpdateAppMonitor
Constructs a fluent builder for the UpdateAppMonitor
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:The name of the app monitor to update.
domain(impl Into<String>)
/set_domain(Option<String>)
:The top-level internet domain name for which your application has administrative authority.
app_monitor_configuration(AppMonitorConfiguration)
/set_app_monitor_configuration(Option<AppMonitorConfiguration>)
: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.cw_log_enabled(bool)
/set_cw_log_enabled(Option<bool>)
: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.
custom_events(CustomEvents)
/set_custom_events(Option<CustomEvents>)
:Specifies whether this app monitor allows the web client to define and send custom events. The default is for custom events to be
DISABLED
.For more information about custom events, see Send custom events.
- On success, responds with
UpdateAppMonitorOutput
- On failure, responds with
SdkError<UpdateAppMonitorError>
sourcepub fn update_rum_metric_definition(&self) -> UpdateRumMetricDefinition
pub fn update_rum_metric_definition(&self) -> UpdateRumMetricDefinition
Constructs a fluent builder for the UpdateRumMetricDefinition
operation.
- The fluent builder is configurable:
app_monitor_name(impl Into<String>)
/set_app_monitor_name(Option<String>)
:The name of the CloudWatch RUM app monitor that sends these metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:The destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, you must also specify the ARN of the CloudWatchEvidently experiment that will receive the metrics and an IAM role that has permission to write to the experiment.destination_arn(impl Into<String>)
/set_destination_arn(Option<String>)
:This parameter is required if
Destination
isEvidently
. IfDestination
isCloudWatch
, do not use this parameter.This parameter specifies the ARN of the Evidently experiment that is to receive the metrics. You must have already defined this experiment as a valid destination. For more information, see PutRumMetricsDestination.
metric_definition(MetricDefinitionRequest)
/set_metric_definition(Option<MetricDefinitionRequest>)
:A structure that contains the new definition that you want to use for this metric.
metric_definition_id(impl Into<String>)
/set_metric_definition_id(Option<String>)
:The ID of the metric definition to update.
- On success, responds with
UpdateRumMetricDefinitionOutput
- On failure, responds with
SdkError<UpdateRumMetricDefinitionError>
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it.
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
Panics
- This method will panic if the
conf
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
conf
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it.