@aws-sdk/client-mwaa 3.525.0 → 3.529.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/dist-cjs/index.js CHANGED
@@ -384,6 +384,7 @@ var UpdateEnvironmentInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => (
384
384
  }), "UpdateEnvironmentInputFilterSensitiveLog");
385
385
 
386
386
  // src/protocols/Aws_restJson1.ts
387
+ var import_core2 = require("@aws-sdk/core");
387
388
 
388
389
 
389
390
 
@@ -657,7 +658,7 @@ var de_CreateCliTokenCommand = /* @__PURE__ */ __name(async (output, context) =>
657
658
  const contents = (0, import_smithy_client.map)({
658
659
  $metadata: deserializeMetadata(output)
659
660
  });
660
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
661
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
661
662
  const doc = (0, import_smithy_client.take)(data, {
662
663
  CliToken: import_smithy_client.expectString,
663
664
  WebServerHostname: import_smithy_client.expectString
@@ -672,7 +673,7 @@ var de_CreateEnvironmentCommand = /* @__PURE__ */ __name(async (output, context)
672
673
  const contents = (0, import_smithy_client.map)({
673
674
  $metadata: deserializeMetadata(output)
674
675
  });
675
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
676
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
676
677
  const doc = (0, import_smithy_client.take)(data, {
677
678
  Arn: import_smithy_client.expectString
678
679
  });
@@ -686,7 +687,7 @@ var de_CreateWebLoginTokenCommand = /* @__PURE__ */ __name(async (output, contex
686
687
  const contents = (0, import_smithy_client.map)({
687
688
  $metadata: deserializeMetadata(output)
688
689
  });
689
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
690
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
690
691
  const doc = (0, import_smithy_client.take)(data, {
691
692
  AirflowIdentity: import_smithy_client.expectString,
692
693
  IamIdentity: import_smithy_client.expectString,
@@ -713,7 +714,7 @@ var de_GetEnvironmentCommand = /* @__PURE__ */ __name(async (output, context) =>
713
714
  const contents = (0, import_smithy_client.map)({
714
715
  $metadata: deserializeMetadata(output)
715
716
  });
716
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
717
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
717
718
  const doc = (0, import_smithy_client.take)(data, {
718
719
  Environment: (_) => de_Environment(_, context)
719
720
  });
@@ -727,7 +728,7 @@ var de_ListEnvironmentsCommand = /* @__PURE__ */ __name(async (output, context)
727
728
  const contents = (0, import_smithy_client.map)({
728
729
  $metadata: deserializeMetadata(output)
729
730
  });
730
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
731
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
731
732
  const doc = (0, import_smithy_client.take)(data, {
732
733
  Environments: import_smithy_client._json,
733
734
  NextToken: import_smithy_client.expectString
@@ -742,7 +743,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
742
743
  const contents = (0, import_smithy_client.map)({
743
744
  $metadata: deserializeMetadata(output)
744
745
  });
745
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
746
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
746
747
  const doc = (0, import_smithy_client.take)(data, {
747
748
  Tags: import_smithy_client._json
748
749
  });
@@ -786,7 +787,7 @@ var de_UpdateEnvironmentCommand = /* @__PURE__ */ __name(async (output, context)
786
787
  const contents = (0, import_smithy_client.map)({
787
788
  $metadata: deserializeMetadata(output)
788
789
  });
789
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
790
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
790
791
  const doc = (0, import_smithy_client.take)(data, {
791
792
  Arn: import_smithy_client.expectString
792
793
  });
@@ -796,9 +797,9 @@ var de_UpdateEnvironmentCommand = /* @__PURE__ */ __name(async (output, context)
796
797
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
797
798
  const parsedOutput = {
798
799
  ...output,
799
- body: await parseErrorBody(output.body, context)
800
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
800
801
  };
801
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
802
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
802
803
  switch (errorCode) {
803
804
  case "ResourceNotFoundException":
804
805
  case "com.amazonaws.mwaa#ResourceNotFoundException":
@@ -947,50 +948,9 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
947
948
  extendedRequestId: output.headers["x-amz-id-2"],
948
949
  cfId: output.headers["x-amz-cf-id"]
949
950
  }), "deserializeMetadata");
950
- var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
951
951
  var _MR = "MaxResults";
952
952
  var _NT = "NextToken";
953
953
  var _tK = "tagKeys";
954
- var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
955
- if (encoded.length) {
956
- return JSON.parse(encoded);
957
- }
958
- return {};
959
- }), "parseBody");
960
- var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
961
- const value = await parseBody(errorBody, context);
962
- value.message = value.message ?? value.Message;
963
- return value;
964
- }, "parseErrorBody");
965
- var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
966
- const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
967
- const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
968
- let cleanValue = rawValue;
969
- if (typeof cleanValue === "number") {
970
- cleanValue = cleanValue.toString();
971
- }
972
- if (cleanValue.indexOf(",") >= 0) {
973
- cleanValue = cleanValue.split(",")[0];
974
- }
975
- if (cleanValue.indexOf(":") >= 0) {
976
- cleanValue = cleanValue.split(":")[0];
977
- }
978
- if (cleanValue.indexOf("#") >= 0) {
979
- cleanValue = cleanValue.split("#")[1];
980
- }
981
- return cleanValue;
982
- }, "sanitizeErrorCode");
983
- const headerKey = findKey(output.headers, "x-amzn-errortype");
984
- if (headerKey !== void 0) {
985
- return sanitizeErrorCode(output.headers[headerKey]);
986
- }
987
- if (data.code !== void 0) {
988
- return sanitizeErrorCode(data.code);
989
- }
990
- if (data["__type"] !== void 0) {
991
- return sanitizeErrorCode(data["__type"]);
992
- }
993
- }, "loadRestJsonErrorCode");
994
954
 
995
955
  // src/commands/CreateCliTokenCommand.ts
996
956
  var _CreateCliTokenCommand = class _CreateCliTokenCommand 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 { requestBuilder as rb } from "@smithy/core";
2
3
  import { isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
3
4
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
@@ -566,43 +567,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
566
567
  const _MR = "MaxResults";
567
568
  const _NT = "NextToken";
568
569
  const _tK = "tagKeys";
569
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
570
- if (encoded.length) {
571
- return JSON.parse(encoded);
572
- }
573
- return {};
574
- });
575
- const parseErrorBody = async (errorBody, context) => {
576
- const value = await parseBody(errorBody, context);
577
- value.message = value.message ?? value.Message;
578
- return value;
579
- };
580
- const loadRestJsonErrorCode = (output, data) => {
581
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
582
- const sanitizeErrorCode = (rawValue) => {
583
- let cleanValue = rawValue;
584
- if (typeof cleanValue === "number") {
585
- cleanValue = cleanValue.toString();
586
- }
587
- if (cleanValue.indexOf(",") >= 0) {
588
- cleanValue = cleanValue.split(",")[0];
589
- }
590
- if (cleanValue.indexOf(":") >= 0) {
591
- cleanValue = cleanValue.split(":")[0];
592
- }
593
- if (cleanValue.indexOf("#") >= 0) {
594
- cleanValue = cleanValue.split("#")[1];
595
- }
596
- return cleanValue;
597
- };
598
- const headerKey = findKey(output.headers, "x-amzn-errortype");
599
- if (headerKey !== undefined) {
600
- return sanitizeErrorCode(output.headers[headerKey]);
601
- }
602
- if (data.code !== undefined) {
603
- return sanitizeErrorCode(data.code);
604
- }
605
- if (data["__type"] !== undefined) {
606
- return sanitizeErrorCode(data["__type"]);
607
- }
608
- };
@@ -253,6 +253,7 @@ export interface CreateEnvironmentInput {
253
253
  * <p>The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version.
254
254
  * For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html">Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (MWAA)</a>.</p>
255
255
  * <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>
256
+ * <code>2.8.1</code>
256
257
  * </p>
257
258
  */
258
259
  AirflowVersion?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-mwaa",
3
3
  "description": "AWS SDK for JavaScript Mwaa Client for Node.js, Browser and React Native",
4
- "version": "3.525.0",
4
+ "version": "3.529.0",
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-mwaa",
@@ -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.525.0",
24
- "@aws-sdk/core": "3.525.0",
25
- "@aws-sdk/credential-provider-node": "3.525.0",
23
+ "@aws-sdk/client-sts": "3.529.0",
24
+ "@aws-sdk/core": "3.529.0",
25
+ "@aws-sdk/credential-provider-node": "3.529.0",
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",