Skip to content

Commit 75d990f

Browse files
author
awstools
committed
feat(client-internetmonitor): This update introduces the GetInternetEvent and ListInternetEvents APIs, which provide access to internet events displayed on the Amazon CloudWatch Internet Weather Map.
1 parent 65475aa commit 75d990f

File tree

13 files changed

+1181
-24
lines changed

13 files changed

+1181
-24
lines changed

clients/client-internetmonitor/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,14 @@ GetHealthEvent
241241

242242
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/internetmonitor/command/GetHealthEventCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-internetmonitor/Interface/GetHealthEventCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-internetmonitor/Interface/GetHealthEventCommandOutput/)
243243

244+
</details>
245+
<details>
246+
<summary>
247+
GetInternetEvent
248+
</summary>
249+
250+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/internetmonitor/command/GetInternetEventCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-internetmonitor/Interface/GetInternetEventCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-internetmonitor/Interface/GetInternetEventCommandOutput/)
251+
244252
</details>
245253
<details>
246254
<summary>
@@ -273,6 +281,14 @@ ListHealthEvents
273281

274282
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/internetmonitor/command/ListHealthEventsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-internetmonitor/Interface/ListHealthEventsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-internetmonitor/Interface/ListHealthEventsCommandOutput/)
275283

284+
</details>
285+
<details>
286+
<summary>
287+
ListInternetEvents
288+
</summary>
289+
290+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/internetmonitor/command/ListInternetEventsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-internetmonitor/Interface/ListInternetEventsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-internetmonitor/Interface/ListInternetEventsCommandOutput/)
291+
276292
</details>
277293
<details>
278294
<summary>

clients/client-internetmonitor/src/InternetMonitor.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ import {
1717
GetHealthEventCommandInput,
1818
GetHealthEventCommandOutput,
1919
} from "./commands/GetHealthEventCommand";
20+
import {
21+
GetInternetEventCommand,
22+
GetInternetEventCommandInput,
23+
GetInternetEventCommandOutput,
24+
} from "./commands/GetInternetEventCommand";
2025
import { GetMonitorCommand, GetMonitorCommandInput, GetMonitorCommandOutput } from "./commands/GetMonitorCommand";
2126
import {
2227
GetQueryResultsCommand,
@@ -33,6 +38,11 @@ import {
3338
ListHealthEventsCommandInput,
3439
ListHealthEventsCommandOutput,
3540
} from "./commands/ListHealthEventsCommand";
41+
import {
42+
ListInternetEventsCommand,
43+
ListInternetEventsCommandInput,
44+
ListInternetEventsCommandOutput,
45+
} from "./commands/ListInternetEventsCommand";
3646
import {
3747
ListMonitorsCommand,
3848
ListMonitorsCommandInput,
@@ -62,10 +72,12 @@ const commands = {
6272
CreateMonitorCommand,
6373
DeleteMonitorCommand,
6474
GetHealthEventCommand,
75+
GetInternetEventCommand,
6576
GetMonitorCommand,
6677
GetQueryResultsCommand,
6778
GetQueryStatusCommand,
6879
ListHealthEventsCommand,
80+
ListInternetEventsCommand,
6981
ListMonitorsCommand,
7082
ListTagsForResourceCommand,
7183
StartQueryCommand,
@@ -112,6 +124,23 @@ export interface InternetMonitor {
112124
cb: (err: any, data?: GetHealthEventCommandOutput) => void
113125
): void;
114126

127+
/**
128+
* @see {@link GetInternetEventCommand}
129+
*/
130+
getInternetEvent(
131+
args: GetInternetEventCommandInput,
132+
options?: __HttpHandlerOptions
133+
): Promise<GetInternetEventCommandOutput>;
134+
getInternetEvent(
135+
args: GetInternetEventCommandInput,
136+
cb: (err: any, data?: GetInternetEventCommandOutput) => void
137+
): void;
138+
getInternetEvent(
139+
args: GetInternetEventCommandInput,
140+
options: __HttpHandlerOptions,
141+
cb: (err: any, data?: GetInternetEventCommandOutput) => void
142+
): void;
143+
115144
/**
116145
* @see {@link GetMonitorCommand}
117146
*/
@@ -168,6 +197,24 @@ export interface InternetMonitor {
168197
cb: (err: any, data?: ListHealthEventsCommandOutput) => void
169198
): void;
170199

200+
/**
201+
* @see {@link ListInternetEventsCommand}
202+
*/
203+
listInternetEvents(): Promise<ListInternetEventsCommandOutput>;
204+
listInternetEvents(
205+
args: ListInternetEventsCommandInput,
206+
options?: __HttpHandlerOptions
207+
): Promise<ListInternetEventsCommandOutput>;
208+
listInternetEvents(
209+
args: ListInternetEventsCommandInput,
210+
cb: (err: any, data?: ListInternetEventsCommandOutput) => void
211+
): void;
212+
listInternetEvents(
213+
args: ListInternetEventsCommandInput,
214+
options: __HttpHandlerOptions,
215+
cb: (err: any, data?: ListInternetEventsCommandOutput) => void
216+
): void;
217+
171218
/**
172219
* @see {@link ListMonitorsCommand}
173220
*/

clients/client-internetmonitor/src/InternetMonitorClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ import {
5656
import { CreateMonitorCommandInput, CreateMonitorCommandOutput } from "./commands/CreateMonitorCommand";
5757
import { DeleteMonitorCommandInput, DeleteMonitorCommandOutput } from "./commands/DeleteMonitorCommand";
5858
import { GetHealthEventCommandInput, GetHealthEventCommandOutput } from "./commands/GetHealthEventCommand";
59+
import { GetInternetEventCommandInput, GetInternetEventCommandOutput } from "./commands/GetInternetEventCommand";
5960
import { GetMonitorCommandInput, GetMonitorCommandOutput } from "./commands/GetMonitorCommand";
6061
import { GetQueryResultsCommandInput, GetQueryResultsCommandOutput } from "./commands/GetQueryResultsCommand";
6162
import { GetQueryStatusCommandInput, GetQueryStatusCommandOutput } from "./commands/GetQueryStatusCommand";
6263
import { ListHealthEventsCommandInput, ListHealthEventsCommandOutput } from "./commands/ListHealthEventsCommand";
64+
import { ListInternetEventsCommandInput, ListInternetEventsCommandOutput } from "./commands/ListInternetEventsCommand";
6365
import { ListMonitorsCommandInput, ListMonitorsCommandOutput } from "./commands/ListMonitorsCommand";
6466
import {
6567
ListTagsForResourceCommandInput,
@@ -88,10 +90,12 @@ export type ServiceInputTypes =
8890
| CreateMonitorCommandInput
8991
| DeleteMonitorCommandInput
9092
| GetHealthEventCommandInput
93+
| GetInternetEventCommandInput
9194
| GetMonitorCommandInput
9295
| GetQueryResultsCommandInput
9396
| GetQueryStatusCommandInput
9497
| ListHealthEventsCommandInput
98+
| ListInternetEventsCommandInput
9599
| ListMonitorsCommandInput
96100
| ListTagsForResourceCommandInput
97101
| StartQueryCommandInput
@@ -107,10 +111,12 @@ export type ServiceOutputTypes =
107111
| CreateMonitorCommandOutput
108112
| DeleteMonitorCommandOutput
109113
| GetHealthEventCommandOutput
114+
| GetInternetEventCommandOutput
110115
| GetMonitorCommandOutput
111116
| GetQueryResultsCommandOutput
112117
| GetQueryStatusCommandOutput
113118
| ListHealthEventsCommandOutput
119+
| ListInternetEventsCommandOutput
114120
| ListMonitorsCommandOutput
115121
| ListTagsForResourceCommandOutput
116122
| StartQueryCommandOutput

clients/client-internetmonitor/src/commands/GetHealthEventCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface GetHealthEventCommandInput extends GetHealthEventInput {}
2727
export interface GetHealthEventCommandOutput extends GetHealthEventOutput, __MetadataBearer {}
2828

2929
/**
30-
* <p>Gets information the Amazon CloudWatch Internet Monitor has created and stored about a health event for a specified monitor. This information includes the impacted locations,
30+
* <p>Gets information that Amazon CloudWatch Internet Monitor has created and stored about a health event for a specified monitor. This information includes the impacted locations,
3131
* and all the information related to the event, by location.</p>
3232
* <p>The information returned includes the impact on performance, availability, and round-trip time, information about the network providers (ASNs),
3333
* the event type, and so on.</p>
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { InternetMonitorClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../InternetMonitorClient";
9+
import { GetInternetEventInput, GetInternetEventOutput } from "../models/models_0";
10+
import { de_GetInternetEventCommand, se_GetInternetEventCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link GetInternetEventCommand}.
20+
*/
21+
export interface GetInternetEventCommandInput extends GetInternetEventInput {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link GetInternetEventCommand}.
26+
*/
27+
export interface GetInternetEventCommandOutput extends GetInternetEventOutput, __MetadataBearer {}
28+
29+
/**
30+
* <p>Gets information that Amazon CloudWatch Internet Monitor has generated about an internet event. Internet Monitor displays information about
31+
* recent global health events, called internet events, on a global outages map that is available to all Amazon Web Services
32+
* customers. </p>
33+
* <p>The information returned here includes the impacted location,
34+
* when the event started and (if the event is over) ended, the type of event (<code>PERFORMANCE</code> or <code>AVAILABILITY</code>),
35+
* and the status (<code>ACTIVE</code> or <code>RESOLVED</code>).</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { InternetMonitorClient, GetInternetEventCommand } from "@aws-sdk/client-internetmonitor"; // ES Modules import
40+
* // const { InternetMonitorClient, GetInternetEventCommand } = require("@aws-sdk/client-internetmonitor"); // CommonJS import
41+
* const client = new InternetMonitorClient(config);
42+
* const input = { // GetInternetEventInput
43+
* EventId: "STRING_VALUE", // required
44+
* };
45+
* const command = new GetInternetEventCommand(input);
46+
* const response = await client.send(command);
47+
* // { // GetInternetEventOutput
48+
* // EventId: "STRING_VALUE", // required
49+
* // EventArn: "STRING_VALUE", // required
50+
* // StartedAt: new Date("TIMESTAMP"), // required
51+
* // EndedAt: new Date("TIMESTAMP"),
52+
* // ClientLocation: { // ClientLocation
53+
* // ASName: "STRING_VALUE", // required
54+
* // ASNumber: Number("long"), // required
55+
* // Country: "STRING_VALUE", // required
56+
* // Subdivision: "STRING_VALUE",
57+
* // Metro: "STRING_VALUE",
58+
* // City: "STRING_VALUE", // required
59+
* // Latitude: Number("double"), // required
60+
* // Longitude: Number("double"), // required
61+
* // },
62+
* // EventType: "STRING_VALUE", // required
63+
* // EventStatus: "STRING_VALUE", // required
64+
* // };
65+
*
66+
* ```
67+
*
68+
* @param GetInternetEventCommandInput - {@link GetInternetEventCommandInput}
69+
* @returns {@link GetInternetEventCommandOutput}
70+
* @see {@link GetInternetEventCommandInput} for command's `input` shape.
71+
* @see {@link GetInternetEventCommandOutput} for command's `response` shape.
72+
* @see {@link InternetMonitorClientResolvedConfig | config} for InternetMonitorClient's `config` shape.
73+
*
74+
* @throws {@link AccessDeniedException} (client fault)
75+
* <p>You don't have sufficient permission to perform this action.</p>
76+
*
77+
* @throws {@link InternalServerException} (server fault)
78+
* <p>An internal error occurred.</p>
79+
*
80+
* @throws {@link ThrottlingException} (client fault)
81+
* <p>The request was denied due to request throttling.</p>
82+
*
83+
* @throws {@link ValidationException} (client fault)
84+
* <p>Invalid request.</p>
85+
*
86+
* @throws {@link InternetMonitorServiceException}
87+
* <p>Base exception class for all service exceptions from InternetMonitor service.</p>
88+
*
89+
* @public
90+
*/
91+
export class GetInternetEventCommand extends $Command
92+
.classBuilder<
93+
GetInternetEventCommandInput,
94+
GetInternetEventCommandOutput,
95+
InternetMonitorClientResolvedConfig,
96+
ServiceInputTypes,
97+
ServiceOutputTypes
98+
>()
99+
.ep({
100+
...commonParams,
101+
})
102+
.m(function (this: any, Command: any, cs: any, config: InternetMonitorClientResolvedConfig, o: any) {
103+
return [
104+
getSerdePlugin(config, this.serialize, this.deserialize),
105+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
106+
];
107+
})
108+
.s("InternetMonitor20210603", "GetInternetEvent", {})
109+
.n("InternetMonitorClient", "GetInternetEventCommand")
110+
.f(void 0, void 0)
111+
.ser(se_GetInternetEventCommand)
112+
.de(de_GetInternetEventCommand)
113+
.build() {}

clients/client-internetmonitor/src/commands/ListHealthEventsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface ListHealthEventsCommandInput extends ListHealthEventsInput {}
2727
export interface ListHealthEventsCommandOutput extends ListHealthEventsOutput, __MetadataBearer {}
2828

2929
/**
30-
* <p>Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. Returns information for health events including the event start and end time and
30+
* <p>Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. Returns information for health events including the event start and end times, and
3131
* the status.</p>
3232
* <note>
3333
* <p>Health events that have start times during the time frame that is requested are not included in the list of health events.</p>

0 commit comments

Comments
 (0)