@aws-sdk/client-cloudwatch-logs 3.454.0 → 3.458.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 +129 -73
- package/dist-cjs/CloudWatchLogs.js +14 -0
- package/dist-cjs/commands/CreateLogAnomalyDetectorCommand.js +51 -0
- package/dist-cjs/commands/DeleteLogAnomalyDetectorCommand.js +51 -0
- package/dist-cjs/commands/GetLogAnomalyDetectorCommand.js +51 -0
- package/dist-cjs/commands/ListAnomaliesCommand.js +51 -0
- package/dist-cjs/commands/ListLogAnomalyDetectorsCommand.js +51 -0
- package/dist-cjs/commands/UpdateAnomalyCommand.js +51 -0
- package/dist-cjs/commands/UpdateLogAnomalyDetectorCommand.js +51 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/models/models_0.js +39 -1
- package/dist-cjs/pagination/ListAnomaliesPaginator.js +29 -0
- package/dist-cjs/pagination/ListLogAnomalyDetectorsPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_json1_1.js +340 -3
- package/dist-es/CloudWatchLogs.js +14 -0
- package/dist-es/commands/CreateLogAnomalyDetectorCommand.js +47 -0
- package/dist-es/commands/DeleteLogAnomalyDetectorCommand.js +47 -0
- package/dist-es/commands/GetLogAnomalyDetectorCommand.js +47 -0
- package/dist-es/commands/ListAnomaliesCommand.js +47 -0
- package/dist-es/commands/ListLogAnomalyDetectorsCommand.js +47 -0
- package/dist-es/commands/UpdateAnomalyCommand.js +47 -0
- package/dist-es/commands/UpdateLogAnomalyDetectorCommand.js +47 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/models/models_0.js +38 -0
- package/dist-es/pagination/ListAnomaliesPaginator.js +25 -0
- package/dist-es/pagination/ListLogAnomalyDetectorsPaginator.js +25 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_json1_1.js +323 -0
- package/dist-types/CloudWatchLogs.d.ts +49 -0
- package/dist-types/CloudWatchLogsClient.d.ts +9 -2
- package/dist-types/commands/CreateDeliveryCommand.d.ts +1 -1
- package/dist-types/commands/CreateLogAnomalyDetectorCommand.d.ts +129 -0
- package/dist-types/commands/CreateLogGroupCommand.d.ts +1 -0
- package/dist-types/commands/DeleteLogAnomalyDetectorCommand.d.ts +83 -0
- package/dist-types/commands/DescribeLogGroupsCommand.d.ts +2 -0
- package/dist-types/commands/GetLogAnomalyDetectorCommand.d.ts +95 -0
- package/dist-types/commands/ListAnomaliesCommand.d.ts +127 -0
- package/dist-types/commands/ListLogAnomalyDetectorsCommand.d.ts +103 -0
- package/dist-types/commands/PutDeliveryDestinationCommand.d.ts +1 -1
- package/dist-types/commands/PutDeliveryDestinationPolicyCommand.d.ts +1 -1
- package/dist-types/commands/PutDeliverySourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdateAnomalyCommand.d.ts +98 -0
- package/dist-types/commands/UpdateLogAnomalyDetectorCommand.d.ts +87 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/models/models_0.d.ts +686 -4
- package/dist-types/pagination/ListAnomaliesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListLogAnomalyDetectorsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +63 -0
- package/dist-types/ts3.4/CloudWatchLogs.d.ts +119 -0
- package/dist-types/ts3.4/CloudWatchLogsClient.d.ts +44 -2
- package/dist-types/ts3.4/commands/CreateLogAnomalyDetectorCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeleteLogAnomalyDetectorCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetLogAnomalyDetectorCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListAnomaliesCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListLogAnomalyDetectorsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/UpdateAnomalyCommand.d.ts +33 -0
- package/dist-types/ts3.4/commands/UpdateLogAnomalyDetectorCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/models/models_0.d.ts +158 -0
- package/dist-types/ts3.4/pagination/ListAnomaliesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListLogAnomalyDetectorsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +84 -0
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.de_UntagResourceCommand = exports.de_UntagLogGroupCommand = exports.de_TestMetricFilterCommand = exports.de_TagResourceCommand = exports.de_TagLogGroupCommand = exports.de_StopQueryCommand = exports.de_StartQueryCommand = exports.de_PutSubscriptionFilterCommand = exports.de_PutRetentionPolicyCommand = exports.de_PutResourcePolicyCommand = exports.de_PutQueryDefinitionCommand = exports.de_PutMetricFilterCommand = exports.de_PutLogEventsCommand = exports.de_PutDestinationPolicyCommand = exports.de_PutDestinationCommand = exports.de_PutDeliverySourceCommand = exports.de_PutDeliveryDestinationPolicyCommand = exports.de_PutDeliveryDestinationCommand = exports.de_PutDataProtectionPolicyCommand = exports.de_PutAccountPolicyCommand = exports.de_ListTagsLogGroupCommand = exports.de_ListTagsForResourceCommand = exports.de_GetQueryResultsCommand = exports.de_GetLogRecordCommand = exports.de_GetLogGroupFieldsCommand = exports.de_GetLogEventsCommand = exports.de_GetDeliverySourceCommand = exports.de_GetDeliveryDestinationPolicyCommand = exports.de_GetDeliveryDestinationCommand = exports.de_GetDeliveryCommand = exports.de_GetDataProtectionPolicyCommand = exports.de_FilterLogEventsCommand = void 0;
|
|
3
|
+
exports.se_ListTagsForResourceCommand = exports.se_ListLogAnomalyDetectorsCommand = exports.se_ListAnomaliesCommand = exports.se_GetQueryResultsCommand = exports.se_GetLogRecordCommand = exports.se_GetLogGroupFieldsCommand = exports.se_GetLogEventsCommand = exports.se_GetLogAnomalyDetectorCommand = exports.se_GetDeliverySourceCommand = exports.se_GetDeliveryDestinationPolicyCommand = exports.se_GetDeliveryDestinationCommand = exports.se_GetDeliveryCommand = exports.se_GetDataProtectionPolicyCommand = exports.se_FilterLogEventsCommand = exports.se_DisassociateKmsKeyCommand = exports.se_DescribeSubscriptionFiltersCommand = exports.se_DescribeResourcePoliciesCommand = exports.se_DescribeQueryDefinitionsCommand = exports.se_DescribeQueriesCommand = exports.se_DescribeMetricFiltersCommand = exports.se_DescribeLogStreamsCommand = exports.se_DescribeLogGroupsCommand = exports.se_DescribeExportTasksCommand = exports.se_DescribeDestinationsCommand = exports.se_DescribeDeliverySourcesCommand = exports.se_DescribeDeliveryDestinationsCommand = exports.se_DescribeDeliveriesCommand = exports.se_DescribeAccountPoliciesCommand = exports.se_DeleteSubscriptionFilterCommand = exports.se_DeleteRetentionPolicyCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DeleteQueryDefinitionCommand = exports.se_DeleteMetricFilterCommand = exports.se_DeleteLogStreamCommand = exports.se_DeleteLogGroupCommand = exports.se_DeleteLogAnomalyDetectorCommand = exports.se_DeleteDestinationCommand = exports.se_DeleteDeliverySourceCommand = exports.se_DeleteDeliveryDestinationPolicyCommand = exports.se_DeleteDeliveryDestinationCommand = exports.se_DeleteDeliveryCommand = exports.se_DeleteDataProtectionPolicyCommand = exports.se_DeleteAccountPolicyCommand = exports.se_CreateLogStreamCommand = exports.se_CreateLogGroupCommand = exports.se_CreateLogAnomalyDetectorCommand = exports.se_CreateExportTaskCommand = exports.se_CreateDeliveryCommand = exports.se_CancelExportTaskCommand = exports.se_AssociateKmsKeyCommand = void 0;
|
|
4
|
+
exports.de_DescribeDestinationsCommand = exports.de_DescribeDeliverySourcesCommand = exports.de_DescribeDeliveryDestinationsCommand = exports.de_DescribeDeliveriesCommand = exports.de_DescribeAccountPoliciesCommand = exports.de_DeleteSubscriptionFilterCommand = exports.de_DeleteRetentionPolicyCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DeleteQueryDefinitionCommand = exports.de_DeleteMetricFilterCommand = exports.de_DeleteLogStreamCommand = exports.de_DeleteLogGroupCommand = exports.de_DeleteLogAnomalyDetectorCommand = exports.de_DeleteDestinationCommand = exports.de_DeleteDeliverySourceCommand = exports.de_DeleteDeliveryDestinationPolicyCommand = exports.de_DeleteDeliveryDestinationCommand = exports.de_DeleteDeliveryCommand = exports.de_DeleteDataProtectionPolicyCommand = exports.de_DeleteAccountPolicyCommand = exports.de_CreateLogStreamCommand = exports.de_CreateLogGroupCommand = exports.de_CreateLogAnomalyDetectorCommand = exports.de_CreateExportTaskCommand = exports.de_CreateDeliveryCommand = exports.de_CancelExportTaskCommand = exports.de_AssociateKmsKeyCommand = exports.se_UpdateLogAnomalyDetectorCommand = exports.se_UpdateAnomalyCommand = exports.se_UntagResourceCommand = exports.se_UntagLogGroupCommand = exports.se_TestMetricFilterCommand = exports.se_TagResourceCommand = exports.se_TagLogGroupCommand = exports.se_StopQueryCommand = exports.se_StartQueryCommand = exports.se_PutSubscriptionFilterCommand = exports.se_PutRetentionPolicyCommand = exports.se_PutResourcePolicyCommand = exports.se_PutQueryDefinitionCommand = exports.se_PutMetricFilterCommand = exports.se_PutLogEventsCommand = exports.se_PutDestinationPolicyCommand = exports.se_PutDestinationCommand = exports.se_PutDeliverySourceCommand = exports.se_PutDeliveryDestinationPolicyCommand = exports.se_PutDeliveryDestinationCommand = exports.se_PutDataProtectionPolicyCommand = exports.se_PutAccountPolicyCommand = exports.se_ListTagsLogGroupCommand = void 0;
|
|
5
|
+
exports.de_UpdateLogAnomalyDetectorCommand = exports.de_UpdateAnomalyCommand = exports.de_UntagResourceCommand = exports.de_UntagLogGroupCommand = exports.de_TestMetricFilterCommand = exports.de_TagResourceCommand = exports.de_TagLogGroupCommand = exports.de_StopQueryCommand = exports.de_StartQueryCommand = exports.de_PutSubscriptionFilterCommand = exports.de_PutRetentionPolicyCommand = exports.de_PutResourcePolicyCommand = exports.de_PutQueryDefinitionCommand = exports.de_PutMetricFilterCommand = exports.de_PutLogEventsCommand = exports.de_PutDestinationPolicyCommand = exports.de_PutDestinationCommand = exports.de_PutDeliverySourceCommand = exports.de_PutDeliveryDestinationPolicyCommand = exports.de_PutDeliveryDestinationCommand = exports.de_PutDataProtectionPolicyCommand = exports.de_PutAccountPolicyCommand = exports.de_ListTagsLogGroupCommand = exports.de_ListTagsForResourceCommand = exports.de_ListLogAnomalyDetectorsCommand = exports.de_ListAnomaliesCommand = exports.de_GetQueryResultsCommand = exports.de_GetLogRecordCommand = exports.de_GetLogGroupFieldsCommand = exports.de_GetLogEventsCommand = exports.de_GetLogAnomalyDetectorCommand = exports.de_GetDeliverySourceCommand = exports.de_GetDeliveryDestinationPolicyCommand = exports.de_GetDeliveryDestinationCommand = exports.de_GetDeliveryCommand = exports.de_GetDataProtectionPolicyCommand = exports.de_FilterLogEventsCommand = exports.de_DisassociateKmsKeyCommand = exports.de_DescribeSubscriptionFiltersCommand = exports.de_DescribeResourcePoliciesCommand = exports.de_DescribeQueryDefinitionsCommand = exports.de_DescribeQueriesCommand = exports.de_DescribeMetricFiltersCommand = exports.de_DescribeLogStreamsCommand = exports.de_DescribeLogGroupsCommand = exports.de_DescribeExportTasksCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
8
|
const uuid_1 = require("uuid");
|
|
@@ -36,6 +36,13 @@ const se_CreateExportTaskCommand = async (input, context) => {
|
|
|
36
36
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
37
37
|
};
|
|
38
38
|
exports.se_CreateExportTaskCommand = se_CreateExportTaskCommand;
|
|
39
|
+
const se_CreateLogAnomalyDetectorCommand = async (input, context) => {
|
|
40
|
+
const headers = sharedHeaders("CreateLogAnomalyDetector");
|
|
41
|
+
let body;
|
|
42
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
43
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
44
|
+
};
|
|
45
|
+
exports.se_CreateLogAnomalyDetectorCommand = se_CreateLogAnomalyDetectorCommand;
|
|
39
46
|
const se_CreateLogGroupCommand = async (input, context) => {
|
|
40
47
|
const headers = sharedHeaders("CreateLogGroup");
|
|
41
48
|
let body;
|
|
@@ -99,6 +106,13 @@ const se_DeleteDestinationCommand = async (input, context) => {
|
|
|
99
106
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
100
107
|
};
|
|
101
108
|
exports.se_DeleteDestinationCommand = se_DeleteDestinationCommand;
|
|
109
|
+
const se_DeleteLogAnomalyDetectorCommand = async (input, context) => {
|
|
110
|
+
const headers = sharedHeaders("DeleteLogAnomalyDetector");
|
|
111
|
+
let body;
|
|
112
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
113
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
114
|
+
};
|
|
115
|
+
exports.se_DeleteLogAnomalyDetectorCommand = se_DeleteLogAnomalyDetectorCommand;
|
|
102
116
|
const se_DeleteLogGroupCommand = async (input, context) => {
|
|
103
117
|
const headers = sharedHeaders("DeleteLogGroup");
|
|
104
118
|
let body;
|
|
@@ -288,6 +302,13 @@ const se_GetDeliverySourceCommand = async (input, context) => {
|
|
|
288
302
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
289
303
|
};
|
|
290
304
|
exports.se_GetDeliverySourceCommand = se_GetDeliverySourceCommand;
|
|
305
|
+
const se_GetLogAnomalyDetectorCommand = async (input, context) => {
|
|
306
|
+
const headers = sharedHeaders("GetLogAnomalyDetector");
|
|
307
|
+
let body;
|
|
308
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
309
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
310
|
+
};
|
|
311
|
+
exports.se_GetLogAnomalyDetectorCommand = se_GetLogAnomalyDetectorCommand;
|
|
291
312
|
const se_GetLogEventsCommand = async (input, context) => {
|
|
292
313
|
const headers = sharedHeaders("GetLogEvents");
|
|
293
314
|
let body;
|
|
@@ -316,6 +337,20 @@ const se_GetQueryResultsCommand = async (input, context) => {
|
|
|
316
337
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
317
338
|
};
|
|
318
339
|
exports.se_GetQueryResultsCommand = se_GetQueryResultsCommand;
|
|
340
|
+
const se_ListAnomaliesCommand = async (input, context) => {
|
|
341
|
+
const headers = sharedHeaders("ListAnomalies");
|
|
342
|
+
let body;
|
|
343
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
344
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
345
|
+
};
|
|
346
|
+
exports.se_ListAnomaliesCommand = se_ListAnomaliesCommand;
|
|
347
|
+
const se_ListLogAnomalyDetectorsCommand = async (input, context) => {
|
|
348
|
+
const headers = sharedHeaders("ListLogAnomalyDetectors");
|
|
349
|
+
let body;
|
|
350
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
351
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
352
|
+
};
|
|
353
|
+
exports.se_ListLogAnomalyDetectorsCommand = se_ListLogAnomalyDetectorsCommand;
|
|
319
354
|
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
320
355
|
const headers = sharedHeaders("ListTagsForResource");
|
|
321
356
|
let body;
|
|
@@ -470,6 +505,20 @@ const se_UntagResourceCommand = async (input, context) => {
|
|
|
470
505
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
471
506
|
};
|
|
472
507
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
508
|
+
const se_UpdateAnomalyCommand = async (input, context) => {
|
|
509
|
+
const headers = sharedHeaders("UpdateAnomaly");
|
|
510
|
+
let body;
|
|
511
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
512
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
513
|
+
};
|
|
514
|
+
exports.se_UpdateAnomalyCommand = se_UpdateAnomalyCommand;
|
|
515
|
+
const se_UpdateLogAnomalyDetectorCommand = async (input, context) => {
|
|
516
|
+
const headers = sharedHeaders("UpdateLogAnomalyDetector");
|
|
517
|
+
let body;
|
|
518
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
519
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
520
|
+
};
|
|
521
|
+
exports.se_UpdateLogAnomalyDetectorCommand = se_UpdateLogAnomalyDetectorCommand;
|
|
473
522
|
const de_AssociateKmsKeyCommand = async (output, context) => {
|
|
474
523
|
if (output.statusCode >= 300) {
|
|
475
524
|
return de_AssociateKmsKeyCommandError(output, context);
|
|
@@ -647,6 +696,51 @@ const de_CreateExportTaskCommandError = async (output, context) => {
|
|
|
647
696
|
});
|
|
648
697
|
}
|
|
649
698
|
};
|
|
699
|
+
const de_CreateLogAnomalyDetectorCommand = async (output, context) => {
|
|
700
|
+
if (output.statusCode >= 300) {
|
|
701
|
+
return de_CreateLogAnomalyDetectorCommandError(output, context);
|
|
702
|
+
}
|
|
703
|
+
const data = await parseBody(output.body, context);
|
|
704
|
+
let contents = {};
|
|
705
|
+
contents = (0, smithy_client_1._json)(data);
|
|
706
|
+
const response = {
|
|
707
|
+
$metadata: deserializeMetadata(output),
|
|
708
|
+
...contents,
|
|
709
|
+
};
|
|
710
|
+
return response;
|
|
711
|
+
};
|
|
712
|
+
exports.de_CreateLogAnomalyDetectorCommand = de_CreateLogAnomalyDetectorCommand;
|
|
713
|
+
const de_CreateLogAnomalyDetectorCommandError = async (output, context) => {
|
|
714
|
+
const parsedOutput = {
|
|
715
|
+
...output,
|
|
716
|
+
body: await parseErrorBody(output.body, context),
|
|
717
|
+
};
|
|
718
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
719
|
+
switch (errorCode) {
|
|
720
|
+
case "InvalidParameterException":
|
|
721
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
722
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
723
|
+
case "LimitExceededException":
|
|
724
|
+
case "com.amazonaws.cloudwatchlogs#LimitExceededException":
|
|
725
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
726
|
+
case "OperationAbortedException":
|
|
727
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
728
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
729
|
+
case "ResourceNotFoundException":
|
|
730
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
731
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
732
|
+
case "ServiceUnavailableException":
|
|
733
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
734
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
735
|
+
default:
|
|
736
|
+
const parsedBody = parsedOutput.body;
|
|
737
|
+
return throwDefaultError({
|
|
738
|
+
output,
|
|
739
|
+
parsedBody,
|
|
740
|
+
errorCode,
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
};
|
|
650
744
|
const de_CreateLogGroupCommand = async (output, context) => {
|
|
651
745
|
if (output.statusCode >= 300) {
|
|
652
746
|
return de_CreateLogGroupCommandError(output, context);
|
|
@@ -1019,6 +1113,45 @@ const de_DeleteDestinationCommandError = async (output, context) => {
|
|
|
1019
1113
|
});
|
|
1020
1114
|
}
|
|
1021
1115
|
};
|
|
1116
|
+
const de_DeleteLogAnomalyDetectorCommand = async (output, context) => {
|
|
1117
|
+
if (output.statusCode >= 300) {
|
|
1118
|
+
return de_DeleteLogAnomalyDetectorCommandError(output, context);
|
|
1119
|
+
}
|
|
1120
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1121
|
+
const response = {
|
|
1122
|
+
$metadata: deserializeMetadata(output),
|
|
1123
|
+
};
|
|
1124
|
+
return response;
|
|
1125
|
+
};
|
|
1126
|
+
exports.de_DeleteLogAnomalyDetectorCommand = de_DeleteLogAnomalyDetectorCommand;
|
|
1127
|
+
const de_DeleteLogAnomalyDetectorCommandError = async (output, context) => {
|
|
1128
|
+
const parsedOutput = {
|
|
1129
|
+
...output,
|
|
1130
|
+
body: await parseErrorBody(output.body, context),
|
|
1131
|
+
};
|
|
1132
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1133
|
+
switch (errorCode) {
|
|
1134
|
+
case "InvalidParameterException":
|
|
1135
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
1136
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1137
|
+
case "OperationAbortedException":
|
|
1138
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
1139
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
1140
|
+
case "ResourceNotFoundException":
|
|
1141
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
1142
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1143
|
+
case "ServiceUnavailableException":
|
|
1144
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
1145
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
1146
|
+
default:
|
|
1147
|
+
const parsedBody = parsedOutput.body;
|
|
1148
|
+
return throwDefaultError({
|
|
1149
|
+
output,
|
|
1150
|
+
parsedBody,
|
|
1151
|
+
errorCode,
|
|
1152
|
+
});
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1022
1155
|
const de_DeleteLogGroupCommand = async (output, context) => {
|
|
1023
1156
|
if (output.statusCode >= 300) {
|
|
1024
1157
|
return de_DeleteLogGroupCommandError(output, context);
|
|
@@ -2087,6 +2220,48 @@ const de_GetDeliverySourceCommandError = async (output, context) => {
|
|
|
2087
2220
|
});
|
|
2088
2221
|
}
|
|
2089
2222
|
};
|
|
2223
|
+
const de_GetLogAnomalyDetectorCommand = async (output, context) => {
|
|
2224
|
+
if (output.statusCode >= 300) {
|
|
2225
|
+
return de_GetLogAnomalyDetectorCommandError(output, context);
|
|
2226
|
+
}
|
|
2227
|
+
const data = await parseBody(output.body, context);
|
|
2228
|
+
let contents = {};
|
|
2229
|
+
contents = (0, smithy_client_1._json)(data);
|
|
2230
|
+
const response = {
|
|
2231
|
+
$metadata: deserializeMetadata(output),
|
|
2232
|
+
...contents,
|
|
2233
|
+
};
|
|
2234
|
+
return response;
|
|
2235
|
+
};
|
|
2236
|
+
exports.de_GetLogAnomalyDetectorCommand = de_GetLogAnomalyDetectorCommand;
|
|
2237
|
+
const de_GetLogAnomalyDetectorCommandError = async (output, context) => {
|
|
2238
|
+
const parsedOutput = {
|
|
2239
|
+
...output,
|
|
2240
|
+
body: await parseErrorBody(output.body, context),
|
|
2241
|
+
};
|
|
2242
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2243
|
+
switch (errorCode) {
|
|
2244
|
+
case "InvalidParameterException":
|
|
2245
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
2246
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2247
|
+
case "OperationAbortedException":
|
|
2248
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
2249
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
2250
|
+
case "ResourceNotFoundException":
|
|
2251
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
2252
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2253
|
+
case "ServiceUnavailableException":
|
|
2254
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
2255
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
2256
|
+
default:
|
|
2257
|
+
const parsedBody = parsedOutput.body;
|
|
2258
|
+
return throwDefaultError({
|
|
2259
|
+
output,
|
|
2260
|
+
parsedBody,
|
|
2261
|
+
errorCode,
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
};
|
|
2090
2265
|
const de_GetLogEventsCommand = async (output, context) => {
|
|
2091
2266
|
if (output.statusCode >= 300) {
|
|
2092
2267
|
return de_GetLogEventsCommandError(output, context);
|
|
@@ -2249,6 +2424,90 @@ const de_GetQueryResultsCommandError = async (output, context) => {
|
|
|
2249
2424
|
});
|
|
2250
2425
|
}
|
|
2251
2426
|
};
|
|
2427
|
+
const de_ListAnomaliesCommand = async (output, context) => {
|
|
2428
|
+
if (output.statusCode >= 300) {
|
|
2429
|
+
return de_ListAnomaliesCommandError(output, context);
|
|
2430
|
+
}
|
|
2431
|
+
const data = await parseBody(output.body, context);
|
|
2432
|
+
let contents = {};
|
|
2433
|
+
contents = (0, smithy_client_1._json)(data);
|
|
2434
|
+
const response = {
|
|
2435
|
+
$metadata: deserializeMetadata(output),
|
|
2436
|
+
...contents,
|
|
2437
|
+
};
|
|
2438
|
+
return response;
|
|
2439
|
+
};
|
|
2440
|
+
exports.de_ListAnomaliesCommand = de_ListAnomaliesCommand;
|
|
2441
|
+
const de_ListAnomaliesCommandError = async (output, context) => {
|
|
2442
|
+
const parsedOutput = {
|
|
2443
|
+
...output,
|
|
2444
|
+
body: await parseErrorBody(output.body, context),
|
|
2445
|
+
};
|
|
2446
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2447
|
+
switch (errorCode) {
|
|
2448
|
+
case "InvalidParameterException":
|
|
2449
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
2450
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2451
|
+
case "OperationAbortedException":
|
|
2452
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
2453
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
2454
|
+
case "ResourceNotFoundException":
|
|
2455
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
2456
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2457
|
+
case "ServiceUnavailableException":
|
|
2458
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
2459
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
2460
|
+
default:
|
|
2461
|
+
const parsedBody = parsedOutput.body;
|
|
2462
|
+
return throwDefaultError({
|
|
2463
|
+
output,
|
|
2464
|
+
parsedBody,
|
|
2465
|
+
errorCode,
|
|
2466
|
+
});
|
|
2467
|
+
}
|
|
2468
|
+
};
|
|
2469
|
+
const de_ListLogAnomalyDetectorsCommand = async (output, context) => {
|
|
2470
|
+
if (output.statusCode >= 300) {
|
|
2471
|
+
return de_ListLogAnomalyDetectorsCommandError(output, context);
|
|
2472
|
+
}
|
|
2473
|
+
const data = await parseBody(output.body, context);
|
|
2474
|
+
let contents = {};
|
|
2475
|
+
contents = (0, smithy_client_1._json)(data);
|
|
2476
|
+
const response = {
|
|
2477
|
+
$metadata: deserializeMetadata(output),
|
|
2478
|
+
...contents,
|
|
2479
|
+
};
|
|
2480
|
+
return response;
|
|
2481
|
+
};
|
|
2482
|
+
exports.de_ListLogAnomalyDetectorsCommand = de_ListLogAnomalyDetectorsCommand;
|
|
2483
|
+
const de_ListLogAnomalyDetectorsCommandError = async (output, context) => {
|
|
2484
|
+
const parsedOutput = {
|
|
2485
|
+
...output,
|
|
2486
|
+
body: await parseErrorBody(output.body, context),
|
|
2487
|
+
};
|
|
2488
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2489
|
+
switch (errorCode) {
|
|
2490
|
+
case "InvalidParameterException":
|
|
2491
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
2492
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2493
|
+
case "OperationAbortedException":
|
|
2494
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
2495
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
2496
|
+
case "ResourceNotFoundException":
|
|
2497
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
2498
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2499
|
+
case "ServiceUnavailableException":
|
|
2500
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
2501
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
2502
|
+
default:
|
|
2503
|
+
const parsedBody = parsedOutput.body;
|
|
2504
|
+
return throwDefaultError({
|
|
2505
|
+
output,
|
|
2506
|
+
parsedBody,
|
|
2507
|
+
errorCode,
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2510
|
+
};
|
|
2252
2511
|
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
2253
2512
|
if (output.statusCode >= 300) {
|
|
2254
2513
|
return de_ListTagsForResourceCommandError(output, context);
|
|
@@ -3134,6 +3393,84 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
3134
3393
|
});
|
|
3135
3394
|
}
|
|
3136
3395
|
};
|
|
3396
|
+
const de_UpdateAnomalyCommand = async (output, context) => {
|
|
3397
|
+
if (output.statusCode >= 300) {
|
|
3398
|
+
return de_UpdateAnomalyCommandError(output, context);
|
|
3399
|
+
}
|
|
3400
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
3401
|
+
const response = {
|
|
3402
|
+
$metadata: deserializeMetadata(output),
|
|
3403
|
+
};
|
|
3404
|
+
return response;
|
|
3405
|
+
};
|
|
3406
|
+
exports.de_UpdateAnomalyCommand = de_UpdateAnomalyCommand;
|
|
3407
|
+
const de_UpdateAnomalyCommandError = async (output, context) => {
|
|
3408
|
+
const parsedOutput = {
|
|
3409
|
+
...output,
|
|
3410
|
+
body: await parseErrorBody(output.body, context),
|
|
3411
|
+
};
|
|
3412
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3413
|
+
switch (errorCode) {
|
|
3414
|
+
case "InvalidParameterException":
|
|
3415
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
3416
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
3417
|
+
case "OperationAbortedException":
|
|
3418
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
3419
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
3420
|
+
case "ResourceNotFoundException":
|
|
3421
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
3422
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
3423
|
+
case "ServiceUnavailableException":
|
|
3424
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
3425
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
3426
|
+
default:
|
|
3427
|
+
const parsedBody = parsedOutput.body;
|
|
3428
|
+
return throwDefaultError({
|
|
3429
|
+
output,
|
|
3430
|
+
parsedBody,
|
|
3431
|
+
errorCode,
|
|
3432
|
+
});
|
|
3433
|
+
}
|
|
3434
|
+
};
|
|
3435
|
+
const de_UpdateLogAnomalyDetectorCommand = async (output, context) => {
|
|
3436
|
+
if (output.statusCode >= 300) {
|
|
3437
|
+
return de_UpdateLogAnomalyDetectorCommandError(output, context);
|
|
3438
|
+
}
|
|
3439
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
3440
|
+
const response = {
|
|
3441
|
+
$metadata: deserializeMetadata(output),
|
|
3442
|
+
};
|
|
3443
|
+
return response;
|
|
3444
|
+
};
|
|
3445
|
+
exports.de_UpdateLogAnomalyDetectorCommand = de_UpdateLogAnomalyDetectorCommand;
|
|
3446
|
+
const de_UpdateLogAnomalyDetectorCommandError = async (output, context) => {
|
|
3447
|
+
const parsedOutput = {
|
|
3448
|
+
...output,
|
|
3449
|
+
body: await parseErrorBody(output.body, context),
|
|
3450
|
+
};
|
|
3451
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3452
|
+
switch (errorCode) {
|
|
3453
|
+
case "InvalidParameterException":
|
|
3454
|
+
case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
|
|
3455
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
3456
|
+
case "OperationAbortedException":
|
|
3457
|
+
case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
|
|
3458
|
+
throw await de_OperationAbortedExceptionRes(parsedOutput, context);
|
|
3459
|
+
case "ResourceNotFoundException":
|
|
3460
|
+
case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
|
|
3461
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
3462
|
+
case "ServiceUnavailableException":
|
|
3463
|
+
case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
|
|
3464
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
3465
|
+
default:
|
|
3466
|
+
const parsedBody = parsedOutput.body;
|
|
3467
|
+
return throwDefaultError({
|
|
3468
|
+
output,
|
|
3469
|
+
parsedBody,
|
|
3470
|
+
errorCode,
|
|
3471
|
+
});
|
|
3472
|
+
}
|
|
3473
|
+
};
|
|
3137
3474
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
3138
3475
|
const body = parsedOutput.body;
|
|
3139
3476
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -4,6 +4,7 @@ import { AssociateKmsKeyCommand, } from "./commands/AssociateKmsKeyCommand";
|
|
|
4
4
|
import { CancelExportTaskCommand, } from "./commands/CancelExportTaskCommand";
|
|
5
5
|
import { CreateDeliveryCommand, } from "./commands/CreateDeliveryCommand";
|
|
6
6
|
import { CreateExportTaskCommand, } from "./commands/CreateExportTaskCommand";
|
|
7
|
+
import { CreateLogAnomalyDetectorCommand, } from "./commands/CreateLogAnomalyDetectorCommand";
|
|
7
8
|
import { CreateLogGroupCommand, } from "./commands/CreateLogGroupCommand";
|
|
8
9
|
import { CreateLogStreamCommand, } from "./commands/CreateLogStreamCommand";
|
|
9
10
|
import { DeleteAccountPolicyCommand, } from "./commands/DeleteAccountPolicyCommand";
|
|
@@ -13,6 +14,7 @@ import { DeleteDeliveryDestinationCommand, } from "./commands/DeleteDeliveryDest
|
|
|
13
14
|
import { DeleteDeliveryDestinationPolicyCommand, } from "./commands/DeleteDeliveryDestinationPolicyCommand";
|
|
14
15
|
import { DeleteDeliverySourceCommand, } from "./commands/DeleteDeliverySourceCommand";
|
|
15
16
|
import { DeleteDestinationCommand, } from "./commands/DeleteDestinationCommand";
|
|
17
|
+
import { DeleteLogAnomalyDetectorCommand, } from "./commands/DeleteLogAnomalyDetectorCommand";
|
|
16
18
|
import { DeleteLogGroupCommand, } from "./commands/DeleteLogGroupCommand";
|
|
17
19
|
import { DeleteLogStreamCommand, } from "./commands/DeleteLogStreamCommand";
|
|
18
20
|
import { DeleteMetricFilterCommand, } from "./commands/DeleteMetricFilterCommand";
|
|
@@ -40,10 +42,13 @@ import { GetDeliveryCommand } from "./commands/GetDeliveryCommand";
|
|
|
40
42
|
import { GetDeliveryDestinationCommand, } from "./commands/GetDeliveryDestinationCommand";
|
|
41
43
|
import { GetDeliveryDestinationPolicyCommand, } from "./commands/GetDeliveryDestinationPolicyCommand";
|
|
42
44
|
import { GetDeliverySourceCommand, } from "./commands/GetDeliverySourceCommand";
|
|
45
|
+
import { GetLogAnomalyDetectorCommand, } from "./commands/GetLogAnomalyDetectorCommand";
|
|
43
46
|
import { GetLogEventsCommand, } from "./commands/GetLogEventsCommand";
|
|
44
47
|
import { GetLogGroupFieldsCommand, } from "./commands/GetLogGroupFieldsCommand";
|
|
45
48
|
import { GetLogRecordCommand, } from "./commands/GetLogRecordCommand";
|
|
46
49
|
import { GetQueryResultsCommand, } from "./commands/GetQueryResultsCommand";
|
|
50
|
+
import { ListAnomaliesCommand, } from "./commands/ListAnomaliesCommand";
|
|
51
|
+
import { ListLogAnomalyDetectorsCommand, } from "./commands/ListLogAnomalyDetectorsCommand";
|
|
47
52
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
48
53
|
import { ListTagsLogGroupCommand, } from "./commands/ListTagsLogGroupCommand";
|
|
49
54
|
import { PutAccountPolicyCommand, } from "./commands/PutAccountPolicyCommand";
|
|
@@ -66,11 +71,14 @@ import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
|
66
71
|
import { TestMetricFilterCommand, } from "./commands/TestMetricFilterCommand";
|
|
67
72
|
import { UntagLogGroupCommand, } from "./commands/UntagLogGroupCommand";
|
|
68
73
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
74
|
+
import { UpdateAnomalyCommand, } from "./commands/UpdateAnomalyCommand";
|
|
75
|
+
import { UpdateLogAnomalyDetectorCommand, } from "./commands/UpdateLogAnomalyDetectorCommand";
|
|
69
76
|
const commands = {
|
|
70
77
|
AssociateKmsKeyCommand,
|
|
71
78
|
CancelExportTaskCommand,
|
|
72
79
|
CreateDeliveryCommand,
|
|
73
80
|
CreateExportTaskCommand,
|
|
81
|
+
CreateLogAnomalyDetectorCommand,
|
|
74
82
|
CreateLogGroupCommand,
|
|
75
83
|
CreateLogStreamCommand,
|
|
76
84
|
DeleteAccountPolicyCommand,
|
|
@@ -80,6 +88,7 @@ const commands = {
|
|
|
80
88
|
DeleteDeliveryDestinationPolicyCommand,
|
|
81
89
|
DeleteDeliverySourceCommand,
|
|
82
90
|
DeleteDestinationCommand,
|
|
91
|
+
DeleteLogAnomalyDetectorCommand,
|
|
83
92
|
DeleteLogGroupCommand,
|
|
84
93
|
DeleteLogStreamCommand,
|
|
85
94
|
DeleteMetricFilterCommand,
|
|
@@ -107,10 +116,13 @@ const commands = {
|
|
|
107
116
|
GetDeliveryDestinationCommand,
|
|
108
117
|
GetDeliveryDestinationPolicyCommand,
|
|
109
118
|
GetDeliverySourceCommand,
|
|
119
|
+
GetLogAnomalyDetectorCommand,
|
|
110
120
|
GetLogEventsCommand,
|
|
111
121
|
GetLogGroupFieldsCommand,
|
|
112
122
|
GetLogRecordCommand,
|
|
113
123
|
GetQueryResultsCommand,
|
|
124
|
+
ListAnomaliesCommand,
|
|
125
|
+
ListLogAnomalyDetectorsCommand,
|
|
114
126
|
ListTagsForResourceCommand,
|
|
115
127
|
ListTagsLogGroupCommand,
|
|
116
128
|
PutAccountPolicyCommand,
|
|
@@ -133,6 +145,8 @@ const commands = {
|
|
|
133
145
|
TestMetricFilterCommand,
|
|
134
146
|
UntagLogGroupCommand,
|
|
135
147
|
UntagResourceCommand,
|
|
148
|
+
UpdateAnomalyCommand,
|
|
149
|
+
UpdateLogAnomalyDetectorCommand,
|
|
136
150
|
};
|
|
137
151
|
export class CloudWatchLogs extends CloudWatchLogsClient {
|
|
138
152
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_CreateLogAnomalyDetectorCommand, se_CreateLogAnomalyDetectorCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class CreateLogAnomalyDetectorCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, CreateLogAnomalyDetectorCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "CloudWatchLogsClient";
|
|
26
|
+
const commandName = "CreateLogAnomalyDetectorCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "Logs_20140328",
|
|
35
|
+
operation: "CreateLogAnomalyDetector",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_CreateLogAnomalyDetectorCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_CreateLogAnomalyDetectorCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_DeleteLogAnomalyDetectorCommand, se_DeleteLogAnomalyDetectorCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DeleteLogAnomalyDetectorCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, DeleteLogAnomalyDetectorCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "CloudWatchLogsClient";
|
|
26
|
+
const commandName = "DeleteLogAnomalyDetectorCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "Logs_20140328",
|
|
35
|
+
operation: "DeleteLogAnomalyDetector",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_DeleteLogAnomalyDetectorCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_DeleteLogAnomalyDetectorCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_GetLogAnomalyDetectorCommand, se_GetLogAnomalyDetectorCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetLogAnomalyDetectorCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetLogAnomalyDetectorCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "CloudWatchLogsClient";
|
|
26
|
+
const commandName = "GetLogAnomalyDetectorCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "Logs_20140328",
|
|
35
|
+
operation: "GetLogAnomalyDetector",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_GetLogAnomalyDetectorCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_GetLogAnomalyDetectorCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|