Interface NetworkMonitorAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface NetworkMonitorAsyncClient extends AwsClient
Service client for accessing Amazon CloudWatch Network Monitor asynchronously. This can be created using the static 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 Details

  • 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 is TCP.

      • protocol—The communication protocol between the source and destination. This will be either TCP or ICMP.

      • packetSize—The size of the packets. This must be a number between 56 and 8500.

      • (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 invoke Throwable.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 is TCP.

      • protocol—The communication protocol between the source and destination. This will be either TCP or ICMP.

      • packetSize—The size of the packets. This must be a number between 56 and 8500.

      • (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 via CreateMonitorRequest.builder()

      Parameters:
      createMonitorRequest - A Consumer that will call methods on CreateMonitorRequest.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 invoke Throwable.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

      default CompletableFuture<CreateProbeResponse> createProbe(CreateProbeRequest 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. Run ListMonitors to get a list of monitor names. Note the name of the monitorName 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 invoke Throwable.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. Run ListMonitors to get a list of monitor names. Note the name of the monitorName 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 via CreateProbeRequest.builder()

      Parameters:
      createProbeRequest - A Consumer that will call methods on CreateProbeRequest.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 invoke Throwable.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. Run ListMonitors 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 invoke Throwable.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. Run ListMonitors 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 via DeleteMonitorRequest.builder()

      Parameters:
      deleteMonitorRequest - A Consumer that will call methods on DeleteMonitorRequest.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 invoke Throwable.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

      default CompletableFuture<DeleteProbeResponse> deleteProbe(DeleteProbeRequest 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 and probeId parameters. Run ListMonitors to get a list of monitor names. Run GetMonitor 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 invoke Throwable.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 and probeId parameters. Run ListMonitors to get a list of monitor names. Run GetMonitor 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 via DeleteProbeRequest.builder()

      Parameters:
      deleteProbeRequest - A Consumer that will call methods on DeleteProbeRequest.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 invoke Throwable.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

      default CompletableFuture<GetMonitorResponse> getMonitor(GetMonitorRequest getMonitorRequest)

      Returns details about a specific monitor.

      This action requires the monitorName parameter. Run ListMonitors 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 invoke Throwable.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. Run ListMonitors 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 via GetMonitorRequest.builder()

      Parameters:
      getMonitorRequest - A Consumer that will call methods on GetMonitorRequest.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 invoke Throwable.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(GetProbeRequest getProbeRequest)

      Returns the details about a probe. This action requires both the monitorName and probeId parameters. Run ListMonitors to get a list of monitor names. Run GetMonitor 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 invoke Throwable.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 and probeId parameters. Run ListMonitors to get a list of monitor names. Run GetMonitor 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 via GetProbeRequest.builder()

      Parameters:
      getProbeRequest - A Consumer that will call methods on GetProbeRequest.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 invoke Throwable.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 invoke Throwable.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 via ListMonitorsRequest.builder()

      Parameters:
      listMonitorsRequest - A Consumer that will call methods on ListMonitorsRequest.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 invoke Throwable.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(ListMonitorsRequest 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 new Subscription 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 method
       
       software.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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 invoke Throwable.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 new Subscription 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 method
       
       software.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsPublisher publisher = client.listMonitorsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       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) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      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 via ListMonitorsRequest.builder()

      Parameters:
      listMonitorsRequest - A Consumer that will call methods on ListMonitorsRequest.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 invoke Throwable.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 invoke Throwable.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 via ListTagsForResourceRequest.builder()

      Parameters:
      listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.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 invoke Throwable.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(TagResourceRequest tagResourceRequest)

      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 invoke Throwable.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 via TagResourceRequest.builder()

      Parameters:
      tagResourceRequest - A Consumer that will call methods on TagResourceRequest.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 invoke Throwable.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 invoke Throwable.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 via UntagResourceRequest.builder()

      Parameters:
      untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.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 invoke Throwable.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 an aggregationPeriod of either 30 or 60 seconds. This action requires the monitorName and probeId parameter. Run ListMonitors 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 invoke Throwable.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 an aggregationPeriod of either 30 or 60 seconds. This action requires the monitorName and probeId parameter. Run ListMonitors 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 via UpdateMonitorRequest.builder()

      Parameters:
      updateMonitorRequest - A Consumer that will call methods on UpdateMonitorRequest.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 invoke Throwable.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(UpdateProbeRequest updateProbeRequest)

      Updates a monitor probe. This action requires both the monitorName and probeId parameters. Run ListMonitors to get a list of monitor names. Run GetMonitor 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 is TCP.

      • protocol—The communication protocol between the source and destination. This will be either TCP or ICMP.

      • packetSize—The size of the packets. This must be a number between 56 and 8500.

      • (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 invoke Throwable.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 and probeId parameters. Run ListMonitors to get a list of monitor names. Run GetMonitor 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 is TCP.

      • protocol—The communication protocol between the source and destination. This will be either TCP or ICMP.

      • packetSize—The size of the packets. This must be a number between 56 and 8500.

      • (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 via UpdateProbeRequest.builder()

      Parameters:
      updateProbeRequest - A Consumer that will call methods on UpdateProbeRequest.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 invoke Throwable.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

      default NetworkMonitorServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      static NetworkMonitorAsyncClient create()
      Create a NetworkMonitorAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a NetworkMonitorAsyncClient.