/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace InternetMonitor { /** *

Amazon CloudWatch Internet Monitor provides visibility into how internet * issues impact the performance and availability between your applications hosted * on Amazon Web Services and your end users. It reduces the time it takes for you * to diagnose internet issues from days to minutes. Internet Monitor uses the * connectivity data that Amazon Web Services captures from its global networking * footprint to calculate a baseline of performance and availability for internet * traffic. This is the same data that Amazon Web Services uses to monitor internet * uptime and availability. With those measurements as a baseline, Internet Monitor * raises awareness for you when there are significant problems for your end users * in the different geographic locations where your application runs.

*

Internet Monitor publishes internet measurements to CloudWatch Logs and * CloudWatch Metrics, to easily support using CloudWatch tools with health * information for geographies and networks specific to your application. Internet * Monitor sends health events to Amazon EventBridge so that you can set up * notifications. If an issue is caused by the Amazon Web Services network, you * also automatically receive an Amazon Web Services Health Dashboard notification * with the steps that Amazon Web Services is taking to mitigate the problem.

*

To use Internet Monitor, you create a monitor and associate your * application's resources with it, VPCs, CloudFront distributions, or WorkSpaces * directories, to enable Internet Monitor to know where your application's * internet traffic is. Internet Monitor then provides internet measurements from * Amazon Web Services that are specific to the locations and networks that * communicate with your application.

For more information, see Using * Amazon CloudWatch Internet Monitor in the Amazon CloudWatch User * Guide.

*/ class AWS_INTERNETMONITOR_API InternetMonitorClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods { public: typedef Aws::Client::AWSJsonClient BASECLASS; static const char* SERVICE_NAME; static const char* ALLOCATION_TAG; typedef InternetMonitorClientConfiguration ClientConfigurationType; typedef InternetMonitorEndpointProvider EndpointProviderType; /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ InternetMonitorClient(const Aws::InternetMonitor::InternetMonitorClientConfiguration& clientConfiguration = Aws::InternetMonitor::InternetMonitorClientConfiguration(), std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG)); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ InternetMonitorClient(const Aws::Auth::AWSCredentials& credentials, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::InternetMonitor::InternetMonitorClientConfiguration& clientConfiguration = Aws::InternetMonitor::InternetMonitorClientConfiguration()); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ InternetMonitorClient(const std::shared_ptr& credentialsProvider, std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG), const Aws::InternetMonitor::InternetMonitorClientConfiguration& clientConfiguration = Aws::InternetMonitor::InternetMonitorClientConfiguration()); /* Legacy constructors due deprecation */ /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ InternetMonitorClient(const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ InternetMonitorClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ InternetMonitorClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration); /* End of legacy constructors due deprecation */ virtual ~InternetMonitorClient(); /** *

Creates a monitor in Amazon CloudWatch Internet Monitor. A monitor is built * based on information from the application resources that you add: Amazon Virtual * Private Clouds (VPCs), Amazon CloudFront distributions, and WorkSpaces * directories. Internet Monitor then publishes internet measurements from Amazon * Web Services that are specific to the city-networks, that is, the * locations and ASNs (typically internet service providers or ISPs), where clients * access your application. For more information, see Using * Amazon CloudWatch Internet Monitor in the Amazon CloudWatch User * Guide.

When you create a monitor, you set a maximum limit for the * number of city-networks where client traffic is monitored. The city-network * maximum that you choose is the limit, but you only pay for the number of * city-networks that are actually monitored. You can change the maximum at any * time by updating your monitor. For more information, see Choosing * a city-network maximum value in the Amazon CloudWatch User * Guide.

See Also:

AWS * API Reference

*/ virtual Model::CreateMonitorOutcome CreateMonitor(const Model::CreateMonitorRequest& request) const; /** * A Callable wrapper for CreateMonitor that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::CreateMonitorOutcomeCallable CreateMonitorCallable(const CreateMonitorRequestT& request) const { return SubmitCallable(&InternetMonitorClient::CreateMonitor, request); } /** * An Async wrapper for CreateMonitor that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void CreateMonitorAsync(const CreateMonitorRequestT& request, const CreateMonitorResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::CreateMonitor, request, handler, context); } /** *

Deletes a monitor in Amazon CloudWatch Internet Monitor.

See * Also:

AWS * API Reference

*/ virtual Model::DeleteMonitorOutcome DeleteMonitor(const Model::DeleteMonitorRequest& request) const; /** * A Callable wrapper for DeleteMonitor that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::DeleteMonitorOutcomeCallable DeleteMonitorCallable(const DeleteMonitorRequestT& request) const { return SubmitCallable(&InternetMonitorClient::DeleteMonitor, request); } /** * An Async wrapper for DeleteMonitor that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void DeleteMonitorAsync(const DeleteMonitorRequestT& request, const DeleteMonitorResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::DeleteMonitor, request, handler, context); } /** *

Gets information the Amazon CloudWatch Internet Monitor has created and * stored about a health event for a specified monitor. This information includes * the impacted locations, and all of the information related to the event by * location.

The information returned includes the performance, * availability, and round-trip time impact, information about the network * providers, the event type, and so on.

Information rolled up at the global * traffic level is also returned, including the impact type and total traffic * impact.

See Also:

AWS * API Reference

*/ virtual Model::GetHealthEventOutcome GetHealthEvent(const Model::GetHealthEventRequest& request) const; /** * A Callable wrapper for GetHealthEvent that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetHealthEventOutcomeCallable GetHealthEventCallable(const GetHealthEventRequestT& request) const { return SubmitCallable(&InternetMonitorClient::GetHealthEvent, request); } /** * An Async wrapper for GetHealthEvent that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetHealthEventAsync(const GetHealthEventRequestT& request, const GetHealthEventResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::GetHealthEvent, request, handler, context); } /** *

Gets information about a monitor in Amazon CloudWatch Internet Monitor based * on a monitor name. The information returned includes the Amazon Resource Name * (ARN), create time, modified time, resources included in the monitor, and status * information.

See Also:

AWS * API Reference

*/ virtual Model::GetMonitorOutcome GetMonitor(const Model::GetMonitorRequest& request) const; /** * A Callable wrapper for GetMonitor that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::GetMonitorOutcomeCallable GetMonitorCallable(const GetMonitorRequestT& request) const { return SubmitCallable(&InternetMonitorClient::GetMonitor, request); } /** * An Async wrapper for GetMonitor that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void GetMonitorAsync(const GetMonitorRequestT& request, const GetMonitorResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::GetMonitor, request, handler, context); } /** *

Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. * Returns all information for health events including the client location * information the network cause and status, event start and end time, percentage * of total traffic impacted, and status.

Health events that have * start times during the time frame that is requested are not included in the list * of health events.

See Also:

AWS * API Reference

*/ virtual Model::ListHealthEventsOutcome ListHealthEvents(const Model::ListHealthEventsRequest& request) const; /** * A Callable wrapper for ListHealthEvents that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListHealthEventsOutcomeCallable ListHealthEventsCallable(const ListHealthEventsRequestT& request) const { return SubmitCallable(&InternetMonitorClient::ListHealthEvents, request); } /** * An Async wrapper for ListHealthEvents that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListHealthEventsAsync(const ListHealthEventsRequestT& request, const ListHealthEventsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::ListHealthEvents, request, handler, context); } /** *

Lists all of your monitors for Amazon CloudWatch Internet Monitor and their * statuses, along with the Amazon Resource Name (ARN) and name of each * monitor.

See Also:

AWS * API Reference

*/ virtual Model::ListMonitorsOutcome ListMonitors(const Model::ListMonitorsRequest& request) const; /** * A Callable wrapper for ListMonitors that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListMonitorsOutcomeCallable ListMonitorsCallable(const ListMonitorsRequestT& request) const { return SubmitCallable(&InternetMonitorClient::ListMonitors, request); } /** * An Async wrapper for ListMonitors that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListMonitorsAsync(const ListMonitorsRequestT& request, const ListMonitorsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::ListMonitors, request, handler, context); } /** *

Lists the tags for a resource. Tags are supported only for monitors in Amazon * CloudWatch Internet Monitor.

See Also:

AWS * API Reference

*/ virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const; /** * A Callable wrapper for ListTagsForResource that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const ListTagsForResourceRequestT& request) const { return SubmitCallable(&InternetMonitorClient::ListTagsForResource, request); } /** * An Async wrapper for ListTagsForResource that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void ListTagsForResourceAsync(const ListTagsForResourceRequestT& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::ListTagsForResource, request, handler, context); } /** *

Adds a tag to a resource. Tags are supported only for monitors in Amazon * CloudWatch Internet Monitor. You can add a maximum of 50 tags in Internet * Monitor.

A minimum of one tag is required for this call. It returns an * error if you use the TagResource request with 0 tags.

See * Also:

AWS * API Reference

*/ virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const; /** * A Callable wrapper for TagResource that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::TagResourceOutcomeCallable TagResourceCallable(const TagResourceRequestT& request) const { return SubmitCallable(&InternetMonitorClient::TagResource, request); } /** * An Async wrapper for TagResource that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void TagResourceAsync(const TagResourceRequestT& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::TagResource, request, handler, context); } /** *

Removes a tag from a resource.

See Also:

AWS * API Reference

*/ virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const; /** * A Callable wrapper for UntagResource that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UntagResourceOutcomeCallable UntagResourceCallable(const UntagResourceRequestT& request) const { return SubmitCallable(&InternetMonitorClient::UntagResource, request); } /** * An Async wrapper for UntagResource that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UntagResourceAsync(const UntagResourceRequestT& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::UntagResource, request, handler, context); } /** *

Updates a monitor. You can update a monitor to change the maximum number of * city-networks (locations and ASNs or internet service providers), to add or * remove resources, or to change the status of the monitor. Note that you can't * change the name of a monitor.

The city-network maximum that you choose is * the limit, but you only pay for the number of city-networks that are actually * monitored. For more information, see Choosing * a city-network maximum value in the Amazon CloudWatch User * Guide.

See Also:

AWS * API Reference

*/ virtual Model::UpdateMonitorOutcome UpdateMonitor(const Model::UpdateMonitorRequest& request) const; /** * A Callable wrapper for UpdateMonitor that returns a future to the operation so that it can be executed in parallel to other requests. */ template Model::UpdateMonitorOutcomeCallable UpdateMonitorCallable(const UpdateMonitorRequestT& request) const { return SubmitCallable(&InternetMonitorClient::UpdateMonitor, request); } /** * An Async wrapper for UpdateMonitor that queues the request into a thread executor and triggers associated callback when operation has finished. */ template void UpdateMonitorAsync(const UpdateMonitorRequestT& request, const UpdateMonitorResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const { return SubmitAsync(&InternetMonitorClient::UpdateMonitor, request, handler, context); } void OverrideEndpoint(const Aws::String& endpoint); std::shared_ptr& accessEndpointProvider(); private: friend class Aws::Client::ClientWithAsyncTemplateMethods; void init(const InternetMonitorClientConfiguration& clientConfiguration); InternetMonitorClientConfiguration m_clientConfiguration; std::shared_ptr m_executor; std::shared_ptr m_endpointProvider; }; } // namespace InternetMonitor } // namespace Aws