@aws-sdk/client-s3 3.975.0 → 3.980.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/README.md +7 -0
- package/dist-cjs/index.js +203 -110
- package/dist-es/S3.js +23 -1
- package/dist-es/commands/UpdateObjectEncryptionCommand.js +28 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/errors.js +12 -0
- package/dist-es/schemas/schemas_0.js +42 -4
- package/dist-types/S3.d.ts +61 -1
- package/dist-types/S3Client.d.ts +3 -2
- package/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +2 -2
- package/dist-types/commands/PutObjectCommand.d.ts +25 -15
- package/dist-types/commands/UpdateObjectEncryptionCommand.d.ts +259 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/errors.d.ts +16 -15
- package/dist-types/models/models_0.d.ts +23 -23
- package/dist-types/models/models_1.d.ts +186 -3
- package/dist-types/schemas/schemas_0.d.ts +6 -0
- package/dist-types/ts3.4/S3.d.ts +88 -1
- package/dist-types/ts3.4/S3Client.d.ts +6 -0
- package/dist-types/ts3.4/commands/UpdateObjectEncryptionCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/errors.d.ts +5 -0
- package/dist-types/ts3.4/models/models_1.d.ts +34 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +6 -0
- package/package.json +26 -26
package/README.md
CHANGED
|
@@ -922,6 +922,13 @@ UpdateBucketMetadataJournalTableConfiguration
|
|
|
922
922
|
</details>
|
|
923
923
|
<details>
|
|
924
924
|
<summary>
|
|
925
|
+
UpdateObjectEncryption
|
|
926
|
+
</summary>
|
|
927
|
+
|
|
928
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/UpdateObjectEncryptionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UpdateObjectEncryptionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UpdateObjectEncryptionCommandOutput/)
|
|
929
|
+
</details>
|
|
930
|
+
<details>
|
|
931
|
+
<summary>
|
|
925
932
|
UploadPart
|
|
926
933
|
</summary>
|
|
927
934
|
|
package/dist-cjs/index.js
CHANGED
|
@@ -67,6 +67,18 @@ class NoSuchUpload extends S3ServiceException {
|
|
|
67
67
|
Object.setPrototypeOf(this, NoSuchUpload.prototype);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
+
class AccessDenied extends S3ServiceException {
|
|
71
|
+
name = "AccessDenied";
|
|
72
|
+
$fault = "client";
|
|
73
|
+
constructor(opts) {
|
|
74
|
+
super({
|
|
75
|
+
name: "AccessDenied",
|
|
76
|
+
$fault: "client",
|
|
77
|
+
...opts,
|
|
78
|
+
});
|
|
79
|
+
Object.setPrototypeOf(this, AccessDenied.prototype);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
70
82
|
class ObjectNotInActiveTierError extends S3ServiceException {
|
|
71
83
|
name = "ObjectNotInActiveTierError";
|
|
72
84
|
$fault = "client";
|
|
@@ -237,7 +249,8 @@ const _ACLn = "AnalyticsConfigurationList";
|
|
|
237
249
|
const _ACP = "AccessControlPolicy";
|
|
238
250
|
const _ACT = "AccessControlTranslation";
|
|
239
251
|
const _ACn = "AnalyticsConfiguration";
|
|
240
|
-
const _AD = "
|
|
252
|
+
const _AD = "AccessDenied";
|
|
253
|
+
const _ADb = "AbortDate";
|
|
241
254
|
const _AED = "AnalyticsExportDestination";
|
|
242
255
|
const _AF = "AnalyticsFilter";
|
|
243
256
|
const _AH = "AllowedHeaders";
|
|
@@ -654,6 +667,7 @@ const _KI = "KeyId";
|
|
|
654
667
|
const _KKA = "KmsKeyArn";
|
|
655
668
|
const _KM = "KeyMarker";
|
|
656
669
|
const _KMSC = "KMSContext";
|
|
670
|
+
const _KMSKA = "KMSKeyArn";
|
|
657
671
|
const _KMSKI = "KMSKeyId";
|
|
658
672
|
const _KMSMKID = "KMSMasterKeyID";
|
|
659
673
|
const _KPE = "KeyPrefixEquals";
|
|
@@ -752,6 +766,7 @@ const _NC = "NotificationConfiguration";
|
|
|
752
766
|
const _NCF = "NotificationConfigurationFilter";
|
|
753
767
|
const _NCT = "NextContinuationToken";
|
|
754
768
|
const _ND = "NoncurrentDays";
|
|
769
|
+
const _NEKKAS = "NonEmptyKmsKeyArnString";
|
|
755
770
|
const _NF = "NotFound";
|
|
756
771
|
const _NKM = "NextKeyMarker";
|
|
757
772
|
const _NM = "NextMarker";
|
|
@@ -772,6 +787,7 @@ const _OAIATE = "ObjectAlreadyInActiveTierError";
|
|
|
772
787
|
const _OC = "OwnershipControls";
|
|
773
788
|
const _OCR = "OwnershipControlsRule";
|
|
774
789
|
const _OCRw = "OwnershipControlsRules";
|
|
790
|
+
const _OE = "ObjectEncryption";
|
|
775
791
|
const _OF = "OptionalFields";
|
|
776
792
|
const _OI = "ObjectIdentifier";
|
|
777
793
|
const _OIL = "ObjectIdentifierList";
|
|
@@ -981,6 +997,7 @@ const _SSECA = "SSECustomerAlgorithm";
|
|
|
981
997
|
const _SSECK = "SSECustomerKey";
|
|
982
998
|
const _SSECKMD = "SSECustomerKeyMD5";
|
|
983
999
|
const _SSEKMS = "SSEKMS";
|
|
1000
|
+
const _SSEKMSE = "SSEKMSEncryption";
|
|
984
1001
|
const _SSEKMSEC = "SSEKMSEncryptionContext";
|
|
985
1002
|
const _SSEKMSKI = "SSEKMSKeyId";
|
|
986
1003
|
const _SSER = "ServerSideEncryptionRule";
|
|
@@ -1038,6 +1055,9 @@ const _UBMJTCR = "UpdateBucketMetadataJournalTableConfigurationRequest";
|
|
|
1038
1055
|
const _UI = "UploadId";
|
|
1039
1056
|
const _UIM = "UploadIdMarker";
|
|
1040
1057
|
const _UM = "UserMetadata";
|
|
1058
|
+
const _UOE = "UpdateObjectEncryption";
|
|
1059
|
+
const _UOER = "UpdateObjectEncryptionRequest";
|
|
1060
|
+
const _UOERp = "UpdateObjectEncryptionResponse";
|
|
1041
1061
|
const _UP = "UploadPart";
|
|
1042
1062
|
const _UPC = "UploadPartCopy";
|
|
1043
1063
|
const _UPCO = "UploadPartCopyOutput";
|
|
@@ -1235,6 +1255,7 @@ const _xawrl = "x-amz-website-redirect-location";
|
|
|
1235
1255
|
const _xs = "xsi:type";
|
|
1236
1256
|
const n0 = "com.amazonaws.s3";
|
|
1237
1257
|
var CopySourceSSECustomerKey = [0, n0, _CSSSECK, 8, 0];
|
|
1258
|
+
var NonEmptyKmsKeyArnString = [0, n0, _NEKKAS, 8, 0];
|
|
1238
1259
|
var SessionCredentialValue = [0, n0, _SCV, 8, 0];
|
|
1239
1260
|
var SSECustomerKey = [0, n0, _SSECK, 8, 0];
|
|
1240
1261
|
var SSEKMSEncryptionContext = [0, n0, _SSEKMSEC, 8, 0];
|
|
@@ -1275,6 +1296,12 @@ var AccessControlTranslation$ = [3, n0, _ACT,
|
|
|
1275
1296
|
[_O],
|
|
1276
1297
|
[0], 1
|
|
1277
1298
|
];
|
|
1299
|
+
var AccessDenied$ = [-3, n0, _AD,
|
|
1300
|
+
{ [_e]: _c, [_hE]: 403 },
|
|
1301
|
+
[],
|
|
1302
|
+
[]
|
|
1303
|
+
];
|
|
1304
|
+
schema.TypeRegistry.for(n0).registerError(AccessDenied$, AccessDenied);
|
|
1278
1305
|
var AnalyticsAndOperator$ = [3, n0, _AAO,
|
|
1279
1306
|
0,
|
|
1280
1307
|
[_P, _T],
|
|
@@ -1429,7 +1456,7 @@ var CreateBucketRequest$ = [3, n0, _CBR,
|
|
|
1429
1456
|
];
|
|
1430
1457
|
var CreateMultipartUploadOutput$ = [3, n0, _CMUOr,
|
|
1431
1458
|
{ [_xN]: _IMUR },
|
|
1432
|
-
[
|
|
1459
|
+
[_ADb, _ARI, _B, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT],
|
|
1433
1460
|
[[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], [0, { [_xN]: _B }], 0, 0, [0, { [_hH]: _xasse }], [0, { [_hH]: _xasseca }], [0, { [_hH]: _xasseckM }], [() => SSEKMSKeyId, { [_hH]: _xasseakki }], [() => SSEKMSEncryptionContext, { [_hH]: _xassec }], [2, { [_hH]: _xassebke }], [0, { [_hH]: _xarc }], [0, { [_hH]: _xaca }], [0, { [_hH]: _xact }]]
|
|
1434
1461
|
];
|
|
1435
1462
|
var CreateMultipartUploadRequest$ = [3, n0, _CMURr,
|
|
@@ -2269,7 +2296,7 @@ var ListObjectVersionsRequest$ = [3, n0, _LOVRi,
|
|
|
2269
2296
|
];
|
|
2270
2297
|
var ListPartsOutput$ = [3, n0, _LPO,
|
|
2271
2298
|
{ [_xN]: _LPR },
|
|
2272
|
-
[
|
|
2299
|
+
[_ADb, _ARI, _B, _K, _UI, _PNM, _NPNM, _MP, _IT, _Pa, _In, _O, _SC, _RC, _CA, _CT],
|
|
2273
2300
|
[[4, { [_hH]: _xaad }], [0, { [_hH]: _xaari }], 0, 0, 0, 0, 0, 1, 2, [() => Parts, { [_xF]: 1, [_xN]: _Par }], () => Initiator$, () => Owner$, 0, [0, { [_hH]: _xarc }], 0, 0]
|
|
2274
2301
|
];
|
|
2275
2302
|
var ListPartsRequest$ = [3, n0, _LPRi,
|
|
@@ -2843,6 +2870,11 @@ var SseKmsEncryptedObjects$ = [3, n0, _SKEO,
|
|
|
2843
2870
|
[_S],
|
|
2844
2871
|
[0], 1
|
|
2845
2872
|
];
|
|
2873
|
+
var SSEKMSEncryption$ = [3, n0, _SSEKMSE,
|
|
2874
|
+
{ [_xN]: _SK },
|
|
2875
|
+
[_KMSKA, _BKE],
|
|
2876
|
+
[[() => NonEmptyKmsKeyArnString, 0], 2], 1
|
|
2877
|
+
];
|
|
2846
2878
|
var SSES3$ = [3, n0, _SSES,
|
|
2847
2879
|
{ [_xN]: _SS },
|
|
2848
2880
|
[],
|
|
@@ -2919,6 +2951,16 @@ var UpdateBucketMetadataJournalTableConfigurationRequest$ = [3, n0, _UBMJTCR,
|
|
|
2919
2951
|
[_B, _JTC, _CMD, _CA, _EBO],
|
|
2920
2952
|
[[0, 1], [() => JournalTableConfigurationUpdates$, { [_hP]: 1, [_xN]: _JTC }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }], [0, { [_hH]: _xaebo }]], 2
|
|
2921
2953
|
];
|
|
2954
|
+
var UpdateObjectEncryptionRequest$ = [3, n0, _UOER,
|
|
2955
|
+
0,
|
|
2956
|
+
[_B, _K, _OE, _VI, _RP, _EBO, _CMD, _CA],
|
|
2957
|
+
[[0, 1], [0, 1], [() => ObjectEncryption$, 16], [0, { [_hQ]: _vI }], [0, { [_hH]: _xarp }], [0, { [_hH]: _xaebo }], [0, { [_hH]: _CM }], [0, { [_hH]: _xasca }]], 3
|
|
2958
|
+
];
|
|
2959
|
+
var UpdateObjectEncryptionResponse$ = [3, n0, _UOERp,
|
|
2960
|
+
0,
|
|
2961
|
+
[_RC],
|
|
2962
|
+
[[0, { [_hH]: _xarc }]]
|
|
2963
|
+
];
|
|
2922
2964
|
var UploadPartCopyOutput$ = [3, n0, _UPCO,
|
|
2923
2965
|
0,
|
|
2924
2966
|
[_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC],
|
|
@@ -3093,6 +3135,11 @@ var MetricsFilter$ = [4, n0, _MF,
|
|
|
3093
3135
|
[_P, _Ta, _APAc, _An],
|
|
3094
3136
|
[0, () => Tag$, 0, [() => MetricsAndOperator$, 0]]
|
|
3095
3137
|
];
|
|
3138
|
+
var ObjectEncryption$ = [4, n0, _OE,
|
|
3139
|
+
0,
|
|
3140
|
+
[_SSEKMS],
|
|
3141
|
+
[[() => SSEKMSEncryption$, { [_xN]: _SK }]]
|
|
3142
|
+
];
|
|
3096
3143
|
var SelectObjectContentEventStream$ = [4, n0, _SOCES,
|
|
3097
3144
|
{ [_s]: 1 },
|
|
3098
3145
|
[_Rec, _Sta, _Pr, _Cont, _End],
|
|
@@ -3407,6 +3454,9 @@ var UpdateBucketMetadataInventoryTableConfiguration$ = [9, n0, _UBMITC,
|
|
|
3407
3454
|
var UpdateBucketMetadataJournalTableConfiguration$ = [9, n0, _UBMJTC,
|
|
3408
3455
|
{ [_hC]: "-", [_h]: ["PUT", "/?metadataJournalTable", 200] }, () => UpdateBucketMetadataJournalTableConfigurationRequest$, () => __Unit
|
|
3409
3456
|
];
|
|
3457
|
+
var UpdateObjectEncryption$ = [9, n0, _UOE,
|
|
3458
|
+
{ [_hC]: "-", [_h]: ["PUT", "/{Key+}?encryption", 200] }, () => UpdateObjectEncryptionRequest$, () => UpdateObjectEncryptionResponse$
|
|
3459
|
+
];
|
|
3410
3460
|
var UploadPart$ = [9, n0, _UP,
|
|
3411
3461
|
{ [_hC]: "-", [_h]: ["PUT", "/{Key+}?x-id=UploadPart", 200] }, () => UploadPartRequest$, () => UploadPartOutput$
|
|
3412
3462
|
];
|
|
@@ -5488,6 +5538,28 @@ class UpdateBucketMetadataJournalTableConfigurationCommand extends smithyClient.
|
|
|
5488
5538
|
.build() {
|
|
5489
5539
|
}
|
|
5490
5540
|
|
|
5541
|
+
class UpdateObjectEncryptionCommand extends smithyClient.Command
|
|
5542
|
+
.classBuilder()
|
|
5543
|
+
.ep({
|
|
5544
|
+
...commonParams,
|
|
5545
|
+
Bucket: { type: "contextParams", name: "Bucket" },
|
|
5546
|
+
})
|
|
5547
|
+
.m(function (Command, cs, config, o) {
|
|
5548
|
+
return [
|
|
5549
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
5550
|
+
middlewareFlexibleChecksums.getFlexibleChecksumsPlugin(config, {
|
|
5551
|
+
requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },
|
|
5552
|
+
requestChecksumRequired: true,
|
|
5553
|
+
}),
|
|
5554
|
+
middlewareSdkS3.getThrow200ExceptionsPlugin(config),
|
|
5555
|
+
];
|
|
5556
|
+
})
|
|
5557
|
+
.s("AmazonS3", "UpdateObjectEncryption", {})
|
|
5558
|
+
.n("S3Client", "UpdateObjectEncryptionCommand")
|
|
5559
|
+
.sc(UpdateObjectEncryption$)
|
|
5560
|
+
.build() {
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5491
5563
|
class UploadPartCommand extends smithyClient.Command
|
|
5492
5564
|
.classBuilder()
|
|
5493
5565
|
.ep({
|
|
@@ -5547,6 +5619,112 @@ class WriteGetObjectResponseCommand extends smithyClient.Command
|
|
|
5547
5619
|
.build() {
|
|
5548
5620
|
}
|
|
5549
5621
|
|
|
5622
|
+
const paginateListBuckets = core.createPaginator(S3Client, ListBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxBuckets");
|
|
5623
|
+
|
|
5624
|
+
const paginateListDirectoryBuckets = core.createPaginator(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets");
|
|
5625
|
+
|
|
5626
|
+
const paginateListObjectsV2 = core.createPaginator(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys");
|
|
5627
|
+
|
|
5628
|
+
const paginateListParts = core.createPaginator(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts");
|
|
5629
|
+
|
|
5630
|
+
const checkState$3 = async (client, input) => {
|
|
5631
|
+
let reason;
|
|
5632
|
+
try {
|
|
5633
|
+
let result = await client.send(new HeadBucketCommand(input));
|
|
5634
|
+
reason = result;
|
|
5635
|
+
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
5636
|
+
}
|
|
5637
|
+
catch (exception) {
|
|
5638
|
+
reason = exception;
|
|
5639
|
+
if (exception.name && exception.name == "NotFound") {
|
|
5640
|
+
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5641
|
+
}
|
|
5642
|
+
}
|
|
5643
|
+
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5644
|
+
};
|
|
5645
|
+
const waitForBucketExists = async (params, input) => {
|
|
5646
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5647
|
+
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$3);
|
|
5648
|
+
};
|
|
5649
|
+
const waitUntilBucketExists = async (params, input) => {
|
|
5650
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5651
|
+
const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$3);
|
|
5652
|
+
return utilWaiter.checkExceptions(result);
|
|
5653
|
+
};
|
|
5654
|
+
|
|
5655
|
+
const checkState$2 = async (client, input) => {
|
|
5656
|
+
let reason;
|
|
5657
|
+
try {
|
|
5658
|
+
let result = await client.send(new HeadBucketCommand(input));
|
|
5659
|
+
reason = result;
|
|
5660
|
+
}
|
|
5661
|
+
catch (exception) {
|
|
5662
|
+
reason = exception;
|
|
5663
|
+
if (exception.name && exception.name == "NotFound") {
|
|
5664
|
+
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
5665
|
+
}
|
|
5666
|
+
}
|
|
5667
|
+
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5668
|
+
};
|
|
5669
|
+
const waitForBucketNotExists = async (params, input) => {
|
|
5670
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5671
|
+
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
|
|
5672
|
+
};
|
|
5673
|
+
const waitUntilBucketNotExists = async (params, input) => {
|
|
5674
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5675
|
+
const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
|
|
5676
|
+
return utilWaiter.checkExceptions(result);
|
|
5677
|
+
};
|
|
5678
|
+
|
|
5679
|
+
const checkState$1 = async (client, input) => {
|
|
5680
|
+
let reason;
|
|
5681
|
+
try {
|
|
5682
|
+
let result = await client.send(new HeadObjectCommand(input));
|
|
5683
|
+
reason = result;
|
|
5684
|
+
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
5685
|
+
}
|
|
5686
|
+
catch (exception) {
|
|
5687
|
+
reason = exception;
|
|
5688
|
+
if (exception.name && exception.name == "NotFound") {
|
|
5689
|
+
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5693
|
+
};
|
|
5694
|
+
const waitForObjectExists = async (params, input) => {
|
|
5695
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5696
|
+
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
|
|
5697
|
+
};
|
|
5698
|
+
const waitUntilObjectExists = async (params, input) => {
|
|
5699
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5700
|
+
const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
|
|
5701
|
+
return utilWaiter.checkExceptions(result);
|
|
5702
|
+
};
|
|
5703
|
+
|
|
5704
|
+
const checkState = async (client, input) => {
|
|
5705
|
+
let reason;
|
|
5706
|
+
try {
|
|
5707
|
+
let result = await client.send(new HeadObjectCommand(input));
|
|
5708
|
+
reason = result;
|
|
5709
|
+
}
|
|
5710
|
+
catch (exception) {
|
|
5711
|
+
reason = exception;
|
|
5712
|
+
if (exception.name && exception.name == "NotFound") {
|
|
5713
|
+
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
5714
|
+
}
|
|
5715
|
+
}
|
|
5716
|
+
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5717
|
+
};
|
|
5718
|
+
const waitForObjectNotExists = async (params, input) => {
|
|
5719
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5720
|
+
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
5721
|
+
};
|
|
5722
|
+
const waitUntilObjectNotExists = async (params, input) => {
|
|
5723
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5724
|
+
const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
5725
|
+
return utilWaiter.checkExceptions(result);
|
|
5726
|
+
};
|
|
5727
|
+
|
|
5550
5728
|
const commands = {
|
|
5551
5729
|
AbortMultipartUploadCommand,
|
|
5552
5730
|
CompleteMultipartUploadCommand,
|
|
@@ -5651,119 +5829,26 @@ const commands = {
|
|
|
5651
5829
|
SelectObjectContentCommand,
|
|
5652
5830
|
UpdateBucketMetadataInventoryTableConfigurationCommand,
|
|
5653
5831
|
UpdateBucketMetadataJournalTableConfigurationCommand,
|
|
5832
|
+
UpdateObjectEncryptionCommand,
|
|
5654
5833
|
UploadPartCommand,
|
|
5655
5834
|
UploadPartCopyCommand,
|
|
5656
5835
|
WriteGetObjectResponseCommand,
|
|
5657
5836
|
};
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
const paginateListDirectoryBuckets = core.createPaginator(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets");
|
|
5665
|
-
|
|
5666
|
-
const paginateListObjectsV2 = core.createPaginator(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys");
|
|
5667
|
-
|
|
5668
|
-
const paginateListParts = core.createPaginator(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts");
|
|
5669
|
-
|
|
5670
|
-
const checkState$3 = async (client, input) => {
|
|
5671
|
-
let reason;
|
|
5672
|
-
try {
|
|
5673
|
-
let result = await client.send(new HeadBucketCommand(input));
|
|
5674
|
-
reason = result;
|
|
5675
|
-
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
5676
|
-
}
|
|
5677
|
-
catch (exception) {
|
|
5678
|
-
reason = exception;
|
|
5679
|
-
if (exception.name && exception.name == "NotFound") {
|
|
5680
|
-
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5681
|
-
}
|
|
5682
|
-
}
|
|
5683
|
-
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5684
|
-
};
|
|
5685
|
-
const waitForBucketExists = async (params, input) => {
|
|
5686
|
-
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5687
|
-
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$3);
|
|
5837
|
+
const paginators = {
|
|
5838
|
+
paginateListBuckets,
|
|
5839
|
+
paginateListDirectoryBuckets,
|
|
5840
|
+
paginateListObjectsV2,
|
|
5841
|
+
paginateListParts,
|
|
5688
5842
|
};
|
|
5689
|
-
const
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
const checkState$2 = async (client, input) => {
|
|
5696
|
-
let reason;
|
|
5697
|
-
try {
|
|
5698
|
-
let result = await client.send(new HeadBucketCommand(input));
|
|
5699
|
-
reason = result;
|
|
5700
|
-
}
|
|
5701
|
-
catch (exception) {
|
|
5702
|
-
reason = exception;
|
|
5703
|
-
if (exception.name && exception.name == "NotFound") {
|
|
5704
|
-
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
5705
|
-
}
|
|
5706
|
-
}
|
|
5707
|
-
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5708
|
-
};
|
|
5709
|
-
const waitForBucketNotExists = async (params, input) => {
|
|
5710
|
-
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5711
|
-
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
|
|
5712
|
-
};
|
|
5713
|
-
const waitUntilBucketNotExists = async (params, input) => {
|
|
5714
|
-
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5715
|
-
const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$2);
|
|
5716
|
-
return utilWaiter.checkExceptions(result);
|
|
5717
|
-
};
|
|
5718
|
-
|
|
5719
|
-
const checkState$1 = async (client, input) => {
|
|
5720
|
-
let reason;
|
|
5721
|
-
try {
|
|
5722
|
-
let result = await client.send(new HeadObjectCommand(input));
|
|
5723
|
-
reason = result;
|
|
5724
|
-
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
5725
|
-
}
|
|
5726
|
-
catch (exception) {
|
|
5727
|
-
reason = exception;
|
|
5728
|
-
if (exception.name && exception.name == "NotFound") {
|
|
5729
|
-
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5730
|
-
}
|
|
5731
|
-
}
|
|
5732
|
-
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5733
|
-
};
|
|
5734
|
-
const waitForObjectExists = async (params, input) => {
|
|
5735
|
-
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5736
|
-
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
|
|
5737
|
-
};
|
|
5738
|
-
const waitUntilObjectExists = async (params, input) => {
|
|
5739
|
-
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5740
|
-
const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
|
|
5741
|
-
return utilWaiter.checkExceptions(result);
|
|
5742
|
-
};
|
|
5743
|
-
|
|
5744
|
-
const checkState = async (client, input) => {
|
|
5745
|
-
let reason;
|
|
5746
|
-
try {
|
|
5747
|
-
let result = await client.send(new HeadObjectCommand(input));
|
|
5748
|
-
reason = result;
|
|
5749
|
-
}
|
|
5750
|
-
catch (exception) {
|
|
5751
|
-
reason = exception;
|
|
5752
|
-
if (exception.name && exception.name == "NotFound") {
|
|
5753
|
-
return { state: utilWaiter.WaiterState.SUCCESS, reason };
|
|
5754
|
-
}
|
|
5755
|
-
}
|
|
5756
|
-
return { state: utilWaiter.WaiterState.RETRY, reason };
|
|
5757
|
-
};
|
|
5758
|
-
const waitForObjectNotExists = async (params, input) => {
|
|
5759
|
-
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5760
|
-
return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
5761
|
-
};
|
|
5762
|
-
const waitUntilObjectNotExists = async (params, input) => {
|
|
5763
|
-
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
5764
|
-
const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
5765
|
-
return utilWaiter.checkExceptions(result);
|
|
5843
|
+
const waiters = {
|
|
5844
|
+
waitUntilBucketExists,
|
|
5845
|
+
waitUntilBucketNotExists,
|
|
5846
|
+
waitUntilObjectExists,
|
|
5847
|
+
waitUntilObjectNotExists,
|
|
5766
5848
|
};
|
|
5849
|
+
class S3 extends S3Client {
|
|
5850
|
+
}
|
|
5851
|
+
smithyClient.createAggregatedClient(commands, S3, { paginators, waiters });
|
|
5767
5852
|
|
|
5768
5853
|
const BucketAbacStatus = {
|
|
5769
5854
|
Disabled: "Disabled",
|
|
@@ -6182,6 +6267,8 @@ exports.AbortMultipartUploadRequest$ = AbortMultipartUploadRequest$;
|
|
|
6182
6267
|
exports.AccelerateConfiguration$ = AccelerateConfiguration$;
|
|
6183
6268
|
exports.AccessControlPolicy$ = AccessControlPolicy$;
|
|
6184
6269
|
exports.AccessControlTranslation$ = AccessControlTranslation$;
|
|
6270
|
+
exports.AccessDenied = AccessDenied;
|
|
6271
|
+
exports.AccessDenied$ = AccessDenied$;
|
|
6185
6272
|
exports.AnalyticsAndOperator$ = AnalyticsAndOperator$;
|
|
6186
6273
|
exports.AnalyticsConfiguration$ = AnalyticsConfiguration$;
|
|
6187
6274
|
exports.AnalyticsExportDestination$ = AnalyticsExportDestination$;
|
|
@@ -6596,6 +6683,7 @@ exports.ObjectAlreadyInActiveTierError = ObjectAlreadyInActiveTierError;
|
|
|
6596
6683
|
exports.ObjectAlreadyInActiveTierError$ = ObjectAlreadyInActiveTierError$;
|
|
6597
6684
|
exports.ObjectAttributes = ObjectAttributes;
|
|
6598
6685
|
exports.ObjectCannedACL = ObjectCannedACL;
|
|
6686
|
+
exports.ObjectEncryption$ = ObjectEncryption$;
|
|
6599
6687
|
exports.ObjectIdentifier$ = ObjectIdentifier$;
|
|
6600
6688
|
exports.ObjectLockConfiguration$ = ObjectLockConfiguration$;
|
|
6601
6689
|
exports.ObjectLockEnabled = ObjectLockEnabled;
|
|
@@ -6758,6 +6846,7 @@ exports.S3TablesBucketType = S3TablesBucketType;
|
|
|
6758
6846
|
exports.S3TablesDestination$ = S3TablesDestination$;
|
|
6759
6847
|
exports.S3TablesDestinationResult$ = S3TablesDestinationResult$;
|
|
6760
6848
|
exports.SSEKMS$ = SSEKMS$;
|
|
6849
|
+
exports.SSEKMSEncryption$ = SSEKMSEncryption$;
|
|
6761
6850
|
exports.SSES3$ = SSES3$;
|
|
6762
6851
|
exports.ScanRange$ = ScanRange$;
|
|
6763
6852
|
exports.SelectObjectContent$ = SelectObjectContent$;
|
|
@@ -6803,6 +6892,10 @@ exports.UpdateBucketMetadataInventoryTableConfigurationRequest$ = UpdateBucketMe
|
|
|
6803
6892
|
exports.UpdateBucketMetadataJournalTableConfiguration$ = UpdateBucketMetadataJournalTableConfiguration$;
|
|
6804
6893
|
exports.UpdateBucketMetadataJournalTableConfigurationCommand = UpdateBucketMetadataJournalTableConfigurationCommand;
|
|
6805
6894
|
exports.UpdateBucketMetadataJournalTableConfigurationRequest$ = UpdateBucketMetadataJournalTableConfigurationRequest$;
|
|
6895
|
+
exports.UpdateObjectEncryption$ = UpdateObjectEncryption$;
|
|
6896
|
+
exports.UpdateObjectEncryptionCommand = UpdateObjectEncryptionCommand;
|
|
6897
|
+
exports.UpdateObjectEncryptionRequest$ = UpdateObjectEncryptionRequest$;
|
|
6898
|
+
exports.UpdateObjectEncryptionResponse$ = UpdateObjectEncryptionResponse$;
|
|
6806
6899
|
exports.UploadPart$ = UploadPart$;
|
|
6807
6900
|
exports.UploadPartCommand = UploadPartCommand;
|
|
6808
6901
|
exports.UploadPartCopy$ = UploadPartCopy$;
|
package/dist-es/S3.js
CHANGED
|
@@ -102,10 +102,19 @@ import { RestoreObjectCommand, } from "./commands/RestoreObjectCommand";
|
|
|
102
102
|
import { SelectObjectContentCommand, } from "./commands/SelectObjectContentCommand";
|
|
103
103
|
import { UpdateBucketMetadataInventoryTableConfigurationCommand, } from "./commands/UpdateBucketMetadataInventoryTableConfigurationCommand";
|
|
104
104
|
import { UpdateBucketMetadataJournalTableConfigurationCommand, } from "./commands/UpdateBucketMetadataJournalTableConfigurationCommand";
|
|
105
|
+
import { UpdateObjectEncryptionCommand, } from "./commands/UpdateObjectEncryptionCommand";
|
|
105
106
|
import { UploadPartCommand } from "./commands/UploadPartCommand";
|
|
106
107
|
import { UploadPartCopyCommand, } from "./commands/UploadPartCopyCommand";
|
|
107
108
|
import { WriteGetObjectResponseCommand, } from "./commands/WriteGetObjectResponseCommand";
|
|
109
|
+
import { paginateListBuckets } from "./pagination/ListBucketsPaginator";
|
|
110
|
+
import { paginateListDirectoryBuckets } from "./pagination/ListDirectoryBucketsPaginator";
|
|
111
|
+
import { paginateListObjectsV2 } from "./pagination/ListObjectsV2Paginator";
|
|
112
|
+
import { paginateListParts } from "./pagination/ListPartsPaginator";
|
|
108
113
|
import { S3Client } from "./S3Client";
|
|
114
|
+
import { waitUntilBucketExists } from "./waiters/waitForBucketExists";
|
|
115
|
+
import { waitUntilBucketNotExists } from "./waiters/waitForBucketNotExists";
|
|
116
|
+
import { waitUntilObjectExists } from "./waiters/waitForObjectExists";
|
|
117
|
+
import { waitUntilObjectNotExists } from "./waiters/waitForObjectNotExists";
|
|
109
118
|
const commands = {
|
|
110
119
|
AbortMultipartUploadCommand,
|
|
111
120
|
CompleteMultipartUploadCommand,
|
|
@@ -210,10 +219,23 @@ const commands = {
|
|
|
210
219
|
SelectObjectContentCommand,
|
|
211
220
|
UpdateBucketMetadataInventoryTableConfigurationCommand,
|
|
212
221
|
UpdateBucketMetadataJournalTableConfigurationCommand,
|
|
222
|
+
UpdateObjectEncryptionCommand,
|
|
213
223
|
UploadPartCommand,
|
|
214
224
|
UploadPartCopyCommand,
|
|
215
225
|
WriteGetObjectResponseCommand,
|
|
216
226
|
};
|
|
227
|
+
const paginators = {
|
|
228
|
+
paginateListBuckets,
|
|
229
|
+
paginateListDirectoryBuckets,
|
|
230
|
+
paginateListObjectsV2,
|
|
231
|
+
paginateListParts,
|
|
232
|
+
};
|
|
233
|
+
const waiters = {
|
|
234
|
+
waitUntilBucketExists,
|
|
235
|
+
waitUntilBucketNotExists,
|
|
236
|
+
waitUntilObjectExists,
|
|
237
|
+
waitUntilObjectNotExists,
|
|
238
|
+
};
|
|
217
239
|
export class S3 extends S3Client {
|
|
218
240
|
}
|
|
219
|
-
createAggregatedClient(commands, S3);
|
|
241
|
+
createAggregatedClient(commands, S3, { paginators, waiters });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getFlexibleChecksumsPlugin } from "@aws-sdk/middleware-flexible-checksums";
|
|
2
|
+
import { getThrow200ExceptionsPlugin } from "@aws-sdk/middleware-sdk-s3";
|
|
3
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
4
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
5
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
6
|
+
import { UpdateObjectEncryption$ } from "../schemas/schemas_0";
|
|
7
|
+
export { $Command };
|
|
8
|
+
export class UpdateObjectEncryptionCommand extends $Command
|
|
9
|
+
.classBuilder()
|
|
10
|
+
.ep({
|
|
11
|
+
...commonParams,
|
|
12
|
+
Bucket: { type: "contextParams", name: "Bucket" },
|
|
13
|
+
})
|
|
14
|
+
.m(function (Command, cs, config, o) {
|
|
15
|
+
return [
|
|
16
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
17
|
+
getFlexibleChecksumsPlugin(config, {
|
|
18
|
+
requestAlgorithmMember: { 'httpHeader': 'x-amz-sdk-checksum-algorithm', 'name': 'ChecksumAlgorithm' },
|
|
19
|
+
requestChecksumRequired: true,
|
|
20
|
+
}),
|
|
21
|
+
getThrow200ExceptionsPlugin(config),
|
|
22
|
+
];
|
|
23
|
+
})
|
|
24
|
+
.s("AmazonS3", "UpdateObjectEncryption", {})
|
|
25
|
+
.n("S3Client", "UpdateObjectEncryptionCommand")
|
|
26
|
+
.sc(UpdateObjectEncryption$)
|
|
27
|
+
.build() {
|
|
28
|
+
}
|
|
@@ -101,6 +101,7 @@ export * from "./RestoreObjectCommand";
|
|
|
101
101
|
export * from "./SelectObjectContentCommand";
|
|
102
102
|
export * from "./UpdateBucketMetadataInventoryTableConfigurationCommand";
|
|
103
103
|
export * from "./UpdateBucketMetadataJournalTableConfigurationCommand";
|
|
104
|
+
export * from "./UpdateObjectEncryptionCommand";
|
|
104
105
|
export * from "./UploadPartCommand";
|
|
105
106
|
export * from "./UploadPartCopyCommand";
|
|
106
107
|
export * from "./WriteGetObjectResponseCommand";
|
package/dist-es/models/errors.js
CHANGED
|
@@ -11,6 +11,18 @@ export class NoSuchUpload extends __BaseException {
|
|
|
11
11
|
Object.setPrototypeOf(this, NoSuchUpload.prototype);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
export class AccessDenied extends __BaseException {
|
|
15
|
+
name = "AccessDenied";
|
|
16
|
+
$fault = "client";
|
|
17
|
+
constructor(opts) {
|
|
18
|
+
super({
|
|
19
|
+
name: "AccessDenied",
|
|
20
|
+
$fault: "client",
|
|
21
|
+
...opts,
|
|
22
|
+
});
|
|
23
|
+
Object.setPrototypeOf(this, AccessDenied.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
14
26
|
export class ObjectNotInActiveTierError extends __BaseException {
|
|
15
27
|
name = "ObjectNotInActiveTierError";
|
|
16
28
|
$fault = "client";
|