@aws-sdk/client-cloudwatch-logs 3.199.0 → 3.201.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 +22 -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/endpoint/EndpointParameters.js +2 -3
- package/dist-cjs/models/models_0.js +33 -3
- package/dist-cjs/protocols/Aws_json1_1.js +201 -13
- package/dist-cjs/runtimeConfig.browser.js +16 -16
- package/dist-cjs/runtimeConfig.js +20 -19
- package/dist-cjs/runtimeConfig.native.js +1 -2
- package/dist-cjs/runtimeConfig.shared.js +8 -11
- 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 +33 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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,20 +3404,23 @@ const deserializeAws_json1_1TestMetricFilterResponse = (output, context) => {
|
|
|
3218
3404
|
matches: output.matches != null ? deserializeAws_json1_1MetricFilterMatches(output.matches, context) : undefined,
|
|
3219
3405
|
};
|
|
3220
3406
|
};
|
|
3221
|
-
const
|
|
3407
|
+
const deserializeAws_json1_1TooManyTagsException = (output, context) => {
|
|
3222
3408
|
return {
|
|
3223
3409
|
message: (0, smithy_client_1.expectString)(output.message),
|
|
3410
|
+
resourceName: (0, smithy_client_1.expectString)(output.resourceName),
|
|
3224
3411
|
};
|
|
3225
3412
|
};
|
|
3226
|
-
const
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
|
|
3231
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3232
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
3233
|
-
});
|
|
3413
|
+
const deserializeAws_json1_1UnrecognizedClientException = (output, context) => {
|
|
3414
|
+
return {
|
|
3415
|
+
message: (0, smithy_client_1.expectString)(output.message),
|
|
3416
|
+
};
|
|
3234
3417
|
};
|
|
3418
|
+
const deserializeMetadata = (output) => ({
|
|
3419
|
+
httpStatusCode: output.statusCode,
|
|
3420
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
3421
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3422
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
3423
|
+
});
|
|
3235
3424
|
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
3236
3425
|
if (streamBody instanceof Uint8Array) {
|
|
3237
3426
|
return Promise.resolve(streamBody);
|
|
@@ -3264,9 +3453,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
3264
3453
|
return {};
|
|
3265
3454
|
});
|
|
3266
3455
|
const parseErrorBody = async (errorBody, context) => {
|
|
3267
|
-
var _a;
|
|
3268
3456
|
const value = await parseBody(errorBody, context);
|
|
3269
|
-
value.message =
|
|
3457
|
+
value.message = value.message ?? value.Message;
|
|
3270
3458
|
return value;
|
|
3271
3459
|
};
|
|
3272
3460
|
const loadRestJsonErrorCode = (output, data) => {
|
|
@@ -16,7 +16,6 @@ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
|
16
16
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
17
17
|
const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
|
|
18
18
|
const getRuntimeConfig = (config) => {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
20
19
|
const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
|
|
21
20
|
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
22
21
|
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
|
@@ -25,21 +24,22 @@ const getRuntimeConfig = (config) => {
|
|
|
25
24
|
...config,
|
|
26
25
|
runtime: "browser",
|
|
27
26
|
defaultsMode,
|
|
28
|
-
base64Decoder:
|
|
29
|
-
base64Encoder:
|
|
30
|
-
bodyLengthChecker:
|
|
31
|
-
credentialDefaultProvider:
|
|
32
|
-
defaultUserAgentProvider:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
base64Decoder: config?.base64Decoder ?? util_base64_browser_1.fromBase64,
|
|
28
|
+
base64Encoder: config?.base64Encoder ?? util_base64_browser_1.toBase64,
|
|
29
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
|
|
30
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
31
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
32
|
+
(0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
33
|
+
maxAttempts: config?.maxAttempts ?? middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
34
|
+
region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
|
|
35
|
+
requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
|
|
37
|
+
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
|
38
|
+
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
|
39
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
40
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
|
41
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_browser_1.fromUtf8,
|
|
42
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_browser_1.toUtf8,
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -19,7 +19,6 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
|
19
19
|
const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
|
|
20
20
|
const smithy_client_2 = require("@aws-sdk/smithy-client");
|
|
21
21
|
const getRuntimeConfig = (config) => {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
23
22
|
(0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
|
|
24
23
|
const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
|
|
25
24
|
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
@@ -29,24 +28,26 @@ const getRuntimeConfig = (config) => {
|
|
|
29
28
|
...config,
|
|
30
29
|
runtime: "node",
|
|
31
30
|
defaultsMode,
|
|
32
|
-
base64Decoder:
|
|
33
|
-
base64Encoder:
|
|
34
|
-
bodyLengthChecker:
|
|
35
|
-
credentialDefaultProvider:
|
|
36
|
-
defaultUserAgentProvider:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
31
|
+
base64Decoder: config?.base64Decoder ?? util_base64_node_1.fromBase64,
|
|
32
|
+
base64Encoder: config?.base64Encoder ?? util_base64_node_1.toBase64,
|
|
33
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
|
|
34
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
|
|
35
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
36
|
+
(0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
37
|
+
maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
38
|
+
region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
39
|
+
requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
|
|
40
|
+
retryMode: config?.retryMode ??
|
|
41
|
+
(0, node_config_provider_1.loadConfig)({
|
|
42
|
+
...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
43
|
+
default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
|
|
44
|
+
}),
|
|
45
|
+
sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
|
|
46
|
+
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
|
47
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
48
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
49
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_node_1.fromUtf8,
|
|
50
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_node_1.toUtf8,
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
53
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -4,13 +4,12 @@ exports.getRuntimeConfig = void 0;
|
|
|
4
4
|
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
5
|
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
6
6
|
const getRuntimeConfig = (config) => {
|
|
7
|
-
var _a;
|
|
8
7
|
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
|
9
8
|
return {
|
|
10
9
|
...browserDefaults,
|
|
11
10
|
...config,
|
|
12
11
|
runtime: "react-native",
|
|
13
|
-
sha256:
|
|
12
|
+
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
14
13
|
};
|
|
15
14
|
};
|
|
16
15
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -3,15 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getRuntimeConfig = void 0;
|
|
4
4
|
const url_parser_1 = require("@aws-sdk/url-parser");
|
|
5
5
|
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
6
|
-
const getRuntimeConfig = (config) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
|
|
15
|
-
});
|
|
16
|
-
};
|
|
6
|
+
const getRuntimeConfig = (config) => ({
|
|
7
|
+
apiVersion: "2014-03-28",
|
|
8
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
9
|
+
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
10
|
+
logger: config?.logger ?? {},
|
|
11
|
+
serviceId: config?.serviceId ?? "CloudWatch Logs",
|
|
12
|
+
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
13
|
+
});
|
|
17
14
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -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
|
+
}
|