Skip to content

Commit 2fb5091

Browse files
author
awstools
committed
feat(client-chime-sdk-messaging): The Amazon Chime SDK now supports channels with up to one million participants with elastic channels.
1 parent f7e4104 commit 2fb5091

File tree

9 files changed

+1099
-23
lines changed

9 files changed

+1099
-23
lines changed

clients/client-chime-sdk-messaging/src/ChimeSDKMessaging.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ import {
177177
ListChannelsModeratedByAppInstanceUserCommandInput,
178178
ListChannelsModeratedByAppInstanceUserCommandOutput,
179179
} from "./commands/ListChannelsModeratedByAppInstanceUserCommand";
180+
import {
181+
ListSubChannelsCommand,
182+
ListSubChannelsCommandInput,
183+
ListSubChannelsCommandOutput,
184+
} from "./commands/ListSubChannelsCommand";
180185
import {
181186
ListTagsForResourceCommand,
182187
ListTagsForResourceCommandInput,
@@ -1673,6 +1678,38 @@ export class ChimeSDKMessaging extends ChimeSDKMessagingClient {
16731678
}
16741679
}
16751680

1681+
/**
1682+
* <p>Lists all the SubChannels in an elastic channel when given a channel ID. Available only to the app instance admins and channel moderators of elastic channels.</p>
1683+
*/
1684+
public listSubChannels(
1685+
args: ListSubChannelsCommandInput,
1686+
options?: __HttpHandlerOptions
1687+
): Promise<ListSubChannelsCommandOutput>;
1688+
public listSubChannels(
1689+
args: ListSubChannelsCommandInput,
1690+
cb: (err: any, data?: ListSubChannelsCommandOutput) => void
1691+
): void;
1692+
public listSubChannels(
1693+
args: ListSubChannelsCommandInput,
1694+
options: __HttpHandlerOptions,
1695+
cb: (err: any, data?: ListSubChannelsCommandOutput) => void
1696+
): void;
1697+
public listSubChannels(
1698+
args: ListSubChannelsCommandInput,
1699+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListSubChannelsCommandOutput) => void),
1700+
cb?: (err: any, data?: ListSubChannelsCommandOutput) => void
1701+
): Promise<ListSubChannelsCommandOutput> | void {
1702+
const command = new ListSubChannelsCommand(args);
1703+
if (typeof optionsOrCb === "function") {
1704+
this.send(command, optionsOrCb);
1705+
} else if (typeof cb === "function") {
1706+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1707+
this.send(command, optionsOrCb || {}, cb);
1708+
} else {
1709+
return this.send(command, optionsOrCb);
1710+
}
1711+
}
1712+
16761713
/**
16771714
* <p>Lists the tags applied to an Amazon Chime SDK messaging resource.</p>
16781715
*/

clients/client-chime-sdk-messaging/src/ChimeSDKMessagingClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ import {
157157
ListChannelsModeratedByAppInstanceUserCommandInput,
158158
ListChannelsModeratedByAppInstanceUserCommandOutput,
159159
} from "./commands/ListChannelsModeratedByAppInstanceUserCommand";
160+
import { ListSubChannelsCommandInput, ListSubChannelsCommandOutput } from "./commands/ListSubChannelsCommand";
160161
import {
161162
ListTagsForResourceCommandInput,
162163
ListTagsForResourceCommandOutput,
@@ -221,6 +222,7 @@ export type ServiceInputTypes =
221222
| ListChannelsAssociatedWithChannelFlowCommandInput
222223
| ListChannelsCommandInput
223224
| ListChannelsModeratedByAppInstanceUserCommandInput
225+
| ListSubChannelsCommandInput
224226
| ListTagsForResourceCommandInput
225227
| PutChannelMembershipPreferencesCommandInput
226228
| RedactChannelMessageCommandInput
@@ -269,6 +271,7 @@ export type ServiceOutputTypes =
269271
| ListChannelsAssociatedWithChannelFlowCommandOutput
270272
| ListChannelsCommandOutput
271273
| ListChannelsModeratedByAppInstanceUserCommandOutput
274+
| ListSubChannelsCommandOutput
272275
| ListTagsForResourceCommandOutput
273276
| PutChannelMembershipPreferencesCommandOutput
274277
| RedactChannelMessageCommandOutput
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import {
16+
ChimeSDKMessagingClientResolvedConfig,
17+
ServiceInputTypes,
18+
ServiceOutputTypes,
19+
} from "../ChimeSDKMessagingClient";
20+
import {
21+
ListSubChannelsRequest,
22+
ListSubChannelsRequestFilterSensitiveLog,
23+
ListSubChannelsResponse,
24+
ListSubChannelsResponseFilterSensitiveLog,
25+
} from "../models/models_0";
26+
import {
27+
deserializeAws_restJson1ListSubChannelsCommand,
28+
serializeAws_restJson1ListSubChannelsCommand,
29+
} from "../protocols/Aws_restJson1";
30+
31+
export interface ListSubChannelsCommandInput extends ListSubChannelsRequest {}
32+
export interface ListSubChannelsCommandOutput extends ListSubChannelsResponse, __MetadataBearer {}
33+
34+
/**
35+
* <p>Lists all the SubChannels in an elastic channel when given a channel ID. Available only to the app instance admins and channel moderators of elastic channels.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { ChimeSDKMessagingClient, ListSubChannelsCommand } from "@aws-sdk/client-chime-sdk-messaging"; // ES Modules import
40+
* // const { ChimeSDKMessagingClient, ListSubChannelsCommand } = require("@aws-sdk/client-chime-sdk-messaging"); // CommonJS import
41+
* const client = new ChimeSDKMessagingClient(config);
42+
* const command = new ListSubChannelsCommand(input);
43+
* const response = await client.send(command);
44+
* ```
45+
*
46+
* @see {@link ListSubChannelsCommandInput} for command's `input` shape.
47+
* @see {@link ListSubChannelsCommandOutput} for command's `response` shape.
48+
* @see {@link ChimeSDKMessagingClientResolvedConfig | config} for ChimeSDKMessagingClient's `config` shape.
49+
*
50+
*/
51+
export class ListSubChannelsCommand extends $Command<
52+
ListSubChannelsCommandInput,
53+
ListSubChannelsCommandOutput,
54+
ChimeSDKMessagingClientResolvedConfig
55+
> {
56+
// Start section: command_properties
57+
// End section: command_properties
58+
59+
constructor(readonly input: ListSubChannelsCommandInput) {
60+
// Start section: command_constructor
61+
super();
62+
// End section: command_constructor
63+
}
64+
65+
/**
66+
* @internal
67+
*/
68+
resolveMiddleware(
69+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
70+
configuration: ChimeSDKMessagingClientResolvedConfig,
71+
options?: __HttpHandlerOptions
72+
): Handler<ListSubChannelsCommandInput, ListSubChannelsCommandOutput> {
73+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
74+
75+
const stack = clientStack.concat(this.middlewareStack);
76+
77+
const { logger } = configuration;
78+
const clientName = "ChimeSDKMessagingClient";
79+
const commandName = "ListSubChannelsCommand";
80+
const handlerExecutionContext: HandlerExecutionContext = {
81+
logger,
82+
clientName,
83+
commandName,
84+
inputFilterSensitiveLog: ListSubChannelsRequestFilterSensitiveLog,
85+
outputFilterSensitiveLog: ListSubChannelsResponseFilterSensitiveLog,
86+
};
87+
const { requestHandler } = configuration;
88+
return stack.resolve(
89+
(request: FinalizeHandlerArguments<any>) =>
90+
requestHandler.handle(request.request as __HttpRequest, options || {}),
91+
handlerExecutionContext
92+
);
93+
}
94+
95+
private serialize(input: ListSubChannelsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
96+
return serializeAws_restJson1ListSubChannelsCommand(input, context);
97+
}
98+
99+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListSubChannelsCommandOutput> {
100+
return deserializeAws_restJson1ListSubChannelsCommand(output, context);
101+
}
102+
103+
// Start section: command_body_extra
104+
// End section: command_body_extra
105+
}

clients/client-chime-sdk-messaging/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export * from "./ListChannelModeratorsCommand";
3434
export * from "./ListChannelsAssociatedWithChannelFlowCommand";
3535
export * from "./ListChannelsCommand";
3636
export * from "./ListChannelsModeratedByAppInstanceUserCommand";
37+
export * from "./ListSubChannelsCommand";
3738
export * from "./ListTagsForResourceCommand";
3839
export * from "./PutChannelMembershipPreferencesCommand";
3940
export * from "./RedactChannelMessageCommand";

0 commit comments

Comments
 (0)