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.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_rum::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_rum::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the BatchCreateRumMetricDefinitions
operation has
a Client::batch_create_rum_metric_definitions
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.batch_create_rum_metric_definitions()
.app_monitor_name("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn batch_create_rum_metric_definitions(
&self,
) -> BatchCreateRumMetricDefinitionsFluentBuilder
pub fn batch_create_rum_metric_definitions( &self, ) -> BatchCreateRumMetricDefinitionsFluentBuilder
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>)
:
required: trueThe name of the CloudWatch RUM app monitor that is to send the metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:
required: trueThe destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, you must also specify the Amazon Resource Name (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>)
:
required: falseThis 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(MetricDefinitionRequest)
/set_metric_definitions(Option<Vec::<MetricDefinitionRequest>>)
:
required: trueAn array of structures which define the metrics that you want to send.
- On success, responds with
BatchCreateRumMetricDefinitionsOutput
with field(s):errors(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>
Source§impl Client
impl Client
Sourcepub fn batch_delete_rum_metric_definitions(
&self,
) -> BatchDeleteRumMetricDefinitionsFluentBuilder
pub fn batch_delete_rum_metric_definitions( &self, ) -> BatchDeleteRumMetricDefinitionsFluentBuilder
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>)
:
required: trueThe name of the CloudWatch RUM app monitor that is sending these metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:
required: trueDefines 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>)
:
required: falseThis 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(impl Into<String>)
/set_metric_definition_ids(Option<Vec::<String>>)
:
required: trueAn array of structures which define the metrics that you want to stop sending.
- On success, responds with
BatchDeleteRumMetricDefinitionsOutput
with field(s):errors(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>
Source§impl Client
impl Client
Sourcepub fn batch_get_rum_metric_definitions(
&self,
) -> BatchGetRumMetricDefinitionsFluentBuilder
pub fn batch_get_rum_metric_definitions( &self, ) -> BatchGetRumMetricDefinitionsFluentBuilder
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>)
:
required: trueThe name of the CloudWatch RUM app monitor that is sending the metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:
required: trueThe 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>)
:
required: falseThis 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>)
:
required: falseThe 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>)
:
required: falseUse 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>
Source§impl Client
impl Client
Sourcepub fn create_app_monitor(&self) -> CreateAppMonitorFluentBuilder
pub fn create_app_monitor(&self) -> CreateAppMonitorFluentBuilder
Constructs a fluent builder for the CreateAppMonitor
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueA name for the app monitor.
domain(impl Into<String>)
/set_domain(Option<String>)
:
required: falseThe top-level internet domain name for which your application has administrative authority.
domain_list(impl Into<String>)
/set_domain_list(Option<Vec::<String>>)
:
required: falseList the domain names for which your application has administrative authority. The
CreateAppMonitor
requires either the domain or the domain list.tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseAssigns 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>)
:
required: falseA 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>)
:
required: falseData 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>)
:
required: falseSpecifies 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(DeobfuscationConfiguration)
/set_deobfuscation_configuration(Option<DeobfuscationConfiguration>)
:
required: falseA structure that contains the configuration for how an app monitor can deobfuscate stack traces.
- 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>
Source§impl Client
impl Client
Sourcepub fn delete_app_monitor(&self) -> DeleteAppMonitorFluentBuilder
pub fn delete_app_monitor(&self) -> DeleteAppMonitorFluentBuilder
Constructs a fluent builder for the DeleteAppMonitor
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the app monitor to delete.
- On success, responds with
DeleteAppMonitorOutput
- On failure, responds with
SdkError<DeleteAppMonitorError>
Source§impl Client
impl Client
Sourcepub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
pub fn delete_resource_policy(&self) -> DeleteResourcePolicyFluentBuilder
Constructs a fluent builder for the DeleteResourcePolicy
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe app monitor that you want to remove the resource policy from.
policy_revision_id(impl Into<String>)
/set_policy_revision_id(Option<String>)
:
required: falseSpecifies a specific policy revision to delete. Provide a
PolicyRevisionId
to ensure an atomic delete operation. If the revision ID that you provide doesn’t match the latest policy revision ID, the request will be rejected with anInvalidPolicyRevisionIdException
error.
- On success, responds with
DeleteResourcePolicyOutput
with field(s):policy_revision_id(Option<String>)
:The revision ID of the policy that was removed, if it had one.
- On failure, responds with
SdkError<DeleteResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn delete_rum_metrics_destination(
&self,
) -> DeleteRumMetricsDestinationFluentBuilder
pub fn delete_rum_metrics_destination( &self, ) -> DeleteRumMetricsDestinationFluentBuilder
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>)
:
required: trueThe name of the app monitor that is sending metrics to the destination that you want to delete.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:
required: trueThe type of destination to delete. Valid values are
CloudWatch
andEvidently
.destination_arn(impl Into<String>)
/set_destination_arn(Option<String>)
:
required: falseThis 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>
Source§impl Client
impl Client
Sourcepub fn get_app_monitor(&self) -> GetAppMonitorFluentBuilder
pub fn get_app_monitor(&self) -> GetAppMonitorFluentBuilder
Constructs a fluent builder for the GetAppMonitor
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe 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>
Source§impl Client
impl Client
Sourcepub fn get_app_monitor_data(&self) -> GetAppMonitorDataFluentBuilder
pub fn get_app_monitor_data(&self) -> GetAppMonitorDataFluentBuilder
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>)
:
required: trueThe name of the app monitor that collected the data that you want to retrieve.
time_range(TimeRange)
/set_time_range(Option<TimeRange>)
:
required: trueA structure that defines the time range that you want to retrieve results from.
filters(QueryFilter)
/set_filters(Option<Vec::<QueryFilter>>)
:
required: falseAn 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(Option<i32>)
:
required: falseThe maximum number of results to return in one operation.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseUse 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>
Source§impl Client
impl Client
Sourcepub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
pub fn get_resource_policy(&self) -> GetResourcePolicyFluentBuilder
Constructs a fluent builder for the GetResourcePolicy
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the app monitor that is associated with the resource-based policy that you want to view.
- On success, responds with
GetResourcePolicyOutput
with field(s):policy_document(Option<String>)
:The JSON policy document that you requested.
policy_revision_id(Option<String>)
:The revision ID information for this version of the policy document that you requested.
- On failure, responds with
SdkError<GetResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn list_app_monitors(&self) -> ListAppMonitorsFluentBuilder
pub fn list_app_monitors(&self) -> ListAppMonitorsFluentBuilder
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>)
:
required: falseThe 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>)
:
required: falseUse 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>
Source§impl Client
impl Client
Sourcepub fn list_rum_metrics_destinations(
&self,
) -> ListRumMetricsDestinationsFluentBuilder
pub fn list_rum_metrics_destinations( &self, ) -> ListRumMetricsDestinationsFluentBuilder
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>)
:
required: trueThe name of the app monitor associated with the destinations that you want to retrieve.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe 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>)
:
required: falseUse 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>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the resource that you want to see the tags of.
- On success, responds with
ListTagsForResourceOutput
with field(s):resource_arn(String)
:The ARN of the resource that you are viewing.
tags(HashMap::<String, String>)
:The list of tag keys and values associated with the resource you specified.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
pub fn put_resource_policy(&self) -> PutResourcePolicyFluentBuilder
Constructs a fluent builder for the PutResourcePolicy
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the app monitor that you want to apply this resource-based policy to. To find the names of your app monitors, you can use the ListAppMonitors operation.
policy_document(impl Into<String>)
/set_policy_document(Option<String>)
:
required: trueThe JSON to use as the resource policy. The document can be up to 4 KB in size. For more information about the contents and syntax for this policy, see Using resource-based policies with CloudWatch RUM.
policy_revision_id(impl Into<String>)
/set_policy_revision_id(Option<String>)
:
required: falseA string value that you can use to conditionally update your policy. You can provide the revision ID of your existing policy to make mutating requests against that policy.
When you assign a policy revision ID, then later requests about that policy will be rejected with an
InvalidPolicyRevisionIdException
error if they don’t provide the correct current revision ID.
- On success, responds with
PutResourcePolicyOutput
with field(s):policy_document(Option<String>)
:The JSON policy document that you specified.
policy_revision_id(Option<String>)
:The policy revision ID information that you specified.
- On failure, responds with
SdkError<PutResourcePolicyError>
Source§impl Client
impl Client
Sourcepub fn put_rum_events(&self) -> PutRumEventsFluentBuilder
pub fn put_rum_events(&self) -> PutRumEventsFluentBuilder
Constructs a fluent builder for the PutRumEvents
operation.
- The fluent builder is configurable:
id(impl Into<String>)
/set_id(Option<String>)
:
required: trueThe ID of the app monitor that is sending this data.
batch_id(impl Into<String>)
/set_batch_id(Option<String>)
:
required: trueA unique identifier for this batch of RUM event data.
app_monitor_details(AppMonitorDetails)
/set_app_monitor_details(Option<AppMonitorDetails>)
:
required: trueA structure that contains information about the app monitor that collected this telemetry information.
user_details(UserDetails)
/set_user_details(Option<UserDetails>)
:
required: trueA structure that contains information about the user session that this batch of events was collected from.
rum_events(RumEvent)
/set_rum_events(Option<Vec::<RumEvent>>)
:
required: trueAn array of structures that contain the telemetry event data.
alias(impl Into<String>)
/set_alias(Option<String>)
:
required: falseIf the app monitor uses a resource-based policy that requires
PutRumEvents
requests to specify a certain alias, specify that alias here. This alias will be compared to therum:alias
context key in the resource-based policy. For more information, see Using resource-based policies with CloudWatch RUM.
- On success, responds with
PutRumEventsOutput
- On failure, responds with
SdkError<PutRumEventsError>
Source§impl Client
impl Client
Sourcepub fn put_rum_metrics_destination(
&self,
) -> PutRumMetricsDestinationFluentBuilder
pub fn put_rum_metrics_destination( &self, ) -> PutRumMetricsDestinationFluentBuilder
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>)
:
required: trueThe name of the CloudWatch RUM app monitor that will send the metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:
required: trueDefines 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>)
:
required: falseUse 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>)
:
required: falseThis parameter is required if
Destination
isEvidently
. IfDestination
isCloudWatch
, don’t 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.
If you specify this parameter, you must be signed on to a role that has PassRole permissions attached to it, to allow the role to be passed. The CloudWatchAmazonCloudWatchRUMFullAccess policy doesn’t include
PassRole
permissions.
- On success, responds with
PutRumMetricsDestinationOutput
- On failure, responds with
SdkError<PutRumMetricsDestinationError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the CloudWatch RUM resource that you’re adding tags to.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueThe list of key-value pairs to associate with the resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe ARN of the CloudWatch RUM resource that you’re removing tags from.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe list of tag keys to remove from the resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_app_monitor(&self) -> UpdateAppMonitorFluentBuilder
pub fn update_app_monitor(&self) -> UpdateAppMonitorFluentBuilder
Constructs a fluent builder for the UpdateAppMonitor
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the app monitor to update.
domain(impl Into<String>)
/set_domain(Option<String>)
:
required: falseThe top-level internet domain name for which your application has administrative authority.
domain_list(impl Into<String>)
/set_domain_list(Option<Vec::<String>>)
:
required: falseList the domain names for which your application has administrative authority. The
UpdateAppMonitor
allows either the domain or the domain list.app_monitor_configuration(AppMonitorConfiguration)
/set_app_monitor_configuration(Option<AppMonitorConfiguration>)
:
required: falseA 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>)
:
required: falseData 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>)
:
required: falseSpecifies 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.
deobfuscation_configuration(DeobfuscationConfiguration)
/set_deobfuscation_configuration(Option<DeobfuscationConfiguration>)
:
required: falseA structure that contains the configuration for how an app monitor can deobfuscate stack traces.
- On success, responds with
UpdateAppMonitorOutput
- On failure, responds with
SdkError<UpdateAppMonitorError>
Source§impl Client
impl Client
Sourcepub fn update_rum_metric_definition(
&self,
) -> UpdateRumMetricDefinitionFluentBuilder
pub fn update_rum_metric_definition( &self, ) -> UpdateRumMetricDefinitionFluentBuilder
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>)
:
required: trueThe name of the CloudWatch RUM app monitor that sends these metrics.
destination(MetricDestination)
/set_destination(Option<MetricDestination>)
:
required: trueThe 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>)
:
required: falseThis 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>)
:
required: trueA 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>)
:
required: trueThe 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 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 in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
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. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);