@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
|
@@ -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_ListAnomaliesCommand, se_ListAnomaliesCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ListAnomaliesCommand 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, ListAnomaliesCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "CloudWatchLogsClient";
|
|
26
|
+
const commandName = "ListAnomaliesCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "Logs_20140328",
|
|
35
|
+
operation: "ListAnomalies",
|
|
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_ListAnomaliesCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_ListAnomaliesCommand(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_ListLogAnomalyDetectorsCommand, se_ListLogAnomalyDetectorsCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ListLogAnomalyDetectorsCommand 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, ListLogAnomalyDetectorsCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "CloudWatchLogsClient";
|
|
26
|
+
const commandName = "ListLogAnomalyDetectorsCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "Logs_20140328",
|
|
35
|
+
operation: "ListLogAnomalyDetectors",
|
|
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_ListLogAnomalyDetectorsCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_ListLogAnomalyDetectorsCommand(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_UpdateAnomalyCommand, se_UpdateAnomalyCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class UpdateAnomalyCommand 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, UpdateAnomalyCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "CloudWatchLogsClient";
|
|
26
|
+
const commandName = "UpdateAnomalyCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "Logs_20140328",
|
|
35
|
+
operation: "UpdateAnomaly",
|
|
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_UpdateAnomalyCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_UpdateAnomalyCommand(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_UpdateLogAnomalyDetectorCommand, se_UpdateLogAnomalyDetectorCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class UpdateLogAnomalyDetectorCommand 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, UpdateLogAnomalyDetectorCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "CloudWatchLogsClient";
|
|
26
|
+
const commandName = "UpdateLogAnomalyDetectorCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "Logs_20140328",
|
|
35
|
+
operation: "UpdateLogAnomalyDetector",
|
|
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_UpdateLogAnomalyDetectorCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_UpdateLogAnomalyDetectorCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./AssociateKmsKeyCommand";
|
|
|
2
2
|
export * from "./CancelExportTaskCommand";
|
|
3
3
|
export * from "./CreateDeliveryCommand";
|
|
4
4
|
export * from "./CreateExportTaskCommand";
|
|
5
|
+
export * from "./CreateLogAnomalyDetectorCommand";
|
|
5
6
|
export * from "./CreateLogGroupCommand";
|
|
6
7
|
export * from "./CreateLogStreamCommand";
|
|
7
8
|
export * from "./DeleteAccountPolicyCommand";
|
|
@@ -11,6 +12,7 @@ export * from "./DeleteDeliveryDestinationCommand";
|
|
|
11
12
|
export * from "./DeleteDeliveryDestinationPolicyCommand";
|
|
12
13
|
export * from "./DeleteDeliverySourceCommand";
|
|
13
14
|
export * from "./DeleteDestinationCommand";
|
|
15
|
+
export * from "./DeleteLogAnomalyDetectorCommand";
|
|
14
16
|
export * from "./DeleteLogGroupCommand";
|
|
15
17
|
export * from "./DeleteLogStreamCommand";
|
|
16
18
|
export * from "./DeleteMetricFilterCommand";
|
|
@@ -38,10 +40,13 @@ export * from "./GetDeliveryCommand";
|
|
|
38
40
|
export * from "./GetDeliveryDestinationCommand";
|
|
39
41
|
export * from "./GetDeliveryDestinationPolicyCommand";
|
|
40
42
|
export * from "./GetDeliverySourceCommand";
|
|
43
|
+
export * from "./GetLogAnomalyDetectorCommand";
|
|
41
44
|
export * from "./GetLogEventsCommand";
|
|
42
45
|
export * from "./GetLogGroupFieldsCommand";
|
|
43
46
|
export * from "./GetLogRecordCommand";
|
|
44
47
|
export * from "./GetQueryResultsCommand";
|
|
48
|
+
export * from "./ListAnomaliesCommand";
|
|
49
|
+
export * from "./ListLogAnomalyDetectorsCommand";
|
|
45
50
|
export * from "./ListTagsForResourceCommand";
|
|
46
51
|
export * from "./ListTagsLogGroupCommand";
|
|
47
52
|
export * from "./PutAccountPolicyCommand";
|
|
@@ -64,3 +69,5 @@ export * from "./TagResourceCommand";
|
|
|
64
69
|
export * from "./TestMetricFilterCommand";
|
|
65
70
|
export * from "./UntagLogGroupCommand";
|
|
66
71
|
export * from "./UntagResourceCommand";
|
|
72
|
+
export * from "./UpdateAnomalyCommand";
|
|
73
|
+
export * from "./UpdateLogAnomalyDetectorCommand";
|
|
@@ -17,6 +17,27 @@ export const PolicyType = {
|
|
|
17
17
|
export const Scope = {
|
|
18
18
|
ALL: "ALL",
|
|
19
19
|
};
|
|
20
|
+
export const State = {
|
|
21
|
+
Active: "Active",
|
|
22
|
+
Baseline: "Baseline",
|
|
23
|
+
Suppressed: "Suppressed",
|
|
24
|
+
};
|
|
25
|
+
export const AnomalyDetectorStatus = {
|
|
26
|
+
ANALYZING: "ANALYZING",
|
|
27
|
+
DELETED: "DELETED",
|
|
28
|
+
FAILED: "FAILED",
|
|
29
|
+
INITIALIZING: "INITIALIZING",
|
|
30
|
+
PAUSED: "PAUSED",
|
|
31
|
+
TRAINING: "TRAINING",
|
|
32
|
+
};
|
|
33
|
+
export const EvaluationFrequency = {
|
|
34
|
+
FIFTEEN_MIN: "FIFTEEN_MIN",
|
|
35
|
+
FIVE_MIN: "FIVE_MIN",
|
|
36
|
+
ONE_HOUR: "ONE_HOUR",
|
|
37
|
+
ONE_MIN: "ONE_MIN",
|
|
38
|
+
TEN_MIN: "TEN_MIN",
|
|
39
|
+
THIRTY_MIN: "THIRTY_MIN",
|
|
40
|
+
};
|
|
20
41
|
export class InvalidParameterException extends __BaseException {
|
|
21
42
|
constructor(opts) {
|
|
22
43
|
super({
|
|
@@ -154,6 +175,10 @@ export class ResourceAlreadyExistsException extends __BaseException {
|
|
|
154
175
|
Object.setPrototypeOf(this, ResourceAlreadyExistsException.prototype);
|
|
155
176
|
}
|
|
156
177
|
}
|
|
178
|
+
export const LogGroupClass = {
|
|
179
|
+
INFREQUENT_ACCESS: "INFREQUENT_ACCESS",
|
|
180
|
+
STANDARD: "STANDARD",
|
|
181
|
+
};
|
|
157
182
|
export class DataAlreadyAcceptedException extends __BaseException {
|
|
158
183
|
constructor(opts) {
|
|
159
184
|
super({
|
|
@@ -250,6 +275,10 @@ export class InvalidSequenceTokenException extends __BaseException {
|
|
|
250
275
|
this.expectedSequenceToken = opts.expectedSequenceToken;
|
|
251
276
|
}
|
|
252
277
|
}
|
|
278
|
+
export const SuppressionState = {
|
|
279
|
+
SUPPRESSED: "SUPPRESSED",
|
|
280
|
+
UNSUPPRESSED: "UNSUPPRESSED",
|
|
281
|
+
};
|
|
253
282
|
export class UnrecognizedClientException extends __BaseException {
|
|
254
283
|
constructor(opts) {
|
|
255
284
|
super({
|
|
@@ -288,3 +317,12 @@ export class TooManyTagsException extends __BaseException {
|
|
|
288
317
|
this.resourceName = opts.resourceName;
|
|
289
318
|
}
|
|
290
319
|
}
|
|
320
|
+
export const SuppressionUnit = {
|
|
321
|
+
HOURS: "HOURS",
|
|
322
|
+
MINUTES: "MINUTES",
|
|
323
|
+
SECONDS: "SECONDS",
|
|
324
|
+
};
|
|
325
|
+
export const SuppressionType = {
|
|
326
|
+
INFINITE: "INFINITE",
|
|
327
|
+
LIMITED: "LIMITED",
|
|
328
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CloudWatchLogsClient } from "../CloudWatchLogsClient";
|
|
2
|
+
import { ListAnomaliesCommand, } from "../commands/ListAnomaliesCommand";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListAnomaliesCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListAnomalies(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.nextToken = token;
|
|
12
|
+
input["limit"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof CloudWatchLogsClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected CloudWatchLogs | CloudWatchLogsClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CloudWatchLogsClient } from "../CloudWatchLogsClient";
|
|
2
|
+
import { ListLogAnomalyDetectorsCommand, } from "../commands/ListLogAnomalyDetectorsCommand";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListLogAnomalyDetectorsCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListLogAnomalyDetectors(config, input, ...additionalArguments) {
|
|
7
|
+
let token = config.startingToken || undefined;
|
|
8
|
+
let hasNext = true;
|
|
9
|
+
let page;
|
|
10
|
+
while (hasNext) {
|
|
11
|
+
input.nextToken = token;
|
|
12
|
+
input["limit"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof CloudWatchLogsClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected CloudWatchLogs | CloudWatchLogsClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -9,3 +9,5 @@ export * from "./DescribeSubscriptionFiltersPaginator";
|
|
|
9
9
|
export * from "./FilterLogEventsPaginator";
|
|
10
10
|
export * from "./GetLogEventsPaginator";
|
|
11
11
|
export * from "./Interfaces";
|
|
12
|
+
export * from "./ListAnomaliesPaginator";
|
|
13
|
+
export * from "./ListLogAnomalyDetectorsPaginator";
|