Amazon CloudWatch Network Monitor

2023/12/22 - Amazon CloudWatch Network Monitor - 12 new api methods

Changes  CloudWatch Network Monitor is a new service within CloudWatch that will help network administrators and operators continuously monitor network performance metrics such as round-trip-time and packet loss between their AWS-hosted applications and their on-premises locations.

GetProbe (new) Link ¶

Returns the details about a probe. You'll need both the monitorName and probeId .

See also: AWS API Documentation

Request Syntax

client.get_probe(
    monitorName='string',
    probeId='string'
)
type monitorName

string

param monitorName

[REQUIRED]

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

type probeId

string

param probeId

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'probeId': 'string',
    'probeArn': 'string',
    'sourceArn': 'string',
    'destination': 'string',
    'destinationPort': 123,
    'protocol': 'TCP'|'ICMP',
    'packetSize': 123,
    'addressFamily': 'IPV4'|'IPV6',
    'vpcId': 'string',
    'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING'|'DELETED',
    'createdAt': datetime(2015, 1, 1),
    'modifiedAt': datetime(2015, 1, 1),
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • 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 will 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 will be either TCP or ICMP .

    • packetSize (integer) --

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

    • addressFamily (string) --

      Indicates whether the IP address is IPV4 or IPV6 .

    • vpcId (string) --

      The ID of the source VPC or subnet.

    • state (string) --

      The state of the probe.

    • createdAt (datetime) --

      The time and date that the probe was created.

    • modifiedAt (datetime) --

      The time and date that the probe was last modified.

    • tags (dict) --

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

      • (string) --

        • (string) --

DeleteMonitor (new) Link ¶

Deletes a specified monitor.

See also: AWS API Documentation

Request Syntax

client.delete_monitor(
    monitorName='string'
)
type monitorName

string

param monitorName

[REQUIRED]

The name of the monitor to delete. Use the ListMonitors action to get a list of your current monitors.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateProbe (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.update_probe(
    monitorName='string',
    probeId='string',
    state='PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING'|'DELETED',
    destination='string',
    destinationPort=123,
    protocol='TCP'|'ICMP',
    packetSize=123
)
type monitorName

string

param monitorName

[REQUIRED]

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

type probeId

string

param probeId

[REQUIRED]

Run GetMonitor to get a list of probes and probe IDs.

type state

string

param state

The state of the probe update.

type destination

string

param destination

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

type destinationPort

integer

param destinationPort

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 .

type protocol

string

param protocol

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

type packetSize

integer

param packetSize

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

rtype

dict

returns

Response Syntax

{
    'probeId': 'string',
    'probeArn': 'string',
    'sourceArn': 'string',
    'destination': 'string',
    'destinationPort': 123,
    'protocol': 'TCP'|'ICMP',
    'packetSize': 123,
    'addressFamily': 'IPV4'|'IPV6',
    'vpcId': 'string',
    'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING'|'DELETED',
    'createdAt': datetime(2015, 1, 1),
    'modifiedAt': datetime(2015, 1, 1),
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • 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 will be a number between 1 and 65536 .

    • protocol (string) --

      The updated protocol for the probe.

    • packetSize (integer) --

      The updated packet size for the probe.

    • addressFamily (string) --

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

    • vpcId (string) --

      The updated ID of the source VPC subnet ID.

    • state (string) --

      The state of the updated probe.

    • createdAt (datetime) --

      The time and date that the probe was created.

    • modifiedAt (datetime) --

      The time and date that the probe was last updated.

    • tags (dict) --

      Update tags for a probe.

      • (string) --

        • (string) --

UpdateMonitor (new) Link ¶

Updates the aggregationPeriod for a monitor. Monitors support an aggregationPeriod of either 30 or 60 seconds.

See also: AWS API Documentation

Request Syntax

client.update_monitor(
    monitorName='string',
    aggregationPeriod=123
)
type monitorName

string

param monitorName

[REQUIRED]

The name of the monitor to update. Run ListMonitors to get a list of monitor names.

type aggregationPeriod

integer

param aggregationPeriod

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'monitorArn': 'string',
    'monitorName': 'string',
    'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING',
    'aggregationPeriod': 123,
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

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

    • aggregationPeriod (integer) --

      The changed aggregation period.

    • tags (dict) --

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

      • (string) --

        • (string) --

CreateProbe (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.create_probe(
    monitorName='string',
    probe={
        'sourceArn': 'string',
        'destination': 'string',
        'destinationPort': 123,
        'protocol': 'TCP'|'ICMP',
        'packetSize': 123,
        'tags': {
            'string': 'string'
        }
    },
    clientToken='string',
    tags={
        'string': 'string'
    }
)
type monitorName

string

param monitorName

[REQUIRED]

The name of the monitor to associated with the probe. To get a list of available monitors, use ListMonitors .

type probe

dict

param probe

[REQUIRED]

Describes the details of an individual probe for a monitor.

  • sourceArn (string) -- [REQUIRED]

    The ARN of the subnet.

  • destination (string) -- [REQUIRED]

    The destination IP address. This will 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 .

  • protocol (string) -- [REQUIRED]

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

  • packetSize (integer) --

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

  • tags (dict) --

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

    • (string) --

      • (string) --

type clientToken

string

param clientToken

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

This field is autopopulated if not provided.

type tags

dict

param tags

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

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'probeId': 'string',
    'probeArn': 'string',
    'sourceArn': 'string',
    'destination': 'string',
    'destinationPort': 123,
    'protocol': 'TCP'|'ICMP',
    'packetSize': 123,
    'addressFamily': 'IPV4'|'IPV6',
    'vpcId': 'string',
    'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING'|'DELETED',
    'createdAt': datetime(2015, 1, 1),
    'modifiedAt': datetime(2015, 1, 1),
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • 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 will 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 will be either TCP or ICMP .

    • packetSize (integer) --

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

    • addressFamily (string) --

      Indicates whether the IP address is IPV4 or IPV6 .

    • vpcId (string) --

      The ID of the source VPC or subnet.

    • state (string) --

      The state of the probe.

    • createdAt (datetime) --

      The time and date that the probe was created.

    • modifiedAt (datetime) --

      The time and date when the probe was last modified.

    • tags (dict) --

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

      • (string) --

        • (string) --

ListTagsForResource (new) Link ¶

Lists the tags assigned to this resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string'
)
type resourceArn

string

param resourceArn

[REQUIRED]

The

rtype

dict

returns

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • tags (dict) --

      Lists the tags assigned to the resource.

      • (string) --

        • (string) --

DeleteProbe (new) Link ¶

Deletes the specified monitor. Once a probe is deleted you'll no longer incur any billing fees for that probe.

See also: AWS API Documentation

Request Syntax

client.delete_probe(
    monitorName='string',
    probeId='string'
)
type monitorName

string

param monitorName

[REQUIRED]

The name of the monitor to delete. For a list of the available monitors, use the ListMonitors action.

type probeId

string

param probeId

[REQUIRED]

The ID of the probe to delete. Run GetMonitor to get a lst of all probes and probe IDs associated with the monitor.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListMonitors (new) Link ¶

Returns a list of all of your monitors.

See also: AWS API Documentation

Request Syntax

client.list_monitors(
    nextToken='string',
    maxResults=123,
    state='string'
)
type nextToken

string

param nextToken

The token for the next page of results.

type maxResults

integer

param maxResults

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.

type state

string

param state

The list of all monitors and their states.

rtype

dict

returns

Response Syntax

{
    'monitors': [
        {
            'monitorArn': 'string',
            'monitorName': 'string',
            'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING',
            'aggregationPeriod': 123,
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • monitors (list) --

      Lists individual details about each of your monitors.

      • (dict) --

        Displays summary information about a monitor.

        • monitorArn (string) --

          The ARN of the monitor.

        • monitorName (string) --

          The name of the monitor.

        • state (string) --

          The state of the monitor.

        • aggregationPeriod (integer) --

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

        • tags (dict) --

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

          • (string) --

            • (string) --

    • nextToken (string) --

      The token for the next page of results.

GetMonitor (new) Link ¶

Returns details about a specific monitor.

See also: AWS API Documentation

Request Syntax

client.get_monitor(
    monitorName='string'
)
type monitorName

string

param monitorName

[REQUIRED]

The name of the monitor that details are returned for.

rtype

dict

returns

Response Syntax

{
    'monitorArn': 'string',
    'monitorName': 'string',
    'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING',
    'aggregationPeriod': 123,
    'tags': {
        'string': 'string'
    },
    'probes': [
        {
            'probeId': 'string',
            'probeArn': 'string',
            'sourceArn': 'string',
            'destination': 'string',
            'destinationPort': 123,
            'protocol': 'TCP'|'ICMP',
            'packetSize': 123,
            'addressFamily': 'IPV4'|'IPV6',
            'vpcId': 'string',
            'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING'|'DELETED',
            'createdAt': datetime(2015, 1, 1),
            'modifiedAt': datetime(2015, 1, 1),
            'tags': {
                'string': 'string'
            }
        },
    ],
    'createdAt': datetime(2015, 1, 1),
    'modifiedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • monitorArn (string) --

      The ARN of the selected monitor.

    • monitorName (string) --

      The name of the monitor. To get a list of the current monitors and their names, use the ListMonitors action.

    • state (string) --

      Returns a list of the state of each monitor.

    • aggregationPeriod (integer) --

      The aggregation period for the specified monitor.

    • tags (dict) --

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

      • (string) --

        • (string) --

    • probes (list) --

      The details about each probe associated with that monitor.

      • (dict) --

        Describes information about a monitor probe.

        • probeId (string) --

          The ID of the probe.

        • probeArn (string) --

          The ARN of the probe.

        • sourceArn (string) --

          The ARN of the probe source subnet.

        • destination (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 .

        • protocol (string) --

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

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

        • vpcId (string) --

          The ID of the source VPC subnet.

        • state (string) --

          The state of the probe.

        • createdAt (datetime) --

          The time and date the probe was created.

        • modifiedAt (datetime) --

          The time and date that the probe was last modified.

        • tags (dict) --

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

          • (string) --

            • (string) --

    • createdAt (datetime) --

      The time and date when the monitor was created.

    • modifiedAt (datetime) --

      The time and date when the monitor was last modified.

UntagResource (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

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

type tagKeys

list

param tagKeys

[REQUIRED]

The key-value pa

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateMonitor (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.create_monitor(
    monitorName='string',
    probes=[
        {
            'sourceArn': 'string',
            'destination': 'string',
            'destinationPort': 123,
            'protocol': 'TCP'|'ICMP',
            'packetSize': 123,
            'probeTags': {
                'string': 'string'
            }
        },
    ],
    aggregationPeriod=123,
    clientToken='string',
    tags={
        'string': 'string'
    }
)
type monitorName

string

param monitorName

[REQUIRED]

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

type probes

list

param probes

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

  • (dict) --

    Creates a monitor probe.

    • sourceArn (string) -- [REQUIRED]

      The ARN of the subnet.

    • destination (string) -- [REQUIRED]

      The destination IP address. This will 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 .

    • protocol (string) -- [REQUIRED]

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

    • packetSize (integer) --

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

    • probeTags (dict) --

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

      • (string) --

        • (string) --

type aggregationPeriod

integer

param aggregationPeriod

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

type clientToken

string

param clientToken

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

This field is autopopulated if not provided.

type tags

dict

param tags

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

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'monitorArn': 'string',
    'monitorName': 'string',
    'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING',
    'aggregationPeriod': 123,
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • monitorArn (string) --

      The ARN of the monitor.

    • monitorName (string) --

      The name of the monitor.

    • state (string) --

      The state of the monitor.

    • aggregationPeriod (integer) --

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

    • tags (dict) --

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

      • (string) --

        • (string) --

TagResource (new) Link ¶

Adds key-value pairs to a monitor or probe.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the monitor or probe to tag.

type tags

dict

param tags

[REQUIRED]

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

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --