@aws-sdk/client-service-quotas 3.525.0 → 3.529.1
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/index.js +22 -62
- package/dist-es/protocols/Aws_json1_1.js +1 -40
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -229,6 +229,7 @@ var import_middleware_serde = require("@smithy/middleware-serde");
|
|
|
229
229
|
var import_types = require("@smithy/types");
|
|
230
230
|
|
|
231
231
|
// src/protocols/Aws_json1_1.ts
|
|
232
|
+
var import_core2 = require("@aws-sdk/core");
|
|
232
233
|
|
|
233
234
|
|
|
234
235
|
|
|
@@ -710,7 +711,7 @@ var de_AssociateServiceQuotaTemplateCommand = /* @__PURE__ */ __name(async (outp
|
|
|
710
711
|
if (output.statusCode >= 300) {
|
|
711
712
|
return de_CommandError(output, context);
|
|
712
713
|
}
|
|
713
|
-
const data = await
|
|
714
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
714
715
|
let contents = {};
|
|
715
716
|
contents = (0, import_smithy_client._json)(data);
|
|
716
717
|
const response = {
|
|
@@ -723,7 +724,7 @@ var de_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = /* @__PURE__ */ __
|
|
|
723
724
|
if (output.statusCode >= 300) {
|
|
724
725
|
return de_CommandError(output, context);
|
|
725
726
|
}
|
|
726
|
-
const data = await
|
|
727
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
727
728
|
let contents = {};
|
|
728
729
|
contents = (0, import_smithy_client._json)(data);
|
|
729
730
|
const response = {
|
|
@@ -736,7 +737,7 @@ var de_DisassociateServiceQuotaTemplateCommand = /* @__PURE__ */ __name(async (o
|
|
|
736
737
|
if (output.statusCode >= 300) {
|
|
737
738
|
return de_CommandError(output, context);
|
|
738
739
|
}
|
|
739
|
-
const data = await
|
|
740
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
740
741
|
let contents = {};
|
|
741
742
|
contents = (0, import_smithy_client._json)(data);
|
|
742
743
|
const response = {
|
|
@@ -749,7 +750,7 @@ var de_GetAssociationForServiceQuotaTemplateCommand = /* @__PURE__ */ __name(asy
|
|
|
749
750
|
if (output.statusCode >= 300) {
|
|
750
751
|
return de_CommandError(output, context);
|
|
751
752
|
}
|
|
752
|
-
const data = await
|
|
753
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
753
754
|
let contents = {};
|
|
754
755
|
contents = (0, import_smithy_client._json)(data);
|
|
755
756
|
const response = {
|
|
@@ -762,7 +763,7 @@ var de_GetAWSDefaultServiceQuotaCommand = /* @__PURE__ */ __name(async (output,
|
|
|
762
763
|
if (output.statusCode >= 300) {
|
|
763
764
|
return de_CommandError(output, context);
|
|
764
765
|
}
|
|
765
|
-
const data = await
|
|
766
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
766
767
|
let contents = {};
|
|
767
768
|
contents = de_GetAWSDefaultServiceQuotaResponse(data, context);
|
|
768
769
|
const response = {
|
|
@@ -775,7 +776,7 @@ var de_GetRequestedServiceQuotaChangeCommand = /* @__PURE__ */ __name(async (out
|
|
|
775
776
|
if (output.statusCode >= 300) {
|
|
776
777
|
return de_CommandError(output, context);
|
|
777
778
|
}
|
|
778
|
-
const data = await
|
|
779
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
779
780
|
let contents = {};
|
|
780
781
|
contents = de_GetRequestedServiceQuotaChangeResponse(data, context);
|
|
781
782
|
const response = {
|
|
@@ -788,7 +789,7 @@ var de_GetServiceQuotaCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
788
789
|
if (output.statusCode >= 300) {
|
|
789
790
|
return de_CommandError(output, context);
|
|
790
791
|
}
|
|
791
|
-
const data = await
|
|
792
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
792
793
|
let contents = {};
|
|
793
794
|
contents = de_GetServiceQuotaResponse(data, context);
|
|
794
795
|
const response = {
|
|
@@ -801,7 +802,7 @@ var de_GetServiceQuotaIncreaseRequestFromTemplateCommand = /* @__PURE__ */ __nam
|
|
|
801
802
|
if (output.statusCode >= 300) {
|
|
802
803
|
return de_CommandError(output, context);
|
|
803
804
|
}
|
|
804
|
-
const data = await
|
|
805
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
805
806
|
let contents = {};
|
|
806
807
|
contents = de_GetServiceQuotaIncreaseRequestFromTemplateResponse(data, context);
|
|
807
808
|
const response = {
|
|
@@ -814,7 +815,7 @@ var de_ListAWSDefaultServiceQuotasCommand = /* @__PURE__ */ __name(async (output
|
|
|
814
815
|
if (output.statusCode >= 300) {
|
|
815
816
|
return de_CommandError(output, context);
|
|
816
817
|
}
|
|
817
|
-
const data = await
|
|
818
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
818
819
|
let contents = {};
|
|
819
820
|
contents = de_ListAWSDefaultServiceQuotasResponse(data, context);
|
|
820
821
|
const response = {
|
|
@@ -827,7 +828,7 @@ var de_ListRequestedServiceQuotaChangeHistoryCommand = /* @__PURE__ */ __name(as
|
|
|
827
828
|
if (output.statusCode >= 300) {
|
|
828
829
|
return de_CommandError(output, context);
|
|
829
830
|
}
|
|
830
|
-
const data = await
|
|
831
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
831
832
|
let contents = {};
|
|
832
833
|
contents = de_ListRequestedServiceQuotaChangeHistoryResponse(data, context);
|
|
833
834
|
const response = {
|
|
@@ -840,7 +841,7 @@ var de_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = /* @__PURE__ */ __
|
|
|
840
841
|
if (output.statusCode >= 300) {
|
|
841
842
|
return de_CommandError(output, context);
|
|
842
843
|
}
|
|
843
|
-
const data = await
|
|
844
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
844
845
|
let contents = {};
|
|
845
846
|
contents = de_ListRequestedServiceQuotaChangeHistoryByQuotaResponse(data, context);
|
|
846
847
|
const response = {
|
|
@@ -853,7 +854,7 @@ var de_ListServiceQuotaIncreaseRequestsInTemplateCommand = /* @__PURE__ */ __nam
|
|
|
853
854
|
if (output.statusCode >= 300) {
|
|
854
855
|
return de_CommandError(output, context);
|
|
855
856
|
}
|
|
856
|
-
const data = await
|
|
857
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
857
858
|
let contents = {};
|
|
858
859
|
contents = de_ListServiceQuotaIncreaseRequestsInTemplateResponse(data, context);
|
|
859
860
|
const response = {
|
|
@@ -866,7 +867,7 @@ var de_ListServiceQuotasCommand = /* @__PURE__ */ __name(async (output, context)
|
|
|
866
867
|
if (output.statusCode >= 300) {
|
|
867
868
|
return de_CommandError(output, context);
|
|
868
869
|
}
|
|
869
|
-
const data = await
|
|
870
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
870
871
|
let contents = {};
|
|
871
872
|
contents = de_ListServiceQuotasResponse(data, context);
|
|
872
873
|
const response = {
|
|
@@ -879,7 +880,7 @@ var de_ListServicesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
879
880
|
if (output.statusCode >= 300) {
|
|
880
881
|
return de_CommandError(output, context);
|
|
881
882
|
}
|
|
882
|
-
const data = await
|
|
883
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
883
884
|
let contents = {};
|
|
884
885
|
contents = (0, import_smithy_client._json)(data);
|
|
885
886
|
const response = {
|
|
@@ -892,7 +893,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
|
|
|
892
893
|
if (output.statusCode >= 300) {
|
|
893
894
|
return de_CommandError(output, context);
|
|
894
895
|
}
|
|
895
|
-
const data = await
|
|
896
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
896
897
|
let contents = {};
|
|
897
898
|
contents = (0, import_smithy_client._json)(data);
|
|
898
899
|
const response = {
|
|
@@ -905,7 +906,7 @@ var de_PutServiceQuotaIncreaseRequestIntoTemplateCommand = /* @__PURE__ */ __nam
|
|
|
905
906
|
if (output.statusCode >= 300) {
|
|
906
907
|
return de_CommandError(output, context);
|
|
907
908
|
}
|
|
908
|
-
const data = await
|
|
909
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
909
910
|
let contents = {};
|
|
910
911
|
contents = de_PutServiceQuotaIncreaseRequestIntoTemplateResponse(data, context);
|
|
911
912
|
const response = {
|
|
@@ -918,7 +919,7 @@ var de_RequestServiceQuotaIncreaseCommand = /* @__PURE__ */ __name(async (output
|
|
|
918
919
|
if (output.statusCode >= 300) {
|
|
919
920
|
return de_CommandError(output, context);
|
|
920
921
|
}
|
|
921
|
-
const data = await
|
|
922
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
922
923
|
let contents = {};
|
|
923
924
|
contents = de_RequestServiceQuotaIncreaseResponse(data, context);
|
|
924
925
|
const response = {
|
|
@@ -931,7 +932,7 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
931
932
|
if (output.statusCode >= 300) {
|
|
932
933
|
return de_CommandError(output, context);
|
|
933
934
|
}
|
|
934
|
-
const data = await
|
|
935
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
935
936
|
let contents = {};
|
|
936
937
|
contents = (0, import_smithy_client._json)(data);
|
|
937
938
|
const response = {
|
|
@@ -944,7 +945,7 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
944
945
|
if (output.statusCode >= 300) {
|
|
945
946
|
return de_CommandError(output, context);
|
|
946
947
|
}
|
|
947
|
-
const data = await
|
|
948
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
948
949
|
let contents = {};
|
|
949
950
|
contents = (0, import_smithy_client._json)(data);
|
|
950
951
|
const response = {
|
|
@@ -956,9 +957,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
956
957
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
957
958
|
const parsedOutput = {
|
|
958
959
|
...output,
|
|
959
|
-
body: await
|
|
960
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
960
961
|
};
|
|
961
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
962
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
962
963
|
switch (errorCode) {
|
|
963
964
|
case "AWSServiceAccessNotEnabledException":
|
|
964
965
|
case "com.amazonaws.servicequotas#AWSServiceAccessNotEnabledException":
|
|
@@ -1323,7 +1324,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1323
1324
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1324
1325
|
cfId: output.headers["x-amz-cf-id"]
|
|
1325
1326
|
}), "deserializeMetadata");
|
|
1326
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1327
1327
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(ServiceQuotasServiceException);
|
|
1328
1328
|
var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
|
|
1329
1329
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -1350,46 +1350,6 @@ function sharedHeaders(operation) {
|
|
|
1350
1350
|
};
|
|
1351
1351
|
}
|
|
1352
1352
|
__name(sharedHeaders, "sharedHeaders");
|
|
1353
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1354
|
-
if (encoded.length) {
|
|
1355
|
-
return JSON.parse(encoded);
|
|
1356
|
-
}
|
|
1357
|
-
return {};
|
|
1358
|
-
}), "parseBody");
|
|
1359
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1360
|
-
const value = await parseBody(errorBody, context);
|
|
1361
|
-
value.message = value.message ?? value.Message;
|
|
1362
|
-
return value;
|
|
1363
|
-
}, "parseErrorBody");
|
|
1364
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1365
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1366
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1367
|
-
let cleanValue = rawValue;
|
|
1368
|
-
if (typeof cleanValue === "number") {
|
|
1369
|
-
cleanValue = cleanValue.toString();
|
|
1370
|
-
}
|
|
1371
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1372
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1373
|
-
}
|
|
1374
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1375
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1376
|
-
}
|
|
1377
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1378
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1379
|
-
}
|
|
1380
|
-
return cleanValue;
|
|
1381
|
-
}, "sanitizeErrorCode");
|
|
1382
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1383
|
-
if (headerKey !== void 0) {
|
|
1384
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1385
|
-
}
|
|
1386
|
-
if (data.code !== void 0) {
|
|
1387
|
-
return sanitizeErrorCode(data.code);
|
|
1388
|
-
}
|
|
1389
|
-
if (data["__type"] !== void 0) {
|
|
1390
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1391
|
-
}
|
|
1392
|
-
}, "loadRestJsonErrorCode");
|
|
1393
1353
|
|
|
1394
1354
|
// src/commands/AssociateServiceQuotaTemplateCommand.ts
|
|
1395
1355
|
var _AssociateServiceQuotaTemplateCommand = class _AssociateServiceQuotaTemplateCommand extends import_smithy_client.Command.classBuilder().ep({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
|
|
1
2
|
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
2
3
|
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
|
|
3
4
|
import { AccessDeniedException, AWSServiceAccessNotEnabledException, DependencyAccessDeniedException, IllegalArgumentException, InvalidPaginationTokenException, InvalidResourceStateException, NoAvailableOrganizationException, NoSuchResourceException, OrganizationNotInAllFeaturesModeException, QuotaExceededException, ResourceAlreadyExistsException, ServiceException, ServiceQuotaTemplateNotInUseException, TagPolicyViolationException, TemplatesNotAvailableInRegionException, TooManyRequestsException, TooManyTagsException, } from "../models/models_0";
|
|
@@ -765,43 +766,3 @@ function sharedHeaders(operation) {
|
|
|
765
766
|
"x-amz-target": `ServiceQuotasV20190624.${operation}`,
|
|
766
767
|
};
|
|
767
768
|
}
|
|
768
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
769
|
-
if (encoded.length) {
|
|
770
|
-
return JSON.parse(encoded);
|
|
771
|
-
}
|
|
772
|
-
return {};
|
|
773
|
-
});
|
|
774
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
775
|
-
const value = await parseBody(errorBody, context);
|
|
776
|
-
value.message = value.message ?? value.Message;
|
|
777
|
-
return value;
|
|
778
|
-
};
|
|
779
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
780
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
781
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
782
|
-
let cleanValue = rawValue;
|
|
783
|
-
if (typeof cleanValue === "number") {
|
|
784
|
-
cleanValue = cleanValue.toString();
|
|
785
|
-
}
|
|
786
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
787
|
-
cleanValue = cleanValue.split(",")[0];
|
|
788
|
-
}
|
|
789
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
790
|
-
cleanValue = cleanValue.split(":")[0];
|
|
791
|
-
}
|
|
792
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
793
|
-
cleanValue = cleanValue.split("#")[1];
|
|
794
|
-
}
|
|
795
|
-
return cleanValue;
|
|
796
|
-
};
|
|
797
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
798
|
-
if (headerKey !== undefined) {
|
|
799
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
800
|
-
}
|
|
801
|
-
if (data.code !== undefined) {
|
|
802
|
-
return sanitizeErrorCode(data.code);
|
|
803
|
-
}
|
|
804
|
-
if (data["__type"] !== undefined) {
|
|
805
|
-
return sanitizeErrorCode(data["__type"]);
|
|
806
|
-
}
|
|
807
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-service-quotas",
|
|
3
3
|
"description": "AWS SDK for JavaScript Service Quotas Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.529.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-service-quotas",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.1",
|
|
24
|
+
"@aws-sdk/core": "3.529.1",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.1",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.523.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.523.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.523.0",
|