@aws-sdk/client-cloudwatch-logs 3.198.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/CloudWatchLogs.js +45 -0
  3. package/dist-cjs/commands/ListTagsForResourceCommand.js +46 -0
  4. package/dist-cjs/commands/TagResourceCommand.js +46 -0
  5. package/dist-cjs/commands/UntagResourceCommand.js +46 -0
  6. package/dist-cjs/commands/index.js +3 -0
  7. package/dist-cjs/models/models_0.js +33 -3
  8. package/dist-cjs/protocols/Aws_json1_1.js +194 -2
  9. package/dist-es/CloudWatchLogs.js +45 -0
  10. package/dist-es/commands/ListTagsForResourceCommand.js +42 -0
  11. package/dist-es/commands/TagResourceCommand.js +42 -0
  12. package/dist-es/commands/UntagResourceCommand.js +42 -0
  13. package/dist-es/commands/index.js +3 -0
  14. package/dist-es/models/models_0.js +25 -0
  15. package/dist-es/protocols/Aws_json1_1.js +187 -1
  16. package/dist-types/CloudWatchLogs.d.ts +60 -18
  17. package/dist-types/CloudWatchLogsClient.d.ts +5 -2
  18. package/dist-types/commands/CreateExportTaskCommand.d.ts +2 -11
  19. package/dist-types/commands/ListTagsForResourceCommand.d.ts +38 -0
  20. package/dist-types/commands/ListTagsLogGroupCommand.d.ts +7 -1
  21. package/dist-types/commands/TagLogGroupCommand.d.ts +9 -3
  22. package/dist-types/commands/TagResourceCommand.d.ts +48 -0
  23. package/dist-types/commands/UntagLogGroupCommand.d.ts +9 -3
  24. package/dist-types/commands/UntagResourceCommand.d.ts +37 -0
  25. package/dist-types/commands/index.d.ts +3 -0
  26. package/dist-types/models/models_0.d.ts +102 -2
  27. package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
  28. package/dist-types/ts3.4/CloudWatchLogs.d.ts +51 -0
  29. package/dist-types/ts3.4/CloudWatchLogsClient.d.ts +20 -2
  30. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
  31. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +32 -0
  32. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +32 -0
  33. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  34. package/dist-types/ts3.4/models/models_0.d.ts +35 -0
  35. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +36 -0
  36. package/package.json +29 -29
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_json1_1DeleteLogStreamCommand = exports.deserializeAws_json1_1DeleteLogGroupCommand = exports.deserializeAws_json1_1DeleteDestinationCommand = exports.deserializeAws_json1_1CreateLogStreamCommand = exports.deserializeAws_json1_1CreateLogGroupCommand = exports.deserializeAws_json1_1CreateExportTaskCommand = exports.deserializeAws_json1_1CancelExportTaskCommand = exports.deserializeAws_json1_1AssociateKmsKeyCommand = exports.serializeAws_json1_1UntagLogGroupCommand = exports.serializeAws_json1_1TestMetricFilterCommand = exports.serializeAws_json1_1TagLogGroupCommand = exports.serializeAws_json1_1StopQueryCommand = exports.serializeAws_json1_1StartQueryCommand = exports.serializeAws_json1_1PutSubscriptionFilterCommand = exports.serializeAws_json1_1PutRetentionPolicyCommand = exports.serializeAws_json1_1PutResourcePolicyCommand = exports.serializeAws_json1_1PutQueryDefinitionCommand = exports.serializeAws_json1_1PutMetricFilterCommand = exports.serializeAws_json1_1PutLogEventsCommand = exports.serializeAws_json1_1PutDestinationPolicyCommand = exports.serializeAws_json1_1PutDestinationCommand = exports.serializeAws_json1_1ListTagsLogGroupCommand = exports.serializeAws_json1_1GetQueryResultsCommand = exports.serializeAws_json1_1GetLogRecordCommand = exports.serializeAws_json1_1GetLogGroupFieldsCommand = exports.serializeAws_json1_1GetLogEventsCommand = exports.serializeAws_json1_1FilterLogEventsCommand = exports.serializeAws_json1_1DisassociateKmsKeyCommand = exports.serializeAws_json1_1DescribeSubscriptionFiltersCommand = exports.serializeAws_json1_1DescribeResourcePoliciesCommand = exports.serializeAws_json1_1DescribeQueryDefinitionsCommand = exports.serializeAws_json1_1DescribeQueriesCommand = exports.serializeAws_json1_1DescribeMetricFiltersCommand = exports.serializeAws_json1_1DescribeLogStreamsCommand = exports.serializeAws_json1_1DescribeLogGroupsCommand = exports.serializeAws_json1_1DescribeExportTasksCommand = exports.serializeAws_json1_1DescribeDestinationsCommand = exports.serializeAws_json1_1DeleteSubscriptionFilterCommand = exports.serializeAws_json1_1DeleteRetentionPolicyCommand = exports.serializeAws_json1_1DeleteResourcePolicyCommand = exports.serializeAws_json1_1DeleteQueryDefinitionCommand = exports.serializeAws_json1_1DeleteMetricFilterCommand = exports.serializeAws_json1_1DeleteLogStreamCommand = exports.serializeAws_json1_1DeleteLogGroupCommand = exports.serializeAws_json1_1DeleteDestinationCommand = exports.serializeAws_json1_1CreateLogStreamCommand = exports.serializeAws_json1_1CreateLogGroupCommand = exports.serializeAws_json1_1CreateExportTaskCommand = exports.serializeAws_json1_1CancelExportTaskCommand = exports.serializeAws_json1_1AssociateKmsKeyCommand = void 0;
4
- exports.deserializeAws_json1_1UntagLogGroupCommand = exports.deserializeAws_json1_1TestMetricFilterCommand = exports.deserializeAws_json1_1TagLogGroupCommand = exports.deserializeAws_json1_1StopQueryCommand = exports.deserializeAws_json1_1StartQueryCommand = exports.deserializeAws_json1_1PutSubscriptionFilterCommand = exports.deserializeAws_json1_1PutRetentionPolicyCommand = exports.deserializeAws_json1_1PutResourcePolicyCommand = exports.deserializeAws_json1_1PutQueryDefinitionCommand = exports.deserializeAws_json1_1PutMetricFilterCommand = exports.deserializeAws_json1_1PutLogEventsCommand = exports.deserializeAws_json1_1PutDestinationPolicyCommand = exports.deserializeAws_json1_1PutDestinationCommand = exports.deserializeAws_json1_1ListTagsLogGroupCommand = exports.deserializeAws_json1_1GetQueryResultsCommand = exports.deserializeAws_json1_1GetLogRecordCommand = exports.deserializeAws_json1_1GetLogGroupFieldsCommand = exports.deserializeAws_json1_1GetLogEventsCommand = exports.deserializeAws_json1_1FilterLogEventsCommand = exports.deserializeAws_json1_1DisassociateKmsKeyCommand = exports.deserializeAws_json1_1DescribeSubscriptionFiltersCommand = exports.deserializeAws_json1_1DescribeResourcePoliciesCommand = exports.deserializeAws_json1_1DescribeQueryDefinitionsCommand = exports.deserializeAws_json1_1DescribeQueriesCommand = exports.deserializeAws_json1_1DescribeMetricFiltersCommand = exports.deserializeAws_json1_1DescribeLogStreamsCommand = exports.deserializeAws_json1_1DescribeLogGroupsCommand = exports.deserializeAws_json1_1DescribeExportTasksCommand = exports.deserializeAws_json1_1DescribeDestinationsCommand = exports.deserializeAws_json1_1DeleteSubscriptionFilterCommand = exports.deserializeAws_json1_1DeleteRetentionPolicyCommand = exports.deserializeAws_json1_1DeleteResourcePolicyCommand = exports.deserializeAws_json1_1DeleteQueryDefinitionCommand = exports.deserializeAws_json1_1DeleteMetricFilterCommand = void 0;
3
+ exports.deserializeAws_json1_1CreateLogStreamCommand = exports.deserializeAws_json1_1CreateLogGroupCommand = exports.deserializeAws_json1_1CreateExportTaskCommand = exports.deserializeAws_json1_1CancelExportTaskCommand = exports.deserializeAws_json1_1AssociateKmsKeyCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1UntagLogGroupCommand = exports.serializeAws_json1_1TestMetricFilterCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1TagLogGroupCommand = exports.serializeAws_json1_1StopQueryCommand = exports.serializeAws_json1_1StartQueryCommand = exports.serializeAws_json1_1PutSubscriptionFilterCommand = exports.serializeAws_json1_1PutRetentionPolicyCommand = exports.serializeAws_json1_1PutResourcePolicyCommand = exports.serializeAws_json1_1PutQueryDefinitionCommand = exports.serializeAws_json1_1PutMetricFilterCommand = exports.serializeAws_json1_1PutLogEventsCommand = exports.serializeAws_json1_1PutDestinationPolicyCommand = exports.serializeAws_json1_1PutDestinationCommand = exports.serializeAws_json1_1ListTagsLogGroupCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1GetQueryResultsCommand = exports.serializeAws_json1_1GetLogRecordCommand = exports.serializeAws_json1_1GetLogGroupFieldsCommand = exports.serializeAws_json1_1GetLogEventsCommand = exports.serializeAws_json1_1FilterLogEventsCommand = exports.serializeAws_json1_1DisassociateKmsKeyCommand = exports.serializeAws_json1_1DescribeSubscriptionFiltersCommand = exports.serializeAws_json1_1DescribeResourcePoliciesCommand = exports.serializeAws_json1_1DescribeQueryDefinitionsCommand = exports.serializeAws_json1_1DescribeQueriesCommand = exports.serializeAws_json1_1DescribeMetricFiltersCommand = exports.serializeAws_json1_1DescribeLogStreamsCommand = exports.serializeAws_json1_1DescribeLogGroupsCommand = exports.serializeAws_json1_1DescribeExportTasksCommand = exports.serializeAws_json1_1DescribeDestinationsCommand = exports.serializeAws_json1_1DeleteSubscriptionFilterCommand = exports.serializeAws_json1_1DeleteRetentionPolicyCommand = exports.serializeAws_json1_1DeleteResourcePolicyCommand = exports.serializeAws_json1_1DeleteQueryDefinitionCommand = exports.serializeAws_json1_1DeleteMetricFilterCommand = exports.serializeAws_json1_1DeleteLogStreamCommand = exports.serializeAws_json1_1DeleteLogGroupCommand = exports.serializeAws_json1_1DeleteDestinationCommand = exports.serializeAws_json1_1CreateLogStreamCommand = exports.serializeAws_json1_1CreateLogGroupCommand = exports.serializeAws_json1_1CreateExportTaskCommand = exports.serializeAws_json1_1CancelExportTaskCommand = exports.serializeAws_json1_1AssociateKmsKeyCommand = void 0;
4
+ exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1UntagLogGroupCommand = exports.deserializeAws_json1_1TestMetricFilterCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1TagLogGroupCommand = exports.deserializeAws_json1_1StopQueryCommand = exports.deserializeAws_json1_1StartQueryCommand = exports.deserializeAws_json1_1PutSubscriptionFilterCommand = exports.deserializeAws_json1_1PutRetentionPolicyCommand = exports.deserializeAws_json1_1PutResourcePolicyCommand = exports.deserializeAws_json1_1PutQueryDefinitionCommand = exports.deserializeAws_json1_1PutMetricFilterCommand = exports.deserializeAws_json1_1PutLogEventsCommand = exports.deserializeAws_json1_1PutDestinationPolicyCommand = exports.deserializeAws_json1_1PutDestinationCommand = exports.deserializeAws_json1_1ListTagsLogGroupCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1GetQueryResultsCommand = exports.deserializeAws_json1_1GetLogRecordCommand = exports.deserializeAws_json1_1GetLogGroupFieldsCommand = exports.deserializeAws_json1_1GetLogEventsCommand = exports.deserializeAws_json1_1FilterLogEventsCommand = exports.deserializeAws_json1_1DisassociateKmsKeyCommand = exports.deserializeAws_json1_1DescribeSubscriptionFiltersCommand = exports.deserializeAws_json1_1DescribeResourcePoliciesCommand = exports.deserializeAws_json1_1DescribeQueryDefinitionsCommand = exports.deserializeAws_json1_1DescribeQueriesCommand = exports.deserializeAws_json1_1DescribeMetricFiltersCommand = exports.deserializeAws_json1_1DescribeLogStreamsCommand = exports.deserializeAws_json1_1DescribeLogGroupsCommand = exports.deserializeAws_json1_1DescribeExportTasksCommand = exports.deserializeAws_json1_1DescribeDestinationsCommand = exports.deserializeAws_json1_1DeleteSubscriptionFilterCommand = exports.deserializeAws_json1_1DeleteRetentionPolicyCommand = exports.deserializeAws_json1_1DeleteResourcePolicyCommand = exports.deserializeAws_json1_1DeleteQueryDefinitionCommand = exports.deserializeAws_json1_1DeleteMetricFilterCommand = exports.deserializeAws_json1_1DeleteLogStreamCommand = exports.deserializeAws_json1_1DeleteLogGroupCommand = exports.deserializeAws_json1_1DeleteDestinationCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const CloudWatchLogsServiceException_1 = require("../models/CloudWatchLogsServiceException");
@@ -286,6 +286,16 @@ const serializeAws_json1_1GetQueryResultsCommand = async (input, context) => {
286
286
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
287
287
  };
288
288
  exports.serializeAws_json1_1GetQueryResultsCommand = serializeAws_json1_1GetQueryResultsCommand;
289
+ const serializeAws_json1_1ListTagsForResourceCommand = async (input, context) => {
290
+ const headers = {
291
+ "content-type": "application/x-amz-json-1.1",
292
+ "x-amz-target": "Logs_20140328.ListTagsForResource",
293
+ };
294
+ let body;
295
+ body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context));
296
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
297
+ };
298
+ exports.serializeAws_json1_1ListTagsForResourceCommand = serializeAws_json1_1ListTagsForResourceCommand;
289
299
  const serializeAws_json1_1ListTagsLogGroupCommand = async (input, context) => {
290
300
  const headers = {
291
301
  "content-type": "application/x-amz-json-1.1",
@@ -406,6 +416,16 @@ const serializeAws_json1_1TagLogGroupCommand = async (input, context) => {
406
416
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
407
417
  };
408
418
  exports.serializeAws_json1_1TagLogGroupCommand = serializeAws_json1_1TagLogGroupCommand;
419
+ const serializeAws_json1_1TagResourceCommand = async (input, context) => {
420
+ const headers = {
421
+ "content-type": "application/x-amz-json-1.1",
422
+ "x-amz-target": "Logs_20140328.TagResource",
423
+ };
424
+ let body;
425
+ body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
426
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
427
+ };
428
+ exports.serializeAws_json1_1TagResourceCommand = serializeAws_json1_1TagResourceCommand;
409
429
  const serializeAws_json1_1TestMetricFilterCommand = async (input, context) => {
410
430
  const headers = {
411
431
  "content-type": "application/x-amz-json-1.1",
@@ -426,6 +446,16 @@ const serializeAws_json1_1UntagLogGroupCommand = async (input, context) => {
426
446
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
427
447
  };
428
448
  exports.serializeAws_json1_1UntagLogGroupCommand = serializeAws_json1_1UntagLogGroupCommand;
449
+ const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
450
+ const headers = {
451
+ "content-type": "application/x-amz-json-1.1",
452
+ "x-amz-target": "Logs_20140328.UntagResource",
453
+ };
454
+ let body;
455
+ body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
456
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
457
+ };
458
+ exports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand;
429
459
  const deserializeAws_json1_1AssociateKmsKeyCommand = async (output, context) => {
430
460
  if (output.statusCode >= 300) {
431
461
  return deserializeAws_json1_1AssociateKmsKeyCommandError(output, context);
@@ -1546,6 +1576,46 @@ const deserializeAws_json1_1GetQueryResultsCommandError = async (output, context
1546
1576
  });
1547
1577
  }
1548
1578
  };
1579
+ const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
1580
+ if (output.statusCode >= 300) {
1581
+ return deserializeAws_json1_1ListTagsForResourceCommandError(output, context);
1582
+ }
1583
+ const data = await parseBody(output.body, context);
1584
+ let contents = {};
1585
+ contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context);
1586
+ const response = {
1587
+ $metadata: deserializeMetadata(output),
1588
+ ...contents,
1589
+ };
1590
+ return Promise.resolve(response);
1591
+ };
1592
+ exports.deserializeAws_json1_1ListTagsForResourceCommand = deserializeAws_json1_1ListTagsForResourceCommand;
1593
+ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, context) => {
1594
+ const parsedOutput = {
1595
+ ...output,
1596
+ body: await parseErrorBody(output.body, context),
1597
+ };
1598
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1599
+ switch (errorCode) {
1600
+ case "InvalidParameterException":
1601
+ case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
1602
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
1603
+ case "ResourceNotFoundException":
1604
+ case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
1605
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1606
+ case "ServiceUnavailableException":
1607
+ case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
1608
+ throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
1609
+ default:
1610
+ const parsedBody = parsedOutput.body;
1611
+ (0, smithy_client_1.throwDefaultError)({
1612
+ output,
1613
+ parsedBody,
1614
+ exceptionCtor: CloudWatchLogsServiceException_1.CloudWatchLogsServiceException,
1615
+ errorCode,
1616
+ });
1617
+ }
1618
+ };
1549
1619
  const deserializeAws_json1_1ListTagsLogGroupCommand = async (output, context) => {
1550
1620
  if (output.statusCode >= 300) {
1551
1621
  return deserializeAws_json1_1ListTagsLogGroupCommandError(output, context);
@@ -2038,6 +2108,46 @@ const deserializeAws_json1_1TagLogGroupCommandError = async (output, context) =>
2038
2108
  });
2039
2109
  }
2040
2110
  };
2111
+ const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
2112
+ if (output.statusCode >= 300) {
2113
+ return deserializeAws_json1_1TagResourceCommandError(output, context);
2114
+ }
2115
+ await collectBody(output.body, context);
2116
+ const response = {
2117
+ $metadata: deserializeMetadata(output),
2118
+ };
2119
+ return Promise.resolve(response);
2120
+ };
2121
+ exports.deserializeAws_json1_1TagResourceCommand = deserializeAws_json1_1TagResourceCommand;
2122
+ const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
2123
+ const parsedOutput = {
2124
+ ...output,
2125
+ body: await parseErrorBody(output.body, context),
2126
+ };
2127
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2128
+ switch (errorCode) {
2129
+ case "InvalidParameterException":
2130
+ case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
2131
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
2132
+ case "ResourceNotFoundException":
2133
+ case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
2134
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
2135
+ case "ServiceUnavailableException":
2136
+ case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
2137
+ throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
2138
+ case "TooManyTagsException":
2139
+ case "com.amazonaws.cloudwatchlogs#TooManyTagsException":
2140
+ throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context);
2141
+ default:
2142
+ const parsedBody = parsedOutput.body;
2143
+ (0, smithy_client_1.throwDefaultError)({
2144
+ output,
2145
+ parsedBody,
2146
+ exceptionCtor: CloudWatchLogsServiceException_1.CloudWatchLogsServiceException,
2147
+ errorCode,
2148
+ });
2149
+ }
2150
+ };
2041
2151
  const deserializeAws_json1_1TestMetricFilterCommand = async (output, context) => {
2042
2152
  if (output.statusCode >= 300) {
2043
2153
  return deserializeAws_json1_1TestMetricFilterCommandError(output, context);
@@ -2106,6 +2216,43 @@ const deserializeAws_json1_1UntagLogGroupCommandError = async (output, context)
2106
2216
  });
2107
2217
  }
2108
2218
  };
2219
+ const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
2220
+ if (output.statusCode >= 300) {
2221
+ return deserializeAws_json1_1UntagResourceCommandError(output, context);
2222
+ }
2223
+ await collectBody(output.body, context);
2224
+ const response = {
2225
+ $metadata: deserializeMetadata(output),
2226
+ };
2227
+ return Promise.resolve(response);
2228
+ };
2229
+ exports.deserializeAws_json1_1UntagResourceCommand = deserializeAws_json1_1UntagResourceCommand;
2230
+ const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
2231
+ const parsedOutput = {
2232
+ ...output,
2233
+ body: await parseErrorBody(output.body, context),
2234
+ };
2235
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2236
+ switch (errorCode) {
2237
+ case "InvalidParameterException":
2238
+ case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
2239
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
2240
+ case "ResourceNotFoundException":
2241
+ case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
2242
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
2243
+ case "ServiceUnavailableException":
2244
+ case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
2245
+ throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
2246
+ default:
2247
+ const parsedBody = parsedOutput.body;
2248
+ (0, smithy_client_1.throwDefaultError)({
2249
+ output,
2250
+ parsedBody,
2251
+ exceptionCtor: CloudWatchLogsServiceException_1.CloudWatchLogsServiceException,
2252
+ errorCode,
2253
+ });
2254
+ }
2255
+ };
2109
2256
  const deserializeAws_json1_1DataAlreadyAcceptedExceptionResponse = async (parsedOutput, context) => {
2110
2257
  const body = parsedOutput.body;
2111
2258
  const deserialized = deserializeAws_json1_1DataAlreadyAcceptedException(body, context);
@@ -2196,6 +2343,15 @@ const deserializeAws_json1_1ServiceUnavailableExceptionResponse = async (parsedO
2196
2343
  });
2197
2344
  return (0, smithy_client_1.decorateServiceException)(exception, body);
2198
2345
  };
2346
+ const deserializeAws_json1_1TooManyTagsExceptionResponse = async (parsedOutput, context) => {
2347
+ const body = parsedOutput.body;
2348
+ const deserialized = deserializeAws_json1_1TooManyTagsException(body, context);
2349
+ const exception = new models_0_1.TooManyTagsException({
2350
+ $metadata: deserializeMetadata(parsedOutput),
2351
+ ...deserialized,
2352
+ });
2353
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
2354
+ };
2199
2355
  const deserializeAws_json1_1UnrecognizedClientExceptionResponse = async (parsedOutput, context) => {
2200
2356
  const body = parsedOutput.body;
2201
2357
  const deserialized = deserializeAws_json1_1UnrecognizedClientException(body, context);
@@ -2432,6 +2588,11 @@ const serializeAws_json1_1InputLogStreamNames = (input, context) => {
2432
2588
  return entry;
2433
2589
  });
2434
2590
  };
2591
+ const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
2592
+ return {
2593
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2594
+ };
2595
+ };
2435
2596
  const serializeAws_json1_1ListTagsLogGroupRequest = (input, context) => {
2436
2597
  return {
2437
2598
  ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
@@ -2472,6 +2633,7 @@ const serializeAws_json1_1PutDestinationRequest = (input, context) => {
2472
2633
  return {
2473
2634
  ...(input.destinationName != null && { destinationName: input.destinationName }),
2474
2635
  ...(input.roleArn != null && { roleArn: input.roleArn }),
2636
+ ...(input.tags != null && { tags: serializeAws_json1_1Tags(input.tags, context) }),
2475
2637
  ...(input.targetArn != null && { targetArn: input.targetArn }),
2476
2638
  };
2477
2639
  };
@@ -2542,6 +2704,13 @@ const serializeAws_json1_1StopQueryRequest = (input, context) => {
2542
2704
  ...(input.queryId != null && { queryId: input.queryId }),
2543
2705
  };
2544
2706
  };
2707
+ const serializeAws_json1_1TagKeyList = (input, context) => {
2708
+ return input
2709
+ .filter((e) => e != null)
2710
+ .map((entry) => {
2711
+ return entry;
2712
+ });
2713
+ };
2545
2714
  const serializeAws_json1_1TagList = (input, context) => {
2546
2715
  return input
2547
2716
  .filter((e) => e != null)
@@ -2555,6 +2724,12 @@ const serializeAws_json1_1TagLogGroupRequest = (input, context) => {
2555
2724
  ...(input.tags != null && { tags: serializeAws_json1_1Tags(input.tags, context) }),
2556
2725
  };
2557
2726
  };
2727
+ const serializeAws_json1_1TagResourceRequest = (input, context) => {
2728
+ return {
2729
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2730
+ ...(input.tags != null && { tags: serializeAws_json1_1Tags(input.tags, context) }),
2731
+ };
2732
+ };
2558
2733
  const serializeAws_json1_1Tags = (input, context) => {
2559
2734
  return Object.entries(input).reduce((acc, [key, value]) => {
2560
2735
  if (value === null) {
@@ -2587,6 +2762,12 @@ const serializeAws_json1_1UntagLogGroupRequest = (input, context) => {
2587
2762
  ...(input.tags != null && { tags: serializeAws_json1_1TagList(input.tags, context) }),
2588
2763
  };
2589
2764
  };
2765
+ const serializeAws_json1_1UntagResourceRequest = (input, context) => {
2766
+ return {
2767
+ ...(input.resourceArn != null && { resourceArn: input.resourceArn }),
2768
+ ...(input.tagKeys != null && { tagKeys: serializeAws_json1_1TagKeyList(input.tagKeys, context) }),
2769
+ };
2770
+ };
2590
2771
  const deserializeAws_json1_1CreateExportTaskResponse = (output, context) => {
2591
2772
  return {
2592
2773
  taskId: (0, smithy_client_1.expectString)(output.taskId),
@@ -2820,6 +3001,11 @@ const deserializeAws_json1_1LimitExceededException = (output, context) => {
2820
3001
  message: (0, smithy_client_1.expectString)(output.message),
2821
3002
  };
2822
3003
  };
3004
+ const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
3005
+ return {
3006
+ tags: output.tags != null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,
3007
+ };
3008
+ };
2823
3009
  const deserializeAws_json1_1ListTagsLogGroupResponse = (output, context) => {
2824
3010
  return {
2825
3011
  tags: output.tags != null ? deserializeAws_json1_1Tags(output.tags, context) : undefined,
@@ -3218,6 +3404,12 @@ const deserializeAws_json1_1TestMetricFilterResponse = (output, context) => {
3218
3404
  matches: output.matches != null ? deserializeAws_json1_1MetricFilterMatches(output.matches, context) : undefined,
3219
3405
  };
3220
3406
  };
3407
+ const deserializeAws_json1_1TooManyTagsException = (output, context) => {
3408
+ return {
3409
+ message: (0, smithy_client_1.expectString)(output.message),
3410
+ resourceName: (0, smithy_client_1.expectString)(output.resourceName),
3411
+ };
3412
+ };
3221
3413
  const deserializeAws_json1_1UnrecognizedClientException = (output, context) => {
3222
3414
  return {
3223
3415
  message: (0, smithy_client_1.expectString)(output.message),
@@ -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
+ });