UpdateProbeCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { NetworkMonitorClient, UpdateProbeCommand } from "@aws-sdk/client-networkmonitor"; // ES Modules import
// const { NetworkMonitorClient, UpdateProbeCommand } = require("@aws-sdk/client-networkmonitor"); // CommonJS import
const client = new NetworkMonitorClient(config);
const input = { // UpdateProbeInput
  monitorName: "STRING_VALUE", // required
  probeId: "STRING_VALUE", // required
  state: "PENDING" || "ACTIVE" || "INACTIVE" || "ERROR" || "DELETING" || "DELETED",
  destination: "STRING_VALUE",
  destinationPort: Number("int"),
  protocol: "TCP" || "ICMP",
  packetSize: Number("int"),
};
const command = new UpdateProbeCommand(input);
const response = await client.send(command);
// { // UpdateProbeOutput
//   probeId: "STRING_VALUE",
//   probeArn: "STRING_VALUE",
//   sourceArn: "STRING_VALUE", // required
//   destination: "STRING_VALUE", // required
//   destinationPort: Number("int"),
//   protocol: "TCP" || "ICMP", // required
//   packetSize: Number("int"),
//   addressFamily: "IPV4" || "IPV6",
//   vpcId: "STRING_VALUE",
//   state: "PENDING" || "ACTIVE" || "INACTIVE" || "ERROR" || "DELETING" || "DELETED",
//   createdAt: new Date("TIMESTAMP"),
//   modifiedAt: new Date("TIMESTAMP"),
//   tags: { // TagMap
//     "<keys>": "STRING_VALUE",
//   },
// };

UpdateProbeCommand Input

See UpdateProbeCommandInput for more details

Parameter
Type
Description
monitorName
Required
string | undefined

The name of the monitor that the probe was updated for.

probeId
Required
string | undefined

The ID of the probe to update.

destination
string | undefined

The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.

destinationPort
number | undefined

The updated port for the probe destination. This is required only if the protocol is TCP and must be a number between 1 and 65536.

packetSize
number | undefined

he updated packets size for network traffic between the source and destination. This must be a number between 56 and 8500.

protocol
Protocol | undefined

The updated network protocol for the destination. This can be either TCP or ICMP. If the protocol is TCP, then port is also required.

state
ProbeState | undefined

The state of the probe update.

UpdateProbeCommand Output

See UpdateProbeCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
destination
Required
string | undefined

The updated destination IP address for the probe.

protocol
Required
Protocol | undefined

The updated protocol for the probe.

sourceArn
Required
string | undefined

The updated ARN of the source subnet.

addressFamily
AddressFamily | undefined

The updated IP address family. This must be either IPV4 or IPV6.

createdAt
Date | undefined

The time and date that the probe was created.

destinationPort
number | undefined

The updated destination port. This must be a number between 1 and 65536.

modifiedAt
Date | undefined

The time and date that the probe was last updated.

packetSize
number | undefined

The updated packet size for the probe.

probeArn
string | undefined

The updated ARN of the probe.

probeId
string | undefined

The updated ID of the probe.

state
ProbeState | undefined

The state of the updated probe.

tags
Record<string, string> | undefined

Update tags for a probe.

vpcId
string | undefined

The updated ID of the source VPC subnet ID.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

InternalServerException
server

The request processing has failed because of an unknown error, exception or failure.

ResourceNotFoundException
client

The specified resource does not exist.

ServiceQuotaExceededException
client

This request exceeds a service quota.

ThrottlingException
client

The request was denied due to request throttling

ValidationException
client

One of the parameters for the request is not valid.

NetworkMonitorServiceException
Base exception class for all service exceptions from NetworkMonitor service.