@aws-sdk/client-iot 3.1075.0 → 3.1077.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.
@@ -1,403 +0,0 @@
1
- const { IoTServiceException: __BaseException } = require("./IoTServiceException");
2
- exports.InternalFailureException = class InternalFailureException extends __BaseException {
3
- name = "InternalFailureException";
4
- $fault = "server";
5
- constructor(opts) {
6
- super({
7
- name: "InternalFailureException",
8
- $fault: "server",
9
- ...opts,
10
- });
11
- Object.setPrototypeOf(this, InternalFailureException.prototype);
12
- }
13
- };
14
- exports.InvalidRequestException = class InvalidRequestException extends __BaseException {
15
- name = "InvalidRequestException";
16
- $fault = "client";
17
- constructor(opts) {
18
- super({
19
- name: "InvalidRequestException",
20
- $fault: "client",
21
- ...opts,
22
- });
23
- Object.setPrototypeOf(this, InvalidRequestException.prototype);
24
- }
25
- };
26
- exports.ResourceNotFoundException = class ResourceNotFoundException extends __BaseException {
27
- name = "ResourceNotFoundException";
28
- $fault = "client";
29
- constructor(opts) {
30
- super({
31
- name: "ResourceNotFoundException",
32
- $fault: "client",
33
- ...opts,
34
- });
35
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
36
- }
37
- };
38
- exports.ServiceUnavailableException = class ServiceUnavailableException extends __BaseException {
39
- name = "ServiceUnavailableException";
40
- $fault = "server";
41
- constructor(opts) {
42
- super({
43
- name: "ServiceUnavailableException",
44
- $fault: "server",
45
- ...opts,
46
- });
47
- Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
48
- }
49
- };
50
- exports.ThrottlingException = class ThrottlingException extends __BaseException {
51
- name = "ThrottlingException";
52
- $fault = "client";
53
- constructor(opts) {
54
- super({
55
- name: "ThrottlingException",
56
- $fault: "client",
57
- ...opts,
58
- });
59
- Object.setPrototypeOf(this, ThrottlingException.prototype);
60
- }
61
- };
62
- exports.TransferAlreadyCompletedException = class TransferAlreadyCompletedException extends __BaseException {
63
- name = "TransferAlreadyCompletedException";
64
- $fault = "client";
65
- constructor(opts) {
66
- super({
67
- name: "TransferAlreadyCompletedException",
68
- $fault: "client",
69
- ...opts,
70
- });
71
- Object.setPrototypeOf(this, TransferAlreadyCompletedException.prototype);
72
- }
73
- };
74
- exports.UnauthorizedException = class UnauthorizedException extends __BaseException {
75
- name = "UnauthorizedException";
76
- $fault = "client";
77
- constructor(opts) {
78
- super({
79
- name: "UnauthorizedException",
80
- $fault: "client",
81
- ...opts,
82
- });
83
- Object.setPrototypeOf(this, UnauthorizedException.prototype);
84
- }
85
- };
86
- exports.ConflictException = class ConflictException extends __BaseException {
87
- name = "ConflictException";
88
- $fault = "client";
89
- resourceId;
90
- constructor(opts) {
91
- super({
92
- name: "ConflictException",
93
- $fault: "client",
94
- ...opts,
95
- });
96
- Object.setPrototypeOf(this, ConflictException.prototype);
97
- this.resourceId = opts.resourceId;
98
- }
99
- };
100
- exports.InternalServerException = class InternalServerException extends __BaseException {
101
- name = "InternalServerException";
102
- $fault = "server";
103
- constructor(opts) {
104
- super({
105
- name: "InternalServerException",
106
- $fault: "server",
107
- ...opts,
108
- });
109
- Object.setPrototypeOf(this, InternalServerException.prototype);
110
- }
111
- };
112
- exports.ServiceQuotaExceededException = class ServiceQuotaExceededException extends __BaseException {
113
- name = "ServiceQuotaExceededException";
114
- $fault = "client";
115
- constructor(opts) {
116
- super({
117
- name: "ServiceQuotaExceededException",
118
- $fault: "client",
119
- ...opts,
120
- });
121
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
122
- }
123
- };
124
- exports.ValidationException = class ValidationException extends __BaseException {
125
- name = "ValidationException";
126
- $fault = "client";
127
- constructor(opts) {
128
- super({
129
- name: "ValidationException",
130
- $fault: "client",
131
- ...opts,
132
- });
133
- Object.setPrototypeOf(this, ValidationException.prototype);
134
- }
135
- };
136
- exports.LimitExceededException = class LimitExceededException extends __BaseException {
137
- name = "LimitExceededException";
138
- $fault = "client";
139
- constructor(opts) {
140
- super({
141
- name: "LimitExceededException",
142
- $fault: "client",
143
- ...opts,
144
- });
145
- Object.setPrototypeOf(this, LimitExceededException.prototype);
146
- }
147
- };
148
- exports.VersionConflictException = class VersionConflictException extends __BaseException {
149
- name = "VersionConflictException";
150
- $fault = "client";
151
- constructor(opts) {
152
- super({
153
- name: "VersionConflictException",
154
- $fault: "client",
155
- ...opts,
156
- });
157
- Object.setPrototypeOf(this, VersionConflictException.prototype);
158
- }
159
- };
160
- exports.InvalidStateTransitionException = class InvalidStateTransitionException extends __BaseException {
161
- name = "InvalidStateTransitionException";
162
- $fault = "client";
163
- constructor(opts) {
164
- super({
165
- name: "InvalidStateTransitionException",
166
- $fault: "client",
167
- ...opts,
168
- });
169
- Object.setPrototypeOf(this, InvalidStateTransitionException.prototype);
170
- }
171
- };
172
- exports.ConflictingResourceUpdateException = class ConflictingResourceUpdateException extends __BaseException {
173
- name = "ConflictingResourceUpdateException";
174
- $fault = "client";
175
- constructor(opts) {
176
- super({
177
- name: "ConflictingResourceUpdateException",
178
- $fault: "client",
179
- ...opts,
180
- });
181
- Object.setPrototypeOf(this, ConflictingResourceUpdateException.prototype);
182
- }
183
- };
184
- exports.InternalException = class InternalException extends __BaseException {
185
- name = "InternalException";
186
- $fault = "server";
187
- constructor(opts) {
188
- super({
189
- name: "InternalException",
190
- $fault: "server",
191
- ...opts,
192
- });
193
- Object.setPrototypeOf(this, InternalException.prototype);
194
- }
195
- };
196
- exports.ResourceAlreadyExistsException = class ResourceAlreadyExistsException extends __BaseException {
197
- name = "ResourceAlreadyExistsException";
198
- $fault = "client";
199
- resourceId;
200
- resourceArn;
201
- constructor(opts) {
202
- super({
203
- name: "ResourceAlreadyExistsException",
204
- $fault: "client",
205
- ...opts,
206
- });
207
- Object.setPrototypeOf(this, ResourceAlreadyExistsException.prototype);
208
- this.resourceId = opts.resourceId;
209
- this.resourceArn = opts.resourceArn;
210
- }
211
- };
212
- exports.CertificateValidationException = class CertificateValidationException extends __BaseException {
213
- name = "CertificateValidationException";
214
- $fault = "client";
215
- constructor(opts) {
216
- super({
217
- name: "CertificateValidationException",
218
- $fault: "client",
219
- ...opts,
220
- });
221
- Object.setPrototypeOf(this, CertificateValidationException.prototype);
222
- }
223
- };
224
- exports.InvalidQueryException = class InvalidQueryException extends __BaseException {
225
- name = "InvalidQueryException";
226
- $fault = "client";
227
- constructor(opts) {
228
- super({
229
- name: "InvalidQueryException",
230
- $fault: "client",
231
- ...opts,
232
- });
233
- Object.setPrototypeOf(this, InvalidQueryException.prototype);
234
- }
235
- };
236
- exports.IndexNotReadyException = class IndexNotReadyException extends __BaseException {
237
- name = "IndexNotReadyException";
238
- $fault = "client";
239
- constructor(opts) {
240
- super({
241
- name: "IndexNotReadyException",
242
- $fault: "client",
243
- ...opts,
244
- });
245
- Object.setPrototypeOf(this, IndexNotReadyException.prototype);
246
- }
247
- };
248
- exports.InvalidAggregationException = class InvalidAggregationException extends __BaseException {
249
- name = "InvalidAggregationException";
250
- $fault = "client";
251
- constructor(opts) {
252
- super({
253
- name: "InvalidAggregationException",
254
- $fault: "client",
255
- ...opts,
256
- });
257
- Object.setPrototypeOf(this, InvalidAggregationException.prototype);
258
- }
259
- };
260
- exports.MalformedPolicyException = class MalformedPolicyException extends __BaseException {
261
- name = "MalformedPolicyException";
262
- $fault = "client";
263
- constructor(opts) {
264
- super({
265
- name: "MalformedPolicyException",
266
- $fault: "client",
267
- ...opts,
268
- });
269
- Object.setPrototypeOf(this, MalformedPolicyException.prototype);
270
- }
271
- };
272
- exports.VersionsLimitExceededException = class VersionsLimitExceededException extends __BaseException {
273
- name = "VersionsLimitExceededException";
274
- $fault = "client";
275
- constructor(opts) {
276
- super({
277
- name: "VersionsLimitExceededException",
278
- $fault: "client",
279
- ...opts,
280
- });
281
- Object.setPrototypeOf(this, VersionsLimitExceededException.prototype);
282
- }
283
- };
284
- exports.SqlParseException = class SqlParseException extends __BaseException {
285
- name = "SqlParseException";
286
- $fault = "client";
287
- constructor(opts) {
288
- super({
289
- name: "SqlParseException",
290
- $fault: "client",
291
- ...opts,
292
- });
293
- Object.setPrototypeOf(this, SqlParseException.prototype);
294
- }
295
- };
296
- exports.DeleteConflictException = class DeleteConflictException extends __BaseException {
297
- name = "DeleteConflictException";
298
- $fault = "client";
299
- constructor(opts) {
300
- super({
301
- name: "DeleteConflictException",
302
- $fault: "client",
303
- ...opts,
304
- });
305
- Object.setPrototypeOf(this, DeleteConflictException.prototype);
306
- }
307
- };
308
- exports.CertificateStateException = class CertificateStateException extends __BaseException {
309
- name = "CertificateStateException";
310
- $fault = "client";
311
- constructor(opts) {
312
- super({
313
- name: "CertificateStateException",
314
- $fault: "client",
315
- ...opts,
316
- });
317
- Object.setPrototypeOf(this, CertificateStateException.prototype);
318
- }
319
- };
320
- exports.NotConfiguredException = class NotConfiguredException extends __BaseException {
321
- name = "NotConfiguredException";
322
- $fault = "client";
323
- constructor(opts) {
324
- super({
325
- name: "NotConfiguredException",
326
- $fault: "client",
327
- ...opts,
328
- });
329
- Object.setPrototypeOf(this, NotConfiguredException.prototype);
330
- }
331
- };
332
- exports.RegistrationCodeValidationException = class RegistrationCodeValidationException extends __BaseException {
333
- name = "RegistrationCodeValidationException";
334
- $fault = "client";
335
- constructor(opts) {
336
- super({
337
- name: "RegistrationCodeValidationException",
338
- $fault: "client",
339
- ...opts,
340
- });
341
- Object.setPrototypeOf(this, RegistrationCodeValidationException.prototype);
342
- }
343
- };
344
- exports.CertificateConflictException = class CertificateConflictException extends __BaseException {
345
- name = "CertificateConflictException";
346
- $fault = "client";
347
- constructor(opts) {
348
- super({
349
- name: "CertificateConflictException",
350
- $fault: "client",
351
- ...opts,
352
- });
353
- Object.setPrototypeOf(this, CertificateConflictException.prototype);
354
- }
355
- };
356
- exports.ResourceRegistrationFailureException = class ResourceRegistrationFailureException extends __BaseException {
357
- name = "ResourceRegistrationFailureException";
358
- $fault = "client";
359
- constructor(opts) {
360
- super({
361
- name: "ResourceRegistrationFailureException",
362
- $fault: "client",
363
- ...opts,
364
- });
365
- Object.setPrototypeOf(this, ResourceRegistrationFailureException.prototype);
366
- }
367
- };
368
- exports.TaskAlreadyExistsException = class TaskAlreadyExistsException extends __BaseException {
369
- name = "TaskAlreadyExistsException";
370
- $fault = "client";
371
- constructor(opts) {
372
- super({
373
- name: "TaskAlreadyExistsException",
374
- $fault: "client",
375
- ...opts,
376
- });
377
- Object.setPrototypeOf(this, TaskAlreadyExistsException.prototype);
378
- }
379
- };
380
- exports.InvalidResponseException = class InvalidResponseException extends __BaseException {
381
- name = "InvalidResponseException";
382
- $fault = "client";
383
- constructor(opts) {
384
- super({
385
- name: "InvalidResponseException",
386
- $fault: "client",
387
- ...opts,
388
- });
389
- Object.setPrototypeOf(this, InvalidResponseException.prototype);
390
- }
391
- };
392
- exports.TransferConflictException = class TransferConflictException extends __BaseException {
393
- name = "TransferConflictException";
394
- $fault = "client";
395
- constructor(opts) {
396
- super({
397
- name: "TransferConflictException",
398
- $fault: "client",
399
- ...opts,
400
- });
401
- Object.setPrototypeOf(this, TransferConflictException.prototype);
402
- }
403
- };
@@ -1,32 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
- const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
7
- const { calculateBodyLength } = require("@smithy/core/serde");
8
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
9
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
10
- const getRuntimeConfig = (config) => {
11
- const defaultsMode = resolveDefaultsModeConfig(config);
12
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
13
- const clientSharedValues = getSharedRuntimeConfig(config);
14
- return {
15
- ...clientSharedValues,
16
- ...config,
17
- runtime: "browser",
18
- defaultsMode,
19
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
20
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
21
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
22
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
23
- region: config?.region ?? invalidProvider("Region is missing"),
24
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
25
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
26
- sha256: config?.sha256 ?? Sha256,
27
- streamCollector: config?.streamCollector ?? streamCollector,
28
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
29
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
30
- };
31
- };
32
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,45 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
- const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
7
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
8
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
9
- const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- emitWarningIfUnsupportedVersion(process.version);
13
- const defaultsMode = resolveDefaultsModeConfig(config);
14
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
- const clientSharedValues = getSharedRuntimeConfig(config);
16
- awsCheckVersion(process.version);
17
- const loaderConfig = {
18
- profile: config?.profile,
19
- logger: clientSharedValues.logger,
20
- };
21
- return {
22
- ...clientSharedValues,
23
- ...config,
24
- runtime: "node",
25
- defaultsMode,
26
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
27
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
31
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
32
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
33
- retryMode: config?.retryMode ??
34
- loadNodeConfig({
35
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
- }, config),
38
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
- streamCollector: config?.streamCollector ?? streamCollector,
40
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
41
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
42
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
43
- };
44
- };
45
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,12 +0,0 @@
1
- const { Sha256 } = require("@aws-crypto/sha256-js");
2
- const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
3
- const getRuntimeConfig = (config) => {
4
- const browserDefaults = getBrowserRuntimeConfig(config);
5
- return {
6
- ...browserDefaults,
7
- ...config,
8
- runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
- };
11
- };
12
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,38 +0,0 @@
1
- const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
2
- const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
3
- const { NoOpLogger } = require("@smithy/core/client");
4
- const { parseUrl } = require("@smithy/core/protocols");
5
- const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
6
- const { defaultIoTHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
7
- const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
8
- const { errorTypeRegistries } = require("./schemas/schemas_0");
9
- exports.getRuntimeConfig = (config) => {
10
- return {
11
- apiVersion: "2015-05-28",
12
- base64Decoder: config?.base64Decoder ?? fromBase64,
13
- base64Encoder: config?.base64Encoder ?? toBase64,
14
- disableHostPrefix: config?.disableHostPrefix ?? false,
15
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
16
- extensions: config?.extensions ?? [],
17
- httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultIoTHttpAuthSchemeProvider,
18
- httpAuthSchemes: config?.httpAuthSchemes ?? [
19
- {
20
- schemeId: "aws.auth#sigv4",
21
- identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
22
- signer: new AwsSdkSigV4Signer(),
23
- },
24
- ],
25
- logger: config?.logger ?? new NoOpLogger(),
26
- protocol: config?.protocol ?? AwsRestJsonProtocol,
27
- protocolSettings: config?.protocolSettings ?? {
28
- defaultNamespace: "com.amazonaws.iot",
29
- errorTypeRegistries,
30
- version: "2015-05-28",
31
- serviceTarget: "AWSIotService",
32
- },
33
- serviceId: config?.serviceId ?? "IoT",
34
- urlParser: config?.urlParser ?? parseUrl,
35
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
37
- };
38
- };