aws_sdk_internetmonitor/client/
create_monitor.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CreateMonitor`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`monitor_name(impl Into<String>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::monitor_name) / [`set_monitor_name(Option<String>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::set_monitor_name):<br>required: **true**<br><p>The name of the monitor.</p><br>
7    ///   - [`resources(impl Into<String>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::resources) / [`set_resources(Option<Vec::<String>>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::set_resources):<br>required: **false**<br><p>The 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.</p> <p>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.</p><note>  <p>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.</p> </note><br>
8    ///   - [`client_token(impl Into<String>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::client_token) / [`set_client_token(Option<String>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::set_client_token):<br>required: **false**<br><p>A 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.</p><br>
9    ///   - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::set_tags):<br>required: **false**<br><p>The tags for a monitor. You can add a maximum of 50 tags in Internet Monitor.</p><br>
10    ///   - [`max_city_networks_to_monitor(i32)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::max_city_networks_to_monitor) / [`set_max_city_networks_to_monitor(Option<i32>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::set_max_city_networks_to_monitor):<br>required: **false**<br><p>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. Setting this limit can help control billing costs.</p> <p>To learn more, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/IMCityNetworksMaximum.html">Choosing a city-network maximum value </a> in the Amazon CloudWatch Internet Monitor section of the <i>CloudWatch User Guide</i>.</p><br>
11    ///   - [`internet_measurements_log_delivery(InternetMeasurementsLogDelivery)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::internet_measurements_log_delivery) / [`set_internet_measurements_log_delivery(Option<InternetMeasurementsLogDelivery>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::set_internet_measurements_log_delivery):<br>required: **false**<br><p>Publish internet measurements for Internet Monitor to an Amazon S3 bucket in addition to CloudWatch Logs.</p><br>
12    ///   - [`traffic_percentage_to_monitor(i32)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::traffic_percentage_to_monitor) / [`set_traffic_percentage_to_monitor(Option<i32>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::set_traffic_percentage_to_monitor):<br>required: **false**<br><p>The 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.</p> <p>To learn more, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/IMTrafficPercentage.html">Choosing an application traffic percentage to monitor </a> in the Amazon CloudWatch Internet Monitor section of the <i>CloudWatch User Guide</i>.</p><br>
13    ///   - [`health_events_config(HealthEventsConfig)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::health_events_config) / [`set_health_events_config(Option<HealthEventsConfig>)`](crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::set_health_events_config):<br>required: **false**<br><p>Defines 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.</p> <p>If you don't set a health event threshold, the default value is 95%.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-IM-overview.html#IMUpdateThresholdFromOverview"> Change health event thresholds</a> in the Internet Monitor section of the <i>CloudWatch User Guide</i>.</p><br>
14    /// - On success, responds with [`CreateMonitorOutput`](crate::operation::create_monitor::CreateMonitorOutput) with field(s):
15    ///   - [`arn(String)`](crate::operation::create_monitor::CreateMonitorOutput::arn): <p>The Amazon Resource Name (ARN) of the monitor.</p>
16    ///   - [`status(MonitorConfigState)`](crate::operation::create_monitor::CreateMonitorOutput::status): <p>The status of a monitor.</p>
17    /// - On failure, responds with [`SdkError<CreateMonitorError>`](crate::operation::create_monitor::CreateMonitorError)
18    pub fn create_monitor(&self) -> crate::operation::create_monitor::builders::CreateMonitorFluentBuilder {
19        crate::operation::create_monitor::builders::CreateMonitorFluentBuilder::new(self.handle.clone())
20    }
21}