@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.
@@ -3,6 +3,6 @@ export const resolveClientEndpointParameters = (options) => {
3
3
  ...options,
4
4
  useDualstackEndpoint: options.useDualstackEndpoint ?? false,
5
5
  useFipsEndpoint: options.useFipsEndpoint ?? false,
6
- defaultSigningName: "execute-api",
6
+ defaultSigningName: "iot",
7
7
  };
8
8
  };
@@ -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(_),