@aws-sdk/client-s3-control 3.171.0 → 3.178.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 +19 -0
- package/dist-cjs/S3Control.js +30 -0
- package/dist-cjs/commands/GetBucketVersioningCommand.js +38 -0
- package/dist-cjs/commands/PutBucketVersioningCommand.js +40 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +79 -5
- package/dist-cjs/protocols/Aws_restXml.js +143 -3
- package/dist-es/S3Control.js +30 -0
- package/dist-es/commands/GetBucketVersioningCommand.js +41 -0
- package/dist-es/commands/PutBucketVersioningCommand.js +43 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +62 -0
- package/dist-es/protocols/Aws_restXml.js +187 -0
- package/dist-types/S3Control.d.ts +116 -18
- package/dist-types/S3ControlClient.d.ts +4 -2
- package/dist-types/commands/CreateAccessPointCommand.d.ts +1 -1
- package/dist-types/commands/DeleteAccessPointCommand.d.ts +1 -1
- package/dist-types/commands/DeleteAccessPointPolicyCommand.d.ts +1 -1
- package/dist-types/commands/DeleteBucketCommand.d.ts +1 -1
- package/dist-types/commands/DeleteBucketLifecycleConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/DeleteBucketPolicyCommand.d.ts +1 -1
- package/dist-types/commands/DeleteBucketTaggingCommand.d.ts +1 -1
- package/dist-types/commands/GetAccessPointCommand.d.ts +1 -1
- package/dist-types/commands/GetBucketCommand.d.ts +1 -1
- package/dist-types/commands/GetBucketLifecycleConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/GetBucketPolicyCommand.d.ts +1 -1
- package/dist-types/commands/GetBucketTaggingCommand.d.ts +1 -1
- package/dist-types/commands/GetBucketVersioningCommand.d.ts +66 -0
- package/dist-types/commands/ListAccessPointsCommand.d.ts +1 -1
- package/dist-types/commands/PutAccessPointPolicyCommand.d.ts +1 -1
- package/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +1 -1
- package/dist-types/commands/PutBucketPolicyCommand.d.ts +1 -1
- package/dist-types/commands/PutBucketTaggingCommand.d.ts +1 -1
- package/dist-types/commands/PutBucketVersioningCommand.d.ts +88 -0
- package/dist-types/commands/PutPublicAccessBlockCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +127 -12
- package/dist-types/protocols/Aws_restXml.d.ts +6 -0
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/runtimeConfig.native.d.ts +1 -1
- package/dist-types/ts3.4/S3Control.d.ts +34 -0
- package/dist-types/ts3.4/S3ControlClient.d.ts +12 -0
- package/dist-types/ts3.4/commands/GetBucketVersioningCommand.d.ts +36 -0
- package/dist-types/ts3.4/commands/PutBucketVersioningCommand.d.ts +31 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +79 -26
- package/dist-types/ts3.4/protocols/Aws_restXml.d.ts +24 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +3 -1
- package/package.json +31 -31
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getProcessArnablesPlugin } from "@aws-sdk/middleware-sdk-s3-control";
|
|
3
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
4
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
5
|
+
import { GetBucketVersioningRequestFilterSensitiveLog, GetBucketVersioningResultFilterSensitiveLog, } from "../models/models_0";
|
|
6
|
+
import { deserializeAws_restXmlGetBucketVersioningCommand, serializeAws_restXmlGetBucketVersioningCommand, } from "../protocols/Aws_restXml";
|
|
7
|
+
var GetBucketVersioningCommand = (function (_super) {
|
|
8
|
+
__extends(GetBucketVersioningCommand, _super);
|
|
9
|
+
function GetBucketVersioningCommand(input) {
|
|
10
|
+
var _this = _super.call(this) || this;
|
|
11
|
+
_this.input = input;
|
|
12
|
+
return _this;
|
|
13
|
+
}
|
|
14
|
+
GetBucketVersioningCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
15
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
16
|
+
this.middlewareStack.use(getProcessArnablesPlugin(configuration));
|
|
17
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
18
|
+
var logger = configuration.logger;
|
|
19
|
+
var clientName = "S3ControlClient";
|
|
20
|
+
var commandName = "GetBucketVersioningCommand";
|
|
21
|
+
var handlerExecutionContext = {
|
|
22
|
+
logger: logger,
|
|
23
|
+
clientName: clientName,
|
|
24
|
+
commandName: commandName,
|
|
25
|
+
inputFilterSensitiveLog: GetBucketVersioningRequestFilterSensitiveLog,
|
|
26
|
+
outputFilterSensitiveLog: GetBucketVersioningResultFilterSensitiveLog,
|
|
27
|
+
};
|
|
28
|
+
var requestHandler = configuration.requestHandler;
|
|
29
|
+
return stack.resolve(function (request) {
|
|
30
|
+
return requestHandler.handle(request.request, options || {});
|
|
31
|
+
}, handlerExecutionContext);
|
|
32
|
+
};
|
|
33
|
+
GetBucketVersioningCommand.prototype.serialize = function (input, context) {
|
|
34
|
+
return serializeAws_restXmlGetBucketVersioningCommand(input, context);
|
|
35
|
+
};
|
|
36
|
+
GetBucketVersioningCommand.prototype.deserialize = function (output, context) {
|
|
37
|
+
return deserializeAws_restXmlGetBucketVersioningCommand(output, context);
|
|
38
|
+
};
|
|
39
|
+
return GetBucketVersioningCommand;
|
|
40
|
+
}($Command));
|
|
41
|
+
export { GetBucketVersioningCommand };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getApplyMd5BodyChecksumPlugin } from "@aws-sdk/middleware-apply-body-checksum";
|
|
3
|
+
import { getProcessArnablesPlugin } from "@aws-sdk/middleware-sdk-s3-control";
|
|
4
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
5
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
6
|
+
import { PutBucketVersioningRequestFilterSensitiveLog } from "../models/models_0";
|
|
7
|
+
import { deserializeAws_restXmlPutBucketVersioningCommand, serializeAws_restXmlPutBucketVersioningCommand, } from "../protocols/Aws_restXml";
|
|
8
|
+
var PutBucketVersioningCommand = (function (_super) {
|
|
9
|
+
__extends(PutBucketVersioningCommand, _super);
|
|
10
|
+
function PutBucketVersioningCommand(input) {
|
|
11
|
+
var _this = _super.call(this) || this;
|
|
12
|
+
_this.input = input;
|
|
13
|
+
return _this;
|
|
14
|
+
}
|
|
15
|
+
PutBucketVersioningCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
16
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
17
|
+
this.middlewareStack.use(getProcessArnablesPlugin(configuration));
|
|
18
|
+
this.middlewareStack.use(getApplyMd5BodyChecksumPlugin(configuration));
|
|
19
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
20
|
+
var logger = configuration.logger;
|
|
21
|
+
var clientName = "S3ControlClient";
|
|
22
|
+
var commandName = "PutBucketVersioningCommand";
|
|
23
|
+
var handlerExecutionContext = {
|
|
24
|
+
logger: logger,
|
|
25
|
+
clientName: clientName,
|
|
26
|
+
commandName: commandName,
|
|
27
|
+
inputFilterSensitiveLog: PutBucketVersioningRequestFilterSensitiveLog,
|
|
28
|
+
outputFilterSensitiveLog: function (output) { return output; },
|
|
29
|
+
};
|
|
30
|
+
var requestHandler = configuration.requestHandler;
|
|
31
|
+
return stack.resolve(function (request) {
|
|
32
|
+
return requestHandler.handle(request.request, options || {});
|
|
33
|
+
}, handlerExecutionContext);
|
|
34
|
+
};
|
|
35
|
+
PutBucketVersioningCommand.prototype.serialize = function (input, context) {
|
|
36
|
+
return serializeAws_restXmlPutBucketVersioningCommand(input, context);
|
|
37
|
+
};
|
|
38
|
+
PutBucketVersioningCommand.prototype.deserialize = function (output, context) {
|
|
39
|
+
return deserializeAws_restXmlPutBucketVersioningCommand(output, context);
|
|
40
|
+
};
|
|
41
|
+
return PutBucketVersioningCommand;
|
|
42
|
+
}($Command));
|
|
43
|
+
export { PutBucketVersioningCommand };
|
|
@@ -29,6 +29,7 @@ export * from "./GetBucketCommand";
|
|
|
29
29
|
export * from "./GetBucketLifecycleConfigurationCommand";
|
|
30
30
|
export * from "./GetBucketPolicyCommand";
|
|
31
31
|
export * from "./GetBucketTaggingCommand";
|
|
32
|
+
export * from "./GetBucketVersioningCommand";
|
|
32
33
|
export * from "./GetJobTaggingCommand";
|
|
33
34
|
export * from "./GetMultiRegionAccessPointCommand";
|
|
34
35
|
export * from "./GetMultiRegionAccessPointPolicyCommand";
|
|
@@ -48,6 +49,7 @@ export * from "./PutAccessPointPolicyForObjectLambdaCommand";
|
|
|
48
49
|
export * from "./PutBucketLifecycleConfigurationCommand";
|
|
49
50
|
export * from "./PutBucketPolicyCommand";
|
|
50
51
|
export * from "./PutBucketTaggingCommand";
|
|
52
|
+
export * from "./PutBucketVersioningCommand";
|
|
51
53
|
export * from "./PutJobTaggingCommand";
|
|
52
54
|
export * from "./PutMultiRegionAccessPointPolicyCommand";
|
|
53
55
|
export * from "./PutPublicAccessBlockCommand";
|
|
@@ -52,6 +52,27 @@ var BucketAlreadyOwnedByYou = (function (_super) {
|
|
|
52
52
|
return BucketAlreadyOwnedByYou;
|
|
53
53
|
}(__BaseException));
|
|
54
54
|
export { BucketAlreadyOwnedByYou };
|
|
55
|
+
export var BucketCannedACL;
|
|
56
|
+
(function (BucketCannedACL) {
|
|
57
|
+
BucketCannedACL["authenticated_read"] = "authenticated-read";
|
|
58
|
+
BucketCannedACL["private"] = "private";
|
|
59
|
+
BucketCannedACL["public_read"] = "public-read";
|
|
60
|
+
BucketCannedACL["public_read_write"] = "public-read-write";
|
|
61
|
+
})(BucketCannedACL || (BucketCannedACL = {}));
|
|
62
|
+
export var BucketLocationConstraint;
|
|
63
|
+
(function (BucketLocationConstraint) {
|
|
64
|
+
BucketLocationConstraint["EU"] = "EU";
|
|
65
|
+
BucketLocationConstraint["ap_northeast_1"] = "ap-northeast-1";
|
|
66
|
+
BucketLocationConstraint["ap_south_1"] = "ap-south-1";
|
|
67
|
+
BucketLocationConstraint["ap_southeast_1"] = "ap-southeast-1";
|
|
68
|
+
BucketLocationConstraint["ap_southeast_2"] = "ap-southeast-2";
|
|
69
|
+
BucketLocationConstraint["cn_north_1"] = "cn-north-1";
|
|
70
|
+
BucketLocationConstraint["eu_central_1"] = "eu-central-1";
|
|
71
|
+
BucketLocationConstraint["eu_west_1"] = "eu-west-1";
|
|
72
|
+
BucketLocationConstraint["sa_east_1"] = "sa-east-1";
|
|
73
|
+
BucketLocationConstraint["us_west_1"] = "us-west-1";
|
|
74
|
+
BucketLocationConstraint["us_west_2"] = "us-west-2";
|
|
75
|
+
})(BucketLocationConstraint || (BucketLocationConstraint = {}));
|
|
55
76
|
var BadRequestException = (function (_super) {
|
|
56
77
|
__extends(BadRequestException, _super);
|
|
57
78
|
function BadRequestException(opts) {
|
|
@@ -244,6 +265,29 @@ export var JobStatus;
|
|
|
244
265
|
JobStatus["Ready"] = "Ready";
|
|
245
266
|
JobStatus["Suspended"] = "Suspended";
|
|
246
267
|
})(JobStatus || (JobStatus = {}));
|
|
268
|
+
export var TransitionStorageClass;
|
|
269
|
+
(function (TransitionStorageClass) {
|
|
270
|
+
TransitionStorageClass["DEEP_ARCHIVE"] = "DEEP_ARCHIVE";
|
|
271
|
+
TransitionStorageClass["GLACIER"] = "GLACIER";
|
|
272
|
+
TransitionStorageClass["INTELLIGENT_TIERING"] = "INTELLIGENT_TIERING";
|
|
273
|
+
TransitionStorageClass["ONEZONE_IA"] = "ONEZONE_IA";
|
|
274
|
+
TransitionStorageClass["STANDARD_IA"] = "STANDARD_IA";
|
|
275
|
+
})(TransitionStorageClass || (TransitionStorageClass = {}));
|
|
276
|
+
export var ExpirationStatus;
|
|
277
|
+
(function (ExpirationStatus) {
|
|
278
|
+
ExpirationStatus["Disabled"] = "Disabled";
|
|
279
|
+
ExpirationStatus["Enabled"] = "Enabled";
|
|
280
|
+
})(ExpirationStatus || (ExpirationStatus = {}));
|
|
281
|
+
export var MFADeleteStatus;
|
|
282
|
+
(function (MFADeleteStatus) {
|
|
283
|
+
MFADeleteStatus["Disabled"] = "Disabled";
|
|
284
|
+
MFADeleteStatus["Enabled"] = "Enabled";
|
|
285
|
+
})(MFADeleteStatus || (MFADeleteStatus = {}));
|
|
286
|
+
export var BucketVersioningStatus;
|
|
287
|
+
(function (BucketVersioningStatus) {
|
|
288
|
+
BucketVersioningStatus["Enabled"] = "Enabled";
|
|
289
|
+
BucketVersioningStatus["Suspended"] = "Suspended";
|
|
290
|
+
})(BucketVersioningStatus || (BucketVersioningStatus = {}));
|
|
247
291
|
export var MultiRegionAccessPointStatus;
|
|
248
292
|
(function (MultiRegionAccessPointStatus) {
|
|
249
293
|
MultiRegionAccessPointStatus["CREATING"] = "CREATING";
|
|
@@ -266,6 +310,15 @@ var NoSuchPublicAccessBlockConfiguration = (function (_super) {
|
|
|
266
310
|
return NoSuchPublicAccessBlockConfiguration;
|
|
267
311
|
}(__BaseException));
|
|
268
312
|
export { NoSuchPublicAccessBlockConfiguration };
|
|
313
|
+
export var Format;
|
|
314
|
+
(function (Format) {
|
|
315
|
+
Format["CSV"] = "CSV";
|
|
316
|
+
Format["Parquet"] = "Parquet";
|
|
317
|
+
})(Format || (Format = {}));
|
|
318
|
+
export var OutputSchemaVersion;
|
|
319
|
+
(function (OutputSchemaVersion) {
|
|
320
|
+
OutputSchemaVersion["V_1"] = "V_1";
|
|
321
|
+
})(OutputSchemaVersion || (OutputSchemaVersion = {}));
|
|
269
322
|
var InvalidNextTokenException = (function (_super) {
|
|
270
323
|
__extends(InvalidNextTokenException, _super);
|
|
271
324
|
function InvalidNextTokenException(opts) {
|
|
@@ -304,6 +357,11 @@ export var OperationName;
|
|
|
304
357
|
OperationName["S3PutObjectTagging"] = "S3PutObjectTagging";
|
|
305
358
|
OperationName["S3ReplicateObject"] = "S3ReplicateObject";
|
|
306
359
|
})(OperationName || (OperationName = {}));
|
|
360
|
+
export var MFADelete;
|
|
361
|
+
(function (MFADelete) {
|
|
362
|
+
MFADelete["Disabled"] = "Disabled";
|
|
363
|
+
MFADelete["Enabled"] = "Enabled";
|
|
364
|
+
})(MFADelete || (MFADelete = {}));
|
|
307
365
|
var TooManyTagsException = (function (_super) {
|
|
308
366
|
__extends(TooManyTagsException, _super);
|
|
309
367
|
function TooManyTagsException(opts) {
|
|
@@ -473,6 +531,8 @@ export var GetBucketPolicyRequestFilterSensitiveLog = function (obj) { return (_
|
|
|
473
531
|
export var GetBucketPolicyResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
474
532
|
export var GetBucketTaggingRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
475
533
|
export var GetBucketTaggingResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
534
|
+
export var GetBucketVersioningRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
535
|
+
export var GetBucketVersioningResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
476
536
|
export var GetJobTaggingRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
477
537
|
export var GetJobTaggingResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
478
538
|
export var GetMultiRegionAccessPointRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -527,6 +587,8 @@ export var PutBucketLifecycleConfigurationRequestFilterSensitiveLog = function (
|
|
|
527
587
|
export var PutBucketPolicyRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
528
588
|
export var TaggingFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
529
589
|
export var PutBucketTaggingRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
590
|
+
export var VersioningConfigurationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
591
|
+
export var PutBucketVersioningRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
530
592
|
export var PutJobTaggingRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
531
593
|
export var PutJobTaggingResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
532
594
|
export var PutMultiRegionAccessPointPolicyRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -1281,6 +1281,43 @@ export var serializeAws_restXmlGetBucketTaggingCommand = function (input, contex
|
|
|
1281
1281
|
}
|
|
1282
1282
|
});
|
|
1283
1283
|
}); };
|
|
1284
|
+
export var serializeAws_restXmlGetBucketVersioningCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1285
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
|
|
1286
|
+
return __generator(this, function (_c) {
|
|
1287
|
+
switch (_c.label) {
|
|
1288
|
+
case 0: return [4, context.endpoint()];
|
|
1289
|
+
case 1:
|
|
1290
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1291
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
1292
|
+
"x-amz-account-id": input.AccountId,
|
|
1293
|
+
});
|
|
1294
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v20180820/bucket/{Bucket}/versioning";
|
|
1295
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", function () { return input.Bucket; }, "{Bucket}", false);
|
|
1296
|
+
return [4, context.endpoint()];
|
|
1297
|
+
case 2:
|
|
1298
|
+
resolvedHostname = (_c.sent()).hostname;
|
|
1299
|
+
if (context.disableHostPrefix !== true) {
|
|
1300
|
+
resolvedHostname = "{AccountId}." + resolvedHostname;
|
|
1301
|
+
if (input.AccountId === undefined) {
|
|
1302
|
+
throw new Error("Empty value provided for input host prefix: AccountId.");
|
|
1303
|
+
}
|
|
1304
|
+
resolvedHostname = resolvedHostname.replace("{AccountId}", input.AccountId);
|
|
1305
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
1306
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
return [2, new __HttpRequest({
|
|
1310
|
+
protocol: protocol,
|
|
1311
|
+
hostname: resolvedHostname,
|
|
1312
|
+
port: port,
|
|
1313
|
+
method: "GET",
|
|
1314
|
+
headers: headers,
|
|
1315
|
+
path: resolvedPath,
|
|
1316
|
+
body: body,
|
|
1317
|
+
})];
|
|
1318
|
+
}
|
|
1319
|
+
});
|
|
1320
|
+
}); };
|
|
1284
1321
|
export var serializeAws_restXmlGetJobTaggingCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1285
1322
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
|
|
1286
1323
|
return __generator(this, function (_c) {
|
|
@@ -2074,6 +2111,54 @@ export var serializeAws_restXmlPutBucketTaggingCommand = function (input, contex
|
|
|
2074
2111
|
}
|
|
2075
2112
|
});
|
|
2076
2113
|
}); };
|
|
2114
|
+
export var serializeAws_restXmlPutBucketVersioningCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2115
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, contents, resolvedHostname;
|
|
2116
|
+
return __generator(this, function (_c) {
|
|
2117
|
+
switch (_c.label) {
|
|
2118
|
+
case 0: return [4, context.endpoint()];
|
|
2119
|
+
case 1:
|
|
2120
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
2121
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
2122
|
+
"content-type": "application/xml",
|
|
2123
|
+
"x-amz-account-id": input.AccountId,
|
|
2124
|
+
"x-amz-mfa": input.MFA,
|
|
2125
|
+
});
|
|
2126
|
+
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/v20180820/bucket/{Bucket}/versioning";
|
|
2127
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Bucket", function () { return input.Bucket; }, "{Bucket}", false);
|
|
2128
|
+
if (input.VersioningConfiguration !== undefined) {
|
|
2129
|
+
body = serializeAws_restXmlVersioningConfiguration(input.VersioningConfiguration, context);
|
|
2130
|
+
}
|
|
2131
|
+
if (input.VersioningConfiguration !== undefined) {
|
|
2132
|
+
contents = serializeAws_restXmlVersioningConfiguration(input.VersioningConfiguration, context);
|
|
2133
|
+
body = '<?xml version="1.0" encoding="UTF-8"?>';
|
|
2134
|
+
contents.addAttribute("xmlns", "http://awss3control.amazonaws.com/doc/2018-08-20/");
|
|
2135
|
+
body += contents.toString();
|
|
2136
|
+
}
|
|
2137
|
+
return [4, context.endpoint()];
|
|
2138
|
+
case 2:
|
|
2139
|
+
resolvedHostname = (_c.sent()).hostname;
|
|
2140
|
+
if (context.disableHostPrefix !== true) {
|
|
2141
|
+
resolvedHostname = "{AccountId}." + resolvedHostname;
|
|
2142
|
+
if (input.AccountId === undefined) {
|
|
2143
|
+
throw new Error("Empty value provided for input host prefix: AccountId.");
|
|
2144
|
+
}
|
|
2145
|
+
resolvedHostname = resolvedHostname.replace("{AccountId}", input.AccountId);
|
|
2146
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
2147
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
return [2, new __HttpRequest({
|
|
2151
|
+
protocol: protocol,
|
|
2152
|
+
hostname: resolvedHostname,
|
|
2153
|
+
port: port,
|
|
2154
|
+
method: "PUT",
|
|
2155
|
+
headers: headers,
|
|
2156
|
+
path: resolvedPath,
|
|
2157
|
+
body: body,
|
|
2158
|
+
})];
|
|
2159
|
+
}
|
|
2160
|
+
});
|
|
2161
|
+
}); };
|
|
2077
2162
|
export var serializeAws_restXmlPutJobTaggingCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2078
2163
|
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, bodyNode, nodes, containerNode_2, resolvedHostname;
|
|
2079
2164
|
return __generator(this, function (_c) {
|
|
@@ -3901,6 +3986,55 @@ var deserializeAws_restXmlGetBucketTaggingCommandError = function (output, conte
|
|
|
3901
3986
|
}
|
|
3902
3987
|
});
|
|
3903
3988
|
}); };
|
|
3989
|
+
export var deserializeAws_restXmlGetBucketVersioningCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3990
|
+
var contents, data, _a, _b;
|
|
3991
|
+
return __generator(this, function (_c) {
|
|
3992
|
+
switch (_c.label) {
|
|
3993
|
+
case 0:
|
|
3994
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
3995
|
+
return [2, deserializeAws_restXmlGetBucketVersioningCommandError(output, context)];
|
|
3996
|
+
}
|
|
3997
|
+
contents = map({
|
|
3998
|
+
$metadata: deserializeMetadata(output),
|
|
3999
|
+
});
|
|
4000
|
+
_a = __expectNonNull;
|
|
4001
|
+
_b = __expectObject;
|
|
4002
|
+
return [4, parseBody(output.body, context)];
|
|
4003
|
+
case 1:
|
|
4004
|
+
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
4005
|
+
if (data["MfaDelete"] !== undefined) {
|
|
4006
|
+
contents.MFADelete = __expectString(data["MfaDelete"]);
|
|
4007
|
+
}
|
|
4008
|
+
if (data["Status"] !== undefined) {
|
|
4009
|
+
contents.Status = __expectString(data["Status"]);
|
|
4010
|
+
}
|
|
4011
|
+
return [2, contents];
|
|
4012
|
+
}
|
|
4013
|
+
});
|
|
4014
|
+
}); };
|
|
4015
|
+
var deserializeAws_restXmlGetBucketVersioningCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4016
|
+
var parsedOutput, _a, errorCode, parsedBody;
|
|
4017
|
+
var _b;
|
|
4018
|
+
return __generator(this, function (_c) {
|
|
4019
|
+
switch (_c.label) {
|
|
4020
|
+
case 0:
|
|
4021
|
+
_a = [__assign({}, output)];
|
|
4022
|
+
_b = {};
|
|
4023
|
+
return [4, parseBody(output.body, context)];
|
|
4024
|
+
case 1:
|
|
4025
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
4026
|
+
errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
|
|
4027
|
+
parsedBody = parsedOutput.body;
|
|
4028
|
+
throwDefaultError({
|
|
4029
|
+
output: output,
|
|
4030
|
+
parsedBody: parsedBody.Error,
|
|
4031
|
+
exceptionCtor: __BaseException,
|
|
4032
|
+
errorCode: errorCode,
|
|
4033
|
+
});
|
|
4034
|
+
return [2];
|
|
4035
|
+
}
|
|
4036
|
+
});
|
|
4037
|
+
}); };
|
|
3904
4038
|
export var deserializeAws_restXmlGetJobTaggingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
3905
4039
|
var contents, data, _a, _b;
|
|
3906
4040
|
return __generator(this, function (_c) {
|
|
@@ -4828,6 +4962,47 @@ var deserializeAws_restXmlPutBucketTaggingCommandError = function (output, conte
|
|
|
4828
4962
|
}
|
|
4829
4963
|
});
|
|
4830
4964
|
}); };
|
|
4965
|
+
export var deserializeAws_restXmlPutBucketVersioningCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4966
|
+
var contents;
|
|
4967
|
+
return __generator(this, function (_a) {
|
|
4968
|
+
switch (_a.label) {
|
|
4969
|
+
case 0:
|
|
4970
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
4971
|
+
return [2, deserializeAws_restXmlPutBucketVersioningCommandError(output, context)];
|
|
4972
|
+
}
|
|
4973
|
+
contents = map({
|
|
4974
|
+
$metadata: deserializeMetadata(output),
|
|
4975
|
+
});
|
|
4976
|
+
return [4, collectBody(output.body, context)];
|
|
4977
|
+
case 1:
|
|
4978
|
+
_a.sent();
|
|
4979
|
+
return [2, contents];
|
|
4980
|
+
}
|
|
4981
|
+
});
|
|
4982
|
+
}); };
|
|
4983
|
+
var deserializeAws_restXmlPutBucketVersioningCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4984
|
+
var parsedOutput, _a, errorCode, parsedBody;
|
|
4985
|
+
var _b;
|
|
4986
|
+
return __generator(this, function (_c) {
|
|
4987
|
+
switch (_c.label) {
|
|
4988
|
+
case 0:
|
|
4989
|
+
_a = [__assign({}, output)];
|
|
4990
|
+
_b = {};
|
|
4991
|
+
return [4, parseBody(output.body, context)];
|
|
4992
|
+
case 1:
|
|
4993
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
4994
|
+
errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
|
|
4995
|
+
parsedBody = parsedOutput.body;
|
|
4996
|
+
throwDefaultError({
|
|
4997
|
+
output: output,
|
|
4998
|
+
parsedBody: parsedBody.Error,
|
|
4999
|
+
exceptionCtor: __BaseException,
|
|
5000
|
+
errorCode: errorCode,
|
|
5001
|
+
});
|
|
5002
|
+
return [2];
|
|
5003
|
+
}
|
|
5004
|
+
});
|
|
5005
|
+
}); };
|
|
4831
5006
|
export var deserializeAws_restXmlPutJobTaggingCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
4832
5007
|
var contents;
|
|
4833
5008
|
return __generator(this, function (_a) {
|
|
@@ -6567,6 +6742,18 @@ var serializeAws_restXmlTransitionList = function (input, context) {
|
|
|
6567
6742
|
return node.withName("Transition");
|
|
6568
6743
|
});
|
|
6569
6744
|
};
|
|
6745
|
+
var serializeAws_restXmlVersioningConfiguration = function (input, context) {
|
|
6746
|
+
var bodyNode = new __XmlNode("VersioningConfiguration");
|
|
6747
|
+
if (input.MFADelete != null) {
|
|
6748
|
+
var node = __XmlNode.of("MFADelete", input.MFADelete).withName("MfaDelete");
|
|
6749
|
+
bodyNode.addChildNode(node);
|
|
6750
|
+
}
|
|
6751
|
+
if (input.Status != null) {
|
|
6752
|
+
var node = __XmlNode.of("BucketVersioningStatus", input.Status).withName("Status");
|
|
6753
|
+
bodyNode.addChildNode(node);
|
|
6754
|
+
}
|
|
6755
|
+
return bodyNode;
|
|
6756
|
+
};
|
|
6570
6757
|
var serializeAws_restXmlVpcConfiguration = function (input, context) {
|
|
6571
6758
|
var bodyNode = new __XmlNode("VpcConfiguration");
|
|
6572
6759
|
if (input.VpcId != null) {
|