Skip to content

Commit

Permalink
feat(client-cloudwatch-logs): This release introduces the StartLiveTa…
Browse files Browse the repository at this point in the history
…il API to tail ingested logs in near real time.
  • Loading branch information
awstools committed Dec 12, 2023
1 parent 98c0145 commit 0385471
Show file tree
Hide file tree
Showing 15 changed files with 1,159 additions and 20 deletions.
8 changes: 8 additions & 0 deletions clients/client-cloudwatch-logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,14 @@ PutSubscriptionFilter

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/PutSubscriptionFilterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/PutSubscriptionFilterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/PutSubscriptionFilterCommandOutput/)

</details>
<details>
<summary>
StartLiveTail
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudwatch-logs/command/StartLiveTailCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/StartLiveTailCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudwatch-logs/Interface/StartLiveTailCommandOutput/)

</details>
<details>
<summary>
Expand Down
3 changes: 3 additions & 0 deletions clients/client-cloudwatch-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"@aws-sdk/util-user-agent-browser": "*",
"@aws-sdk/util-user-agent-node": "*",
"@smithy/config-resolver": "^2.0.21",
"@smithy/eventstream-serde-browser": "^2.0.15",
"@smithy/eventstream-serde-config-resolver": "^2.0.15",
"@smithy/eventstream-serde-node": "^2.0.15",
"@smithy/fetch-http-handler": "^2.3.1",
"@smithy/hash-node": "^2.0.17",
"@smithy/invalid-dependency": "^2.0.15",
Expand Down
17 changes: 17 additions & 0 deletions clients/client-cloudwatch-logs/src/CloudWatchLogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ import {
PutSubscriptionFilterCommandInput,
PutSubscriptionFilterCommandOutput,
} from "./commands/PutSubscriptionFilterCommand";
import {
StartLiveTailCommand,
StartLiveTailCommandInput,
StartLiveTailCommandOutput,
} from "./commands/StartLiveTailCommand";
import { StartQueryCommand, StartQueryCommandInput, StartQueryCommandOutput } from "./commands/StartQueryCommand";
import { StopQueryCommand, StopQueryCommandInput, StopQueryCommandOutput } from "./commands/StopQueryCommand";
import { TagLogGroupCommand, TagLogGroupCommandInput, TagLogGroupCommandOutput } from "./commands/TagLogGroupCommand";
Expand Down Expand Up @@ -414,6 +419,7 @@ const commands = {
PutResourcePolicyCommand,
PutRetentionPolicyCommand,
PutSubscriptionFilterCommand,
StartLiveTailCommand,
StartQueryCommand,
StopQueryCommand,
TagLogGroupCommand,
Expand Down Expand Up @@ -1448,6 +1454,17 @@ export interface CloudWatchLogs {
cb: (err: any, data?: PutSubscriptionFilterCommandOutput) => void
): void;

/**
* @see {@link StartLiveTailCommand}
*/
startLiveTail(args: StartLiveTailCommandInput, options?: __HttpHandlerOptions): Promise<StartLiveTailCommandOutput>;
startLiveTail(args: StartLiveTailCommandInput, cb: (err: any, data?: StartLiveTailCommandOutput) => void): void;
startLiveTail(
args: StartLiveTailCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartLiveTailCommandOutput) => void
): void;

/**
* @see {@link StartQueryCommand}
*/
Expand Down
23 changes: 20 additions & 3 deletions clients/client-cloudwatch-logs/src/CloudWatchLogsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ import {
} from "@aws-sdk/middleware-user-agent";
import { Credentials as __Credentials } from "@aws-sdk/types";
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver";
import {
EventStreamSerdeInputConfig,
EventStreamSerdeResolvedConfig,
resolveEventStreamSerdeConfig,
} from "@smithy/eventstream-serde-config-resolver";
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
Expand All @@ -38,6 +43,7 @@ import {
Decoder as __Decoder,
Encoder as __Encoder,
EndpointV2 as __EndpointV2,
EventStreamSerdeProvider as __EventStreamSerdeProvider,
HashConstructor as __HashConstructor,
HttpHandlerOptions as __HttpHandlerOptions,
Logger as __Logger,
Expand Down Expand Up @@ -205,6 +211,7 @@ import {
PutSubscriptionFilterCommandInput,
PutSubscriptionFilterCommandOutput,
} from "./commands/PutSubscriptionFilterCommand";
import { StartLiveTailCommandInput, StartLiveTailCommandOutput } from "./commands/StartLiveTailCommand";
import { StartQueryCommandInput, StartQueryCommandOutput } from "./commands/StartQueryCommand";
import { StopQueryCommandInput, StopQueryCommandOutput } from "./commands/StopQueryCommand";
import { TagLogGroupCommandInput, TagLogGroupCommandOutput } from "./commands/TagLogGroupCommand";
Expand Down Expand Up @@ -296,6 +303,7 @@ export type ServiceInputTypes =
| PutResourcePolicyCommandInput
| PutRetentionPolicyCommandInput
| PutSubscriptionFilterCommandInput
| StartLiveTailCommandInput
| StartQueryCommandInput
| StopQueryCommandInput
| TagLogGroupCommandInput
Expand Down Expand Up @@ -374,6 +382,7 @@ export type ServiceOutputTypes =
| PutResourcePolicyCommandOutput
| PutRetentionPolicyCommandOutput
| PutSubscriptionFilterCommandOutput
| StartLiveTailCommandOutput
| StartQueryCommandOutput
| StopQueryCommandOutput
| TagLogGroupCommandOutput
Expand Down Expand Up @@ -509,6 +518,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
extensions?: RuntimeExtension[];

/**
* The function that provides necessary utilities for generating and parsing event stream
*/
eventStreamSerdeProvider?: __EventStreamSerdeProvider;

/**
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
*/
Expand All @@ -526,6 +540,7 @@ export type CloudWatchLogsClientConfigType = Partial<__SmithyConfiguration<__Htt
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig &
EventStreamSerdeInputConfig &
ClientInputEndpointParameters;
/**
* @public
Expand All @@ -546,6 +561,7 @@ export type CloudWatchLogsClientResolvedConfigType = __SmithyResolvedConfigurati
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig &
EventStreamSerdeResolvedConfig &
ClientResolvedEndpointParameters;
/**
* @public
Expand Down Expand Up @@ -612,9 +628,10 @@ export class CloudWatchLogsClient extends __Client<
const _config_5 = resolveHostHeaderConfig(_config_4);
const _config_6 = resolveAwsAuthConfig(_config_5);
const _config_7 = resolveUserAgentConfig(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
super(_config_8);
this.config = _config_8;
const _config_8 = resolveEventStreamSerdeConfig(_config_7);
const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []);
super(_config_9);
this.config = _config_9;
this.middlewareStack.use(getRetryPlugin(this.config));
this.middlewareStack.use(getContentLengthPlugin(this.config));
this.middlewareStack.use(getHostHeaderPlugin(this.config));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface CreateDeliveryCommandOutput extends CreateDeliveryResponse, __M
* </li>
* <li>
* <p>If you are delivering logs cross-account, you must use
* <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html">PutDeliveryDestinationPolicy</a>
* <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html">PutDeliveryDestinationPolicy</a>
* in the destination account to assign an IAM policy to the
* destination. This policy allows delivery to that destination.
* </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export interface DescribeQueryDefinitionsCommandOutput extends DescribeQueryDefi

/**
* @public
* <p>This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions.</p>
* <p>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.</p>
* <p>You can use the <code>queryDefinitionNamePrefix</code> parameter to limit the results to only the
* query definitions that have names that start with a certain string.</p>
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface PutDeliveryDestinationCommandOutput extends PutDeliveryDestinat
* </li>
* <li>
* <p>If you are delivering logs cross-account, you must use
* <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html">PutDeliveryDestinationPolicy</a>
* <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html">PutDeliveryDestinationPolicy</a>
* in the destination account to assign an IAM policy to the
* destination. This policy allows delivery to that destination.
* </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface PutDeliverySourceCommandOutput extends PutDeliverySourceRespons
* </li>
* <li>
* <p>If you are delivering logs cross-account, you must use
* <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationolicy.html">PutDeliveryDestinationPolicy</a>
* <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html">PutDeliveryDestinationPolicy</a>
* in the destination account to assign an IAM policy to the
* destination. This policy allows delivery to that destination.
* </p>
Expand Down
Loading

0 comments on commit 0385471

Please sign in to comment.