@aws-sdk/client-cloudwatch-logs 3.468.0 → 3.472.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +8 -0
  2. package/dist-cjs/CloudWatchLogs.js +2 -0
  3. package/dist-cjs/CloudWatchLogsClient.js +5 -3
  4. package/dist-cjs/commands/StartLiveTailCommand.js +52 -0
  5. package/dist-cjs/commands/index.js +1 -0
  6. package/dist-cjs/models/models_0.js +59 -1
  7. package/dist-cjs/protocols/Aws_json1_1.js +128 -2
  8. package/dist-cjs/runtimeConfig.browser.js +2 -0
  9. package/dist-cjs/runtimeConfig.js +2 -0
  10. package/dist-es/CloudWatchLogs.js +2 -0
  11. package/dist-es/CloudWatchLogsClient.js +5 -3
  12. package/dist-es/commands/StartLiveTailCommand.js +48 -0
  13. package/dist-es/commands/index.js +1 -0
  14. package/dist-es/models/models_0.js +54 -0
  15. package/dist-es/protocols/Aws_json1_1.js +126 -2
  16. package/dist-es/runtimeConfig.browser.js +2 -0
  17. package/dist-es/runtimeConfig.js +2 -0
  18. package/dist-types/CloudWatchLogs.d.ts +7 -0
  19. package/dist-types/CloudWatchLogsClient.d.ts +11 -5
  20. package/dist-types/commands/CreateDeliveryCommand.d.ts +1 -1
  21. package/dist-types/commands/DescribeQueryDefinitionsCommand.d.ts +2 -1
  22. package/dist-types/commands/PutDeliveryDestinationCommand.d.ts +1 -1
  23. package/dist-types/commands/PutDeliverySourceCommand.d.ts +1 -1
  24. package/dist-types/commands/StartLiveTailCommand.d.ts +169 -0
  25. package/dist-types/commands/index.d.ts +1 -0
  26. package/dist-types/models/models_0.d.ts +278 -4
  27. package/dist-types/protocols/Aws_json1_1.d.ts +10 -1
  28. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  29. package/dist-types/runtimeConfig.d.ts +1 -0
  30. package/dist-types/runtimeConfig.native.d.ts +1 -0
  31. package/dist-types/ts3.4/CloudWatchLogs.d.ts +17 -0
  32. package/dist-types/ts3.4/CloudWatchLogsClient.d.ts +14 -0
  33. package/dist-types/ts3.4/commands/StartLiveTailCommand.d.ts +38 -0
  34. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  35. package/dist-types/ts3.4/models/models_0.d.ts +105 -0
  36. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +16 -1
  37. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -0
  38. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
  39. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  40. package/package.json +16 -13
@@ -1,8 +1,8 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
1
+ import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
2
2
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { CloudWatchLogsServiceException as __BaseException } from "../models/CloudWatchLogsServiceException";
5
- import { AccessDeniedException, ConflictException, DataAlreadyAcceptedException, InvalidOperationException, InvalidParameterException, InvalidSequenceTokenException, LimitExceededException, MalformedQueryException, OperationAbortedException, ResourceAlreadyExistsException, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, ThrottlingException, TooManyTagsException, UnrecognizedClientException, ValidationException, } from "../models/models_0";
5
+ import { AccessDeniedException, ConflictException, DataAlreadyAcceptedException, InvalidOperationException, InvalidParameterException, InvalidSequenceTokenException, LimitExceededException, MalformedQueryException, OperationAbortedException, ResourceAlreadyExistsException, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, SessionStreamingException, SessionTimeoutException, ThrottlingException, TooManyTagsException, UnrecognizedClientException, ValidationException, } from "../models/models_0";
6
6
  export const se_AssociateKmsKeyCommand = async (input, context) => {
7
7
  const headers = sharedHeaders("AssociateKmsKey");
8
8
  let body;
@@ -387,6 +387,19 @@ export const se_PutSubscriptionFilterCommand = async (input, context) => {
387
387
  body = JSON.stringify(_json(input));
388
388
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
389
389
  };
390
+ export const se_StartLiveTailCommand = async (input, context) => {
391
+ const headers = sharedHeaders("StartLiveTail");
392
+ let body;
393
+ body = JSON.stringify(_json(input));
394
+ let { hostname: resolvedHostname } = await context.endpoint();
395
+ if (context.disableHostPrefix !== true) {
396
+ resolvedHostname = "streaming-" + resolvedHostname;
397
+ if (!__isValidHostname(resolvedHostname)) {
398
+ throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
399
+ }
400
+ }
401
+ return buildHttpRpcRequest(context, headers, "/", resolvedHostname, body);
402
+ };
390
403
  export const se_StartQueryCommand = async (input, context) => {
391
404
  const headers = sharedHeaders("StartQuery");
392
405
  let body;
@@ -2993,6 +3006,48 @@ const de_PutSubscriptionFilterCommandError = async (output, context) => {
2993
3006
  });
2994
3007
  }
2995
3008
  };
3009
+ export const de_StartLiveTailCommand = async (output, context) => {
3010
+ if (output.statusCode >= 300) {
3011
+ return de_StartLiveTailCommandError(output, context);
3012
+ }
3013
+ const contents = { responseStream: de_StartLiveTailResponseStream(output.body, context) };
3014
+ const response = {
3015
+ $metadata: deserializeMetadata(output),
3016
+ ...contents,
3017
+ };
3018
+ return response;
3019
+ };
3020
+ const de_StartLiveTailCommandError = async (output, context) => {
3021
+ const parsedOutput = {
3022
+ ...output,
3023
+ body: await parseErrorBody(output.body, context),
3024
+ };
3025
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3026
+ switch (errorCode) {
3027
+ case "AccessDeniedException":
3028
+ case "com.amazonaws.cloudwatchlogs#AccessDeniedException":
3029
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3030
+ case "InvalidOperationException":
3031
+ case "com.amazonaws.cloudwatchlogs#InvalidOperationException":
3032
+ throw await de_InvalidOperationExceptionRes(parsedOutput, context);
3033
+ case "InvalidParameterException":
3034
+ case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
3035
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3036
+ case "LimitExceededException":
3037
+ case "com.amazonaws.cloudwatchlogs#LimitExceededException":
3038
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
3039
+ case "ResourceNotFoundException":
3040
+ case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
3041
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3042
+ default:
3043
+ const parsedBody = parsedOutput.body;
3044
+ return throwDefaultError({
3045
+ output,
3046
+ parsedBody,
3047
+ errorCode,
3048
+ });
3049
+ }
3050
+ };
2996
3051
  export const de_StartQueryCommand = async (output, context) => {
2997
3052
  if (output.statusCode >= 300) {
2998
3053
  return de_StartQueryCommandError(output, context);
@@ -3473,6 +3528,75 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
3473
3528
  });
3474
3529
  return __decorateServiceException(exception, body);
3475
3530
  };
3531
+ const de_StartLiveTailResponseStream = (output, context) => {
3532
+ return context.eventStreamMarshaller.deserialize(output, async (event) => {
3533
+ if (event["sessionStart"] != null) {
3534
+ return {
3535
+ sessionStart: await de_LiveTailSessionStart_event(event["sessionStart"], context),
3536
+ };
3537
+ }
3538
+ if (event["sessionUpdate"] != null) {
3539
+ return {
3540
+ sessionUpdate: await de_LiveTailSessionUpdate_event(event["sessionUpdate"], context),
3541
+ };
3542
+ }
3543
+ if (event["SessionTimeoutException"] != null) {
3544
+ return {
3545
+ SessionTimeoutException: await de_SessionTimeoutException_event(event["SessionTimeoutException"], context),
3546
+ };
3547
+ }
3548
+ if (event["SessionStreamingException"] != null) {
3549
+ return {
3550
+ SessionStreamingException: await de_SessionStreamingException_event(event["SessionStreamingException"], context),
3551
+ };
3552
+ }
3553
+ return { $unknown: output };
3554
+ });
3555
+ };
3556
+ const de_LiveTailSessionStart_event = async (output, context) => {
3557
+ const contents = {};
3558
+ const data = await parseBody(output.body, context);
3559
+ Object.assign(contents, _json(data));
3560
+ return contents;
3561
+ };
3562
+ const de_LiveTailSessionUpdate_event = async (output, context) => {
3563
+ const contents = {};
3564
+ const data = await parseBody(output.body, context);
3565
+ Object.assign(contents, _json(data));
3566
+ return contents;
3567
+ };
3568
+ const de_SessionStreamingException_event = async (output, context) => {
3569
+ const parsedOutput = {
3570
+ ...output,
3571
+ body: await parseBody(output.body, context),
3572
+ };
3573
+ return de_SessionStreamingExceptionRes(parsedOutput, context);
3574
+ };
3575
+ const de_SessionTimeoutException_event = async (output, context) => {
3576
+ const parsedOutput = {
3577
+ ...output,
3578
+ body: await parseBody(output.body, context),
3579
+ };
3580
+ return de_SessionTimeoutExceptionRes(parsedOutput, context);
3581
+ };
3582
+ const de_SessionStreamingExceptionRes = async (parsedOutput, context) => {
3583
+ const body = parsedOutput.body;
3584
+ const deserialized = _json(body);
3585
+ const exception = new SessionStreamingException({
3586
+ $metadata: deserializeMetadata(parsedOutput),
3587
+ ...deserialized,
3588
+ });
3589
+ return __decorateServiceException(exception, body);
3590
+ };
3591
+ const de_SessionTimeoutExceptionRes = async (parsedOutput, context) => {
3592
+ const body = parsedOutput.body;
3593
+ const deserialized = _json(body);
3594
+ const exception = new SessionTimeoutException({
3595
+ $metadata: deserializeMetadata(parsedOutput),
3596
+ ...deserialized,
3597
+ });
3598
+ return __decorateServiceException(exception, body);
3599
+ };
3476
3600
  const se_MetricTransformation = (input, context) => {
3477
3601
  return take(input, {
3478
3602
  defaultValue: __serializeFloat,
@@ -2,6 +2,7 @@ import packageInfo from "../package.json";
2
2
  import { Sha256 } from "@aws-crypto/sha256-browser";
3
3
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
5
+ import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-browser";
5
6
  import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
6
7
  import { invalidProvider } from "@smithy/invalid-dependency";
7
8
  import { calculateBodyLength } from "@smithy/util-body-length-browser";
@@ -22,6 +23,7 @@ export const getRuntimeConfig = (config) => {
22
23
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
23
24
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
24
25
  defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
26
+ eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
25
27
  maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
26
28
  region: config?.region ?? invalidProvider("Region is missing"),
27
29
  requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
@@ -4,6 +4,7 @@ import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/cor
4
4
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
5
5
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
6
6
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
7
+ import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-node";
7
8
  import { Hash } from "@smithy/hash-node";
8
9
  import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
9
10
  import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
@@ -29,6 +30,7 @@ export const getRuntimeConfig = (config) => {
29
30
  credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
30
31
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
31
32
  defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
33
+ eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
32
34
  maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
33
35
  region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
34
36
  requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
@@ -64,6 +64,7 @@ import { PutQueryDefinitionCommandInput, PutQueryDefinitionCommandOutput } from
64
64
  import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand";
65
65
  import { PutRetentionPolicyCommandInput, PutRetentionPolicyCommandOutput } from "./commands/PutRetentionPolicyCommand";
66
66
  import { PutSubscriptionFilterCommandInput, PutSubscriptionFilterCommandOutput } from "./commands/PutSubscriptionFilterCommand";
67
+ import { StartLiveTailCommandInput, StartLiveTailCommandOutput } from "./commands/StartLiveTailCommand";
67
68
  import { StartQueryCommandInput, StartQueryCommandOutput } from "./commands/StartQueryCommand";
68
69
  import { StopQueryCommandInput, StopQueryCommandOutput } from "./commands/StopQueryCommand";
69
70
  import { TagLogGroupCommandInput, TagLogGroupCommandOutput } from "./commands/TagLogGroupCommand";
@@ -458,6 +459,12 @@ export interface CloudWatchLogs {
458
459
  putSubscriptionFilter(args: PutSubscriptionFilterCommandInput, options?: __HttpHandlerOptions): Promise<PutSubscriptionFilterCommandOutput>;
459
460
  putSubscriptionFilter(args: PutSubscriptionFilterCommandInput, cb: (err: any, data?: PutSubscriptionFilterCommandOutput) => void): void;
460
461
  putSubscriptionFilter(args: PutSubscriptionFilterCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutSubscriptionFilterCommandOutput) => void): void;
462
+ /**
463
+ * @see {@link StartLiveTailCommand}
464
+ */
465
+ startLiveTail(args: StartLiveTailCommandInput, options?: __HttpHandlerOptions): Promise<StartLiveTailCommandOutput>;
466
+ startLiveTail(args: StartLiveTailCommandInput, cb: (err: any, data?: StartLiveTailCommandOutput) => void): void;
467
+ startLiveTail(args: StartLiveTailCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartLiveTailCommandOutput) => void): void;
461
468
  /**
462
469
  * @see {@link StartQueryCommand}
463
470
  */
@@ -3,11 +3,12 @@ import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-s
3
3
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
4
4
  import { Credentials as __Credentials } from "@aws-sdk/types";
5
5
  import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
6
+ import { EventStreamSerdeInputConfig, EventStreamSerdeResolvedConfig } from "@smithy/eventstream-serde-config-resolver";
6
7
  import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
7
8
  import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
8
9
  import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
9
10
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
10
- import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
11
+ import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, EventStreamSerdeProvider as __EventStreamSerdeProvider, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
11
12
  import { AssociateKmsKeyCommandInput, AssociateKmsKeyCommandOutput } from "./commands/AssociateKmsKeyCommand";
12
13
  import { CancelExportTaskCommandInput, CancelExportTaskCommandOutput } from "./commands/CancelExportTaskCommand";
13
14
  import { CreateDeliveryCommandInput, CreateDeliveryCommandOutput } from "./commands/CreateDeliveryCommand";
@@ -72,6 +73,7 @@ import { PutQueryDefinitionCommandInput, PutQueryDefinitionCommandOutput } from
72
73
  import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand";
73
74
  import { PutRetentionPolicyCommandInput, PutRetentionPolicyCommandOutput } from "./commands/PutRetentionPolicyCommand";
74
75
  import { PutSubscriptionFilterCommandInput, PutSubscriptionFilterCommandOutput } from "./commands/PutSubscriptionFilterCommand";
76
+ import { StartLiveTailCommandInput, StartLiveTailCommandOutput } from "./commands/StartLiveTailCommand";
75
77
  import { StartQueryCommandInput, StartQueryCommandOutput } from "./commands/StartQueryCommand";
76
78
  import { StopQueryCommandInput, StopQueryCommandOutput } from "./commands/StopQueryCommand";
77
79
  import { TagLogGroupCommandInput, TagLogGroupCommandOutput } from "./commands/TagLogGroupCommand";
@@ -87,11 +89,11 @@ export { __Client };
87
89
  /**
88
90
  * @public
89
91
  */
90
- export type ServiceInputTypes = AssociateKmsKeyCommandInput | CancelExportTaskCommandInput | CreateDeliveryCommandInput | CreateExportTaskCommandInput | CreateLogAnomalyDetectorCommandInput | CreateLogGroupCommandInput | CreateLogStreamCommandInput | DeleteAccountPolicyCommandInput | DeleteDataProtectionPolicyCommandInput | DeleteDeliveryCommandInput | DeleteDeliveryDestinationCommandInput | DeleteDeliveryDestinationPolicyCommandInput | DeleteDeliverySourceCommandInput | DeleteDestinationCommandInput | DeleteLogAnomalyDetectorCommandInput | DeleteLogGroupCommandInput | DeleteLogStreamCommandInput | DeleteMetricFilterCommandInput | DeleteQueryDefinitionCommandInput | DeleteResourcePolicyCommandInput | DeleteRetentionPolicyCommandInput | DeleteSubscriptionFilterCommandInput | DescribeAccountPoliciesCommandInput | DescribeDeliveriesCommandInput | DescribeDeliveryDestinationsCommandInput | DescribeDeliverySourcesCommandInput | DescribeDestinationsCommandInput | DescribeExportTasksCommandInput | DescribeLogGroupsCommandInput | DescribeLogStreamsCommandInput | DescribeMetricFiltersCommandInput | DescribeQueriesCommandInput | DescribeQueryDefinitionsCommandInput | DescribeResourcePoliciesCommandInput | DescribeSubscriptionFiltersCommandInput | DisassociateKmsKeyCommandInput | FilterLogEventsCommandInput | GetDataProtectionPolicyCommandInput | GetDeliveryCommandInput | GetDeliveryDestinationCommandInput | GetDeliveryDestinationPolicyCommandInput | GetDeliverySourceCommandInput | GetLogAnomalyDetectorCommandInput | GetLogEventsCommandInput | GetLogGroupFieldsCommandInput | GetLogRecordCommandInput | GetQueryResultsCommandInput | ListAnomaliesCommandInput | ListLogAnomalyDetectorsCommandInput | ListTagsForResourceCommandInput | ListTagsLogGroupCommandInput | PutAccountPolicyCommandInput | PutDataProtectionPolicyCommandInput | PutDeliveryDestinationCommandInput | PutDeliveryDestinationPolicyCommandInput | PutDeliverySourceCommandInput | PutDestinationCommandInput | PutDestinationPolicyCommandInput | PutLogEventsCommandInput | PutMetricFilterCommandInput | PutQueryDefinitionCommandInput | PutResourcePolicyCommandInput | PutRetentionPolicyCommandInput | PutSubscriptionFilterCommandInput | StartQueryCommandInput | StopQueryCommandInput | TagLogGroupCommandInput | TagResourceCommandInput | TestMetricFilterCommandInput | UntagLogGroupCommandInput | UntagResourceCommandInput | UpdateAnomalyCommandInput | UpdateLogAnomalyDetectorCommandInput;
92
+ export type ServiceInputTypes = AssociateKmsKeyCommandInput | CancelExportTaskCommandInput | CreateDeliveryCommandInput | CreateExportTaskCommandInput | CreateLogAnomalyDetectorCommandInput | CreateLogGroupCommandInput | CreateLogStreamCommandInput | DeleteAccountPolicyCommandInput | DeleteDataProtectionPolicyCommandInput | DeleteDeliveryCommandInput | DeleteDeliveryDestinationCommandInput | DeleteDeliveryDestinationPolicyCommandInput | DeleteDeliverySourceCommandInput | DeleteDestinationCommandInput | DeleteLogAnomalyDetectorCommandInput | DeleteLogGroupCommandInput | DeleteLogStreamCommandInput | DeleteMetricFilterCommandInput | DeleteQueryDefinitionCommandInput | DeleteResourcePolicyCommandInput | DeleteRetentionPolicyCommandInput | DeleteSubscriptionFilterCommandInput | DescribeAccountPoliciesCommandInput | DescribeDeliveriesCommandInput | DescribeDeliveryDestinationsCommandInput | DescribeDeliverySourcesCommandInput | DescribeDestinationsCommandInput | DescribeExportTasksCommandInput | DescribeLogGroupsCommandInput | DescribeLogStreamsCommandInput | DescribeMetricFiltersCommandInput | DescribeQueriesCommandInput | DescribeQueryDefinitionsCommandInput | DescribeResourcePoliciesCommandInput | DescribeSubscriptionFiltersCommandInput | DisassociateKmsKeyCommandInput | FilterLogEventsCommandInput | GetDataProtectionPolicyCommandInput | GetDeliveryCommandInput | GetDeliveryDestinationCommandInput | GetDeliveryDestinationPolicyCommandInput | GetDeliverySourceCommandInput | GetLogAnomalyDetectorCommandInput | GetLogEventsCommandInput | GetLogGroupFieldsCommandInput | GetLogRecordCommandInput | GetQueryResultsCommandInput | ListAnomaliesCommandInput | ListLogAnomalyDetectorsCommandInput | ListTagsForResourceCommandInput | ListTagsLogGroupCommandInput | PutAccountPolicyCommandInput | PutDataProtectionPolicyCommandInput | PutDeliveryDestinationCommandInput | PutDeliveryDestinationPolicyCommandInput | PutDeliverySourceCommandInput | PutDestinationCommandInput | PutDestinationPolicyCommandInput | PutLogEventsCommandInput | PutMetricFilterCommandInput | PutQueryDefinitionCommandInput | PutResourcePolicyCommandInput | PutRetentionPolicyCommandInput | PutSubscriptionFilterCommandInput | StartLiveTailCommandInput | StartQueryCommandInput | StopQueryCommandInput | TagLogGroupCommandInput | TagResourceCommandInput | TestMetricFilterCommandInput | UntagLogGroupCommandInput | UntagResourceCommandInput | UpdateAnomalyCommandInput | UpdateLogAnomalyDetectorCommandInput;
91
93
  /**
92
94
  * @public
93
95
  */
94
- export type ServiceOutputTypes = AssociateKmsKeyCommandOutput | CancelExportTaskCommandOutput | CreateDeliveryCommandOutput | CreateExportTaskCommandOutput | CreateLogAnomalyDetectorCommandOutput | CreateLogGroupCommandOutput | CreateLogStreamCommandOutput | DeleteAccountPolicyCommandOutput | DeleteDataProtectionPolicyCommandOutput | DeleteDeliveryCommandOutput | DeleteDeliveryDestinationCommandOutput | DeleteDeliveryDestinationPolicyCommandOutput | DeleteDeliverySourceCommandOutput | DeleteDestinationCommandOutput | DeleteLogAnomalyDetectorCommandOutput | DeleteLogGroupCommandOutput | DeleteLogStreamCommandOutput | DeleteMetricFilterCommandOutput | DeleteQueryDefinitionCommandOutput | DeleteResourcePolicyCommandOutput | DeleteRetentionPolicyCommandOutput | DeleteSubscriptionFilterCommandOutput | DescribeAccountPoliciesCommandOutput | DescribeDeliveriesCommandOutput | DescribeDeliveryDestinationsCommandOutput | DescribeDeliverySourcesCommandOutput | DescribeDestinationsCommandOutput | DescribeExportTasksCommandOutput | DescribeLogGroupsCommandOutput | DescribeLogStreamsCommandOutput | DescribeMetricFiltersCommandOutput | DescribeQueriesCommandOutput | DescribeQueryDefinitionsCommandOutput | DescribeResourcePoliciesCommandOutput | DescribeSubscriptionFiltersCommandOutput | DisassociateKmsKeyCommandOutput | FilterLogEventsCommandOutput | GetDataProtectionPolicyCommandOutput | GetDeliveryCommandOutput | GetDeliveryDestinationCommandOutput | GetDeliveryDestinationPolicyCommandOutput | GetDeliverySourceCommandOutput | GetLogAnomalyDetectorCommandOutput | GetLogEventsCommandOutput | GetLogGroupFieldsCommandOutput | GetLogRecordCommandOutput | GetQueryResultsCommandOutput | ListAnomaliesCommandOutput | ListLogAnomalyDetectorsCommandOutput | ListTagsForResourceCommandOutput | ListTagsLogGroupCommandOutput | PutAccountPolicyCommandOutput | PutDataProtectionPolicyCommandOutput | PutDeliveryDestinationCommandOutput | PutDeliveryDestinationPolicyCommandOutput | PutDeliverySourceCommandOutput | PutDestinationCommandOutput | PutDestinationPolicyCommandOutput | PutLogEventsCommandOutput | PutMetricFilterCommandOutput | PutQueryDefinitionCommandOutput | PutResourcePolicyCommandOutput | PutRetentionPolicyCommandOutput | PutSubscriptionFilterCommandOutput | StartQueryCommandOutput | StopQueryCommandOutput | TagLogGroupCommandOutput | TagResourceCommandOutput | TestMetricFilterCommandOutput | UntagLogGroupCommandOutput | UntagResourceCommandOutput | UpdateAnomalyCommandOutput | UpdateLogAnomalyDetectorCommandOutput;
96
+ export type ServiceOutputTypes = AssociateKmsKeyCommandOutput | CancelExportTaskCommandOutput | CreateDeliveryCommandOutput | CreateExportTaskCommandOutput | CreateLogAnomalyDetectorCommandOutput | CreateLogGroupCommandOutput | CreateLogStreamCommandOutput | DeleteAccountPolicyCommandOutput | DeleteDataProtectionPolicyCommandOutput | DeleteDeliveryCommandOutput | DeleteDeliveryDestinationCommandOutput | DeleteDeliveryDestinationPolicyCommandOutput | DeleteDeliverySourceCommandOutput | DeleteDestinationCommandOutput | DeleteLogAnomalyDetectorCommandOutput | DeleteLogGroupCommandOutput | DeleteLogStreamCommandOutput | DeleteMetricFilterCommandOutput | DeleteQueryDefinitionCommandOutput | DeleteResourcePolicyCommandOutput | DeleteRetentionPolicyCommandOutput | DeleteSubscriptionFilterCommandOutput | DescribeAccountPoliciesCommandOutput | DescribeDeliveriesCommandOutput | DescribeDeliveryDestinationsCommandOutput | DescribeDeliverySourcesCommandOutput | DescribeDestinationsCommandOutput | DescribeExportTasksCommandOutput | DescribeLogGroupsCommandOutput | DescribeLogStreamsCommandOutput | DescribeMetricFiltersCommandOutput | DescribeQueriesCommandOutput | DescribeQueryDefinitionsCommandOutput | DescribeResourcePoliciesCommandOutput | DescribeSubscriptionFiltersCommandOutput | DisassociateKmsKeyCommandOutput | FilterLogEventsCommandOutput | GetDataProtectionPolicyCommandOutput | GetDeliveryCommandOutput | GetDeliveryDestinationCommandOutput | GetDeliveryDestinationPolicyCommandOutput | GetDeliverySourceCommandOutput | GetLogAnomalyDetectorCommandOutput | GetLogEventsCommandOutput | GetLogGroupFieldsCommandOutput | GetLogRecordCommandOutput | GetQueryResultsCommandOutput | ListAnomaliesCommandOutput | ListLogAnomalyDetectorsCommandOutput | ListTagsForResourceCommandOutput | ListTagsLogGroupCommandOutput | PutAccountPolicyCommandOutput | PutDataProtectionPolicyCommandOutput | PutDeliveryDestinationCommandOutput | PutDeliveryDestinationPolicyCommandOutput | PutDeliverySourceCommandOutput | PutDestinationCommandOutput | PutDestinationPolicyCommandOutput | PutLogEventsCommandOutput | PutMetricFilterCommandOutput | PutQueryDefinitionCommandOutput | PutResourcePolicyCommandOutput | PutRetentionPolicyCommandOutput | PutSubscriptionFilterCommandOutput | StartLiveTailCommandOutput | StartQueryCommandOutput | StopQueryCommandOutput | TagLogGroupCommandOutput | TagResourceCommandOutput | TestMetricFilterCommandOutput | UntagLogGroupCommandOutput | UntagResourceCommandOutput | UpdateAnomalyCommandOutput | UpdateLogAnomalyDetectorCommandOutput;
95
97
  /**
96
98
  * @public
97
99
  */
@@ -196,6 +198,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
196
198
  * Optional extensions
197
199
  */
198
200
  extensions?: RuntimeExtension[];
201
+ /**
202
+ * The function that provides necessary utilities for generating and parsing event stream
203
+ */
204
+ eventStreamSerdeProvider?: __EventStreamSerdeProvider;
199
205
  /**
200
206
  * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
201
207
  */
@@ -204,7 +210,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
204
210
  /**
205
211
  * @public
206
212
  */
207
- export type CloudWatchLogsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & ClientInputEndpointParameters;
213
+ export type CloudWatchLogsClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & EventStreamSerdeInputConfig & ClientInputEndpointParameters;
208
214
  /**
209
215
  * @public
210
216
  *
@@ -215,7 +221,7 @@ export interface CloudWatchLogsClientConfig extends CloudWatchLogsClientConfigTy
215
221
  /**
216
222
  * @public
217
223
  */
218
- export type CloudWatchLogsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & ClientResolvedEndpointParameters;
224
+ export type CloudWatchLogsClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & EventStreamSerdeResolvedConfig & ClientResolvedEndpointParameters;
219
225
  /**
220
226
  * @public
221
227
  *
@@ -46,7 +46,7 @@ export interface CreateDeliveryCommandOutput extends CreateDeliveryResponse, __M
46
46
  * </li>
47
47
  * <li>
48
48
  * <p>If you are delivering logs cross-account, you must use
49
- * <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html">PutDeliveryDestinationPolicy</a>
49
+ * <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html">PutDeliveryDestinationPolicy</a>
50
50
  * in the destination account to assign an IAM policy to the
51
51
  * destination. This policy allows delivery to that destination.
52
52
  * </p>
@@ -23,7 +23,8 @@ export interface DescribeQueryDefinitionsCommandOutput extends DescribeQueryDefi
23
23
  }
24
24
  /**
25
25
  * @public
26
- * <p>This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions.</p>
26
+ * <p>This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions. You can
27
+ * retrieve query definitions from the current account or from a source account that is linked to the current account.</p>
27
28
  * <p>You can use the <code>queryDefinitionNamePrefix</code> parameter to limit the results to only the
28
29
  * query definitions that have names that start with a certain string.</p>
29
30
  * @example
@@ -39,7 +39,7 @@ export interface PutDeliveryDestinationCommandOutput extends PutDeliveryDestinat
39
39
  * </li>
40
40
  * <li>
41
41
  * <p>If you are delivering logs cross-account, you must use
42
- * <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html">PutDeliveryDestinationPolicy</a>
42
+ * <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html">PutDeliveryDestinationPolicy</a>
43
43
  * in the destination account to assign an IAM policy to the
44
44
  * destination. This policy allows delivery to that destination.
45
45
  * </p>
@@ -38,7 +38,7 @@ export interface PutDeliverySourceCommandOutput extends PutDeliverySourceRespons
38
38
  * </li>
39
39
  * <li>
40
40
  * <p>If you are delivering logs cross-account, you must use
41
- * <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html">PutDeliveryDestinationPolicy</a>
41
+ * <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html">PutDeliveryDestinationPolicy</a>
42
42
  * in the destination account to assign an IAM policy to the
43
43
  * destination. This policy allows delivery to that destination.
44
44
  * </p>
@@ -0,0 +1,169 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
4
+ import { CloudWatchLogsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchLogsClient";
5
+ import { StartLiveTailRequest, StartLiveTailResponse } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link StartLiveTailCommand}.
14
+ */
15
+ export interface StartLiveTailCommandInput extends StartLiveTailRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link StartLiveTailCommand}.
21
+ */
22
+ export interface StartLiveTailCommandOutput extends StartLiveTailResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Starts a Live Tail streaming session for one or more log groups. A Live Tail session returns a stream of
27
+ * log events that have
28
+ * been recently ingested in the log groups. For more information, see
29
+ * <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs_LiveTail.html">Use Live Tail to view logs in near real time</a>.
30
+ * </p>
31
+ * <p>The response to this operation is a response stream, over which
32
+ * the server sends live log events and the client receives them.</p>
33
+ * <p>The following objects are sent over the stream:</p>
34
+ * <ul>
35
+ * <li>
36
+ * <p>A single <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_LiveTailSessionStart.html">LiveTailSessionStart</a>
37
+ * object is sent at the start of the session.</p>
38
+ * </li>
39
+ * <li>
40
+ * <p>Every second, a <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_LiveTailSessionUpdate.html">LiveTailSessionUpdate</a>
41
+ * object is sent. Each of these objects contains an array of the actual log events.</p>
42
+ * <p>If no new log events were ingested in the past second, the
43
+ * <code>LiveTailSessionUpdate</code> object will contain an empty array.</p>
44
+ * <p>The array of log events contained in a <code>LiveTailSessionUpdate</code> can include
45
+ * as many as 500 log events. If the number of log events matching the request exceeds 500 per second, the
46
+ * log events are sampled down to 500 log events to be included in each <code>LiveTailSessionUpdate</code> object.</p>
47
+ * <p>If your client consumes the log events slower than the server produces them, CloudWatch Logs
48
+ * buffers up to 10 <code>LiveTailSessionUpdate</code> events or 5000 log events, after
49
+ * which it starts dropping the oldest events.</p>
50
+ * </li>
51
+ * <li>
52
+ * <p>A <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionStreamingException.html">SessionStreamingException</a>
53
+ * object is returned if an unknown error occurs on the server side.</p>
54
+ * </li>
55
+ * <li>
56
+ * <p>A <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_SessionTimeoutException.html">SessionTimeoutException</a>
57
+ * object is returned when the session times out, after it has been kept open for three hours.</p>
58
+ * </li>
59
+ * </ul>
60
+ * <important>
61
+ * <p>You can end a session before it times out by closing the session stream or by closing the client that is receiving the
62
+ * stream. The session also ends if the established connection between the client and the server breaks.</p>
63
+ * </important>
64
+ * @example
65
+ * Use a bare-bones client and the command you need to make an API call.
66
+ * ```javascript
67
+ * import { CloudWatchLogsClient, StartLiveTailCommand } from "@aws-sdk/client-cloudwatch-logs"; // ES Modules import
68
+ * // const { CloudWatchLogsClient, StartLiveTailCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import
69
+ * const client = new CloudWatchLogsClient(config);
70
+ * const input = { // StartLiveTailRequest
71
+ * logGroupIdentifiers: [ // StartLiveTailLogGroupIdentifiers // required
72
+ * "STRING_VALUE",
73
+ * ],
74
+ * logStreamNames: [ // InputLogStreamNames
75
+ * "STRING_VALUE",
76
+ * ],
77
+ * logStreamNamePrefixes: [
78
+ * "STRING_VALUE",
79
+ * ],
80
+ * logEventFilterPattern: "STRING_VALUE",
81
+ * };
82
+ * const command = new StartLiveTailCommand(input);
83
+ * const response = await client.send(command);
84
+ * // { // StartLiveTailResponse
85
+ * // responseStream: { // StartLiveTailResponseStream Union: only one key present
86
+ * // sessionStart: { // LiveTailSessionStart
87
+ * // requestId: "STRING_VALUE",
88
+ * // sessionId: "STRING_VALUE",
89
+ * // logGroupIdentifiers: [ // StartLiveTailLogGroupIdentifiers
90
+ * // "STRING_VALUE",
91
+ * // ],
92
+ * // logStreamNames: [ // InputLogStreamNames
93
+ * // "STRING_VALUE",
94
+ * // ],
95
+ * // logStreamNamePrefixes: [
96
+ * // "STRING_VALUE",
97
+ * // ],
98
+ * // logEventFilterPattern: "STRING_VALUE",
99
+ * // },
100
+ * // sessionUpdate: { // LiveTailSessionUpdate
101
+ * // sessionMetadata: { // LiveTailSessionMetadata
102
+ * // sampled: true || false,
103
+ * // },
104
+ * // sessionResults: [ // LiveTailSessionResults
105
+ * // { // LiveTailSessionLogEvent
106
+ * // logStreamName: "STRING_VALUE",
107
+ * // logGroupIdentifier: "STRING_VALUE",
108
+ * // message: "STRING_VALUE",
109
+ * // timestamp: Number("long"),
110
+ * // ingestionTime: Number("long"),
111
+ * // },
112
+ * // ],
113
+ * // },
114
+ * // SessionTimeoutException: { // SessionTimeoutException
115
+ * // message: "STRING_VALUE",
116
+ * // },
117
+ * // SessionStreamingException: { // SessionStreamingException
118
+ * // message: "STRING_VALUE",
119
+ * // },
120
+ * // },
121
+ * // };
122
+ *
123
+ * ```
124
+ *
125
+ * @param StartLiveTailCommandInput - {@link StartLiveTailCommandInput}
126
+ * @returns {@link StartLiveTailCommandOutput}
127
+ * @see {@link StartLiveTailCommandInput} for command's `input` shape.
128
+ * @see {@link StartLiveTailCommandOutput} for command's `response` shape.
129
+ * @see {@link CloudWatchLogsClientResolvedConfig | config} for CloudWatchLogsClient's `config` shape.
130
+ *
131
+ * @throws {@link AccessDeniedException} (client fault)
132
+ * <p>You don't have sufficient permissions to perform this action.</p>
133
+ *
134
+ * @throws {@link InvalidOperationException} (client fault)
135
+ * <p>The operation is not valid on the specified resource.</p>
136
+ *
137
+ * @throws {@link InvalidParameterException} (client fault)
138
+ * <p>A parameter is specified incorrectly.</p>
139
+ *
140
+ * @throws {@link LimitExceededException} (client fault)
141
+ * <p>You have reached the maximum number of resources that can be created.</p>
142
+ *
143
+ * @throws {@link ResourceNotFoundException} (client fault)
144
+ * <p>The specified resource does not exist.</p>
145
+ *
146
+ * @throws {@link CloudWatchLogsServiceException}
147
+ * <p>Base exception class for all service exceptions from CloudWatchLogs service.</p>
148
+ *
149
+ */
150
+ export declare class StartLiveTailCommand extends $Command<StartLiveTailCommandInput, StartLiveTailCommandOutput, CloudWatchLogsClientResolvedConfig> {
151
+ readonly input: StartLiveTailCommandInput;
152
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
153
+ /**
154
+ * @public
155
+ */
156
+ constructor(input: StartLiveTailCommandInput);
157
+ /**
158
+ * @internal
159
+ */
160
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: CloudWatchLogsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<StartLiveTailCommandInput, StartLiveTailCommandOutput>;
161
+ /**
162
+ * @internal
163
+ */
164
+ private serialize;
165
+ /**
166
+ * @internal
167
+ */
168
+ private deserialize;
169
+ }
@@ -62,6 +62,7 @@ export * from "./PutQueryDefinitionCommand";
62
62
  export * from "./PutResourcePolicyCommand";
63
63
  export * from "./PutRetentionPolicyCommand";
64
64
  export * from "./PutSubscriptionFilterCommand";
65
+ export * from "./StartLiveTailCommand";
65
66
  export * from "./StartQueryCommand";
66
67
  export * from "./StopQueryCommand";
67
68
  export * from "./TagLogGroupCommand";