Skip to content

Commit

Permalink
feat(client-ivschat): Adds LoggingConfiguration APIs for IVS Chat - a…
Browse files Browse the repository at this point in the history
… feature that allows customers to store and record sent messages in a chat room to S3 buckets, CloudWatch logs, or Kinesis firehose.
  • Loading branch information
awstools committed Nov 17, 2022
1 parent b658082 commit 8baf756
Show file tree
Hide file tree
Showing 15 changed files with 3,149 additions and 167 deletions.
42 changes: 37 additions & 5 deletions clients/client-ivschat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ Amazon IVS Chat Messaging API. We refer to these as <i>clients</i>. </p>
<p>
<b>Resources</b>
</p>
<p>The following resource is part of Amazon IVS Chat:</p>
<p>The following resources are part of Amazon IVS Chat:</p>
<ul>
<li>
<p>
<b>LoggingConfiguration</b> — A configuration that allows customers to store and record sent messages in a chat room. See the Logging Configuration endpoints for more information.</p>
</li>
<li>
<p>
<b>Room</b> — The central Amazon IVS Chat resource through
which clients connect to and exchange chat messages. See the Room endpoints for more
information.</p>
Expand Down Expand Up @@ -140,10 +144,10 @@ to change the way the chat UI is rendered.</p>
<ul>
<li>
<p>
<a>CreateChatToken</a> — Creates an encrypted token that is used to
establish an individual WebSocket connection to a room. The token is valid for one minute,
and a connection (session) established with the token is valid for the specified
duration.</p>
<a>CreateChatToken</a> — Creates an encrypted token that is used by a chat participant to establish an
individual WebSocket chat connection to a room. When the token is used to connect to chat,
the connection is valid for the session duration specified in the request. The token
becomes invalid at the token-expiration timestamp included in the response.</p>
</li>
</ul>
<p>
Expand Down Expand Up @@ -174,6 +178,34 @@ the AWS region where the API request is processed. </p>
</li>
</ul>
<p>
<b>Logging Configuration Endpoints</b>
</p>
<ul>
<li>
<p>
<a>CreateLoggingConfiguration</a> — Creates a logging configuration that allows clients to store and record sent messages.</p>
</li>
<li>
<p>
<a>DeleteLoggingConfiguration</a> — Deletes the specified logging
configuration.</p>
</li>
<li>
<p>
<a>GetLoggingConfiguration</a> — Gets the specified logging
configuration.</p>
</li>
<li>
<p>
<a>ListLoggingConfigurations</a> — Gets summary information about all
your logging configurations in the AWS region where the API request is processed.</p>
</li>
<li>
<p>
<a>UpdateLoggingConfiguration</a> — Updates a specified logging configuration.</p>
</li>
</ul>
<p>
<b>Tags Endpoints</b>
</p>
<ul>
Expand Down
242 changes: 234 additions & 8 deletions clients/client-ivschat/src/Ivschat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ import {
CreateChatTokenCommandInput,
CreateChatTokenCommandOutput,
} from "./commands/CreateChatTokenCommand";
import {
CreateLoggingConfigurationCommand,
CreateLoggingConfigurationCommandInput,
CreateLoggingConfigurationCommandOutput,
} from "./commands/CreateLoggingConfigurationCommand";
import { CreateRoomCommand, CreateRoomCommandInput, CreateRoomCommandOutput } from "./commands/CreateRoomCommand";
import {
DeleteLoggingConfigurationCommand,
DeleteLoggingConfigurationCommandInput,
DeleteLoggingConfigurationCommandOutput,
} from "./commands/DeleteLoggingConfigurationCommand";
import {
DeleteMessageCommand,
DeleteMessageCommandInput,
Expand All @@ -18,7 +28,17 @@ import {
DisconnectUserCommandInput,
DisconnectUserCommandOutput,
} from "./commands/DisconnectUserCommand";
import {
GetLoggingConfigurationCommand,
GetLoggingConfigurationCommandInput,
GetLoggingConfigurationCommandOutput,
} from "./commands/GetLoggingConfigurationCommand";
import { GetRoomCommand, GetRoomCommandInput, GetRoomCommandOutput } from "./commands/GetRoomCommand";
import {
ListLoggingConfigurationsCommand,
ListLoggingConfigurationsCommandInput,
ListLoggingConfigurationsCommandOutput,
} from "./commands/ListLoggingConfigurationsCommand";
import { ListRoomsCommand, ListRoomsCommandInput, ListRoomsCommandOutput } from "./commands/ListRoomsCommand";
import {
ListTagsForResourceCommand,
Expand All @@ -32,6 +52,11 @@ import {
UntagResourceCommandInput,
UntagResourceCommandOutput,
} from "./commands/UntagResourceCommand";
import {
UpdateLoggingConfigurationCommand,
UpdateLoggingConfigurationCommandInput,
UpdateLoggingConfigurationCommandOutput,
} from "./commands/UpdateLoggingConfigurationCommand";
import { UpdateRoomCommand, UpdateRoomCommandInput, UpdateRoomCommandOutput } from "./commands/UpdateRoomCommand";
import { IvschatClient } from "./IvschatClient";

Expand Down Expand Up @@ -61,10 +86,14 @@ import { IvschatClient } from "./IvschatClient";
* <p>
* <b>Resources</b>
* </p>
* <p>The following resource is part of Amazon IVS Chat:</p>
* <p>The following resources are part of Amazon IVS Chat:</p>
* <ul>
* <li>
* <p>
* <b>LoggingConfiguration</b> — A configuration that allows customers to store and record sent messages in a chat room. See the Logging Configuration endpoints for more information.</p>
* </li>
* <li>
* <p>
* <b>Room</b> — The central Amazon IVS Chat resource through
* which clients connect to and exchange chat messages. See the Room endpoints for more
* information.</p>
Expand Down Expand Up @@ -167,10 +196,10 @@ import { IvschatClient } from "./IvschatClient";
* <ul>
* <li>
* <p>
* <a>CreateChatToken</a> — Creates an encrypted token that is used to
* establish an individual WebSocket connection to a room. The token is valid for one minute,
* and a connection (session) established with the token is valid for the specified
* duration.</p>
* <a>CreateChatToken</a> — Creates an encrypted token that is used by a chat participant to establish an
* individual WebSocket chat connection to a room. When the token is used to connect to chat,
* the connection is valid for the session duration specified in the request. The token
* becomes invalid at the token-expiration timestamp included in the response.</p>
* </li>
* </ul>
* <p>
Expand Down Expand Up @@ -201,6 +230,34 @@ import { IvschatClient } from "./IvschatClient";
* </li>
* </ul>
* <p>
* <b>Logging Configuration Endpoints</b>
* </p>
* <ul>
* <li>
* <p>
* <a>CreateLoggingConfiguration</a> — Creates a logging configuration that allows clients to store and record sent messages.</p>
* </li>
* <li>
* <p>
* <a>DeleteLoggingConfiguration</a> — Deletes the specified logging
* configuration.</p>
* </li>
* <li>
* <p>
* <a>GetLoggingConfiguration</a> — Gets the specified logging
* configuration.</p>
* </li>
* <li>
* <p>
* <a>ListLoggingConfigurations</a> — Gets summary information about all
* your logging configurations in the AWS region where the API request is processed.</p>
* </li>
* <li>
* <p>
* <a>UpdateLoggingConfiguration</a> — Updates a specified logging configuration.</p>
* </li>
* </ul>
* <p>
* <b>Tags Endpoints</b>
* </p>
* <ul>
Expand All @@ -226,9 +283,16 @@ import { IvschatClient } from "./IvschatClient";
*/
export class Ivschat extends IvschatClient {
/**
* <p>Creates an encrypted token that is used to establish an individual WebSocket connection
* to a room. The token is valid for one minute, and a connection (session) established with
* the token is valid for the specified duration.</p>
* <p>Creates an encrypted token that is used by a chat participant to establish an individual
* WebSocket chat connection to a room. When the token is used to connect to chat, the
* connection is valid for the session duration specified in the request. The token becomes
* invalid at the token-expiration timestamp included in the response.</p>
* <p>Use the <code>capabilities</code> field to permit an end user to send messages or
* moderate a room.</p>
* <p>The <code>attributes</code> field securely attaches structured data to the chat session; the data is
* included within each message sent by the end user and received by other participants in the
* room. Common use cases for attributes include passing end-user profile data like an icon,
* display name, colors, badges, and other display features.</p>
* <p>Encryption keys are owned by Amazon IVS Chat and never used directly by your
* application.</p>
*/
Expand Down Expand Up @@ -261,6 +325,39 @@ export class Ivschat extends IvschatClient {
}
}

/**
* <p>Creates a logging configuration that allows clients to store and record sent
* messages.</p>
*/
public createLoggingConfiguration(
args: CreateLoggingConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateLoggingConfigurationCommandOutput>;
public createLoggingConfiguration(
args: CreateLoggingConfigurationCommandInput,
cb: (err: any, data?: CreateLoggingConfigurationCommandOutput) => void
): void;
public createLoggingConfiguration(
args: CreateLoggingConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateLoggingConfigurationCommandOutput) => void
): void;
public createLoggingConfiguration(
args: CreateLoggingConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLoggingConfigurationCommandOutput) => void),
cb?: (err: any, data?: CreateLoggingConfigurationCommandOutput) => void
): Promise<CreateLoggingConfigurationCommandOutput> | void {
const command = new CreateLoggingConfigurationCommand(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 room that allows clients to connect and pass messages.</p>
*/
Expand All @@ -287,6 +384,38 @@ export class Ivschat extends IvschatClient {
}
}

/**
* <p>Deletes the specified logging configuration.</p>
*/
public deleteLoggingConfiguration(
args: DeleteLoggingConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteLoggingConfigurationCommandOutput>;
public deleteLoggingConfiguration(
args: DeleteLoggingConfigurationCommandInput,
cb: (err: any, data?: DeleteLoggingConfigurationCommandOutput) => void
): void;
public deleteLoggingConfiguration(
args: DeleteLoggingConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteLoggingConfigurationCommandOutput) => void
): void;
public deleteLoggingConfiguration(
args: DeleteLoggingConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteLoggingConfigurationCommandOutput) => void),
cb?: (err: any, data?: DeleteLoggingConfigurationCommandOutput) => void
): Promise<DeleteLoggingConfigurationCommandOutput> | void {
const command = new DeleteLoggingConfigurationCommand(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>Sends an event to a specific room which directs clients to delete a specific message;
* that is, unrender it from view and delete it from the client’s chat history. This event’s
Expand Down Expand Up @@ -382,6 +511,38 @@ export class Ivschat extends IvschatClient {
}
}

/**
* <p>Gets the specified logging configuration.</p>
*/
public getLoggingConfiguration(
args: GetLoggingConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<GetLoggingConfigurationCommandOutput>;
public getLoggingConfiguration(
args: GetLoggingConfigurationCommandInput,
cb: (err: any, data?: GetLoggingConfigurationCommandOutput) => void
): void;
public getLoggingConfiguration(
args: GetLoggingConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetLoggingConfigurationCommandOutput) => void
): void;
public getLoggingConfiguration(
args: GetLoggingConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetLoggingConfigurationCommandOutput) => void),
cb?: (err: any, data?: GetLoggingConfigurationCommandOutput) => void
): Promise<GetLoggingConfigurationCommandOutput> | void {
const command = new GetLoggingConfigurationCommand(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>Gets the specified room.</p>
*/
Expand All @@ -408,6 +569,39 @@ export class Ivschat extends IvschatClient {
}
}

/**
* <p>Gets summary information about all your logging configurations in the AWS region where
* the API request is processed.</p>
*/
public listLoggingConfigurations(
args: ListLoggingConfigurationsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListLoggingConfigurationsCommandOutput>;
public listLoggingConfigurations(
args: ListLoggingConfigurationsCommandInput,
cb: (err: any, data?: ListLoggingConfigurationsCommandOutput) => void
): void;
public listLoggingConfigurations(
args: ListLoggingConfigurationsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListLoggingConfigurationsCommandOutput) => void
): void;
public listLoggingConfigurations(
args: ListLoggingConfigurationsCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListLoggingConfigurationsCommandOutput) => void),
cb?: (err: any, data?: ListLoggingConfigurationsCommandOutput) => void
): Promise<ListLoggingConfigurationsCommandOutput> | void {
const command = new ListLoggingConfigurationsCommand(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>Gets summary information about all your rooms in the AWS region where the API request is
* processed. Results are sorted in descending order of <code>updateTime</code>.</p>
Expand Down Expand Up @@ -553,6 +747,38 @@ export class Ivschat extends IvschatClient {
}
}

/**
* <p>Updates a specified logging configuration.</p>
*/
public updateLoggingConfiguration(
args: UpdateLoggingConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdateLoggingConfigurationCommandOutput>;
public updateLoggingConfiguration(
args: UpdateLoggingConfigurationCommandInput,
cb: (err: any, data?: UpdateLoggingConfigurationCommandOutput) => void
): void;
public updateLoggingConfiguration(
args: UpdateLoggingConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdateLoggingConfigurationCommandOutput) => void
): void;
public updateLoggingConfiguration(
args: UpdateLoggingConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateLoggingConfigurationCommandOutput) => void),
cb?: (err: any, data?: UpdateLoggingConfigurationCommandOutput) => void
): Promise<UpdateLoggingConfigurationCommandOutput> | void {
const command = new UpdateLoggingConfigurationCommand(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>Updates a room’s configuration.</p>
*/
Expand Down
Loading

0 comments on commit 8baf756

Please sign in to comment.