We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.NetworkMonitor

Inherits:
AWS.Service show all
Identifier:
networkmonitor
API Version:
2023-08-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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.

Sending a Request Using NetworkMonitor

var networkmonitor = new AWS.NetworkMonitor();
networkmonitor.createMonitor(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the NetworkMonitor object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var networkmonitor = new AWS.NetworkMonitor({apiVersion: '2023-08-01'});

You can also set the API version globally in AWS.config.apiVersions using the networkmonitor service identifier:

AWS.config.apiVersions = {
  networkmonitor: '2023-08-01',
  // other service API versions
};

var networkmonitor = new AWS.NetworkMonitor();

Version:

  • 2023-08-01

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.NetworkMonitor(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a NetworkMonitor object

var networkmonitor = new AWS.NetworkMonitor({apiVersion: '2023-08-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.NetworkMonitor.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.NetworkMonitor.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.NetworkMonitor.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createMonitor(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createMonitor operation

var params = {
  monitorName: 'STRING_VALUE', /* required */
  aggregationPeriod: 'NUMBER_VALUE',
  clientToken: 'STRING_VALUE',
  probes: [
    {
      destination: 'STRING_VALUE', /* required */
      protocol: TCP | ICMP, /* required */
      sourceArn: 'STRING_VALUE', /* required */
      destinationPort: 'NUMBER_VALUE',
      packetSize: 'NUMBER_VALUE',
      probeTags: {
        '<TagKey>': 'STRING_VALUE',
        /* '<TagKey>': ... */
      }
    },
    /* more items */
  ],
  tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
networkmonitor.createMonitor(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • monitorName — (String)

      The name identifying the monitor. It can contain only letters, underscores (_), or dashes (-), and can be up to 200 characters.

    • probes — (Array<map>)

      Displays a list of all of the probes created for a monitor.

      • sourceArnrequired — (String)

        The ARN of the subnet.

      • destinationrequired — (String)

        The destination IP address. This must be either IPV4 or IPV6.

      • destinationPort — (Integer)

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

      • protocolrequired — (String)

        The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.

        Possible values include:
        • "TCP"
        • "ICMP"
      • packetSize — (Integer)

        The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

      • probeTags — (map<String>)

        The list of key-value pairs created and assigned to the monitor.

    • aggregationPeriod — (Integer)

      The time, in seconds, that metrics are aggregated and sent to Amazon CloudWatch. Valid values are either 30 or 60. 60 is the default if no period is chosen.

    • clientToken — (String)

      Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • tags — (map<String>)

      The list of key-value pairs created and assigned to the monitor.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • monitorArn — (String)

        The ARN of the monitor.

      • monitorName — (String)

        The name of the monitor.

      • state — (String)

        The state of the monitor.

        Possible values include:
        • "PENDING"
        • "ACTIVE"
        • "INACTIVE"
        • "ERROR"
        • "DELETING"
      • aggregationPeriod — (Integer)

        The number of seconds that metrics are aggregated by and sent to Amazon CloudWatch. This will be either 30 or 60.

      • tags — (map<String>)

        The list of key-value pairs assigned to the monitor.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createProbe(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createProbe operation

var params = {
  monitorName: 'STRING_VALUE', /* required */
  probe: { /* required */
    destination: 'STRING_VALUE', /* required */
    protocol: TCP | ICMP, /* required */
    sourceArn: 'STRING_VALUE', /* required */
    destinationPort: 'NUMBER_VALUE',
    packetSize: 'NUMBER_VALUE',
    tags: {
      '<TagKey>': 'STRING_VALUE',
      /* '<TagKey>': ... */
    }
  },
  clientToken: 'STRING_VALUE',
  tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
networkmonitor.createProbe(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • monitorName — (String)

      The name of the monitor to associated with the probe.

    • probe — (map)

      Describes the details of an individual probe for a monitor.

      • sourceArnrequired — (String)

        The ARN of the subnet.

      • destinationrequired — (String)

        The destination IP address. This must be either IPV4 or IPV6.

      • destinationPort — (Integer)

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

      • protocolrequired — (String)

        The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.

        Possible values include:
        • "TCP"
        • "ICMP"
      • packetSize — (Integer)

        The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

      • tags — (map<String>)

        The list of key-value pairs created and assigned to the monitor.

    • clientToken — (String)

      Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • tags — (map<String>)

      The list of key-value pairs created and assigned to the probe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • probeId — (String)

        The ID of the probe for which details are returned.

      • probeArn — (String)

        The ARN of the probe.

      • sourceArn — (String)

        The ARN of the probe.

      • destination — (String)

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

      • destinationPort — (Integer)

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

      • protocol — (String)

        The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.

        Possible values include:
        • "TCP"
        • "ICMP"
      • packetSize — (Integer)

        The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

      • addressFamily — (String)

        Indicates whether the IP address is IPV4 or IPV6.

        Possible values include:
        • "IPV4"
        • "IPV6"
      • vpcId — (String)

        The ID of the source VPC or subnet.

      • state — (String)

        The state of the probe.

        Possible values include:
        • "PENDING"
        • "ACTIVE"
        • "INACTIVE"
        • "ERROR"
        • "DELETING"
        • "DELETED"
      • createdAt — (Date)

        The time and date that the probe was created.

      • modifiedAt — (Date)

        The time and date when the probe was last modified.

      • tags — (map<String>)

        The list of key-value pairs assigned to the probe.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteMonitor(params = {}, callback) ⇒ AWS.Request

Deletes a specified monitor.

This action requires the monitorName parameter. Run ListMonitors to get a list of monitor names.

Service Reference:

Examples:

Calling the deleteMonitor operation

var params = {
  monitorName: 'STRING_VALUE' /* required */
};
networkmonitor.deleteMonitor(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • monitorName — (String)

      The name of the monitor to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteProbe(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the deleteProbe operation

var params = {
  monitorName: 'STRING_VALUE', /* required */
  probeId: 'STRING_VALUE' /* required */
};
networkmonitor.deleteProbe(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • monitorName — (String)

      The name of the monitor to delete.

    • probeId — (String)

      The ID of the probe to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMonitor(params = {}, callback) ⇒ AWS.Request

Returns details about a specific monitor.

This action requires the monitorName parameter. Run ListMonitors to get a list of monitor names.

Service Reference:

Examples:

Calling the getMonitor operation

var params = {
  monitorName: 'STRING_VALUE' /* required */
};
networkmonitor.getMonitor(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • monitorName — (String)

      The name of the monitor that details are returned for.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • monitorArn — (String)

        The ARN of the selected monitor.

      • monitorName — (String)

        The name of the monitor.

      • state — (String)

        Lists the status of the state of each monitor.

        Possible values include:
        • "PENDING"
        • "ACTIVE"
        • "INACTIVE"
        • "ERROR"
        • "DELETING"
      • aggregationPeriod — (Integer)

        The aggregation period for the specified monitor.

      • tags — (map<String>)

        The list of key-value pairs assigned to the monitor.

      • probes — (Array<map>)

        The details about each probe associated with that monitor.

        • probeId — (String)

          The ID of the probe.

        • probeArn — (String)

          The ARN of the probe.

        • sourceArnrequired — (String)

          The ARN of the probe source subnet.

        • destinationrequired — (String)

          The destination for the probe. This should be either an IPV4 or IPV6.

        • destinationPort — (Integer)

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

        • protocolrequired — (String)

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

          Possible values include:
          • "TCP"
          • "ICMP"
        • packetSize — (Integer)

          The size of the packets traveling between the source and destination. This must be a number between 56 and

        • addressFamily — (String)

          The IPv4 or IPv6 address for the probe.

          Possible values include:
          • "IPV4"
          • "IPV6"
        • vpcId — (String)

          The ID of the source VPC subnet.

        • state — (String)

          The state of the probe.

          Possible values include:
          • "PENDING"
          • "ACTIVE"
          • "INACTIVE"
          • "ERROR"
          • "DELETING"
          • "DELETED"
        • createdAt — (Date)

          The time and date the probe was created.

        • modifiedAt — (Date)

          The time and date that the probe was last modified.

        • tags — (map<String>)

          The list of key-value pairs created and assigned to the probe.

      • createdAt — (Date)

        The time and date when the monitor was created.

      • modifiedAt — (Date)

        The time and date when the monitor was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getProbe(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getProbe operation

var params = {
  monitorName: 'STRING_VALUE', /* required */
  probeId: 'STRING_VALUE' /* required */
};
networkmonitor.getProbe(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • monitorName — (String)

      The name of the monitor associated with the probe. Run ListMonitors to get a list of monitor names.

    • probeId — (String)

      The ID of the probe to get information about. Run GetMonitor action to get a list of probes and probe IDs for the monitor.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • probeId — (String)

        The ID of the probe for which details are returned.

      • probeArn — (String)

        The ARN of the probe.

      • sourceArn — (String)

        The ARN of the probe.

      • destination — (String)

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

      • destinationPort — (Integer)

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

      • protocol — (String)

        The protocol used for the network traffic between the source and destination. This must be either TCP or ICMP.

        Possible values include:
        • "TCP"
        • "ICMP"
      • packetSize — (Integer)

        The size of the packets sent between the source and destination. This must be a number between 56 and 8500.

      • addressFamily — (String)

        Indicates whether the IP address is IPV4 or IPV6.

        Possible values include:
        • "IPV4"
        • "IPV6"
      • vpcId — (String)

        The ID of the source VPC or subnet.

      • state — (String)

        The state of the probe.

        Possible values include:
        • "PENDING"
        • "ACTIVE"
        • "INACTIVE"
        • "ERROR"
        • "DELETING"
        • "DELETED"
      • createdAt — (Date)

        The time and date that the probe was created.

      • modifiedAt — (Date)

        The time and date that the probe was last modified.

      • tags — (map<String>)

        The list of key-value pairs assigned to the probe.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listMonitors(params = {}, callback) ⇒ AWS.Request

Returns a list of all of your monitors.

Service Reference:

Examples:

Calling the listMonitors operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  state: 'STRING_VALUE'
};
networkmonitor.listMonitors(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • nextToken — (String)

      The token for the next page of results.

    • maxResults — (Integer)

      The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

      If MaxResults is given a value larger than 100, only 100 results are returned.

    • state — (String)

      The list of all monitors and their states.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • monitors — (Array<map>)

        Lists individual details about each of your monitors.

        • monitorArnrequired — (String)

          The ARN of the monitor.

        • monitorNamerequired — (String)

          The name of the monitor.

        • staterequired — (String)

          The state of the monitor.

          Possible values include:
          • "PENDING"
          • "ACTIVE"
          • "INACTIVE"
          • "ERROR"
          • "DELETING"
        • aggregationPeriod — (Integer)

          The time, in seconds, that metrics are collected and sent to Amazon CloudWatch. Valid values are either 30 or 60.

        • tags — (map<String>)

          The list of key-value pairs assigned to the monitor.

      • nextToken — (String)

        The token for the next page of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Lists the tags assigned to this resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE' /* required */
};
networkmonitor.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tags — (map<String>)

        Lists the tags assigned to the resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Adds key-value pairs to a monitor or probe.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
networkmonitor.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the monitor or probe to tag.

    • tags — (map<String>)

      The list of key-value pairs assigned to the monitor or probe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes a key-value pair from a monitor or probe.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
networkmonitor.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The ARN of the monitor or probe that the tag should be removed from.

    • tagKeys — (Array<String>)

      The key-value pa

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateMonitor(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateMonitor operation

var params = {
  aggregationPeriod: 'NUMBER_VALUE', /* required */
  monitorName: 'STRING_VALUE' /* required */
};
networkmonitor.updateMonitor(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • monitorName — (String)

      The name of the monitor to update.

    • aggregationPeriod — (Integer)

      The aggregation time, in seconds, to change to. This must be either 30 or 60.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • monitorArn — (String)

        The ARN of the monitor that was updated.

      • monitorName — (String)

        The name of the monitor that was updated.

      • state — (String)

        The state of the updated monitor.

        Possible values include:
        • "PENDING"
        • "ACTIVE"
        • "INACTIVE"
        • "ERROR"
        • "DELETING"
      • aggregationPeriod — (Integer)

        The changed aggregation period.

      • tags — (map<String>)

        The list of key-value pairs associated with the monitor.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateProbe(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateProbe operation

var params = {
  monitorName: 'STRING_VALUE', /* required */
  probeId: 'STRING_VALUE', /* required */
  destination: 'STRING_VALUE',
  destinationPort: 'NUMBER_VALUE',
  packetSize: 'NUMBER_VALUE',
  protocol: TCP | ICMP,
  state: PENDING | ACTIVE | INACTIVE | ERROR | DELETING | DELETED
};
networkmonitor.updateProbe(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • monitorName — (String)

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

    • probeId — (String)

      The ID of the probe to update.

    • state — (String)

      The state of the probe update.

      Possible values include:
      • "PENDING"
      • "ACTIVE"
      • "INACTIVE"
      • "ERROR"
      • "DELETING"
      • "DELETED"
    • destination — (String)

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

    • destinationPort — (Integer)

      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.

    • protocol — (String)

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

      Possible values include:
      • "TCP"
      • "ICMP"
    • packetSize — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • probeId — (String)

        The updated ID of the probe.

      • probeArn — (String)

        The updated ARN of the probe.

      • sourceArn — (String)

        The updated ARN of the source subnet.

      • destination — (String)

        The updated destination IP address for the probe.

      • destinationPort — (Integer)

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

      • protocol — (String)

        The updated protocol for the probe.

        Possible values include:
        • "TCP"
        • "ICMP"
      • packetSize — (Integer)

        The updated packet size for the probe.

      • addressFamily — (String)

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

        Possible values include:
        • "IPV4"
        • "IPV6"
      • vpcId — (String)

        The updated ID of the source VPC subnet ID.

      • state — (String)

        The state of the updated probe.

        Possible values include:
        • "PENDING"
        • "ACTIVE"
        • "INACTIVE"
        • "ERROR"
        • "DELETING"
        • "DELETED"
      • createdAt — (Date)

        The time and date that the probe was created.

      • modifiedAt — (Date)

        The time and date that the probe was last updated.

      • tags — (map<String>)

        Update tags for a probe.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given NetworkMonitor resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Parameters:

  • state (String)

    the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.

  • params (map) (defaults to: {})

    a list of parameters for the given state. See each waiter resource state for required parameters.

Callback (callback):

  • function(err, data) { ... }

    Callback containing error and data information. See the respective resource state for the expected error or data information.

    If the waiter times out its requests, it will return a ResourceNotReady error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.