@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.
@@ -6,7 +6,7 @@ const resolveClientEndpointParameters = (options) => {
6
6
  ...options,
7
7
  useDualstackEndpoint: options.useDualstackEndpoint ?? false,
8
8
  useFipsEndpoint: options.useFipsEndpoint ?? false,
9
- defaultSigningName: "execute-api",
9
+ defaultSigningName: "iot",
10
10
  };
11
11
  };
12
12
  exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
@@ -484,6 +484,8 @@ exports.OTAUpdateStatus = {
484
484
  CREATE_FAILED: "CREATE_FAILED",
485
485
  CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS",
486
486
  CREATE_PENDING: "CREATE_PENDING",
487
+ DELETE_FAILED: "DELETE_FAILED",
488
+ DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
487
489
  };
488
490
  class MalformedPolicyException extends IoTServiceException_1.IoTServiceException {
489
491
  constructor(opts) {
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListManagedJobTemplates = void 0;
4
+ const ListManagedJobTemplatesCommand_1 = require("../commands/ListManagedJobTemplatesCommand");
5
+ const IoTClient_1 = require("../IoTClient");
6
+ const makePagedClientRequest = async (client, input, ...args) => {
7
+ return await client.send(new ListManagedJobTemplatesCommand_1.ListManagedJobTemplatesCommand(input), ...args);
8
+ };
9
+ async function* paginateListManagedJobTemplates(config, input, ...additionalArguments) {
10
+ let token = config.startingToken || undefined;
11
+ let hasNext = true;
12
+ let page;
13
+ while (hasNext) {
14
+ input.nextToken = token;
15
+ input["maxResults"] = config.pageSize;
16
+ if (config.client instanceof IoTClient_1.IoTClient) {
17
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
+ }
19
+ else {
20
+ throw new Error("Invalid client, expected IoT | IoTClient");
21
+ }
22
+ yield page;
23
+ const prevToken = token;
24
+ token = page.nextToken;
25
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
+ }
27
+ return undefined;
28
+ }
29
+ exports.paginateListManagedJobTemplates = paginateListManagedJobTemplates;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.paginateListRelatedResourcesForAuditFinding = void 0;
4
+ const ListRelatedResourcesForAuditFindingCommand_1 = require("../commands/ListRelatedResourcesForAuditFindingCommand");
5
+ const IoTClient_1 = require("../IoTClient");
6
+ const makePagedClientRequest = async (client, input, ...args) => {
7
+ return await client.send(new ListRelatedResourcesForAuditFindingCommand_1.ListRelatedResourcesForAuditFindingCommand(input), ...args);
8
+ };
9
+ async function* paginateListRelatedResourcesForAuditFinding(config, input, ...additionalArguments) {
10
+ let token = config.startingToken || undefined;
11
+ let hasNext = true;
12
+ let page;
13
+ while (hasNext) {
14
+ input.nextToken = token;
15
+ input["maxResults"] = config.pageSize;
16
+ if (config.client instanceof IoTClient_1.IoTClient) {
17
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
+ }
19
+ else {
20
+ throw new Error("Invalid client, expected IoT | IoTClient");
21
+ }
22
+ yield page;
23
+ const prevToken = token;
24
+ token = page.nextToken;
25
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
+ }
27
+ return undefined;
28
+ }
29
+ exports.paginateListRelatedResourcesForAuditFinding = paginateListRelatedResourcesForAuditFinding;
@@ -26,6 +26,7 @@ tslib_1.__exportStar(require("./ListJobExecutionsForJobPaginator"), exports);
26
26
  tslib_1.__exportStar(require("./ListJobExecutionsForThingPaginator"), exports);
27
27
  tslib_1.__exportStar(require("./ListJobTemplatesPaginator"), exports);
28
28
  tslib_1.__exportStar(require("./ListJobsPaginator"), exports);
29
+ tslib_1.__exportStar(require("./ListManagedJobTemplatesPaginator"), exports);
29
30
  tslib_1.__exportStar(require("./ListMetricValuesPaginator"), exports);
30
31
  tslib_1.__exportStar(require("./ListMitigationActionsPaginator"), exports);
31
32
  tslib_1.__exportStar(require("./ListOTAUpdatesPaginator"), exports);
@@ -36,6 +37,7 @@ tslib_1.__exportStar(require("./ListPrincipalPoliciesPaginator"), exports);
36
37
  tslib_1.__exportStar(require("./ListPrincipalThingsPaginator"), exports);
37
38
  tslib_1.__exportStar(require("./ListProvisioningTemplateVersionsPaginator"), exports);
38
39
  tslib_1.__exportStar(require("./ListProvisioningTemplatesPaginator"), exports);
40
+ tslib_1.__exportStar(require("./ListRelatedResourcesForAuditFindingPaginator"), exports);
39
41
  tslib_1.__exportStar(require("./ListRoleAliasesPaginator"), exports);
40
42
  tslib_1.__exportStar(require("./ListScheduledAuditsPaginator"), exports);
41
43
  tslib_1.__exportStar(require("./ListSecurityProfilesForTargetPaginator"), exports);
@@ -368,7 +368,7 @@ const se_CreateAuditSuppressionCommand = async (input, context) => {
368
368
  let body;
369
369
  body = JSON.stringify((0, smithy_client_1.take)(input, {
370
370
  checkName: [],
371
- clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
371
+ clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
372
372
  description: [],
373
373
  expirationDate: (_) => Math.round(_.getTime() / 1000),
374
374
  resourceIdentifier: (_) => (0, smithy_client_1._json)(_),
@@ -470,7 +470,7 @@ const se_CreateCustomMetricCommand = async (input, context) => {
470
470
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "metricName", () => input.metricName, "{metricName}", false);
471
471
  let body;
472
472
  body = JSON.stringify((0, smithy_client_1.take)(input, {
473
- clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
473
+ clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
474
474
  displayName: [],
475
475
  metricType: [],
476
476
  tags: (_) => (0, smithy_client_1._json)(_),
@@ -495,7 +495,7 @@ const se_CreateDimensionCommand = async (input, context) => {
495
495
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "name", () => input.name, "{name}", false);
496
496
  let body;
497
497
  body = JSON.stringify((0, smithy_client_1.take)(input, {
498
- clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
498
+ clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
499
499
  stringValues: (_) => (0, smithy_client_1._json)(_),
500
500
  tags: (_) => (0, smithy_client_1._json)(_),
501
501
  type: [],
@@ -4447,7 +4447,7 @@ const se_StartAuditMitigationActionsTaskCommand = async (input, context) => {
4447
4447
  let body;
4448
4448
  body = JSON.stringify((0, smithy_client_1.take)(input, {
4449
4449
  auditCheckToActionsMapping: (_) => (0, smithy_client_1._json)(_),
4450
- clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
4450
+ clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
4451
4451
  target: (_) => (0, smithy_client_1._json)(_),
4452
4452
  }));
4453
4453
  return new protocol_http_1.HttpRequest({
@@ -4471,7 +4471,7 @@ const se_StartDetectMitigationActionsTaskCommand = async (input, context) => {
4471
4471
  let body;
4472
4472
  body = JSON.stringify((0, smithy_client_1.take)(input, {
4473
4473
  actions: (_) => (0, smithy_client_1._json)(_),
4474
- clientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
4474
+ clientRequestToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
4475
4475
  includeOnlyActiveViolations: [],
4476
4476
  includeSuppressedAlerts: [],
4477
4477
  target: (_) => (0, smithy_client_1._json)(_),