@aws-sdk/client-iot 3.470.0 → 3.474.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 +40 -0
- package/dist-cjs/IoT.js +10 -0
- package/dist-cjs/commands/CreateCertificateProviderCommand.js +51 -0
- package/dist-cjs/commands/DeleteCertificateProviderCommand.js +51 -0
- package/dist-cjs/commands/DescribeCertificateProviderCommand.js +51 -0
- package/dist-cjs/commands/ListCertificateProvidersCommand.js +51 -0
- package/dist-cjs/commands/UpdateCertificateProviderCommand.js +51 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/models/models_0.js +5 -2
- package/dist-cjs/protocols/Aws_restJson1.js +370 -10
- package/dist-es/IoT.js +10 -0
- package/dist-es/commands/CreateCertificateProviderCommand.js +47 -0
- package/dist-es/commands/DeleteCertificateProviderCommand.js +47 -0
- package/dist-es/commands/DescribeCertificateProviderCommand.js +47 -0
- package/dist-es/commands/ListCertificateProvidersCommand.js +47 -0
- package/dist-es/commands/UpdateCertificateProviderCommand.js +47 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/models/models_0.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +349 -0
- package/dist-types/IoT.d.ts +35 -0
- package/dist-types/IoTClient.d.ts +7 -2
- package/dist-types/commands/CreateCertificateProviderCommand.d.ts +118 -0
- package/dist-types/commands/DeleteCertificateProviderCommand.d.ts +98 -0
- package/dist-types/commands/DeleteCustomMetricCommand.d.ts +2 -1
- package/dist-types/commands/DeleteDimensionCommand.d.ts +1 -1
- package/dist-types/commands/DeleteDomainConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/DescribeCertificateProviderCommand.d.ts +100 -0
- package/dist-types/commands/ListCertificateProvidersCommand.d.ts +97 -0
- package/dist-types/commands/ListOutgoingCertificatesCommand.d.ts +2 -1
- package/dist-types/commands/ListPackageVersionsCommand.d.ts +1 -1
- package/dist-types/commands/ListPackagesCommand.d.ts +1 -1
- package/dist-types/commands/ListPoliciesCommand.d.ts +1 -1
- package/dist-types/commands/UpdateCertificateProviderCommand.d.ts +98 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +68 -31
- package/dist-types/models/models_1.d.ts +128 -219
- package/dist-types/models/models_2.d.ts +255 -1
- package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
- package/dist-types/ts3.4/IoT.d.ts +85 -0
- package/dist-types/ts3.4/IoTClient.d.ts +30 -0
- package/dist-types/ts3.4/commands/CreateCertificateProviderCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeleteCertificateProviderCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeleteCustomMetricCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/DeleteDimensionCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DeleteDomainConfigurationCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DescribeCertificateProviderCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListCertificateProvidersCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListOutgoingCertificatesCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/ListPackageVersionsCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListPackagesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/ListPoliciesCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/UpdateCertificateProviderCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +20 -9
- package/dist-types/ts3.4/models/models_1.d.ts +33 -52
- package/dist-types/ts3.4/models/models_2.d.ts +63 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
- package/package.json +4 -4
|
@@ -429,6 +429,31 @@ export const se_CreateCertificateFromCsrCommand = async (input, context) => {
|
|
|
429
429
|
body,
|
|
430
430
|
});
|
|
431
431
|
};
|
|
432
|
+
export const se_CreateCertificateProviderCommand = async (input, context) => {
|
|
433
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
434
|
+
const headers = {
|
|
435
|
+
"content-type": "application/json",
|
|
436
|
+
};
|
|
437
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
438
|
+
"/certificate-providers/{certificateProviderName}";
|
|
439
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "certificateProviderName", () => input.certificateProviderName, "{certificateProviderName}", false);
|
|
440
|
+
let body;
|
|
441
|
+
body = JSON.stringify(take(input, {
|
|
442
|
+
accountDefaultForOperations: (_) => _json(_),
|
|
443
|
+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
444
|
+
lambdaFunctionArn: [],
|
|
445
|
+
tags: (_) => _json(_),
|
|
446
|
+
}));
|
|
447
|
+
return new __HttpRequest({
|
|
448
|
+
protocol,
|
|
449
|
+
hostname,
|
|
450
|
+
port,
|
|
451
|
+
method: "POST",
|
|
452
|
+
headers,
|
|
453
|
+
path: resolvedPath,
|
|
454
|
+
body,
|
|
455
|
+
});
|
|
456
|
+
};
|
|
432
457
|
export const se_CreateCustomMetricCommand = async (input, context) => {
|
|
433
458
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
434
459
|
const headers = {
|
|
@@ -1202,6 +1227,23 @@ export const se_DeleteCertificateCommand = async (input, context) => {
|
|
|
1202
1227
|
body,
|
|
1203
1228
|
});
|
|
1204
1229
|
};
|
|
1230
|
+
export const se_DeleteCertificateProviderCommand = async (input, context) => {
|
|
1231
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1232
|
+
const headers = {};
|
|
1233
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1234
|
+
"/certificate-providers/{certificateProviderName}";
|
|
1235
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "certificateProviderName", () => input.certificateProviderName, "{certificateProviderName}", false);
|
|
1236
|
+
let body;
|
|
1237
|
+
return new __HttpRequest({
|
|
1238
|
+
protocol,
|
|
1239
|
+
hostname,
|
|
1240
|
+
port,
|
|
1241
|
+
method: "DELETE",
|
|
1242
|
+
headers,
|
|
1243
|
+
path: resolvedPath,
|
|
1244
|
+
body,
|
|
1245
|
+
});
|
|
1246
|
+
};
|
|
1205
1247
|
export const se_DeleteCustomMetricCommand = async (input, context) => {
|
|
1206
1248
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1207
1249
|
const headers = {};
|
|
@@ -1866,6 +1908,23 @@ export const se_DescribeCertificateCommand = async (input, context) => {
|
|
|
1866
1908
|
body,
|
|
1867
1909
|
});
|
|
1868
1910
|
};
|
|
1911
|
+
export const se_DescribeCertificateProviderCommand = async (input, context) => {
|
|
1912
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1913
|
+
const headers = {};
|
|
1914
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
1915
|
+
"/certificate-providers/{certificateProviderName}";
|
|
1916
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "certificateProviderName", () => input.certificateProviderName, "{certificateProviderName}", false);
|
|
1917
|
+
let body;
|
|
1918
|
+
return new __HttpRequest({
|
|
1919
|
+
protocol,
|
|
1920
|
+
hostname,
|
|
1921
|
+
port,
|
|
1922
|
+
method: "GET",
|
|
1923
|
+
headers,
|
|
1924
|
+
path: resolvedPath,
|
|
1925
|
+
body,
|
|
1926
|
+
});
|
|
1927
|
+
};
|
|
1869
1928
|
export const se_DescribeCustomMetricCommand = async (input, context) => {
|
|
1870
1929
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1871
1930
|
const headers = {};
|
|
@@ -2989,6 +3048,26 @@ export const se_ListCACertificatesCommand = async (input, context) => {
|
|
|
2989
3048
|
body,
|
|
2990
3049
|
});
|
|
2991
3050
|
};
|
|
3051
|
+
export const se_ListCertificateProvidersCommand = async (input, context) => {
|
|
3052
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
3053
|
+
const headers = {};
|
|
3054
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/certificate-providers";
|
|
3055
|
+
const query = map({
|
|
3056
|
+
nextToken: [, input.nextToken],
|
|
3057
|
+
isAscendingOrder: [() => input.ascendingOrder !== void 0, () => input.ascendingOrder.toString()],
|
|
3058
|
+
});
|
|
3059
|
+
let body;
|
|
3060
|
+
return new __HttpRequest({
|
|
3061
|
+
protocol,
|
|
3062
|
+
hostname,
|
|
3063
|
+
port,
|
|
3064
|
+
method: "GET",
|
|
3065
|
+
headers,
|
|
3066
|
+
path: resolvedPath,
|
|
3067
|
+
query,
|
|
3068
|
+
body,
|
|
3069
|
+
});
|
|
3070
|
+
};
|
|
2992
3071
|
export const se_ListCertificatesCommand = async (input, context) => {
|
|
2993
3072
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
2994
3073
|
const headers = {};
|
|
@@ -4785,6 +4864,29 @@ export const se_UpdateCertificateCommand = async (input, context) => {
|
|
|
4785
4864
|
body,
|
|
4786
4865
|
});
|
|
4787
4866
|
};
|
|
4867
|
+
export const se_UpdateCertificateProviderCommand = async (input, context) => {
|
|
4868
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
4869
|
+
const headers = {
|
|
4870
|
+
"content-type": "application/json",
|
|
4871
|
+
};
|
|
4872
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
4873
|
+
"/certificate-providers/{certificateProviderName}";
|
|
4874
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "certificateProviderName", () => input.certificateProviderName, "{certificateProviderName}", false);
|
|
4875
|
+
let body;
|
|
4876
|
+
body = JSON.stringify(take(input, {
|
|
4877
|
+
accountDefaultForOperations: (_) => _json(_),
|
|
4878
|
+
lambdaFunctionArn: [],
|
|
4879
|
+
}));
|
|
4880
|
+
return new __HttpRequest({
|
|
4881
|
+
protocol,
|
|
4882
|
+
hostname,
|
|
4883
|
+
port,
|
|
4884
|
+
method: "PUT",
|
|
4885
|
+
headers,
|
|
4886
|
+
path: resolvedPath,
|
|
4887
|
+
body,
|
|
4888
|
+
});
|
|
4889
|
+
};
|
|
4788
4890
|
export const se_UpdateCustomMetricCommand = async (input, context) => {
|
|
4789
4891
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
4790
4892
|
const headers = {
|
|
@@ -6192,6 +6294,58 @@ const de_CreateCertificateFromCsrCommandError = async (output, context) => {
|
|
|
6192
6294
|
});
|
|
6193
6295
|
}
|
|
6194
6296
|
};
|
|
6297
|
+
export const de_CreateCertificateProviderCommand = async (output, context) => {
|
|
6298
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6299
|
+
return de_CreateCertificateProviderCommandError(output, context);
|
|
6300
|
+
}
|
|
6301
|
+
const contents = map({
|
|
6302
|
+
$metadata: deserializeMetadata(output),
|
|
6303
|
+
});
|
|
6304
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
6305
|
+
const doc = take(data, {
|
|
6306
|
+
certificateProviderArn: __expectString,
|
|
6307
|
+
certificateProviderName: __expectString,
|
|
6308
|
+
});
|
|
6309
|
+
Object.assign(contents, doc);
|
|
6310
|
+
return contents;
|
|
6311
|
+
};
|
|
6312
|
+
const de_CreateCertificateProviderCommandError = async (output, context) => {
|
|
6313
|
+
const parsedOutput = {
|
|
6314
|
+
...output,
|
|
6315
|
+
body: await parseErrorBody(output.body, context),
|
|
6316
|
+
};
|
|
6317
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6318
|
+
switch (errorCode) {
|
|
6319
|
+
case "InternalFailureException":
|
|
6320
|
+
case "com.amazonaws.iot#InternalFailureException":
|
|
6321
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
6322
|
+
case "InvalidRequestException":
|
|
6323
|
+
case "com.amazonaws.iot#InvalidRequestException":
|
|
6324
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
6325
|
+
case "LimitExceededException":
|
|
6326
|
+
case "com.amazonaws.iot#LimitExceededException":
|
|
6327
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
6328
|
+
case "ResourceAlreadyExistsException":
|
|
6329
|
+
case "com.amazonaws.iot#ResourceAlreadyExistsException":
|
|
6330
|
+
throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context);
|
|
6331
|
+
case "ServiceUnavailableException":
|
|
6332
|
+
case "com.amazonaws.iot#ServiceUnavailableException":
|
|
6333
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
6334
|
+
case "ThrottlingException":
|
|
6335
|
+
case "com.amazonaws.iot#ThrottlingException":
|
|
6336
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
6337
|
+
case "UnauthorizedException":
|
|
6338
|
+
case "com.amazonaws.iot#UnauthorizedException":
|
|
6339
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
6340
|
+
default:
|
|
6341
|
+
const parsedBody = parsedOutput.body;
|
|
6342
|
+
return throwDefaultError({
|
|
6343
|
+
output,
|
|
6344
|
+
parsedBody,
|
|
6345
|
+
errorCode,
|
|
6346
|
+
});
|
|
6347
|
+
}
|
|
6348
|
+
};
|
|
6195
6349
|
export const de_CreateCustomMetricCommand = async (output, context) => {
|
|
6196
6350
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
6197
6351
|
return de_CreateCustomMetricCommandError(output, context);
|
|
@@ -7762,6 +7916,53 @@ const de_DeleteCertificateCommandError = async (output, context) => {
|
|
|
7762
7916
|
});
|
|
7763
7917
|
}
|
|
7764
7918
|
};
|
|
7919
|
+
export const de_DeleteCertificateProviderCommand = async (output, context) => {
|
|
7920
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7921
|
+
return de_DeleteCertificateProviderCommandError(output, context);
|
|
7922
|
+
}
|
|
7923
|
+
const contents = map({
|
|
7924
|
+
$metadata: deserializeMetadata(output),
|
|
7925
|
+
});
|
|
7926
|
+
await collectBody(output.body, context);
|
|
7927
|
+
return contents;
|
|
7928
|
+
};
|
|
7929
|
+
const de_DeleteCertificateProviderCommandError = async (output, context) => {
|
|
7930
|
+
const parsedOutput = {
|
|
7931
|
+
...output,
|
|
7932
|
+
body: await parseErrorBody(output.body, context),
|
|
7933
|
+
};
|
|
7934
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
7935
|
+
switch (errorCode) {
|
|
7936
|
+
case "DeleteConflictException":
|
|
7937
|
+
case "com.amazonaws.iot#DeleteConflictException":
|
|
7938
|
+
throw await de_DeleteConflictExceptionRes(parsedOutput, context);
|
|
7939
|
+
case "InternalFailureException":
|
|
7940
|
+
case "com.amazonaws.iot#InternalFailureException":
|
|
7941
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
7942
|
+
case "InvalidRequestException":
|
|
7943
|
+
case "com.amazonaws.iot#InvalidRequestException":
|
|
7944
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
7945
|
+
case "ResourceNotFoundException":
|
|
7946
|
+
case "com.amazonaws.iot#ResourceNotFoundException":
|
|
7947
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
7948
|
+
case "ServiceUnavailableException":
|
|
7949
|
+
case "com.amazonaws.iot#ServiceUnavailableException":
|
|
7950
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
7951
|
+
case "ThrottlingException":
|
|
7952
|
+
case "com.amazonaws.iot#ThrottlingException":
|
|
7953
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
7954
|
+
case "UnauthorizedException":
|
|
7955
|
+
case "com.amazonaws.iot#UnauthorizedException":
|
|
7956
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
7957
|
+
default:
|
|
7958
|
+
const parsedBody = parsedOutput.body;
|
|
7959
|
+
return throwDefaultError({
|
|
7960
|
+
output,
|
|
7961
|
+
parsedBody,
|
|
7962
|
+
errorCode,
|
|
7963
|
+
});
|
|
7964
|
+
}
|
|
7965
|
+
};
|
|
7765
7966
|
export const de_DeleteCustomMetricCommand = async (output, context) => {
|
|
7766
7967
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
7767
7968
|
return de_DeleteCustomMetricCommandError(output, context);
|
|
@@ -9335,6 +9536,59 @@ const de_DescribeCertificateCommandError = async (output, context) => {
|
|
|
9335
9536
|
});
|
|
9336
9537
|
}
|
|
9337
9538
|
};
|
|
9539
|
+
export const de_DescribeCertificateProviderCommand = async (output, context) => {
|
|
9540
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
9541
|
+
return de_DescribeCertificateProviderCommandError(output, context);
|
|
9542
|
+
}
|
|
9543
|
+
const contents = map({
|
|
9544
|
+
$metadata: deserializeMetadata(output),
|
|
9545
|
+
});
|
|
9546
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
9547
|
+
const doc = take(data, {
|
|
9548
|
+
accountDefaultForOperations: _json,
|
|
9549
|
+
certificateProviderArn: __expectString,
|
|
9550
|
+
certificateProviderName: __expectString,
|
|
9551
|
+
creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
9552
|
+
lambdaFunctionArn: __expectString,
|
|
9553
|
+
lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
9554
|
+
});
|
|
9555
|
+
Object.assign(contents, doc);
|
|
9556
|
+
return contents;
|
|
9557
|
+
};
|
|
9558
|
+
const de_DescribeCertificateProviderCommandError = async (output, context) => {
|
|
9559
|
+
const parsedOutput = {
|
|
9560
|
+
...output,
|
|
9561
|
+
body: await parseErrorBody(output.body, context),
|
|
9562
|
+
};
|
|
9563
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
9564
|
+
switch (errorCode) {
|
|
9565
|
+
case "InternalFailureException":
|
|
9566
|
+
case "com.amazonaws.iot#InternalFailureException":
|
|
9567
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
9568
|
+
case "InvalidRequestException":
|
|
9569
|
+
case "com.amazonaws.iot#InvalidRequestException":
|
|
9570
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
9571
|
+
case "ResourceNotFoundException":
|
|
9572
|
+
case "com.amazonaws.iot#ResourceNotFoundException":
|
|
9573
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
9574
|
+
case "ServiceUnavailableException":
|
|
9575
|
+
case "com.amazonaws.iot#ServiceUnavailableException":
|
|
9576
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
9577
|
+
case "ThrottlingException":
|
|
9578
|
+
case "com.amazonaws.iot#ThrottlingException":
|
|
9579
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
9580
|
+
case "UnauthorizedException":
|
|
9581
|
+
case "com.amazonaws.iot#UnauthorizedException":
|
|
9582
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
9583
|
+
default:
|
|
9584
|
+
const parsedBody = parsedOutput.body;
|
|
9585
|
+
return throwDefaultError({
|
|
9586
|
+
output,
|
|
9587
|
+
parsedBody,
|
|
9588
|
+
errorCode,
|
|
9589
|
+
});
|
|
9590
|
+
}
|
|
9591
|
+
};
|
|
9338
9592
|
export const de_DescribeCustomMetricCommand = async (output, context) => {
|
|
9339
9593
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
9340
9594
|
return de_DescribeCustomMetricCommandError(output, context);
|
|
@@ -12108,6 +12362,52 @@ const de_ListCACertificatesCommandError = async (output, context) => {
|
|
|
12108
12362
|
});
|
|
12109
12363
|
}
|
|
12110
12364
|
};
|
|
12365
|
+
export const de_ListCertificateProvidersCommand = async (output, context) => {
|
|
12366
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12367
|
+
return de_ListCertificateProvidersCommandError(output, context);
|
|
12368
|
+
}
|
|
12369
|
+
const contents = map({
|
|
12370
|
+
$metadata: deserializeMetadata(output),
|
|
12371
|
+
});
|
|
12372
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
12373
|
+
const doc = take(data, {
|
|
12374
|
+
certificateProviders: _json,
|
|
12375
|
+
nextToken: __expectString,
|
|
12376
|
+
});
|
|
12377
|
+
Object.assign(contents, doc);
|
|
12378
|
+
return contents;
|
|
12379
|
+
};
|
|
12380
|
+
const de_ListCertificateProvidersCommandError = async (output, context) => {
|
|
12381
|
+
const parsedOutput = {
|
|
12382
|
+
...output,
|
|
12383
|
+
body: await parseErrorBody(output.body, context),
|
|
12384
|
+
};
|
|
12385
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
12386
|
+
switch (errorCode) {
|
|
12387
|
+
case "InternalFailureException":
|
|
12388
|
+
case "com.amazonaws.iot#InternalFailureException":
|
|
12389
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
12390
|
+
case "InvalidRequestException":
|
|
12391
|
+
case "com.amazonaws.iot#InvalidRequestException":
|
|
12392
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
12393
|
+
case "ServiceUnavailableException":
|
|
12394
|
+
case "com.amazonaws.iot#ServiceUnavailableException":
|
|
12395
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
12396
|
+
case "ThrottlingException":
|
|
12397
|
+
case "com.amazonaws.iot#ThrottlingException":
|
|
12398
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
12399
|
+
case "UnauthorizedException":
|
|
12400
|
+
case "com.amazonaws.iot#UnauthorizedException":
|
|
12401
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
12402
|
+
default:
|
|
12403
|
+
const parsedBody = parsedOutput.body;
|
|
12404
|
+
return throwDefaultError({
|
|
12405
|
+
output,
|
|
12406
|
+
parsedBody,
|
|
12407
|
+
errorCode,
|
|
12408
|
+
});
|
|
12409
|
+
}
|
|
12410
|
+
};
|
|
12111
12411
|
export const de_ListCertificatesCommand = async (output, context) => {
|
|
12112
12412
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
12113
12413
|
return de_ListCertificatesCommandError(output, context);
|
|
@@ -15666,6 +15966,55 @@ const de_UpdateCertificateCommandError = async (output, context) => {
|
|
|
15666
15966
|
});
|
|
15667
15967
|
}
|
|
15668
15968
|
};
|
|
15969
|
+
export const de_UpdateCertificateProviderCommand = async (output, context) => {
|
|
15970
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
15971
|
+
return de_UpdateCertificateProviderCommandError(output, context);
|
|
15972
|
+
}
|
|
15973
|
+
const contents = map({
|
|
15974
|
+
$metadata: deserializeMetadata(output),
|
|
15975
|
+
});
|
|
15976
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
15977
|
+
const doc = take(data, {
|
|
15978
|
+
certificateProviderArn: __expectString,
|
|
15979
|
+
certificateProviderName: __expectString,
|
|
15980
|
+
});
|
|
15981
|
+
Object.assign(contents, doc);
|
|
15982
|
+
return contents;
|
|
15983
|
+
};
|
|
15984
|
+
const de_UpdateCertificateProviderCommandError = async (output, context) => {
|
|
15985
|
+
const parsedOutput = {
|
|
15986
|
+
...output,
|
|
15987
|
+
body: await parseErrorBody(output.body, context),
|
|
15988
|
+
};
|
|
15989
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
15990
|
+
switch (errorCode) {
|
|
15991
|
+
case "InternalFailureException":
|
|
15992
|
+
case "com.amazonaws.iot#InternalFailureException":
|
|
15993
|
+
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
15994
|
+
case "InvalidRequestException":
|
|
15995
|
+
case "com.amazonaws.iot#InvalidRequestException":
|
|
15996
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
15997
|
+
case "ResourceNotFoundException":
|
|
15998
|
+
case "com.amazonaws.iot#ResourceNotFoundException":
|
|
15999
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
16000
|
+
case "ServiceUnavailableException":
|
|
16001
|
+
case "com.amazonaws.iot#ServiceUnavailableException":
|
|
16002
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
16003
|
+
case "ThrottlingException":
|
|
16004
|
+
case "com.amazonaws.iot#ThrottlingException":
|
|
16005
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
16006
|
+
case "UnauthorizedException":
|
|
16007
|
+
case "com.amazonaws.iot#UnauthorizedException":
|
|
16008
|
+
throw await de_UnauthorizedExceptionRes(parsedOutput, context);
|
|
16009
|
+
default:
|
|
16010
|
+
const parsedBody = parsedOutput.body;
|
|
16011
|
+
return throwDefaultError({
|
|
16012
|
+
output,
|
|
16013
|
+
parsedBody,
|
|
16014
|
+
errorCode,
|
|
16015
|
+
});
|
|
16016
|
+
}
|
|
16017
|
+
};
|
|
15669
16018
|
export const de_UpdateCustomMetricCommand = async (output, context) => {
|
|
15670
16019
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
15671
16020
|
return de_UpdateCustomMetricCommandError(output, context);
|
package/dist-types/IoT.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { CreateAuditSuppressionCommandInput, CreateAuditSuppressionCommandOutput
|
|
|
19
19
|
import { CreateAuthorizerCommandInput, CreateAuthorizerCommandOutput } from "./commands/CreateAuthorizerCommand";
|
|
20
20
|
import { CreateBillingGroupCommandInput, CreateBillingGroupCommandOutput } from "./commands/CreateBillingGroupCommand";
|
|
21
21
|
import { CreateCertificateFromCsrCommandInput, CreateCertificateFromCsrCommandOutput } from "./commands/CreateCertificateFromCsrCommand";
|
|
22
|
+
import { CreateCertificateProviderCommandInput, CreateCertificateProviderCommandOutput } from "./commands/CreateCertificateProviderCommand";
|
|
22
23
|
import { CreateCustomMetricCommandInput, CreateCustomMetricCommandOutput } from "./commands/CreateCustomMetricCommand";
|
|
23
24
|
import { CreateDimensionCommandInput, CreateDimensionCommandOutput } from "./commands/CreateDimensionCommand";
|
|
24
25
|
import { CreateDomainConfigurationCommandInput, CreateDomainConfigurationCommandOutput } from "./commands/CreateDomainConfigurationCommand";
|
|
@@ -51,6 +52,7 @@ import { DeleteAuthorizerCommandInput, DeleteAuthorizerCommandOutput } from "./c
|
|
|
51
52
|
import { DeleteBillingGroupCommandInput, DeleteBillingGroupCommandOutput } from "./commands/DeleteBillingGroupCommand";
|
|
52
53
|
import { DeleteCACertificateCommandInput, DeleteCACertificateCommandOutput } from "./commands/DeleteCACertificateCommand";
|
|
53
54
|
import { DeleteCertificateCommandInput, DeleteCertificateCommandOutput } from "./commands/DeleteCertificateCommand";
|
|
55
|
+
import { DeleteCertificateProviderCommandInput, DeleteCertificateProviderCommandOutput } from "./commands/DeleteCertificateProviderCommand";
|
|
54
56
|
import { DeleteCustomMetricCommandInput, DeleteCustomMetricCommandOutput } from "./commands/DeleteCustomMetricCommand";
|
|
55
57
|
import { DeleteDimensionCommandInput, DeleteDimensionCommandOutput } from "./commands/DeleteDimensionCommand";
|
|
56
58
|
import { DeleteDomainConfigurationCommandInput, DeleteDomainConfigurationCommandOutput } from "./commands/DeleteDomainConfigurationCommand";
|
|
@@ -88,6 +90,7 @@ import { DescribeAuthorizerCommandInput, DescribeAuthorizerCommandOutput } from
|
|
|
88
90
|
import { DescribeBillingGroupCommandInput, DescribeBillingGroupCommandOutput } from "./commands/DescribeBillingGroupCommand";
|
|
89
91
|
import { DescribeCACertificateCommandInput, DescribeCACertificateCommandOutput } from "./commands/DescribeCACertificateCommand";
|
|
90
92
|
import { DescribeCertificateCommandInput, DescribeCertificateCommandOutput } from "./commands/DescribeCertificateCommand";
|
|
93
|
+
import { DescribeCertificateProviderCommandInput, DescribeCertificateProviderCommandOutput } from "./commands/DescribeCertificateProviderCommand";
|
|
91
94
|
import { DescribeCustomMetricCommandInput, DescribeCustomMetricCommandOutput } from "./commands/DescribeCustomMetricCommand";
|
|
92
95
|
import { DescribeDefaultAuthorizerCommandInput, DescribeDefaultAuthorizerCommandOutput } from "./commands/DescribeDefaultAuthorizerCommand";
|
|
93
96
|
import { DescribeDetectMitigationActionsTaskCommandInput, DescribeDetectMitigationActionsTaskCommandOutput } from "./commands/DescribeDetectMitigationActionsTaskCommand";
|
|
@@ -147,6 +150,7 @@ import { ListAuditTasksCommandInput, ListAuditTasksCommandOutput } from "./comma
|
|
|
147
150
|
import { ListAuthorizersCommandInput, ListAuthorizersCommandOutput } from "./commands/ListAuthorizersCommand";
|
|
148
151
|
import { ListBillingGroupsCommandInput, ListBillingGroupsCommandOutput } from "./commands/ListBillingGroupsCommand";
|
|
149
152
|
import { ListCACertificatesCommandInput, ListCACertificatesCommandOutput } from "./commands/ListCACertificatesCommand";
|
|
153
|
+
import { ListCertificateProvidersCommandInput, ListCertificateProvidersCommandOutput } from "./commands/ListCertificateProvidersCommand";
|
|
150
154
|
import { ListCertificatesByCACommandInput, ListCertificatesByCACommandOutput } from "./commands/ListCertificatesByCACommand";
|
|
151
155
|
import { ListCertificatesCommandInput, ListCertificatesCommandOutput } from "./commands/ListCertificatesCommand";
|
|
152
156
|
import { ListCustomMetricsCommandInput, ListCustomMetricsCommandOutput } from "./commands/ListCustomMetricsCommand";
|
|
@@ -227,6 +231,7 @@ import { UpdateAuthorizerCommandInput, UpdateAuthorizerCommandOutput } from "./c
|
|
|
227
231
|
import { UpdateBillingGroupCommandInput, UpdateBillingGroupCommandOutput } from "./commands/UpdateBillingGroupCommand";
|
|
228
232
|
import { UpdateCACertificateCommandInput, UpdateCACertificateCommandOutput } from "./commands/UpdateCACertificateCommand";
|
|
229
233
|
import { UpdateCertificateCommandInput, UpdateCertificateCommandOutput } from "./commands/UpdateCertificateCommand";
|
|
234
|
+
import { UpdateCertificateProviderCommandInput, UpdateCertificateProviderCommandOutput } from "./commands/UpdateCertificateProviderCommand";
|
|
230
235
|
import { UpdateCustomMetricCommandInput, UpdateCustomMetricCommandOutput } from "./commands/UpdateCustomMetricCommand";
|
|
231
236
|
import { UpdateDimensionCommandInput, UpdateDimensionCommandOutput } from "./commands/UpdateDimensionCommand";
|
|
232
237
|
import { UpdateDomainConfigurationCommandInput, UpdateDomainConfigurationCommandOutput } from "./commands/UpdateDomainConfigurationCommand";
|
|
@@ -371,6 +376,12 @@ export interface IoT {
|
|
|
371
376
|
createCertificateFromCsr(args: CreateCertificateFromCsrCommandInput, options?: __HttpHandlerOptions): Promise<CreateCertificateFromCsrCommandOutput>;
|
|
372
377
|
createCertificateFromCsr(args: CreateCertificateFromCsrCommandInput, cb: (err: any, data?: CreateCertificateFromCsrCommandOutput) => void): void;
|
|
373
378
|
createCertificateFromCsr(args: CreateCertificateFromCsrCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateCertificateFromCsrCommandOutput) => void): void;
|
|
379
|
+
/**
|
|
380
|
+
* @see {@link CreateCertificateProviderCommand}
|
|
381
|
+
*/
|
|
382
|
+
createCertificateProvider(args: CreateCertificateProviderCommandInput, options?: __HttpHandlerOptions): Promise<CreateCertificateProviderCommandOutput>;
|
|
383
|
+
createCertificateProvider(args: CreateCertificateProviderCommandInput, cb: (err: any, data?: CreateCertificateProviderCommandOutput) => void): void;
|
|
384
|
+
createCertificateProvider(args: CreateCertificateProviderCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateCertificateProviderCommandOutput) => void): void;
|
|
374
385
|
/**
|
|
375
386
|
* @see {@link CreateCustomMetricCommand}
|
|
376
387
|
*/
|
|
@@ -563,6 +574,12 @@ export interface IoT {
|
|
|
563
574
|
deleteCertificate(args: DeleteCertificateCommandInput, options?: __HttpHandlerOptions): Promise<DeleteCertificateCommandOutput>;
|
|
564
575
|
deleteCertificate(args: DeleteCertificateCommandInput, cb: (err: any, data?: DeleteCertificateCommandOutput) => void): void;
|
|
565
576
|
deleteCertificate(args: DeleteCertificateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteCertificateCommandOutput) => void): void;
|
|
577
|
+
/**
|
|
578
|
+
* @see {@link DeleteCertificateProviderCommand}
|
|
579
|
+
*/
|
|
580
|
+
deleteCertificateProvider(args: DeleteCertificateProviderCommandInput, options?: __HttpHandlerOptions): Promise<DeleteCertificateProviderCommandOutput>;
|
|
581
|
+
deleteCertificateProvider(args: DeleteCertificateProviderCommandInput, cb: (err: any, data?: DeleteCertificateProviderCommandOutput) => void): void;
|
|
582
|
+
deleteCertificateProvider(args: DeleteCertificateProviderCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteCertificateProviderCommandOutput) => void): void;
|
|
566
583
|
/**
|
|
567
584
|
* @see {@link DeleteCustomMetricCommand}
|
|
568
585
|
*/
|
|
@@ -785,6 +802,12 @@ export interface IoT {
|
|
|
785
802
|
describeCertificate(args: DescribeCertificateCommandInput, options?: __HttpHandlerOptions): Promise<DescribeCertificateCommandOutput>;
|
|
786
803
|
describeCertificate(args: DescribeCertificateCommandInput, cb: (err: any, data?: DescribeCertificateCommandOutput) => void): void;
|
|
787
804
|
describeCertificate(args: DescribeCertificateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeCertificateCommandOutput) => void): void;
|
|
805
|
+
/**
|
|
806
|
+
* @see {@link DescribeCertificateProviderCommand}
|
|
807
|
+
*/
|
|
808
|
+
describeCertificateProvider(args: DescribeCertificateProviderCommandInput, options?: __HttpHandlerOptions): Promise<DescribeCertificateProviderCommandOutput>;
|
|
809
|
+
describeCertificateProvider(args: DescribeCertificateProviderCommandInput, cb: (err: any, data?: DescribeCertificateProviderCommandOutput) => void): void;
|
|
810
|
+
describeCertificateProvider(args: DescribeCertificateProviderCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeCertificateProviderCommandOutput) => void): void;
|
|
788
811
|
/**
|
|
789
812
|
* @see {@link DescribeCustomMetricCommand}
|
|
790
813
|
*/
|
|
@@ -1139,6 +1162,12 @@ export interface IoT {
|
|
|
1139
1162
|
listCACertificates(args: ListCACertificatesCommandInput, options?: __HttpHandlerOptions): Promise<ListCACertificatesCommandOutput>;
|
|
1140
1163
|
listCACertificates(args: ListCACertificatesCommandInput, cb: (err: any, data?: ListCACertificatesCommandOutput) => void): void;
|
|
1141
1164
|
listCACertificates(args: ListCACertificatesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListCACertificatesCommandOutput) => void): void;
|
|
1165
|
+
/**
|
|
1166
|
+
* @see {@link ListCertificateProvidersCommand}
|
|
1167
|
+
*/
|
|
1168
|
+
listCertificateProviders(args: ListCertificateProvidersCommandInput, options?: __HttpHandlerOptions): Promise<ListCertificateProvidersCommandOutput>;
|
|
1169
|
+
listCertificateProviders(args: ListCertificateProvidersCommandInput, cb: (err: any, data?: ListCertificateProvidersCommandOutput) => void): void;
|
|
1170
|
+
listCertificateProviders(args: ListCertificateProvidersCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListCertificateProvidersCommandOutput) => void): void;
|
|
1142
1171
|
/**
|
|
1143
1172
|
* @see {@link ListCertificatesCommand}
|
|
1144
1173
|
*/
|
|
@@ -1619,6 +1648,12 @@ export interface IoT {
|
|
|
1619
1648
|
updateCertificate(args: UpdateCertificateCommandInput, options?: __HttpHandlerOptions): Promise<UpdateCertificateCommandOutput>;
|
|
1620
1649
|
updateCertificate(args: UpdateCertificateCommandInput, cb: (err: any, data?: UpdateCertificateCommandOutput) => void): void;
|
|
1621
1650
|
updateCertificate(args: UpdateCertificateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateCertificateCommandOutput) => void): void;
|
|
1651
|
+
/**
|
|
1652
|
+
* @see {@link UpdateCertificateProviderCommand}
|
|
1653
|
+
*/
|
|
1654
|
+
updateCertificateProvider(args: UpdateCertificateProviderCommandInput, options?: __HttpHandlerOptions): Promise<UpdateCertificateProviderCommandOutput>;
|
|
1655
|
+
updateCertificateProvider(args: UpdateCertificateProviderCommandInput, cb: (err: any, data?: UpdateCertificateProviderCommandOutput) => void): void;
|
|
1656
|
+
updateCertificateProvider(args: UpdateCertificateProviderCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateCertificateProviderCommandOutput) => void): void;
|
|
1622
1657
|
/**
|
|
1623
1658
|
* @see {@link UpdateCustomMetricCommand}
|
|
1624
1659
|
*/
|