@aws-sdk/client-cloudwatch-logs 3.216.0 → 3.222.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/README.md +15 -14
- package/dist-cjs/CloudWatchLogs.js +45 -0
- package/dist-cjs/commands/DeleteDataProtectionPolicyCommand.js +46 -0
- package/dist-cjs/commands/GetDataProtectionPolicyCommand.js +46 -0
- package/dist-cjs/commands/PutDataProtectionPolicyCommand.js +46 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/endpoint/ruleset.js +5 -5
- package/dist-cjs/models/models_0.js +30 -3
- package/dist-cjs/protocols/Aws_json1_1.js +221 -2
- package/dist-es/CloudWatchLogs.js +45 -0
- package/dist-es/commands/DeleteDataProtectionPolicyCommand.js +42 -0
- package/dist-es/commands/GetDataProtectionPolicyCommand.js +42 -0
- package/dist-es/commands/PutDataProtectionPolicyCommand.js +42 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoint/ruleset.js +5 -5
- package/dist-es/models/models_0.js +22 -0
- package/dist-es/protocols/Aws_json1_1.js +213 -0
- package/dist-types/CloudWatchLogs.d.ts +184 -114
- package/dist-types/CloudWatchLogsClient.d.ts +20 -16
- package/dist-types/commands/AssociateKmsKeyCommand.d.ts +11 -10
- package/dist-types/commands/CreateExportTaskCommand.d.ts +11 -11
- package/dist-types/commands/CreateLogGroupCommand.d.ts +14 -12
- package/dist-types/commands/CreateLogStreamCommand.d.ts +1 -1
- package/dist-types/commands/DeleteDataProtectionPolicyCommand.d.ts +38 -0
- package/dist-types/commands/DescribeLogGroupsCommand.d.ts +3 -0
- package/dist-types/commands/DescribeLogStreamsCommand.d.ts +3 -0
- package/dist-types/commands/DescribeQueriesCommand.d.ts +3 -3
- package/dist-types/commands/DisassociateKmsKeyCommand.d.ts +5 -3
- package/dist-types/commands/FilterLogEventsCommand.d.ts +8 -4
- package/dist-types/commands/GetDataProtectionPolicyCommand.d.ts +37 -0
- package/dist-types/commands/GetLogEventsCommand.d.ts +4 -0
- package/dist-types/commands/GetLogGroupFieldsCommand.d.ts +10 -6
- package/dist-types/commands/GetQueryResultsCommand.d.ts +4 -2
- package/dist-types/commands/PutDataProtectionPolicyCommand.d.ts +51 -0
- package/dist-types/commands/PutDestinationCommand.d.ts +3 -3
- package/dist-types/commands/PutLogEventsCommand.d.ts +11 -8
- package/dist-types/commands/PutMetricFilterCommand.d.ts +5 -5
- package/dist-types/commands/PutQueryDefinitionCommand.d.ts +7 -7
- package/dist-types/commands/PutRetentionPolicyCommand.d.ts +11 -10
- package/dist-types/commands/PutSubscriptionFilterCommand.d.ts +10 -11
- package/dist-types/commands/StartQueryCommand.d.ts +9 -4
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +369 -115
- 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 +18 -0
- package/dist-types/ts3.4/commands/DeleteDataProtectionPolicyCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/GetDataProtectionPolicyCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/PutDataProtectionPolicyCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/models/models_0.d.ts +53 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +36 -0
- package/package.json +29 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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;
|
|
3
|
+
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_1PutDataProtectionPolicyCommand = 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_1GetDataProtectionPolicyCommand = 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_1DeleteDataProtectionPolicyCommand = 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_1PutDataProtectionPolicyCommand = 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_1GetDataProtectionPolicyCommand = 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 = exports.deserializeAws_json1_1DeleteDataProtectionPolicyCommand = exports.deserializeAws_json1_1CreateLogStreamCommand = exports.deserializeAws_json1_1CreateLogGroupCommand = exports.deserializeAws_json1_1CreateExportTaskCommand = 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");
|
|
@@ -56,6 +56,16 @@ const serializeAws_json1_1CreateLogStreamCommand = async (input, context) => {
|
|
|
56
56
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
57
|
};
|
|
58
58
|
exports.serializeAws_json1_1CreateLogStreamCommand = serializeAws_json1_1CreateLogStreamCommand;
|
|
59
|
+
const serializeAws_json1_1DeleteDataProtectionPolicyCommand = async (input, context) => {
|
|
60
|
+
const headers = {
|
|
61
|
+
"content-type": "application/x-amz-json-1.1",
|
|
62
|
+
"x-amz-target": "Logs_20140328.DeleteDataProtectionPolicy",
|
|
63
|
+
};
|
|
64
|
+
let body;
|
|
65
|
+
body = JSON.stringify(serializeAws_json1_1DeleteDataProtectionPolicyRequest(input, context));
|
|
66
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
|
+
};
|
|
68
|
+
exports.serializeAws_json1_1DeleteDataProtectionPolicyCommand = serializeAws_json1_1DeleteDataProtectionPolicyCommand;
|
|
59
69
|
const serializeAws_json1_1DeleteDestinationCommand = async (input, context) => {
|
|
60
70
|
const headers = {
|
|
61
71
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -246,6 +256,16 @@ const serializeAws_json1_1FilterLogEventsCommand = async (input, context) => {
|
|
|
246
256
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
247
257
|
};
|
|
248
258
|
exports.serializeAws_json1_1FilterLogEventsCommand = serializeAws_json1_1FilterLogEventsCommand;
|
|
259
|
+
const serializeAws_json1_1GetDataProtectionPolicyCommand = async (input, context) => {
|
|
260
|
+
const headers = {
|
|
261
|
+
"content-type": "application/x-amz-json-1.1",
|
|
262
|
+
"x-amz-target": "Logs_20140328.GetDataProtectionPolicy",
|
|
263
|
+
};
|
|
264
|
+
let body;
|
|
265
|
+
body = JSON.stringify(serializeAws_json1_1GetDataProtectionPolicyRequest(input, context));
|
|
266
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
267
|
+
};
|
|
268
|
+
exports.serializeAws_json1_1GetDataProtectionPolicyCommand = serializeAws_json1_1GetDataProtectionPolicyCommand;
|
|
249
269
|
const serializeAws_json1_1GetLogEventsCommand = async (input, context) => {
|
|
250
270
|
const headers = {
|
|
251
271
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -306,6 +326,16 @@ const serializeAws_json1_1ListTagsLogGroupCommand = async (input, context) => {
|
|
|
306
326
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
307
327
|
};
|
|
308
328
|
exports.serializeAws_json1_1ListTagsLogGroupCommand = serializeAws_json1_1ListTagsLogGroupCommand;
|
|
329
|
+
const serializeAws_json1_1PutDataProtectionPolicyCommand = async (input, context) => {
|
|
330
|
+
const headers = {
|
|
331
|
+
"content-type": "application/x-amz-json-1.1",
|
|
332
|
+
"x-amz-target": "Logs_20140328.PutDataProtectionPolicy",
|
|
333
|
+
};
|
|
334
|
+
let body;
|
|
335
|
+
body = JSON.stringify(serializeAws_json1_1PutDataProtectionPolicyRequest(input, context));
|
|
336
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
337
|
+
};
|
|
338
|
+
exports.serializeAws_json1_1PutDataProtectionPolicyCommand = serializeAws_json1_1PutDataProtectionPolicyCommand;
|
|
309
339
|
const serializeAws_json1_1PutDestinationCommand = async (input, context) => {
|
|
310
340
|
const headers = {
|
|
311
341
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -668,6 +698,46 @@ const deserializeAws_json1_1CreateLogStreamCommandError = async (output, context
|
|
|
668
698
|
});
|
|
669
699
|
}
|
|
670
700
|
};
|
|
701
|
+
const deserializeAws_json1_1DeleteDataProtectionPolicyCommand = async (output, context) => {
|
|
702
|
+
if (output.statusCode >= 300) {
|
|
703
|
+
return deserializeAws_json1_1DeleteDataProtectionPolicyCommandError(output, context);
|
|
704
|
+
}
|
|
705
|
+
await collectBody(output.body, context);
|
|
706
|
+
const response = {
|
|
707
|
+
$metadata: deserializeMetadata(output),
|
|
708
|
+
};
|
|
709
|
+
return Promise.resolve(response);
|
|
710
|
+
};
|
|
711
|
+
exports.deserializeAws_json1_1DeleteDataProtectionPolicyCommand = deserializeAws_json1_1DeleteDataProtectionPolicyCommand;
|
|
712
|
+
const deserializeAws_json1_1DeleteDataProtectionPolicyCommandError = async (output, context) => {
|
|
713
|
+
const parsedOutput = {
|
|
714
|
+
...output,
|
|
715
|
+
body: await parseErrorBody(output.body, context),
|
|
716
|
+
};
|
|
717
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
718
|
+
switch (errorCode) {
|
|
719
|
+
case "InvalidParameterException":
|
|
720
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
721
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
722
|
+
case "OperationAbortedException":
|
|
723
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
724
|
+
throw await deserializeAws_json1_1OperationAbortedExceptionResponse(parsedOutput, context);
|
|
725
|
+
case "ResourceNotFoundException":
|
|
726
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
727
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
728
|
+
case "ServiceUnavailableException":
|
|
729
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
730
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
731
|
+
default:
|
|
732
|
+
const parsedBody = parsedOutput.body;
|
|
733
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
734
|
+
output,
|
|
735
|
+
parsedBody,
|
|
736
|
+
exceptionCtor: CloudWatchLogsServiceException_1.CloudWatchLogsServiceException,
|
|
737
|
+
errorCode,
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
};
|
|
671
741
|
const deserializeAws_json1_1DeleteDestinationCommand = async (output, context) => {
|
|
672
742
|
if (output.statusCode >= 300) {
|
|
673
743
|
return deserializeAws_json1_1DeleteDestinationCommandError(output, context);
|
|
@@ -1410,6 +1480,49 @@ const deserializeAws_json1_1FilterLogEventsCommandError = async (output, context
|
|
|
1410
1480
|
});
|
|
1411
1481
|
}
|
|
1412
1482
|
};
|
|
1483
|
+
const deserializeAws_json1_1GetDataProtectionPolicyCommand = async (output, context) => {
|
|
1484
|
+
if (output.statusCode >= 300) {
|
|
1485
|
+
return deserializeAws_json1_1GetDataProtectionPolicyCommandError(output, context);
|
|
1486
|
+
}
|
|
1487
|
+
const data = await parseBody(output.body, context);
|
|
1488
|
+
let contents = {};
|
|
1489
|
+
contents = deserializeAws_json1_1GetDataProtectionPolicyResponse(data, context);
|
|
1490
|
+
const response = {
|
|
1491
|
+
$metadata: deserializeMetadata(output),
|
|
1492
|
+
...contents,
|
|
1493
|
+
};
|
|
1494
|
+
return Promise.resolve(response);
|
|
1495
|
+
};
|
|
1496
|
+
exports.deserializeAws_json1_1GetDataProtectionPolicyCommand = deserializeAws_json1_1GetDataProtectionPolicyCommand;
|
|
1497
|
+
const deserializeAws_json1_1GetDataProtectionPolicyCommandError = async (output, context) => {
|
|
1498
|
+
const parsedOutput = {
|
|
1499
|
+
...output,
|
|
1500
|
+
body: await parseErrorBody(output.body, context),
|
|
1501
|
+
};
|
|
1502
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1503
|
+
switch (errorCode) {
|
|
1504
|
+
case "InvalidParameterException":
|
|
1505
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
1506
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1507
|
+
case "OperationAbortedException":
|
|
1508
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
1509
|
+
throw await deserializeAws_json1_1OperationAbortedExceptionResponse(parsedOutput, context);
|
|
1510
|
+
case "ResourceNotFoundException":
|
|
1511
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
1512
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1513
|
+
case "ServiceUnavailableException":
|
|
1514
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
1515
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1516
|
+
default:
|
|
1517
|
+
const parsedBody = parsedOutput.body;
|
|
1518
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1519
|
+
output,
|
|
1520
|
+
parsedBody,
|
|
1521
|
+
exceptionCtor: CloudWatchLogsServiceException_1.CloudWatchLogsServiceException,
|
|
1522
|
+
errorCode,
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1413
1526
|
const deserializeAws_json1_1GetLogEventsCommand = async (output, context) => {
|
|
1414
1527
|
if (output.statusCode >= 300) {
|
|
1415
1528
|
return deserializeAws_json1_1GetLogEventsCommandError(output, context);
|
|
@@ -1653,6 +1766,52 @@ const deserializeAws_json1_1ListTagsLogGroupCommandError = async (output, contex
|
|
|
1653
1766
|
});
|
|
1654
1767
|
}
|
|
1655
1768
|
};
|
|
1769
|
+
const deserializeAws_json1_1PutDataProtectionPolicyCommand = async (output, context) => {
|
|
1770
|
+
if (output.statusCode >= 300) {
|
|
1771
|
+
return deserializeAws_json1_1PutDataProtectionPolicyCommandError(output, context);
|
|
1772
|
+
}
|
|
1773
|
+
const data = await parseBody(output.body, context);
|
|
1774
|
+
let contents = {};
|
|
1775
|
+
contents = deserializeAws_json1_1PutDataProtectionPolicyResponse(data, context);
|
|
1776
|
+
const response = {
|
|
1777
|
+
$metadata: deserializeMetadata(output),
|
|
1778
|
+
...contents,
|
|
1779
|
+
};
|
|
1780
|
+
return Promise.resolve(response);
|
|
1781
|
+
};
|
|
1782
|
+
exports.deserializeAws_json1_1PutDataProtectionPolicyCommand = deserializeAws_json1_1PutDataProtectionPolicyCommand;
|
|
1783
|
+
const deserializeAws_json1_1PutDataProtectionPolicyCommandError = async (output, context) => {
|
|
1784
|
+
const parsedOutput = {
|
|
1785
|
+
...output,
|
|
1786
|
+
body: await parseErrorBody(output.body, context),
|
|
1787
|
+
};
|
|
1788
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1789
|
+
switch (errorCode) {
|
|
1790
|
+
case "InvalidParameterException":
|
|
1791
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
1792
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1793
|
+
case "LimitExceededException":
|
|
1794
|
+
case "com.amazonaws.cloudwatchlogs#LimitExceededException":
|
|
1795
|
+
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1796
|
+
case "OperationAbortedException":
|
|
1797
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
1798
|
+
throw await deserializeAws_json1_1OperationAbortedExceptionResponse(parsedOutput, context);
|
|
1799
|
+
case "ResourceNotFoundException":
|
|
1800
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
1801
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1802
|
+
case "ServiceUnavailableException":
|
|
1803
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
1804
|
+
throw await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context);
|
|
1805
|
+
default:
|
|
1806
|
+
const parsedBody = parsedOutput.body;
|
|
1807
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
1808
|
+
output,
|
|
1809
|
+
parsedBody,
|
|
1810
|
+
exceptionCtor: CloudWatchLogsServiceException_1.CloudWatchLogsServiceException,
|
|
1811
|
+
errorCode,
|
|
1812
|
+
});
|
|
1813
|
+
}
|
|
1814
|
+
};
|
|
1656
1815
|
const deserializeAws_json1_1PutDestinationCommand = async (output, context) => {
|
|
1657
1816
|
if (output.statusCode >= 300) {
|
|
1658
1817
|
return deserializeAws_json1_1PutDestinationCommandError(output, context);
|
|
@@ -2361,6 +2520,13 @@ const deserializeAws_json1_1UnrecognizedClientExceptionResponse = async (parsedO
|
|
|
2361
2520
|
});
|
|
2362
2521
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2363
2522
|
};
|
|
2523
|
+
const serializeAws_json1_1AccountIds = (input, context) => {
|
|
2524
|
+
return input
|
|
2525
|
+
.filter((e) => e != null)
|
|
2526
|
+
.map((entry) => {
|
|
2527
|
+
return entry;
|
|
2528
|
+
});
|
|
2529
|
+
};
|
|
2364
2530
|
const serializeAws_json1_1AssociateKmsKeyRequest = (input, context) => {
|
|
2365
2531
|
return {
|
|
2366
2532
|
...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }),
|
|
@@ -2396,6 +2562,11 @@ const serializeAws_json1_1CreateLogStreamRequest = (input, context) => {
|
|
|
2396
2562
|
...(input.logStreamName != null && { logStreamName: input.logStreamName }),
|
|
2397
2563
|
};
|
|
2398
2564
|
};
|
|
2565
|
+
const serializeAws_json1_1DeleteDataProtectionPolicyRequest = (input, context) => {
|
|
2566
|
+
return {
|
|
2567
|
+
...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
|
|
2568
|
+
};
|
|
2569
|
+
};
|
|
2399
2570
|
const serializeAws_json1_1DeleteDestinationRequest = (input, context) => {
|
|
2400
2571
|
return {
|
|
2401
2572
|
...(input.destinationName != null && { destinationName: input.destinationName }),
|
|
@@ -2456,7 +2627,12 @@ const serializeAws_json1_1DescribeExportTasksRequest = (input, context) => {
|
|
|
2456
2627
|
};
|
|
2457
2628
|
const serializeAws_json1_1DescribeLogGroupsRequest = (input, context) => {
|
|
2458
2629
|
return {
|
|
2630
|
+
...(input.accountIdentifiers != null && {
|
|
2631
|
+
accountIdentifiers: serializeAws_json1_1AccountIds(input.accountIdentifiers, context),
|
|
2632
|
+
}),
|
|
2633
|
+
...(input.includeLinkedAccounts != null && { includeLinkedAccounts: input.includeLinkedAccounts }),
|
|
2459
2634
|
...(input.limit != null && { limit: input.limit }),
|
|
2635
|
+
...(input.logGroupNamePattern != null && { logGroupNamePattern: input.logGroupNamePattern }),
|
|
2460
2636
|
...(input.logGroupNamePrefix != null && { logGroupNamePrefix: input.logGroupNamePrefix }),
|
|
2461
2637
|
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
2462
2638
|
};
|
|
@@ -2465,6 +2641,7 @@ const serializeAws_json1_1DescribeLogStreamsRequest = (input, context) => {
|
|
|
2465
2641
|
return {
|
|
2466
2642
|
...(input.descending != null && { descending: input.descending }),
|
|
2467
2643
|
...(input.limit != null && { limit: input.limit }),
|
|
2644
|
+
...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
|
|
2468
2645
|
...(input.logGroupName != null && { logGroupName: input.logGroupName }),
|
|
2469
2646
|
...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }),
|
|
2470
2647
|
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
@@ -2530,6 +2707,7 @@ const serializeAws_json1_1FilterLogEventsRequest = (input, context) => {
|
|
|
2530
2707
|
...(input.filterPattern != null && { filterPattern: input.filterPattern }),
|
|
2531
2708
|
...(input.interleaved != null && { interleaved: input.interleaved }),
|
|
2532
2709
|
...(input.limit != null && { limit: input.limit }),
|
|
2710
|
+
...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
|
|
2533
2711
|
...(input.logGroupName != null && { logGroupName: input.logGroupName }),
|
|
2534
2712
|
...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }),
|
|
2535
2713
|
...(input.logStreamNames != null && {
|
|
@@ -2537,21 +2715,30 @@ const serializeAws_json1_1FilterLogEventsRequest = (input, context) => {
|
|
|
2537
2715
|
}),
|
|
2538
2716
|
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
2539
2717
|
...(input.startTime != null && { startTime: input.startTime }),
|
|
2718
|
+
...(input.unmask != null && { unmask: input.unmask }),
|
|
2719
|
+
};
|
|
2720
|
+
};
|
|
2721
|
+
const serializeAws_json1_1GetDataProtectionPolicyRequest = (input, context) => {
|
|
2722
|
+
return {
|
|
2723
|
+
...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
|
|
2540
2724
|
};
|
|
2541
2725
|
};
|
|
2542
2726
|
const serializeAws_json1_1GetLogEventsRequest = (input, context) => {
|
|
2543
2727
|
return {
|
|
2544
2728
|
...(input.endTime != null && { endTime: input.endTime }),
|
|
2545
2729
|
...(input.limit != null && { limit: input.limit }),
|
|
2730
|
+
...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
|
|
2546
2731
|
...(input.logGroupName != null && { logGroupName: input.logGroupName }),
|
|
2547
2732
|
...(input.logStreamName != null && { logStreamName: input.logStreamName }),
|
|
2548
2733
|
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
2549
2734
|
...(input.startFromHead != null && { startFromHead: input.startFromHead }),
|
|
2550
2735
|
...(input.startTime != null && { startTime: input.startTime }),
|
|
2736
|
+
...(input.unmask != null && { unmask: input.unmask }),
|
|
2551
2737
|
};
|
|
2552
2738
|
};
|
|
2553
2739
|
const serializeAws_json1_1GetLogGroupFieldsRequest = (input, context) => {
|
|
2554
2740
|
return {
|
|
2741
|
+
...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
|
|
2555
2742
|
...(input.logGroupName != null && { logGroupName: input.logGroupName }),
|
|
2556
2743
|
...(input.time != null && { time: input.time }),
|
|
2557
2744
|
};
|
|
@@ -2559,6 +2746,7 @@ const serializeAws_json1_1GetLogGroupFieldsRequest = (input, context) => {
|
|
|
2559
2746
|
const serializeAws_json1_1GetLogRecordRequest = (input, context) => {
|
|
2560
2747
|
return {
|
|
2561
2748
|
...(input.logRecordPointer != null && { logRecordPointer: input.logRecordPointer }),
|
|
2749
|
+
...(input.unmask != null && { unmask: input.unmask }),
|
|
2562
2750
|
};
|
|
2563
2751
|
};
|
|
2564
2752
|
const serializeAws_json1_1GetQueryResultsRequest = (input, context) => {
|
|
@@ -2596,6 +2784,13 @@ const serializeAws_json1_1ListTagsLogGroupRequest = (input, context) => {
|
|
|
2596
2784
|
...(input.logGroupName != null && { logGroupName: input.logGroupName }),
|
|
2597
2785
|
};
|
|
2598
2786
|
};
|
|
2787
|
+
const serializeAws_json1_1LogGroupIdentifiers = (input, context) => {
|
|
2788
|
+
return input
|
|
2789
|
+
.filter((e) => e != null)
|
|
2790
|
+
.map((entry) => {
|
|
2791
|
+
return entry;
|
|
2792
|
+
});
|
|
2793
|
+
};
|
|
2599
2794
|
const serializeAws_json1_1LogGroupNames = (input, context) => {
|
|
2600
2795
|
return input
|
|
2601
2796
|
.filter((e) => e != null)
|
|
@@ -2620,6 +2815,12 @@ const serializeAws_json1_1MetricTransformations = (input, context) => {
|
|
|
2620
2815
|
return serializeAws_json1_1MetricTransformation(entry, context);
|
|
2621
2816
|
});
|
|
2622
2817
|
};
|
|
2818
|
+
const serializeAws_json1_1PutDataProtectionPolicyRequest = (input, context) => {
|
|
2819
|
+
return {
|
|
2820
|
+
...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }),
|
|
2821
|
+
...(input.policyDocument != null && { policyDocument: input.policyDocument }),
|
|
2822
|
+
};
|
|
2823
|
+
};
|
|
2623
2824
|
const serializeAws_json1_1PutDestinationPolicyRequest = (input, context) => {
|
|
2624
2825
|
return {
|
|
2625
2826
|
...(input.accessPolicy != null && { accessPolicy: input.accessPolicy }),
|
|
@@ -2689,6 +2890,9 @@ const serializeAws_json1_1StartQueryRequest = (input, context) => {
|
|
|
2689
2890
|
return {
|
|
2690
2891
|
...(input.endTime != null && { endTime: input.endTime }),
|
|
2691
2892
|
...(input.limit != null && { limit: input.limit }),
|
|
2893
|
+
...(input.logGroupIdentifiers != null && {
|
|
2894
|
+
logGroupIdentifiers: serializeAws_json1_1LogGroupIdentifiers(input.logGroupIdentifiers, context),
|
|
2895
|
+
}),
|
|
2692
2896
|
...(input.logGroupName != null && { logGroupName: input.logGroupName }),
|
|
2693
2897
|
...(input.logGroupNames != null && {
|
|
2694
2898
|
logGroupNames: serializeAws_json1_1LogGroupNames(input.logGroupNames, context),
|
|
@@ -2946,6 +3150,13 @@ const deserializeAws_json1_1FilterLogEventsResponse = (output, context) => {
|
|
|
2946
3150
|
: undefined,
|
|
2947
3151
|
};
|
|
2948
3152
|
};
|
|
3153
|
+
const deserializeAws_json1_1GetDataProtectionPolicyResponse = (output, context) => {
|
|
3154
|
+
return {
|
|
3155
|
+
lastUpdatedTime: (0, smithy_client_1.expectLong)(output.lastUpdatedTime),
|
|
3156
|
+
logGroupIdentifier: (0, smithy_client_1.expectString)(output.logGroupIdentifier),
|
|
3157
|
+
policyDocument: (0, smithy_client_1.expectString)(output.policyDocument),
|
|
3158
|
+
};
|
|
3159
|
+
};
|
|
2949
3160
|
const deserializeAws_json1_1GetLogEventsResponse = (output, context) => {
|
|
2950
3161
|
return {
|
|
2951
3162
|
events: output.events != null ? deserializeAws_json1_1OutputLogEvents(output.events, context) : undefined,
|
|
@@ -3007,6 +3218,7 @@ const deserializeAws_json1_1LogGroup = (output, context) => {
|
|
|
3007
3218
|
return {
|
|
3008
3219
|
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
3009
3220
|
creationTime: (0, smithy_client_1.expectLong)(output.creationTime),
|
|
3221
|
+
dataProtectionStatus: (0, smithy_client_1.expectString)(output.dataProtectionStatus),
|
|
3010
3222
|
kmsKeyId: (0, smithy_client_1.expectString)(output.kmsKeyId),
|
|
3011
3223
|
logGroupName: (0, smithy_client_1.expectString)(output.logGroupName),
|
|
3012
3224
|
metricFilterCount: (0, smithy_client_1.expectInt32)(output.metricFilterCount),
|
|
@@ -3179,6 +3391,13 @@ const deserializeAws_json1_1OutputLogEvents = (output, context) => {
|
|
|
3179
3391
|
});
|
|
3180
3392
|
return retVal;
|
|
3181
3393
|
};
|
|
3394
|
+
const deserializeAws_json1_1PutDataProtectionPolicyResponse = (output, context) => {
|
|
3395
|
+
return {
|
|
3396
|
+
lastUpdatedTime: (0, smithy_client_1.expectLong)(output.lastUpdatedTime),
|
|
3397
|
+
logGroupIdentifier: (0, smithy_client_1.expectString)(output.logGroupIdentifier),
|
|
3398
|
+
policyDocument: (0, smithy_client_1.expectString)(output.policyDocument),
|
|
3399
|
+
};
|
|
3400
|
+
};
|
|
3182
3401
|
const deserializeAws_json1_1PutDestinationResponse = (output, context) => {
|
|
3183
3402
|
return {
|
|
3184
3403
|
destination: output.destination != null ? deserializeAws_json1_1Destination(output.destination, context) : undefined,
|
|
@@ -4,6 +4,7 @@ import { CancelExportTaskCommand, } from "./commands/CancelExportTaskCommand";
|
|
|
4
4
|
import { CreateExportTaskCommand, } from "./commands/CreateExportTaskCommand";
|
|
5
5
|
import { CreateLogGroupCommand, } from "./commands/CreateLogGroupCommand";
|
|
6
6
|
import { CreateLogStreamCommand, } from "./commands/CreateLogStreamCommand";
|
|
7
|
+
import { DeleteDataProtectionPolicyCommand, } from "./commands/DeleteDataProtectionPolicyCommand";
|
|
7
8
|
import { DeleteDestinationCommand, } from "./commands/DeleteDestinationCommand";
|
|
8
9
|
import { DeleteLogGroupCommand, } from "./commands/DeleteLogGroupCommand";
|
|
9
10
|
import { DeleteLogStreamCommand, } from "./commands/DeleteLogStreamCommand";
|
|
@@ -23,12 +24,14 @@ import { DescribeResourcePoliciesCommand, } from "./commands/DescribeResourcePol
|
|
|
23
24
|
import { DescribeSubscriptionFiltersCommand, } from "./commands/DescribeSubscriptionFiltersCommand";
|
|
24
25
|
import { DisassociateKmsKeyCommand, } from "./commands/DisassociateKmsKeyCommand";
|
|
25
26
|
import { FilterLogEventsCommand, } from "./commands/FilterLogEventsCommand";
|
|
27
|
+
import { GetDataProtectionPolicyCommand, } from "./commands/GetDataProtectionPolicyCommand";
|
|
26
28
|
import { GetLogEventsCommand, } from "./commands/GetLogEventsCommand";
|
|
27
29
|
import { GetLogGroupFieldsCommand, } from "./commands/GetLogGroupFieldsCommand";
|
|
28
30
|
import { GetLogRecordCommand, } from "./commands/GetLogRecordCommand";
|
|
29
31
|
import { GetQueryResultsCommand, } from "./commands/GetQueryResultsCommand";
|
|
30
32
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
31
33
|
import { ListTagsLogGroupCommand, } from "./commands/ListTagsLogGroupCommand";
|
|
34
|
+
import { PutDataProtectionPolicyCommand, } from "./commands/PutDataProtectionPolicyCommand";
|
|
32
35
|
import { PutDestinationCommand, } from "./commands/PutDestinationCommand";
|
|
33
36
|
import { PutDestinationPolicyCommand, } from "./commands/PutDestinationPolicyCommand";
|
|
34
37
|
import { PutLogEventsCommand, } from "./commands/PutLogEventsCommand";
|
|
@@ -115,6 +118,20 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
|
|
|
115
118
|
return this.send(command, optionsOrCb);
|
|
116
119
|
}
|
|
117
120
|
}
|
|
121
|
+
deleteDataProtectionPolicy(args, optionsOrCb, cb) {
|
|
122
|
+
const command = new DeleteDataProtectionPolicyCommand(args);
|
|
123
|
+
if (typeof optionsOrCb === "function") {
|
|
124
|
+
this.send(command, optionsOrCb);
|
|
125
|
+
}
|
|
126
|
+
else if (typeof cb === "function") {
|
|
127
|
+
if (typeof optionsOrCb !== "object")
|
|
128
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
129
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
return this.send(command, optionsOrCb);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
118
135
|
deleteDestination(args, optionsOrCb, cb) {
|
|
119
136
|
const command = new DeleteDestinationCommand(args);
|
|
120
137
|
if (typeof optionsOrCb === "function") {
|
|
@@ -381,6 +398,20 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
|
|
|
381
398
|
return this.send(command, optionsOrCb);
|
|
382
399
|
}
|
|
383
400
|
}
|
|
401
|
+
getDataProtectionPolicy(args, optionsOrCb, cb) {
|
|
402
|
+
const command = new GetDataProtectionPolicyCommand(args);
|
|
403
|
+
if (typeof optionsOrCb === "function") {
|
|
404
|
+
this.send(command, optionsOrCb);
|
|
405
|
+
}
|
|
406
|
+
else if (typeof cb === "function") {
|
|
407
|
+
if (typeof optionsOrCb !== "object")
|
|
408
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
409
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
return this.send(command, optionsOrCb);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
384
415
|
getLogEvents(args, optionsOrCb, cb) {
|
|
385
416
|
const command = new GetLogEventsCommand(args);
|
|
386
417
|
if (typeof optionsOrCb === "function") {
|
|
@@ -465,6 +496,20 @@ export class CloudWatchLogs extends CloudWatchLogsClient {
|
|
|
465
496
|
return this.send(command, optionsOrCb);
|
|
466
497
|
}
|
|
467
498
|
}
|
|
499
|
+
putDataProtectionPolicy(args, optionsOrCb, cb) {
|
|
500
|
+
const command = new PutDataProtectionPolicyCommand(args);
|
|
501
|
+
if (typeof optionsOrCb === "function") {
|
|
502
|
+
this.send(command, optionsOrCb);
|
|
503
|
+
}
|
|
504
|
+
else if (typeof cb === "function") {
|
|
505
|
+
if (typeof optionsOrCb !== "object")
|
|
506
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
507
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
508
|
+
}
|
|
509
|
+
else {
|
|
510
|
+
return this.send(command, optionsOrCb);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
468
513
|
putDestination(args, optionsOrCb, cb) {
|
|
469
514
|
const command = new PutDestinationCommand(args);
|
|
470
515
|
if (typeof optionsOrCb === "function") {
|
|
@@ -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 { DeleteDataProtectionPolicyRequestFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1DeleteDataProtectionPolicyCommand, serializeAws_json1_1DeleteDataProtectionPolicyCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export class DeleteDataProtectionPolicyCommand 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, DeleteDataProtectionPolicyCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CloudWatchLogsClient";
|
|
25
|
+
const commandName = "DeleteDataProtectionPolicyCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: DeleteDataProtectionPolicyRequestFilterSensitiveLog,
|
|
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_1DeleteDataProtectionPolicyCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_1DeleteDataProtectionPolicyCommand(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 { GetDataProtectionPolicyRequestFilterSensitiveLog, GetDataProtectionPolicyResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1GetDataProtectionPolicyCommand, serializeAws_json1_1GetDataProtectionPolicyCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export class GetDataProtectionPolicyCommand 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, GetDataProtectionPolicyCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CloudWatchLogsClient";
|
|
25
|
+
const commandName = "GetDataProtectionPolicyCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: GetDataProtectionPolicyRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: GetDataProtectionPolicyResponseFilterSensitiveLog,
|
|
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_1GetDataProtectionPolicyCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_1GetDataProtectionPolicyCommand(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 { PutDataProtectionPolicyRequestFilterSensitiveLog, PutDataProtectionPolicyResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1PutDataProtectionPolicyCommand, serializeAws_json1_1PutDataProtectionPolicyCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export class PutDataProtectionPolicyCommand 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, PutDataProtectionPolicyCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "CloudWatchLogsClient";
|
|
25
|
+
const commandName = "PutDataProtectionPolicyCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: PutDataProtectionPolicyRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: PutDataProtectionPolicyResponseFilterSensitiveLog,
|
|
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_1PutDataProtectionPolicyCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_json1_1PutDataProtectionPolicyCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from "./CancelExportTaskCommand";
|
|
|
3
3
|
export * from "./CreateExportTaskCommand";
|
|
4
4
|
export * from "./CreateLogGroupCommand";
|
|
5
5
|
export * from "./CreateLogStreamCommand";
|
|
6
|
+
export * from "./DeleteDataProtectionPolicyCommand";
|
|
6
7
|
export * from "./DeleteDestinationCommand";
|
|
7
8
|
export * from "./DeleteLogGroupCommand";
|
|
8
9
|
export * from "./DeleteLogStreamCommand";
|
|
@@ -22,12 +23,14 @@ export * from "./DescribeResourcePoliciesCommand";
|
|
|
22
23
|
export * from "./DescribeSubscriptionFiltersCommand";
|
|
23
24
|
export * from "./DisassociateKmsKeyCommand";
|
|
24
25
|
export * from "./FilterLogEventsCommand";
|
|
26
|
+
export * from "./GetDataProtectionPolicyCommand";
|
|
25
27
|
export * from "./GetLogEventsCommand";
|
|
26
28
|
export * from "./GetLogGroupFieldsCommand";
|
|
27
29
|
export * from "./GetLogRecordCommand";
|
|
28
30
|
export * from "./GetQueryResultsCommand";
|
|
29
31
|
export * from "./ListTagsForResourceCommand";
|
|
30
32
|
export * from "./ListTagsLogGroupCommand";
|
|
33
|
+
export * from "./PutDataProtectionPolicyCommand";
|
|
31
34
|
export * from "./PutDestinationCommand";
|
|
32
35
|
export * from "./PutDestinationPolicyCommand";
|
|
33
36
|
export * from "./PutLogEventsCommand";
|