Amazon CloudWatch Internet Monitor

2023/03/31 - Amazon CloudWatch Internet Monitor - 3 updated api methods

Changes  This release adds a new feature for Amazon CloudWatch Internet Monitor that enables customers to deliver internet measurements to Amazon S3 buckets as well as CloudWatch Logs.

CreateMonitor (updated) Link ¶
Changes (request)
{'InternetMeasurementsLogDelivery': {'S3Config': {'BucketName': 'string',
                                                  'BucketPrefix': 'string',
                                                  'LogDeliveryStatus': 'ENABLED '
                                                                       '| '
                                                                       'DISABLED'}}}

Creates a monitor in Amazon CloudWatch Internet Monitor. A monitor is built based on information from the application resources that you add: Amazon Virtual Private Clouds (VPCs), Amazon CloudFront distributions, and WorkSpaces directories. Internet Monitor then publishes internet measurements from Amazon Web Services that are specific to the city-networks , that is, the locations and ASNs (typically internet service providers or ISPs), where clients access your application. For more information, see Using Amazon CloudWatch Internet Monitor in the Amazon CloudWatch User Guide .

When you create a monitor, you set a maximum limit for the number of city-networks where client traffic is monitored. The city-network maximum that you choose is the limit, but you only pay for the number of city-networks that are actually monitored. You can change the maximum at any time by updating your monitor. For more information, see Choosing a city-network maximum value in the Amazon CloudWatch User Guide .

See also: AWS API Documentation

Request Syntax

client.create_monitor(
    MonitorName='string',
    Resources=[
        'string',
    ],
    ClientToken='string',
    Tags={
        'string': 'string'
    },
    MaxCityNetworksToMonitor=123,
    InternetMeasurementsLogDelivery={
        'S3Config': {
            'BucketName': 'string',
            'BucketPrefix': 'string',
            'LogDeliveryStatus': 'ENABLED'|'DISABLED'
        }
    }
)
type MonitorName

string

param MonitorName

[REQUIRED]

The name of the monitor.

type Resources

list

param Resources

The resources to include in a monitor, which you provide as a set of Amazon Resource Names (ARNs).

You can add a combination of Amazon Virtual Private Clouds (VPCs) and Amazon CloudFront distributions, or you can add Amazon WorkSpaces directories. You can't add all three types of resources.

Note

If you add only VPC resources, at least one VPC must have an Internet Gateway attached to it, to make sure that it has internet connectivity.

  • (string) --

type ClientToken

string

param ClientToken

A unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don't reuse the same client token for other API requests.

This field is autopopulated if not provided.

type Tags

dict

param Tags

The tags for a monitor. You can add a maximum of 50 tags in Internet Monitor.

  • (string) --

    • (string) --

type MaxCityNetworksToMonitor

integer

param MaxCityNetworksToMonitor

[REQUIRED]

The maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your application resources from and the network or ASN, such as an internet service provider (ISP), that clients access the resources through. This limit helps control billing costs.

To learn more, see Choosing a city-network maximum value in the Amazon CloudWatch Internet Monitor section of the CloudWatch User Guide .

type InternetMeasurementsLogDelivery

dict

param InternetMeasurementsLogDelivery

Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.

  • S3Config (dict) --

    The configuration information for publishing Internet Monitor internet measurements to Amazon S3. The configuration includes the bucket name and (optionally) prefix for the S3 bucket to store the measurements, and the delivery status. The delivery status is ENABLED or DISABLED , depending on whether you choose to deliver internet measurements to S3 logs.

    • BucketName (string) --

      The Amazon S3 bucket name.

    • BucketPrefix (string) --

      The Amazon S3 bucket prefix.

    • LogDeliveryStatus (string) --

      The status of publishing Internet Monitor internet measurements to an Amazon S3 bucket.

rtype

dict

returns

Response Syntax

{
    'Arn': 'string',
    'Status': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the monitor.

    • Status (string) --

      The status of a monitor.

GetMonitor (updated) Link ¶
Changes (response)
{'InternetMeasurementsLogDelivery': {'S3Config': {'BucketName': 'string',
                                                  'BucketPrefix': 'string',
                                                  'LogDeliveryStatus': 'ENABLED '
                                                                       '| '
                                                                       'DISABLED'}}}

Gets information about a monitor in Amazon CloudWatch Internet Monitor based on a monitor name. The information returned includes the Amazon Resource Name (ARN), create time, modified time, resources included in the monitor, and status information.

See also: AWS API Documentation

Request Syntax

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

string

param MonitorName

[REQUIRED]

The name of the monitor.

rtype

dict

returns

Response Syntax

{
    'MonitorName': 'string',
    'MonitorArn': 'string',
    'Resources': [
        'string',
    ],
    'Status': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR',
    'CreatedAt': datetime(2015, 1, 1),
    'ModifiedAt': datetime(2015, 1, 1),
    'ProcessingStatus': 'OK'|'INACTIVE'|'COLLECTING_DATA'|'INSUFFICIENT_DATA'|'FAULT_SERVICE'|'FAULT_ACCESS_CLOUDWATCH',
    'ProcessingStatusInfo': 'string',
    'Tags': {
        'string': 'string'
    },
    'MaxCityNetworksToMonitor': 123,
    'InternetMeasurementsLogDelivery': {
        'S3Config': {
            'BucketName': 'string',
            'BucketPrefix': 'string',
            'LogDeliveryStatus': 'ENABLED'|'DISABLED'
        }
    }
}

Response Structure

  • (dict) --

    • MonitorName (string) --

      The name of the monitor.

    • MonitorArn (string) --

      The Amazon Resource Name (ARN) of the monitor.

    • Resources (list) --

      The resources that have been added for the monitor. Resources are listed by their Amazon Resource Names (ARNs).

      • (string) --

    • Status (string) --

      The status of the monitor.

    • CreatedAt (datetime) --

      The time when the monitor was created.

    • ModifiedAt (datetime) --

      The last time that the monitor was modified.

    • ProcessingStatus (string) --

      The health of the data processing for the monitor.

    • ProcessingStatusInfo (string) --

      Additional information about the health of the data processing for the monitor.

    • Tags (dict) --

      The tags that have been added to monitor.

      • (string) --

        • (string) --

    • MaxCityNetworksToMonitor (integer) --

      The maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your application resources from and the network or ASN, such as an internet service provider (ISP), that clients access the resources through. This limit helps control billing costs.

      To learn more, see Choosing a city-network maximum value in the Amazon CloudWatch Internet Monitor section of the CloudWatch User Guide .

    • InternetMeasurementsLogDelivery (dict) --

      Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.

      • S3Config (dict) --

        The configuration information for publishing Internet Monitor internet measurements to Amazon S3. The configuration includes the bucket name and (optionally) prefix for the S3 bucket to store the measurements, and the delivery status. The delivery status is ENABLED or DISABLED , depending on whether you choose to deliver internet measurements to S3 logs.

        • BucketName (string) --

          The Amazon S3 bucket name.

        • BucketPrefix (string) --

          The Amazon S3 bucket prefix.

        • LogDeliveryStatus (string) --

          The status of publishing Internet Monitor internet measurements to an Amazon S3 bucket.

UpdateMonitor (updated) Link ¶
Changes (request)
{'InternetMeasurementsLogDelivery': {'S3Config': {'BucketName': 'string',
                                                  'BucketPrefix': 'string',
                                                  'LogDeliveryStatus': 'ENABLED '
                                                                       '| '
                                                                       'DISABLED'}}}

Updates a monitor. You can update a monitor to change the maximum number of city-networks (locations and ASNs or internet service providers), to add or remove resources, or to change the status of the monitor. Note that you can't change the name of a monitor.

The city-network maximum that you choose is the limit, but you only pay for the number of city-networks that are actually monitored. For more information, see Choosing a city-network maximum value in the Amazon CloudWatch User Guide .

See also: AWS API Documentation

Request Syntax

client.update_monitor(
    MonitorName='string',
    ResourcesToAdd=[
        'string',
    ],
    ResourcesToRemove=[
        'string',
    ],
    Status='PENDING'|'ACTIVE'|'INACTIVE'|'ERROR',
    ClientToken='string',
    MaxCityNetworksToMonitor=123,
    InternetMeasurementsLogDelivery={
        'S3Config': {
            'BucketName': 'string',
            'BucketPrefix': 'string',
            'LogDeliveryStatus': 'ENABLED'|'DISABLED'
        }
    }
)
type MonitorName

string

param MonitorName

[REQUIRED]

The name of the monitor.

type ResourcesToAdd

list

param ResourcesToAdd

The resources to include in a monitor, which you provide as a set of Amazon Resource Names (ARNs).

You can add a combination of Amazon Virtual Private Clouds (VPCs) and Amazon CloudFront distributions, or you can add Amazon WorkSpaces directories. You can't add all three types of resources.

Note

If you add only VPC resources, at least one VPC must have an Internet Gateway attached to it, to make sure that it has internet connectivity.

  • (string) --

type ResourcesToRemove

list

param ResourcesToRemove

The resources to remove from a monitor, which you provide as a set of Amazon Resource Names (ARNs).

  • (string) --

type Status

string

param Status

The status for a monitor. The accepted values for Status with the UpdateMonitor API call are the following: ACTIVE and INACTIVE . The following values are not accepted: PENDING , and ERROR .

type ClientToken

string

param ClientToken

A unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. You should not reuse the same client token for other API requests.

This field is autopopulated if not provided.

type MaxCityNetworksToMonitor

integer

param MaxCityNetworksToMonitor

The maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your application resources from and the network or ASN, such as an internet service provider, that clients access the resources through.

type InternetMeasurementsLogDelivery

dict

param InternetMeasurementsLogDelivery

Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.

  • S3Config (dict) --

    The configuration information for publishing Internet Monitor internet measurements to Amazon S3. The configuration includes the bucket name and (optionally) prefix for the S3 bucket to store the measurements, and the delivery status. The delivery status is ENABLED or DISABLED , depending on whether you choose to deliver internet measurements to S3 logs.

    • BucketName (string) --

      The Amazon S3 bucket name.

    • BucketPrefix (string) --

      The Amazon S3 bucket prefix.

    • LogDeliveryStatus (string) --

      The status of publishing Internet Monitor internet measurements to an Amazon S3 bucket.

rtype

dict

returns

Response Syntax

{
    'MonitorArn': 'string',
    'Status': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'
}

Response Structure

  • (dict) --

    • MonitorArn (string) --

      The Amazon Resource Name (ARN) of the monitor.

    • Status (string) --

      The status of a monitor.