Skip to content

Commit

Permalink
feat(client-chime-sdk-meetings): Adds support for centrally controlli…
Browse files Browse the repository at this point in the history
…ng each participant's ability to send and receive audio, video and screen share within a WebRTC session. Attendee capabilities can be specified when the attendee is created and updated during the session with the new BatchUpdateAttendeeCapabilitiesExcept API.
  • Loading branch information
awstools committed Jun 1, 2022
1 parent 80d0f18 commit a938290
Show file tree
Hide file tree
Showing 8 changed files with 1,021 additions and 8 deletions.
76 changes: 76 additions & 0 deletions clients/client-chime-sdk-meetings/src/ChimeSDKMeetings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import {
BatchCreateAttendeeCommandInput,
BatchCreateAttendeeCommandOutput,
} from "./commands/BatchCreateAttendeeCommand";
import {
BatchUpdateAttendeeCapabilitiesExceptCommand,
BatchUpdateAttendeeCapabilitiesExceptCommandInput,
BatchUpdateAttendeeCapabilitiesExceptCommandOutput,
} from "./commands/BatchUpdateAttendeeCapabilitiesExceptCommand";
import {
CreateAttendeeCommand,
CreateAttendeeCommandInput,
Expand Down Expand Up @@ -49,6 +54,11 @@ import {
StopMeetingTranscriptionCommandInput,
StopMeetingTranscriptionCommandOutput,
} from "./commands/StopMeetingTranscriptionCommand";
import {
UpdateAttendeeCapabilitiesCommand,
UpdateAttendeeCapabilitiesCommandInput,
UpdateAttendeeCapabilitiesCommandOutput,
} from "./commands/UpdateAttendeeCapabilitiesCommand";

/**
* <p>The Amazon Chime SDK meetings APIs in this section allow software developers to create Amazon Chime SDK meetings, set the AWS Regions for meetings, create and manage users, and send and
Expand Down Expand Up @@ -88,6 +98,40 @@ export class ChimeSDKMeetings extends ChimeSDKMeetingsClient {
}
}

/**
* <p>Updates <code>AttendeeCapabilities</code> except the capabilities listed in an <code>ExcludedAttendeeIds</code> table.</p>
*/
public batchUpdateAttendeeCapabilitiesExcept(
args: BatchUpdateAttendeeCapabilitiesExceptCommandInput,
options?: __HttpHandlerOptions
): Promise<BatchUpdateAttendeeCapabilitiesExceptCommandOutput>;
public batchUpdateAttendeeCapabilitiesExcept(
args: BatchUpdateAttendeeCapabilitiesExceptCommandInput,
cb: (err: any, data?: BatchUpdateAttendeeCapabilitiesExceptCommandOutput) => void
): void;
public batchUpdateAttendeeCapabilitiesExcept(
args: BatchUpdateAttendeeCapabilitiesExceptCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: BatchUpdateAttendeeCapabilitiesExceptCommandOutput) => void
): void;
public batchUpdateAttendeeCapabilitiesExcept(
args: BatchUpdateAttendeeCapabilitiesExceptCommandInput,
optionsOrCb?:
| __HttpHandlerOptions
| ((err: any, data?: BatchUpdateAttendeeCapabilitiesExceptCommandOutput) => void),
cb?: (err: any, data?: BatchUpdateAttendeeCapabilitiesExceptCommandOutput) => void
): Promise<BatchUpdateAttendeeCapabilitiesExceptCommandOutput> | void {
const command = new BatchUpdateAttendeeCapabilitiesExceptCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>
* Creates a new attendee for an active Amazon Chime SDK meeting. For more information about the Amazon Chime SDK, see
Expand Down Expand Up @@ -428,4 +472,36 @@ export class ChimeSDKMeetings extends ChimeSDKMeetingsClient {
return this.send(command, optionsOrCb);
}
}

/**
* <p>The capabilties that you want to update.</p>
*/
public updateAttendeeCapabilities(
args: UpdateAttendeeCapabilitiesCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateAttendeeCapabilitiesCommandOutput>;
public updateAttendeeCapabilities(
args: UpdateAttendeeCapabilitiesCommandInput,
cb: (err: any, data?: UpdateAttendeeCapabilitiesCommandOutput) => void
): void;
public updateAttendeeCapabilities(
args: UpdateAttendeeCapabilitiesCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateAttendeeCapabilitiesCommandOutput) => void
): void;
public updateAttendeeCapabilities(
args: UpdateAttendeeCapabilitiesCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateAttendeeCapabilitiesCommandOutput) => void),
cb?: (err: any, data?: UpdateAttendeeCapabilitiesCommandOutput) => void
): Promise<UpdateAttendeeCapabilitiesCommandOutput> | void {
const command = new UpdateAttendeeCapabilitiesCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}
}
16 changes: 14 additions & 2 deletions clients/client-chime-sdk-meetings/src/ChimeSDKMeetingsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ import {
BatchCreateAttendeeCommandInput,
BatchCreateAttendeeCommandOutput,
} from "./commands/BatchCreateAttendeeCommand";
import {
BatchUpdateAttendeeCapabilitiesExceptCommandInput,
BatchUpdateAttendeeCapabilitiesExceptCommandOutput,
} from "./commands/BatchUpdateAttendeeCapabilitiesExceptCommand";
import { CreateAttendeeCommandInput, CreateAttendeeCommandOutput } from "./commands/CreateAttendeeCommand";
import { CreateMeetingCommandInput, CreateMeetingCommandOutput } from "./commands/CreateMeetingCommand";
import {
Expand All @@ -75,10 +79,15 @@ import {
StopMeetingTranscriptionCommandInput,
StopMeetingTranscriptionCommandOutput,
} from "./commands/StopMeetingTranscriptionCommand";
import {
UpdateAttendeeCapabilitiesCommandInput,
UpdateAttendeeCapabilitiesCommandOutput,
} from "./commands/UpdateAttendeeCapabilitiesCommand";
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";

export type ServiceInputTypes =
| BatchCreateAttendeeCommandInput
| BatchUpdateAttendeeCapabilitiesExceptCommandInput
| CreateAttendeeCommandInput
| CreateMeetingCommandInput
| CreateMeetingWithAttendeesCommandInput
Expand All @@ -88,10 +97,12 @@ export type ServiceInputTypes =
| GetMeetingCommandInput
| ListAttendeesCommandInput
| StartMeetingTranscriptionCommandInput
| StopMeetingTranscriptionCommandInput;
| StopMeetingTranscriptionCommandInput
| UpdateAttendeeCapabilitiesCommandInput;

export type ServiceOutputTypes =
| BatchCreateAttendeeCommandOutput
| BatchUpdateAttendeeCapabilitiesExceptCommandOutput
| CreateAttendeeCommandOutput
| CreateMeetingCommandOutput
| CreateMeetingWithAttendeesCommandOutput
Expand All @@ -101,7 +112,8 @@ export type ServiceOutputTypes =
| GetMeetingCommandOutput
| ListAttendeesCommandOutput
| StartMeetingTranscriptionCommandOutput
| StopMeetingTranscriptionCommandOutput;
| StopMeetingTranscriptionCommandOutput
| UpdateAttendeeCapabilitiesCommandOutput;

export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient";
import { BatchUpdateAttendeeCapabilitiesExceptRequest } from "../models/models_0";
import {
deserializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommand,
serializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommand,
} from "../protocols/Aws_restJson1";

export interface BatchUpdateAttendeeCapabilitiesExceptCommandInput
extends BatchUpdateAttendeeCapabilitiesExceptRequest {}
export interface BatchUpdateAttendeeCapabilitiesExceptCommandOutput extends __MetadataBearer {}

/**
* <p>Updates <code>AttendeeCapabilities</code> except the capabilities listed in an <code>ExcludedAttendeeIds</code> table.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ChimeSDKMeetingsClient, BatchUpdateAttendeeCapabilitiesExceptCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import
* // const { ChimeSDKMeetingsClient, BatchUpdateAttendeeCapabilitiesExceptCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import
* const client = new ChimeSDKMeetingsClient(config);
* const command = new BatchUpdateAttendeeCapabilitiesExceptCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link BatchUpdateAttendeeCapabilitiesExceptCommandInput} for command's `input` shape.
* @see {@link BatchUpdateAttendeeCapabilitiesExceptCommandOutput} for command's `response` shape.
* @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for ChimeSDKMeetingsClient's `config` shape.
*
*/
export class BatchUpdateAttendeeCapabilitiesExceptCommand extends $Command<
BatchUpdateAttendeeCapabilitiesExceptCommandInput,
BatchUpdateAttendeeCapabilitiesExceptCommandOutput,
ChimeSDKMeetingsClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: BatchUpdateAttendeeCapabilitiesExceptCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: ChimeSDKMeetingsClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<BatchUpdateAttendeeCapabilitiesExceptCommandInput, BatchUpdateAttendeeCapabilitiesExceptCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "ChimeSDKMeetingsClient";
const commandName = "BatchUpdateAttendeeCapabilitiesExceptCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: BatchUpdateAttendeeCapabilitiesExceptRequest.filterSensitiveLog,
outputFilterSensitiveLog: (output: any) => output,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(
input: BatchUpdateAttendeeCapabilitiesExceptCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> {
return serializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommand(input, context);
}

private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<BatchUpdateAttendeeCapabilitiesExceptCommandOutput> {
return deserializeAws_restJson1BatchUpdateAttendeeCapabilitiesExceptCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { ChimeSDKMeetingsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeSDKMeetingsClient";
import { UpdateAttendeeCapabilitiesRequest, UpdateAttendeeCapabilitiesResponse } from "../models/models_0";
import {
deserializeAws_restJson1UpdateAttendeeCapabilitiesCommand,
serializeAws_restJson1UpdateAttendeeCapabilitiesCommand,
} from "../protocols/Aws_restJson1";

export interface UpdateAttendeeCapabilitiesCommandInput extends UpdateAttendeeCapabilitiesRequest {}
export interface UpdateAttendeeCapabilitiesCommandOutput extends UpdateAttendeeCapabilitiesResponse, __MetadataBearer {}

/**
* <p>The capabilties that you want to update.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ChimeSDKMeetingsClient, UpdateAttendeeCapabilitiesCommand } from "@aws-sdk/client-chime-sdk-meetings"; // ES Modules import
* // const { ChimeSDKMeetingsClient, UpdateAttendeeCapabilitiesCommand } = require("@aws-sdk/client-chime-sdk-meetings"); // CommonJS import
* const client = new ChimeSDKMeetingsClient(config);
* const command = new UpdateAttendeeCapabilitiesCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link UpdateAttendeeCapabilitiesCommandInput} for command's `input` shape.
* @see {@link UpdateAttendeeCapabilitiesCommandOutput} for command's `response` shape.
* @see {@link ChimeSDKMeetingsClientResolvedConfig | config} for ChimeSDKMeetingsClient's `config` shape.
*
*/
export class UpdateAttendeeCapabilitiesCommand extends $Command<
UpdateAttendeeCapabilitiesCommandInput,
UpdateAttendeeCapabilitiesCommandOutput,
ChimeSDKMeetingsClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: UpdateAttendeeCapabilitiesCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: ChimeSDKMeetingsClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<UpdateAttendeeCapabilitiesCommandInput, UpdateAttendeeCapabilitiesCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "ChimeSDKMeetingsClient";
const commandName = "UpdateAttendeeCapabilitiesCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: UpdateAttendeeCapabilitiesRequest.filterSensitiveLog,
outputFilterSensitiveLog: UpdateAttendeeCapabilitiesResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: UpdateAttendeeCapabilitiesCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_restJson1UpdateAttendeeCapabilitiesCommand(input, context);
}

private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<UpdateAttendeeCapabilitiesCommandOutput> {
return deserializeAws_restJson1UpdateAttendeeCapabilitiesCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
2 changes: 2 additions & 0 deletions clients/client-chime-sdk-meetings/src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// smithy-typescript generated code
export * from "./BatchCreateAttendeeCommand";
export * from "./BatchUpdateAttendeeCapabilitiesExceptCommand";
export * from "./CreateAttendeeCommand";
export * from "./CreateMeetingCommand";
export * from "./CreateMeetingWithAttendeesCommand";
Expand All @@ -10,3 +11,4 @@ export * from "./GetMeetingCommand";
export * from "./ListAttendeesCommand";
export * from "./StartMeetingTranscriptionCommand";
export * from "./StopMeetingTranscriptionCommand";
export * from "./UpdateAttendeeCapabilitiesCommand";
Loading

0 comments on commit a938290

Please sign in to comment.