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.
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.
+ *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: MiddlewareStackAn 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?: RecordThis 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.
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.
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.
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.
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.
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.
+ *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
.
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
.
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: __ExceptionOptionTypeThis 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: __ExceptionOptionTypeThis 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 VisitorAn object that includes the stream returned by your request. It can include both log events and exceptions.
+ */ + responseStream?: AsyncIterableReserved.
@@ -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 +): PromiseCreates a delivery. A delivery is a connection between a logical delivery source and a logical\n delivery destination\n that you have already created.
\nOnly 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
\nA delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Kinesis Data Firehose.
\nTo configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:
\nCreate 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.
\nCreate a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.
\nIf 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
\nUse CreateDelivery
to create a delivery by pairing exactly one delivery source and one delivery destination.\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.
\nYou 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.
\nOnly 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
\nA delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Kinesis Data Firehose.
\nTo configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:
\nCreate 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.
\nCreate a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.
\nIf 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
\nUse CreateDelivery
to create a delivery by pairing exactly one delivery source and one delivery destination.\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.
\nYou 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:
\nThe Standard
log class supports all CloudWatch Logs features.
The Infrequent Access
log class supports a subset of CloudWatch Logs features\n and incurs lower costs.
If you omit this parameter, the default of STANDARD
is used.
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:
\nThe Standard
log class supports all CloudWatch Logs features.
The Infrequent Access
log class supports a subset of CloudWatch Logs features\n and incurs lower costs.
If you omit this parameter, the default of STANDARD
is used.
After a log group is created, its class can't be changed.
\nFor 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.
\nTo configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:
\nCreate 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.
\nCreate a delivery destination, which is a logical object that represents the actual\n delivery destination.
\nIf 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
\nCreate a delivery by pairing exactly one delivery source and one delivery destination.\n For more information, see CreateDelivery.
\nYou 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.
\nTo configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:
\nCreate 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.
\nCreate a delivery destination, which is a logical object that represents the actual\n delivery destination.
\nIf 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
\nCreate a delivery by pairing exactly one delivery source and one delivery destination.\n For more information, see CreateDelivery.
\nYou 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.
\nOnly 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
\nTo configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:
\nCreate 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.
\nCreate a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.
\nIf 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
\nCreate a delivery by pairing exactly one delivery source and one delivery destination.\n For more information, see CreateDelivery.
\nYou 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.
\nOnly 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
\nTo configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:
\nCreate 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.
\nCreate a delivery destination, which is a logical object that represents the actual\n delivery destination. For more \n information, see PutDeliveryDestination.
\nIf 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
\nCreate a delivery by pairing exactly one delivery source and one delivery destination.\n For more information, see CreateDelivery.
\nYou 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.
\nYou can use the queryDefinitionNamePrefix
parameter to limit the results to only the\n query definitions that have names that start with a certain string.
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.
\nYou can use the queryDefinitionNamePrefix
parameter to limit the results to only the\n query definitions that have names that start with a certain string.
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.
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.
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.
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.
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.
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
.
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.
\nA 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.
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.
\nTo configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:
\nCreate 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.
\nUse PutDeliveryDestination
to create a delivery destination, which is a logical object that represents the actual\n delivery destination.
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
\nUse CreateDelivery
to create a delivery by pairing exactly \n one delivery source and one delivery destination. For more \n information, see CreateDelivery.\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.
\nOnly 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
\nIf 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.
\nTo configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:
\nCreate 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.
\nUse PutDeliveryDestination
to create a delivery destination, which is a logical object that represents the actual\n delivery destination.
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
\nUse CreateDelivery
to create a delivery by pairing exactly \n one delivery source and one delivery destination. For more \n information, see CreateDelivery.\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.
\nOnly 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
\nIf 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.
\nTo 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:
\nUse PutDeliverySource
to create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs.
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.
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
\nUse CreateDelivery
to create a delivery by pairing exactly \n one delivery source and one delivery destination. For more \n information, see CreateDelivery.\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.
\nOnly 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
\nIf 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.
\nTo 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:
\nUse PutDeliverySource
to create a delivery source, which is a logical object that represents the resource that is actually\n sending the logs.
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.
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
\nUse CreateDelivery
to create a delivery by pairing exactly \n one delivery source and one delivery destination. For more \n information, see CreateDelivery.\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.
\nOnly 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
\nIf 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
\nThe response to this operation is a response stream, over which \n the server sends live log events and the client receives them.
\nThe following objects are sent over the stream:
\nA single LiveTailSessionStart \n object is sent at the start of the session.
\nEvery second, a LiveTailSessionUpdate\n object is sent. Each of these objects contains an array of the actual log events.
\nIf no new log events were ingested in the past second, the \n LiveTailSessionUpdate
object will contain an empty array.
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.
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.
A SessionStreamingException \n object is returned if an unknown error occurs on the server side.
\nA SessionTimeoutException \n object is returned when the session times out, after it has been kept open for three hours.
\nYou 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.
\nAn array where each item in the array is a log group to include in the Live Tail session.
\nSpecify each log group by its ARN.
\nIf you specify an ARN, the ARN can't end with an asterisk (*).
\nYou can include up to 10 log groups.
\nIf you specify this parameter, then only log events in the log streams that you specify here are \n included in the Live Tail session.
\nYou can specify this parameter only if you specify only one log group in logGroupIdentifiers
.
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.
\nYou can specify this parameter only if you specify only one log group in logGroupIdentifiers
.
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.
Regular expression filter patterns are supported.
\nFor 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": {