Interface InternetMonitorAsyncClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
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 can reduce 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, NLBs, CloudFront distributions, or WorkSpaces directories - so Internet Monitor can determine where your application's internet traffic is. Internet Monitor then provides internet measurements from Amazon Web Services that are specific to the locations and ASNs (typically, internet service providers or ISPs) that communicate with your application.
For more information, see Using Amazon CloudWatch Internet Monitor in the Amazon CloudWatch User Guide.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that can be used to configure and create aInternetMonitorAsyncClient
.static InternetMonitorAsyncClient
create()
Create aInternetMonitorAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CompletableFuture
<CreateMonitorResponse> createMonitor
(Consumer<CreateMonitorRequest.Builder> createMonitorRequest) Creates a monitor in Amazon CloudWatch Internet Monitor.default CompletableFuture
<CreateMonitorResponse> createMonitor
(CreateMonitorRequest createMonitorRequest) Creates a monitor in Amazon CloudWatch Internet Monitor.default CompletableFuture
<DeleteMonitorResponse> deleteMonitor
(Consumer<DeleteMonitorRequest.Builder> deleteMonitorRequest) Deletes a monitor in Amazon CloudWatch Internet Monitor.default CompletableFuture
<DeleteMonitorResponse> deleteMonitor
(DeleteMonitorRequest deleteMonitorRequest) Deletes a monitor in Amazon CloudWatch Internet Monitor.default CompletableFuture
<GetHealthEventResponse> getHealthEvent
(Consumer<GetHealthEventRequest.Builder> getHealthEventRequest) Gets information the Amazon CloudWatch Internet Monitor has created and stored about a health event for a specified monitor.default CompletableFuture
<GetHealthEventResponse> getHealthEvent
(GetHealthEventRequest getHealthEventRequest) Gets information the Amazon CloudWatch Internet Monitor has created and stored about a health event for a specified monitor.default CompletableFuture
<GetMonitorResponse> getMonitor
(Consumer<GetMonitorRequest.Builder> getMonitorRequest) Gets information about a monitor in Amazon CloudWatch Internet Monitor based on a monitor name.default CompletableFuture
<GetMonitorResponse> getMonitor
(GetMonitorRequest getMonitorRequest) Gets information about a monitor in Amazon CloudWatch Internet Monitor based on a monitor name.listHealthEvents
(Consumer<ListHealthEventsRequest.Builder> listHealthEventsRequest) Lists all health events for a monitor in Amazon CloudWatch Internet Monitor.listHealthEvents
(ListHealthEventsRequest listHealthEventsRequest) Lists all health events for a monitor in Amazon CloudWatch Internet Monitor.default ListHealthEventsPublisher
listHealthEventsPaginator
(Consumer<ListHealthEventsRequest.Builder> listHealthEventsRequest) Lists all health events for a monitor in Amazon CloudWatch Internet Monitor.default ListHealthEventsPublisher
listHealthEventsPaginator
(ListHealthEventsRequest listHealthEventsRequest) Lists all health events for a monitor in Amazon CloudWatch Internet Monitor.default CompletableFuture
<ListMonitorsResponse> listMonitors
(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest) 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.default CompletableFuture
<ListMonitorsResponse> listMonitors
(ListMonitorsRequest listMonitorsRequest) 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.default ListMonitorsPublisher
listMonitorsPaginator
(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest) 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.default ListMonitorsPublisher
listMonitorsPaginator
(ListMonitorsRequest listMonitorsRequest) 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.listTagsForResource
(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists the tags for a resource.listTagsForResource
(ListTagsForResourceRequest listTagsForResourceRequest) Lists the tags for a resource.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture
<TagResourceResponse> tagResource
(Consumer<TagResourceRequest.Builder> tagResourceRequest) Adds a tag to a resource.default CompletableFuture
<TagResourceResponse> tagResource
(TagResourceRequest tagResourceRequest) Adds a tag to a resource.default CompletableFuture
<UntagResourceResponse> untagResource
(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes a tag from a resource.default CompletableFuture
<UntagResourceResponse> untagResource
(UntagResourceRequest untagResourceRequest) Removes a tag from a resource.default CompletableFuture
<UpdateMonitorResponse> updateMonitor
(Consumer<UpdateMonitorRequest.Builder> updateMonitorRequest) Updates a monitor.default CompletableFuture
<UpdateMonitorResponse> updateMonitor
(UpdateMonitorRequest updateMonitorRequest) Updates a monitor.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
createMonitor
default CompletableFuture<CreateMonitorResponse> createMonitor(CreateMonitorRequest createMonitorRequest) Creates a monitor in Amazon CloudWatch Internet Monitor. A monitor is built based on information from the application resources that you add: VPCs, Network Load Balancers (NLBs), Amazon CloudFront distributions, and Amazon 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 choose the percentage of traffic that you want to monitor. You can also set a maximum limit for the number of city-networks where client traffic is monitored, that caps the total traffic that Internet Monitor monitors. A city-network maximum is the limit of city-networks, but you only pay for the number of city-networks that are actually monitored. You can update your monitor at any time to change the percentage of traffic to monitor or the city-networks maximum. For more information, see Choosing a city-network maximum value in the Amazon CloudWatch User Guide.
- Parameters:
createMonitorRequest
-- Returns:
- A Java Future containing the result of the CreateMonitor operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ConflictException The requested resource is in use.
- LimitExceededException The request exceeded a service quota.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createMonitor
default CompletableFuture<CreateMonitorResponse> createMonitor(Consumer<CreateMonitorRequest.Builder> createMonitorRequest) Creates a monitor in Amazon CloudWatch Internet Monitor. A monitor is built based on information from the application resources that you add: VPCs, Network Load Balancers (NLBs), Amazon CloudFront distributions, and Amazon 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 choose the percentage of traffic that you want to monitor. You can also set a maximum limit for the number of city-networks where client traffic is monitored, that caps the total traffic that Internet Monitor monitors. A city-network maximum is the limit of city-networks, but you only pay for the number of city-networks that are actually monitored. You can update your monitor at any time to change the percentage of traffic to monitor or the city-networks maximum. For more information, see Choosing a city-network maximum value in the Amazon CloudWatch User Guide.
This is a convenience which creates an instance of the
CreateMonitorRequest.Builder
avoiding the need to create one manually viaCreateMonitorRequest.builder()
- Parameters:
createMonitorRequest
- AConsumer
that will call methods onCreateMonitorRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CreateMonitor operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ConflictException The requested resource is in use.
- LimitExceededException The request exceeded a service quota.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteMonitor
default CompletableFuture<DeleteMonitorResponse> deleteMonitor(DeleteMonitorRequest deleteMonitorRequest) Deletes a monitor in Amazon CloudWatch Internet Monitor.
- Parameters:
deleteMonitorRequest
-- Returns:
- A Java Future containing the result of the DeleteMonitor operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteMonitor
default CompletableFuture<DeleteMonitorResponse> deleteMonitor(Consumer<DeleteMonitorRequest.Builder> deleteMonitorRequest) Deletes a monitor in Amazon CloudWatch Internet Monitor.
This is a convenience which creates an instance of the
DeleteMonitorRequest.Builder
avoiding the need to create one manually viaDeleteMonitorRequest.builder()
- Parameters:
deleteMonitorRequest
- AConsumer
that will call methods onDeleteMonitorRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the DeleteMonitor operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getHealthEvent
default CompletableFuture<GetHealthEventResponse> getHealthEvent(GetHealthEventRequest getHealthEventRequest) 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 the information related to the event, by location.
The information returned includes the impact on performance, availability, and round-trip time, information about the network providers (ASNs), 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.
- Parameters:
getHealthEventRequest
-- Returns:
- A Java Future containing the result of the GetHealthEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getHealthEvent
default CompletableFuture<GetHealthEventResponse> getHealthEvent(Consumer<GetHealthEventRequest.Builder> getHealthEventRequest) 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 the information related to the event, by location.
The information returned includes the impact on performance, availability, and round-trip time, information about the network providers (ASNs), 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.
This is a convenience which creates an instance of the
GetHealthEventRequest.Builder
avoiding the need to create one manually viaGetHealthEventRequest.builder()
- Parameters:
getHealthEventRequest
- AConsumer
that will call methods onGetHealthEventRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetHealthEvent operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getMonitor
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.
- Parameters:
getMonitorRequest
-- Returns:
- A Java Future containing the result of the GetMonitor operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getMonitor
default CompletableFuture<GetMonitorResponse> getMonitor(Consumer<GetMonitorRequest.Builder> getMonitorRequest) 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.
This is a convenience which creates an instance of the
GetMonitorRequest.Builder
avoiding the need to create one manually viaGetMonitorRequest.builder()
- Parameters:
getMonitorRequest
- AConsumer
that will call methods onGetMonitorRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the GetMonitor operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listHealthEvents
default CompletableFuture<ListHealthEventsResponse> listHealthEvents(ListHealthEventsRequest listHealthEventsRequest) Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. Returns information for health events including the event start and end time and the status.
Health events that have start times during the time frame that is requested are not included in the list of health events.
- Parameters:
listHealthEventsRequest
-- Returns:
- A Java Future containing the result of the ListHealthEvents operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listHealthEvents
default CompletableFuture<ListHealthEventsResponse> listHealthEvents(Consumer<ListHealthEventsRequest.Builder> listHealthEventsRequest) Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. Returns information for health events including the event start and end time and the status.
Health events that have start times during the time frame that is requested are not included in the list of health events.
This is a convenience which creates an instance of the
ListHealthEventsRequest.Builder
avoiding the need to create one manually viaListHealthEventsRequest.builder()
- Parameters:
listHealthEventsRequest
- AConsumer
that will call methods onListHealthEventsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListHealthEvents operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listHealthEventsPaginator
default ListHealthEventsPublisher listHealthEventsPaginator(ListHealthEventsRequest listHealthEventsRequest) Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. Returns information for health events including the event start and end time and the status.
Health events that have start times during the time frame that is requested are not included in the list of health events.
This is a variant of
listHealthEvents(software.amazon.awssdk.services.internetmonitor.model.ListHealthEventsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.internetmonitor.paginators.ListHealthEventsPublisher publisher = client.listHealthEventsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.internetmonitor.paginators.ListHealthEventsPublisher publisher = client.listHealthEventsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.internetmonitor.model.ListHealthEventsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.internetmonitor.model.ListHealthEventsResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listHealthEvents(software.amazon.awssdk.services.internetmonitor.model.ListHealthEventsRequest)
operation.- Parameters:
listHealthEventsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listHealthEventsPaginator
default ListHealthEventsPublisher listHealthEventsPaginator(Consumer<ListHealthEventsRequest.Builder> listHealthEventsRequest) Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. Returns information for health events including the event start and end time and the status.
Health events that have start times during the time frame that is requested are not included in the list of health events.
This is a variant of
listHealthEvents(software.amazon.awssdk.services.internetmonitor.model.ListHealthEventsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.internetmonitor.paginators.ListHealthEventsPublisher publisher = client.listHealthEventsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.internetmonitor.paginators.ListHealthEventsPublisher publisher = client.listHealthEventsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.internetmonitor.model.ListHealthEventsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.internetmonitor.model.ListHealthEventsResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listHealthEvents(software.amazon.awssdk.services.internetmonitor.model.ListHealthEventsRequest)
operation.This is a convenience which creates an instance of the
ListHealthEventsRequest.Builder
avoiding the need to create one manually viaListHealthEventsRequest.builder()
- Parameters:
listHealthEventsRequest
- AConsumer
that will call methods onListHealthEventsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listMonitors
default CompletableFuture<ListMonitorsResponse> listMonitors(ListMonitorsRequest listMonitorsRequest) 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.
- Parameters:
listMonitorsRequest
-- Returns:
- A Java Future containing the result of the ListMonitors operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listMonitors
default CompletableFuture<ListMonitorsResponse> listMonitors(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest) 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.
This is a convenience which creates an instance of the
ListMonitorsRequest.Builder
avoiding the need to create one manually viaListMonitorsRequest.builder()
- Parameters:
listMonitorsRequest
- AConsumer
that will call methods onListMonitorsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListMonitors operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listMonitorsPaginator
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.
This is a variant of
listMonitors(software.amazon.awssdk.services.internetmonitor.model.ListMonitorsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.internetmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.internetmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.internetmonitor.model.ListMonitorsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.internetmonitor.model.ListMonitorsResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listMonitors(software.amazon.awssdk.services.internetmonitor.model.ListMonitorsRequest)
operation.- Parameters:
listMonitorsRequest
-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listMonitorsPaginator
default ListMonitorsPublisher listMonitorsPaginator(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest) 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.
This is a variant of
listMonitors(software.amazon.awssdk.services.internetmonitor.model.ListMonitorsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe method will result in a newSubscription
i.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper methodsoftware.amazon.awssdk.services.internetmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
software.amazon.awssdk.services.internetmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.internetmonitor.model.ListMonitorsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.internetmonitor.model.ListMonitorsResponse response) { //... }; });
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listMonitors(software.amazon.awssdk.services.internetmonitor.model.ListMonitorsRequest)
operation.This is a convenience which creates an instance of the
ListMonitorsRequest.Builder
avoiding the need to create one manually viaListMonitorsRequest.builder()
- Parameters:
listMonitorsRequest
- AConsumer
that will call methods onListMonitorsRequest.Builder
to create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists the tags for a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor.
- Parameters:
listTagsForResourceRequest
-- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- TooManyRequestsException There were too many requests.
- AccessDeniedException You don't have sufficient permission to perform this action.
- NotFoundException The request specifies something that doesn't exist.
- BadRequestException A bad request was received.
- InternalServerErrorException There was an internal server error.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists the tags for a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builder
avoiding the need to create one manually viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- TooManyRequestsException There were too many requests.
- AccessDeniedException You don't have sufficient permission to perform this action.
- NotFoundException The request specifies something that doesn't exist.
- BadRequestException A bad request was received.
- InternalServerErrorException There was an internal server error.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
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.- Parameters:
tagResourceRequest
-- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- TooManyRequestsException There were too many requests.
- AccessDeniedException You don't have sufficient permission to perform this action.
- NotFoundException The request specifies something that doesn't exist.
- BadRequestException A bad request was received.
- InternalServerErrorException There was an internal server error.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) 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.
This is a convenience which creates an instance of the
TagResourceRequest.Builder
avoiding the need to create one manually viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- TooManyRequestsException There were too many requests.
- AccessDeniedException You don't have sufficient permission to perform this action.
- NotFoundException The request specifies something that doesn't exist.
- BadRequestException A bad request was received.
- InternalServerErrorException There was an internal server error.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes a tag from a resource.
- Parameters:
untagResourceRequest
-- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- TooManyRequestsException There were too many requests.
- AccessDeniedException You don't have sufficient permission to perform this action.
- NotFoundException The request specifies something that doesn't exist.
- BadRequestException A bad request was received.
- InternalServerErrorException There was an internal server error.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes a tag from a resource.
This is a convenience which creates an instance of the
UntagResourceRequest.Builder
avoiding the need to create one manually viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- TooManyRequestsException There were too many requests.
- AccessDeniedException You don't have sufficient permission to perform this action.
- NotFoundException The request specifies something that doesn't exist.
- BadRequestException A bad request was received.
- InternalServerErrorException There was an internal server error.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateMonitor
default CompletableFuture<UpdateMonitorResponse> updateMonitor(UpdateMonitorRequest updateMonitorRequest) Updates a monitor. You can update a monitor to change the percentage of traffic to monitor or the maximum number of city-networks (locations and ASNs), 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.
- Parameters:
updateMonitorRequest
-- Returns:
- A Java Future containing the result of the UpdateMonitor operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- ResourceNotFoundException The request specifies a resource that doesn't exist.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- LimitExceededException The request exceeded a service quota.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateMonitor
default CompletableFuture<UpdateMonitorResponse> updateMonitor(Consumer<UpdateMonitorRequest.Builder> updateMonitorRequest) Updates a monitor. You can update a monitor to change the percentage of traffic to monitor or the maximum number of city-networks (locations and ASNs), 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.
This is a convenience which creates an instance of the
UpdateMonitorRequest.Builder
avoiding the need to create one manually viaUpdateMonitorRequest.builder()
- Parameters:
updateMonitorRequest
- AConsumer
that will call methods onUpdateMonitorRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the UpdateMonitor operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.- InternalServerException An internal error occurred.
- ResourceNotFoundException The request specifies a resource that doesn't exist.
- AccessDeniedException You don't have sufficient permission to perform this action.
- ThrottlingException The request was denied due to request throttling.
- LimitExceededException The request exceeded a service quota.
- ValidationException Invalid request.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- InternetMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-
create
Create aInternetMonitorAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aInternetMonitorAsyncClient
.
-