Skip to content

Commit 6eeb9ba

Browse files
author
awstools
committed
feat(client-medialive): Add 3 API operations for fetching alerts: ListAlerts (Channels), ListClusterAlerts (MediaLive Anywhere), and ListMultiplexAlerts
1 parent 31c97f5 commit 6eeb9ba

22 files changed

+2011
-294
lines changed

clients/client-medialive/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,14 @@ GetSignalMap
722722

723723
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/medialive/command/GetSignalMapCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/GetSignalMapCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/GetSignalMapCommandOutput/)
724724

725+
</details>
726+
<details>
727+
<summary>
728+
ListAlerts
729+
</summary>
730+
731+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/medialive/command/ListAlertsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListAlertsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListAlertsCommandOutput/)
732+
725733
</details>
726734
<details>
727735
<summary>
@@ -754,6 +762,14 @@ ListCloudWatchAlarmTemplates
754762

755763
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/medialive/command/ListCloudWatchAlarmTemplatesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListCloudWatchAlarmTemplatesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListCloudWatchAlarmTemplatesCommandOutput/)
756764

765+
</details>
766+
<details>
767+
<summary>
768+
ListClusterAlerts
769+
</summary>
770+
771+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/medialive/command/ListClusterAlertsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListClusterAlertsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListClusterAlertsCommandOutput/)
772+
757773
</details>
758774
<details>
759775
<summary>
@@ -810,6 +826,14 @@ ListInputSecurityGroups
810826

811827
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/medialive/command/ListInputSecurityGroupsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListInputSecurityGroupsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListInputSecurityGroupsCommandOutput/)
812828

829+
</details>
830+
<details>
831+
<summary>
832+
ListMultiplexAlerts
833+
</summary>
834+
835+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/medialive/command/ListMultiplexAlertsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListMultiplexAlertsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-medialive/Interface/ListMultiplexAlertsCommandOutput/)
836+
813837
</details>
814838
<details>
815839
<summary>

clients/client-medialive/src/MediaLive.ts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ import {
287287
GetSignalMapCommandInput,
288288
GetSignalMapCommandOutput,
289289
} from "./commands/GetSignalMapCommand";
290+
import { ListAlertsCommand, ListAlertsCommandInput, ListAlertsCommandOutput } from "./commands/ListAlertsCommand";
290291
import {
291292
ListChannelPlacementGroupsCommand,
292293
ListChannelPlacementGroupsCommandInput,
@@ -307,6 +308,11 @@ import {
307308
ListCloudWatchAlarmTemplatesCommandInput,
308309
ListCloudWatchAlarmTemplatesCommandOutput,
309310
} from "./commands/ListCloudWatchAlarmTemplatesCommand";
311+
import {
312+
ListClusterAlertsCommand,
313+
ListClusterAlertsCommandInput,
314+
ListClusterAlertsCommandOutput,
315+
} from "./commands/ListClusterAlertsCommand";
310316
import {
311317
ListClustersCommand,
312318
ListClustersCommandInput,
@@ -338,6 +344,11 @@ import {
338344
ListInputSecurityGroupsCommandInput,
339345
ListInputSecurityGroupsCommandOutput,
340346
} from "./commands/ListInputSecurityGroupsCommand";
347+
import {
348+
ListMultiplexAlertsCommand,
349+
ListMultiplexAlertsCommandInput,
350+
ListMultiplexAlertsCommandOutput,
351+
} from "./commands/ListMultiplexAlertsCommand";
341352
import {
342353
ListMultiplexesCommand,
343354
ListMultiplexesCommandInput,
@@ -610,17 +621,20 @@ const commands = {
610621
GetEventBridgeRuleTemplateCommand,
611622
GetEventBridgeRuleTemplateGroupCommand,
612623
GetSignalMapCommand,
624+
ListAlertsCommand,
613625
ListChannelPlacementGroupsCommand,
614626
ListChannelsCommand,
615627
ListCloudWatchAlarmTemplateGroupsCommand,
616628
ListCloudWatchAlarmTemplatesCommand,
629+
ListClusterAlertsCommand,
617630
ListClustersCommand,
618631
ListEventBridgeRuleTemplateGroupsCommand,
619632
ListEventBridgeRuleTemplatesCommand,
620633
ListInputDevicesCommand,
621634
ListInputDeviceTransfersCommand,
622635
ListInputsCommand,
623636
ListInputSecurityGroupsCommand,
637+
ListMultiplexAlertsCommand,
624638
ListMultiplexesCommand,
625639
ListMultiplexProgramsCommand,
626640
ListNetworksCommand,
@@ -1640,6 +1654,17 @@ export interface MediaLive {
16401654
cb: (err: any, data?: GetSignalMapCommandOutput) => void
16411655
): void;
16421656

1657+
/**
1658+
* @see {@link ListAlertsCommand}
1659+
*/
1660+
listAlerts(args: ListAlertsCommandInput, options?: __HttpHandlerOptions): Promise<ListAlertsCommandOutput>;
1661+
listAlerts(args: ListAlertsCommandInput, cb: (err: any, data?: ListAlertsCommandOutput) => void): void;
1662+
listAlerts(
1663+
args: ListAlertsCommandInput,
1664+
options: __HttpHandlerOptions,
1665+
cb: (err: any, data?: ListAlertsCommandOutput) => void
1666+
): void;
1667+
16431668
/**
16441669
* @see {@link ListChannelPlacementGroupsCommand}
16451670
*/
@@ -1705,6 +1730,23 @@ export interface MediaLive {
17051730
cb: (err: any, data?: ListCloudWatchAlarmTemplatesCommandOutput) => void
17061731
): void;
17071732

1733+
/**
1734+
* @see {@link ListClusterAlertsCommand}
1735+
*/
1736+
listClusterAlerts(
1737+
args: ListClusterAlertsCommandInput,
1738+
options?: __HttpHandlerOptions
1739+
): Promise<ListClusterAlertsCommandOutput>;
1740+
listClusterAlerts(
1741+
args: ListClusterAlertsCommandInput,
1742+
cb: (err: any, data?: ListClusterAlertsCommandOutput) => void
1743+
): void;
1744+
listClusterAlerts(
1745+
args: ListClusterAlertsCommandInput,
1746+
options: __HttpHandlerOptions,
1747+
cb: (err: any, data?: ListClusterAlertsCommandOutput) => void
1748+
): void;
1749+
17081750
/**
17091751
* @see {@link ListClustersCommand}
17101752
*/
@@ -1818,6 +1860,23 @@ export interface MediaLive {
18181860
cb: (err: any, data?: ListInputSecurityGroupsCommandOutput) => void
18191861
): void;
18201862

1863+
/**
1864+
* @see {@link ListMultiplexAlertsCommand}
1865+
*/
1866+
listMultiplexAlerts(
1867+
args: ListMultiplexAlertsCommandInput,
1868+
options?: __HttpHandlerOptions
1869+
): Promise<ListMultiplexAlertsCommandOutput>;
1870+
listMultiplexAlerts(
1871+
args: ListMultiplexAlertsCommandInput,
1872+
cb: (err: any, data?: ListMultiplexAlertsCommandOutput) => void
1873+
): void;
1874+
listMultiplexAlerts(
1875+
args: ListMultiplexAlertsCommandInput,
1876+
options: __HttpHandlerOptions,
1877+
cb: (err: any, data?: ListMultiplexAlertsCommandOutput) => void
1878+
): void;
1879+
18211880
/**
18221881
* @see {@link ListMultiplexesCommand}
18231882
*/

clients/client-medialive/src/MediaLiveClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ import {
206206
GetEventBridgeRuleTemplateGroupCommandOutput,
207207
} from "./commands/GetEventBridgeRuleTemplateGroupCommand";
208208
import { GetSignalMapCommandInput, GetSignalMapCommandOutput } from "./commands/GetSignalMapCommand";
209+
import { ListAlertsCommandInput, ListAlertsCommandOutput } from "./commands/ListAlertsCommand";
209210
import {
210211
ListChannelPlacementGroupsCommandInput,
211212
ListChannelPlacementGroupsCommandOutput,
@@ -219,6 +220,7 @@ import {
219220
ListCloudWatchAlarmTemplatesCommandInput,
220221
ListCloudWatchAlarmTemplatesCommandOutput,
221222
} from "./commands/ListCloudWatchAlarmTemplatesCommand";
223+
import { ListClusterAlertsCommandInput, ListClusterAlertsCommandOutput } from "./commands/ListClusterAlertsCommand";
222224
import { ListClustersCommandInput, ListClustersCommandOutput } from "./commands/ListClustersCommand";
223225
import {
224226
ListEventBridgeRuleTemplateGroupsCommandInput,
@@ -238,6 +240,10 @@ import {
238240
ListInputSecurityGroupsCommandInput,
239241
ListInputSecurityGroupsCommandOutput,
240242
} from "./commands/ListInputSecurityGroupsCommand";
243+
import {
244+
ListMultiplexAlertsCommandInput,
245+
ListMultiplexAlertsCommandOutput,
246+
} from "./commands/ListMultiplexAlertsCommand";
241247
import { ListMultiplexesCommandInput, ListMultiplexesCommandOutput } from "./commands/ListMultiplexesCommand";
242248
import {
243249
ListMultiplexProgramsCommandInput,
@@ -413,17 +419,20 @@ export type ServiceInputTypes =
413419
| GetEventBridgeRuleTemplateCommandInput
414420
| GetEventBridgeRuleTemplateGroupCommandInput
415421
| GetSignalMapCommandInput
422+
| ListAlertsCommandInput
416423
| ListChannelPlacementGroupsCommandInput
417424
| ListChannelsCommandInput
418425
| ListCloudWatchAlarmTemplateGroupsCommandInput
419426
| ListCloudWatchAlarmTemplatesCommandInput
427+
| ListClusterAlertsCommandInput
420428
| ListClustersCommandInput
421429
| ListEventBridgeRuleTemplateGroupsCommandInput
422430
| ListEventBridgeRuleTemplatesCommandInput
423431
| ListInputDeviceTransfersCommandInput
424432
| ListInputDevicesCommandInput
425433
| ListInputSecurityGroupsCommandInput
426434
| ListInputsCommandInput
435+
| ListMultiplexAlertsCommandInput
427436
| ListMultiplexProgramsCommandInput
428437
| ListMultiplexesCommandInput
429438
| ListNetworksCommandInput
@@ -538,17 +547,20 @@ export type ServiceOutputTypes =
538547
| GetEventBridgeRuleTemplateCommandOutput
539548
| GetEventBridgeRuleTemplateGroupCommandOutput
540549
| GetSignalMapCommandOutput
550+
| ListAlertsCommandOutput
541551
| ListChannelPlacementGroupsCommandOutput
542552
| ListChannelsCommandOutput
543553
| ListCloudWatchAlarmTemplateGroupsCommandOutput
544554
| ListCloudWatchAlarmTemplatesCommandOutput
555+
| ListClusterAlertsCommandOutput
545556
| ListClustersCommandOutput
546557
| ListEventBridgeRuleTemplateGroupsCommandOutput
547558
| ListEventBridgeRuleTemplatesCommandOutput
548559
| ListInputDeviceTransfersCommandOutput
549560
| ListInputDevicesCommandOutput
550561
| ListInputSecurityGroupsCommandOutput
551562
| ListInputsCommandOutput
563+
| ListMultiplexAlertsCommandOutput
552564
| ListMultiplexProgramsCommandOutput
553565
| ListMultiplexesCommandOutput
554566
| ListNetworksCommandOutput

clients/client-medialive/src/commands/BatchDeleteCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { MediaLiveClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaLiveClient";
9-
import { BatchDeleteRequest, BatchDeleteResponse } from "../models/models_1";
9+
import { BatchDeleteRequest, BatchDeleteResponse } from "../models/models_2";
1010
import { de_BatchDeleteCommand, se_BatchDeleteCommand } from "../protocols/Aws_restJson1";
1111

1212
/**
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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 { MediaLiveClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaLiveClient";
9+
import { ListAlertsRequest, ListAlertsResponse } from "../models/models_2";
10+
import { de_ListAlertsCommand, se_ListAlertsCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link ListAlertsCommand}.
21+
*/
22+
export interface ListAlertsCommandInput extends ListAlertsRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link ListAlertsCommand}.
27+
*/
28+
export interface ListAlertsCommandOutput extends ListAlertsResponse, __MetadataBearer {}
29+
30+
/**
31+
* List the alerts for a channel with optional filtering based on alert state.
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { MediaLiveClient, ListAlertsCommand } from "@aws-sdk/client-medialive"; // ES Modules import
36+
* // const { MediaLiveClient, ListAlertsCommand } = require("@aws-sdk/client-medialive"); // CommonJS import
37+
* // import type { MediaLiveClientConfig } from "@aws-sdk/client-medialive";
38+
* const config = {}; // type is MediaLiveClientConfig
39+
* const client = new MediaLiveClient(config);
40+
* const input = { // ListAlertsRequest
41+
* ChannelId: "STRING_VALUE", // required
42+
* MaxResults: Number("int"),
43+
* NextToken: "STRING_VALUE",
44+
* StateFilter: "STRING_VALUE",
45+
* };
46+
* const command = new ListAlertsCommand(input);
47+
* const response = await client.send(command);
48+
* // { // ListAlertsResponse
49+
* // Alerts: [ // __listOfChannelAlert
50+
* // { // ChannelAlert
51+
* // AlertType: "STRING_VALUE",
52+
* // ClearedTimestamp: new Date("TIMESTAMP"),
53+
* // Id: "STRING_VALUE",
54+
* // Message: "STRING_VALUE",
55+
* // PipelineId: "STRING_VALUE",
56+
* // SetTimestamp: new Date("TIMESTAMP"),
57+
* // State: "SET" || "CLEARED",
58+
* // },
59+
* // ],
60+
* // NextToken: "STRING_VALUE",
61+
* // };
62+
*
63+
* ```
64+
*
65+
* @param ListAlertsCommandInput - {@link ListAlertsCommandInput}
66+
* @returns {@link ListAlertsCommandOutput}
67+
* @see {@link ListAlertsCommandInput} for command's `input` shape.
68+
* @see {@link ListAlertsCommandOutput} for command's `response` shape.
69+
* @see {@link MediaLiveClientResolvedConfig | config} for MediaLiveClient's `config` shape.
70+
*
71+
* @throws {@link BadGatewayException} (server fault)
72+
* Placeholder documentation for BadGatewayException
73+
*
74+
* @throws {@link BadRequestException} (client fault)
75+
* Placeholder documentation for BadRequestException
76+
*
77+
* @throws {@link ForbiddenException} (client fault)
78+
* Placeholder documentation for ForbiddenException
79+
*
80+
* @throws {@link GatewayTimeoutException} (server fault)
81+
* Placeholder documentation for GatewayTimeoutException
82+
*
83+
* @throws {@link InternalServerErrorException} (server fault)
84+
* Placeholder documentation for InternalServerErrorException
85+
*
86+
* @throws {@link NotFoundException} (client fault)
87+
* Placeholder documentation for NotFoundException
88+
*
89+
* @throws {@link TooManyRequestsException} (client fault)
90+
* Placeholder documentation for TooManyRequestsException
91+
*
92+
* @throws {@link MediaLiveServiceException}
93+
* <p>Base exception class for all service exceptions from MediaLive service.</p>
94+
*
95+
*
96+
* @public
97+
*/
98+
export class ListAlertsCommand extends $Command
99+
.classBuilder<
100+
ListAlertsCommandInput,
101+
ListAlertsCommandOutput,
102+
MediaLiveClientResolvedConfig,
103+
ServiceInputTypes,
104+
ServiceOutputTypes
105+
>()
106+
.ep(commonParams)
107+
.m(function (this: any, Command: any, cs: any, config: MediaLiveClientResolvedConfig, o: any) {
108+
return [
109+
getSerdePlugin(config, this.serialize, this.deserialize),
110+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
111+
];
112+
})
113+
.s("MediaLive", "ListAlerts", {})
114+
.n("MediaLiveClient", "ListAlertsCommand")
115+
.f(void 0, void 0)
116+
.ser(se_ListAlertsCommand)
117+
.de(de_ListAlertsCommand)
118+
.build() {
119+
/** @internal type navigation helper, not in runtime. */
120+
protected declare static __types: {
121+
api: {
122+
input: ListAlertsRequest;
123+
output: ListAlertsResponse;
124+
};
125+
sdk: {
126+
input: ListAlertsCommandInput;
127+
output: ListAlertsCommandOutput;
128+
};
129+
};
130+
}

0 commit comments

Comments
 (0)