pub struct Client { /* private fields */ }
Expand description
Client for Amazon CloudWatch Internet Monitor
Client for invoking operations on Amazon CloudWatch Internet Monitor. Each operation on Amazon CloudWatch Internet Monitor 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_internetmonitor::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_internetmonitor::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 CreateMonitor
operation has
a Client::create_monitor
, 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.create_monitor()
.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 create_monitor(&self) -> CreateMonitorFluentBuilder
pub fn create_monitor(&self) -> CreateMonitorFluentBuilder
Constructs a fluent builder for the CreateMonitor
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
resources(impl Into<String>)
/set_resources(Option<Vec::<String>>)
:
required: falseThe resources to include in a monitor, which you provide as a set of Amazon Resource Names (ARNs). Resources can be VPCs, NLBs, Amazon CloudFront distributions, or Amazon WorkSpaces directories.
You can add a combination of VPCs and CloudFront distributions, or you can add WorkSpaces directories, or you can add NLBs. You can’t add NLBs or WorkSpaces directories together with any other resources.
If you add only Amazon VPC resources, at least one VPC must have an Internet Gateway attached to it, to make sure that it has internet connectivity.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don’t reuse the same client token for other API requests.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe tags for a monitor. You can add a maximum of 50 tags in Internet Monitor.
max_city_networks_to_monitor(i32)
/set_max_city_networks_to_monitor(Option<i32>)
:
required: falseThe maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your application resources from and the ASN or network provider, such as an internet service provider (ISP), that clients access the resources through. Setting this limit can help control billing costs.
To learn more, see Choosing a city-network maximum value in the Amazon CloudWatch Internet Monitor section of the CloudWatch User Guide.
internet_measurements_log_delivery(InternetMeasurementsLogDelivery)
/set_internet_measurements_log_delivery(Option<InternetMeasurementsLogDelivery>)
:
required: falsePublish internet measurements for Internet Monitor to an Amazon S3 bucket in addition to CloudWatch Logs.
traffic_percentage_to_monitor(i32)
/set_traffic_percentage_to_monitor(Option<i32>)
:
required: falseThe percentage of the internet-facing traffic for your application that you want to monitor with this monitor. If you set a city-networks maximum, that limit overrides the traffic percentage that you set.
To learn more, see Choosing an application traffic percentage to monitor in the Amazon CloudWatch Internet Monitor section of the CloudWatch User Guide.
health_events_config(HealthEventsConfig)
/set_health_events_config(Option<HealthEventsConfig>)
:
required: falseDefines the threshold percentages and other configuration information for when Amazon CloudWatch Internet Monitor creates a health event. Internet Monitor creates a health event when an internet issue that affects your application end users has a health score percentage that is at or below a specific threshold, and, sometimes, when other criteria are met.
If you don’t set a health event threshold, the default value is 95%.
For more information, see Change health event thresholds in the Internet Monitor section of the CloudWatch User Guide.
- On success, responds with
CreateMonitorOutput
with field(s):arn(String)
:The Amazon Resource Name (ARN) of the monitor.
status(MonitorConfigState)
:The status of a monitor.
- On failure, responds with
SdkError<CreateMonitorError>
Source§impl Client
impl Client
Sourcepub fn delete_monitor(&self) -> DeleteMonitorFluentBuilder
pub fn delete_monitor(&self) -> DeleteMonitorFluentBuilder
Constructs a fluent builder for the DeleteMonitor
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor to delete.
- On success, responds with
DeleteMonitorOutput
- On failure, responds with
SdkError<DeleteMonitorError>
Source§impl Client
impl Client
Sourcepub fn get_health_event(&self) -> GetHealthEventFluentBuilder
pub fn get_health_event(&self) -> GetHealthEventFluentBuilder
Constructs a fluent builder for the GetHealthEvent
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
event_id(impl Into<String>)
/set_event_id(Option<String>)
:
required: trueThe internally-generated identifier of a health event. Because
EventID
contains the forward slash (“/”) character, you must URL-encode theEventID
field in the request URL.linked_account_id(impl Into<String>)
/set_linked_account_id(Option<String>)
:
required: falseThe account ID for an account that you’ve set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account sharing by using Amazon CloudWatch Observability Access Manager. For more information, see Internet Monitor cross-account observability in the Amazon CloudWatch Internet Monitor User Guide.
- On success, responds with
GetHealthEventOutput
with field(s):event_arn(String)
:The Amazon Resource Name (ARN) of the event.
event_id(String)
:The internally-generated identifier of a health event.
started_at(DateTime)
:The time when a health event started.
ended_at(Option<DateTime>)
:The time when a health event was resolved. If the health event is still active, the end time is not set.
created_at(Option<DateTime>)
:The time when a health event was created.
last_updated_at(DateTime)
:The time when a health event was last updated or recalculated.
impacted_locations(Vec::<ImpactedLocation>)
:The locations affected by a health event.
status(HealthEventStatus)
:The status of a health event.
percent_of_total_traffic_impacted(Option<f64>)
:The impact on total traffic that a health event has, in increased latency or reduced availability. This is the percentage of how much latency has increased or availability has decreased during the event, compared to what is typical for traffic from this client location to the Amazon Web Services location using this client network.
impact_type(HealthEventImpactType)
:The type of impairment of a specific health event.
health_score_threshold(f64)
:The threshold percentage for a health score that determines, along with other configuration information, when Internet Monitor creates a health event when there’s an internet issue that affects your application end users.
- On failure, responds with
SdkError<GetHealthEventError>
Source§impl Client
impl Client
Sourcepub fn get_internet_event(&self) -> GetInternetEventFluentBuilder
pub fn get_internet_event(&self) -> GetInternetEventFluentBuilder
Constructs a fluent builder for the GetInternetEvent
operation.
- The fluent builder is configurable:
event_id(impl Into<String>)
/set_event_id(Option<String>)
:
required: trueThe
EventId
of the internet event to return information for.
- On success, responds with
GetInternetEventOutput
with field(s):event_id(String)
:The internally-generated identifier of an internet event.
event_arn(String)
:The Amazon Resource Name (ARN) of the internet event.
started_at(DateTime)
:The time when the internet event started.
ended_at(Option<DateTime>)
:The time when the internet event ended. If the event hasn’t ended yet, this value is empty.
client_location(Option<ClientLocation>)
:The impacted location, such as a city, where clients access Amazon Web Services application resources.
event_type(InternetEventType)
:The type of network impairment.
event_status(InternetEventStatus)
:The status of the internet event.
- On failure, responds with
SdkError<GetInternetEventError>
Source§impl Client
impl Client
Sourcepub fn get_monitor(&self) -> GetMonitorFluentBuilder
pub fn get_monitor(&self) -> GetMonitorFluentBuilder
Constructs a fluent builder for the GetMonitor
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
linked_account_id(impl Into<String>)
/set_linked_account_id(Option<String>)
:
required: falseThe account ID for an account that you’ve set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account sharing by using Amazon CloudWatch Observability Access Manager. For more information, see Internet Monitor cross-account observability in the Amazon CloudWatch Internet Monitor User Guide.
- On success, responds with
GetMonitorOutput
with field(s):monitor_name(String)
:The name of the monitor.
monitor_arn(String)
:The Amazon Resource Name (ARN) of the monitor.
resources(Vec::<String>)
:The resources monitored by the monitor. Resources are listed by their Amazon Resource Names (ARNs).
status(MonitorConfigState)
:The status of the monitor.
created_at(DateTime)
:The time when the monitor was created.
modified_at(DateTime)
:The last time that the monitor was modified.
processing_status(Option<MonitorProcessingStatusCode>)
:The health of the data processing for the monitor.
processing_status_info(Option<String>)
:Additional information about the health of the data processing for the monitor.
tags(Option<HashMap::<String, String>>)
:The tags that have been added to monitor.
max_city_networks_to_monitor(Option<i32>)
:The maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your application resources from and the ASN or network provider, such as an internet service provider (ISP), that clients access the resources through. This limit can help control billing costs.
To learn more, see Choosing a city-network maximum value in the Amazon CloudWatch Internet Monitor section of the CloudWatch User Guide.
internet_measurements_log_delivery(Option<InternetMeasurementsLogDelivery>)
:Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.
traffic_percentage_to_monitor(Option<i32>)
:The percentage of the internet-facing traffic for your application to monitor with this monitor. If you set a city-networks maximum, that limit overrides the traffic percentage that you set.
To learn more, see Choosing an application traffic percentage to monitor in the Amazon CloudWatch Internet Monitor section of the CloudWatch User Guide.
health_events_config(Option<HealthEventsConfig>)
:The list of health event threshold configurations. The threshold percentage for a health score determines, along with other configuration information, when Internet Monitor creates a health event when there’s an internet issue that affects your application end users.
For more information, see Change health event thresholds in the Internet Monitor section of the CloudWatch User Guide.
- On failure, responds with
SdkError<GetMonitorError>
Source§impl Client
impl Client
Sourcepub fn get_query_results(&self) -> GetQueryResultsFluentBuilder
pub fn get_query_results(&self) -> GetQueryResultsFluentBuilder
Constructs a fluent builder for the GetQueryResults
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor to return data for.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe ID of the query that you want to return data results for. A
QueryId
is an internally-generated identifier for a specific query.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of query results that you want to return with this call.
- On success, responds with
GetQueryResultsOutput
with field(s):fields(Vec::<QueryField>)
:The fields that the query returns data for. Fields are name-data type pairs, such as
availability_score
-float
.data(Vec::<Vec::<String>>)
:The data results that the query returns. Data is returned in arrays, aligned with the
Fields
for the query, which creates a repository of Amazon CloudWatch Internet Monitor information for your application. Then, you can filter the information in the repository by usingFilterParameters
that you define.next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<GetQueryResultsError>
Source§impl Client
impl Client
Sourcepub fn get_query_status(&self) -> GetQueryStatusFluentBuilder
pub fn get_query_status(&self) -> GetQueryStatusFluentBuilder
Constructs a fluent builder for the GetQueryStatus
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe ID of the query that you want to return the status for. A
QueryId
is an internally-generated dentifier for a specific query.
- On success, responds with
GetQueryStatusOutput
with field(s):status(QueryStatus)
:The current status for a query.
- On failure, responds with
SdkError<GetQueryStatusError>
Source§impl Client
impl Client
Sourcepub fn list_health_events(&self) -> ListHealthEventsFluentBuilder
pub fn list_health_events(&self) -> ListHealthEventsFluentBuilder
Constructs a fluent builder for the ListHealthEvents
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: falseThe time when a health event started.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: falseThe time when a health event ended. If the health event is still ongoing, then the end time is not set.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of health event objects that you want to return with this call.
event_status(HealthEventStatus)
/set_event_status(Option<HealthEventStatus>)
:
required: falseThe status of a health event.
linked_account_id(impl Into<String>)
/set_linked_account_id(Option<String>)
:
required: falseThe account ID for an account that you’ve set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account sharing by using Amazon CloudWatch Observability Access Manager. For more information, see Internet Monitor cross-account observability in the Amazon CloudWatch Internet Monitor User Guide.
- On success, responds with
ListHealthEventsOutput
with field(s):health_events(Vec::<HealthEvent>)
:A list of health events.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListHealthEventsError>
Source§impl Client
impl Client
Sourcepub fn list_internet_events(&self) -> ListInternetEventsFluentBuilder
pub fn list_internet_events(&self) -> ListInternetEventsFluentBuilder
Constructs a fluent builder for the ListInternetEvents
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of query results that you want to return with this call.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: falseThe start time of the time window that you want to get a list of internet events for.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: falseThe end time of the time window that you want to get a list of internet events for.
event_status(impl Into<String>)
/set_event_status(Option<String>)
:
required: falseThe status of an internet event.
event_type(impl Into<String>)
/set_event_type(Option<String>)
:
required: falseThe type of network impairment.
- On success, responds with
ListInternetEventsOutput
with field(s):internet_events(Vec::<InternetEventSummary>)
:A set of internet events returned for the list operation.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListInternetEventsError>
Source§impl Client
impl Client
Sourcepub fn list_monitors(&self) -> ListMonitorsFluentBuilder
pub fn list_monitors(&self) -> ListMonitorsFluentBuilder
Constructs a fluent builder for the ListMonitors
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe token for the next set of results. You receive this token from a previous call.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe number of monitor objects that you want to return with this call.
monitor_status(impl Into<String>)
/set_monitor_status(Option<String>)
:
required: falseThe status of a monitor. This includes the status of the data processing for the monitor and the status of the monitor itself.
For information about the statuses for a monitor, see Monitor.
include_linked_accounts(bool)
/set_include_linked_accounts(Option<bool>)
:
required: falseA boolean option that you can set to
TRUE
to include monitors for linked accounts in a list of monitors, when you’ve set up cross-account sharing in Amazon CloudWatch Internet Monitor. You configure cross-account sharing by using Amazon CloudWatch Observability Access Manager. For more information, see Internet Monitor cross-account observability in the Amazon CloudWatch Internet Monitor User Guide.
- On success, responds with
ListMonitorsOutput
with field(s):monitors(Vec::<Monitor>)
:A list of monitors.
next_token(Option<String>)
:The token for the next set of results. You receive this token from a previous call.
- On failure, responds with
SdkError<ListMonitorsError>
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 Amazon Resource Name (ARN) for a resource.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:Tags for a resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn start_query(&self) -> StartQueryFluentBuilder
pub fn start_query(&self) -> StartQueryFluentBuilder
Constructs a fluent builder for the StartQuery
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor to query.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:
required: trueThe timestamp that is the beginning of the period that you want to retrieve data for with your query.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:
required: trueThe timestamp that is the end of the period that you want to retrieve data for with your query.
query_type(QueryType)
/set_query_type(Option<QueryType>)
:
required: trueThe type of query to run. The following are the three types of queries that you can run using the Internet Monitor query interface:
-
MEASUREMENTS
: Provides availability score, performance score, total traffic, and round-trip times, at 5 minute intervals. -
TOP_LOCATIONS
: Provides availability score, performance score, total traffic, and time to first byte (TTFB) information, for the top location and ASN combinations that you’re monitoring, by traffic volume. -
TOP_LOCATION_DETAILS
: Provides TTFB for Amazon CloudFront, your current configuration, and the best performing EC2 configuration, at 1 hour intervals. -
OVERALL_TRAFFIC_SUGGESTIONS
: Provides TTFB, using a 30-day weighted average, for all traffic in each Amazon Web Services location that is monitored. -
OVERALL_TRAFFIC_SUGGESTIONS_DETAILS
: Provides TTFB, using a 30-day weighted average, for each top location, for a proposed Amazon Web Services location. Must provide an Amazon Web Services location to search. -
ROUTING_SUGGESTIONS
: Provides the predicted average round-trip time (RTT) from an IP prefix toward an Amazon Web Services location for a DNS resolver. The RTT is calculated at one hour intervals, over a one hour period.
For lists of the fields returned with each query type and more information about how each type of query is performed, see Using the Amazon CloudWatch Internet Monitor query interface in the Amazon CloudWatch Internet Monitor User Guide.
-
filter_parameters(FilterParameter)
/set_filter_parameters(Option<Vec::<FilterParameter>>)
:
required: falseThe
FilterParameters
field that you use with Amazon CloudWatch Internet Monitor queries is a string the defines how you want a query to be filtered. The filter parameters that you can specify depend on the query type, since each query type returns a different set of Internet Monitor data.For more information about specifying filter parameters, see Using the Amazon CloudWatch Internet Monitor query interface in the Amazon CloudWatch Internet Monitor User Guide.
linked_account_id(impl Into<String>)
/set_linked_account_id(Option<String>)
:
required: falseThe account ID for an account that you’ve set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account sharing by using Amazon CloudWatch Observability Access Manager. For more information, see Internet Monitor cross-account observability in the Amazon CloudWatch Internet Monitor User Guide.
- On success, responds with
StartQueryOutput
with field(s):query_id(String)
:The internally-generated identifier of a specific query.
- On failure, responds with
SdkError<StartQueryError>
Source§impl Client
impl Client
Sourcepub fn stop_query(&self) -> StopQueryFluentBuilder
pub fn stop_query(&self) -> StopQueryFluentBuilder
Constructs a fluent builder for the StopQuery
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
query_id(impl Into<String>)
/set_query_id(Option<String>)
:
required: trueThe ID of the query that you want to stop. A
QueryId
is an internally-generated identifier for a specific query.
- On success, responds with
StopQueryOutput
- On failure, responds with
SdkError<StopQueryError>
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 Amazon Resource Name (ARN) for a tag that you add to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor.
tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueTags that you add to a resource. You can add a maximum of 50 tags in Internet Monitor.
- 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 Amazon Resource Name (ARN) for a tag you remove a resource from.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueTag keys that you remove from a resource.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_monitor(&self) -> UpdateMonitorFluentBuilder
pub fn update_monitor(&self) -> UpdateMonitorFluentBuilder
Constructs a fluent builder for the UpdateMonitor
operation.
- The fluent builder is configurable:
monitor_name(impl Into<String>)
/set_monitor_name(Option<String>)
:
required: trueThe name of the monitor.
resources_to_add(impl Into<String>)
/set_resources_to_add(Option<Vec::<String>>)
:
required: falseThe resources to include in a monitor, which you provide as a set of Amazon Resource Names (ARNs). Resources can be VPCs, NLBs, Amazon CloudFront distributions, or Amazon WorkSpaces directories.
You can add a combination of VPCs and CloudFront distributions, or you can add WorkSpaces directories, or you can add NLBs. You can’t add NLBs or WorkSpaces directories together with any other resources.
If you add only Amazon Virtual Private Clouds resources, at least one VPC must have an Internet Gateway attached to it, to make sure that it has internet connectivity.
resources_to_remove(impl Into<String>)
/set_resources_to_remove(Option<Vec::<String>>)
:
required: falseThe resources to remove from a monitor, which you provide as a set of Amazon Resource Names (ARNs).
status(MonitorConfigState)
/set_status(Option<MonitorConfigState>)
:
required: falseThe status for a monitor. The accepted values for
Status
with theUpdateMonitor
API call are the following:ACTIVE
andINACTIVE
. The following values are not accepted:PENDING
, andERROR
.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. You should not reuse the same client token for other API requests.
max_city_networks_to_monitor(i32)
/set_max_city_networks_to_monitor(Option<i32>)
:
required: falseThe maximum number of city-networks to monitor for your application. A city-network is the location (city) where clients access your application resources from and the ASN or network provider, such as an internet service provider (ISP), that clients access the resources through. Setting this limit can help control billing costs.
internet_measurements_log_delivery(InternetMeasurementsLogDelivery)
/set_internet_measurements_log_delivery(Option<InternetMeasurementsLogDelivery>)
:
required: falsePublish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.
traffic_percentage_to_monitor(i32)
/set_traffic_percentage_to_monitor(Option<i32>)
:
required: falseThe percentage of the internet-facing traffic for your application that you want to monitor with this monitor. If you set a city-networks maximum, that limit overrides the traffic percentage that you set.
To learn more, see Choosing an application traffic percentage to monitor in the Amazon CloudWatch Internet Monitor section of the CloudWatch User Guide.
health_events_config(HealthEventsConfig)
/set_health_events_config(Option<HealthEventsConfig>)
:
required: falseThe list of health score thresholds. A threshold percentage for health scores, along with other configuration information, determines when Internet Monitor creates a health event when there’s an internet issue that affects your application end users.
For more information, see Change health event thresholds in the Internet Monitor section of the CloudWatch User Guide.
- On success, responds with
UpdateMonitorOutput
with field(s):monitor_arn(String)
:The Amazon Resource Name (ARN) of the monitor.
status(MonitorConfigState)
:The status of a monitor.
- On failure, responds with
SdkError<UpdateMonitorError>
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);