aws-sdk 2.927.0 → 2.931.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/CHANGELOG.md +27 -1
- package/README.md +1 -1
- package/apis/chime-2018-05-01.min.json +48 -4
- package/apis/connect-2017-08-08.min.json +229 -124
- package/apis/connect-2017-08-08.paginators.json +6 -0
- package/apis/ec2-2016-11-15.min.json +1034 -898
- package/apis/greengrassv2-2020-11-30.min.json +166 -28
- package/apis/greengrassv2-2020-11-30.paginators.json +6 -0
- package/apis/iotanalytics-2017-11-27.min.json +68 -27
- package/apis/kendra-2019-02-03.min.json +128 -35
- package/apis/kms-2014-11-01.examples.json +8 -3
- package/apis/kms-2014-11-01.min.json +101 -20
- package/apis/mediatailor-2018-04-23.min.json +67 -59
- package/apis/metadata.json +2 -1
- package/apis/models.lex.v2-2020-08-07.min.json +60 -37
- package/apis/rds-2014-10-31.min.json +41 -20
- package/apis/redshift-data-2019-12-20.min.json +26 -3
- package/apis/runtime.lex.v2-2020-08-07.min.json +49 -35
- package/clients/browser_default.d.ts +1 -0
- package/clients/browser_default.js +1 -0
- package/clients/chime.d.ts +32 -6
- package/clients/connect.d.ts +184 -94
- package/clients/ec2.d.ts +192 -41
- package/clients/greengrassv2.d.ts +138 -2
- package/clients/iotanalytics.d.ts +51 -4
- package/clients/kendra.d.ts +114 -3
- package/clients/kms.d.ts +260 -136
- package/clients/lexmodelsv2.d.ts +30 -4
- package/clients/lexruntimev2.d.ts +46 -36
- package/clients/lookoutmetrics.d.ts +4 -4
- package/clients/mediatailor.d.ts +19 -1
- package/clients/rds.d.ts +248 -207
- package/clients/redshiftdata.d.ts +25 -0
- package/clients/sagemaker.d.ts +6 -6
- package/dist/aws-sdk-core-react-native.js +26 -2
- package/dist/aws-sdk-react-native.js +59 -39
- package/dist/aws-sdk.js +4438 -1559
- package/dist/aws-sdk.min.js +69 -68
- package/lib/core.js +1 -1
- package/lib/event_listeners.js +23 -0
- package/lib/model/operation.js +1 -0
- package/lib/services/s3.js +18 -22
- package/package.json +1 -1
- package/scripts/region-checker/allowlist.js +7 -7
package/lib/core.js
CHANGED
package/lib/event_listeners.js
CHANGED
|
@@ -132,6 +132,29 @@ AWS.EventListeners = {
|
|
|
132
132
|
new AWS.ParamValidator(validation).validate(rules, req.params);
|
|
133
133
|
});
|
|
134
134
|
|
|
135
|
+
add('COMPUTE_CHECKSUM', 'afterBuild', function COMPUTE_CHECKSUM(req) {
|
|
136
|
+
if (!req.service.api.operations) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
var operation = req.service.api.operations[req.operation];
|
|
140
|
+
if (!operation) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
var body = req.httpRequest.body;
|
|
144
|
+
var isNonStreamingPayload = body && (AWS.util.Buffer.isBuffer(body) || typeof body === 'string');
|
|
145
|
+
var headers = req.httpRequest.headers;
|
|
146
|
+
if (
|
|
147
|
+
operation.httpChecksumRequired &&
|
|
148
|
+
req.service.config.computeChecksums &&
|
|
149
|
+
isNonStreamingPayload &&
|
|
150
|
+
req.service.getSignerClass(req) === AWS.Signers.V4 &&
|
|
151
|
+
!headers['Content-MD5']
|
|
152
|
+
) {
|
|
153
|
+
var md5 = AWS.util.crypto.md5(body, 'base64');
|
|
154
|
+
headers['Content-MD5'] = md5;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
135
158
|
addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) {
|
|
136
159
|
req.haltHandlersOnError();
|
|
137
160
|
if (!req.service.api.operations) {
|
package/lib/model/operation.js
CHANGED
|
@@ -23,6 +23,7 @@ function Operation(name, operation, options) {
|
|
|
23
23
|
(operation.endpointdiscovery.required ? 'REQUIRED' : 'OPTIONAL') :
|
|
24
24
|
'NULL'
|
|
25
25
|
);
|
|
26
|
+
property(this, 'httpChecksumRequired', operation.httpChecksumRequired, false);
|
|
26
27
|
|
|
27
28
|
memoizedProperty(this, 'input', function() {
|
|
28
29
|
if (!operation.input) {
|
package/lib/services/s3.js
CHANGED
|
@@ -446,45 +446,41 @@ AWS.util.update(AWS.S3.prototype, {
|
|
|
446
446
|
},
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
|
-
* Checks whether checksums should be computed for the request
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
* is set.
|
|
449
|
+
* Checks whether checksums should be computed for the request if it's not
|
|
450
|
+
* already set by {AWS.EventListeners.Core.COMPUTE_CHECKSUM}. It depends on
|
|
451
|
+
* whether {AWS.Config.computeChecksums} is set.
|
|
453
452
|
*
|
|
454
453
|
* @param req [AWS.Request] the request to check against
|
|
455
454
|
* @return [Boolean] whether to compute checksums for a request.
|
|
456
455
|
* @api private
|
|
457
456
|
*/
|
|
458
457
|
willComputeChecksums: function willComputeChecksums(req) {
|
|
459
|
-
if (this.computableChecksumOperations[req.operation]) return true;
|
|
460
|
-
if (!this.config.computeChecksums) return false;
|
|
461
|
-
|
|
462
|
-
// TODO: compute checksums for Stream objects
|
|
463
|
-
if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) &&
|
|
464
|
-
typeof req.httpRequest.body !== 'string') {
|
|
465
|
-
return false;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
458
|
var rules = req.service.api.operations[req.operation].input.members;
|
|
459
|
+
var body = req.httpRequest.body;
|
|
460
|
+
var needsContentMD5 = rules.ContentMD5 &&
|
|
461
|
+
!req.params.ContentMD5 &&
|
|
462
|
+
body &&
|
|
463
|
+
(AWS.util.Buffer.isBuffer(req.httpRequest.body) || typeof req.httpRequest.body === 'string');
|
|
469
464
|
|
|
470
465
|
// Sha256 signing disabled, and not a presigned url
|
|
471
|
-
if (req.service.shouldDisableBodySigning(req) && !
|
|
472
|
-
|
|
473
|
-
return true;
|
|
474
|
-
}
|
|
466
|
+
if (needsContentMD5 && req.service.shouldDisableBodySigning(req) && !req.isPresigned()) {
|
|
467
|
+
return true;
|
|
475
468
|
}
|
|
476
469
|
|
|
477
|
-
//
|
|
478
|
-
if (
|
|
479
|
-
|
|
470
|
+
// SigV2 and presign, for backwards compatibility purpose.
|
|
471
|
+
if (needsContentMD5 && this.getSignatureVersion(req) === 's3' && req.isPresigned()) {
|
|
472
|
+
return true;
|
|
480
473
|
}
|
|
481
474
|
|
|
482
|
-
|
|
475
|
+
return false;
|
|
483
476
|
},
|
|
484
477
|
|
|
485
478
|
/**
|
|
486
479
|
* A listener that computes the Content-MD5 and sets it in the header.
|
|
487
|
-
*
|
|
480
|
+
* This listener is to support S3-specific features like
|
|
481
|
+
* s3DisableBodySigning and SigV2 presign. Content MD5 logic for SigV4 is
|
|
482
|
+
* handled in AWS.EventListeners.Core.COMPUTE_CHECKSUM
|
|
483
|
+
*
|
|
488
484
|
* @api private
|
|
489
485
|
*/
|
|
490
486
|
computeContentMd5: function computeContentMd5(req) {
|
package/package.json
CHANGED