Interface NetworkMonitorAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder() method.The asynchronous client performs non-blocking I/O when configured with any
SdkAsyncHttpClient supported in the SDK. However, full non-blocking is not guaranteed as the async client may
perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
call.
Amazon CloudWatch Network Monitor is an Amazon Web Services active network monitoring service that identifies if a network issues exists within the Amazon Web Services network or your own company network. Within Network Monitor you'll choose the source VPCs and subnets from the Amazon Web Services network in which you operate and then you'll choose the destination IP addresses from your on-premises network. From these sources and destinations, Network Monitor creates a monitor containing all the possible source and destination combinations, each of which is called a probe, within a single monitor. These probes then monitor network traffic to help you identify where network issues might be affecting your traffic.
Before you begin, ensure the Amazon Web Services CLI is configured in the Amazon Web Services Account where you will create the Network Monitor resource. Network Monitor doesn’t support creation on cross-account resources, but you can create a Network Monitor in any subnet belonging to a VPC owned by your Account.
For more information, see Using Amazon CloudWatch Network Monitor in the Amazon CloudWatch User Guide.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue 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 aNetworkMonitorAsyncClient.static NetworkMonitorAsyncClientcreate()Create aNetworkMonitorAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CompletableFuture<CreateMonitorResponse> createMonitor(Consumer<CreateMonitorRequest.Builder> createMonitorRequest) Creates a monitor between a source subnet and destination IP address.default CompletableFuture<CreateMonitorResponse> createMonitor(CreateMonitorRequest createMonitorRequest) Creates a monitor between a source subnet and destination IP address.default CompletableFuture<CreateProbeResponse> createProbe(Consumer<CreateProbeRequest.Builder> createProbeRequest) Create a probe within a monitor.default CompletableFuture<CreateProbeResponse> createProbe(CreateProbeRequest createProbeRequest) Create a probe within a monitor.default CompletableFuture<DeleteMonitorResponse> deleteMonitor(Consumer<DeleteMonitorRequest.Builder> deleteMonitorRequest) Deletes a specified monitor.default CompletableFuture<DeleteMonitorResponse> deleteMonitor(DeleteMonitorRequest deleteMonitorRequest) Deletes a specified monitor.default CompletableFuture<DeleteProbeResponse> deleteProbe(Consumer<DeleteProbeRequest.Builder> deleteProbeRequest) Deletes the specified probe.default CompletableFuture<DeleteProbeResponse> deleteProbe(DeleteProbeRequest deleteProbeRequest) Deletes the specified probe.default CompletableFuture<GetMonitorResponse> getMonitor(Consumer<GetMonitorRequest.Builder> getMonitorRequest) Returns details about a specific monitor.default CompletableFuture<GetMonitorResponse> getMonitor(GetMonitorRequest getMonitorRequest) Returns details about a specific monitor.default CompletableFuture<GetProbeResponse> getProbe(Consumer<GetProbeRequest.Builder> getProbeRequest) Returns the details about a probe.default CompletableFuture<GetProbeResponse> getProbe(GetProbeRequest getProbeRequest) Returns the details about a probe.default CompletableFuture<ListMonitorsResponse> listMonitors(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest) Returns a list of all of your monitors.default CompletableFuture<ListMonitorsResponse> listMonitors(ListMonitorsRequest listMonitorsRequest) Returns a list of all of your monitors.default ListMonitorsPublisherlistMonitorsPaginator(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest) This is a variant oflistMonitors(software.amazon.awssdk.services.networkmonitor.model.ListMonitorsRequest)operation.default ListMonitorsPublisherlistMonitorsPaginator(ListMonitorsRequest listMonitorsRequest) This is a variant oflistMonitors(software.amazon.awssdk.services.networkmonitor.model.ListMonitorsRequest)operation.listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists the tags assigned to this resource.listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists the tags assigned to this resource.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Adds key-value pairs to a monitor or probe.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest) Adds key-value pairs to a monitor or probe.default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes a key-value pair from a monitor or probe.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes a key-value pair from a monitor or probe.default CompletableFuture<UpdateMonitorResponse> updateMonitor(Consumer<UpdateMonitorRequest.Builder> updateMonitorRequest) Updates theaggregationPeriodfor a monitor.default CompletableFuture<UpdateMonitorResponse> updateMonitor(UpdateMonitorRequest updateMonitorRequest) Updates theaggregationPeriodfor a monitor.default CompletableFuture<UpdateProbeResponse> updateProbe(Consumer<UpdateProbeRequest.Builder> updateProbeRequest) Updates a monitor probe.default CompletableFuture<UpdateProbeResponse> updateProbe(UpdateProbeRequest updateProbeRequest) Updates a monitor probe.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods 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 between a source subnet and destination IP address. Within a monitor you'll create one or more probes that monitor network traffic between your source Amazon Web Services VPC subnets and your destination IP addresses. Each probe then aggregates and sends metrics to Amazon CloudWatch.
You can also create a monitor with probes using this command. For each probe, you define the following:
-
source—The subnet IDs where the probes will be created. -
destination— The target destination IP address for the probe. -
destinationPort—Required only if the protocol isTCP. -
protocol—The communication protocol between the source and destination. This will be eitherTCPorICMP. -
packetSize—The size of the packets. This must be a number between56and8500. -
(Optional)
tags—Key-value pairs created and assigned to the probe.
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException This operation attempted to create a resource that already exists.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException 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 between a source subnet and destination IP address. Within a monitor you'll create one or more probes that monitor network traffic between your source Amazon Web Services VPC subnets and your destination IP addresses. Each probe then aggregates and sends metrics to Amazon CloudWatch.
You can also create a monitor with probes using this command. For each probe, you define the following:
-
source—The subnet IDs where the probes will be created. -
destination— The target destination IP address for the probe. -
destinationPort—Required only if the protocol isTCP. -
protocol—The communication protocol between the source and destination. This will be eitherTCPorICMP. -
packetSize—The size of the packets. This must be a number between56and8500. -
(Optional)
tags—Key-value pairs created and assigned to the probe.
This is a convenience which creates an instance of the
CreateMonitorRequest.Builderavoiding the need to create one manually viaCreateMonitorRequest.builder()- Parameters:
createMonitorRequest- AConsumerthat will call methods onCreateMonitorRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException This operation attempted to create a resource that already exists.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
createProbe
Create a probe within a monitor. Once you create a probe, and it begins monitoring your network traffic, you'll incur billing charges for that probe. This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names. Note the name of themonitorNameyou want to create the probe for.- Parameters:
createProbeRequest-- Returns:
- A Java Future containing the result of the CreateProbe operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createProbe
default CompletableFuture<CreateProbeResponse> createProbe(Consumer<CreateProbeRequest.Builder> createProbeRequest) Create a probe within a monitor. Once you create a probe, and it begins monitoring your network traffic, you'll incur billing charges for that probe. This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names. Note the name of themonitorNameyou want to create the probe for.
This is a convenience which creates an instance of the
CreateProbeRequest.Builderavoiding the need to create one manually viaCreateProbeRequest.builder()- Parameters:
createProbeRequest- AConsumerthat will call methods onCreateProbeRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateProbe operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException 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 specified monitor.
This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names.- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException 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 specified monitor.
This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names.
This is a convenience which creates an instance of the
DeleteMonitorRequest.Builderavoiding the need to create one manually viaDeleteMonitorRequest.builder()- Parameters:
deleteMonitorRequest- AConsumerthat will call methods onDeleteMonitorRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteProbe
Deletes the specified probe. Once a probe is deleted you'll no longer incur any billing fees for that probe.
This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs. You can only delete a single probe at a time using this action.- Parameters:
deleteProbeRequest-- Returns:
- A Java Future containing the result of the DeleteProbe operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteProbe
default CompletableFuture<DeleteProbeResponse> deleteProbe(Consumer<DeleteProbeRequest.Builder> deleteProbeRequest) Deletes the specified probe. Once a probe is deleted you'll no longer incur any billing fees for that probe.
This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs. You can only delete a single probe at a time using this action.
This is a convenience which creates an instance of the
DeleteProbeRequest.Builderavoiding the need to create one manually viaDeleteProbeRequest.builder()- Parameters:
deleteProbeRequest- AConsumerthat will call methods onDeleteProbeRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteProbe operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getMonitor
Returns details about a specific monitor.
This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names.- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException 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) Returns details about a specific monitor.
This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names.
This is a convenience which creates an instance of the
GetMonitorRequest.Builderavoiding the need to create one manually viaGetMonitorRequest.builder()- Parameters:
getMonitorRequest- AConsumerthat will call methods onGetMonitorRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getProbe
Returns the details about a probe. This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs.- Parameters:
getProbeRequest-- Returns:
- A Java Future containing the result of the GetProbe operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getProbe
default CompletableFuture<GetProbeResponse> getProbe(Consumer<GetProbeRequest.Builder> getProbeRequest) Returns the details about a probe. This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs.
This is a convenience which creates an instance of the
GetProbeRequest.Builderavoiding the need to create one manually viaGetProbeRequest.builder()- Parameters:
getProbeRequest- AConsumerthat will call methods onGetProbeRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetProbe operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException 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) Returns a list of all of your monitors.
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException 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) Returns a list of all of your monitors.
This is a convenience which creates an instance of the
ListMonitorsRequest.Builderavoiding the need to create one manually viaListMonitorsRequest.builder()- Parameters:
listMonitorsRequest- AConsumerthat will call methods onListMonitorsRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listMonitorsPaginator
This is a variant of
listMonitors(software.amazon.awssdk.services.networkmonitor.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 newSubscriptioni.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 method
2) Using a custom subscribersoftware.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.networkmonitor.model.ListMonitorsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.networkmonitor.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.networkmonitor.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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException 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) This is a variant of
listMonitors(software.amazon.awssdk.services.networkmonitor.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 newSubscriptioni.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 method
2) Using a custom subscribersoftware.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.networkmonitor.model.ListMonitorsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.networkmonitor.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.networkmonitor.model.ListMonitorsRequest)operation.
This is a convenience which creates an instance of the
ListMonitorsRequest.Builderavoiding the need to create one manually viaListMonitorsRequest.builder()- Parameters:
listMonitorsRequest- AConsumerthat will call methods onListMonitorsRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- 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.
- NetworkMonitorException 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 assigned to this resource.
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException This operation attempted to create a resource that already exists.
- 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.
- NetworkMonitorException 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 assigned to this resource.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException This operation attempted to create a resource that already exists.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
Adds key-value pairs to a monitor or probe.
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException This operation attempted to create a resource that already exists.
- 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.
- NetworkMonitorException 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 key-value pairs to a monitor or probe.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException This operation attempted to create a resource that already exists.
- 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.
- NetworkMonitorException 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 key-value pair from a monitor or probe.
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException This operation attempted to create a resource that already exists.
- 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.
- NetworkMonitorException 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 key-value pair from a monitor or probe.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ConflictException This operation attempted to create a resource that already exists.
- 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.
- NetworkMonitorException 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 the
aggregationPeriodfor a monitor. Monitors support anaggregationPeriodof either30or60seconds. This action requires themonitorNameandprobeIdparameter. RunListMonitorsto get a list of monitor names.- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException 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 the
aggregationPeriodfor a monitor. Monitors support anaggregationPeriodof either30or60seconds. This action requires themonitorNameandprobeIdparameter. RunListMonitorsto get a list of monitor names.
This is a convenience which creates an instance of the
UpdateMonitorRequest.Builderavoiding the need to create one manually viaUpdateMonitorRequest.builder()- Parameters:
updateMonitorRequest- AConsumerthat will call methods onUpdateMonitorRequest.Builderto 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateProbe
Updates a monitor probe. This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs.You can update the following para create a monitor with probes using this command. For each probe, you define the following:
-
state—The state of the probe. -
destination— The target destination IP address for the probe. -
destinationPort—Required only if the protocol isTCP. -
protocol—The communication protocol between the source and destination. This will be eitherTCPorICMP. -
packetSize—The size of the packets. This must be a number between56and8500. -
(Optional)
tags—Key-value pairs created and assigned to the probe.
- Parameters:
updateProbeRequest-- Returns:
- A Java Future containing the result of the UpdateProbe operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
updateProbe
default CompletableFuture<UpdateProbeResponse> updateProbe(Consumer<UpdateProbeRequest.Builder> updateProbeRequest) Updates a monitor probe. This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs.You can update the following para create a monitor with probes using this command. For each probe, you define the following:
-
state—The state of the probe. -
destination— The target destination IP address for the probe. -
destinationPort—Required only if the protocol isTCP. -
protocol—The communication protocol between the source and destination. This will be eitherTCPorICMP. -
packetSize—The size of the packets. This must be a number between56and8500. -
(Optional)
tags—Key-value pairs created and assigned to the probe.
This is a convenience which creates an instance of the
UpdateProbeRequest.Builderavoiding the need to create one manually viaUpdateProbeRequest.builder()- Parameters:
updateProbeRequest- AConsumerthat will call methods onUpdateProbeRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateProbe operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException You do not have sufficient access to perform this action.
- ResourceNotFoundException The specified resource does not exist.
- ThrottlingException The request was denied due to request throttling
- ValidationException One of the parameters for the request is not valid.
- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- ServiceQuotaExceededException This request exceeds a service quota.
- 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.
- NetworkMonitorException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aNetworkMonitorAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aNetworkMonitorAsyncClient.
-