aws-sdk 2.1657.0 → 2.1659.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.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/apis/acm-pca-2017-08-22.min.json +18 -17
  3. package/apis/acm-pca-2017-08-22.paginators.json +4 -4
  4. package/apis/acm-pca-2017-08-22.waiters2.json +62 -74
  5. package/apis/arc-zonal-shift-2022-10-30.min.json +62 -10
  6. package/apis/batch-2016-08-10.min.json +62 -52
  7. package/apis/bedrock-2023-04-20.min.json +140 -86
  8. package/apis/bedrock-agent-2023-06-05.min.json +1991 -171
  9. package/apis/bedrock-agent-2023-06-05.paginators.json +24 -0
  10. package/apis/bedrock-agent-runtime-2023-07-26.min.json +642 -216
  11. package/apis/bedrock-agent-runtime-2023-07-26.paginators.json +6 -0
  12. package/apis/bedrock-runtime-2023-09-30.min.json +329 -192
  13. package/apis/ec2-2016-11-15.min.json +79 -67
  14. package/apis/glue-2017-03-31.min.json +407 -368
  15. package/apis/groundstation-2019-05-23.min.json +7 -1
  16. package/apis/license-manager-linux-subscriptions-2018-05-10.min.json +236 -16
  17. package/apis/license-manager-linux-subscriptions-2018-05-10.paginators.json +6 -0
  18. package/apis/mediaconnect-2018-11-14.min.json +106 -94
  19. package/apis/pinpoint-2016-12-01.min.json +4 -1
  20. package/apis/quicksight-2018-04-01.min.json +1783 -1313
  21. package/clients/acmpca.d.ts +39 -39
  22. package/clients/arczonalshift.d.ts +66 -29
  23. package/clients/batch.d.ts +12 -0
  24. package/clients/bedrock.d.ts +63 -14
  25. package/clients/bedrockagent.d.ts +2172 -171
  26. package/clients/bedrockagentruntime.d.ts +396 -11
  27. package/clients/bedrockruntime.d.ts +149 -6
  28. package/clients/ec2.d.ts +28 -3
  29. package/clients/glue.d.ts +48 -1
  30. package/clients/licensemanagerlinuxsubscriptions.d.ts +249 -10
  31. package/clients/mediaconnect.d.ts +13 -0
  32. package/clients/quicksight.d.ts +609 -0
  33. package/dist/aws-sdk-core-react-native.js +1 -1
  34. package/dist/aws-sdk-react-native.js +71 -26
  35. package/dist/aws-sdk.js +133 -76
  36. package/dist/aws-sdk.min.js +76 -76
  37. package/lib/core.js +1 -1
  38. package/lib/services/s3.js +51 -6
  39. package/package.json +1 -1
  40. package/scripts/region-checker/allowlist.js +7 -7
package/lib/core.js CHANGED
@@ -20,7 +20,7 @@ AWS.util.update(AWS, {
20
20
  /**
21
21
  * @constant
22
22
  */
23
- VERSION: '2.1657.0',
23
+ VERSION: '2.1659.0',
24
24
 
25
25
  /**
26
26
  * @api private
@@ -531,17 +531,21 @@ AWS.util.update(AWS.S3.prototype, {
531
531
  * @api private
532
532
  */
533
533
  extractErrorFrom200Response: function extractErrorFrom200Response(resp) {
534
- if (!operationsWith200StatusCodeError[resp.request.operation]) return;
534
+ var service = this.service ? this.service : this;
535
+ if (!service.is200Error(resp) && !operationsWith200StatusCodeError[resp.request.operation]) {
536
+ return;
537
+ }
535
538
  var httpResponse = resp.httpResponse;
536
- if (httpResponse.body && httpResponse.body.toString().match('<Error>')) {
539
+ var bodyString = httpResponse.body && httpResponse.body.toString() || '';
540
+ if (bodyString && bodyString.indexOf('</Error>') === bodyString.length - 8) {
537
541
  // Response body with '<Error>...</Error>' indicates an exception.
538
542
  // Get S3 client object. In ManagedUpload, this.service refers to
539
543
  // S3 client object.
540
544
  resp.data = null;
541
- var service = this.service ? this.service : this;
542
545
  service.extractError(resp);
546
+ resp.error.is200Error = true;
543
547
  throw resp.error;
544
- } else if (!httpResponse.body || !httpResponse.body.toString().match(/<[\w_]/)) {
548
+ } else if (!httpResponse.body || !bodyString.match(/<[\w_]/)) {
545
549
  // When body is empty or incomplete, S3 might stop the request on detecting client
546
550
  // side aborting the request.
547
551
  resp.data = null;
@@ -552,13 +556,54 @@ AWS.util.update(AWS.S3.prototype, {
552
556
  }
553
557
  },
554
558
 
559
+ /**
560
+ * @api private
561
+ * @param resp - to evaluate.
562
+ * @return true if the response has status code 200 but is an error.
563
+ */
564
+ is200Error: function is200Error(resp) {
565
+ var code = resp && resp.httpResponse && resp.httpResponse.statusCode;
566
+ if (code !== 200) {
567
+ return false;
568
+ }
569
+ try {
570
+ var req = resp.request;
571
+ var outputMembers = req.service.api.operations[req.operation].output.members;
572
+ var keys = Object.keys(outputMembers);
573
+ for (var i = 0; i < keys.length; ++i) {
574
+ var member = outputMembers[keys[i]];
575
+ if (member.type === 'binary' && member.isStreaming) {
576
+ return false;
577
+ }
578
+ }
579
+
580
+ var body = resp.httpResponse.body;
581
+ if (body && body.byteLength !== undefined) {
582
+ if (body.byteLength < 15 || body.byteLength > 3000) {
583
+ // body is too short or long to be an error message.
584
+ return false;
585
+ }
586
+ }
587
+ if (!body) {
588
+ return false;
589
+ }
590
+ var bodyString = body.toString();
591
+ if (bodyString.indexOf('</Error>') === bodyString.length - 8) {
592
+ return true;
593
+ }
594
+ } catch (e) {
595
+ return false;
596
+ }
597
+ return false;
598
+ },
599
+
555
600
  /**
556
601
  * @return [Boolean] whether the error can be retried
557
602
  * @api private
558
603
  */
559
604
  retryableError: function retryableError(error, request) {
560
- if (operationsWith200StatusCodeError[request.operation] &&
561
- error.statusCode === 200) {
605
+ if (error.is200Error ||
606
+ (operationsWith200StatusCodeError[request.operation] && error.statusCode === 200)) {
562
607
  return true;
563
608
  } else if (request._requestRegionForBucket &&
564
609
  request.service.bucketRegionCache[request._requestRegionForBucket]) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aws-sdk",
3
3
  "description": "AWS SDK for JavaScript",
4
- "version": "2.1657.0",
4
+ "version": "2.1659.0",
5
5
  "author": {
6
6
  "name": "Amazon Web Services",
7
7
  "email": "",
@@ -44,13 +44,13 @@ var allowlist = {
44
44
  263,
45
45
  276,
46
46
  282,
47
- 642,
48
- 644,
49
- 763,
50
- 774,
51
- 775,
52
- 776,
53
- 781
47
+ 687,
48
+ 689,
49
+ 808,
50
+ 819,
51
+ 820,
52
+ 821,
53
+ 826
54
54
  ],
55
55
  '/token/sso_token_provider.js': [
56
56
  60