aws-sdk 2.1203.0 → 2.1204.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 +7 -1
- package/README.md +1 -1
- package/apis/mediapackage-2017-10-12.min.json +7 -0
- package/clients/mediapackage.d.ts +2 -0
- package/clients/rds.d.ts +5 -5
- package/dist/aws-sdk-core-react-native.js +151 -31
- package/dist/aws-sdk-react-native.js +154 -34
- package/dist/aws-sdk.js +230 -114
- package/dist/aws-sdk.min.js +11 -11
- package/lib/config-base.d.ts +14 -0
- package/lib/config.js +78 -1
- package/lib/core.js +1 -1
- package/lib/event_listeners.js +49 -30
- package/lib/node_loader.js +17 -1
- package/lib/service.js +2 -0
- package/lib/shared-ini/ini-loader.d.ts +1 -12
- package/lib/shared-ini/ini-loader.js +68 -30
- package/lib/signers/bearer.js +14 -0
- package/lib/signers/request_signer.js +2 -0
- package/lib/token/sso_token_provider.d.ts +12 -0
- package/lib/token/sso_token_provider.js +245 -0
- package/lib/token/static_token_provider.d.ts +8 -0
- package/lib/token/static_token_provider.js +27 -0
- package/lib/token/token_provider_chain.d.ts +24 -0
- package/lib/token/token_provider_chain.js +165 -0
- package/lib/token.d.ts +101 -0
- package/lib/token.js +219 -0
- package/package.json +1 -1
- package/scripts/region-checker/allowlist.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
# Changelog for AWS SDK for JavaScript
|
|
2
|
-
<!--LATEST=2.
|
|
2
|
+
<!--LATEST=2.1204.0-->
|
|
3
3
|
<!--ENTRYINSERT-->
|
|
4
4
|
|
|
5
|
+
## 2.1204.0
|
|
6
|
+
* feature: MediaPackage: This release adds Ads AdTriggers and AdsOnDeliveryRestrictions to describe calls for CMAF endpoints on MediaPackage.
|
|
7
|
+
* feature: Token: Read sso data from sso-session section in SSOTokenProvider
|
|
8
|
+
* feature: Token: Set token from AWS.Signers.Bearer when specified by authtype/signatureVersion
|
|
9
|
+
* feature: token: Add TokenProviderChain with Token/Static/SSO
|
|
10
|
+
|
|
5
11
|
## 2.1203.0
|
|
6
12
|
* feature: GameLift: This release adds support for eight EC2 local zones as fleet locations; Atlanta, Chicago, Dallas, Denver, Houston, Kansas City (us-east-1-mci-1a), Los Angeles, and Phoenix. It also adds support for C5d, C6a, C6i, and R5d EC2 instance families.
|
|
7
13
|
* feature: IoTWireless: This release includes a new feature for the customers to enable the LoRa gateways to send out beacons for Class B devices and an option to select one or more gateways for Class C devices when sending the LoRaWAN downlink messages.
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ For release notes, see the [CHANGELOG](https://github.com/aws/aws-sdk-js/blob/ma
|
|
|
29
29
|
To use the SDK in the browser, simply add the following script tag to your
|
|
30
30
|
HTML pages:
|
|
31
31
|
|
|
32
|
-
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.
|
|
32
|
+
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.1204.0.min.js"></script>
|
|
33
33
|
|
|
34
34
|
You can also build a custom browser SDK with your specified set of AWS services.
|
|
35
35
|
This can allow you to reduce the SDK's size, specify different API versions of
|
|
@@ -1587,6 +1587,13 @@
|
|
|
1587
1587
|
},
|
|
1588
1588
|
"Url": {
|
|
1589
1589
|
"locationName": "url"
|
|
1590
|
+
},
|
|
1591
|
+
"AdTriggers": {
|
|
1592
|
+
"locationName": "adTriggers",
|
|
1593
|
+
"shape": "St"
|
|
1594
|
+
},
|
|
1595
|
+
"AdsOnDeliveryRestrictions": {
|
|
1596
|
+
"locationName": "adsOnDeliveryRestrictions"
|
|
1590
1597
|
}
|
|
1591
1598
|
},
|
|
1592
1599
|
"required": [
|
|
@@ -846,6 +846,8 @@ it will be passed through to HLS output.
|
|
|
846
846
|
* The URL of the packaged OriginEndpoint for consumption.
|
|
847
847
|
*/
|
|
848
848
|
Url?: __string;
|
|
849
|
+
AdTriggers?: AdTriggers;
|
|
850
|
+
AdsOnDeliveryRestrictions?: AdsOnDeliveryRestrictions;
|
|
849
851
|
}
|
|
850
852
|
export interface HlsManifestCreateOrUpdateParameters {
|
|
851
853
|
/**
|
package/clients/rds.d.ts
CHANGED
|
@@ -1102,11 +1102,11 @@ declare class RDS extends Service {
|
|
|
1102
1102
|
*/
|
|
1103
1103
|
stopDBInstanceAutomatedBackupsReplication(callback?: (err: AWSError, data: RDS.Types.StopDBInstanceAutomatedBackupsReplicationResult) => void): Request<RDS.Types.StopDBInstanceAutomatedBackupsReplicationResult, AWSError>;
|
|
1104
1104
|
/**
|
|
1105
|
-
* Switches over an Oracle standby database in an Oracle Data Guard environment, making it the new primary database. Issue this command in the
|
|
1105
|
+
* Switches over an Oracle standby database in an Oracle Data Guard environment, making it the new primary database. Issue this command in the Region that hosts the current standby database.
|
|
1106
1106
|
*/
|
|
1107
1107
|
switchoverReadReplica(params: RDS.Types.SwitchoverReadReplicaMessage, callback?: (err: AWSError, data: RDS.Types.SwitchoverReadReplicaResult) => void): Request<RDS.Types.SwitchoverReadReplicaResult, AWSError>;
|
|
1108
1108
|
/**
|
|
1109
|
-
* Switches over an Oracle standby database in an Oracle Data Guard environment, making it the new primary database. Issue this command in the
|
|
1109
|
+
* Switches over an Oracle standby database in an Oracle Data Guard environment, making it the new primary database. Issue this command in the Region that hosts the current standby database.
|
|
1110
1110
|
*/
|
|
1111
1111
|
switchoverReadReplica(callback?: (err: AWSError, data: RDS.Types.SwitchoverReadReplicaResult) => void): Request<RDS.Types.SwitchoverReadReplicaResult, AWSError>;
|
|
1112
1112
|
/**
|
|
@@ -1620,7 +1620,7 @@ declare namespace RDS {
|
|
|
1620
1620
|
*/
|
|
1621
1621
|
DatabaseInstallationFilesS3Prefix?: String255;
|
|
1622
1622
|
/**
|
|
1623
|
-
* The Amazon Web Services KMS key identifier for an encrypted CEV. A symmetric KMS key is required for RDS Custom, but optional for Amazon RDS. If you have an existing symmetric KMS key in your account, you can use it with RDS Custom. No further action is necessary. If you don't already have a symmetric KMS key in your account, follow the instructions in Creating symmetric KMS
|
|
1623
|
+
* The Amazon Web Services KMS key identifier for an encrypted CEV. A symmetric encryption KMS key is required for RDS Custom, but optional for Amazon RDS. If you have an existing symmetric encryption KMS key in your account, you can use it with RDS Custom. No further action is necessary. If you don't already have a symmetric encryption KMS key in your account, follow the instructions in Creating a symmetric encryption KMS key in the Amazon Web Services Key Management Service Developer Guide. You can choose the same symmetric encryption key when you create a CEV and a DB instance, or choose different keys.
|
|
1624
1624
|
*/
|
|
1625
1625
|
KMSKeyId: KmsKeyIdOrArn;
|
|
1626
1626
|
/**
|
|
@@ -4083,7 +4083,7 @@ declare namespace RDS {
|
|
|
4083
4083
|
*/
|
|
4084
4084
|
OriginalSnapshotCreateTime?: TStamp;
|
|
4085
4085
|
/**
|
|
4086
|
-
* The timestamp of the most recent transaction applied to the database that you're backing up. Thus, if you restore a snapshot, SnapshotDatabaseTime is the most recent transaction in the restored DB instance. In contrast, originalSnapshotCreateTime specifies the system time that the snapshot completed. If you back up a read replica, you can determine the replica lag by comparing SnapshotDatabaseTime with originalSnapshotCreateTime. For example, if originalSnapshotCreateTime is two hours later than SnapshotDatabaseTime, then the replica lag is two hours.
|
|
4086
|
+
* The timestamp of the most recent transaction applied to the database that you're backing up. Thus, if you restore a snapshot, SnapshotDatabaseTime is the most recent transaction in the restored DB instance. In contrast, originalSnapshotCreateTime specifies the system time that the snapshot completed. If you back up a read replica, you can determine the replica lag by comparing SnapshotDatabaseTime with originalSnapshotCreateTime. For example, if originalSnapshotCreateTime is two hours later than SnapshotDatabaseTime, then the replica lag is two hours.
|
|
4087
4087
|
*/
|
|
4088
4088
|
SnapshotDatabaseTime?: TStamp;
|
|
4089
4089
|
/**
|
|
@@ -6018,7 +6018,7 @@ declare namespace RDS {
|
|
|
6018
6018
|
*/
|
|
6019
6019
|
AllocatedStorage?: IntegerOptional;
|
|
6020
6020
|
/**
|
|
6021
|
-
* The new compute and memory capacity of the DB instance, for example db.m4.large. Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines. For the full list of DB instance classes, and availability for your engine, see DB
|
|
6021
|
+
* The new compute and memory capacity of the DB instance, for example db.m4.large. Not all DB instance classes are available in all Amazon Web Services Regions, or for all database engines. For the full list of DB instance classes, and availability for your engine, see DB instance classes in the Amazon RDS User Guide or Aurora DB instance classes in the Amazon Aurora User Guide. If you modify the DB instance class, an outage occurs during the change. The change is applied during the next maintenance window, unless ApplyImmediately is enabled for this request. This setting doesn't apply to RDS Custom for Oracle. Default: Uses existing setting
|
|
6022
6022
|
*/
|
|
6023
6023
|
DBInstanceClass?: String;
|
|
6024
6024
|
/**
|
|
@@ -83,7 +83,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
83
83
|
/**
|
|
84
84
|
* @constant
|
|
85
85
|
*/
|
|
86
|
-
VERSION: '2.
|
|
86
|
+
VERSION: '2.1204.0',
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* @api private
|
|
@@ -147,7 +147,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
147
147
|
__webpack_require__(76);
|
|
148
148
|
__webpack_require__(77);
|
|
149
149
|
__webpack_require__(78);
|
|
150
|
-
__webpack_require__(
|
|
150
|
+
__webpack_require__(87);
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
153
|
* @readonly
|
|
@@ -5217,6 +5217,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
5217
5217
|
version = this.config.signatureVersion;
|
|
5218
5218
|
} else if (authtype === 'v4' || authtype === 'v4-unsigned-body') {
|
|
5219
5219
|
version = 'v4';
|
|
5220
|
+
} else if (authtype === 'bearer') {
|
|
5221
|
+
version = 'bearer';
|
|
5220
5222
|
} else {
|
|
5221
5223
|
version = this.api.signatureVersion;
|
|
5222
5224
|
}
|
|
@@ -6157,6 +6159,82 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
6157
6159
|
}
|
|
6158
6160
|
},
|
|
6159
6161
|
|
|
6162
|
+
/**
|
|
6163
|
+
* Loads token from the configuration object. This is used internally
|
|
6164
|
+
* by the SDK to ensure that refreshable {Token} objects are properly
|
|
6165
|
+
* refreshed and loaded when sending a request. If you want to ensure that
|
|
6166
|
+
* your token is loaded prior to a request, you can use this method
|
|
6167
|
+
* directly to provide accurate token data stored in the object.
|
|
6168
|
+
*
|
|
6169
|
+
* @note If you configure the SDK with static token, the token data should
|
|
6170
|
+
* already be present in {token} attribute. This method is primarily necessary
|
|
6171
|
+
* to load token from asynchronous sources, or sources that can refresh
|
|
6172
|
+
* token periodically.
|
|
6173
|
+
* @example Getting your access token
|
|
6174
|
+
* AWS.config.getToken(function(err) {
|
|
6175
|
+
* if (err) console.log(err.stack); // token not loaded
|
|
6176
|
+
* else console.log("Token:", AWS.config.token.token);
|
|
6177
|
+
* })
|
|
6178
|
+
* @callback callback function(err)
|
|
6179
|
+
* Called when the {token} have been properly set on the configuration object.
|
|
6180
|
+
*
|
|
6181
|
+
* @param err [Error] if this is set, token was not successfully loaded and
|
|
6182
|
+
* this error provides information why.
|
|
6183
|
+
* @see token
|
|
6184
|
+
*/
|
|
6185
|
+
getToken: function getToken(callback) {
|
|
6186
|
+
var self = this;
|
|
6187
|
+
|
|
6188
|
+
function finish(err) {
|
|
6189
|
+
callback(err, err ? null : self.token);
|
|
6190
|
+
}
|
|
6191
|
+
|
|
6192
|
+
function tokenError(msg, err) {
|
|
6193
|
+
return new AWS.util.error(err || new Error(), {
|
|
6194
|
+
code: 'TokenError',
|
|
6195
|
+
message: msg,
|
|
6196
|
+
name: 'TokenError'
|
|
6197
|
+
});
|
|
6198
|
+
}
|
|
6199
|
+
|
|
6200
|
+
function getAsyncToken() {
|
|
6201
|
+
self.token.get(function(err) {
|
|
6202
|
+
if (err) {
|
|
6203
|
+
var msg = 'Could not load token from ' +
|
|
6204
|
+
self.token.constructor.name;
|
|
6205
|
+
err = tokenError(msg, err);
|
|
6206
|
+
}
|
|
6207
|
+
finish(err);
|
|
6208
|
+
});
|
|
6209
|
+
}
|
|
6210
|
+
|
|
6211
|
+
function getStaticToken() {
|
|
6212
|
+
var err = null;
|
|
6213
|
+
if (!self.token.token) {
|
|
6214
|
+
err = tokenError('Missing token');
|
|
6215
|
+
}
|
|
6216
|
+
finish(err);
|
|
6217
|
+
}
|
|
6218
|
+
|
|
6219
|
+
if (self.token) {
|
|
6220
|
+
if (typeof self.token.get === 'function') {
|
|
6221
|
+
getAsyncToken();
|
|
6222
|
+
} else { // static token
|
|
6223
|
+
getStaticToken();
|
|
6224
|
+
}
|
|
6225
|
+
} else if (self.tokenProvider) {
|
|
6226
|
+
self.tokenProvider.resolve(function(err, token) {
|
|
6227
|
+
if (err) {
|
|
6228
|
+
err = tokenError('Could not load token from any providers', err);
|
|
6229
|
+
}
|
|
6230
|
+
self.token = token;
|
|
6231
|
+
finish(err);
|
|
6232
|
+
});
|
|
6233
|
+
} else {
|
|
6234
|
+
finish(tokenError('No token to load'));
|
|
6235
|
+
}
|
|
6236
|
+
},
|
|
6237
|
+
|
|
6160
6238
|
/**
|
|
6161
6239
|
* @!group Loading and Setting Configuration Options
|
|
6162
6240
|
*/
|
|
@@ -6290,7 +6368,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
6290
6368
|
hostPrefixEnabled: true,
|
|
6291
6369
|
stsRegionalEndpoints: 'legacy',
|
|
6292
6370
|
useFipsEndpoint: false,
|
|
6293
|
-
useDualstackEndpoint: false
|
|
6371
|
+
useDualstackEndpoint: false,
|
|
6372
|
+
token: null
|
|
6294
6373
|
},
|
|
6295
6374
|
|
|
6296
6375
|
/**
|
|
@@ -7288,37 +7367,56 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
7288
7367
|
var authtype = operation ? operation.authtype : '';
|
|
7289
7368
|
if (!service.api.signatureVersion && !authtype && !service.config.signatureVersion) return done(); // none
|
|
7290
7369
|
|
|
7291
|
-
service.config.
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7370
|
+
if (authtype === 'bearer' || service.config.signatureVersion === 'bearer') {
|
|
7371
|
+
service.config.getToken(function (err, token) {
|
|
7372
|
+
if (err) {
|
|
7373
|
+
req.response.error = err;
|
|
7374
|
+
return done();
|
|
7375
|
+
}
|
|
7296
7376
|
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7377
|
+
try {
|
|
7378
|
+
var SignerClass = service.getSignerClass(req);
|
|
7379
|
+
var signer = new SignerClass(req.httpRequest);
|
|
7380
|
+
signer.addAuthorization(token);
|
|
7381
|
+
} catch (e) {
|
|
7382
|
+
req.response.error = e;
|
|
7383
|
+
}
|
|
7384
|
+
done();
|
|
7385
|
+
});
|
|
7386
|
+
} else {
|
|
7387
|
+
service.config.getCredentials(function (err, credentials) {
|
|
7388
|
+
if (err) {
|
|
7389
|
+
req.response.error = err;
|
|
7390
|
+
return done();
|
|
7391
|
+
}
|
|
7308
7392
|
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7393
|
+
try {
|
|
7394
|
+
var date = service.getSkewCorrectedDate();
|
|
7395
|
+
var SignerClass = service.getSignerClass(req);
|
|
7396
|
+
var signer = new SignerClass(req.httpRequest,
|
|
7397
|
+
service.getSigningName(req),
|
|
7398
|
+
{
|
|
7399
|
+
signatureCache: service.config.signatureCache,
|
|
7400
|
+
operation: operation,
|
|
7401
|
+
signatureVersion: service.api.signatureVersion
|
|
7402
|
+
});
|
|
7403
|
+
signer.setServiceClientId(service._clientId);
|
|
7404
|
+
|
|
7405
|
+
// clear old authorization headers
|
|
7406
|
+
delete req.httpRequest.headers['Authorization'];
|
|
7407
|
+
delete req.httpRequest.headers['Date'];
|
|
7408
|
+
delete req.httpRequest.headers['X-Amz-Date'];
|
|
7409
|
+
|
|
7410
|
+
// add new authorization
|
|
7411
|
+
signer.addAuthorization(credentials, date);
|
|
7412
|
+
req.signedAt = date;
|
|
7413
|
+
} catch (e) {
|
|
7414
|
+
req.response.error = e;
|
|
7415
|
+
}
|
|
7416
|
+
done();
|
|
7417
|
+
});
|
|
7313
7418
|
|
|
7314
|
-
|
|
7315
|
-
signer.addAuthorization(credentials, date);
|
|
7316
|
-
req.signedAt = date;
|
|
7317
|
-
} catch (e) {
|
|
7318
|
-
req.response.error = e;
|
|
7319
|
-
}
|
|
7320
|
-
done();
|
|
7321
|
-
});
|
|
7419
|
+
}
|
|
7322
7420
|
});
|
|
7323
7421
|
|
|
7324
7422
|
add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) {
|
|
@@ -13185,6 +13283,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
13185
13283
|
case 'v4': return AWS.Signers.V4;
|
|
13186
13284
|
case 's3': return AWS.Signers.S3;
|
|
13187
13285
|
case 'v3https': return AWS.Signers.V3Https;
|
|
13286
|
+
case 'bearer': return AWS.Signers.Bearer;
|
|
13188
13287
|
}
|
|
13189
13288
|
throw new Error('Unknown signing version ' + version);
|
|
13190
13289
|
};
|
|
@@ -13195,6 +13294,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
13195
13294
|
__webpack_require__(82);
|
|
13196
13295
|
__webpack_require__(84);
|
|
13197
13296
|
__webpack_require__(85);
|
|
13297
|
+
__webpack_require__(86);
|
|
13198
13298
|
|
|
13199
13299
|
|
|
13200
13300
|
/***/ }),
|
|
@@ -14004,6 +14104,26 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
14004
14104
|
|
|
14005
14105
|
var AWS = __webpack_require__(1);
|
|
14006
14106
|
|
|
14107
|
+
/**
|
|
14108
|
+
* @api private
|
|
14109
|
+
*/
|
|
14110
|
+
AWS.Signers.Bearer = AWS.util.inherit(AWS.Signers.RequestSigner, {
|
|
14111
|
+
constructor: function Bearer(request) {
|
|
14112
|
+
AWS.Signers.RequestSigner.call(this, request);
|
|
14113
|
+
},
|
|
14114
|
+
|
|
14115
|
+
addAuthorization: function addAuthorization(token) {
|
|
14116
|
+
this.request.httpRequest.headers['Authorization'] = 'Bearer ' + token.token;
|
|
14117
|
+
}
|
|
14118
|
+
});
|
|
14119
|
+
|
|
14120
|
+
|
|
14121
|
+
/***/ }),
|
|
14122
|
+
/* 87 */
|
|
14123
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
14124
|
+
|
|
14125
|
+
var AWS = __webpack_require__(1);
|
|
14126
|
+
|
|
14007
14127
|
/**
|
|
14008
14128
|
* @api private
|
|
14009
14129
|
*/
|