diff --git a/clients/client-cloudwatch-logs/README.md b/clients/client-cloudwatch-logs/README.md index ef219d633c2f..6b0fb54ecf9c 100644 --- a/clients/client-cloudwatch-logs/README.md +++ b/clients/client-cloudwatch-logs/README.md @@ -748,6 +748,14 @@ PutSubscriptionFilter [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/PutSubscriptionFilterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/PutSubscriptionFilterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/PutSubscriptionFilterCommandOutput/) + +
+ +StartLiveTail + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/StartLiveTailCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/StartLiveTailCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/StartLiveTailCommandOutput/) +
diff --git a/clients/client-cloudwatch-logs/package.json b/clients/client-cloudwatch-logs/package.json index ab5eb52e3e70..48cc583e9233 100644 --- a/clients/client-cloudwatch-logs/package.json +++ b/clients/client-cloudwatch-logs/package.json @@ -34,6 +34,9 @@ "@aws-sdk/util-user-agent-browser": "*", "@aws-sdk/util-user-agent-node": "*", "@smithy/config-resolver": "^2.0.21", + "@smithy/eventstream-serde-browser": "^2.0.15", + "@smithy/eventstream-serde-config-resolver": "^2.0.15", + "@smithy/eventstream-serde-node": "^2.0.15", "@smithy/fetch-http-handler": "^2.3.1", "@smithy/hash-node": "^2.0.17", "@smithy/invalid-dependency": "^2.0.15", diff --git a/clients/client-cloudwatch-logs/src/CloudWatchLogs.ts b/clients/client-cloudwatch-logs/src/CloudWatchLogs.ts index 8a714d3ed9e5..1d13be5f039e 100644 --- a/clients/client-cloudwatch-logs/src/CloudWatchLogs.ts +++ b/clients/client-cloudwatch-logs/src/CloudWatchLogs.ts @@ -319,6 +319,11 @@ import { PutSubscriptionFilterCommandInput, PutSubscriptionFilterCommandOutput, } from "./commands/PutSubscriptionFilterCommand"; +import { + StartLiveTailCommand, + StartLiveTailCommandInput, + StartLiveTailCommandOutput, +} from "./commands/StartLiveTailCommand"; import { StartQueryCommand, StartQueryCommandInput, StartQueryCommandOutput } from "./commands/StartQueryCommand"; import { StopQueryCommand, StopQueryCommandInput, StopQueryCommandOutput } from "./commands/StopQueryCommand"; import { TagLogGroupCommand, TagLogGroupCommandInput, TagLogGroupCommandOutput } from "./commands/TagLogGroupCommand"; @@ -414,6 +419,7 @@ const commands = { PutResourcePolicyCommand, PutRetentionPolicyCommand, PutSubscriptionFilterCommand, + StartLiveTailCommand, StartQueryCommand, StopQueryCommand, TagLogGroupCommand, @@ -1448,6 +1454,17 @@ export interface CloudWatchLogs { cb: (err: any, data?: PutSubscriptionFilterCommandOutput) => void ): void; + /** + * @see {@link StartLiveTailCommand} + */ + startLiveTail(args: StartLiveTailCommandInput, options?: __HttpHandlerOptions): Promise; + startLiveTail(args: StartLiveTailCommandInput, cb: (err: any, data?: StartLiveTailCommandOutput) => void): void; + startLiveTail( + args: StartLiveTailCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartLiveTailCommandOutput) => void + ): void; + /** * @see {@link StartQueryCommand} */ diff --git a/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts b/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts index 96cb1702d1ed..5d8ad5b160a8 100644 --- a/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts +++ b/clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts @@ -21,6 +21,11 @@ import { } from "@aws-sdk/middleware-user-agent"; import { Credentials as __Credentials } from "@aws-sdk/types"; import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver"; +import { + EventStreamSerdeInputConfig, + EventStreamSerdeResolvedConfig, + resolveEventStreamSerdeConfig, +} from "@smithy/eventstream-serde-config-resolver"; import { getContentLengthPlugin } from "@smithy/middleware-content-length"; import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint"; import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; @@ -38,6 +43,7 @@ import { Decoder as __Decoder, Encoder as __Encoder, EndpointV2 as __EndpointV2, + EventStreamSerdeProvider as __EventStreamSerdeProvider, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, @@ -205,6 +211,7 @@ import { PutSubscriptionFilterCommandInput, PutSubscriptionFilterCommandOutput, } from "./commands/PutSubscriptionFilterCommand"; +import { StartLiveTailCommandInput, StartLiveTailCommandOutput } from "./commands/StartLiveTailCommand"; import { StartQueryCommandInput, StartQueryCommandOutput } from "./commands/StartQueryCommand"; import { StopQueryCommandInput, StopQueryCommandOutput } from "./commands/StopQueryCommand"; import { TagLogGroupCommandInput, TagLogGroupCommandOutput } from "./commands/TagLogGroupCommand"; @@ -296,6 +303,7 @@ export type ServiceInputTypes = | PutResourcePolicyCommandInput | PutRetentionPolicyCommandInput | PutSubscriptionFilterCommandInput + | StartLiveTailCommandInput | StartQueryCommandInput | StopQueryCommandInput | TagLogGroupCommandInput @@ -374,6 +382,7 @@ export type ServiceOutputTypes = | PutResourcePolicyCommandOutput | PutRetentionPolicyCommandOutput | PutSubscriptionFilterCommandOutput + | StartLiveTailCommandOutput | StartQueryCommandOutput | StopQueryCommandOutput | TagLogGroupCommandOutput @@ -509,6 +518,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ extensions?: RuntimeExtension[]; + /** + * The function that provides necessary utilities for generating and parsing event stream + */ + eventStreamSerdeProvider?: __EventStreamSerdeProvider; + /** * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK. */ @@ -526,6 +540,7 @@ export type CloudWatchLogsClientConfigType = Partial<__SmithyConfiguration<__Htt HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & + EventStreamSerdeInputConfig & ClientInputEndpointParameters; /** * @public @@ -546,6 +561,7 @@ export type CloudWatchLogsClientResolvedConfigType = __SmithyResolvedConfigurati HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & + EventStreamSerdeResolvedConfig & ClientResolvedEndpointParameters; /** * @public @@ -612,9 +628,10 @@ export class CloudWatchLogsClient extends __Client< const _config_5 = resolveHostHeaderConfig(_config_4); const _config_6 = resolveAwsAuthConfig(_config_5); const _config_7 = resolveUserAgentConfig(_config_6); - const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); - super(_config_8); - this.config = _config_8; + const _config_8 = resolveEventStreamSerdeConfig(_config_7); + const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []); + super(_config_9); + this.config = _config_9; this.middlewareStack.use(getRetryPlugin(this.config)); this.middlewareStack.use(getContentLengthPlugin(this.config)); this.middlewareStack.use(getHostHeaderPlugin(this.config)); diff --git a/clients/client-cloudwatch-logs/src/commands/CreateDeliveryCommand.ts b/clients/client-cloudwatch-logs/src/commands/CreateDeliveryCommand.ts index 92bac68a63ec..245b319d9b8f 100644 --- a/clients/client-cloudwatch-logs/src/commands/CreateDeliveryCommand.ts +++ b/clients/client-cloudwatch-logs/src/commands/CreateDeliveryCommand.ts @@ -60,7 +60,7 @@ export interface CreateDeliveryCommandOutput extends CreateDeliveryResponse, __M * *
  • *

    If you are delivering logs cross-account, you must use - * PutDeliveryDestinationPolicy + * PutDeliveryDestinationPolicy * in the destination account to assign an IAM policy to the * destination. This policy allows delivery to that destination. *

    diff --git a/clients/client-cloudwatch-logs/src/commands/DescribeQueryDefinitionsCommand.ts b/clients/client-cloudwatch-logs/src/commands/DescribeQueryDefinitionsCommand.ts index 1a6e4ca0c06c..2380f8ce5257 100644 --- a/clients/client-cloudwatch-logs/src/commands/DescribeQueryDefinitionsCommand.ts +++ b/clients/client-cloudwatch-logs/src/commands/DescribeQueryDefinitionsCommand.ts @@ -37,7 +37,8 @@ export interface DescribeQueryDefinitionsCommandOutput extends DescribeQueryDefi /** * @public - *

    This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions.

    + *

    This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions. You can + * retrieve query definitions from the current account or from a source account that is linked to the current account.

    *

    You can use the queryDefinitionNamePrefix parameter to limit the results to only the * query definitions that have names that start with a certain string.

    * @example diff --git a/clients/client-cloudwatch-logs/src/commands/PutDeliveryDestinationCommand.ts b/clients/client-cloudwatch-logs/src/commands/PutDeliveryDestinationCommand.ts index 1ee98e2821ea..2e6aedaf3e3b 100644 --- a/clients/client-cloudwatch-logs/src/commands/PutDeliveryDestinationCommand.ts +++ b/clients/client-cloudwatch-logs/src/commands/PutDeliveryDestinationCommand.ts @@ -53,7 +53,7 @@ export interface PutDeliveryDestinationCommandOutput extends PutDeliveryDestinat *
  • *
  • *

    If you are delivering logs cross-account, you must use - * PutDeliveryDestinationPolicy + * PutDeliveryDestinationPolicy * in the destination account to assign an IAM policy to the * destination. This policy allows delivery to that destination. *

    diff --git a/clients/client-cloudwatch-logs/src/commands/PutDeliverySourceCommand.ts b/clients/client-cloudwatch-logs/src/commands/PutDeliverySourceCommand.ts index 0773369cedd1..c01f2bf30ffd 100644 --- a/clients/client-cloudwatch-logs/src/commands/PutDeliverySourceCommand.ts +++ b/clients/client-cloudwatch-logs/src/commands/PutDeliverySourceCommand.ts @@ -52,7 +52,7 @@ export interface PutDeliverySourceCommandOutput extends PutDeliverySourceRespons *
  • *
  • *

    If you are delivering logs cross-account, you must use - * PutDeliveryDestinationPolicy + * PutDeliveryDestinationPolicy * in the destination account to assign an IAM policy to the * destination. This policy allows delivery to that destination. *

    diff --git a/clients/client-cloudwatch-logs/src/commands/StartLiveTailCommand.ts b/clients/client-cloudwatch-logs/src/commands/StartLiveTailCommand.ts new file mode 100644 index 000000000000..fb73928bc173 --- /dev/null +++ b/clients/client-cloudwatch-logs/src/commands/StartLiveTailCommand.ts @@ -0,0 +1,241 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { Command as $Command } from "@smithy/smithy-client"; +import { + EventStreamSerdeContext as __EventStreamSerdeContext, + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, + SMITHY_CONTEXT_KEY, +} from "@smithy/types"; + +import { CloudWatchLogsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchLogsClient"; +import { + StartLiveTailRequest, + StartLiveTailResponse, + StartLiveTailResponseFilterSensitiveLog, +} from "../models/models_0"; +import { de_StartLiveTailCommand, se_StartLiveTailCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link StartLiveTailCommand}. + */ +export interface StartLiveTailCommandInput extends StartLiveTailRequest {} +/** + * @public + * + * The output of {@link StartLiveTailCommand}. + */ +export interface StartLiveTailCommandOutput extends StartLiveTailResponse, __MetadataBearer {} + +/** + * @public + *

    Starts a Live Tail streaming session for one or more log groups. A Live Tail session returns a stream of + * log events that have + * been recently ingested in the log groups. For more information, see + * Use Live Tail to view logs in near real time. + *

    + *

    The response to this operation is a response stream, over which + * the server sends live log events and the client receives them.

    + *

    The following objects are sent over the stream:

    + *
      + *
    • + *

      A single LiveTailSessionStart + * object is sent at the start of the session.

      + *
    • + *
    • + *

      Every second, a LiveTailSessionUpdate + * object is sent. Each of these objects contains an array of the actual log events.

      + *

      If no new log events were ingested in the past second, the + * LiveTailSessionUpdate object will contain an empty array.

      + *

      The array of log events contained in a LiveTailSessionUpdate can include + * as many as 500 log events. If the number of log events matching the request exceeds 500 per second, the + * log events are sampled down to 500 log events to be included in each LiveTailSessionUpdate object.

      + *

      If your client consumes the log events slower than the server produces them, CloudWatch Logs + * buffers up to 10 LiveTailSessionUpdate events or 5000 log events, after + * which it starts dropping the oldest events.

      + *
    • + *
    • + *

      A SessionStreamingException + * object is returned if an unknown error occurs on the server side.

      + *
    • + *
    • + *

      A SessionTimeoutException + * object is returned when the session times out, after it has been kept open for three hours.

      + *
    • + *
    + * + *

    You can end a session before it times out by closing the session stream or by closing the client that is receiving the + * stream. The session also ends if the established connection between the client and the server breaks.

    + *
    + * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudWatchLogsClient, StartLiveTailCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import + * // const { CloudWatchLogsClient, StartLiveTailCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import + * const client = new CloudWatchLogsClient(config); + * const input = { // StartLiveTailRequest + * logGroupIdentifiers: [ // StartLiveTailLogGroupIdentifiers // required + * "STRING_VALUE", + * ], + * logStreamNames: [ // InputLogStreamNames + * "STRING_VALUE", + * ], + * logStreamNamePrefixes: [ + * "STRING_VALUE", + * ], + * logEventFilterPattern: "STRING_VALUE", + * }; + * const command = new StartLiveTailCommand(input); + * const response = await client.send(command); + * // { // StartLiveTailResponse + * // responseStream: { // StartLiveTailResponseStream Union: only one key present + * // sessionStart: { // LiveTailSessionStart + * // requestId: "STRING_VALUE", + * // sessionId: "STRING_VALUE", + * // logGroupIdentifiers: [ // StartLiveTailLogGroupIdentifiers + * // "STRING_VALUE", + * // ], + * // logStreamNames: [ // InputLogStreamNames + * // "STRING_VALUE", + * // ], + * // logStreamNamePrefixes: [ + * // "STRING_VALUE", + * // ], + * // logEventFilterPattern: "STRING_VALUE", + * // }, + * // sessionUpdate: { // LiveTailSessionUpdate + * // sessionMetadata: { // LiveTailSessionMetadata + * // sampled: true || false, + * // }, + * // sessionResults: [ // LiveTailSessionResults + * // { // LiveTailSessionLogEvent + * // logStreamName: "STRING_VALUE", + * // logGroupIdentifier: "STRING_VALUE", + * // message: "STRING_VALUE", + * // timestamp: Number("long"), + * // ingestionTime: Number("long"), + * // }, + * // ], + * // }, + * // SessionTimeoutException: { // SessionTimeoutException + * // message: "STRING_VALUE", + * // }, + * // SessionStreamingException: { // SessionStreamingException + * // message: "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param StartLiveTailCommandInput - {@link StartLiveTailCommandInput} + * @returns {@link StartLiveTailCommandOutput} + * @see {@link StartLiveTailCommandInput} for command's `input` shape. + * @see {@link StartLiveTailCommandOutput} for command's `response` shape. + * @see {@link CloudWatchLogsClientResolvedConfig | config} for CloudWatchLogsClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

    You don't have sufficient permissions to perform this action.

    + * + * @throws {@link InvalidOperationException} (client fault) + *

    The operation is not valid on the specified resource.

    + * + * @throws {@link InvalidParameterException} (client fault) + *

    A parameter is specified incorrectly.

    + * + * @throws {@link LimitExceededException} (client fault) + *

    You have reached the maximum number of resources that can be created.

    + * + * @throws {@link ResourceNotFoundException} (client fault) + *

    The specified resource does not exist.

    + * + * @throws {@link CloudWatchLogsServiceException} + *

    Base exception class for all service exceptions from CloudWatchLogs service.

    + * + */ +export class StartLiveTailCommand extends $Command< + StartLiveTailCommandInput, + StartLiveTailCommandOutput, + CloudWatchLogsClientResolvedConfig +> { + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: StartLiveTailCommandInput) { + super(); + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: CloudWatchLogsClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, StartLiveTailCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "CloudWatchLogsClient"; + const commandName = "StartLiveTailCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: StartLiveTailResponseFilterSensitiveLog, + [SMITHY_CONTEXT_KEY]: { + service: "Logs_20140328", + operation: "StartLiveTail", + }, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: StartLiveTailCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_StartLiveTailCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext & __EventStreamSerdeContext + ): Promise { + return de_StartLiveTailCommand(output, context); + } +} diff --git a/clients/client-cloudwatch-logs/src/commands/index.ts b/clients/client-cloudwatch-logs/src/commands/index.ts index 9ee3ee41642e..9c7c6f11e716 100644 --- a/clients/client-cloudwatch-logs/src/commands/index.ts +++ b/clients/client-cloudwatch-logs/src/commands/index.ts @@ -63,6 +63,7 @@ export * from "./PutQueryDefinitionCommand"; export * from "./PutResourcePolicyCommand"; export * from "./PutRetentionPolicyCommand"; export * from "./PutSubscriptionFilterCommand"; +export * from "./StartLiveTailCommand"; export * from "./StartQueryCommand"; export * from "./StopQueryCommand"; export * from "./TagLogGroupCommand"; diff --git a/clients/client-cloudwatch-logs/src/models/models_0.ts b/clients/client-cloudwatch-logs/src/models/models_0.ts index 29f84675ef6c..cd784ed23472 100644 --- a/clients/client-cloudwatch-logs/src/models/models_0.ts +++ b/clients/client-cloudwatch-logs/src/models/models_0.ts @@ -841,8 +841,8 @@ export class ResourceAlreadyExistsException extends __BaseException { export interface CreateLogAnomalyDetectorRequest { /** * @public - *

    An array containing the ARNs of the log groups that this anomaly detector will watch. You must specify - * at least one ARN.

    + *

    An array containing the ARN of the log group that this anomaly detector will watch. You can specify only one + * log group ARN.

    */ logGroupArnList: string[] | undefined; @@ -969,6 +969,9 @@ export interface CreateLogGroupRequest { *
  • * *

    If you omit this parameter, the default of STANDARD is used.

    + * + *

    After a log group is created, its class can't be changed.

    + *
    *

    For details about the features supported by each class, see * Log classes *

    @@ -1293,7 +1296,7 @@ export type OutputFormat = (typeof OutputFormat)[keyof typeof OutputFormat]; * *
  • *

    If you are delivering logs cross-account, you must use - * PutDeliveryDestinationPolicy + * PutDeliveryDestinationPolicy * in the destination account to assign an IAM policy to the * destination. This policy allows delivery to that destination. *

    @@ -1368,7 +1371,7 @@ export interface DeliveryDestination { *
  • *
  • *

    If you are delivering logs cross-account, you must use - * PutDeliveryDestinationPolicy + * PutDeliveryDestinationPolicy * in the destination account to assign an IAM policy to the * destination. This policy allows delivery to that destination. *

    @@ -3747,6 +3750,129 @@ export interface ListTagsLogGroupResponse { tags?: Record; } +/** + * @public + *

    This object contains the information for one log event returned in a Live Tail stream.

    + */ +export interface LiveTailSessionLogEvent { + /** + * @public + *

    The name of the log stream that ingested this log event.

    + */ + logStreamName?: string; + + /** + * @public + *

    The name or ARN of the log group that ingested this log event.

    + */ + logGroupIdentifier?: string; + + /** + * @public + *

    The log event message text.

    + */ + message?: string; + + /** + * @public + *

    The timestamp specifying when this log event was created.

    + */ + timestamp?: number; + + /** + * @public + *

    The timestamp specifying when this log event was ingested into the log group.

    + */ + ingestionTime?: number; +} + +/** + * @public + *

    This object contains the metadata for one LiveTailSessionUpdate structure. It indicates whether + * that update includes only a sample of 500 log events out of a larger number of ingested log events, or if it contains + * all of the matching log events ingested during that second of time.

    + */ +export interface LiveTailSessionMetadata { + /** + * @public + *

    If this is true, then more than 500 log events matched the request for this update, and the + * sessionResults includes a sample of 500 of those events.

    + *

    If this is false, then 500 or fewer log events matched the request for this update, so no sampling + * was necessary. In this case, the + * sessionResults array includes all log events that matched your request during this time.

    + */ + sampled?: boolean; +} + +/** + * @public + *

    This object contains information about this Live Tail session, including the log groups included and the + * log stream filters, if any.

    + */ +export interface LiveTailSessionStart { + /** + * @public + *

    The unique ID generated by CloudWatch Logs to identify this Live Tail session request.

    + */ + requestId?: string; + + /** + * @public + *

    The unique ID generated by CloudWatch Logs to identify this Live Tail session.

    + */ + sessionId?: string; + + /** + * @public + *

    An array of the names and ARNs of the log groups included in this Live Tail session.

    + */ + logGroupIdentifiers?: string[]; + + /** + * @public + *

    If your StartLiveTail operation request included a logStreamNames parameter that filtered the session + * to only include certain log streams, these streams are listed here.

    + */ + logStreamNames?: string[]; + + /** + * @public + *

    If your StartLiveTail operation request included a logStreamNamePrefixes parameter that filtered the session + * to only include log streams that have names that start with certain prefixes, these prefixes are listed here.

    + */ + logStreamNamePrefixes?: string[]; + + /** + * @public + *

    An optional pattern to filter the results to include only log events that match the pattern. + * For example, a filter pattern of error 404 displays only log events that include both error + * and 404.

    + *

    For more information about filter pattern syntax, see Filter and Pattern Syntax.

    + */ + logEventFilterPattern?: string; +} + +/** + * @public + *

    This object contains the log events and metadata for a Live Tail session.

    + */ +export interface LiveTailSessionUpdate { + /** + * @public + *

    This object contains the session metadata for a Live Tail session.

    + */ + sessionMetadata?: LiveTailSessionMetadata; + + /** + * @public + *

    An array, where each member of the array includes the information for one log event in the Live Tail session.

    + *

    A sessionResults array can include as many as 500 log events. If the number of + * log events matching the request exceeds 500 per second, the + * log events are sampled down to 500 log events to be included in each sessionUpdate structure.

    + */ + sessionResults?: LiveTailSessionLogEvent[]; +} + /** * @public */ @@ -4440,6 +4566,202 @@ export interface PutSubscriptionFilterRequest { distribution?: Distribution; } +/** + * @public + */ +export interface StartLiveTailRequest { + /** + * @public + *

    An array where each item in the array is a log group to include in the Live Tail session.

    + *

    Specify each log group by its ARN.

    + *

    If you specify an ARN, the ARN can't end with an asterisk (*).

    + * + *

    You can include up to 10 log groups.

    + *
    + */ + logGroupIdentifiers: string[] | undefined; + + /** + * @public + *

    If you specify this parameter, then only log events in the log streams that you specify here are + * included in the Live Tail session.

    + * + *

    You can specify this parameter only if you specify only one log group in logGroupIdentifiers.

    + *
    + */ + logStreamNames?: string[]; + + /** + * @public + *

    If you specify this parameter, then only log events in the log streams that have names that start with the + * prefixes that you specify here are + * included in the Live Tail session.

    + * + *

    You can specify this parameter only if you specify only one log group in logGroupIdentifiers.

    + *
    + */ + logStreamNamePrefixes?: string[]; + + /** + * @public + *

    An optional pattern to use to filter the results to include only log events that match the pattern. + * For example, a filter pattern of error 404 causes only log events that include both error + * and 404 to be included in the Live Tail stream.

    + *

    Regular expression filter patterns are supported.

    + *

    For more information about filter pattern syntax, see Filter and Pattern Syntax.

    + */ + logEventFilterPattern?: string; +} + +/** + * @public + *

    his exception is returned if an unknown error occurs during a Live Tail session.

    + */ +export class SessionStreamingException extends __BaseException { + readonly name: "SessionStreamingException" = "SessionStreamingException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "SessionStreamingException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, SessionStreamingException.prototype); + } +} + +/** + * @public + *

    This exception is returned in a Live Tail stream when the Live Tail session times out. Live Tail sessions time + * out after three hours.

    + */ +export class SessionTimeoutException extends __BaseException { + readonly name: "SessionTimeoutException" = "SessionTimeoutException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "SessionTimeoutException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, SessionTimeoutException.prototype); + } +} + +/** + * @public + *

    This object includes the stream returned by your + * StartLiveTail + * request.

    + */ +export type StartLiveTailResponseStream = + | StartLiveTailResponseStream.SessionStreamingExceptionMember + | StartLiveTailResponseStream.SessionTimeoutExceptionMember + | StartLiveTailResponseStream.SessionStartMember + | StartLiveTailResponseStream.SessionUpdateMember + | StartLiveTailResponseStream.$UnknownMember; + +/** + * @public + */ +export namespace StartLiveTailResponseStream { + /** + * @public + *

    This object contains information about this Live Tail session, including the log groups included and the + * log stream filters, if any.

    + */ + export interface SessionStartMember { + sessionStart: LiveTailSessionStart; + sessionUpdate?: never; + SessionTimeoutException?: never; + SessionStreamingException?: never; + $unknown?: never; + } + + /** + * @public + *

    This object contains the log events and session metadata.

    + */ + export interface SessionUpdateMember { + sessionStart?: never; + sessionUpdate: LiveTailSessionUpdate; + SessionTimeoutException?: never; + SessionStreamingException?: never; + $unknown?: never; + } + + /** + * @public + *

    This exception is returned in the stream when the Live Tail session times out. Live Tail sessions time + * out after three hours.

    + */ + export interface SessionTimeoutExceptionMember { + sessionStart?: never; + sessionUpdate?: never; + SessionTimeoutException: SessionTimeoutException; + SessionStreamingException?: never; + $unknown?: never; + } + + /** + * @public + *

    This exception is returned if an unknown error occurs.

    + */ + export interface SessionStreamingExceptionMember { + sessionStart?: never; + sessionUpdate?: never; + SessionTimeoutException?: never; + SessionStreamingException: SessionStreamingException; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + sessionStart?: never; + sessionUpdate?: never; + SessionTimeoutException?: never; + SessionStreamingException?: never; + $unknown: [string, any]; + } + + export interface Visitor { + sessionStart: (value: LiveTailSessionStart) => T; + sessionUpdate: (value: LiveTailSessionUpdate) => T; + SessionTimeoutException: (value: SessionTimeoutException) => T; + SessionStreamingException: (value: SessionStreamingException) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: StartLiveTailResponseStream, visitor: Visitor): T => { + if (value.sessionStart !== undefined) return visitor.sessionStart(value.sessionStart); + if (value.sessionUpdate !== undefined) return visitor.sessionUpdate(value.sessionUpdate); + if (value.SessionTimeoutException !== undefined) + return visitor.SessionTimeoutException(value.SessionTimeoutException); + if (value.SessionStreamingException !== undefined) + return visitor.SessionStreamingException(value.SessionStreamingException); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + */ +export interface StartLiveTailResponse { + /** + * @public + *

    An object that includes the stream returned by your request. It can include both log events and exceptions.

    + */ + responseStream?: AsyncIterable; +} + /** * @public *

    Reserved.

    @@ -4908,3 +5230,22 @@ export interface UpdateLogAnomalyDetectorRequest { */ enabled: boolean | undefined; } + +/** + * @internal + */ +export const StartLiveTailResponseStreamFilterSensitiveLog = (obj: StartLiveTailResponseStream): any => { + if (obj.sessionStart !== undefined) return { sessionStart: obj.sessionStart }; + if (obj.sessionUpdate !== undefined) return { sessionUpdate: obj.sessionUpdate }; + if (obj.SessionTimeoutException !== undefined) return { SessionTimeoutException: obj.SessionTimeoutException }; + if (obj.SessionStreamingException !== undefined) return { SessionStreamingException: obj.SessionStreamingException }; + if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; +}; + +/** + * @internal + */ +export const StartLiveTailResponseFilterSensitiveLog = (obj: StartLiveTailResponse): any => ({ + ...obj, + ...(obj.responseStream && { responseStream: "STREAMING_CONTENT" }), +}); diff --git a/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts b/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts index a2f30e2cd076..bd901969590a 100644 --- a/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts +++ b/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts @@ -1,5 +1,9 @@ // smithy-typescript generated code -import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse, + isValidHostname as __isValidHostname, +} from "@smithy/protocol-http"; import { _json, collectBody, @@ -13,6 +17,7 @@ import { } from "@smithy/smithy-client"; import { Endpoint as __Endpoint, + EventStreamSerdeContext as __EventStreamSerdeContext, HeaderBag as __HeaderBag, ResponseMetadata as __ResponseMetadata, SerdeContext as __SerdeContext, @@ -176,6 +181,7 @@ import { PutSubscriptionFilterCommandInput, PutSubscriptionFilterCommandOutput, } from "../commands/PutSubscriptionFilterCommand"; +import { StartLiveTailCommandInput, StartLiveTailCommandOutput } from "../commands/StartLiveTailCommand"; import { StartQueryCommandInput, StartQueryCommandOutput } from "../commands/StartQueryCommand"; import { StopQueryCommandInput, StopQueryCommandOutput } from "../commands/StopQueryCommand"; import { TagLogGroupCommandInput, TagLogGroupCommandOutput } from "../commands/TagLogGroupCommand"; @@ -252,6 +258,8 @@ import { ListLogAnomalyDetectorsRequest, ListTagsForResourceRequest, ListTagsLogGroupRequest, + LiveTailSessionStart, + LiveTailSessionUpdate, MalformedQueryException, MetricFilter, MetricTransformation, @@ -274,6 +282,10 @@ import { ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, + SessionStreamingException, + SessionTimeoutException, + StartLiveTailRequest, + StartLiveTailResponseStream, StartQueryRequest, StopQueryRequest, SuppressionPeriod, @@ -1122,6 +1134,26 @@ export const se_PutSubscriptionFilterCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1StartLiveTailCommand + */ +export const se_StartLiveTailCommand = async ( + input: StartLiveTailCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("StartLiveTail"); + let body: any; + body = JSON.stringify(_json(input)); + let { hostname: resolvedHostname } = await context.endpoint(); + if (context.disableHostPrefix !== true) { + resolvedHostname = "streaming-" + resolvedHostname; + if (!__isValidHostname(resolvedHostname)) { + throw new Error("ValidationError: prefixed hostname must be hostname compatible."); + } + } + return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body); +}; + /** * serializeAws_json1_1StartQueryCommand */ @@ -4687,6 +4719,62 @@ const de_PutSubscriptionFilterCommandError = async ( } }; +/** + * deserializeAws_json1_1StartLiveTailCommand + */ +export const de_StartLiveTailCommand = async ( + output: __HttpResponse, + context: __SerdeContext & __EventStreamSerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_StartLiveTailCommandError(output, context); + } + const contents = { responseStream: de_StartLiveTailResponseStream(output.body, context) }; + const response: StartLiveTailCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1StartLiveTailCommandError + */ +const de_StartLiveTailCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.cloudwatchlogs#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InvalidOperationException": + case "com.amazonaws.cloudwatchlogs#InvalidOperationException": + throw await de_InvalidOperationExceptionRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.cloudwatchlogs#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.cloudwatchlogs#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1StartQueryCommand */ @@ -5403,6 +5491,104 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; +/** + * deserializeAws_json1_1StartLiveTailResponseStream + */ +const de_StartLiveTailResponseStream = ( + output: any, + context: __SerdeContext & __EventStreamSerdeContext +): AsyncIterable => { + return context.eventStreamMarshaller.deserialize(output, async (event) => { + if (event["sessionStart"] != null) { + return { + sessionStart: await de_LiveTailSessionStart_event(event["sessionStart"], context), + }; + } + if (event["sessionUpdate"] != null) { + return { + sessionUpdate: await de_LiveTailSessionUpdate_event(event["sessionUpdate"], context), + }; + } + if (event["SessionTimeoutException"] != null) { + return { + SessionTimeoutException: await de_SessionTimeoutException_event(event["SessionTimeoutException"], context), + }; + } + if (event["SessionStreamingException"] != null) { + return { + SessionStreamingException: await de_SessionStreamingException_event( + event["SessionStreamingException"], + context + ), + }; + } + return { $unknown: output }; + }); +}; +const de_LiveTailSessionStart_event = async (output: any, context: __SerdeContext): Promise => { + const contents: LiveTailSessionStart = {} as any; + const data: any = await parseBody(output.body, context); + Object.assign(contents, _json(data)); + return contents; +}; +const de_LiveTailSessionUpdate_event = async (output: any, context: __SerdeContext): Promise => { + const contents: LiveTailSessionUpdate = {} as any; + const data: any = await parseBody(output.body, context); + Object.assign(contents, _json(data)); + return contents; +}; +const de_SessionStreamingException_event = async ( + output: any, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + return de_SessionStreamingExceptionRes(parsedOutput, context); +}; +const de_SessionTimeoutException_event = async ( + output: any, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseBody(output.body, context), + }; + return de_SessionTimeoutExceptionRes(parsedOutput, context); +}; +/** + * deserializeAws_json1_1SessionStreamingExceptionRes + */ +const de_SessionStreamingExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new SessionStreamingException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_1SessionTimeoutExceptionRes + */ +const de_SessionTimeoutExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new SessionTimeoutException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + // se_AccountIds omitted. // se_AssociateKmsKeyRequest omitted. @@ -5595,6 +5781,10 @@ const se_PutQueryDefinitionRequest = (input: PutQueryDefinitionRequest, context: // se_PutSubscriptionFilterRequest omitted. +// se_StartLiveTailLogGroupIdentifiers omitted. + +// se_StartLiveTailRequest omitted. + // se_StartQueryRequest omitted. // se_StopQueryRequest omitted. @@ -5755,6 +5945,8 @@ const de_GetQueryResultsResponse = (output: any, context: __SerdeContext): GetQu // de_InheritedProperties omitted. +// de_InputLogStreamNames omitted. + // de_InvalidOperationException omitted. // de_InvalidParameterException omitted. @@ -5771,6 +5963,16 @@ const de_GetQueryResultsResponse = (output: any, context: __SerdeContext): GetQu // de_ListTagsLogGroupResponse omitted. +// de_LiveTailSessionLogEvent omitted. + +// de_LiveTailSessionMetadata omitted. + +// de_LiveTailSessionResults omitted. + +// de_LiveTailSessionStart omitted. + +// de_LiveTailSessionUpdate omitted. + // de_LogGroup omitted. // de_LogGroupArnList omitted. @@ -5927,6 +6129,12 @@ const de_QueryStatistics = (output: any, context: __SerdeContext): QueryStatisti // de_ServiceUnavailableException omitted. +// de_SessionStreamingException omitted. + +// de_SessionTimeoutException omitted. + +// de_StartLiveTailLogGroupIdentifiers omitted. + // de_StartQueryResponse omitted. // de_StopQueryResponse omitted. diff --git a/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts b/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts index e3f20abf70ef..4f75985e8e7c 100644 --- a/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts +++ b/clients/client-cloudwatch-logs/src/runtimeConfig.browser.ts @@ -5,6 +5,7 @@ import packageInfo from "../package.json"; // eslint-disable-line import { Sha256 } from "@aws-crypto/sha256-browser"; import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver"; +import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-browser"; import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler"; import { invalidProvider } from "@smithy/invalid-dependency"; import { calculateBodyLength } from "@smithy/util-body-length-browser"; @@ -32,6 +33,7 @@ export const getRuntimeConfig = (config: CloudWatchLogsClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS, region: config?.region ?? invalidProvider("Region is missing"), requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), diff --git a/clients/client-cloudwatch-logs/src/runtimeConfig.ts b/clients/client-cloudwatch-logs/src/runtimeConfig.ts index 83483d06cd5b..788270264bf0 100644 --- a/clients/client-cloudwatch-logs/src/runtimeConfig.ts +++ b/clients/client-cloudwatch-logs/src/runtimeConfig.ts @@ -12,6 +12,7 @@ import { NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver"; +import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-node"; import { Hash } from "@smithy/hash-node"; import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry"; import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider"; @@ -44,6 +45,7 @@ export const getRuntimeConfig = (config: CloudWatchLogsClientConfig) => { defaultUserAgentProvider: config?.defaultUserAgentProvider ?? defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), + eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider, maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider), diff --git a/codegen/sdk-codegen/aws-models/cloudwatch-logs.json b/codegen/sdk-codegen/aws-models/cloudwatch-logs.json index be418f1ae482..bbdf4a29f959 100644 --- a/codegen/sdk-codegen/aws-models/cloudwatch-logs.json +++ b/codegen/sdk-codegen/aws-models/cloudwatch-logs.json @@ -580,7 +580,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates a delivery. A delivery is a connection between a logical delivery source and a logical\n delivery destination\n that you have already created.

    \n

    Only some Amazon Web Services services support being configured as a delivery source using this operation. These services are listed\n as Supported [V2 Permissions] in the table at \n Enabling \n logging from Amazon Web Services services.\n

    \n

    A delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Kinesis Data Firehose.

    \n

    To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:

    \n
      \n
    • \n

      Create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs. For more \n information, see PutDeliverySource.

      \n
    • \n
    • \n

      Create a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Use CreateDelivery to create a delivery by pairing exactly one delivery source and one delivery destination.\n

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    \n

    You can't update an existing delivery. You can only create and delete deliveries.

    " + "smithy.api#documentation": "

    Creates a delivery. A delivery is a connection between a logical delivery source and a logical\n delivery destination\n that you have already created.

    \n

    Only some Amazon Web Services services support being configured as a delivery source using this operation. These services are listed\n as Supported [V2 Permissions] in the table at \n Enabling \n logging from Amazon Web Services services.\n

    \n

    A delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Kinesis Data Firehose.

    \n

    To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:

    \n
      \n
    • \n

      Create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs. For more \n information, see PutDeliverySource.

      \n
    • \n
    • \n

      Create a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Use CreateDelivery to create a delivery by pairing exactly one delivery source and one delivery destination.\n

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    \n

    You can't update an existing delivery. You can only create and delete deliveries.

    " } }, "com.amazonaws.cloudwatchlogs#CreateDeliveryRequest": { @@ -760,7 +760,7 @@ "logGroupArnList": { "target": "com.amazonaws.cloudwatchlogs#LogGroupArnList", "traits": { - "smithy.api#documentation": "

    An array containing the ARNs of the log groups that this anomaly detector will watch. You must specify\n at least one ARN.

    ", + "smithy.api#documentation": "

    An array containing the ARN of the log group that this anomaly detector will watch. You can specify only one\n log group ARN.

    ", "smithy.api#required": {} } }, @@ -873,7 +873,7 @@ "logGroupClass": { "target": "com.amazonaws.cloudwatchlogs#LogGroupClass", "traits": { - "smithy.api#documentation": "

    Use this parameter to specify the log group class for this log group. There are two classes:

    \n
      \n
    • \n

      The Standard log class supports all CloudWatch Logs features.

      \n
    • \n
    • \n

      The Infrequent Access log class supports a subset of CloudWatch Logs features\n and incurs lower costs.

      \n
    • \n
    \n

    If you omit this parameter, the default of STANDARD is used.

    \n

    For details about the features supported by each class, see \n Log classes\n

    " + "smithy.api#documentation": "

    Use this parameter to specify the log group class for this log group. There are two classes:

    \n
      \n
    • \n

      The Standard log class supports all CloudWatch Logs features.

      \n
    • \n
    • \n

      The Infrequent Access log class supports a subset of CloudWatch Logs features\n and incurs lower costs.

      \n
    • \n
    \n

    If you omit this parameter, the default of STANDARD is used.

    \n \n

    After a log group is created, its class can't be changed.

    \n
    \n

    For details about the features supported by each class, see \n Log classes\n

    " } } }, @@ -1745,7 +1745,7 @@ } }, "traits": { - "smithy.api#documentation": "

    This structure contains information about one delivery destination in your account. \n A delivery destination is an Amazon Web Services resource that represents an \n Amazon Web Services service that logs can be sent to. CloudWatch Logs, Amazon S3, are supported as Kinesis Data Firehose delivery destinations.

    \n

    To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:

    \n
      \n
    • \n

      Create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs. For more \n information, see PutDeliverySource.

      \n
    • \n
    • \n

      Create a delivery destination, which is a logical object that represents the actual\n delivery destination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Create a delivery by pairing exactly one delivery source and one delivery destination.\n For more information, see CreateDelivery.

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    " + "smithy.api#documentation": "

    This structure contains information about one delivery destination in your account. \n A delivery destination is an Amazon Web Services resource that represents an \n Amazon Web Services service that logs can be sent to. CloudWatch Logs, Amazon S3, are supported as Kinesis Data Firehose delivery destinations.

    \n

    To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:

    \n
      \n
    • \n

      Create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs. For more \n information, see PutDeliverySource.

      \n
    • \n
    • \n

      Create a delivery destination, which is a logical object that represents the actual\n delivery destination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Create a delivery by pairing exactly one delivery source and one delivery destination.\n For more information, see CreateDelivery.

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    " } }, "com.amazonaws.cloudwatchlogs#DeliveryDestinationConfiguration": { @@ -1862,7 +1862,7 @@ } }, "traits": { - "smithy.api#documentation": "

    This structure contains information about one delivery source in your account. \n A delivery source is an Amazon Web Services resource that sends logs to an\n Amazon Web Services destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.

    \n

    Only some Amazon Web Services services support being configured as a delivery source. These services are listed\n as Supported [V2 Permissions] in the table at \n Enabling \n logging from Amazon Web Services services.\n

    \n

    To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:

    \n
      \n
    • \n

      Create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs. For more \n information, see PutDeliverySource.

      \n
    • \n
    • \n

      Create a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Create a delivery by pairing exactly one delivery source and one delivery destination.\n For more information, see CreateDelivery.

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    " + "smithy.api#documentation": "

    This structure contains information about one delivery source in your account. \n A delivery source is an Amazon Web Services resource that sends logs to an\n Amazon Web Services destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.

    \n

    Only some Amazon Web Services services support being configured as a delivery source. These services are listed\n as Supported [V2 Permissions] in the table at \n Enabling \n logging from Amazon Web Services services.\n

    \n

    To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:

    \n
      \n
    • \n

      Create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs. For more \n information, see PutDeliverySource.

      \n
    • \n
    • \n

      Create a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Create a delivery by pairing exactly one delivery source and one delivery destination.\n For more information, see CreateDelivery.

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    " } }, "com.amazonaws.cloudwatchlogs#DeliverySourceName": { @@ -2670,7 +2670,7 @@ } ], "traits": { - "smithy.api#documentation": "

    This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions.

    \n

    You can use the queryDefinitionNamePrefix parameter to limit the results to only the\n query definitions that have names that start with a certain string.

    " + "smithy.api#documentation": "

    This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions. You can\n retrieve query definitions from the current account or from a source account that is linked to the current account.

    \n

    You can use the queryDefinitionNamePrefix parameter to limit the results to only the\n query definitions that have names that start with a certain string.

    " } }, "com.amazonaws.cloudwatchlogs#DescribeQueryDefinitionsRequest": { @@ -4354,6 +4354,12 @@ "smithy.api#error": "client" } }, + "com.amazonaws.cloudwatchlogs#IsSampled": { + "type": "boolean", + "traits": { + "smithy.api#default": false + } + }, "com.amazonaws.cloudwatchlogs#KmsKeyId": { "type": "string", "traits": { @@ -4653,6 +4659,129 @@ "smithy.api#output": {} } }, + "com.amazonaws.cloudwatchlogs#LiveTailSessionLogEvent": { + "type": "structure", + "members": { + "logStreamName": { + "target": "com.amazonaws.cloudwatchlogs#LogStreamName", + "traits": { + "smithy.api#documentation": "

    The name of the log stream that ingested this log event.

    " + } + }, + "logGroupIdentifier": { + "target": "com.amazonaws.cloudwatchlogs#LogGroupIdentifier", + "traits": { + "smithy.api#documentation": "

    The name or ARN of the log group that ingested this log event.

    " + } + }, + "message": { + "target": "com.amazonaws.cloudwatchlogs#EventMessage", + "traits": { + "smithy.api#documentation": "

    The log event message text.

    " + } + }, + "timestamp": { + "target": "com.amazonaws.cloudwatchlogs#Timestamp", + "traits": { + "smithy.api#documentation": "

    The timestamp specifying when this log event was created.

    " + } + }, + "ingestionTime": { + "target": "com.amazonaws.cloudwatchlogs#Timestamp", + "traits": { + "smithy.api#documentation": "

    The timestamp specifying when this log event was ingested into the log group.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    This object contains the information for one log event returned in a Live Tail stream.

    " + } + }, + "com.amazonaws.cloudwatchlogs#LiveTailSessionMetadata": { + "type": "structure", + "members": { + "sampled": { + "target": "com.amazonaws.cloudwatchlogs#IsSampled", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

    If this is true, then more than 500 log events matched the request for this update, and the \n sessionResults includes a sample of 500 of those events.

    \n

    If this is false, then 500 or fewer log events matched the request for this update, so no sampling\n was necessary. In this case, the \n sessionResults array includes all log events that matched your request during this time.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    This object contains the metadata for one LiveTailSessionUpdate structure. It indicates whether\n that update includes only a sample of 500 log events out of a larger number of ingested log events, or if it contains\n all of the matching log events ingested during that second of time.

    " + } + }, + "com.amazonaws.cloudwatchlogs#LiveTailSessionResults": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudwatchlogs#LiveTailSessionLogEvent" + } + }, + "com.amazonaws.cloudwatchlogs#LiveTailSessionStart": { + "type": "structure", + "members": { + "requestId": { + "target": "com.amazonaws.cloudwatchlogs#RequestId", + "traits": { + "smithy.api#documentation": "

    The unique ID generated by CloudWatch Logs to identify this Live Tail session request.

    " + } + }, + "sessionId": { + "target": "com.amazonaws.cloudwatchlogs#SessionId", + "traits": { + "smithy.api#documentation": "

    The unique ID generated by CloudWatch Logs to identify this Live Tail session.

    " + } + }, + "logGroupIdentifiers": { + "target": "com.amazonaws.cloudwatchlogs#StartLiveTailLogGroupIdentifiers", + "traits": { + "smithy.api#documentation": "

    An array of the names and ARNs of the log groups included in this Live Tail session.

    " + } + }, + "logStreamNames": { + "target": "com.amazonaws.cloudwatchlogs#InputLogStreamNames", + "traits": { + "smithy.api#documentation": "

    If your StartLiveTail operation request included a logStreamNames parameter that filtered the session\n to only include certain log streams, these streams are listed here.

    " + } + }, + "logStreamNamePrefixes": { + "target": "com.amazonaws.cloudwatchlogs#InputLogStreamNames", + "traits": { + "smithy.api#documentation": "

    If your StartLiveTail operation request included a logStreamNamePrefixes parameter that filtered the session\n to only include log streams that have names that start with certain prefixes, these prefixes are listed here.

    " + } + }, + "logEventFilterPattern": { + "target": "com.amazonaws.cloudwatchlogs#FilterPattern", + "traits": { + "smithy.api#documentation": "

    An optional pattern to filter the results to include only log events that match the pattern.\n For example, a filter pattern of error 404 displays only log events that include both error \n and 404.

    \n

    For more information about filter pattern syntax, see Filter and Pattern Syntax.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    This object contains information about this Live Tail session, including the log groups included and the \n log stream filters, if any.

    " + } + }, + "com.amazonaws.cloudwatchlogs#LiveTailSessionUpdate": { + "type": "structure", + "members": { + "sessionMetadata": { + "target": "com.amazonaws.cloudwatchlogs#LiveTailSessionMetadata", + "traits": { + "smithy.api#documentation": "

    This object contains the session metadata for a Live Tail session.

    " + } + }, + "sessionResults": { + "target": "com.amazonaws.cloudwatchlogs#LiveTailSessionResults", + "traits": { + "smithy.api#documentation": "

    An array, where each member of the array includes the information for one log event in the Live Tail session.

    \n

    A sessionResults array can include as many as 500 log events. If the number of \n log events matching the request exceeds 500 per second, the\n log events are sampled down to 500 log events to be included in each sessionUpdate structure.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    This object contains the log events and metadata for a Live Tail session.

    " + } + }, "com.amazonaws.cloudwatchlogs#LogEvent": { "type": "string", "traits": { @@ -5139,6 +5268,9 @@ { "target": "com.amazonaws.cloudwatchlogs#PutSubscriptionFilter" }, + { + "target": "com.amazonaws.cloudwatchlogs#StartLiveTail" + }, { "target": "com.amazonaws.cloudwatchlogs#StartQuery" }, @@ -6804,7 +6936,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates or updates a logical delivery destination. A delivery destination is an Amazon Web Services resource that represents an \n Amazon Web Services service that logs can be sent to. CloudWatch Logs, Amazon S3, and\n Kinesis Data Firehose are supported as logs delivery destinations.

    \n

    To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:

    \n
      \n
    • \n

      Create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs. For more \n information, see PutDeliverySource.

      \n
    • \n
    • \n

      Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual\n delivery destination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Use CreateDelivery to create a delivery by pairing exactly \n one delivery source and one delivery destination. For more \n information, see CreateDelivery.\n

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    \n

    Only some Amazon Web Services services support being configured as a delivery source. These services are listed\n as Supported [V2 Permissions] in the table at \n Enabling \n logging from Amazon Web Services services.\n

    \n

    If you use this operation to update an existing delivery destination, all the current delivery destination parameters are overwritten\n with the new parameter values that you specify.

    " + "smithy.api#documentation": "

    Creates or updates a logical delivery destination. A delivery destination is an Amazon Web Services resource that represents an \n Amazon Web Services service that logs can be sent to. CloudWatch Logs, Amazon S3, and\n Kinesis Data Firehose are supported as logs delivery destinations.

    \n

    To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:

    \n
      \n
    • \n

      Create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs. For more \n information, see PutDeliverySource.

      \n
    • \n
    • \n

      Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual\n delivery destination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Use CreateDelivery to create a delivery by pairing exactly \n one delivery source and one delivery destination. For more \n information, see CreateDelivery.\n

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    \n

    Only some Amazon Web Services services support being configured as a delivery source. These services are listed\n as Supported [V2 Permissions] in the table at \n Enabling \n logging from Amazon Web Services services.\n

    \n

    If you use this operation to update an existing delivery destination, all the current delivery destination parameters are overwritten\n with the new parameter values that you specify.

    " } }, "com.amazonaws.cloudwatchlogs#PutDeliveryDestinationPolicy": { @@ -6946,7 +7078,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates or updates a logical delivery source. A delivery source represents an Amazon Web Services resource that sends logs to an\n logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.

    \n

    To configure logs delivery between a delivery destination and an Amazon Web Services service that is supported as a delivery source, you must do the following:

    \n
      \n
    • \n

      Use PutDeliverySource to create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs.

      \n
    • \n
    • \n

      Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Use CreateDelivery to create a delivery by pairing exactly \n one delivery source and one delivery destination. For more \n information, see CreateDelivery.\n

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    \n

    Only some Amazon Web Services services support being configured as a delivery source. These services are listed\n as Supported [V2 Permissions] in the table at \n Enabling \n logging from Amazon Web Services services.\n

    \n

    If you use this operation to update an existing delivery source, all the current delivery source parameters are overwritten\n with the new parameter values that you specify.

    " + "smithy.api#documentation": "

    Creates or updates a logical delivery source. A delivery source represents an Amazon Web Services resource that sends logs to an\n logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, or Kinesis Data Firehose.

    \n

    To configure logs delivery between a delivery destination and an Amazon Web Services service that is supported as a delivery source, you must do the following:

    \n
      \n
    • \n

      Use PutDeliverySource to create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs.

      \n
    • \n
    • \n

      Use PutDeliveryDestination to create a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.

      \n
    • \n
    • \n

      If you are delivering logs cross-account, you must use \n PutDeliveryDestinationPolicy\n in the destination account to assign an IAM policy to the \n destination. This policy allows delivery to that destination.\n

      \n
    • \n
    • \n

      Use CreateDelivery to create a delivery by pairing exactly \n one delivery source and one delivery destination. For more \n information, see CreateDelivery.\n

      \n
    • \n
    \n

    You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You \n can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

    \n

    Only some Amazon Web Services services support being configured as a delivery source. These services are listed\n as Supported [V2 Permissions] in the table at \n Enabling \n logging from Amazon Web Services services.\n

    \n

    If you use this operation to update an existing delivery source, all the current delivery source parameters are overwritten\n with the new parameter values that you specify.

    " } }, "com.amazonaws.cloudwatchlogs#PutDeliverySourceRequest": { @@ -7819,6 +7951,15 @@ "smithy.api#documentation": "

    Represents the rejected events.

    " } }, + "com.amazonaws.cloudwatchlogs#RequestId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, "com.amazonaws.cloudwatchlogs#ResourceAlreadyExistsException": { "type": "structure", "members": { @@ -8004,6 +8145,39 @@ "smithy.api#error": "server" } }, + "com.amazonaws.cloudwatchlogs#SessionId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, + "com.amazonaws.cloudwatchlogs#SessionStreamingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.cloudwatchlogs#Message" + } + }, + "traits": { + "smithy.api#documentation": "

    his exception is returned if an unknown error occurs during a Live Tail session.

    ", + "smithy.api#error": "client" + } + }, + "com.amazonaws.cloudwatchlogs#SessionTimeoutException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.cloudwatchlogs#Message" + } + }, + "traits": { + "smithy.api#documentation": "

    This exception is returned in a Live Tail stream when the Live Tail session times out. Live Tail sessions time\n out after three hours.

    ", + "smithy.api#error": "client" + } + }, "com.amazonaws.cloudwatchlogs#StandardUnit": { "type": "enum", "members": { @@ -8174,6 +8348,130 @@ "com.amazonaws.cloudwatchlogs#StartFromHead": { "type": "boolean" }, + "com.amazonaws.cloudwatchlogs#StartLiveTail": { + "type": "operation", + "input": { + "target": "com.amazonaws.cloudwatchlogs#StartLiveTailRequest" + }, + "output": { + "target": "com.amazonaws.cloudwatchlogs#StartLiveTailResponse" + }, + "errors": [ + { + "target": "com.amazonaws.cloudwatchlogs#AccessDeniedException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#InvalidOperationException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#InvalidParameterException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#LimitExceededException" + }, + { + "target": "com.amazonaws.cloudwatchlogs#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

    Starts a Live Tail streaming session for one or more log groups. A Live Tail session returns a stream of \n log events that have\n been recently ingested in the log groups. For more information, see \n Use Live Tail to view logs in near real time.\n

    \n

    The response to this operation is a response stream, over which \n the server sends live log events and the client receives them.

    \n

    The following objects are sent over the stream:

    \n
      \n
    • \n

      A single LiveTailSessionStart \n object is sent at the start of the session.

      \n
    • \n
    • \n

      Every second, a LiveTailSessionUpdate\n object is sent. Each of these objects contains an array of the actual log events.

      \n

      If no new log events were ingested in the past second, the \n LiveTailSessionUpdate object will contain an empty array.

      \n

      The array of log events contained in a LiveTailSessionUpdate can include\n as many as 500 log events. If the number of log events matching the request exceeds 500 per second, the\n log events are sampled down to 500 log events to be included in each LiveTailSessionUpdate object.

      \n

      If your client consumes the log events slower than the server produces them, CloudWatch Logs\n buffers up to 10 LiveTailSessionUpdate events or 5000 log events, after \n which it starts dropping the oldest events.

      \n
    • \n
    • \n

      A SessionStreamingException \n object is returned if an unknown error occurs on the server side.

      \n
    • \n
    • \n

      A SessionTimeoutException \n object is returned when the session times out, after it has been kept open for three hours.

      \n
    • \n
    \n \n

    You can end a session before it times out by closing the session stream or by closing the client that is receiving the \n stream. The session also ends if the established connection between the client and the server breaks.

    \n
    ", + "smithy.api#endpoint": { + "hostPrefix": "streaming-" + } + } + }, + "com.amazonaws.cloudwatchlogs#StartLiveTailLogGroupIdentifiers": { + "type": "list", + "member": { + "target": "com.amazonaws.cloudwatchlogs#LogGroupIdentifier" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.cloudwatchlogs#StartLiveTailRequest": { + "type": "structure", + "members": { + "logGroupIdentifiers": { + "target": "com.amazonaws.cloudwatchlogs#StartLiveTailLogGroupIdentifiers", + "traits": { + "smithy.api#documentation": "

    An array where each item in the array is a log group to include in the Live Tail session.

    \n

    Specify each log group by its ARN.

    \n

    If you specify an ARN, the ARN can't end with an asterisk (*).

    \n \n

    You can include up to 10 log groups.

    \n
    ", + "smithy.api#required": {} + } + }, + "logStreamNames": { + "target": "com.amazonaws.cloudwatchlogs#InputLogStreamNames", + "traits": { + "smithy.api#documentation": "

    If you specify this parameter, then only log events in the log streams that you specify here are \n included in the Live Tail session.

    \n \n

    You can specify this parameter only if you specify only one log group in logGroupIdentifiers.

    \n
    " + } + }, + "logStreamNamePrefixes": { + "target": "com.amazonaws.cloudwatchlogs#InputLogStreamNames", + "traits": { + "smithy.api#documentation": "

    If you specify this parameter, then only log events in the log streams that have names that start with the \n prefixes that you specify here are \n included in the Live Tail session.

    \n \n

    You can specify this parameter only if you specify only one log group in logGroupIdentifiers.

    \n
    " + } + }, + "logEventFilterPattern": { + "target": "com.amazonaws.cloudwatchlogs#FilterPattern", + "traits": { + "smithy.api#documentation": "

    An optional pattern to use to filter the results to include only log events that match the pattern.\n For example, a filter pattern of error 404 causes only log events that include both error \n and 404 to be included in the Live Tail stream.

    \n

    Regular expression filter patterns are supported.

    \n

    For more information about filter pattern syntax, see Filter and Pattern Syntax.

    " + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.cloudwatchlogs#StartLiveTailResponse": { + "type": "structure", + "members": { + "responseStream": { + "target": "com.amazonaws.cloudwatchlogs#StartLiveTailResponseStream", + "traits": { + "smithy.api#documentation": "

    An object that includes the stream returned by your request. It can include both log events and exceptions.

    " + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.cloudwatchlogs#StartLiveTailResponseStream": { + "type": "union", + "members": { + "sessionStart": { + "target": "com.amazonaws.cloudwatchlogs#LiveTailSessionStart", + "traits": { + "smithy.api#documentation": "

    This object contains information about this Live Tail session, including the log groups included and the \n log stream filters, if any.

    " + } + }, + "sessionUpdate": { + "target": "com.amazonaws.cloudwatchlogs#LiveTailSessionUpdate", + "traits": { + "smithy.api#documentation": "

    This object contains the log events and session metadata.

    " + } + }, + "SessionTimeoutException": { + "target": "com.amazonaws.cloudwatchlogs#SessionTimeoutException", + "traits": { + "smithy.api#documentation": "

    This exception is returned in the stream when the Live Tail session times out. Live Tail sessions time\n out after three hours.

    " + } + }, + "SessionStreamingException": { + "target": "com.amazonaws.cloudwatchlogs#SessionStreamingException", + "traits": { + "smithy.api#documentation": "

    This exception is returned if an unknown error occurs.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    This object includes the stream returned by your \n StartLiveTail\n request.

    ", + "smithy.api#streaming": {} + } + }, "com.amazonaws.cloudwatchlogs#StartQuery": { "type": "operation", "input": {