@aws-sdk/client-cloudwatch-logs 3.199.0 → 3.200.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/CHANGELOG.md +11 -0
- package/dist-cjs/CloudWatchLogs.js +45 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
- package/dist-cjs/commands/TagResourceCommand.js +46 -0
- package/dist-cjs/commands/UntagResourceCommand.js +46 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/models/models_0.js +33 -3
- package/dist-cjs/protocols/Aws_json1_1.js +194 -2
- package/dist-es/CloudWatchLogs.js +45 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
- package/dist-es/commands/TagResourceCommand.js +42 -0
- package/dist-es/commands/UntagResourceCommand.js +42 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/models/models_0.js +25 -0
- package/dist-es/protocols/Aws_json1_1.js +187 -1
- package/dist-types/CloudWatchLogs.d.ts +60 -18
- package/dist-types/CloudWatchLogsClient.d.ts +5 -2
- package/dist-types/commands/CreateExportTaskCommand.d.ts +2 -11
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +38 -0
- package/dist-types/commands/ListTagsLogGroupCommand.d.ts +7 -1
- package/dist-types/commands/TagLogGroupCommand.d.ts +9 -3
- package/dist-types/commands/TagResourceCommand.d.ts +48 -0
- package/dist-types/commands/UntagLogGroupCommand.d.ts +9 -3
- package/dist-types/commands/UntagResourceCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/models/models_0.d.ts +102 -2
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/CloudWatchLogs.d.ts +51 -0
- package/dist-types/ts3.4/CloudWatchLogsClient.d.ts +20 -2
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +32 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/models/models_0.d.ts +35 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +36 -0
- package/package.json +28 -28
|
@@ -27,6 +27,7 @@ import { GetLogEventsCommand, } from "./commands/GetLogEventsCommand";
|
|
|
27
27
|
import { GetLogGroupFieldsCommand, } from "./commands/GetLogGroupFieldsCommand";
|
|
28
28
|
import { GetLogRecordCommand, } from "./commands/GetLogRecordCommand";
|
|
29
29
|
import { GetQueryResultsCommand, } from "./commands/GetQueryResultsCommand";
|
|
30
|
+
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
30
31
|
import { ListTagsLogGroupCommand, } from "./commands/ListTagsLogGroupCommand";
|
|
31
32
|
import { PutDestinationCommand, } from "./commands/PutDestinationCommand";
|
|
32
33
|
import { PutDestinationPolicyCommand, } from "./commands/PutDestinationPolicyCommand";
|
|
@@ -39,8 +40,10 @@ import { PutSubscriptionFilterCommand, } from "./commands/PutSubscriptionFilterC
|
|
|
39
40
|
import { StartQueryCommand } from "./commands/StartQueryCommand";
|
|
40
41
|
import { StopQueryCommand } from "./commands/StopQueryCommand";
|
|
41
42
|
import { TagLogGroupCommand } from "./commands/TagLogGroupCommand";
|
|
43
|
+
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
42
44
|
import { TestMetricFilterCommand, } from "./commands/TestMetricFilterCommand";
|
|
43
45
|
import { UntagLogGroupCommand, } from "./commands/UntagLogGroupCommand";
|
|
46
|
+
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
44
47
|
export class CloudWatchLogs extends CloudWatchLogsClient {
|
|
45
48
|
associateKmsKey(args, optionsOrCb, cb) {
|
|
46
49
|
const command = new AssociateKmsKeyCommand(args);
|
|
@@ -434,6 +437,20 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
|
|
|
434
437
|
return this.send(command, optionsOrCb);
|
|
435
438
|
}
|
|
436
439
|
}
|
|
440
|
+
listTagsForResource(args, optionsOrCb, cb) {
|
|
441
|
+
const command = new ListTagsForResourceCommand(args);
|
|
442
|
+
if (typeof optionsOrCb === "function") {
|
|
443
|
+
this.send(command, optionsOrCb);
|
|
444
|
+
}
|
|
445
|
+
else if (typeof cb === "function") {
|
|
446
|
+
if (typeof optionsOrCb !== "object")
|
|
447
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
448
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
449
|
+
}
|
|
450
|
+
else {
|
|
451
|
+
return this.send(command, optionsOrCb);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
437
454
|
listTagsLogGroup(args, optionsOrCb, cb) {
|
|
438
455
|
const command = new ListTagsLogGroupCommand(args);
|
|
439
456
|
if (typeof optionsOrCb === "function") {
|
|
@@ -602,6 +619,20 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
|
|
|
602
619
|
return this.send(command, optionsOrCb);
|
|
603
620
|
}
|
|
604
621
|
}
|
|
622
|
+
tagResource(args, optionsOrCb, cb) {
|
|
623
|
+
const command = new TagResourceCommand(args);
|
|
624
|
+
if (typeof optionsOrCb === "function") {
|
|
625
|
+
this.send(command, optionsOrCb);
|
|
626
|
+
}
|
|
627
|
+
else if (typeof cb === "function") {
|
|
628
|
+
if (typeof optionsOrCb !== "object")
|
|
629
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
630
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
return this.send(command, optionsOrCb);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
605
636
|
testMetricFilter(args, optionsOrCb, cb) {
|
|
606
637
|
const command = new TestMetricFilterCommand(args);
|
|
607
638
|
if (typeof optionsOrCb === "function") {
|
|
@@ -630,4 +661,18 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
|
|
|
630
661
|
return this.send(command, optionsOrCb);
|
|
631
662
|
}
|
|
632
663
|
}
|
|
664
|
+
untagResource(args, optionsOrCb, cb) {
|
|
665
|
+
const command = new UntagResourceCommand(args);
|
|
666
|
+
if (typeof optionsOrCb === "function") {
|
|
667
|
+
this.send(command, optionsOrCb);
|
|
668
|
+
}
|
|
669
|
+
else if (typeof cb === "function") {
|
|
670
|
+
if (typeof optionsOrCb !== "object")
|
|
671
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
672
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
673
|
+
}
|
|
674
|
+
else {
|
|
675
|
+
return this.send(command, optionsOrCb);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
633
678
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { ListTagsForResourceRequestFilterSensitiveLog, ListTagsForResourceResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1ListTagsForResourceCommand, serializeAws_json1_1ListTagsForResourceCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export class ListTagsForResourceCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CloudWatchLogsClient";
|
|
25
|
+
const commandName = "ListTagsForResourceCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: ListTagsForResourceRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: ListTagsForResourceResponseFilterSensitiveLog,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_json1_1ListTagsForResourceCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_1ListTagsForResourceCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { TagResourceRequestFilterSensitiveLog } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1TagResourceCommand, serializeAws_json1_1TagResourceCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export class TagResourceCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, TagResourceCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CloudWatchLogsClient";
|
|
25
|
+
const commandName = "TagResourceCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: TagResourceRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: (output) => output,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_json1_1TagResourceCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_1TagResourceCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { UntagResourceRequestFilterSensitiveLog } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1UntagResourceCommand, serializeAws_json1_1UntagResourceCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export class UntagResourceCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, UntagResourceCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CloudWatchLogsClient";
|
|
25
|
+
const commandName = "UntagResourceCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: UntagResourceRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: (output) => output,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_json1_1UntagResourceCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_1UntagResourceCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -26,6 +26,7 @@ export * from "./GetLogEventsCommand";
|
|
|
26
26
|
export * from "./GetLogGroupFieldsCommand";
|
|
27
27
|
export * from "./GetLogRecordCommand";
|
|
28
28
|
export * from "./GetQueryResultsCommand";
|
|
29
|
+
export * from "./ListTagsForResourceCommand";
|
|
29
30
|
export * from "./ListTagsLogGroupCommand";
|
|
30
31
|
export * from "./PutDestinationCommand";
|
|
31
32
|
export * from "./PutDestinationPolicyCommand";
|
|
@@ -38,5 +39,7 @@ export * from "./PutSubscriptionFilterCommand";
|
|
|
38
39
|
export * from "./StartQueryCommand";
|
|
39
40
|
export * from "./StopQueryCommand";
|
|
40
41
|
export * from "./TagLogGroupCommand";
|
|
42
|
+
export * from "./TagResourceCommand";
|
|
41
43
|
export * from "./TestMetricFilterCommand";
|
|
42
44
|
export * from "./UntagLogGroupCommand";
|
|
45
|
+
export * from "./UntagResourceCommand";
|
|
@@ -193,6 +193,19 @@ export class MalformedQueryException extends __BaseException {
|
|
|
193
193
|
this.queryCompileError = opts.queryCompileError;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
+
export class TooManyTagsException extends __BaseException {
|
|
197
|
+
constructor(opts) {
|
|
198
|
+
super({
|
|
199
|
+
name: "TooManyTagsException",
|
|
200
|
+
$fault: "client",
|
|
201
|
+
...opts,
|
|
202
|
+
});
|
|
203
|
+
this.name = "TooManyTagsException";
|
|
204
|
+
this.$fault = "client";
|
|
205
|
+
Object.setPrototypeOf(this, TooManyTagsException.prototype);
|
|
206
|
+
this.resourceName = opts.resourceName;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
196
209
|
export const AssociateKmsKeyRequestFilterSensitiveLog = (obj) => ({
|
|
197
210
|
...obj,
|
|
198
211
|
});
|
|
@@ -382,6 +395,12 @@ export const GetQueryResultsResponseFilterSensitiveLog = (obj) => ({
|
|
|
382
395
|
export const InputLogEventFilterSensitiveLog = (obj) => ({
|
|
383
396
|
...obj,
|
|
384
397
|
});
|
|
398
|
+
export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
|
|
399
|
+
...obj,
|
|
400
|
+
});
|
|
401
|
+
export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
|
|
402
|
+
...obj,
|
|
403
|
+
});
|
|
385
404
|
export const ListTagsLogGroupRequestFilterSensitiveLog = (obj) => ({
|
|
386
405
|
...obj,
|
|
387
406
|
});
|
|
@@ -448,6 +467,9 @@ export const StopQueryResponseFilterSensitiveLog = (obj) => ({
|
|
|
448
467
|
export const TagLogGroupRequestFilterSensitiveLog = (obj) => ({
|
|
449
468
|
...obj,
|
|
450
469
|
});
|
|
470
|
+
export const TagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
471
|
+
...obj,
|
|
472
|
+
});
|
|
451
473
|
export const TestMetricFilterRequestFilterSensitiveLog = (obj) => ({
|
|
452
474
|
...obj,
|
|
453
475
|
});
|
|
@@ -460,3 +482,6 @@ export const TestMetricFilterResponseFilterSensitiveLog = (obj) => ({
|
|
|
460
482
|
export const UntagLogGroupRequestFilterSensitiveLog = (obj) => ({
|
|
461
483
|
...obj,
|
|
462
484
|
});
|
|
485
|
+
export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
|
|
486
|
+
...obj,
|
|
487
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { CloudWatchLogsServiceException as __BaseException } from "../models/CloudWatchLogsServiceException";
|
|
4
|
-
import { DataAlreadyAcceptedException, InvalidOperationException, InvalidParameterException, InvalidSequenceTokenException, LimitExceededException, MalformedQueryException, OperationAbortedException, ResourceAlreadyExistsException, ResourceNotFoundException, ServiceUnavailableException, UnrecognizedClientException, } from "../models/models_0";
|
|
4
|
+
import { DataAlreadyAcceptedException, InvalidOperationException, InvalidParameterException, InvalidSequenceTokenException, LimitExceededException, MalformedQueryException, OperationAbortedException, ResourceAlreadyExistsException, ResourceNotFoundException, ServiceUnavailableException, TooManyTagsException, UnrecognizedClientException, } from "../models/models_0";
|
|
5
5
|
export const serializeAws_json1_1AssociateKmsKeyCommand = async (input, context) => {
|
|
6
6
|
const headers = {
|
|
7
7
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -254,6 +254,15 @@ export const serializeAws_json1_1GetQueryResultsCommand = async (input, context)
|
|
|
254
254
|
body = JSON.stringify(serializeAws_json1_1GetQueryResultsRequest(input, context));
|
|
255
255
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
256
256
|
};
|
|
257
|
+
export const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
|
|
258
|
+
const headers = {
|
|
259
|
+
"content-type": "application/x-amz-json-1.1",
|
|
260
|
+
"x-amz-target": "Logs_20140328.ListTagsForResource",
|
|
261
|
+
};
|
|
262
|
+
let body;
|
|
263
|
+
body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
|
|
264
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
265
|
+
};
|
|
257
266
|
export const serializeAws_json1_1ListTagsLogGroupCommand = async (input, context) => {
|
|
258
267
|
const headers = {
|
|
259
268
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -362,6 +371,15 @@ export const serializeAws_json1_1TagLogGroupCommand = async (input, context) =>
|
|
|
362
371
|
body = JSON.stringify(serializeAws_json1_1TagLogGroupRequest(input, context));
|
|
363
372
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
364
373
|
};
|
|
374
|
+
export const serializeAws_json1_1TagResourceCommand = async (input, context) => {
|
|
375
|
+
const headers = {
|
|
376
|
+
"content-type": "application/x-amz-json-1.1",
|
|
377
|
+
"x-amz-target": "Logs_20140328.TagResource",
|
|
378
|
+
};
|
|
379
|
+
let body;
|
|
380
|
+
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
|
|
381
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
382
|
+
};
|
|
365
383
|
export const serializeAws_json1_1TestMetricFilterCommand = async (input, context) => {
|
|
366
384
|
const headers = {
|
|
367
385
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -380,6 +398,15 @@ export const serializeAws_json1_1UntagLogGroupCommand = async (input, context) =
|
|
|
380
398
|
body = JSON.stringify(serializeAws_json1_1UntagLogGroupRequest(input, context));
|
|
381
399
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
382
400
|
};
|
|
401
|
+
export const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
|
|
402
|
+
const headers = {
|
|
403
|
+
"content-type": "application/x-amz-json-1.1",
|
|
404
|
+
"x-amz-target": "Logs_20140328.UntagResource",
|
|
405
|
+
};
|
|
406
|
+
let body;
|
|
407
|
+
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
|
|
408
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
409
|
+
};
|
|
383
410
|
export const deserializeAws_json1_1AssociateKmsKeyCommand = async (output, context) => {
|
|
384
411
|
if (output.statusCode >= 300) {
|
|
385
412
|
return deserializeAws_json1_1AssociateKmsKeyCommandError(output, context);
|
|
@@ -1472,6 +1499,45 @@ const deserializeAws_json1_1GetQueryResultsCommandError = async (output, context
|
|
|
1472
1499
|
});
|
|
1473
1500
|
}
|
|
1474
1501
|
};
|
|
1502
|
+
export const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
|
|
1503
|
+
if (output.statusCode >= 300) {
|
|
1504
|
+
return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
|
|
1505
|
+
}
|
|
1506
|
+
const data = await parseBody(output.body, context);
|
|
1507
|
+
let contents = {};
|
|
1508
|
+
contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
|
|
1509
|
+
const response = {
|
|
1510
|
+
$metadata: deserializeMetadata(output),
|
|
1511
|
+
...contents,
|
|
1512
|
+
};
|
|
1513
|
+
return Promise.resolve(response);
|
|
1514
|
+
};
|
|
1515
|
+
const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
|
|
1516
|
+
const parsedOutput = {
|
|
1517
|
+
...output,
|
|
1518
|
+
body: await parseErrorBody(output.body, context),
|
|
1519
|
+
};
|
|
1520
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1521
|
+
switch (errorCode) {
|
|
1522
|
+
case "InvalidParameterException":
|
|
1523
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
1524
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1525
|
+
case "ResourceNotFoundException":
|
|
1526
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
1527
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1528
|
+
case "ServiceUnavailableException":
|
|
1529
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
1530
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1531
|
+
default:
|
|
1532
|
+
const parsedBody = parsedOutput.body;
|
|
1533
|
+
throwDefaultError({
|
|
1534
|
+
output,
|
|
1535
|
+
parsedBody,
|
|
1536
|
+
exceptionCtor: __BaseException,
|
|
1537
|
+
errorCode,
|
|
1538
|
+
});
|
|
1539
|
+
}
|
|
1540
|
+
};
|
|
1475
1541
|
export const deserializeAws_json1_1ListTagsLogGroupCommand = async (output, context) => {
|
|
1476
1542
|
if (output.statusCode >= 300) {
|
|
1477
1543
|
return deserializeAws_json1_1ListTagsLogGroupCommandError(output, context);
|
|
@@ -1952,6 +2018,45 @@ const deserializeAws_json1_1TagLogGroupCommandError = async (output, context) =>
|
|
|
1952
2018
|
});
|
|
1953
2019
|
}
|
|
1954
2020
|
};
|
|
2021
|
+
export const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
|
|
2022
|
+
if (output.statusCode >= 300) {
|
|
2023
|
+
return deserializeAws_json1_1TagResourceCommandError(output, context);
|
|
2024
|
+
}
|
|
2025
|
+
await collectBody(output.body, context);
|
|
2026
|
+
const response = {
|
|
2027
|
+
$metadata: deserializeMetadata(output),
|
|
2028
|
+
};
|
|
2029
|
+
return Promise.resolve(response);
|
|
2030
|
+
};
|
|
2031
|
+
const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
|
|
2032
|
+
const parsedOutput = {
|
|
2033
|
+
...output,
|
|
2034
|
+
body: await parseErrorBody(output.body, context),
|
|
2035
|
+
};
|
|
2036
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2037
|
+
switch (errorCode) {
|
|
2038
|
+
case "InvalidParameterException":
|
|
2039
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
2040
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2041
|
+
case "ResourceNotFoundException":
|
|
2042
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
2043
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2044
|
+
case "ServiceUnavailableException":
|
|
2045
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
2046
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2047
|
+
case "TooManyTagsException":
|
|
2048
|
+
case "com.amazonaws.cloudwatchlogs#TooManyTagsException":
|
|
2049
|
+
throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
|
|
2050
|
+
default:
|
|
2051
|
+
const parsedBody = parsedOutput.body;
|
|
2052
|
+
throwDefaultError({
|
|
2053
|
+
output,
|
|
2054
|
+
parsedBody,
|
|
2055
|
+
exceptionCtor: __BaseException,
|
|
2056
|
+
errorCode,
|
|
2057
|
+
});
|
|
2058
|
+
}
|
|
2059
|
+
};
|
|
1955
2060
|
export const deserializeAws_json1_1TestMetricFilterCommand = async (output, context) => {
|
|
1956
2061
|
if (output.statusCode >= 300) {
|
|
1957
2062
|
return deserializeAws_json1_1TestMetricFilterCommandError(output, context);
|
|
@@ -2018,6 +2123,42 @@ const deserializeAws_json1_1UntagLogGroupCommandError = async (output, context)
|
|
|
2018
2123
|
});
|
|
2019
2124
|
}
|
|
2020
2125
|
};
|
|
2126
|
+
export const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
|
|
2127
|
+
if (output.statusCode >= 300) {
|
|
2128
|
+
return deserializeAws_json1_1UntagResourceCommandError(output, context);
|
|
2129
|
+
}
|
|
2130
|
+
await collectBody(output.body, context);
|
|
2131
|
+
const response = {
|
|
2132
|
+
$metadata: deserializeMetadata(output),
|
|
2133
|
+
};
|
|
2134
|
+
return Promise.resolve(response);
|
|
2135
|
+
};
|
|
2136
|
+
const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
|
|
2137
|
+
const parsedOutput = {
|
|
2138
|
+
...output,
|
|
2139
|
+
body: await parseErrorBody(output.body, context),
|
|
2140
|
+
};
|
|
2141
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2142
|
+
switch (errorCode) {
|
|
2143
|
+
case "InvalidParameterException":
|
|
2144
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
2145
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2146
|
+
case "ResourceNotFoundException":
|
|
2147
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
2148
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2149
|
+
case "ServiceUnavailableException":
|
|
2150
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
2151
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
2152
|
+
default:
|
|
2153
|
+
const parsedBody = parsedOutput.body;
|
|
2154
|
+
throwDefaultError({
|
|
2155
|
+
output,
|
|
2156
|
+
parsedBody,
|
|
2157
|
+
exceptionCtor: __BaseException,
|
|
2158
|
+
errorCode,
|
|
2159
|
+
});
|
|
2160
|
+
}
|
|
2161
|
+
};
|
|
2021
2162
|
const deserializeAws_json1_1DataAlreadyAcceptedExceptionResponse = async (parsedOutput, context) => {
|
|
2022
2163
|
const body = parsedOutput.body;
|
|
2023
2164
|
const deserialized = deserializeAws_json1_1DataAlreadyAcceptedException(body, context);
|
|
@@ -2108,6 +2249,15 @@ const deserializeAws_json1_1ServiceUnavailableExceptionResponse = async (parsedO
|
|
|
2108
2249
|
});
|
|
2109
2250
|
return __decorateServiceException(exception, body);
|
|
2110
2251
|
};
|
|
2252
|
+
const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
|
|
2253
|
+
const body = parsedOutput.body;
|
|
2254
|
+
const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
|
|
2255
|
+
const exception = new TooManyTagsException({
|
|
2256
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
2257
|
+
...deserialized,
|
|
2258
|
+
});
|
|
2259
|
+
return __decorateServiceException(exception, body);
|
|
2260
|
+
};
|
|
2111
2261
|
const deserializeAws_json1_1UnrecognizedClientExceptionResponse = async (parsedOutput, context) => {
|
|
2112
2262
|
const body = parsedOutput.body;
|
|
2113
2263
|
const deserialized = deserializeAws_json1_1UnrecognizedClientException(body, context);
|
|
@@ -2344,6 +2494,11 @@ const serializeAws_json1_1InputLogStreamNames = (input, context) => {
|
|
|
2344
2494
|
return entry;
|
|
2345
2495
|
});
|
|
2346
2496
|
};
|
|
2497
|
+
const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
|
|
2498
|
+
return {
|
|
2499
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
2500
|
+
};
|
|
2501
|
+
};
|
|
2347
2502
|
const serializeAws_json1_1ListTagsLogGroupRequest = (input, context) => {
|
|
2348
2503
|
return {
|
|
2349
2504
|
...(input.logGroupName != null && { logGroupName: input.logGroupName }),
|
|
@@ -2384,6 +2539,7 @@ const serializeAws_json1_1PutDestinationRequest = (input, context) => {
|
|
|
2384
2539
|
return {
|
|
2385
2540
|
...(input.destinationName != null && { destinationName: input.destinationName }),
|
|
2386
2541
|
...(input.roleArn != null && { roleArn: input.roleArn }),
|
|
2542
|
+
...(input.tags != null && { tags: serializeAws_json1_1Tags(input.tags, context) }),
|
|
2387
2543
|
...(input.targetArn != null && { targetArn: input.targetArn }),
|
|
2388
2544
|
};
|
|
2389
2545
|
};
|
|
@@ -2454,6 +2610,13 @@ const serializeAws_json1_1StopQueryRequest = (input, context) => {
|
|
|
2454
2610
|
...(input.queryId != null && { queryId: input.queryId }),
|
|
2455
2611
|
};
|
|
2456
2612
|
};
|
|
2613
|
+
const serializeAws_json1_1TagKeyList = (input, context) => {
|
|
2614
|
+
return input
|
|
2615
|
+
.filter((e) => e != null)
|
|
2616
|
+
.map((entry) => {
|
|
2617
|
+
return entry;
|
|
2618
|
+
});
|
|
2619
|
+
};
|
|
2457
2620
|
const serializeAws_json1_1TagList = (input, context) => {
|
|
2458
2621
|
return input
|
|
2459
2622
|
.filter((e) => e != null)
|
|
@@ -2467,6 +2630,12 @@ const serializeAws_json1_1TagLogGroupRequest = (input, context) => {
|
|
|
2467
2630
|
...(input.tags != null && { tags: serializeAws_json1_1Tags(input.tags, context) }),
|
|
2468
2631
|
};
|
|
2469
2632
|
};
|
|
2633
|
+
const serializeAws_json1_1TagResourceRequest = (input, context) => {
|
|
2634
|
+
return {
|
|
2635
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
2636
|
+
...(input.tags != null && { tags: serializeAws_json1_1Tags(input.tags, context) }),
|
|
2637
|
+
};
|
|
2638
|
+
};
|
|
2470
2639
|
const serializeAws_json1_1Tags = (input, context) => {
|
|
2471
2640
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2472
2641
|
if (value === null) {
|
|
@@ -2499,6 +2668,12 @@ const serializeAws_json1_1UntagLogGroupRequest = (input, context) => {
|
|
|
2499
2668
|
...(input.tags != null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
|
|
2500
2669
|
};
|
|
2501
2670
|
};
|
|
2671
|
+
const serializeAws_json1_1UntagResourceRequest = (input, context) => {
|
|
2672
|
+
return {
|
|
2673
|
+
...(input.resourceArn != null && { resourceArn: input.resourceArn }),
|
|
2674
|
+
...(input.tagKeys != null && { tagKeys: serializeAws_json1_1TagKeyList(input.tagKeys, context) }),
|
|
2675
|
+
};
|
|
2676
|
+
};
|
|
2502
2677
|
const deserializeAws_json1_1CreateExportTaskResponse = (output, context) => {
|
|
2503
2678
|
return {
|
|
2504
2679
|
taskId: __expectString(output.taskId),
|
|
@@ -2732,6 +2907,11 @@ const deserializeAws_json1_1LimitExceededException = (output, context) => {
|
|
|
2732
2907
|
message: __expectString(output.message),
|
|
2733
2908
|
};
|
|
2734
2909
|
};
|
|
2910
|
+
const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
|
|
2911
|
+
return {
|
|
2912
|
+
tags: output.tags != null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,
|
|
2913
|
+
};
|
|
2914
|
+
};
|
|
2735
2915
|
const deserializeAws_json1_1ListTagsLogGroupResponse = (output, context) => {
|
|
2736
2916
|
return {
|
|
2737
2917
|
tags: output.tags != null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,
|
|
@@ -3130,6 +3310,12 @@ const deserializeAws_json1_1TestMetricFilterResponse = (output, context) => {
|
|
|
3130
3310
|
matches: output.matches != null ? deserializeAws_json1_1MetricFilterMatches(output.matches, context) : undefined,
|
|
3131
3311
|
};
|
|
3132
3312
|
};
|
|
3313
|
+
const deserializeAws_json1_1TooManyTagsException = (output, context) => {
|
|
3314
|
+
return {
|
|
3315
|
+
message: __expectString(output.message),
|
|
3316
|
+
resourceName: __expectString(output.resourceName),
|
|
3317
|
+
};
|
|
3318
|
+
};
|
|
3133
3319
|
const deserializeAws_json1_1UnrecognizedClientException = (output, context) => {
|
|
3134
3320
|
return {
|
|
3135
3321
|
message: __expectString(output.message),
|