Interface NetworkMonitorClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface NetworkMonitorClient extends AwsClient
Service client for accessing Amazon CloudWatch Network Monitor. This can be created using the staticbuilder()method.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
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static NetworkMonitorClientBuilderbuilder()Create a builder that can be used to configure and create aNetworkMonitorClient.static NetworkMonitorClientcreate()Create aNetworkMonitorClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateMonitorResponsecreateMonitor(Consumer<CreateMonitorRequest.Builder> createMonitorRequest)Creates a monitor between a source subnet and destination IP address.default CreateMonitorResponsecreateMonitor(CreateMonitorRequest createMonitorRequest)Creates a monitor between a source subnet and destination IP address.default CreateProbeResponsecreateProbe(Consumer<CreateProbeRequest.Builder> createProbeRequest)Create a probe within a monitor.default CreateProbeResponsecreateProbe(CreateProbeRequest createProbeRequest)Create a probe within a monitor.default DeleteMonitorResponsedeleteMonitor(Consumer<DeleteMonitorRequest.Builder> deleteMonitorRequest)Deletes a specified monitor.default DeleteMonitorResponsedeleteMonitor(DeleteMonitorRequest deleteMonitorRequest)Deletes a specified monitor.default DeleteProbeResponsedeleteProbe(Consumer<DeleteProbeRequest.Builder> deleteProbeRequest)Deletes the specified probe.default DeleteProbeResponsedeleteProbe(DeleteProbeRequest deleteProbeRequest)Deletes the specified probe.default GetMonitorResponsegetMonitor(Consumer<GetMonitorRequest.Builder> getMonitorRequest)Returns details about a specific monitor.default GetMonitorResponsegetMonitor(GetMonitorRequest getMonitorRequest)Returns details about a specific monitor.default GetProbeResponsegetProbe(Consumer<GetProbeRequest.Builder> getProbeRequest)Returns the details about a probe.default GetProbeResponsegetProbe(GetProbeRequest getProbeRequest)Returns the details about a probe.default ListMonitorsResponselistMonitors(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest)Returns a list of all of your monitors.default ListMonitorsResponselistMonitors(ListMonitorsRequest listMonitorsRequest)Returns a list of all of your monitors.default ListMonitorsIterablelistMonitorsPaginator(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest)This is a variant oflistMonitors(software.amazon.awssdk.services.networkmonitor.model.ListMonitorsRequest)operation.default ListMonitorsIterablelistMonitorsPaginator(ListMonitorsRequest listMonitorsRequest)This is a variant oflistMonitors(software.amazon.awssdk.services.networkmonitor.model.ListMonitorsRequest)operation.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)Lists the tags assigned to this resource.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)Lists the tags assigned to this resource.default NetworkMonitorServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)Adds key-value pairs to a monitor or probe.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest)Adds key-value pairs to a monitor or probe.default UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)Removes a key-value pair from a monitor or probe.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest)Removes a key-value pair from a monitor or probe.default UpdateMonitorResponseupdateMonitor(Consumer<UpdateMonitorRequest.Builder> updateMonitorRequest)Updates theaggregationPeriodfor a monitor.default UpdateMonitorResponseupdateMonitor(UpdateMonitorRequest updateMonitorRequest)Updates theaggregationPeriodfor a monitor.default UpdateProbeResponseupdateProbe(Consumer<UpdateProbeRequest.Builder> updateProbeRequest)Updates a monitor probe.default UpdateProbeResponseupdateProbe(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 Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
createMonitor
default CreateMonitorResponse createMonitor(CreateMonitorRequest createMonitorRequest) throws AccessDeniedException, ThrottlingException, ValidationException, InternalServerException, ConflictException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Creates a monitor between a source subnet and destination IP address. Within a monitor you'll create one or more probes that monitor network traffic between your source Amazon Web Services VPC subnets and your destination IP addresses. Each probe then aggregates and sends metrics to Amazon CloudWatch.
You can also create a monitor with probes using this command. For each probe, you define the following:
-
source—The subnet IDs where the probes will be created. -
destination— The target destination IP address for the probe. -
destinationPort—Required only if the protocol isTCP. -
protocol—The communication protocol between the source and destination. This will be eitherTCPorICMP. -
packetSize—The size of the packets. This must be a number between56and8500. -
(Optional)
tags—Key-value pairs created and assigned to the probe.
- Parameters:
createMonitorRequest-- Returns:
- Result of the CreateMonitor operation returned by the service.
- Throws:
AccessDeniedException- You do not have sufficient access to perform this action.ThrottlingException- The request was denied due to request throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
-
createMonitor
default CreateMonitorResponse createMonitor(Consumer<CreateMonitorRequest.Builder> createMonitorRequest) throws AccessDeniedException, ThrottlingException, ValidationException, InternalServerException, ConflictException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Creates a monitor between a source subnet and destination IP address. Within a monitor you'll create one or more probes that monitor network traffic between your source Amazon Web Services VPC subnets and your destination IP addresses. Each probe then aggregates and sends metrics to Amazon CloudWatch.
You can also create a monitor with probes using this command. For each probe, you define the following:
-
source—The subnet IDs where the probes will be created. -
destination— The target destination IP address for the probe. -
destinationPort—Required only if the protocol isTCP. -
protocol—The communication protocol between the source and destination. This will be eitherTCPorICMP. -
packetSize—The size of the packets. This must be a number between56and8500. -
(Optional)
tags—Key-value pairs created and assigned to the probe.
This is a convenience which creates an instance of the
CreateMonitorRequest.Builderavoiding the need to create one manually viaCreateMonitorRequest.builder()- Parameters:
createMonitorRequest- AConsumerthat will call methods onCreateMonitorRequest.Builderto create a request.- Returns:
- Result of the CreateMonitor operation returned by the service.
- Throws:
AccessDeniedException- You do not have sufficient access to perform this action.ThrottlingException- The request was denied due to request throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
-
createProbe
default CreateProbeResponse createProbe(CreateProbeRequest createProbeRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Create a probe within a monitor. Once you create a probe, and it begins monitoring your network traffic, you'll incur billing charges for that probe. This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names. Note the name of themonitorNameyou want to create the probe for.- Parameters:
createProbeRequest-- Returns:
- Result of the CreateProbe operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
createProbe
default CreateProbeResponse createProbe(Consumer<CreateProbeRequest.Builder> createProbeRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Create a probe within a monitor. Once you create a probe, and it begins monitoring your network traffic, you'll incur billing charges for that probe. This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names. Note the name of themonitorNameyou want to create the probe for.
This is a convenience which creates an instance of the
CreateProbeRequest.Builderavoiding the need to create one manually viaCreateProbeRequest.builder()- Parameters:
createProbeRequest- AConsumerthat will call methods onCreateProbeRequest.Builderto create a request.- Returns:
- Result of the CreateProbe operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
deleteMonitor
default DeleteMonitorResponse deleteMonitor(DeleteMonitorRequest deleteMonitorRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
Deletes a specified monitor.
This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names.- Parameters:
deleteMonitorRequest-- Returns:
- Result of the DeleteMonitor operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
deleteMonitor
default DeleteMonitorResponse deleteMonitor(Consumer<DeleteMonitorRequest.Builder> deleteMonitorRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
Deletes a specified monitor.
This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names.
This is a convenience which creates an instance of the
DeleteMonitorRequest.Builderavoiding the need to create one manually viaDeleteMonitorRequest.builder()- Parameters:
deleteMonitorRequest- AConsumerthat will call methods onDeleteMonitorRequest.Builderto create a request.- Returns:
- Result of the DeleteMonitor operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
deleteProbe
default DeleteProbeResponse deleteProbe(DeleteProbeRequest deleteProbeRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Deletes the specified probe. Once a probe is deleted you'll no longer incur any billing fees for that probe.
This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs. You can only delete a single probe at a time using this action.- Parameters:
deleteProbeRequest-- Returns:
- Result of the DeleteProbe operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
deleteProbe
default DeleteProbeResponse deleteProbe(Consumer<DeleteProbeRequest.Builder> deleteProbeRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Deletes the specified probe. Once a probe is deleted you'll no longer incur any billing fees for that probe.
This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs. You can only delete a single probe at a time using this action.
This is a convenience which creates an instance of the
DeleteProbeRequest.Builderavoiding the need to create one manually viaDeleteProbeRequest.builder()- Parameters:
deleteProbeRequest- AConsumerthat will call methods onDeleteProbeRequest.Builderto create a request.- Returns:
- Result of the DeleteProbe operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
getMonitor
default GetMonitorResponse getMonitor(GetMonitorRequest getMonitorRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
Returns details about a specific monitor.
This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names.- Parameters:
getMonitorRequest-- Returns:
- Result of the GetMonitor operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
getMonitor
default GetMonitorResponse getMonitor(Consumer<GetMonitorRequest.Builder> getMonitorRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
Returns details about a specific monitor.
This action requires the
monitorNameparameter. RunListMonitorsto get a list of monitor names.
This is a convenience which creates an instance of the
GetMonitorRequest.Builderavoiding the need to create one manually viaGetMonitorRequest.builder()- Parameters:
getMonitorRequest- AConsumerthat will call methods onGetMonitorRequest.Builderto create a request.- Returns:
- Result of the GetMonitor operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
getProbe
default GetProbeResponse getProbe(GetProbeRequest getProbeRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
Returns the details about a probe. This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs.- Parameters:
getProbeRequest-- Returns:
- Result of the GetProbe operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
getProbe
default GetProbeResponse getProbe(Consumer<GetProbeRequest.Builder> getProbeRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
Returns the details about a probe. This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs.
This is a convenience which creates an instance of the
GetProbeRequest.Builderavoiding the need to create one manually viaGetProbeRequest.builder()- Parameters:
getProbeRequest- AConsumerthat will call methods onGetProbeRequest.Builderto create a request.- Returns:
- Result of the GetProbe operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
listMonitors
default ListMonitorsResponse listMonitors(ListMonitorsRequest listMonitorsRequest) throws AccessDeniedException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
Returns a list of all of your monitors.
- Parameters:
listMonitorsRequest-- Returns:
- Result of the ListMonitors operation returned by the service.
- Throws:
AccessDeniedException- You do not have sufficient access to perform this action.ThrottlingException- The request was denied due to request throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
listMonitors
default ListMonitorsResponse listMonitors(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest) throws AccessDeniedException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
Returns a list of all of your monitors.
This is a convenience which creates an instance of the
ListMonitorsRequest.Builderavoiding the need to create one manually viaListMonitorsRequest.builder()- Parameters:
listMonitorsRequest- AConsumerthat will call methods onListMonitorsRequest.Builderto create a request.- Returns:
- Result of the ListMonitors operation returned by the service.
- Throws:
AccessDeniedException- You do not have sufficient access to perform this action.ThrottlingException- The request was denied due to request throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
listMonitorsPaginator
default ListMonitorsIterable listMonitorsPaginator(ListMonitorsRequest listMonitorsRequest) throws AccessDeniedException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
This is a variant of
listMonitors(software.amazon.awssdk.services.networkmonitor.model.ListMonitorsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsIterable responses = client.listMonitorsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsIterable responses = client .listMonitorsPaginator(request); for (software.amazon.awssdk.services.networkmonitor.model.ListMonitorsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsIterable responses = client.listMonitorsPaginator(request); responses.iterator().forEachRemaining(....);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 iterable that can be used to iterate through all the response pages.
- Throws:
AccessDeniedException- You do not have sufficient access to perform this action.ThrottlingException- The request was denied due to request throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
listMonitorsPaginator
default ListMonitorsIterable listMonitorsPaginator(Consumer<ListMonitorsRequest.Builder> listMonitorsRequest) throws AccessDeniedException, ThrottlingException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, NetworkMonitorException
This is a variant of
listMonitors(software.amazon.awssdk.services.networkmonitor.model.ListMonitorsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsIterable responses = client.listMonitorsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsIterable responses = client .listMonitorsPaginator(request); for (software.amazon.awssdk.services.networkmonitor.model.ListMonitorsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.networkmonitor.paginators.ListMonitorsIterable responses = client.listMonitorsPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listMonitors(software.amazon.awssdk.services.networkmonitor.model.ListMonitorsRequest)operation.
This is a convenience which creates an instance of the
ListMonitorsRequest.Builderavoiding the need to create one manually viaListMonitorsRequest.builder()- Parameters:
listMonitorsRequest- AConsumerthat will call methods onListMonitorsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
AccessDeniedException- You do not have sufficient access to perform this action.ThrottlingException- The request was denied due to request throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, NetworkMonitorException
Lists the tags assigned to this resource.
- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, NetworkMonitorException
Lists the tags assigned to this resource.
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, NetworkMonitorException
Adds key-value pairs to a monitor or probe.
- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, NetworkMonitorException
Adds key-value pairs to a monitor or probe.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, NetworkMonitorException
Removes a key-value pair from a monitor or probe.
- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ConflictException, AwsServiceException, SdkClientException, NetworkMonitorException
Removes a key-value pair from a monitor or probe.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
updateMonitor
default UpdateMonitorResponse updateMonitor(UpdateMonitorRequest updateMonitorRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Updates the
aggregationPeriodfor a monitor. Monitors support anaggregationPeriodof either30or60seconds. This action requires themonitorNameandprobeIdparameter. RunListMonitorsto get a list of monitor names.- Parameters:
updateMonitorRequest-- Returns:
- Result of the UpdateMonitor operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
updateMonitor
default UpdateMonitorResponse updateMonitor(Consumer<UpdateMonitorRequest.Builder> updateMonitorRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Updates the
aggregationPeriodfor a monitor. Monitors support anaggregationPeriodof either30or60seconds. This action requires themonitorNameandprobeIdparameter. RunListMonitorsto get a list of monitor names.
This is a convenience which creates an instance of the
UpdateMonitorRequest.Builderavoiding the need to create one manually viaUpdateMonitorRequest.builder()- Parameters:
updateMonitorRequest- AConsumerthat will call methods onUpdateMonitorRequest.Builderto create a request.- Returns:
- Result of the UpdateMonitor operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
updateProbe
default UpdateProbeResponse updateProbe(UpdateProbeRequest updateProbeRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Updates a monitor probe. This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs.You can update the following para create a monitor with probes using this command. For each probe, you define the following:
-
state—The state of the probe. -
destination— The target destination IP address for the probe. -
destinationPort—Required only if the protocol isTCP. -
protocol—The communication protocol between the source and destination. This will be eitherTCPorICMP. -
packetSize—The size of the packets. This must be a number between56and8500. -
(Optional)
tags—Key-value pairs created and assigned to the probe.
- Parameters:
updateProbeRequest-- Returns:
- Result of the UpdateProbe operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
-
updateProbe
default UpdateProbeResponse updateProbe(Consumer<UpdateProbeRequest.Builder> updateProbeRequest) throws AccessDeniedException, ResourceNotFoundException, ThrottlingException, ValidationException, InternalServerException, ServiceQuotaExceededException, AwsServiceException, SdkClientException, NetworkMonitorException
Updates a monitor probe. This action requires both the
monitorNameandprobeIdparameters. RunListMonitorsto get a list of monitor names. RunGetMonitorto get a list of probes and probe IDs.You can update the following para create a monitor with probes using this command. For each probe, you define the following:
-
state—The state of the probe. -
destination— The target destination IP address for the probe. -
destinationPort—Required only if the protocol isTCP. -
protocol—The communication protocol between the source and destination. This will be eitherTCPorICMP. -
packetSize—The size of the packets. This must be a number between56and8500. -
(Optional)
tags—Key-value pairs created and assigned to the probe.
This is a convenience which creates an instance of the
UpdateProbeRequest.Builderavoiding the need to create one manually viaUpdateProbeRequest.builder()- Parameters:
updateProbeRequest- AConsumerthat will call methods onUpdateProbeRequest.Builderto create a request.- Returns:
- Result of the UpdateProbe operation returned by the service.
- Throws:
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 throttlingValidationException- 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.AwsServiceException- See Also:
- AWS API Documentation
-
-
create
static NetworkMonitorClient create()
Create aNetworkMonitorClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static NetworkMonitorClientBuilder builder()
Create a builder that can be used to configure and create aNetworkMonitorClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default NetworkMonitorServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-