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
Modifier 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 aNetworkMonitorAsyncClient
.static NetworkMonitorAsyncClient
create()
Create aNetworkMonitorAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and 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 ListMonitorsPublisher
listMonitorsPaginator
(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest) This is a variant oflistMonitors(software.amazon.awssdk.services.networkmonitor.model.ListMonitorsRequest)
operation.default ListMonitorsPublisher
listMonitorsPaginator
(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 theaggregationPeriod
for a monitor.default CompletableFuture
<UpdateMonitorResponse> updateMonitor
(UpdateMonitorRequest updateMonitorRequest) Updates theaggregationPeriod
for 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
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 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 eitherTCP
orICMP
. -
packetSize
—The size of the packets. This must be a number between56
and8500
. -
(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 eitherTCP
orICMP
. -
packetSize
—The size of the packets. This must be a number between56
and8500
. -
(Optional)
tags
—Key-value pairs created and assigned to the probe.
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. 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
monitorName
parameter. RunListMonitors
to get a list of monitor names. Note the name of themonitorName
you 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
monitorName
parameter. RunListMonitors
to get a list of monitor names. Note the name of themonitorName
you want to create the probe for.
This is a convenience which creates an instance of the
CreateProbeRequest.Builder
avoiding the need to create one manually viaCreateProbeRequest.builder()
- Parameters:
createProbeRequest
- AConsumer
that will call methods onCreateProbeRequest.Builder
to 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
monitorName
parameter. RunListMonitors
to 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
monitorName
parameter. RunListMonitors
to get a list of monitor names.
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. 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
monitorName
andprobeId
parameters. RunListMonitors
to get a list of monitor names. RunGetMonitor
to 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
monitorName
andprobeId
parameters. RunListMonitors
to get a list of monitor names. RunGetMonitor
to 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.Builder
avoiding the need to create one manually viaDeleteProbeRequest.builder()
- Parameters:
deleteProbeRequest
- AConsumer
that will call methods onDeleteProbeRequest.Builder
to 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
monitorName
parameter. RunListMonitors
to 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
monitorName
parameter. RunListMonitors
to get a list of monitor names.
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. 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
monitorName
andprobeId
parameters. RunListMonitors
to get a list of monitor names. RunGetMonitor
to 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
monitorName
andprobeId
parameters. RunListMonitors
to get a list of monitor names. RunGetMonitor
to get a list of probes and probe IDs.
This is a convenience which creates an instance of the
GetProbeRequest.Builder
avoiding the need to create one manually viaGetProbeRequest.builder()
- Parameters:
getProbeRequest
- AConsumer
that will call methods onGetProbeRequest.Builder
to 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.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. 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 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.networkmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
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 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.networkmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
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.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. 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.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. 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.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. 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.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. 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
aggregationPeriod
for a monitor. Monitors support anaggregationPeriod
of either30
or60
seconds. This action requires themonitorName
andprobeId
parameter. RunListMonitors
to 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
aggregationPeriod
for a monitor. Monitors support anaggregationPeriod
of either30
or60
seconds. This action requires themonitorName
andprobeId
parameter. RunListMonitors
to get a list of monitor names.
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. 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
monitorName
andprobeId
parameters. RunListMonitors
to get a list of monitor names. RunGetMonitor
to 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 eitherTCP
orICMP
. -
packetSize
—The size of the packets. This must be a number between56
and8500
. -
(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
monitorName
andprobeId
parameters. RunListMonitors
to get a list of monitor names. RunGetMonitor
to 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 eitherTCP
orICMP
. -
packetSize
—The size of the packets. This must be a number between56
and8500
. -
(Optional)
tags
—Key-value pairs created and assigned to the probe.
This is a convenience which creates an instance of the
UpdateProbeRequest.Builder
avoiding the need to create one manually viaUpdateProbeRequest.builder()
- Parameters:
updateProbeRequest
- AConsumer
that will call methods onUpdateProbeRequest.Builder
to 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: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 aNetworkMonitorAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aNetworkMonitorAsyncClient
.
-