@aws-sdk/client-cloudwatch-logs 3.413.0 → 3.417.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.
- package/dist-cjs/protocols/Aws_json1_1.js +11 -1
- package/dist-cjs/runtimeExtensions.js +3 -0
- package/dist-es/protocols/Aws_json1_1.js +11 -1
- package/dist-es/runtimeExtensions.js +3 -0
- package/dist-types/commands/CreateLogGroupCommand.d.ts +1 -1
- package/dist-types/commands/PutMetricFilterCommand.d.ts +2 -3
- package/dist-types/commands/PutQueryDefinitionCommand.d.ts +1 -0
- package/dist-types/commands/PutRetentionPolicyCommand.d.ts +4 -0
- package/dist-types/extensionConfiguration.d.ts +2 -1
- package/dist-types/models/models_0.d.ts +6 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
- package/dist-types/ts3.4/models/models_0.d.ts +1 -0
- package/package.json +7 -4
|
@@ -5,6 +5,7 @@ exports.de_TestMetricFilterCommand = exports.de_TagResourceCommand = exports.de_
|
|
|
5
5
|
exports.de_UntagResourceCommand = exports.de_UntagLogGroupCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
|
+
const uuid_1 = require("uuid");
|
|
8
9
|
const CloudWatchLogsServiceException_1 = require("../models/CloudWatchLogsServiceException");
|
|
9
10
|
const models_0_1 = require("../models/models_0");
|
|
10
11
|
const se_AssociateKmsKeyCommand = async (input, context) => {
|
|
@@ -290,7 +291,7 @@ exports.se_PutMetricFilterCommand = se_PutMetricFilterCommand;
|
|
|
290
291
|
const se_PutQueryDefinitionCommand = async (input, context) => {
|
|
291
292
|
const headers = sharedHeaders("PutQueryDefinition");
|
|
292
293
|
let body;
|
|
293
|
-
body = JSON.stringify((
|
|
294
|
+
body = JSON.stringify(se_PutQueryDefinitionRequest(input, context));
|
|
294
295
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
295
296
|
};
|
|
296
297
|
exports.se_PutQueryDefinitionCommand = se_PutQueryDefinitionCommand;
|
|
@@ -2498,6 +2499,15 @@ const se_PutMetricFilterRequest = (input, context) => {
|
|
|
2498
2499
|
metricTransformations: (_) => se_MetricTransformations(_, context),
|
|
2499
2500
|
});
|
|
2500
2501
|
};
|
|
2502
|
+
const se_PutQueryDefinitionRequest = (input, context) => {
|
|
2503
|
+
return (0, smithy_client_1.take)(input, {
|
|
2504
|
+
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
2505
|
+
logGroupNames: smithy_client_1._json,
|
|
2506
|
+
name: [],
|
|
2507
|
+
queryDefinitionId: [],
|
|
2508
|
+
queryString: [],
|
|
2509
|
+
});
|
|
2510
|
+
};
|
|
2501
2511
|
const de_DescribeMetricFiltersResponse = (output, context) => {
|
|
2502
2512
|
return (0, smithy_client_1.take)(output, {
|
|
2503
2513
|
metricFilters: (_) => de_MetricFilters(_, context),
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveRuntimeExtensions = void 0;
|
|
4
|
+
const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
|
|
4
5
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
5
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
7
|
const asPartial = (t) => t;
|
|
7
8
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
8
9
|
const extensionConfiguration = {
|
|
10
|
+
...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
|
|
9
11
|
...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
|
|
10
12
|
...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
|
|
11
13
|
};
|
|
12
14
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
13
15
|
return {
|
|
14
16
|
...runtimeConfig,
|
|
17
|
+
...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
15
18
|
...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
16
19
|
...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
17
20
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } 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
|
+
import { v4 as generateIdempotencyToken } from "uuid";
|
|
3
4
|
import { CloudWatchLogsServiceException as __BaseException } from "../models/CloudWatchLogsServiceException";
|
|
4
5
|
import { DataAlreadyAcceptedException, InvalidOperationException, InvalidParameterException, InvalidSequenceTokenException, LimitExceededException, MalformedQueryException, OperationAbortedException, ResourceAlreadyExistsException, ResourceNotFoundException, ServiceUnavailableException, TooManyTagsException, UnrecognizedClientException, } from "../models/models_0";
|
|
5
6
|
export const se_AssociateKmsKeyCommand = async (input, context) => {
|
|
@@ -245,7 +246,7 @@ export const se_PutMetricFilterCommand = async (input, context) => {
|
|
|
245
246
|
export const se_PutQueryDefinitionCommand = async (input, context) => {
|
|
246
247
|
const headers = sharedHeaders("PutQueryDefinition");
|
|
247
248
|
let body;
|
|
248
|
-
body = JSON.stringify(
|
|
249
|
+
body = JSON.stringify(se_PutQueryDefinitionRequest(input, context));
|
|
249
250
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
250
251
|
};
|
|
251
252
|
export const se_PutResourcePolicyCommand = async (input, context) => {
|
|
@@ -2391,6 +2392,15 @@ const se_PutMetricFilterRequest = (input, context) => {
|
|
|
2391
2392
|
metricTransformations: (_) => se_MetricTransformations(_, context),
|
|
2392
2393
|
});
|
|
2393
2394
|
};
|
|
2395
|
+
const se_PutQueryDefinitionRequest = (input, context) => {
|
|
2396
|
+
return take(input, {
|
|
2397
|
+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
2398
|
+
logGroupNames: _json,
|
|
2399
|
+
name: [],
|
|
2400
|
+
queryDefinitionId: [],
|
|
2401
|
+
queryString: [],
|
|
2402
|
+
});
|
|
2403
|
+
};
|
|
2394
2404
|
const de_DescribeMetricFiltersResponse = (output, context) => {
|
|
2395
2405
|
return take(output, {
|
|
2396
2406
|
metricFilters: (_) => de_MetricFilters(_, context),
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
|
|
1
2
|
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
2
3
|
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
3
4
|
const asPartial = (t) => t;
|
|
4
5
|
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
5
6
|
const extensionConfiguration = {
|
|
7
|
+
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
|
6
8
|
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
7
9
|
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
8
10
|
};
|
|
9
11
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
10
12
|
return {
|
|
11
13
|
...runtimeConfig,
|
|
14
|
+
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
|
12
15
|
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
13
16
|
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
14
17
|
};
|
|
@@ -23,7 +23,7 @@ export interface CreateLogGroupCommandOutput extends __MetadataBearer {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
|
-
* <p>Creates a log group with the specified name. You can create up to
|
|
26
|
+
* <p>Creates a log group with the specified name. You can create up to 1,000,000 log groups per Region per account.</p>
|
|
27
27
|
* <p>You must use the following guidelines when naming a log group:</p>
|
|
28
28
|
* <ul>
|
|
29
29
|
* <li>
|
|
@@ -37,9 +37,8 @@ export interface PutMetricFilterCommandOutput extends __MetadataBearer {
|
|
|
37
37
|
* found for
|
|
38
38
|
* a dimension is treated as a separate metric and accrues charges as a separate custom metric.
|
|
39
39
|
* </p>
|
|
40
|
-
* <p>CloudWatch Logs
|
|
41
|
-
* your specified dimensions within
|
|
42
|
-
* high charges.</p>
|
|
40
|
+
* <p>CloudWatch Logs might disable a metric filter if it generates 1,000 different name/value pairs for
|
|
41
|
+
* your specified dimensions within one hour.</p>
|
|
43
42
|
* <p>You can also set up a billing alarm to alert you if your charges are higher than
|
|
44
43
|
* expected. For more information,
|
|
45
44
|
* see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html">
|
|
@@ -47,6 +47,7 @@ export interface PutQueryDefinitionCommandOutput extends PutQueryDefinitionRespo
|
|
|
47
47
|
* "STRING_VALUE",
|
|
48
48
|
* ],
|
|
49
49
|
* queryString: "STRING_VALUE", // required
|
|
50
|
+
* clientToken: "STRING_VALUE",
|
|
50
51
|
* };
|
|
51
52
|
* const command = new PutQueryDefinitionCommand(input);
|
|
52
53
|
* const response = await client.send(command);
|
|
@@ -37,6 +37,10 @@ export interface PutRetentionPolicyCommandOutput extends __MetadataBearer {
|
|
|
37
37
|
* retention setting until 72 hours after the previous retention period ends. Alternatively,
|
|
38
38
|
* wait to change the retention setting until you confirm that the earlier log events are
|
|
39
39
|
* deleted. </p>
|
|
40
|
+
* <p>When log events reach their retention setting they are marked for deletion. After
|
|
41
|
+
* they are marked for deletion, they do not add to your archival storage costs anymore, even if
|
|
42
|
+
* they are not actually deleted until later. These log events marked for deletion are also not
|
|
43
|
+
* included when you use an API to retrieve the <code>storedBytes</code> value to see how many bytes a log group is storing.</p>
|
|
40
44
|
* </note>
|
|
41
45
|
* @example
|
|
42
46
|
* Use a bare-bones client and the command you need to make an API call.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
|
1
2
|
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
|
2
3
|
import { DefaultExtensionConfiguration } from "@smithy/types";
|
|
3
4
|
/**
|
|
4
5
|
* @internal
|
|
5
6
|
*/
|
|
6
|
-
export interface CloudWatchLogsExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration {
|
|
7
|
+
export interface CloudWatchLogsExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration {
|
|
7
8
|
}
|
|
@@ -2512,6 +2512,12 @@ export interface PutQueryDefinitionRequest {
|
|
|
2512
2512
|
* For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch Logs Insights Query Syntax</a>.</p>
|
|
2513
2513
|
*/
|
|
2514
2514
|
queryString: string | undefined;
|
|
2515
|
+
/**
|
|
2516
|
+
* @public
|
|
2517
|
+
* <p>Used as an idempotency token, to avoid returning an exception if the service receives the same request twice because of a network
|
|
2518
|
+
* error.</p>
|
|
2519
|
+
*/
|
|
2520
|
+
clientToken?: string;
|
|
2515
2521
|
}
|
|
2516
2522
|
/**
|
|
2517
2523
|
* @public
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
|
1
2
|
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
|
2
3
|
import { DefaultExtensionConfiguration } from "@smithy/types";
|
|
3
4
|
export interface CloudWatchLogsExtensionConfiguration
|
|
4
5
|
extends HttpHandlerExtensionConfiguration,
|
|
5
|
-
DefaultExtensionConfiguration
|
|
6
|
+
DefaultExtensionConfiguration,
|
|
7
|
+
AwsRegionExtensionConfiguration {}
|
|
@@ -592,6 +592,7 @@ export interface PutQueryDefinitionRequest {
|
|
|
592
592
|
queryDefinitionId?: string;
|
|
593
593
|
logGroupNames?: string[];
|
|
594
594
|
queryString: string | undefined;
|
|
595
|
+
clientToken?: string;
|
|
595
596
|
}
|
|
596
597
|
export interface PutQueryDefinitionResponse {
|
|
597
598
|
queryDefinitionId?: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-cloudwatch-logs",
|
|
3
3
|
"description": "AWS SDK for JavaScript Cloudwatch Logs Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.417.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,13 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.414.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.414.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.413.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.413.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.413.0",
|
|
29
29
|
"@aws-sdk/middleware-signing": "3.413.0",
|
|
30
30
|
"@aws-sdk/middleware-user-agent": "3.413.0",
|
|
31
|
+
"@aws-sdk/region-config-resolver": "3.413.0",
|
|
31
32
|
"@aws-sdk/types": "3.413.0",
|
|
32
33
|
"@aws-sdk/util-endpoints": "3.413.0",
|
|
33
34
|
"@aws-sdk/util-user-agent-browser": "3.413.0",
|
|
@@ -54,12 +55,14 @@
|
|
|
54
55
|
"@smithy/util-defaults-mode-node": "^2.0.10",
|
|
55
56
|
"@smithy/util-retry": "^2.0.0",
|
|
56
57
|
"@smithy/util-utf8": "^2.0.0",
|
|
57
|
-
"tslib": "^2.5.0"
|
|
58
|
+
"tslib": "^2.5.0",
|
|
59
|
+
"uuid": "^8.3.2"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|
|
60
62
|
"@smithy/service-client-documentation-generator": "^2.0.0",
|
|
61
63
|
"@tsconfig/node14": "1.0.3",
|
|
62
64
|
"@types/node": "^14.14.31",
|
|
65
|
+
"@types/uuid": "^8.3.0",
|
|
63
66
|
"concurrently": "7.0.0",
|
|
64
67
|
"downlevel-dts": "0.10.1",
|
|
65
68
|
"rimraf": "3.0.2",
|