From 3d15faa1714b8088dfe67868106e8d74bd669e6a Mon Sep 17 00:00:00 2001 From: kocanaog Date: Thu, 13 Feb 2025 09:25:49 -0500 Subject: [PATCH] Internet Monitor CLI Examples fixed --- .../internetmonitor/create-monitor.rst | 18 +++++ .../internetmonitor/delete-monitor.rst | 10 +++ .../internetmonitor/get-health-event.rst | 71 ++++++++++++++++++ .../internetmonitor/get-internet-event.rst | 29 ++++++++ .../examples/internetmonitor/get-monitor.rst | 24 +++++++ .../internetmonitor/get-query-results.rst | 42 +++++++++++ .../internetmonitor/get-query-status.rst | 15 ++++ .../internetmonitor/list-health-events.rst | 72 +++++++++++++++++++ .../internetmonitor/list-internet-events.rst | 30 ++++++++ .../internetmonitor/list-monitors.rst | 18 +++++ .../list-tags-for-resource.rst | 17 +++++ .../examples/internetmonitor/start-query.rst | 18 +++++ .../examples/internetmonitor/stop-query.rst | 11 +++ .../examples/internetmonitor/tag-resource.rst | 11 +++ .../internetmonitor/untag-resource.rst | 11 +++ .../internetmonitor/update-monitor.rst | 16 +++++ 16 files changed, 413 insertions(+) create mode 100644 awscli/examples/internetmonitor/create-monitor.rst create mode 100644 awscli/examples/internetmonitor/delete-monitor.rst create mode 100644 awscli/examples/internetmonitor/get-health-event.rst create mode 100644 awscli/examples/internetmonitor/get-internet-event.rst create mode 100644 awscli/examples/internetmonitor/get-monitor.rst create mode 100644 awscli/examples/internetmonitor/get-query-results.rst create mode 100644 awscli/examples/internetmonitor/get-query-status.rst create mode 100644 awscli/examples/internetmonitor/list-health-events.rst create mode 100644 awscli/examples/internetmonitor/list-internet-events.rst create mode 100644 awscli/examples/internetmonitor/list-monitors.rst create mode 100644 awscli/examples/internetmonitor/list-tags-for-resource.rst create mode 100644 awscli/examples/internetmonitor/start-query.rst create mode 100644 awscli/examples/internetmonitor/stop-query.rst create mode 100644 awscli/examples/internetmonitor/tag-resource.rst create mode 100644 awscli/examples/internetmonitor/untag-resource.rst create mode 100644 awscli/examples/internetmonitor/update-monitor.rst diff --git a/awscli/examples/internetmonitor/create-monitor.rst b/awscli/examples/internetmonitor/create-monitor.rst new file mode 100644 index 000000000000..8cb768876dc2 --- /dev/null +++ b/awscli/examples/internetmonitor/create-monitor.rst @@ -0,0 +1,18 @@ +**To create a new internet monitor** + +The following ``create-monitor`` example creates a new internet monitor. :: + + aws internetmonitor create-monitor \ + --monitor-name TestMonitor \ + --resources arn:aws:ec2:us-east-1:123456789012:vpc/vpc-123456abcdef \ + --traffic-percentage-to-monitor 100 \ + --internet-measurements-log-delivery S3Config={LogDeliveryStatus=DISABLED} + +Output:: + + { + "Arn": "arn:aws:internetmonitor:us-east-1:123456789012:monitor/TestMonitor", + "Status": "PENDING" + } + +For more information, see `Getting started with Internet Monitor `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/delete-monitor.rst b/awscli/examples/internetmonitor/delete-monitor.rst new file mode 100644 index 000000000000..8fdb5f9cd9c1 --- /dev/null +++ b/awscli/examples/internetmonitor/delete-monitor.rst @@ -0,0 +1,10 @@ +**To delete an existing internet monitor** + +The following ``delete-monitor`` example deletes an existing internet monitor. :: + + aws internetmonitor delete-monitor \ + --monitor-name TestMonitor + +This command produces no output. + +For more information, see `Getting started with Internet Monitor `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/get-health-event.rst b/awscli/examples/internetmonitor/get-health-event.rst new file mode 100644 index 000000000000..00ce17fc17d9 --- /dev/null +++ b/awscli/examples/internetmonitor/get-health-event.rst @@ -0,0 +1,71 @@ +**To describe a health event in a monitor** + +The following ``get-health-event`` example describes an existing health event in a monitor. :: + + aws internetmonitor get-health-event \ + --monitor-name TestTCP \ + --event-id 2024-08-02T00-10-00Z/latency-75732d656173742d313e383037353e556e69746564205374617465733e56697267696e69613e57617368696e67746f6e + +Output:: + + { + "EventArn": "arn:aws:internetmonitor:us-east-1:123456789012:monitor/TestMonitor/health-event/2024-08-02T00-10-00Z/latency-75732d656173742d313e383037353e556e69746564205374617465733e56697267696e69613e57617368696e67746f6e", + "EventId": "2024-08-02T00-10-00Z/latency-75732d656173742d313e383037353e556e69746564205374617465733e56697267696e69613e57617368696e67746f6e", + "StartedAt": "2024-08-02T00:10:00+00:00", + "EndedAt": "2024-08-02T00:15:00+00:00", + "CreatedAt": "2024-08-02T00:27:12+00:00", + "LastUpdatedAt": "2024-08-02T00:32:05+00:00", + "ImpactedLocations": [{ + "ASName": "MICROSOFT-CORP-MSN-AS-BLOCK", + "ASNumber": 8075, + "Country": "United States", + "Subdivision": "Virginia", + "Metro": "Washington, DC (Hagrstwn)", + "City": "Washington", + "Latitude": 38.7095, + "Longitude": -78.1539, + "CountryCode": "US", + "SubdivisionCode": "VA", + "ServiceLocation": "us-east-1", + "Status": "ACTIVE", + "CausedBy": { + "Networks": [{ + "ASName": "MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation", + "ASNumber": 8075 + }], + "AsPath": [{ + "ASName": "Amazon.com", + "ASNumber": 16509 + }, + { + "ASName": "MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation", + "ASNumber": 8075 + } + ], + "NetworkEventType": "Internet" + }, + "InternetHealth": { + "Availability": { + "ExperienceScore": 100, + "PercentOfTotalTrafficImpacted": 0, + "PercentOfClientLocationImpacted": 0 + }, + "Performance": { + "ExperienceScore": 0, + "PercentOfTotalTrafficImpacted": 0.76, + "PercentOfClientLocationImpacted": 100, + "RoundTripTime": { + "P50": 5, + "P90": 73, + "P95": 114 + } + } + } + }], + "Status": "RESOLVED", + "PercentOfTotalTrafficImpacted": 0.76, + "ImpactType": "LOCAL_PERFORMANCE", + "HealthScoreThreshold": 60 + } + +For more information, see `Examples of using the CLI with Internet Monitor `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/get-internet-event.rst b/awscli/examples/internetmonitor/get-internet-event.rst new file mode 100644 index 000000000000..bf1f0b9e129f --- /dev/null +++ b/awscli/examples/internetmonitor/get-internet-event.rst @@ -0,0 +1,29 @@ +**To describe an event reported by an internet monitor** + +The following ``get-internet-event`` example describes the details reported by a specific event in an internet monitor. :: + + aws internetmonitor get-internet-event \ + --event-id ba755fe8-b4de-4e24-8b3b-19267bec227e + +Output:: + + { + "EventId": "ba755fe8-b4de-4e24-8b3b-19267bec227e", + "EventArn": "arn:aws:internetmonitor::123456789012:internet-event/ba755fe8-b4de-4e24-8b3b-19267bec227e", + "StartedAt": "2024-08-27T21:04:00+00:00", + "EndedAt": "2024-08-28T03:30:00+00:00", + "ClientLocation": { + "ASName": "CHARTER-20115", + "ASNumber": 20115, + "Country": "United States", + "Subdivision": "Michigan", + "Metro": "505", + "City": "Fenton", + "Latitude": 42.7893, + "Longitude": -83.7135 + }, + "EventType": "AVAILABILITY", + "EventStatus": "RESOLVED" + } + +For more information, see `Use a monitor in Internet Monitor `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/get-monitor.rst b/awscli/examples/internetmonitor/get-monitor.rst new file mode 100644 index 000000000000..59b12743fb1e --- /dev/null +++ b/awscli/examples/internetmonitor/get-monitor.rst @@ -0,0 +1,24 @@ +**To describe an existing internet monitor** + +The following ``get-monitor`` example describes the configuration of an existing internet monitor. :: + + aws internetmonitor get-monitor \ + --monitor-name TestMonitor + +Output:: + + { + "MonitorName": "TestMonitor", + "MonitorArn": "arn:aws:internetmonitor:us-east-1:123456789012:monitor/TestMonitor", + "Resources": ["arn:aws:ec2:us-east-1:123456789012:vpc/vpc-123456abcdef"], + "Status": "ACTIVE", + "CreatedAt": "2024-08-28T20:10:18+00:00", + "ModifiedAt": "2024-08-28T20:10:18+00:00", + "ProcessingStatus": "COLLECTING_DATA", + "ProcessingStatusInfo": "The monitor is OK and is collecting data-points to produce insights", + "Tags": {}, + "InternetMeasurementsLogDelivery": {}, + "TrafficPercentageToMonitor": 100 + } + +For more information, see `Use a monitor in Internet Monitor `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/get-query-results.rst b/awscli/examples/internetmonitor/get-query-results.rst new file mode 100644 index 000000000000..ab0d71ebe129 --- /dev/null +++ b/awscli/examples/internetmonitor/get-query-results.rst @@ -0,0 +1,42 @@ +**To fetch the results of a query** + +The following ``get-query-results`` example retrieves the results of a query performed in a monitor. :: + + aws internetmonitor get-query-results \ + --monitor-name TestMonitor \ + --query-id AQICAHjE50ADcWtUTXGTlgtIHH4U_u4xxxxxx + +Output:: + + { + "Fields": [{ + "Name": "timestamp", + "Type": "integer" + }, { + "Name": "availability", + "Type": "float" + }, { + "Name": "performance", + "Type": "float" + }, { + "Name": "rtt_p50", + "Type": "bigint" + }, { + "Name": "rtt_p90", + "Type": "bigint" + }, { + "Name": "rtt_p95", + "Type": "bigint" + }, { + "Name": "bytes_in", + "Type": "bigint" + }, { + "Name": "bytes_out", + "Type": "bigint" + }], + "Data": [ + ["1724833200", "100.0", "100.0", "26", "68", "72", "1258", "120"] + ] + } + +For more information, see `Use the Internet Monitor query interface `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/get-query-status.rst b/awscli/examples/internetmonitor/get-query-status.rst new file mode 100644 index 000000000000..989b669e7780 --- /dev/null +++ b/awscli/examples/internetmonitor/get-query-status.rst @@ -0,0 +1,15 @@ +**To describe the status of an existing query** + +The following ``get-query-status`` example retrieves a query's current status in an internet monitor. :: + + aws internetmonitor get-query-status \ + --monitor-name TestTCP \ + --query-id AQICAHjE50ADcWtUTXGTlgtIHH4U_u4xxxxxx + +Output:: + + { + "Status": "SUCCEEDED" + } + +For more information, see `Use the Internet Monitor query interface `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/list-health-events.rst b/awscli/examples/internetmonitor/list-health-events.rst new file mode 100644 index 000000000000..7f84ba6d8c93 --- /dev/null +++ b/awscli/examples/internetmonitor/list-health-events.rst @@ -0,0 +1,72 @@ +**To list all the health events reported by an internet monitor** + +The following ``list-health-events`` example lists all the health events reported by an internet monitor. :: + + aws internetmonitor list-health-events \ + --monitor-name TestMonitor + +Output:: + + { + "HealthEvents": [{ + "EventArn": "arn:aws:internetmonitor:us-east-1:123456789012:monitor/TestMonitor/health-event/2024-08-02T00-10-00Z/latency-75732d656173742d313e383037353e556e69746564205374617465733e56697267696e69613e57617368696e67746f6e", + "EventId": "2024-08-02T00-10-00Z/latency-75732d656173742d313e383037353e556e69746564205374617465733e56697267696e69613e57617368696e67746f6e", + "StartedAt": "2024-08-02T00:10:00+00:00", + "EndedAt": "2024-08-02T00:15:00+00:00", + "CreatedAt": "2024-08-02T00:27:12+00:00", + "LastUpdatedAt": "2024-08-02T00:32:05+00:00", + "ImpactedLocations": [{ + "ASName": "MICROSOFT-CORP-MSN-AS-BLOCK", + "ASNumber": 8075, + "Country": "United States", + "Subdivision": "Virginia", + "Metro": "Washington, DC (Hagrstwn)", + "City": "Washington", + "Latitude": 38.7095, + "Longitude": -78.1539, + "CountryCode": "US", + "SubdivisionCode": "VA", + "ServiceLocation": "us-east-1", + "Status": "ACTIVE", + "CausedBy": { + "Networks": [{ + "ASName": "MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation", + "ASNumber": 8075 + }], + "AsPath": [{ + "ASName": "Amazon.com", + "ASNumber": 16509 + }, + { + "ASName": "MICROSOFT-CORP-MSN-AS-BLOCK - Microsoft Corporation", + "ASNumber": 8075 + } + ], + "NetworkEventType": "Internet" + }, + "InternetHealth": { + "Availability": { + "ExperienceScore": 100, + "PercentOfTotalTrafficImpacted": 0, + "PercentOfClientLocationImpacted": 0 + }, + "Performance": { + "ExperienceScore": 0, + "PercentOfTotalTrafficImpacted": 0.76, + "PercentOfClientLocationImpacted": 100, + "RoundTripTime": { + "P50": 5, + "P90": 73, + "P95": 114 + } + } + } + }], + "Status": "RESOLVED", + "PercentOfTotalTrafficImpacted": 0.76, + "ImpactType": "LOCAL_PERFORMANCE", + "HealthScoreThreshold": 60 + }] + } + +For more information, see `View health events and metrics in Internet Monitor `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/list-internet-events.rst b/awscli/examples/internetmonitor/list-internet-events.rst new file mode 100644 index 000000000000..7cc0562b6259 --- /dev/null +++ b/awscli/examples/internetmonitor/list-internet-events.rst @@ -0,0 +1,30 @@ +**To list the events reported by an internet monitor** + +The following ``list-internet-events`` example returns all the events reported by an internet monitor. :: + + aws internetmonitor list-internet-events + +Output:: + + { + "InternetEvents": [{ + "EventId": "ba755fe8-b4de-4e24-8b3b-19267bec227e", + "EventArn": "arn:aws:internetmonitor::123456789012:internet-event/ba755fe8-b4de-4e24-8b3b-19267bec227e", + "StartedAt": "2024-08-27T21:04:00+00:00", + "EndedAt": "2024-08-28T03:30:00+00:00", + "ClientLocation": { + "ASName": "CHARTER-20115", + "ASNumber": 20115, + "Country": "United States", + "Subdivision": "Michigan", + "Metro": "505", + "City": "Fenton", + "Latitude": 42.7893, + "Longitude": -83.7135 + }, + "EventType": "AVAILABILITY", + "EventStatus": "RESOLVED" + }] + } + +For more information, see `Using Internet Monitor `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/list-monitors.rst b/awscli/examples/internetmonitor/list-monitors.rst new file mode 100644 index 000000000000..88c51aa8a1c7 --- /dev/null +++ b/awscli/examples/internetmonitor/list-monitors.rst @@ -0,0 +1,18 @@ +**To list all existing internet monitors** + +The following ``list-monitors`` example lists all internet monitors. :: + + aws internetmonitor list-monitors + +Output:: + + { + "Monitors": [{ + "MonitorName": "TestMonitor", + "MonitorArn": "arn:aws:internetmonitor:us-east-1:123456789012:monitor/TestMonitor", + "Status": "ACTIVE", + "ProcessingStatus": "OK" + }] + } + +For more information, see `Examples of using the CLI with Internet Monitor `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/list-tags-for-resource.rst b/awscli/examples/internetmonitor/list-tags-for-resource.rst new file mode 100644 index 000000000000..d3bcdb277571 --- /dev/null +++ b/awscli/examples/internetmonitor/list-tags-for-resource.rst @@ -0,0 +1,17 @@ +**To list the tags associated with an internet monitor** + +The following ``list-tags-for-resource`` example lists the available tags associated with an internet monitor. :: + + aws internetmonitor list-tags-for-resource \ + --resource-arn arn:aws:internetmonitor:us-east-1:123456789012:monitor/TestMonitor + +Output:: + + { + "Tags": { + "Environment": "Prod", + "Type": "App" + } + } + +For more information, see `Tagging your Amazon CloudWatch resources `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/start-query.rst b/awscli/examples/internetmonitor/start-query.rst new file mode 100644 index 000000000000..6e96b1d2a043 --- /dev/null +++ b/awscli/examples/internetmonitor/start-query.rst @@ -0,0 +1,18 @@ +**To start a new query in an internet monitor** + +The following ``start-query`` example starts a new query in an internet monitor. :: + + aws internetmonitor start-query \ + --monitor-name TestMonitor \ + --start-time 2024-08-27T00:00:00Z \ + --end-time 2024-08-28T00:00:00Z \ + --filter-parameters Field=country,Operator=EQUALS,Values="United States" Field=geo,Values=city \ + --query-type TOP_LOCATIONS + +Output:: + + { + "QueryId": "AQICAHjE50ADcWtUTXGTlgtIHH4U_uxxxxxxxx" + } + +For more information, see `Use the Internet Monitor query interface `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/stop-query.rst b/awscli/examples/internetmonitor/stop-query.rst new file mode 100644 index 000000000000..1f55e64f6d86 --- /dev/null +++ b/awscli/examples/internetmonitor/stop-query.rst @@ -0,0 +1,11 @@ +**To stop a running query in an internet monitor** + +The following ``stop-query`` example stops a running query in an internet monitor. :: + + aws internetmonitor stop-query \ + --monitor-name TestMonitor \ + --query-id AQICAHjE50ADcWtUTXGTlgtIHH4U_xxxxxxxx + +This command produces no output. + +For more information, see `Use the Internet Monitor query interface `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/tag-resource.rst b/awscli/examples/internetmonitor/tag-resource.rst new file mode 100644 index 000000000000..2e38fa1d6cbd --- /dev/null +++ b/awscli/examples/internetmonitor/tag-resource.rst @@ -0,0 +1,11 @@ +**To add tags to an internet monitor** + +The following ``tag-resource`` example adds one or more tags to an internet monitor. :: + + aws internetmonitor tag-resource \ + --resource-arn arn:aws:internetmonitor:us-east-1:123456789012:monitor/TestMonitor \ + --tags Environment=Prod,Type=App + +This command produces no output. + +For more information, see `Tagging your Amazon CloudWatch resources `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/untag-resource.rst b/awscli/examples/internetmonitor/untag-resource.rst new file mode 100644 index 000000000000..53662b7d926d --- /dev/null +++ b/awscli/examples/internetmonitor/untag-resource.rst @@ -0,0 +1,11 @@ +**To remove tags from an internet monitor** + +The following ``untag-resource`` example removes one or more tags from an internet monitor. :: + + aws internetmonitor untag-resource \ + --resource-arn arn:aws:internetmonitor:us-east-1:123456789012:monitor/TestMonitor \ + --tag-keys Environment Type + +This command produces no output. + +For more information, see `Tagging your Amazon CloudWatch resources `__ in the *Amazon CloudWatch User Guide*. diff --git a/awscli/examples/internetmonitor/update-monitor.rst b/awscli/examples/internetmonitor/update-monitor.rst new file mode 100644 index 000000000000..38fa66557f7c --- /dev/null +++ b/awscli/examples/internetmonitor/update-monitor.rst @@ -0,0 +1,16 @@ +**To update an existing internet monitor** + +The following ``update-monitor`` example updates an existing internet monitor to monitor an additional resource. :: + + aws internetmonitor update-monitor \ + --monitor-name TestMonitor \ + --resources-to-add arn:aws:ec2:us-east-1:123456789012:vpc/vpc-345678defghi + +Output:: + + { + "MonitorArn": "arn:aws:internetmonitor:us-east-1:123456789012:monitor/TestMonitor", + "Status": "PENDING" + } + +For more information, see `Edit a monitor in Internet Monitor `__ in the *Amazon CloudWatch User Guide*.