@aws-sdk/client-iot 3.315.0 → 3.317.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/dist-cjs/IoT.js +242 -3332
- package/dist-cjs/endpoint/EndpointParameters.js +1 -1
- package/dist-cjs/models/models_0.js +2 -0
- package/dist-cjs/pagination/ListManagedJobTemplatesPaginator.js +29 -0
- package/dist-cjs/pagination/ListRelatedResourcesForAuditFindingPaginator.js +29 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_restJson1.js +5 -5
- package/dist-es/IoT.js +242 -3332
- package/dist-es/endpoint/EndpointParameters.js +1 -1
- package/dist-es/models/models_0.js +2 -0
- package/dist-es/pagination/ListManagedJobTemplatesPaginator.js +25 -0
- package/dist-es/pagination/ListRelatedResourcesForAuditFindingPaginator.js +25 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +5 -5
- package/dist-types/IoT.d.ts +260 -1078
- package/dist-types/commands/ListOTAUpdatesCommand.d.ts +1 -1
- package/dist-types/models/models_0.d.ts +2 -0
- package/dist-types/pagination/ListManagedJobTemplatesPaginator.d.ts +7 -0
- package/dist-types/pagination/ListRelatedResourcesForAuditFindingPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/IoT.d.ts +2 -1
- package/dist-types/ts3.4/models/models_0.d.ts +2 -0
- package/dist-types/ts3.4/pagination/ListManagedJobTemplatesPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListRelatedResourcesForAuditFindingPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/package.json +6 -6
|
@@ -462,6 +462,8 @@ export const OTAUpdateStatus = {
|
|
|
462
462
|
CREATE_FAILED: "CREATE_FAILED",
|
|
463
463
|
CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS",
|
|
464
464
|
CREATE_PENDING: "CREATE_PENDING",
|
|
465
|
+
DELETE_FAILED: "DELETE_FAILED",
|
|
466
|
+
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
|
|
465
467
|
};
|
|
466
468
|
export class MalformedPolicyException extends __BaseException {
|
|
467
469
|
constructor(opts) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ListManagedJobTemplatesCommand, } from "../commands/ListManagedJobTemplatesCommand";
|
|
2
|
+
import { IoTClient } from "../IoTClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListManagedJobTemplatesCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListManagedJobTemplates(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["maxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof IoTClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected IoT | IoTClient");
|
|
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 { ListRelatedResourcesForAuditFindingCommand, } from "../commands/ListRelatedResourcesForAuditFindingCommand";
|
|
2
|
+
import { IoTClient } from "../IoTClient";
|
|
3
|
+
const makePagedClientRequest = async (client, input, ...args) => {
|
|
4
|
+
return await client.send(new ListRelatedResourcesForAuditFindingCommand(input), ...args);
|
|
5
|
+
};
|
|
6
|
+
export async function* paginateListRelatedResourcesForAuditFinding(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["maxResults"] = config.pageSize;
|
|
13
|
+
if (config.client instanceof IoTClient) {
|
|
14
|
+
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
throw new Error("Invalid client, expected IoT | IoTClient");
|
|
18
|
+
}
|
|
19
|
+
yield page;
|
|
20
|
+
const prevToken = token;
|
|
21
|
+
token = page.nextToken;
|
|
22
|
+
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
@@ -23,6 +23,7 @@ export * from "./ListJobExecutionsForJobPaginator";
|
|
|
23
23
|
export * from "./ListJobExecutionsForThingPaginator";
|
|
24
24
|
export * from "./ListJobTemplatesPaginator";
|
|
25
25
|
export * from "./ListJobsPaginator";
|
|
26
|
+
export * from "./ListManagedJobTemplatesPaginator";
|
|
26
27
|
export * from "./ListMetricValuesPaginator";
|
|
27
28
|
export * from "./ListMitigationActionsPaginator";
|
|
28
29
|
export * from "./ListOTAUpdatesPaginator";
|
|
@@ -33,6 +34,7 @@ export * from "./ListPrincipalPoliciesPaginator";
|
|
|
33
34
|
export * from "./ListPrincipalThingsPaginator";
|
|
34
35
|
export * from "./ListProvisioningTemplateVersionsPaginator";
|
|
35
36
|
export * from "./ListProvisioningTemplatesPaginator";
|
|
37
|
+
export * from "./ListRelatedResourcesForAuditFindingPaginator";
|
|
36
38
|
export * from "./ListRoleAliasesPaginator";
|
|
37
39
|
export * from "./ListScheduledAuditsPaginator";
|
|
38
40
|
export * from "./ListSecurityProfilesForTargetPaginator";
|
|
@@ -340,7 +340,7 @@ export const se_CreateAuditSuppressionCommand = async (input, context) => {
|
|
|
340
340
|
let body;
|
|
341
341
|
body = JSON.stringify(take(input, {
|
|
342
342
|
checkName: [],
|
|
343
|
-
clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
|
|
343
|
+
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
344
344
|
description: [],
|
|
345
345
|
expirationDate: (_) => Math.round(_.getTime() / 1000),
|
|
346
346
|
resourceIdentifier: (_) => _json(_),
|
|
@@ -438,7 +438,7 @@ export const se_CreateCustomMetricCommand = async (input, context) => {
|
|
|
438
438
|
resolvedPath = __resolvedPath(resolvedPath, input, "metricName", () => input.metricName, "{metricName}", false);
|
|
439
439
|
let body;
|
|
440
440
|
body = JSON.stringify(take(input, {
|
|
441
|
-
clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
|
|
441
|
+
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
442
442
|
displayName: [],
|
|
443
443
|
metricType: [],
|
|
444
444
|
tags: (_) => _json(_),
|
|
@@ -462,7 +462,7 @@ export const se_CreateDimensionCommand = async (input, context) => {
|
|
|
462
462
|
resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name, "{name}", false);
|
|
463
463
|
let body;
|
|
464
464
|
body = JSON.stringify(take(input, {
|
|
465
|
-
clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
|
|
465
|
+
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
466
466
|
stringValues: (_) => _json(_),
|
|
467
467
|
tags: (_) => _json(_),
|
|
468
468
|
type: [],
|
|
@@ -4232,7 +4232,7 @@ export const se_StartAuditMitigationActionsTaskCommand = async (input, context)
|
|
|
4232
4232
|
let body;
|
|
4233
4233
|
body = JSON.stringify(take(input, {
|
|
4234
4234
|
auditCheckToActionsMapping: (_) => _json(_),
|
|
4235
|
-
clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
|
|
4235
|
+
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
4236
4236
|
target: (_) => _json(_),
|
|
4237
4237
|
}));
|
|
4238
4238
|
return new __HttpRequest({
|
|
@@ -4255,7 +4255,7 @@ export const se_StartDetectMitigationActionsTaskCommand = async (input, context)
|
|
|
4255
4255
|
let body;
|
|
4256
4256
|
body = JSON.stringify(take(input, {
|
|
4257
4257
|
actions: (_) => _json(_),
|
|
4258
|
-
clientRequestToken: (_) => _ ?? generateIdempotencyToken(),
|
|
4258
|
+
clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
4259
4259
|
includeOnlyActiveViolations: [],
|
|
4260
4260
|
includeSuppressedAlerts: [],
|
|
4261
4261
|
target: (_) => _json(_),
|