UEA-Prodem
This commit is contained in:
+201
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
# @aws-sdk/checksums
|
||||
|
||||
[](https://www.npmjs.com/package/@aws-sdk/checksums)
|
||||
[](https://www.npmjs.com/package/@aws-sdk/checksums)
|
||||
|
||||
Checksum algorithms and flexible checksums middleware for the AWS SDK.
|
||||
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getCrc32ChecksumAlgorithmFunction = void 0;
|
||||
const crc32_1 = require("@aws-crypto/crc32");
|
||||
const getCrc32ChecksumAlgorithmFunction = () => crc32_1.AwsCrc32;
|
||||
exports.getCrc32ChecksumAlgorithmFunction = getCrc32ChecksumAlgorithmFunction;
|
||||
Generated
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getCrc32ChecksumAlgorithmFunction = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const crc32_1 = require("@aws-crypto/crc32");
|
||||
const util_1 = require("@aws-crypto/util");
|
||||
const zlib = tslib_1.__importStar(require("node:zlib"));
|
||||
class NodeCrc32 {
|
||||
checksum = 0;
|
||||
update(data) {
|
||||
this.checksum = zlib.crc32(data, this.checksum);
|
||||
}
|
||||
async digest() {
|
||||
return (0, util_1.numToUint8)(this.checksum);
|
||||
}
|
||||
reset() {
|
||||
this.checksum = 0;
|
||||
}
|
||||
}
|
||||
const getCrc32ChecksumAlgorithmFunction = () => {
|
||||
if (typeof zlib.crc32 === "undefined") {
|
||||
return crc32_1.AwsCrc32;
|
||||
}
|
||||
return NodeCrc32;
|
||||
};
|
||||
exports.getCrc32ChecksumAlgorithmFunction = getCrc32ChecksumAlgorithmFunction;
|
||||
+547
@@ -0,0 +1,547 @@
|
||||
'use strict';
|
||||
|
||||
var client = require('@aws-sdk/core/client');
|
||||
var protocols = require('@smithy/core/protocols');
|
||||
var serde = require('@smithy/core/serde');
|
||||
var crc32c = require('@aws-crypto/crc32c');
|
||||
var getCrc32ChecksumAlgorithmFunction = require('./flexible-checksums/getCrc32ChecksumAlgorithmFunction');
|
||||
var client$1 = require('@smithy/core/client');
|
||||
|
||||
const generateCRC64NVMETable = () => {
|
||||
const sliceLength = 8;
|
||||
const tables = new Array(sliceLength);
|
||||
for (let slice = 0; slice < sliceLength; slice++) {
|
||||
const table = new Array(512);
|
||||
for (let i = 0; i < 256; i++) {
|
||||
let crc = BigInt(i);
|
||||
for (let j = 0; j < 8 * (slice + 1); j++) {
|
||||
if (crc & 1n) {
|
||||
crc = (crc >> 1n) ^ 0x9a6c9329ac4bc9b5n;
|
||||
}
|
||||
else {
|
||||
crc = crc >> 1n;
|
||||
}
|
||||
}
|
||||
table[i * 2] = Number((crc >> 32n) & 0xffffffffn);
|
||||
table[i * 2 + 1] = Number(crc & 0xffffffffn);
|
||||
}
|
||||
tables[slice] = new Uint32Array(table);
|
||||
}
|
||||
return tables;
|
||||
};
|
||||
let CRC64_NVME_REVERSED_TABLE;
|
||||
let t0, t1, t2, t3;
|
||||
let t4, t5, t6, t7;
|
||||
const ensureTablesInitialized = () => {
|
||||
if (!CRC64_NVME_REVERSED_TABLE) {
|
||||
CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable();
|
||||
[t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE;
|
||||
}
|
||||
};
|
||||
class Crc64Nvme {
|
||||
c1 = 0;
|
||||
c2 = 0;
|
||||
constructor() {
|
||||
ensureTablesInitialized();
|
||||
this.reset();
|
||||
}
|
||||
update(data) {
|
||||
const len = data.length;
|
||||
let i = 0;
|
||||
let crc1 = this.c1;
|
||||
let crc2 = this.c2;
|
||||
while (i + 8 <= len) {
|
||||
const idx0 = ((crc2 ^ data[i++]) & 255) << 1;
|
||||
const idx1 = (((crc2 >>> 8) ^ data[i++]) & 255) << 1;
|
||||
const idx2 = (((crc2 >>> 16) ^ data[i++]) & 255) << 1;
|
||||
const idx3 = (((crc2 >>> 24) ^ data[i++]) & 255) << 1;
|
||||
const idx4 = ((crc1 ^ data[i++]) & 255) << 1;
|
||||
const idx5 = (((crc1 >>> 8) ^ data[i++]) & 255) << 1;
|
||||
const idx6 = (((crc1 >>> 16) ^ data[i++]) & 255) << 1;
|
||||
const idx7 = (((crc1 >>> 24) ^ data[i++]) & 255) << 1;
|
||||
crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7];
|
||||
crc2 =
|
||||
t7[idx0 + 1] ^
|
||||
t6[idx1 + 1] ^
|
||||
t5[idx2 + 1] ^
|
||||
t4[idx3 + 1] ^
|
||||
t3[idx4 + 1] ^
|
||||
t2[idx5 + 1] ^
|
||||
t1[idx6 + 1] ^
|
||||
t0[idx7 + 1];
|
||||
}
|
||||
while (i < len) {
|
||||
const idx = ((crc2 ^ data[i]) & 255) << 1;
|
||||
crc2 = ((crc2 >>> 8) | ((crc1 & 255) << 24)) >>> 0;
|
||||
crc1 = (crc1 >>> 8) ^ t0[idx];
|
||||
crc2 ^= t0[idx + 1];
|
||||
i++;
|
||||
}
|
||||
this.c1 = crc1;
|
||||
this.c2 = crc2;
|
||||
}
|
||||
async digest() {
|
||||
const c1 = this.c1 ^ 4294967295;
|
||||
const c2 = this.c2 ^ 4294967295;
|
||||
return new Uint8Array([
|
||||
c1 >>> 24,
|
||||
(c1 >>> 16) & 255,
|
||||
(c1 >>> 8) & 255,
|
||||
c1 & 255,
|
||||
c2 >>> 24,
|
||||
(c2 >>> 16) & 255,
|
||||
(c2 >>> 8) & 255,
|
||||
c2 & 255,
|
||||
]);
|
||||
}
|
||||
reset() {
|
||||
this.c1 = 4294967295;
|
||||
this.c2 = 4294967295;
|
||||
}
|
||||
}
|
||||
|
||||
const crc64NvmeCrtContainer = {
|
||||
CrtCrc64Nvme: null,
|
||||
};
|
||||
|
||||
const RequestChecksumCalculation = {
|
||||
WHEN_SUPPORTED: "WHEN_SUPPORTED",
|
||||
WHEN_REQUIRED: "WHEN_REQUIRED",
|
||||
};
|
||||
const DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED;
|
||||
const ResponseChecksumValidation = {
|
||||
WHEN_SUPPORTED: "WHEN_SUPPORTED",
|
||||
WHEN_REQUIRED: "WHEN_REQUIRED",
|
||||
};
|
||||
const DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED;
|
||||
exports.ChecksumAlgorithm = void 0;
|
||||
(function (ChecksumAlgorithm) {
|
||||
ChecksumAlgorithm["MD5"] = "MD5";
|
||||
ChecksumAlgorithm["CRC32"] = "CRC32";
|
||||
ChecksumAlgorithm["CRC32C"] = "CRC32C";
|
||||
ChecksumAlgorithm["CRC64NVME"] = "CRC64NVME";
|
||||
ChecksumAlgorithm["SHA1"] = "SHA1";
|
||||
ChecksumAlgorithm["SHA256"] = "SHA256";
|
||||
})(exports.ChecksumAlgorithm || (exports.ChecksumAlgorithm = {}));
|
||||
exports.ChecksumLocation = void 0;
|
||||
(function (ChecksumLocation) {
|
||||
ChecksumLocation["HEADER"] = "header";
|
||||
ChecksumLocation["TRAILER"] = "trailer";
|
||||
})(exports.ChecksumLocation || (exports.ChecksumLocation = {}));
|
||||
const DEFAULT_CHECKSUM_ALGORITHM = exports.ChecksumAlgorithm.CRC32;
|
||||
|
||||
var SelectorType;
|
||||
(function (SelectorType) {
|
||||
SelectorType["ENV"] = "env";
|
||||
SelectorType["CONFIG"] = "shared config entry";
|
||||
})(SelectorType || (SelectorType = {}));
|
||||
const stringUnionSelector = (obj, key, union, type) => {
|
||||
if (!(key in obj))
|
||||
return undefined;
|
||||
const value = obj[key].toUpperCase();
|
||||
if (!Object.values(union).includes(value)) {
|
||||
throw new TypeError(`Cannot load ${type} '${key}'. Expected one of ${Object.values(union)}, got '${obj[key]}'.`);
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
const ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION";
|
||||
const CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation";
|
||||
const NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = {
|
||||
environmentVariableSelector: (env) => stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV),
|
||||
configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.CONFIG),
|
||||
default: DEFAULT_REQUEST_CHECKSUM_CALCULATION,
|
||||
};
|
||||
|
||||
const ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION";
|
||||
const CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation";
|
||||
const NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = {
|
||||
environmentVariableSelector: (env) => stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.ENV),
|
||||
configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.CONFIG),
|
||||
default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION,
|
||||
};
|
||||
|
||||
const getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => {
|
||||
if (!requestAlgorithmMember) {
|
||||
return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired
|
||||
? DEFAULT_CHECKSUM_ALGORITHM
|
||||
: undefined;
|
||||
}
|
||||
if (!input[requestAlgorithmMember]) {
|
||||
return undefined;
|
||||
}
|
||||
const checksumAlgorithm = input[requestAlgorithmMember];
|
||||
return checksumAlgorithm;
|
||||
};
|
||||
|
||||
const getChecksumLocationName = (algorithm) => algorithm === exports.ChecksumAlgorithm.MD5 ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`;
|
||||
|
||||
const hasHeader = (header, headers) => {
|
||||
const soughtHeader = header.toLowerCase();
|
||||
for (const headerName of Object.keys(headers)) {
|
||||
if (soughtHeader === headerName.toLowerCase()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const hasHeaderWithPrefix = (headerPrefix, headers) => {
|
||||
const soughtHeaderPrefix = headerPrefix.toLowerCase();
|
||||
for (const headerName of Object.keys(headers)) {
|
||||
if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const isStreaming = (body) => body !== undefined && typeof body !== "string" && !ArrayBuffer.isView(body) && !serde.isArrayBuffer(body);
|
||||
|
||||
const CLIENT_SUPPORTED_ALGORITHMS = [
|
||||
exports.ChecksumAlgorithm.CRC32,
|
||||
exports.ChecksumAlgorithm.CRC32C,
|
||||
exports.ChecksumAlgorithm.CRC64NVME,
|
||||
exports.ChecksumAlgorithm.SHA1,
|
||||
exports.ChecksumAlgorithm.SHA256,
|
||||
];
|
||||
const PRIORITY_ORDER_ALGORITHMS = [
|
||||
exports.ChecksumAlgorithm.SHA256,
|
||||
exports.ChecksumAlgorithm.SHA1,
|
||||
exports.ChecksumAlgorithm.CRC32,
|
||||
exports.ChecksumAlgorithm.CRC32C,
|
||||
exports.ChecksumAlgorithm.CRC64NVME,
|
||||
];
|
||||
|
||||
const selectChecksumAlgorithmFunction = (checksumAlgorithm, config) => {
|
||||
const { checksumAlgorithms = {} } = config;
|
||||
switch (checksumAlgorithm) {
|
||||
case exports.ChecksumAlgorithm.MD5:
|
||||
return checksumAlgorithms?.MD5 ?? config.md5;
|
||||
case exports.ChecksumAlgorithm.CRC32:
|
||||
return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction.getCrc32ChecksumAlgorithmFunction();
|
||||
case exports.ChecksumAlgorithm.CRC32C:
|
||||
return checksumAlgorithms?.CRC32C ?? crc32c.AwsCrc32c;
|
||||
case exports.ChecksumAlgorithm.CRC64NVME:
|
||||
if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== "function") {
|
||||
return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme;
|
||||
}
|
||||
return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme;
|
||||
case exports.ChecksumAlgorithm.SHA1:
|
||||
return checksumAlgorithms?.SHA1 ?? config.sha1;
|
||||
case exports.ChecksumAlgorithm.SHA256:
|
||||
return checksumAlgorithms?.SHA256 ?? config.sha256;
|
||||
default:
|
||||
if (checksumAlgorithms?.[checksumAlgorithm]) {
|
||||
return checksumAlgorithms[checksumAlgorithm];
|
||||
}
|
||||
throw new Error(`The checksum algorithm "${checksumAlgorithm}" is not supported by the client.` +
|
||||
` Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to ` +
|
||||
` the client constructor checksums field.`);
|
||||
}
|
||||
};
|
||||
|
||||
const stringHasher = (checksumAlgorithmFn, body) => {
|
||||
const hash = new checksumAlgorithmFn();
|
||||
hash.update(serde.toUint8Array(body || ""));
|
||||
return hash.digest();
|
||||
};
|
||||
|
||||
const flexibleChecksumsMiddlewareOptions = {
|
||||
name: "flexibleChecksumsMiddleware",
|
||||
step: "build",
|
||||
tags: ["BODY_CHECKSUM"],
|
||||
override: true,
|
||||
};
|
||||
const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {
|
||||
if (!protocols.HttpRequest.isInstance(args.request)) {
|
||||
return next(args);
|
||||
}
|
||||
if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) {
|
||||
return next(args);
|
||||
}
|
||||
const { request, input } = args;
|
||||
const { body: requestBody, headers } = request;
|
||||
const { base64Encoder, streamHasher } = config;
|
||||
const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig;
|
||||
const requestChecksumCalculation = await config.requestChecksumCalculation();
|
||||
const requestAlgorithmMemberName = requestAlgorithmMember?.name;
|
||||
const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader;
|
||||
if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) {
|
||||
if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) {
|
||||
input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM;
|
||||
if (requestAlgorithmMemberHttpHeader) {
|
||||
headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM;
|
||||
}
|
||||
}
|
||||
}
|
||||
const checksumAlgorithm = getChecksumAlgorithmForRequest(input, {
|
||||
requestChecksumRequired,
|
||||
requestAlgorithmMember: requestAlgorithmMember?.name,
|
||||
requestChecksumCalculation,
|
||||
});
|
||||
let updatedBody = requestBody;
|
||||
let updatedHeaders = headers;
|
||||
if (checksumAlgorithm) {
|
||||
switch (checksumAlgorithm) {
|
||||
case exports.ChecksumAlgorithm.CRC32:
|
||||
client.setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U");
|
||||
break;
|
||||
case exports.ChecksumAlgorithm.CRC32C:
|
||||
client.setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V");
|
||||
break;
|
||||
case exports.ChecksumAlgorithm.CRC64NVME:
|
||||
client.setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W");
|
||||
break;
|
||||
case exports.ChecksumAlgorithm.SHA1:
|
||||
client.setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X");
|
||||
break;
|
||||
case exports.ChecksumAlgorithm.SHA256:
|
||||
client.setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y");
|
||||
break;
|
||||
}
|
||||
const checksumLocationName = getChecksumLocationName(checksumAlgorithm);
|
||||
const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config);
|
||||
if (isStreaming(requestBody)) {
|
||||
const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;
|
||||
updatedBody = getAwsChunkedEncodingStream(typeof config.requestStreamBufferSize === "number" && config.requestStreamBufferSize >= 8 * 1024
|
||||
? serde.createBufferedReadable(requestBody, config.requestStreamBufferSize, context.logger)
|
||||
: requestBody, {
|
||||
base64Encoder,
|
||||
bodyLengthChecker,
|
||||
checksumLocationName,
|
||||
checksumAlgorithmFn,
|
||||
streamHasher,
|
||||
});
|
||||
updatedHeaders = {
|
||||
...headers,
|
||||
"content-encoding": headers["content-encoding"]
|
||||
? `${headers["content-encoding"]},aws-chunked`
|
||||
: "aws-chunked",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-amz-decoded-content-length": headers["content-length"],
|
||||
"x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER",
|
||||
"x-amz-trailer": checksumLocationName,
|
||||
};
|
||||
delete updatedHeaders["content-length"];
|
||||
}
|
||||
else if (!hasHeader(checksumLocationName, headers)) {
|
||||
const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody);
|
||||
updatedHeaders = {
|
||||
...headers,
|
||||
[checksumLocationName]: base64Encoder(rawChecksum),
|
||||
};
|
||||
}
|
||||
}
|
||||
try {
|
||||
const result = await next({
|
||||
...args,
|
||||
request: {
|
||||
...request,
|
||||
headers: updatedHeaders,
|
||||
body: updatedBody,
|
||||
},
|
||||
});
|
||||
return result;
|
||||
}
|
||||
catch (e) {
|
||||
if (e instanceof Error && e.name === "InvalidChunkSizeError") {
|
||||
try {
|
||||
if (!e.message.endsWith(".")) {
|
||||
e.message += ".";
|
||||
}
|
||||
e.message +=
|
||||
" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.";
|
||||
}
|
||||
catch (ignored) {
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
|
||||
const flexibleChecksumsInputMiddlewareOptions = {
|
||||
name: "flexibleChecksumsInputMiddleware",
|
||||
toMiddleware: "serializerMiddleware",
|
||||
relation: "before",
|
||||
tags: ["BODY_CHECKSUM"],
|
||||
override: true,
|
||||
};
|
||||
const flexibleChecksumsInputMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {
|
||||
const input = args.input;
|
||||
const { requestValidationModeMember } = middlewareConfig;
|
||||
const requestChecksumCalculation = await config.requestChecksumCalculation();
|
||||
const responseChecksumValidation = await config.responseChecksumValidation();
|
||||
switch (requestChecksumCalculation) {
|
||||
case RequestChecksumCalculation.WHEN_REQUIRED:
|
||||
client.setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a");
|
||||
break;
|
||||
case RequestChecksumCalculation.WHEN_SUPPORTED:
|
||||
client.setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z");
|
||||
break;
|
||||
}
|
||||
switch (responseChecksumValidation) {
|
||||
case ResponseChecksumValidation.WHEN_REQUIRED:
|
||||
client.setFeature(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c");
|
||||
break;
|
||||
case ResponseChecksumValidation.WHEN_SUPPORTED:
|
||||
client.setFeature(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b");
|
||||
break;
|
||||
}
|
||||
if (requestValidationModeMember && !input[requestValidationModeMember]) {
|
||||
if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) {
|
||||
input[requestValidationModeMember] = "ENABLED";
|
||||
}
|
||||
}
|
||||
return next(args);
|
||||
};
|
||||
|
||||
const getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => {
|
||||
const validChecksumAlgorithms = [];
|
||||
let i = PRIORITY_ORDER_ALGORITHMS.length;
|
||||
for (const algorithm of responseAlgorithms) {
|
||||
const priority = PRIORITY_ORDER_ALGORITHMS.indexOf(algorithm);
|
||||
if (priority !== -1) {
|
||||
validChecksumAlgorithms[priority] = algorithm;
|
||||
}
|
||||
else {
|
||||
validChecksumAlgorithms[i++] = algorithm;
|
||||
}
|
||||
}
|
||||
return validChecksumAlgorithms.filter(Boolean);
|
||||
};
|
||||
|
||||
const isChecksumWithPartNumber = (checksum) => {
|
||||
const lastHyphenIndex = checksum.lastIndexOf("-");
|
||||
if (lastHyphenIndex !== -1) {
|
||||
const numberPart = checksum.slice(lastHyphenIndex + 1);
|
||||
if (!numberPart.startsWith("0")) {
|
||||
const number = parseInt(numberPart, 10);
|
||||
if (!isNaN(number) && number >= 1 && number <= 10000) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const getChecksum = async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body));
|
||||
|
||||
const validateChecksumFromResponse = async (response, { config, responseAlgorithms, logger }) => {
|
||||
const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms);
|
||||
const { body: responseBody, headers: responseHeaders } = response;
|
||||
for (const algorithm of checksumAlgorithms) {
|
||||
const responseHeader = getChecksumLocationName(algorithm);
|
||||
const checksumFromResponse = responseHeaders[responseHeader];
|
||||
if (checksumFromResponse) {
|
||||
let checksumAlgorithmFn;
|
||||
try {
|
||||
checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config);
|
||||
}
|
||||
catch (error) {
|
||||
if (algorithm === exports.ChecksumAlgorithm.CRC64NVME) {
|
||||
logger?.warn(`Skipping ${exports.ChecksumAlgorithm.CRC64NVME} checksum validation: ${error.message}`);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
const { base64Encoder } = config;
|
||||
if (isStreaming(responseBody)) {
|
||||
response.body = serde.createChecksumStream({
|
||||
expectedChecksum: checksumFromResponse,
|
||||
checksumSourceLocation: responseHeader,
|
||||
checksum: new checksumAlgorithmFn(),
|
||||
source: responseBody,
|
||||
base64Encoder,
|
||||
});
|
||||
return;
|
||||
}
|
||||
const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder });
|
||||
if (checksum === checksumFromResponse) {
|
||||
break;
|
||||
}
|
||||
throw new Error(`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}"` +
|
||||
` in response header "${responseHeader}".`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const flexibleChecksumsResponseMiddlewareOptions = {
|
||||
name: "flexibleChecksumsResponseMiddleware",
|
||||
toMiddleware: "deserializerMiddleware",
|
||||
relation: "after",
|
||||
tags: ["BODY_CHECKSUM"],
|
||||
override: true,
|
||||
};
|
||||
const flexibleChecksumsResponseMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {
|
||||
if (!protocols.HttpRequest.isInstance(args.request)) {
|
||||
return next(args);
|
||||
}
|
||||
const input = args.input;
|
||||
const result = await next(args);
|
||||
const response = result.response;
|
||||
const { requestValidationModeMember, responseAlgorithms } = middlewareConfig;
|
||||
if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") {
|
||||
const { clientName, commandName } = context;
|
||||
const customChecksumAlgorithms = Object.keys(config.checksumAlgorithms ?? {}).filter((algorithm) => {
|
||||
const responseHeader = getChecksumLocationName(algorithm);
|
||||
return response.headers[responseHeader] !== undefined;
|
||||
});
|
||||
const algoList = getChecksumAlgorithmListForResponse([
|
||||
...(responseAlgorithms ?? []),
|
||||
...customChecksumAlgorithms,
|
||||
]);
|
||||
const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" &&
|
||||
commandName === "GetObjectCommand" &&
|
||||
algoList.every((algorithm) => {
|
||||
const responseHeader = getChecksumLocationName(algorithm);
|
||||
const checksumFromResponse = response.headers[responseHeader];
|
||||
return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse);
|
||||
});
|
||||
if (isS3WholeObjectMultipartGetResponseChecksum) {
|
||||
return result;
|
||||
}
|
||||
await validateChecksumFromResponse(response, {
|
||||
config,
|
||||
responseAlgorithms: algoList,
|
||||
logger: context.logger,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
const getFlexibleChecksumsPlugin = (config, middlewareConfig) => ({
|
||||
applyToStack: (clientStack) => {
|
||||
clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions);
|
||||
clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config, middlewareConfig), flexibleChecksumsInputMiddlewareOptions);
|
||||
clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions);
|
||||
},
|
||||
});
|
||||
|
||||
const resolveFlexibleChecksumsConfig = (input) => {
|
||||
const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input;
|
||||
return Object.assign(input, {
|
||||
requestChecksumCalculation: client$1.normalizeProvider(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION),
|
||||
responseChecksumValidation: client$1.normalizeProvider(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION),
|
||||
requestStreamBufferSize: Number(requestStreamBufferSize ?? 0),
|
||||
checksumAlgorithms: input.checksumAlgorithms ?? {},
|
||||
});
|
||||
};
|
||||
|
||||
exports.CONFIG_REQUEST_CHECKSUM_CALCULATION = CONFIG_REQUEST_CHECKSUM_CALCULATION;
|
||||
exports.CONFIG_RESPONSE_CHECKSUM_VALIDATION = CONFIG_RESPONSE_CHECKSUM_VALIDATION;
|
||||
exports.Crc64Nvme = Crc64Nvme;
|
||||
exports.DEFAULT_CHECKSUM_ALGORITHM = DEFAULT_CHECKSUM_ALGORITHM;
|
||||
exports.DEFAULT_REQUEST_CHECKSUM_CALCULATION = DEFAULT_REQUEST_CHECKSUM_CALCULATION;
|
||||
exports.DEFAULT_RESPONSE_CHECKSUM_VALIDATION = DEFAULT_RESPONSE_CHECKSUM_VALIDATION;
|
||||
exports.ENV_REQUEST_CHECKSUM_CALCULATION = ENV_REQUEST_CHECKSUM_CALCULATION;
|
||||
exports.ENV_RESPONSE_CHECKSUM_VALIDATION = ENV_RESPONSE_CHECKSUM_VALIDATION;
|
||||
exports.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS;
|
||||
exports.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS;
|
||||
exports.RequestChecksumCalculation = RequestChecksumCalculation;
|
||||
exports.ResponseChecksumValidation = ResponseChecksumValidation;
|
||||
exports.crc64NvmeCrtContainer = crc64NvmeCrtContainer;
|
||||
exports.flexibleChecksumsMiddleware = flexibleChecksumsMiddleware;
|
||||
exports.flexibleChecksumsMiddlewareOptions = flexibleChecksumsMiddlewareOptions;
|
||||
exports.getFlexibleChecksumsPlugin = getFlexibleChecksumsPlugin;
|
||||
exports.resolveFlexibleChecksumsConfig = resolveFlexibleChecksumsConfig;
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
const generateCRC64NVMETable = () => {
|
||||
const sliceLength = 8;
|
||||
const tables = new Array(sliceLength);
|
||||
for (let slice = 0; slice < sliceLength; slice++) {
|
||||
const table = new Array(512);
|
||||
for (let i = 0; i < 256; i++) {
|
||||
let crc = BigInt(i);
|
||||
for (let j = 0; j < 8 * (slice + 1); j++) {
|
||||
if (crc & 1n) {
|
||||
crc = (crc >> 1n) ^ 0x9a6c9329ac4bc9b5n;
|
||||
}
|
||||
else {
|
||||
crc = crc >> 1n;
|
||||
}
|
||||
}
|
||||
table[i * 2] = Number((crc >> 32n) & 0xffffffffn);
|
||||
table[i * 2 + 1] = Number(crc & 0xffffffffn);
|
||||
}
|
||||
tables[slice] = new Uint32Array(table);
|
||||
}
|
||||
return tables;
|
||||
};
|
||||
let CRC64_NVME_REVERSED_TABLE;
|
||||
let t0, t1, t2, t3;
|
||||
let t4, t5, t6, t7;
|
||||
const ensureTablesInitialized = () => {
|
||||
if (!CRC64_NVME_REVERSED_TABLE) {
|
||||
CRC64_NVME_REVERSED_TABLE = generateCRC64NVMETable();
|
||||
[t0, t1, t2, t3, t4, t5, t6, t7] = CRC64_NVME_REVERSED_TABLE;
|
||||
}
|
||||
};
|
||||
export class Crc64Nvme {
|
||||
c1 = 0;
|
||||
c2 = 0;
|
||||
constructor() {
|
||||
ensureTablesInitialized();
|
||||
this.reset();
|
||||
}
|
||||
update(data) {
|
||||
const len = data.length;
|
||||
let i = 0;
|
||||
let crc1 = this.c1;
|
||||
let crc2 = this.c2;
|
||||
while (i + 8 <= len) {
|
||||
const idx0 = ((crc2 ^ data[i++]) & 255) << 1;
|
||||
const idx1 = (((crc2 >>> 8) ^ data[i++]) & 255) << 1;
|
||||
const idx2 = (((crc2 >>> 16) ^ data[i++]) & 255) << 1;
|
||||
const idx3 = (((crc2 >>> 24) ^ data[i++]) & 255) << 1;
|
||||
const idx4 = ((crc1 ^ data[i++]) & 255) << 1;
|
||||
const idx5 = (((crc1 >>> 8) ^ data[i++]) & 255) << 1;
|
||||
const idx6 = (((crc1 >>> 16) ^ data[i++]) & 255) << 1;
|
||||
const idx7 = (((crc1 >>> 24) ^ data[i++]) & 255) << 1;
|
||||
crc1 = t7[idx0] ^ t6[idx1] ^ t5[idx2] ^ t4[idx3] ^ t3[idx4] ^ t2[idx5] ^ t1[idx6] ^ t0[idx7];
|
||||
crc2 =
|
||||
t7[idx0 + 1] ^
|
||||
t6[idx1 + 1] ^
|
||||
t5[idx2 + 1] ^
|
||||
t4[idx3 + 1] ^
|
||||
t3[idx4 + 1] ^
|
||||
t2[idx5 + 1] ^
|
||||
t1[idx6 + 1] ^
|
||||
t0[idx7 + 1];
|
||||
}
|
||||
while (i < len) {
|
||||
const idx = ((crc2 ^ data[i]) & 255) << 1;
|
||||
crc2 = ((crc2 >>> 8) | ((crc1 & 255) << 24)) >>> 0;
|
||||
crc1 = (crc1 >>> 8) ^ t0[idx];
|
||||
crc2 ^= t0[idx + 1];
|
||||
i++;
|
||||
}
|
||||
this.c1 = crc1;
|
||||
this.c2 = crc2;
|
||||
}
|
||||
async digest() {
|
||||
const c1 = this.c1 ^ 4294967295;
|
||||
const c2 = this.c2 ^ 4294967295;
|
||||
return new Uint8Array([
|
||||
c1 >>> 24,
|
||||
(c1 >>> 16) & 255,
|
||||
(c1 >>> 8) & 255,
|
||||
c1 & 255,
|
||||
c2 >>> 24,
|
||||
(c2 >>> 16) & 255,
|
||||
(c2 >>> 8) & 255,
|
||||
c2 & 255,
|
||||
]);
|
||||
}
|
||||
reset() {
|
||||
this.c1 = 4294967295;
|
||||
this.c2 = 4294967295;
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
export const crc64NvmeCrtContainer = {
|
||||
CrtCrc64Nvme: null,
|
||||
};
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
import { DEFAULT_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation } from "./constants";
|
||||
import { SelectorType, stringUnionSelector } from "./stringUnionSelector";
|
||||
export const ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION";
|
||||
export const CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation";
|
||||
export const NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = {
|
||||
environmentVariableSelector: (env) => stringUnionSelector(env, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV),
|
||||
configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.CONFIG),
|
||||
default: DEFAULT_REQUEST_CHECKSUM_CALCULATION,
|
||||
};
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
import { DEFAULT_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation } from "./constants";
|
||||
import { SelectorType, stringUnionSelector } from "./stringUnionSelector";
|
||||
export const ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION";
|
||||
export const CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation";
|
||||
export const NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = {
|
||||
environmentVariableSelector: (env) => stringUnionSelector(env, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.ENV),
|
||||
configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.CONFIG),
|
||||
default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION,
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
export const RequestChecksumCalculation = {
|
||||
WHEN_SUPPORTED: "WHEN_SUPPORTED",
|
||||
WHEN_REQUIRED: "WHEN_REQUIRED",
|
||||
};
|
||||
export const DEFAULT_REQUEST_CHECKSUM_CALCULATION = RequestChecksumCalculation.WHEN_SUPPORTED;
|
||||
export const ResponseChecksumValidation = {
|
||||
WHEN_SUPPORTED: "WHEN_SUPPORTED",
|
||||
WHEN_REQUIRED: "WHEN_REQUIRED",
|
||||
};
|
||||
export const DEFAULT_RESPONSE_CHECKSUM_VALIDATION = RequestChecksumCalculation.WHEN_SUPPORTED;
|
||||
export var ChecksumAlgorithm;
|
||||
(function (ChecksumAlgorithm) {
|
||||
ChecksumAlgorithm["MD5"] = "MD5";
|
||||
ChecksumAlgorithm["CRC32"] = "CRC32";
|
||||
ChecksumAlgorithm["CRC32C"] = "CRC32C";
|
||||
ChecksumAlgorithm["CRC64NVME"] = "CRC64NVME";
|
||||
ChecksumAlgorithm["SHA1"] = "SHA1";
|
||||
ChecksumAlgorithm["SHA256"] = "SHA256";
|
||||
})(ChecksumAlgorithm || (ChecksumAlgorithm = {}));
|
||||
export var ChecksumLocation;
|
||||
(function (ChecksumLocation) {
|
||||
ChecksumLocation["HEADER"] = "header";
|
||||
ChecksumLocation["TRAILER"] = "trailer";
|
||||
})(ChecksumLocation || (ChecksumLocation = {}));
|
||||
export const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32;
|
||||
Generated
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
import { setFeature } from "@aws-sdk/core/client";
|
||||
import { RequestChecksumCalculation, ResponseChecksumValidation } from "./constants";
|
||||
export const flexibleChecksumsInputMiddlewareOptions = {
|
||||
name: "flexibleChecksumsInputMiddleware",
|
||||
toMiddleware: "serializerMiddleware",
|
||||
relation: "before",
|
||||
tags: ["BODY_CHECKSUM"],
|
||||
override: true,
|
||||
};
|
||||
export const flexibleChecksumsInputMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {
|
||||
const input = args.input;
|
||||
const { requestValidationModeMember } = middlewareConfig;
|
||||
const requestChecksumCalculation = await config.requestChecksumCalculation();
|
||||
const responseChecksumValidation = await config.responseChecksumValidation();
|
||||
switch (requestChecksumCalculation) {
|
||||
case RequestChecksumCalculation.WHEN_REQUIRED:
|
||||
setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED", "a");
|
||||
break;
|
||||
case RequestChecksumCalculation.WHEN_SUPPORTED:
|
||||
setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED", "Z");
|
||||
break;
|
||||
}
|
||||
switch (responseChecksumValidation) {
|
||||
case ResponseChecksumValidation.WHEN_REQUIRED:
|
||||
setFeature(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED", "c");
|
||||
break;
|
||||
case ResponseChecksumValidation.WHEN_SUPPORTED:
|
||||
setFeature(context, "FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED", "b");
|
||||
break;
|
||||
}
|
||||
if (requestValidationModeMember && !input[requestValidationModeMember]) {
|
||||
if (responseChecksumValidation === ResponseChecksumValidation.WHEN_SUPPORTED) {
|
||||
input[requestValidationModeMember] = "ENABLED";
|
||||
}
|
||||
}
|
||||
return next(args);
|
||||
};
|
||||
Generated
Vendored
+123
@@ -0,0 +1,123 @@
|
||||
import { setFeature } from "@aws-sdk/core/client";
|
||||
import { HttpRequest } from "@smithy/core/protocols";
|
||||
import { createBufferedReadable } from "@smithy/core/serde";
|
||||
import { ChecksumAlgorithm, DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from "./constants";
|
||||
import { getChecksumAlgorithmForRequest } from "./getChecksumAlgorithmForRequest";
|
||||
import { getChecksumLocationName } from "./getChecksumLocationName";
|
||||
import { hasHeader } from "./hasHeader";
|
||||
import { hasHeaderWithPrefix } from "./hasHeaderWithPrefix";
|
||||
import { isStreaming } from "./isStreaming";
|
||||
import { selectChecksumAlgorithmFunction } from "./selectChecksumAlgorithmFunction";
|
||||
import { stringHasher } from "./stringHasher";
|
||||
export const flexibleChecksumsMiddlewareOptions = {
|
||||
name: "flexibleChecksumsMiddleware",
|
||||
step: "build",
|
||||
tags: ["BODY_CHECKSUM"],
|
||||
override: true,
|
||||
};
|
||||
export const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {
|
||||
if (!HttpRequest.isInstance(args.request)) {
|
||||
return next(args);
|
||||
}
|
||||
if (hasHeaderWithPrefix("x-amz-checksum-", args.request.headers)) {
|
||||
return next(args);
|
||||
}
|
||||
const { request, input } = args;
|
||||
const { body: requestBody, headers } = request;
|
||||
const { base64Encoder, streamHasher } = config;
|
||||
const { requestChecksumRequired, requestAlgorithmMember } = middlewareConfig;
|
||||
const requestChecksumCalculation = await config.requestChecksumCalculation();
|
||||
const requestAlgorithmMemberName = requestAlgorithmMember?.name;
|
||||
const requestAlgorithmMemberHttpHeader = requestAlgorithmMember?.httpHeader;
|
||||
if (requestAlgorithmMemberName && !input[requestAlgorithmMemberName]) {
|
||||
if (requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired) {
|
||||
input[requestAlgorithmMemberName] = DEFAULT_CHECKSUM_ALGORITHM;
|
||||
if (requestAlgorithmMemberHttpHeader) {
|
||||
headers[requestAlgorithmMemberHttpHeader] = DEFAULT_CHECKSUM_ALGORITHM;
|
||||
}
|
||||
}
|
||||
}
|
||||
const checksumAlgorithm = getChecksumAlgorithmForRequest(input, {
|
||||
requestChecksumRequired,
|
||||
requestAlgorithmMember: requestAlgorithmMember?.name,
|
||||
requestChecksumCalculation,
|
||||
});
|
||||
let updatedBody = requestBody;
|
||||
let updatedHeaders = headers;
|
||||
if (checksumAlgorithm) {
|
||||
switch (checksumAlgorithm) {
|
||||
case ChecksumAlgorithm.CRC32:
|
||||
setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32", "U");
|
||||
break;
|
||||
case ChecksumAlgorithm.CRC32C:
|
||||
setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_CRC32C", "V");
|
||||
break;
|
||||
case ChecksumAlgorithm.CRC64NVME:
|
||||
setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_CRC64", "W");
|
||||
break;
|
||||
case ChecksumAlgorithm.SHA1:
|
||||
setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_SHA1", "X");
|
||||
break;
|
||||
case ChecksumAlgorithm.SHA256:
|
||||
setFeature(context, "FLEXIBLE_CHECKSUMS_REQ_SHA256", "Y");
|
||||
break;
|
||||
}
|
||||
const checksumLocationName = getChecksumLocationName(checksumAlgorithm);
|
||||
const checksumAlgorithmFn = selectChecksumAlgorithmFunction(checksumAlgorithm, config);
|
||||
if (isStreaming(requestBody)) {
|
||||
const { getAwsChunkedEncodingStream, bodyLengthChecker } = config;
|
||||
updatedBody = getAwsChunkedEncodingStream(typeof config.requestStreamBufferSize === "number" && config.requestStreamBufferSize >= 8 * 1024
|
||||
? createBufferedReadable(requestBody, config.requestStreamBufferSize, context.logger)
|
||||
: requestBody, {
|
||||
base64Encoder,
|
||||
bodyLengthChecker,
|
||||
checksumLocationName,
|
||||
checksumAlgorithmFn,
|
||||
streamHasher,
|
||||
});
|
||||
updatedHeaders = {
|
||||
...headers,
|
||||
"content-encoding": headers["content-encoding"]
|
||||
? `${headers["content-encoding"]},aws-chunked`
|
||||
: "aws-chunked",
|
||||
"transfer-encoding": "chunked",
|
||||
"x-amz-decoded-content-length": headers["content-length"],
|
||||
"x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER",
|
||||
"x-amz-trailer": checksumLocationName,
|
||||
};
|
||||
delete updatedHeaders["content-length"];
|
||||
}
|
||||
else if (!hasHeader(checksumLocationName, headers)) {
|
||||
const rawChecksum = await stringHasher(checksumAlgorithmFn, requestBody);
|
||||
updatedHeaders = {
|
||||
...headers,
|
||||
[checksumLocationName]: base64Encoder(rawChecksum),
|
||||
};
|
||||
}
|
||||
}
|
||||
try {
|
||||
const result = await next({
|
||||
...args,
|
||||
request: {
|
||||
...request,
|
||||
headers: updatedHeaders,
|
||||
body: updatedBody,
|
||||
},
|
||||
});
|
||||
return result;
|
||||
}
|
||||
catch (e) {
|
||||
if (e instanceof Error && e.name === "InvalidChunkSizeError") {
|
||||
try {
|
||||
if (!e.message.endsWith(".")) {
|
||||
e.message += ".";
|
||||
}
|
||||
e.message +=
|
||||
" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream.";
|
||||
}
|
||||
catch (ignored) {
|
||||
}
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
Generated
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
import { HttpRequest } from "@smithy/core/protocols";
|
||||
import { getChecksumAlgorithmListForResponse } from "./getChecksumAlgorithmListForResponse";
|
||||
import { getChecksumLocationName } from "./getChecksumLocationName";
|
||||
import { isChecksumWithPartNumber } from "./isChecksumWithPartNumber";
|
||||
import { validateChecksumFromResponse } from "./validateChecksumFromResponse";
|
||||
export const flexibleChecksumsResponseMiddlewareOptions = {
|
||||
name: "flexibleChecksumsResponseMiddleware",
|
||||
toMiddleware: "deserializerMiddleware",
|
||||
relation: "after",
|
||||
tags: ["BODY_CHECKSUM"],
|
||||
override: true,
|
||||
};
|
||||
export const flexibleChecksumsResponseMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {
|
||||
if (!HttpRequest.isInstance(args.request)) {
|
||||
return next(args);
|
||||
}
|
||||
const input = args.input;
|
||||
const result = await next(args);
|
||||
const response = result.response;
|
||||
const { requestValidationModeMember, responseAlgorithms } = middlewareConfig;
|
||||
if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") {
|
||||
const { clientName, commandName } = context;
|
||||
const customChecksumAlgorithms = Object.keys(config.checksumAlgorithms ?? {}).filter((algorithm) => {
|
||||
const responseHeader = getChecksumLocationName(algorithm);
|
||||
return response.headers[responseHeader] !== undefined;
|
||||
});
|
||||
const algoList = getChecksumAlgorithmListForResponse([
|
||||
...(responseAlgorithms ?? []),
|
||||
...customChecksumAlgorithms,
|
||||
]);
|
||||
const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" &&
|
||||
commandName === "GetObjectCommand" &&
|
||||
algoList.every((algorithm) => {
|
||||
const responseHeader = getChecksumLocationName(algorithm);
|
||||
const checksumFromResponse = response.headers[responseHeader];
|
||||
return !checksumFromResponse || isChecksumWithPartNumber(checksumFromResponse);
|
||||
});
|
||||
if (isS3WholeObjectMultipartGetResponseChecksum) {
|
||||
return result;
|
||||
}
|
||||
await validateChecksumFromResponse(response, {
|
||||
config,
|
||||
responseAlgorithms: algoList,
|
||||
logger: context.logger,
|
||||
});
|
||||
}
|
||||
return result;
|
||||
};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { stringHasher } from "./stringHasher";
|
||||
export const getChecksum = async (body, { checksumAlgorithmFn, base64Encoder }) => base64Encoder(await stringHasher(checksumAlgorithmFn, body));
|
||||
Generated
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
import { DEFAULT_CHECKSUM_ALGORITHM, RequestChecksumCalculation } from "./constants";
|
||||
export const getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }) => {
|
||||
if (!requestAlgorithmMember) {
|
||||
return requestChecksumCalculation === RequestChecksumCalculation.WHEN_SUPPORTED || requestChecksumRequired
|
||||
? DEFAULT_CHECKSUM_ALGORITHM
|
||||
: undefined;
|
||||
}
|
||||
if (!input[requestAlgorithmMember]) {
|
||||
return undefined;
|
||||
}
|
||||
const checksumAlgorithm = input[requestAlgorithmMember];
|
||||
return checksumAlgorithm;
|
||||
};
|
||||
Generated
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
import { PRIORITY_ORDER_ALGORITHMS } from "./types";
|
||||
export const getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => {
|
||||
const validChecksumAlgorithms = [];
|
||||
let i = PRIORITY_ORDER_ALGORITHMS.length;
|
||||
for (const algorithm of responseAlgorithms) {
|
||||
const priority = PRIORITY_ORDER_ALGORITHMS.indexOf(algorithm);
|
||||
if (priority !== -1) {
|
||||
validChecksumAlgorithms[priority] = algorithm;
|
||||
}
|
||||
else {
|
||||
validChecksumAlgorithms[i++] = algorithm;
|
||||
}
|
||||
}
|
||||
return validChecksumAlgorithms.filter(Boolean);
|
||||
};
|
||||
Generated
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
export const getChecksumLocationName = (algorithm) => algorithm === ChecksumAlgorithm.MD5 ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`;
|
||||
Generated
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { AwsCrc32 } from "@aws-crypto/crc32";
|
||||
export const getCrc32ChecksumAlgorithmFunction = () => AwsCrc32;
|
||||
Generated
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
import { AwsCrc32 } from "@aws-crypto/crc32";
|
||||
import { numToUint8 } from "@aws-crypto/util";
|
||||
import * as zlib from "node:zlib";
|
||||
class NodeCrc32 {
|
||||
checksum = 0;
|
||||
update(data) {
|
||||
this.checksum = zlib.crc32(data, this.checksum);
|
||||
}
|
||||
async digest() {
|
||||
return numToUint8(this.checksum);
|
||||
}
|
||||
reset() {
|
||||
this.checksum = 0;
|
||||
}
|
||||
}
|
||||
export const getCrc32ChecksumAlgorithmFunction = () => {
|
||||
if (typeof zlib.crc32 === "undefined") {
|
||||
return AwsCrc32;
|
||||
}
|
||||
return NodeCrc32;
|
||||
};
|
||||
Generated
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
import { flexibleChecksumsInputMiddleware, flexibleChecksumsInputMiddlewareOptions, } from "./flexibleChecksumsInputMiddleware";
|
||||
import { flexibleChecksumsMiddleware, flexibleChecksumsMiddlewareOptions } from "./flexibleChecksumsMiddleware";
|
||||
import { flexibleChecksumsResponseMiddleware, flexibleChecksumsResponseMiddlewareOptions, } from "./flexibleChecksumsResponseMiddleware";
|
||||
export const getFlexibleChecksumsPlugin = (config, middlewareConfig) => ({
|
||||
applyToStack: (clientStack) => {
|
||||
clientStack.add(flexibleChecksumsMiddleware(config, middlewareConfig), flexibleChecksumsMiddlewareOptions);
|
||||
clientStack.addRelativeTo(flexibleChecksumsInputMiddleware(config, middlewareConfig), flexibleChecksumsInputMiddlewareOptions);
|
||||
clientStack.addRelativeTo(flexibleChecksumsResponseMiddleware(config, middlewareConfig), flexibleChecksumsResponseMiddlewareOptions);
|
||||
},
|
||||
});
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
export const hasHeader = (header, headers) => {
|
||||
const soughtHeader = header.toLowerCase();
|
||||
for (const headerName of Object.keys(headers)) {
|
||||
if (soughtHeader === headerName.toLowerCase()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
export const hasHeaderWithPrefix = (headerPrefix, headers) => {
|
||||
const soughtHeaderPrefix = headerPrefix.toLowerCase();
|
||||
for (const headerName of Object.keys(headers)) {
|
||||
if (headerName.toLowerCase().startsWith(soughtHeaderPrefix)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
Generated
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
export const isChecksumWithPartNumber = (checksum) => {
|
||||
const lastHyphenIndex = checksum.lastIndexOf("-");
|
||||
if (lastHyphenIndex !== -1) {
|
||||
const numberPart = checksum.slice(lastHyphenIndex + 1);
|
||||
if (!numberPart.startsWith("0")) {
|
||||
const number = parseInt(numberPart, 10);
|
||||
if (!isNaN(number) && number >= 1 && number <= 10000) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { isArrayBuffer } from "@smithy/core/serde";
|
||||
export const isStreaming = (body) => body !== undefined && typeof body !== "string" && !ArrayBuffer.isView(body) && !isArrayBuffer(body);
|
||||
Generated
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import { normalizeProvider } from "@smithy/core/client";
|
||||
import { DEFAULT_REQUEST_CHECKSUM_CALCULATION, DEFAULT_RESPONSE_CHECKSUM_VALIDATION } from "./constants";
|
||||
export const resolveFlexibleChecksumsConfig = (input) => {
|
||||
const { requestChecksumCalculation, responseChecksumValidation, requestStreamBufferSize } = input;
|
||||
return Object.assign(input, {
|
||||
requestChecksumCalculation: normalizeProvider(requestChecksumCalculation ?? DEFAULT_REQUEST_CHECKSUM_CALCULATION),
|
||||
responseChecksumValidation: normalizeProvider(responseChecksumValidation ?? DEFAULT_RESPONSE_CHECKSUM_VALIDATION),
|
||||
requestStreamBufferSize: Number(requestStreamBufferSize ?? 0),
|
||||
checksumAlgorithms: input.checksumAlgorithms ?? {},
|
||||
});
|
||||
};
|
||||
Generated
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
import { AwsCrc32c } from "@aws-crypto/crc32c";
|
||||
import { crc64NvmeCrtContainer } from "../crc64-nvme/crc64-nvme-crt-container";
|
||||
import { Crc64Nvme } from "../crc64-nvme/Crc64Nvme";
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
import { getCrc32ChecksumAlgorithmFunction } from "./getCrc32ChecksumAlgorithmFunction";
|
||||
import { CLIENT_SUPPORTED_ALGORITHMS } from "./types";
|
||||
export const selectChecksumAlgorithmFunction = (checksumAlgorithm, config) => {
|
||||
const { checksumAlgorithms = {} } = config;
|
||||
switch (checksumAlgorithm) {
|
||||
case ChecksumAlgorithm.MD5:
|
||||
return checksumAlgorithms?.MD5 ?? config.md5;
|
||||
case ChecksumAlgorithm.CRC32:
|
||||
return checksumAlgorithms?.CRC32 ?? getCrc32ChecksumAlgorithmFunction();
|
||||
case ChecksumAlgorithm.CRC32C:
|
||||
return checksumAlgorithms?.CRC32C ?? AwsCrc32c;
|
||||
case ChecksumAlgorithm.CRC64NVME:
|
||||
if (typeof crc64NvmeCrtContainer.CrtCrc64Nvme !== "function") {
|
||||
return checksumAlgorithms?.CRC64NVME ?? Crc64Nvme;
|
||||
}
|
||||
return checksumAlgorithms?.CRC64NVME ?? crc64NvmeCrtContainer.CrtCrc64Nvme;
|
||||
case ChecksumAlgorithm.SHA1:
|
||||
return checksumAlgorithms?.SHA1 ?? config.sha1;
|
||||
case ChecksumAlgorithm.SHA256:
|
||||
return checksumAlgorithms?.SHA256 ?? config.sha256;
|
||||
default:
|
||||
if (checksumAlgorithms?.[checksumAlgorithm]) {
|
||||
return checksumAlgorithms[checksumAlgorithm];
|
||||
}
|
||||
throw new Error(`The checksum algorithm "${checksumAlgorithm}" is not supported by the client.` +
|
||||
` Select one of ${CLIENT_SUPPORTED_ALGORITHMS}, or provide an implementation to ` +
|
||||
` the client constructor checksums field.`);
|
||||
}
|
||||
};
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { toUint8Array } from "@smithy/core/serde";
|
||||
export const stringHasher = (checksumAlgorithmFn, body) => {
|
||||
const hash = new checksumAlgorithmFn();
|
||||
hash.update(toUint8Array(body || ""));
|
||||
return hash.digest();
|
||||
};
|
||||
Generated
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
export var SelectorType;
|
||||
(function (SelectorType) {
|
||||
SelectorType["ENV"] = "env";
|
||||
SelectorType["CONFIG"] = "shared config entry";
|
||||
})(SelectorType || (SelectorType = {}));
|
||||
export const stringUnionSelector = (obj, key, union, type) => {
|
||||
if (!(key in obj))
|
||||
return undefined;
|
||||
const value = obj[key].toUpperCase();
|
||||
if (!Object.values(union).includes(value)) {
|
||||
throw new TypeError(`Cannot load ${type} '${key}'. Expected one of ${Object.values(union)}, got '${obj[key]}'.`);
|
||||
}
|
||||
return value;
|
||||
};
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
export const CLIENT_SUPPORTED_ALGORITHMS = [
|
||||
ChecksumAlgorithm.CRC32,
|
||||
ChecksumAlgorithm.CRC32C,
|
||||
ChecksumAlgorithm.CRC64NVME,
|
||||
ChecksumAlgorithm.SHA1,
|
||||
ChecksumAlgorithm.SHA256,
|
||||
];
|
||||
export const PRIORITY_ORDER_ALGORITHMS = [
|
||||
ChecksumAlgorithm.SHA256,
|
||||
ChecksumAlgorithm.SHA1,
|
||||
ChecksumAlgorithm.CRC32,
|
||||
ChecksumAlgorithm.CRC32C,
|
||||
ChecksumAlgorithm.CRC64NVME,
|
||||
];
|
||||
Generated
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
import { createChecksumStream } from "@smithy/core/serde";
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
import { getChecksum } from "./getChecksum";
|
||||
import { getChecksumAlgorithmListForResponse } from "./getChecksumAlgorithmListForResponse";
|
||||
import { getChecksumLocationName } from "./getChecksumLocationName";
|
||||
import { isStreaming } from "./isStreaming";
|
||||
import { selectChecksumAlgorithmFunction } from "./selectChecksumAlgorithmFunction";
|
||||
export const validateChecksumFromResponse = async (response, { config, responseAlgorithms, logger }) => {
|
||||
const checksumAlgorithms = getChecksumAlgorithmListForResponse(responseAlgorithms);
|
||||
const { body: responseBody, headers: responseHeaders } = response;
|
||||
for (const algorithm of checksumAlgorithms) {
|
||||
const responseHeader = getChecksumLocationName(algorithm);
|
||||
const checksumFromResponse = responseHeaders[responseHeader];
|
||||
if (checksumFromResponse) {
|
||||
let checksumAlgorithmFn;
|
||||
try {
|
||||
checksumAlgorithmFn = selectChecksumAlgorithmFunction(algorithm, config);
|
||||
}
|
||||
catch (error) {
|
||||
if (algorithm === ChecksumAlgorithm.CRC64NVME) {
|
||||
logger?.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${error.message}`);
|
||||
continue;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
const { base64Encoder } = config;
|
||||
if (isStreaming(responseBody)) {
|
||||
response.body = createChecksumStream({
|
||||
expectedChecksum: checksumFromResponse,
|
||||
checksumSourceLocation: responseHeader,
|
||||
checksum: new checksumAlgorithmFn(),
|
||||
source: responseBody,
|
||||
base64Encoder,
|
||||
});
|
||||
return;
|
||||
}
|
||||
const checksum = await getChecksum(responseBody, { checksumAlgorithmFn, base64Encoder });
|
||||
if (checksum === checksumFromResponse) {
|
||||
break;
|
||||
}
|
||||
throw new Error(`Checksum mismatch: expected "${checksum}" but received "${checksumFromResponse}"` +
|
||||
` in response header "${responseHeader}".`);
|
||||
}
|
||||
}
|
||||
};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
export { Crc64Nvme } from "./crc64-nvme/Crc64Nvme";
|
||||
export { crc64NvmeCrtContainer } from "./crc64-nvme/crc64-nvme-crt-container";
|
||||
export { ENV_REQUEST_CHECKSUM_CALCULATION, CONFIG_REQUEST_CHECKSUM_CALCULATION, NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, } from "./flexible-checksums/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS";
|
||||
export { ENV_RESPONSE_CHECKSUM_VALIDATION, CONFIG_RESPONSE_CHECKSUM_VALIDATION, NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, } from "./flexible-checksums/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS";
|
||||
export { RequestChecksumCalculation, DEFAULT_REQUEST_CHECKSUM_CALCULATION, ResponseChecksumValidation, DEFAULT_RESPONSE_CHECKSUM_VALIDATION, ChecksumAlgorithm, ChecksumLocation, DEFAULT_CHECKSUM_ALGORITHM, } from "./flexible-checksums/constants";
|
||||
export { flexibleChecksumsMiddlewareOptions, flexibleChecksumsMiddleware, } from "./flexible-checksums/flexibleChecksumsMiddleware";
|
||||
export { getFlexibleChecksumsPlugin } from "./flexible-checksums/getFlexibleChecksumsPlugin";
|
||||
export { resolveFlexibleChecksumsConfig } from "./flexible-checksums/resolveFlexibleChecksumsConfig";
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import type { Checksum } from "@smithy/types";
|
||||
/**
|
||||
* Implements CRC-64/NVME checksum algorithm.
|
||||
*
|
||||
* This class provides CRC-64 checksum calculation using the NVMe polynomial (0x9a6c9329ac4bc9b5).
|
||||
* It uses an 8-slice lookup table for efficient computation.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const checksum = new Crc64Nvme();
|
||||
* checksum.update(new Uint8Array([1, 2, 3]));
|
||||
* const result = await checksum.digest();
|
||||
* ```
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export declare class Crc64Nvme implements Checksum {
|
||||
private c1;
|
||||
private c2;
|
||||
constructor();
|
||||
update(data: Uint8Array): void;
|
||||
digest(): Promise<Uint8Array>;
|
||||
reset(): void;
|
||||
}
|
||||
Generated
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
import type { ChecksumConstructor } from "@smithy/types";
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* \@aws-sdk/crc64-nvme-crt will install the constructor in this
|
||||
* container if it is installed.
|
||||
*
|
||||
* This avoids a runtime-require being interpreted statically by bundlers.
|
||||
*
|
||||
*/
|
||||
export declare const crc64NvmeCrtContainer: {
|
||||
CrtCrc64Nvme: null | ChecksumConstructor;
|
||||
};
|
||||
Generated
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
import type { LoadedConfigSelectors } from "@smithy/core/config";
|
||||
import { RequestChecksumCalculation } from "./constants";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS: LoadedConfigSelectors<RequestChecksumCalculation>;
|
||||
Generated
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
import type { LoadedConfigSelectors } from "@smithy/core/config";
|
||||
import { ResponseChecksumValidation } from "./constants";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS: LoadedConfigSelectors<ResponseChecksumValidation>;
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
import type { BodyLengthCalculator, ChecksumConstructor, Encoder, GetAwsChunkedEncodingStream, HashConstructor, Provider, StreamCollector, StreamHasher } from "@smithy/types";
|
||||
import type { RequestChecksumCalculation, ResponseChecksumValidation } from "./constants";
|
||||
import type { FlexibleChecksumsInputConfig } from "./resolveFlexibleChecksumsConfig";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface PreviouslyResolved {
|
||||
/**
|
||||
* The function that will be used to convert binary data to a base64-encoded string.
|
||||
* @internal
|
||||
*/
|
||||
base64Encoder: Encoder;
|
||||
/**
|
||||
* A function that can calculate the length of a body.
|
||||
*/
|
||||
bodyLengthChecker: BodyLengthCalculator;
|
||||
/**
|
||||
* A function that returns Readable Stream which follows aws-chunked encoding stream.
|
||||
*/
|
||||
getAwsChunkedEncodingStream: GetAwsChunkedEncodingStream;
|
||||
/**
|
||||
* A constructor for a class implementing the {@link Hash} interface that computes MD5 hashes.
|
||||
* @internal
|
||||
*/
|
||||
md5: ChecksumConstructor | HashConstructor;
|
||||
/**
|
||||
* Determines when a checksum will be calculated for request payloads
|
||||
*/
|
||||
requestChecksumCalculation: Provider<RequestChecksumCalculation>;
|
||||
/**
|
||||
* Determines when a checksum will be calculated for response payloads
|
||||
*/
|
||||
responseChecksumValidation: Provider<ResponseChecksumValidation>;
|
||||
/**
|
||||
* A constructor for a class implementing the {@link Hash} interface that computes SHA1 hashes.
|
||||
* @internal
|
||||
*/
|
||||
sha1: ChecksumConstructor | HashConstructor;
|
||||
/**
|
||||
* A constructor for a class implementing the {@link Hash} interface that computes SHA256 hashes.
|
||||
* @internal
|
||||
*/
|
||||
sha256: ChecksumConstructor | HashConstructor;
|
||||
/**
|
||||
* A function that, given a hash constructor and a stream, calculates the hash of the streamed value.
|
||||
* @internal
|
||||
*/
|
||||
streamHasher: StreamHasher<any>;
|
||||
/**
|
||||
* Collects streams into buffers.
|
||||
*/
|
||||
streamCollector: StreamCollector;
|
||||
/**
|
||||
* Minimum bytes from a stream to buffer into a chunk before passing to chunked encoding.
|
||||
*/
|
||||
requestStreamBufferSize: number;
|
||||
checksumAlgorithms?: FlexibleChecksumsInputConfig["checksumAlgorithms"];
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Determines when a checksum will be calculated for request payloads.
|
||||
* @public
|
||||
*/
|
||||
export declare const RequestChecksumCalculation: {
|
||||
/**
|
||||
* When set, a checksum will be calculated for all request payloads of operations
|
||||
* modeled with the {@link httpChecksum} trait where `requestChecksumRequired` is `true`
|
||||
* AND/OR a `requestAlgorithmMember` is modeled.
|
||||
* {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum}
|
||||
*/
|
||||
readonly WHEN_SUPPORTED: "WHEN_SUPPORTED";
|
||||
/**
|
||||
* When set, a checksum will only be calculated for request payloads of operations
|
||||
* modeled with the {@link httpChecksum} trait where `requestChecksumRequired` is `true`
|
||||
* OR where a `requestAlgorithmMember` is modeled and the user sets it.
|
||||
* {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum}
|
||||
*/
|
||||
readonly WHEN_REQUIRED: "WHEN_REQUIRED";
|
||||
};
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type RequestChecksumCalculation = (typeof RequestChecksumCalculation)[keyof typeof RequestChecksumCalculation];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const DEFAULT_REQUEST_CHECKSUM_CALCULATION: "WHEN_SUPPORTED";
|
||||
/**
|
||||
* Determines when checksum validation will be performed on response payloads.
|
||||
* @public
|
||||
*/
|
||||
export declare const ResponseChecksumValidation: {
|
||||
/**
|
||||
* When set, checksum validation MUST be performed on all response payloads of operations
|
||||
* modeled with the {@link httpChecksum} trait where `responseAlgorithms` is modeled,
|
||||
* except when no modeled checksum algorithms are supported by an SDK.
|
||||
* {@link https://smithy.io/2.0/aws/aws-core.html#aws-protocols-httpchecksum-trait httpChecksum}
|
||||
*/
|
||||
readonly WHEN_SUPPORTED: "WHEN_SUPPORTED";
|
||||
/**
|
||||
* When set, checksum validation MUST NOT be performed on response payloads of operations UNLESS
|
||||
* the SDK supports the modeled checksum algorithms AND the user has set the `requestValidationModeMember` to `ENABLED`.
|
||||
* It is currently impossible to model an operation as requiring a response checksum,
|
||||
* but this setting leaves the door open for future updates.
|
||||
*/
|
||||
readonly WHEN_REQUIRED: "WHEN_REQUIRED";
|
||||
};
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type ResponseChecksumValidation = (typeof ResponseChecksumValidation)[keyof typeof ResponseChecksumValidation];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const DEFAULT_RESPONSE_CHECKSUM_VALIDATION: "WHEN_SUPPORTED";
|
||||
/**
|
||||
* Checksum Algorithms supported by the SDK.
|
||||
* @public
|
||||
*/
|
||||
export declare enum ChecksumAlgorithm {
|
||||
/**
|
||||
* @deprecated Use {@link ChecksumAlgorithm.CRC32} instead.
|
||||
*/
|
||||
MD5 = "MD5",
|
||||
CRC32 = "CRC32",
|
||||
CRC32C = "CRC32C",
|
||||
CRC64NVME = "CRC64NVME",
|
||||
SHA1 = "SHA1",
|
||||
SHA256 = "SHA256"
|
||||
}
|
||||
/**
|
||||
* Location when the checksum is stored in the request body.
|
||||
* @internal
|
||||
*/
|
||||
export declare enum ChecksumLocation {
|
||||
HEADER = "header",
|
||||
TRAILER = "trailer"
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32;
|
||||
Generated
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
import type { RelativeMiddlewareOptions, SerializeMiddleware } from "@smithy/types";
|
||||
import type { PreviouslyResolved } from "./configuration";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface FlexibleChecksumsInputMiddlewareConfig {
|
||||
/**
|
||||
* Defines a top-level operation input member used to opt-in to best-effort validation
|
||||
* of a checksum returned in the HTTP response of the operation.
|
||||
*/
|
||||
requestValidationModeMember?: string;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const flexibleChecksumsInputMiddlewareOptions: RelativeMiddlewareOptions;
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* The input counterpart to the flexibleChecksumsMiddleware.
|
||||
*/
|
||||
export declare const flexibleChecksumsInputMiddleware: (config: PreviouslyResolved, middlewareConfig: FlexibleChecksumsInputMiddlewareConfig) => SerializeMiddleware<any, any>;
|
||||
Generated
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
import type { BuildHandlerOptions, BuildMiddleware } from "@smithy/types";
|
||||
import type { PreviouslyResolved } from "./configuration";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface FlexibleChecksumsRequestMiddlewareConfig {
|
||||
/**
|
||||
* Indicates an operation requires a checksum in its HTTP request.
|
||||
*/
|
||||
requestChecksumRequired: boolean;
|
||||
/**
|
||||
* Member that is used to configure request checksum behavior.
|
||||
*/
|
||||
requestAlgorithmMember?: {
|
||||
/**
|
||||
* Defines a top-level operation input member that is used to configure request checksum behavior.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The {@link httpHeader} value, if present.
|
||||
* {@link https://smithy.io/2.0/spec/http-bindings.html#httpheader-trait httpHeader}
|
||||
*/
|
||||
httpHeader?: string;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const flexibleChecksumsMiddlewareOptions: BuildHandlerOptions;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const flexibleChecksumsMiddleware: (config: PreviouslyResolved, middlewareConfig: FlexibleChecksumsRequestMiddlewareConfig) => BuildMiddleware<any, any>;
|
||||
Generated
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
import type { DeserializeMiddleware, RelativeMiddlewareOptions } from "@smithy/types";
|
||||
import type { PreviouslyResolved } from "./configuration";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface FlexibleChecksumsResponseMiddlewareConfig {
|
||||
/**
|
||||
* Defines a top-level operation input member used to opt-in to best-effort validation
|
||||
* of a checksum returned in the HTTP response of the operation.
|
||||
*/
|
||||
requestValidationModeMember?: string;
|
||||
/**
|
||||
* Defines the checksum algorithms clients SHOULD look for when validating checksums
|
||||
* returned in the HTTP response.
|
||||
*/
|
||||
responseAlgorithms?: string[];
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const flexibleChecksumsResponseMiddlewareOptions: RelativeMiddlewareOptions;
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* The validation counterpart to the flexibleChecksumsMiddleware.
|
||||
*/
|
||||
export declare const flexibleChecksumsResponseMiddleware: (config: PreviouslyResolved, middlewareConfig: FlexibleChecksumsResponseMiddlewareConfig) => DeserializeMiddleware<any, any>;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import type { ChecksumConstructor, Encoder, HashConstructor } from "@smithy/types";
|
||||
export interface GetChecksumDigestOptions {
|
||||
checksumAlgorithmFn: ChecksumConstructor | HashConstructor;
|
||||
base64Encoder: Encoder;
|
||||
}
|
||||
export declare const getChecksum: (body: unknown, { checksumAlgorithmFn, base64Encoder }: GetChecksumDigestOptions) => Promise<string>;
|
||||
Generated
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
import type { ChecksumAlgorithm } from "./constants";
|
||||
import { RequestChecksumCalculation } from "./constants";
|
||||
export interface GetChecksumAlgorithmForRequestOptions {
|
||||
/**
|
||||
* Indicates an operation requires a checksum in its HTTP request.
|
||||
*/
|
||||
requestChecksumRequired: boolean;
|
||||
/**
|
||||
* Defines a top-level operation input member that is used to configure request checksum behavior.
|
||||
*/
|
||||
requestAlgorithmMember?: string;
|
||||
/**
|
||||
* Determines when a checksum will be calculated for request payloads
|
||||
*/
|
||||
requestChecksumCalculation: RequestChecksumCalculation;
|
||||
}
|
||||
/**
|
||||
* Returns the checksum algorithm to use for the request, along with
|
||||
* the priority array of location to use to populate checksum and names
|
||||
* to be used as a key at the location.
|
||||
*/
|
||||
export declare const getChecksumAlgorithmForRequest: (input: any, { requestChecksumRequired, requestAlgorithmMember, requestChecksumCalculation }: GetChecksumAlgorithmForRequestOptions) => ChecksumAlgorithm | string | undefined;
|
||||
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import type { ChecksumAlgorithm } from "./constants";
|
||||
/**
|
||||
* Returns the priority array of algorithm to use to verify checksum and names
|
||||
* to be used as a key in the response header.
|
||||
*/
|
||||
export declare const getChecksumAlgorithmListForResponse: (responseAlgorithms?: string[]) => ChecksumAlgorithm[];
|
||||
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
/**
|
||||
* Returns location (header/trailer) name to use to populate checksum in.
|
||||
*/
|
||||
export declare const getChecksumLocationName: (algorithm: ChecksumAlgorithm | string) => string;
|
||||
Generated
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { AwsCrc32 } from "@aws-crypto/crc32";
|
||||
export declare const getCrc32ChecksumAlgorithmFunction: () => typeof AwsCrc32;
|
||||
node_modules/@aws-sdk/checksums/dist-types/flexible-checksums/getCrc32ChecksumAlgorithmFunction.d.ts
Generated
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
import { AwsCrc32 } from "@aws-crypto/crc32";
|
||||
import type { Checksum } from "@smithy/types";
|
||||
declare class NodeCrc32 implements Checksum {
|
||||
private checksum;
|
||||
update(data: Uint8Array): void;
|
||||
digest(): Promise<Uint8Array>;
|
||||
reset(): void;
|
||||
}
|
||||
export declare const getCrc32ChecksumAlgorithmFunction: () => typeof NodeCrc32 | typeof AwsCrc32;
|
||||
export {};
|
||||
Generated
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
import type { Pluggable } from "@smithy/types";
|
||||
import type { PreviouslyResolved } from "./configuration";
|
||||
import type { FlexibleChecksumsInputMiddlewareConfig } from "./flexibleChecksumsInputMiddleware";
|
||||
import type { FlexibleChecksumsRequestMiddlewareConfig } from "./flexibleChecksumsMiddleware";
|
||||
import type { FlexibleChecksumsResponseMiddlewareConfig } from "./flexibleChecksumsResponseMiddleware";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface FlexibleChecksumsMiddlewareConfig extends FlexibleChecksumsRequestMiddlewareConfig, FlexibleChecksumsInputMiddlewareConfig, FlexibleChecksumsResponseMiddlewareConfig {
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const getFlexibleChecksumsPlugin: (config: PreviouslyResolved, middlewareConfig: FlexibleChecksumsMiddlewareConfig) => Pluggable<any, any>;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import type { HeaderBag } from "@smithy/types";
|
||||
/**
|
||||
* Returns true if header is present in headers.
|
||||
* Comparisons are case-insensitive.
|
||||
*/
|
||||
export declare const hasHeader: (header: string, headers: HeaderBag) => boolean;
|
||||
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import type { HeaderBag } from "@smithy/types";
|
||||
/**
|
||||
* Returns true if header with headerPrefix is present in headers.
|
||||
* Comparisons are case-insensitive.
|
||||
*/
|
||||
export declare const hasHeaderWithPrefix: (headerPrefix: string, headers: HeaderBag) => boolean;
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
export declare const isChecksumWithPartNumber: (checksum: string) => boolean;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Returns true if the given value is a streaming response.
|
||||
*/
|
||||
export declare const isStreaming: (body: unknown) => boolean;
|
||||
Generated
Vendored
+57
@@ -0,0 +1,57 @@
|
||||
import type { ChecksumConstructor, Provider } from "@smithy/types";
|
||||
import type { RequestChecksumCalculation, ResponseChecksumValidation } from "./constants";
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface FlexibleChecksumsInputConfig {
|
||||
/**
|
||||
* Determines when a checksum will be calculated for request payloads.
|
||||
*/
|
||||
requestChecksumCalculation?: RequestChecksumCalculation | Provider<RequestChecksumCalculation>;
|
||||
/**
|
||||
* Determines when checksum validation will be performed on response payloads.
|
||||
*/
|
||||
responseChecksumValidation?: ResponseChecksumValidation | Provider<ResponseChecksumValidation>;
|
||||
/**
|
||||
* Default 0 (off).
|
||||
*
|
||||
* When set to a value greater than or equal to 8192, sets the minimum number
|
||||
* of bytes to buffer into a chunk when processing input streams
|
||||
* with chunked encoding (that is, when request checksums are enabled).
|
||||
* A minimum of 8kb = 8 * 1024 is required, and 64kb or higher is recommended.
|
||||
*
|
||||
* See https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-streaming.html.
|
||||
*
|
||||
* This has a slight performance penalty because it must wrap and buffer
|
||||
* your input stream.
|
||||
* You do not need to set this value if your stream already flows chunks
|
||||
* of 8kb or greater.
|
||||
*/
|
||||
requestStreamBufferSize?: number | false;
|
||||
/**
|
||||
* Optional implementations of checksum algorithms adhering to the
|
||||
* Checksum interface.
|
||||
*/
|
||||
checksumAlgorithms?: {
|
||||
CRC32?: ChecksumConstructor;
|
||||
CRC32C?: ChecksumConstructor;
|
||||
CRC64NVME?: ChecksumConstructor;
|
||||
SHA1?: ChecksumConstructor;
|
||||
SHA256?: ChecksumConstructor;
|
||||
} & {
|
||||
[algorithmId: string]: ChecksumConstructor;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export interface FlexibleChecksumsResolvedConfig {
|
||||
requestChecksumCalculation: Provider<RequestChecksumCalculation>;
|
||||
responseChecksumValidation: Provider<ResponseChecksumValidation>;
|
||||
requestStreamBufferSize: number;
|
||||
checksumAlgorithms?: FlexibleChecksumsInputConfig["checksumAlgorithms"];
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare const resolveFlexibleChecksumsConfig: <T>(input: T & FlexibleChecksumsInputConfig) => T & FlexibleChecksumsResolvedConfig;
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import type { ChecksumConstructor, HashConstructor } from "@smithy/types";
|
||||
import type { PreviouslyResolved } from "./configuration";
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
/**
|
||||
* Returns the function that will compute the checksum for the given {@link ChecksumAlgorithm}.
|
||||
*/
|
||||
export declare const selectChecksumAlgorithmFunction: (checksumAlgorithm: ChecksumAlgorithm | string, config: PreviouslyResolved) => ChecksumConstructor | HashConstructor;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import type { ChecksumConstructor, HashConstructor } from "@smithy/types";
|
||||
/**
|
||||
* A function that, given a hash constructor and a string, calculates the hash of the string.
|
||||
*/
|
||||
export declare const stringHasher: (checksumAlgorithmFn: ChecksumConstructor | HashConstructor, body: any) => Promise<Uint8Array>;
|
||||
Generated
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
export declare enum SelectorType {
|
||||
ENV = "env",
|
||||
CONFIG = "shared config entry"
|
||||
}
|
||||
/**
|
||||
* Returns undefined, if obj[key] is not defined.
|
||||
* Returns string value, if the string is defined in obj[key] and it's uppercase matches union value.
|
||||
* Throws error for all other cases.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export declare const stringUnionSelector: <U extends object, K extends keyof U>(obj: Record<string, string | undefined>, key: string, union: U, type: SelectorType) => U[K] | undefined;
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
/**
|
||||
* List of algorithms supported by client.
|
||||
*/
|
||||
export declare const CLIENT_SUPPORTED_ALGORITHMS: ChecksumAlgorithm[];
|
||||
/**
|
||||
* Priority order for validating checksum algorithm. A faster algorithm has higher priority.
|
||||
*/
|
||||
export declare const PRIORITY_ORDER_ALGORITHMS: ChecksumAlgorithm[];
|
||||
Generated
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
import type { HttpResponse } from "@smithy/core/protocols";
|
||||
import type { Logger } from "@smithy/types";
|
||||
import type { PreviouslyResolved } from "./configuration";
|
||||
export interface ValidateChecksumFromResponseOptions {
|
||||
config: PreviouslyResolved;
|
||||
/**
|
||||
* Defines the checksum algorithms clients SHOULD look for when validating checksums
|
||||
* returned in the HTTP response.
|
||||
*/
|
||||
responseAlgorithms?: string[];
|
||||
logger?: Logger;
|
||||
}
|
||||
export declare const validateChecksumFromResponse: (response: HttpResponse, { config, responseAlgorithms, logger }: ValidateChecksumFromResponseOptions) => Promise<void>;
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
export { Crc64Nvme } from "./crc64-nvme/Crc64Nvme";
|
||||
export { crc64NvmeCrtContainer } from "./crc64-nvme/crc64-nvme-crt-container";
|
||||
export { ENV_REQUEST_CHECKSUM_CALCULATION, CONFIG_REQUEST_CHECKSUM_CALCULATION, NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, } from "./flexible-checksums/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS";
|
||||
export { ENV_RESPONSE_CHECKSUM_VALIDATION, CONFIG_RESPONSE_CHECKSUM_VALIDATION, NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, } from "./flexible-checksums/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS";
|
||||
export { RequestChecksumCalculation, DEFAULT_REQUEST_CHECKSUM_CALCULATION, ResponseChecksumValidation, DEFAULT_RESPONSE_CHECKSUM_VALIDATION, ChecksumAlgorithm, ChecksumLocation, DEFAULT_CHECKSUM_ALGORITHM, } from "./flexible-checksums/constants";
|
||||
export type { FlexibleChecksumsRequestMiddlewareConfig } from "./flexible-checksums/flexibleChecksumsMiddleware";
|
||||
export { flexibleChecksumsMiddlewareOptions, flexibleChecksumsMiddleware, } from "./flexible-checksums/flexibleChecksumsMiddleware";
|
||||
export type { FlexibleChecksumsMiddlewareConfig } from "./flexible-checksums/getFlexibleChecksumsPlugin";
|
||||
export { getFlexibleChecksumsPlugin } from "./flexible-checksums/getFlexibleChecksumsPlugin";
|
||||
export type { FlexibleChecksumsInputConfig, FlexibleChecksumsResolvedConfig, } from "./flexible-checksums/resolveFlexibleChecksumsConfig";
|
||||
export { resolveFlexibleChecksumsConfig } from "./flexible-checksums/resolveFlexibleChecksumsConfig";
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Checksum } from "@smithy/types";
|
||||
export declare class Crc64Nvme implements Checksum {
|
||||
private c1;
|
||||
private c2;
|
||||
constructor();
|
||||
update(data: Uint8Array): void;
|
||||
digest(): Promise<Uint8Array>;
|
||||
reset(): void;
|
||||
}
|
||||
Generated
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
import { ChecksumConstructor } from "@smithy/types";
|
||||
export declare const crc64NvmeCrtContainer: {
|
||||
CrtCrc64Nvme: null | ChecksumConstructor;
|
||||
};
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import { LoadedConfigSelectors } from "@smithy/core/config";
|
||||
import { RequestChecksumCalculation } from "./constants";
|
||||
export declare const ENV_REQUEST_CHECKSUM_CALCULATION =
|
||||
"AWS_REQUEST_CHECKSUM_CALCULATION";
|
||||
export declare const CONFIG_REQUEST_CHECKSUM_CALCULATION =
|
||||
"request_checksum_calculation";
|
||||
export declare const NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS: LoadedConfigSelectors<RequestChecksumCalculation>;
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import { LoadedConfigSelectors } from "@smithy/core/config";
|
||||
import { ResponseChecksumValidation } from "./constants";
|
||||
export declare const ENV_RESPONSE_CHECKSUM_VALIDATION =
|
||||
"AWS_RESPONSE_CHECKSUM_VALIDATION";
|
||||
export declare const CONFIG_RESPONSE_CHECKSUM_VALIDATION =
|
||||
"response_checksum_validation";
|
||||
export declare const NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS: LoadedConfigSelectors<ResponseChecksumValidation>;
|
||||
Generated
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
import {
|
||||
BodyLengthCalculator,
|
||||
ChecksumConstructor,
|
||||
Encoder,
|
||||
GetAwsChunkedEncodingStream,
|
||||
HashConstructor,
|
||||
Provider,
|
||||
StreamCollector,
|
||||
StreamHasher,
|
||||
} from "@smithy/types";
|
||||
import {
|
||||
RequestChecksumCalculation,
|
||||
ResponseChecksumValidation,
|
||||
} from "./constants";
|
||||
import { FlexibleChecksumsInputConfig } from "./resolveFlexibleChecksumsConfig";
|
||||
export interface PreviouslyResolved {
|
||||
base64Encoder: Encoder;
|
||||
bodyLengthChecker: BodyLengthCalculator;
|
||||
getAwsChunkedEncodingStream: GetAwsChunkedEncodingStream;
|
||||
md5: ChecksumConstructor | HashConstructor;
|
||||
requestChecksumCalculation: Provider<RequestChecksumCalculation>;
|
||||
responseChecksumValidation: Provider<ResponseChecksumValidation>;
|
||||
sha1: ChecksumConstructor | HashConstructor;
|
||||
sha256: ChecksumConstructor | HashConstructor;
|
||||
streamHasher: StreamHasher<any>;
|
||||
streamCollector: StreamCollector;
|
||||
requestStreamBufferSize: number;
|
||||
checksumAlgorithms?: FlexibleChecksumsInputConfig["checksumAlgorithms"];
|
||||
}
|
||||
Generated
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
export declare const RequestChecksumCalculation: {
|
||||
readonly WHEN_SUPPORTED: "WHEN_SUPPORTED";
|
||||
readonly WHEN_REQUIRED: "WHEN_REQUIRED";
|
||||
};
|
||||
export type RequestChecksumCalculation =
|
||||
(typeof RequestChecksumCalculation)[keyof typeof RequestChecksumCalculation];
|
||||
export declare const DEFAULT_REQUEST_CHECKSUM_CALCULATION: "WHEN_SUPPORTED";
|
||||
export declare const ResponseChecksumValidation: {
|
||||
readonly WHEN_SUPPORTED: "WHEN_SUPPORTED";
|
||||
readonly WHEN_REQUIRED: "WHEN_REQUIRED";
|
||||
};
|
||||
export type ResponseChecksumValidation =
|
||||
(typeof ResponseChecksumValidation)[keyof typeof ResponseChecksumValidation];
|
||||
export declare const DEFAULT_RESPONSE_CHECKSUM_VALIDATION: "WHEN_SUPPORTED";
|
||||
export declare enum ChecksumAlgorithm {
|
||||
MD5 = "MD5",
|
||||
CRC32 = "CRC32",
|
||||
CRC32C = "CRC32C",
|
||||
CRC64NVME = "CRC64NVME",
|
||||
SHA1 = "SHA1",
|
||||
SHA256 = "SHA256",
|
||||
}
|
||||
export declare enum ChecksumLocation {
|
||||
HEADER = "header",
|
||||
TRAILER = "trailer",
|
||||
}
|
||||
export declare const DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32;
|
||||
Generated
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
import { RelativeMiddlewareOptions, SerializeMiddleware } from "@smithy/types";
|
||||
import { PreviouslyResolved } from "./configuration";
|
||||
export interface FlexibleChecksumsInputMiddlewareConfig {
|
||||
requestValidationModeMember?: string;
|
||||
}
|
||||
export declare const flexibleChecksumsInputMiddlewareOptions: RelativeMiddlewareOptions;
|
||||
export declare const flexibleChecksumsInputMiddleware: (
|
||||
config: PreviouslyResolved,
|
||||
middlewareConfig: FlexibleChecksumsInputMiddlewareConfig
|
||||
) => SerializeMiddleware<any, any>;
|
||||
node_modules/@aws-sdk/checksums/dist-types/ts3.4/flexible-checksums/flexibleChecksumsMiddleware.d.ts
Generated
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
import { BuildHandlerOptions, BuildMiddleware } from "@smithy/types";
|
||||
import { PreviouslyResolved } from "./configuration";
|
||||
export interface FlexibleChecksumsRequestMiddlewareConfig {
|
||||
requestChecksumRequired: boolean;
|
||||
requestAlgorithmMember?: {
|
||||
name: string;
|
||||
httpHeader?: string;
|
||||
};
|
||||
}
|
||||
export declare const flexibleChecksumsMiddlewareOptions: BuildHandlerOptions;
|
||||
export declare const flexibleChecksumsMiddleware: (
|
||||
config: PreviouslyResolved,
|
||||
middlewareConfig: FlexibleChecksumsRequestMiddlewareConfig
|
||||
) => BuildMiddleware<any, any>;
|
||||
Generated
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
import {
|
||||
DeserializeMiddleware,
|
||||
RelativeMiddlewareOptions,
|
||||
} from "@smithy/types";
|
||||
import { PreviouslyResolved } from "./configuration";
|
||||
export interface FlexibleChecksumsResponseMiddlewareConfig {
|
||||
requestValidationModeMember?: string;
|
||||
responseAlgorithms?: string[];
|
||||
}
|
||||
export declare const flexibleChecksumsResponseMiddlewareOptions: RelativeMiddlewareOptions;
|
||||
export declare const flexibleChecksumsResponseMiddleware: (
|
||||
config: PreviouslyResolved,
|
||||
middlewareConfig: FlexibleChecksumsResponseMiddlewareConfig
|
||||
) => DeserializeMiddleware<any, any>;
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
import { ChecksumConstructor, Encoder, HashConstructor } from "@smithy/types";
|
||||
export interface GetChecksumDigestOptions {
|
||||
checksumAlgorithmFn: ChecksumConstructor | HashConstructor;
|
||||
base64Encoder: Encoder;
|
||||
}
|
||||
export declare const getChecksum: (
|
||||
body: unknown,
|
||||
{ checksumAlgorithmFn, base64Encoder }: GetChecksumDigestOptions
|
||||
) => Promise<string>;
|
||||
Generated
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
import { RequestChecksumCalculation } from "./constants";
|
||||
export interface GetChecksumAlgorithmForRequestOptions {
|
||||
requestChecksumRequired: boolean;
|
||||
requestAlgorithmMember?: string;
|
||||
requestChecksumCalculation: RequestChecksumCalculation;
|
||||
}
|
||||
export declare const getChecksumAlgorithmForRequest: (
|
||||
input: any,
|
||||
{
|
||||
requestChecksumRequired,
|
||||
requestAlgorithmMember,
|
||||
requestChecksumCalculation,
|
||||
}: GetChecksumAlgorithmForRequestOptions
|
||||
) => ChecksumAlgorithm | string | undefined;
|
||||
Generated
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
export declare const getChecksumAlgorithmListForResponse: (
|
||||
responseAlgorithms?: string[]
|
||||
) => ChecksumAlgorithm[];
|
||||
Generated
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
export declare const getChecksumLocationName: (
|
||||
algorithm: ChecksumAlgorithm | string
|
||||
) => string;
|
||||
Generated
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { AwsCrc32 } from "@aws-crypto/crc32";
|
||||
export declare const getCrc32ChecksumAlgorithmFunction: () => typeof AwsCrc32;
|
||||
Generated
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
import { AwsCrc32 } from "@aws-crypto/crc32";
|
||||
import { Checksum } from "@smithy/types";
|
||||
declare class NodeCrc32 implements Checksum {
|
||||
private checksum;
|
||||
update(data: Uint8Array): void;
|
||||
digest(): Promise<Uint8Array>;
|
||||
reset(): void;
|
||||
}
|
||||
export declare const getCrc32ChecksumAlgorithmFunction: () =>
|
||||
| typeof NodeCrc32
|
||||
| typeof AwsCrc32;
|
||||
export {};
|
||||
Generated
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
import { Pluggable } from "@smithy/types";
|
||||
import { PreviouslyResolved } from "./configuration";
|
||||
import { FlexibleChecksumsInputMiddlewareConfig } from "./flexibleChecksumsInputMiddleware";
|
||||
import { FlexibleChecksumsRequestMiddlewareConfig } from "./flexibleChecksumsMiddleware";
|
||||
import { FlexibleChecksumsResponseMiddlewareConfig } from "./flexibleChecksumsResponseMiddleware";
|
||||
export interface FlexibleChecksumsMiddlewareConfig
|
||||
extends FlexibleChecksumsRequestMiddlewareConfig,
|
||||
FlexibleChecksumsInputMiddlewareConfig,
|
||||
FlexibleChecksumsResponseMiddlewareConfig {}
|
||||
export declare const getFlexibleChecksumsPlugin: (
|
||||
config: PreviouslyResolved,
|
||||
middlewareConfig: FlexibleChecksumsMiddlewareConfig
|
||||
) => Pluggable<any, any>;
|
||||
Generated
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { HeaderBag } from "@smithy/types";
|
||||
export declare const hasHeader: (header: string, headers: HeaderBag) => boolean;
|
||||
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import { HeaderBag } from "@smithy/types";
|
||||
export declare const hasHeaderWithPrefix: (
|
||||
headerPrefix: string,
|
||||
headers: HeaderBag
|
||||
) => boolean;
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
export declare const isChecksumWithPartNumber: (checksum: string) => boolean;
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
export declare const isStreaming: (body: unknown) => boolean;
|
||||
Generated
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
import { ChecksumConstructor, Provider } from "@smithy/types";
|
||||
import {
|
||||
RequestChecksumCalculation,
|
||||
ResponseChecksumValidation,
|
||||
} from "./constants";
|
||||
export interface FlexibleChecksumsInputConfig {
|
||||
requestChecksumCalculation?:
|
||||
| RequestChecksumCalculation
|
||||
| Provider<RequestChecksumCalculation>;
|
||||
responseChecksumValidation?:
|
||||
| ResponseChecksumValidation
|
||||
| Provider<ResponseChecksumValidation>;
|
||||
requestStreamBufferSize?: number | false;
|
||||
checksumAlgorithms?: {
|
||||
CRC32?: ChecksumConstructor;
|
||||
CRC32C?: ChecksumConstructor;
|
||||
CRC64NVME?: ChecksumConstructor;
|
||||
SHA1?: ChecksumConstructor;
|
||||
SHA256?: ChecksumConstructor;
|
||||
} & {
|
||||
[algorithmId: string]: ChecksumConstructor;
|
||||
};
|
||||
}
|
||||
export interface FlexibleChecksumsResolvedConfig {
|
||||
requestChecksumCalculation: Provider<RequestChecksumCalculation>;
|
||||
responseChecksumValidation: Provider<ResponseChecksumValidation>;
|
||||
requestStreamBufferSize: number;
|
||||
checksumAlgorithms?: FlexibleChecksumsInputConfig["checksumAlgorithms"];
|
||||
}
|
||||
export declare const resolveFlexibleChecksumsConfig: <T>(
|
||||
input: T & FlexibleChecksumsInputConfig
|
||||
) => T & FlexibleChecksumsResolvedConfig;
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
import { ChecksumConstructor, HashConstructor } from "@smithy/types";
|
||||
import { PreviouslyResolved } from "./configuration";
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
export declare const selectChecksumAlgorithmFunction: (
|
||||
checksumAlgorithm: ChecksumAlgorithm | string,
|
||||
config: PreviouslyResolved
|
||||
) => ChecksumConstructor | HashConstructor;
|
||||
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import { ChecksumConstructor, HashConstructor } from "@smithy/types";
|
||||
export declare const stringHasher: (
|
||||
checksumAlgorithmFn: ChecksumConstructor | HashConstructor,
|
||||
body: any
|
||||
) => Promise<Uint8Array>;
|
||||
Generated
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
export declare enum SelectorType {
|
||||
ENV = "env",
|
||||
CONFIG = "shared config entry",
|
||||
}
|
||||
export declare const stringUnionSelector: <U extends object, K extends keyof U>(
|
||||
obj: Record<string, string | undefined>,
|
||||
key: string,
|
||||
union: U,
|
||||
type: SelectorType
|
||||
) => U[K] | undefined;
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import { ChecksumAlgorithm } from "./constants";
|
||||
export declare const CLIENT_SUPPORTED_ALGORITHMS: ChecksumAlgorithm[];
|
||||
export declare const PRIORITY_ORDER_ALGORITHMS: ChecksumAlgorithm[];
|
||||
Generated
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
import { HttpResponse } from "@smithy/core/protocols";
|
||||
import { Logger } from "@smithy/types";
|
||||
import { PreviouslyResolved } from "./configuration";
|
||||
export interface ValidateChecksumFromResponseOptions {
|
||||
config: PreviouslyResolved;
|
||||
responseAlgorithms?: string[];
|
||||
logger?: Logger;
|
||||
}
|
||||
export declare const validateChecksumFromResponse: (
|
||||
response: HttpResponse,
|
||||
{ config, responseAlgorithms, logger }: ValidateChecksumFromResponseOptions
|
||||
) => Promise<void>;
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
export { Crc64Nvme } from "./crc64-nvme/Crc64Nvme";
|
||||
export { crc64NvmeCrtContainer } from "./crc64-nvme/crc64-nvme-crt-container";
|
||||
export {
|
||||
ENV_REQUEST_CHECKSUM_CALCULATION,
|
||||
CONFIG_REQUEST_CHECKSUM_CALCULATION,
|
||||
NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS,
|
||||
} from "./flexible-checksums/NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS";
|
||||
export {
|
||||
ENV_RESPONSE_CHECKSUM_VALIDATION,
|
||||
CONFIG_RESPONSE_CHECKSUM_VALIDATION,
|
||||
NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS,
|
||||
} from "./flexible-checksums/NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS";
|
||||
export {
|
||||
RequestChecksumCalculation,
|
||||
DEFAULT_REQUEST_CHECKSUM_CALCULATION,
|
||||
ResponseChecksumValidation,
|
||||
DEFAULT_RESPONSE_CHECKSUM_VALIDATION,
|
||||
ChecksumAlgorithm,
|
||||
ChecksumLocation,
|
||||
DEFAULT_CHECKSUM_ALGORITHM,
|
||||
} from "./flexible-checksums/constants";
|
||||
export { FlexibleChecksumsRequestMiddlewareConfig } from "./flexible-checksums/flexibleChecksumsMiddleware";
|
||||
export {
|
||||
flexibleChecksumsMiddlewareOptions,
|
||||
flexibleChecksumsMiddleware,
|
||||
} from "./flexible-checksums/flexibleChecksumsMiddleware";
|
||||
export { FlexibleChecksumsMiddlewareConfig } from "./flexible-checksums/getFlexibleChecksumsPlugin";
|
||||
export { getFlexibleChecksumsPlugin } from "./flexible-checksums/getFlexibleChecksumsPlugin";
|
||||
export {
|
||||
FlexibleChecksumsInputConfig,
|
||||
FlexibleChecksumsResolvedConfig,
|
||||
} from "./flexible-checksums/resolveFlexibleChecksumsConfig";
|
||||
export { resolveFlexibleChecksumsConfig } from "./flexible-checksums/resolveFlexibleChecksumsConfig";
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"name": "@aws-sdk/checksums",
|
||||
"version": "3.1000.4",
|
||||
"description": "Checksum algorithms and flexible checksums middleware for the AWS SDK",
|
||||
"scripts": {
|
||||
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
||||
"build:cjs": "node ../../scripts/compilation/inline",
|
||||
"build:es": "tsc -p tsconfig.es.json",
|
||||
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
||||
"build:types": "tsc -p tsconfig.types.json",
|
||||
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
||||
"clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
|
||||
"extract:docs": "api-extractor run --local",
|
||||
"test": "yarn g:vitest run",
|
||||
"test:watch": "yarn g:vitest watch",
|
||||
"test:integration": "yarn g:vitest run -c vitest.config.integ.mts",
|
||||
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts",
|
||||
"test:e2e": "yarn g:vitest run -c vitest.config.e2e.mts --mode development",
|
||||
"test:e2e:watch": "yarn g:vitest watch -c vitest.config.e2e.mts"
|
||||
},
|
||||
"main": "./dist-cjs/index.js",
|
||||
"module": "./dist-es/index.js",
|
||||
"types": "./dist-types/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"author": {
|
||||
"name": "AWS SDK for JavaScript Team",
|
||||
"url": "https://aws.amazon.com/sdk-for-javascript/"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@aws-crypto/crc32": "5.2.0",
|
||||
"@aws-crypto/crc32c": "5.2.0",
|
||||
"@aws-crypto/util": "5.2.0",
|
||||
"@aws-sdk/core": "^3.974.20",
|
||||
"@aws-sdk/types": "^3.973.12",
|
||||
"@smithy/core": "^3.24.6",
|
||||
"@smithy/types": "^4.14.3",
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/recommended": "1.0.1",
|
||||
"concurrently": "7.0.0",
|
||||
"downlevel-dts": "0.10.1",
|
||||
"premove": "4.0.0",
|
||||
"typescript": "~5.8.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0"
|
||||
},
|
||||
"typesVersions": {
|
||||
"<4.5": {
|
||||
"dist-types/*": [
|
||||
"dist-types/ts3.4/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist-*/**"
|
||||
],
|
||||
"browser": {
|
||||
"./dist-es/flexible-checksums/getCrc32ChecksumAlgorithmFunction": "./dist-es/flexible-checksums/getCrc32ChecksumAlgorithmFunction.browser"
|
||||
},
|
||||
"react-native": {
|
||||
"./dist-es/flexible-checksums/getCrc32ChecksumAlgorithmFunction": "./dist-es/flexible-checksums/getCrc32ChecksumAlgorithmFunction.browser",
|
||||
"./dist-cjs/flexible-checksums/getCrc32ChecksumAlgorithmFunction": "./dist-cjs/flexible-checksums/getCrc32ChecksumAlgorithmFunction.browser"
|
||||
},
|
||||
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages-internal/checksums",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-js-v3.git",
|
||||
"directory": "packages-internal/checksums"
|
||||
}
|
||||
}
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
+930
@@ -0,0 +1,930 @@
|
||||
<!-- generated file, do not edit directly -->
|
||||
|
||||
# @aws-sdk/client-s3
|
||||
|
||||
## Description
|
||||
|
||||
AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native.
|
||||
|
||||
<p></p>
|
||||
|
||||
## Installing
|
||||
|
||||
To install this package, use the CLI of your favorite package manager:
|
||||
|
||||
- `npm install @aws-sdk/client-s3`
|
||||
- `yarn add @aws-sdk/client-s3`
|
||||
- `pnpm add @aws-sdk/client-s3`
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Import
|
||||
|
||||
The AWS SDK is modulized by clients and commands.
|
||||
To send a request, you only need to import the `S3Client` and
|
||||
the commands you need, for example `ListBucketsCommand`:
|
||||
|
||||
```js
|
||||
// ES5 example
|
||||
const { S3Client, ListBucketsCommand } = require("@aws-sdk/client-s3");
|
||||
```
|
||||
|
||||
```ts
|
||||
// ES6+ example
|
||||
import { S3Client, ListBucketsCommand } from "@aws-sdk/client-s3";
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
To send a request:
|
||||
|
||||
- Instantiate a client with configuration (e.g. credentials, region).
|
||||
- See [docs/CLIENTS](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md) for configuration details.
|
||||
- See [@aws-sdk/config](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/config/README.md) for additional options.
|
||||
- Instantiate a command with input parameters.
|
||||
- Call the `send` operation on the client, providing the command object as input.
|
||||
|
||||
```js
|
||||
const client = new S3Client({ region: "REGION" });
|
||||
|
||||
const params = { /** input parameters */ };
|
||||
const command = new ListBucketsCommand(params);
|
||||
```
|
||||
|
||||
#### Async/await
|
||||
|
||||
We recommend using the [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)
|
||||
operator to wait for the promise returned by send operation as follows:
|
||||
|
||||
```js
|
||||
// async/await.
|
||||
try {
|
||||
const data = await client.send(command);
|
||||
// process data.
|
||||
} catch (error) {
|
||||
// error handling.
|
||||
} finally {
|
||||
// finally.
|
||||
}
|
||||
```
|
||||
|
||||
#### Promises
|
||||
|
||||
You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining).
|
||||
|
||||
```js
|
||||
client
|
||||
.send(command)
|
||||
.then((data) => {
|
||||
// process data.
|
||||
})
|
||||
.catch((error) => {
|
||||
// error handling.
|
||||
})
|
||||
.finally(() => {
|
||||
// finally.
|
||||
});
|
||||
```
|
||||
|
||||
#### Aggregated client
|
||||
|
||||
The aggregated client class is exported from the same package, but without the "Client" suffix.
|
||||
|
||||
`S3` extends `S3Client` and additionally supports all operations, waiters, and paginators as methods.
|
||||
This style may be familiar to you from the AWS SDK for JavaScript v2.
|
||||
|
||||
If you are bundling the AWS SDK, we recommend using only the bare-bones client (`S3Client`).
|
||||
More details are in the blog post on
|
||||
[modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/).
|
||||
|
||||
```ts
|
||||
import { S3 } from "@aws-sdk/client-s3";
|
||||
|
||||
const client = new S3({ region: "REGION" });
|
||||
|
||||
// async/await.
|
||||
try {
|
||||
const data = await client.listBuckets(params);
|
||||
// process data.
|
||||
} catch (error) {
|
||||
// error handling.
|
||||
}
|
||||
|
||||
// Promises.
|
||||
client
|
||||
.listBuckets(params)
|
||||
.then((data) => {
|
||||
// process data.
|
||||
})
|
||||
.catch((error) => {
|
||||
// error handling.
|
||||
});
|
||||
|
||||
// callbacks (not recommended).
|
||||
client.listBuckets(params, (err, data) => {
|
||||
// process err and data.
|
||||
});
|
||||
```
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
When the service returns an exception, the error will include the exception information,
|
||||
as well as response metadata (e.g. request id).
|
||||
|
||||
```js
|
||||
try {
|
||||
const data = await client.send(command);
|
||||
// process data.
|
||||
} catch (error) {
|
||||
const { requestId, cfId, extendedRequestId } = error.$metadata;
|
||||
console.log({ requestId, cfId, extendedRequestId });
|
||||
/**
|
||||
* The keys within exceptions are also parsed.
|
||||
* You can access them by specifying exception names:
|
||||
* if (error.name === 'SomeServiceException') {
|
||||
* const value = error.specialKeyInException;
|
||||
* }
|
||||
*/
|
||||
}
|
||||
```
|
||||
|
||||
See also [docs/ERROR_HANDLING](https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/ERROR_HANDLING.md).
|
||||
|
||||
## Getting Help
|
||||
|
||||
Please use these community resources for getting help.
|
||||
We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
|
||||
|
||||
- Visit the [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)
|
||||
or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).
|
||||
- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)
|
||||
on AWS Developer Blog.
|
||||
- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`.
|
||||
- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3).
|
||||
- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose).
|
||||
|
||||
To test your universal JavaScript code in Node.js, browser and react-native environments,
|
||||
visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests).
|
||||
|
||||
## Contributing
|
||||
|
||||
This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-s3` package is updated.
|
||||
To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients).
|
||||
|
||||
## License
|
||||
|
||||
This SDK is distributed under the
|
||||
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
|
||||
see LICENSE for more information.
|
||||
|
||||
## Client Commands (Operations List)
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
AbortMultipartUpload
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/AbortMultipartUploadCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/AbortMultipartUploadCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/AbortMultipartUploadCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
CompleteMultipartUpload
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/CompleteMultipartUploadCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CompleteMultipartUploadCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CompleteMultipartUploadCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
CopyObject
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/CopyObjectCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CopyObjectCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CopyObjectCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
CreateBucket
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/CreateBucketCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
CreateBucketMetadataConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/CreateBucketMetadataConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketMetadataConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketMetadataConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
CreateBucketMetadataTableConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/CreateBucketMetadataTableConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketMetadataTableConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateBucketMetadataTableConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
CreateMultipartUpload
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/CreateMultipartUploadCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateMultipartUploadCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateMultipartUploadCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
CreateSession
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/CreateSessionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateSessionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/CreateSessionCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucket
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketAnalyticsConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketAnalyticsConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketAnalyticsConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketAnalyticsConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketCors
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketCorsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketCorsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketCorsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketEncryption
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketEncryptionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketEncryptionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketEncryptionCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketIntelligentTieringConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketIntelligentTieringConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketIntelligentTieringConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketIntelligentTieringConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketInventoryConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketInventoryConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketInventoryConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketInventoryConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketLifecycle
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketLifecycleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketLifecycleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketLifecycleCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketMetadataConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketMetadataConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketMetadataConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketMetadataConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketMetadataTableConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketMetadataTableConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketMetadataTableConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketMetadataTableConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketMetricsConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketMetricsConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketMetricsConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketMetricsConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketOwnershipControls
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketOwnershipControlsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketOwnershipControlsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketOwnershipControlsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketPolicy
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketPolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketPolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketPolicyCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketReplication
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketReplicationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketReplicationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketReplicationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketTagging
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketTaggingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketTaggingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketTaggingCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteBucketWebsite
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteBucketWebsiteCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketWebsiteCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteBucketWebsiteCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteObject
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteObjectCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteObjectCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteObjectCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteObjects
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteObjectsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteObjectsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteObjectsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeleteObjectTagging
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteObjectTaggingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteObjectTaggingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeleteObjectTaggingCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
DeletePublicAccessBlock
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeletePublicAccessBlockCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeletePublicAccessBlockCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/DeletePublicAccessBlockCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketAbac
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketAbacCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketAbacCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketAbacCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketAccelerateConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketAccelerateConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketAccelerateConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketAccelerateConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketAcl
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketAclCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketAclCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketAclCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketAnalyticsConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketAnalyticsConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketAnalyticsConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketAnalyticsConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketCors
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketCorsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketCorsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketCorsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketEncryption
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketEncryptionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketEncryptionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketEncryptionCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketIntelligentTieringConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketIntelligentTieringConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketIntelligentTieringConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketIntelligentTieringConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketInventoryConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketInventoryConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketInventoryConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketInventoryConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketLifecycleConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketLifecycleConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketLifecycleConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketLifecycleConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketLocation
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketLocationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketLocationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketLocationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketLogging
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketLoggingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketLoggingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketLoggingCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketMetadataConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketMetadataConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketMetadataConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketMetadataConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketMetadataTableConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketMetadataTableConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketMetadataTableConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketMetadataTableConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketMetricsConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketMetricsConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketMetricsConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketMetricsConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketNotificationConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketNotificationConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketNotificationConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketNotificationConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketOwnershipControls
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketOwnershipControlsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketOwnershipControlsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketOwnershipControlsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketPolicy
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketPolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketPolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketPolicyCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketPolicyStatus
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketPolicyStatusCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketPolicyStatusCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketPolicyStatusCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketReplication
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketReplicationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketReplicationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketReplicationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketRequestPayment
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketRequestPaymentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketRequestPaymentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketRequestPaymentCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketTagging
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketTaggingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketTaggingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketTaggingCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketVersioning
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketVersioningCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketVersioningCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketVersioningCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetBucketWebsite
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketWebsiteCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketWebsiteCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetBucketWebsiteCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetObject
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetObjectAcl
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectAclCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectAclCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectAclCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetObjectAttributes
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectAttributesCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectAttributesCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectAttributesCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetObjectLegalHold
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectLegalHoldCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectLegalHoldCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectLegalHoldCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetObjectLockConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectLockConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectLockConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectLockConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetObjectRetention
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectRetentionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectRetentionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectRetentionCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetObjectTagging
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectTaggingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectTaggingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectTaggingCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetObjectTorrent
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectTorrentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectTorrentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetObjectTorrentCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
GetPublicAccessBlock
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetPublicAccessBlockCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetPublicAccessBlockCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/GetPublicAccessBlockCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
HeadBucket
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/HeadBucketCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/HeadBucketCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/HeadBucketCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
HeadObject
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/HeadObjectCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/HeadObjectCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/HeadObjectCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListBucketAnalyticsConfigurations
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListBucketAnalyticsConfigurationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketAnalyticsConfigurationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketAnalyticsConfigurationsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListBucketIntelligentTieringConfigurations
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListBucketIntelligentTieringConfigurationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketIntelligentTieringConfigurationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketIntelligentTieringConfigurationsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListBucketInventoryConfigurations
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListBucketInventoryConfigurationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketInventoryConfigurationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketInventoryConfigurationsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListBucketMetricsConfigurations
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListBucketMetricsConfigurationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketMetricsConfigurationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketMetricsConfigurationsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListBuckets
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListBucketsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListBucketsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListDirectoryBuckets
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListDirectoryBucketsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListDirectoryBucketsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListDirectoryBucketsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListMultipartUploads
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListMultipartUploadsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListMultipartUploadsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListMultipartUploadsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListObjects
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListObjectsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListObjectsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListObjectsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListObjectsV2
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListObjectsV2Command/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListObjectsV2CommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListObjectsV2CommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListObjectVersions
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListObjectVersionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListObjectVersionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListObjectVersionsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
ListParts
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/ListPartsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListPartsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/ListPartsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketAbac
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketAbacCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketAbacCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketAbacCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketAccelerateConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketAccelerateConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketAccelerateConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketAccelerateConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketAcl
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketAclCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketAclCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketAclCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketAnalyticsConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketAnalyticsConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketAnalyticsConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketAnalyticsConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketCors
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketCorsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketCorsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketCorsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketEncryption
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketEncryptionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketEncryptionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketEncryptionCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketIntelligentTieringConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketIntelligentTieringConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketIntelligentTieringConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketIntelligentTieringConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketInventoryConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketInventoryConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketInventoryConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketInventoryConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketLifecycleConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketLifecycleConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketLifecycleConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketLifecycleConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketLogging
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketLoggingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketLoggingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketLoggingCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketMetricsConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketMetricsConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketMetricsConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketMetricsConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketNotificationConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketNotificationConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketNotificationConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketNotificationConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketOwnershipControls
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketOwnershipControlsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketOwnershipControlsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketOwnershipControlsCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketPolicy
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketPolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketPolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketPolicyCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketReplication
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketReplicationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketReplicationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketReplicationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketRequestPayment
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketRequestPaymentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketRequestPaymentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketRequestPaymentCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketTagging
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketTaggingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketTaggingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketTaggingCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketVersioning
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketVersioningCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketVersioningCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketVersioningCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutBucketWebsite
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketWebsiteCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketWebsiteCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutBucketWebsiteCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutObject
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutObjectCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutObjectAcl
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutObjectAclCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectAclCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectAclCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutObjectLegalHold
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutObjectLegalHoldCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectLegalHoldCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectLegalHoldCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutObjectLockConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutObjectLockConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectLockConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectLockConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutObjectRetention
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutObjectRetentionCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectRetentionCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectRetentionCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutObjectTagging
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutObjectTaggingCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectTaggingCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutObjectTaggingCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
PutPublicAccessBlock
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutPublicAccessBlockCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutPublicAccessBlockCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/PutPublicAccessBlockCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
RenameObject
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/RenameObjectCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/RenameObjectCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/RenameObjectCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
RestoreObject
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/RestoreObjectCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/RestoreObjectCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/RestoreObjectCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
SelectObjectContent
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/SelectObjectContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/SelectObjectContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/SelectObjectContentCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
UpdateBucketMetadataInventoryTableConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/UpdateBucketMetadataInventoryTableConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UpdateBucketMetadataInventoryTableConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UpdateBucketMetadataInventoryTableConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
UpdateBucketMetadataJournalTableConfiguration
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/UpdateBucketMetadataJournalTableConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UpdateBucketMetadataJournalTableConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UpdateBucketMetadataJournalTableConfigurationCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
UpdateObjectEncryption
|
||||
</summary>
|
||||
|
||||
[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/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
UploadPart
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/UploadPartCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UploadPartCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UploadPartCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
UploadPartCopy
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/UploadPartCopyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UploadPartCopyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/UploadPartCopyCommandOutput/)
|
||||
</details>
|
||||
<details>
|
||||
<summary>
|
||||
WriteGetObjectResponse
|
||||
</summary>
|
||||
|
||||
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/WriteGetObjectResponseCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/WriteGetObjectResponseCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-s3/Interface/WriteGetObjectResponseCommandOutput/)
|
||||
</details>
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveHttpAuthSchemeConfig = exports.defaultS3HttpAuthSchemeProvider = exports.defaultS3HttpAuthSchemeParametersProvider = void 0;
|
||||
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
||||
const signature_v4_multi_region_1 = require("@aws-sdk/signature-v4-multi-region");
|
||||
const client_1 = require("@smithy/core/client");
|
||||
const endpoints_1 = require("@smithy/core/endpoints");
|
||||
const endpointResolver_1 = require("../endpoint/endpointResolver");
|
||||
const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
||||
if (!input) {
|
||||
throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
||||
}
|
||||
const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
|
||||
const instructionsFn = (0, client_1.getSmithyContext)(context)?.commandInstance?.constructor
|
||||
?.getEndpointParameterInstructions;
|
||||
if (!instructionsFn) {
|
||||
throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
|
||||
}
|
||||
const endpointParameters = await (0, endpoints_1.resolveParams)(input, { getEndpointParameterInstructions: instructionsFn }, config);
|
||||
return Object.assign(defaultParameters, endpointParameters);
|
||||
};
|
||||
const _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => {
|
||||
return {
|
||||
operation: (0, client_1.getSmithyContext)(context).operation,
|
||||
region: await (0, client_1.normalizeProvider)(config.region)() || (() => {
|
||||
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
||||
})(),
|
||||
};
|
||||
};
|
||||
exports.defaultS3HttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider);
|
||||
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
||||
return {
|
||||
schemeId: "aws.auth#sigv4",
|
||||
signingProperties: {
|
||||
name: "s3",
|
||||
region: authParameters.region,
|
||||
},
|
||||
propertiesExtractor: (config, context) => ({
|
||||
signingProperties: {
|
||||
config,
|
||||
context,
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
function createAwsAuthSigv4aHttpAuthOption(authParameters) {
|
||||
return {
|
||||
schemeId: "aws.auth#sigv4a",
|
||||
signingProperties: {
|
||||
name: "s3",
|
||||
region: authParameters.region,
|
||||
},
|
||||
propertiesExtractor: (config, context) => ({
|
||||
signingProperties: {
|
||||
config,
|
||||
context,
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
|
||||
const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
|
||||
const endpoint = defaultEndpointResolver(authParameters);
|
||||
const authSchemes = endpoint.properties?.authSchemes;
|
||||
if (!authSchemes) {
|
||||
return defaultHttpAuthSchemeResolver(authParameters);
|
||||
}
|
||||
const options = [];
|
||||
for (const scheme of authSchemes) {
|
||||
const { name: resolvedName, properties = {}, ...rest } = scheme;
|
||||
const name = resolvedName.toLowerCase();
|
||||
if (resolvedName !== name) {
|
||||
console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
|
||||
}
|
||||
let schemeId;
|
||||
if (name === "sigv4a") {
|
||||
schemeId = "aws.auth#sigv4a";
|
||||
const sigv4Present = authSchemes.find((s) => {
|
||||
const name = s.name.toLowerCase();
|
||||
return name !== "sigv4a" && name.startsWith("sigv4");
|
||||
});
|
||||
if (signature_v4_multi_region_1.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (name.startsWith("sigv4")) {
|
||||
schemeId = "aws.auth#sigv4";
|
||||
}
|
||||
else {
|
||||
throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
|
||||
}
|
||||
const createOption = createHttpAuthOptionFunctions[schemeId];
|
||||
if (!createOption) {
|
||||
throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
|
||||
}
|
||||
const option = createOption(authParameters);
|
||||
option.schemeId = schemeId;
|
||||
option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };
|
||||
options.push(option);
|
||||
}
|
||||
return options;
|
||||
};
|
||||
return endpointRuleSetHttpAuthSchemeProvider;
|
||||
};
|
||||
const _defaultS3HttpAuthSchemeProvider = (authParameters) => {
|
||||
const options = [];
|
||||
switch (authParameters.operation) {
|
||||
default: {
|
||||
options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
||||
options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
|
||||
}
|
||||
}
|
||||
return options;
|
||||
};
|
||||
exports.defaultS3HttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(endpointResolver_1.defaultEndpointResolver, _defaultS3HttpAuthSchemeProvider, {
|
||||
"aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
|
||||
"aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
|
||||
});
|
||||
const resolveHttpAuthSchemeConfig = (config) => {
|
||||
const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
|
||||
const config_1 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4AConfig)(config_0);
|
||||
return Object.assign(config_1, {
|
||||
authSchemePreference: (0, client_1.normalizeProvider)(config.authSchemePreference ?? []),
|
||||
});
|
||||
};
|
||||
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
||||
+761
@@ -0,0 +1,761 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.bdd = void 0;
|
||||
const endpoints_1 = require("@smithy/core/endpoints");
|
||||
const aw = "ref", ax = "argv", ay = "backend", az = "authSchemes", aA = "disableDoubleEncoding", aB = "signingName", aC = "signingRegion", aD = "signingRegionSet";
|
||||
const a = -1, b = true, c = false, d = "isSet", e = "booleanEquals", f = "stringEquals", g = "coalesce", h = "substring", i = "", j = "aws.partition", k = "partitionResult", l = "accessPointSuffix", m = "regionPrefix", n = (n) => "outpostId_ssa_" + n + i, o = "hardwareType", p = "ite", q = "isValidHostLabel", s = "sigv4", t = "aws.isVirtualHostableS3Bucket", u = "url", v = "getAttr", w = "bucketArn", x = "--", y = "arnType", z = "accesspoint", A = (n) => "accessPointName_ssa_" + n + i, B = "s3-object-lambda", C = "s3-outposts", D = "bucketPartition", E = "us-east-1", F = "outpostType", G = "name", H = "s3", I = "{url#scheme}://{Bucket}.{url#authority}{url#path}", J = "{url#scheme}://{url#authority}{url#path}", K = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", L = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", M = "https://{Bucket}.s3.{partitionResult#dnsSuffix}", N = (n) => "{url#scheme}://{accessPointName_ssa_" + n + "}-{bucketArn#accountId}.{url#authority}{url#path}", O = (n) => "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName_ssa_" + n + "}`", P = "sigv4a", Q = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", R = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", S = "https://s3.{partitionResult#dnsSuffix}", T = { [aw]: "UseFIPS" }, U = { [aw]: "UseDualStack" }, V = { [aw]: "Bucket" }, W = { "fn": v, [ax]: [{ [aw]: k }, G] }, X = { [aw]: u }, Y = { [aw]: "Region" }, Z = { [aw]: w }, aa = { [aw]: y }, ab = { [aw]: "accessPointName_ssa_1" }, ac = { "fn": v, [ax]: [Z, "region"] }, ad = { [aw]: o }, ae = { "fn": v, [ax]: [Z, "service"] }, af = { "fn": v, [ax]: [Z, "accountId"] }, ag = { [ay]: "S3Express", [az]: [{ [aA]: true, [G]: "{_s3e_auth}", [aB]: "s3express", [aC]: "{Region}" }] }, ah = { [ay]: "S3Express", [az]: [{ [aA]: true, [G]: s, [aB]: "s3express", [aC]: "{Region}" }] }, ai = { [az]: [{ [aA]: true, [G]: P, [aB]: C, [aD]: ["*"] }, { [aA]: true, [G]: s, [aB]: C, [aC]: "{Region}" }] }, aj = { [az]: [{ [aA]: true, [G]: s, [aB]: H, [aC]: E }] }, ak = { [az]: [{ [aA]: true, [G]: s, [aB]: H, [aC]: "{Region}" }] }, al = { [az]: [{ [aA]: true, [G]: s, [aB]: B, [aC]: "{bucketArn#region}" }] }, am = { [az]: [{ [aA]: true, [G]: s, [aB]: H, [aC]: "{bucketArn#region}" }] }, an = { [az]: [{ [aA]: true, [G]: P, [aB]: C, [aD]: ["*"] }, { [aA]: true, [G]: s, [aB]: C, [aC]: "{bucketArn#region}" }] }, ao = { [az]: [{ [aA]: true, [G]: s, [aB]: B, [aC]: "{Region}" }] }, ap = [Y], aq = [{ [aw]: "Endpoint" }], as = [V], at = [V, 0, 7, true], au = [Z, "resourceId[1]"], av = ["*"];
|
||||
const _data = {
|
||||
conditions: [
|
||||
[d, ap],
|
||||
[e, [{ [aw]: "Accelerate" }, b]],
|
||||
[e, [T, b]],
|
||||
[e, [U, b]],
|
||||
[d, aq],
|
||||
[d, as],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 0, 6, b] }, i] }, "--x-s3"]],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: at }, i] }, "--xa-s3"]],
|
||||
[j, ap, k],
|
||||
[h, at, l],
|
||||
[f, [{ [aw]: l }, "--op-s3"]],
|
||||
[h, [V, 8, 12, b], m],
|
||||
[h, [V, 32, 49, b], n(2)],
|
||||
[h, [V, 49, 50, b], o],
|
||||
[e, [{ [aw]: "ForcePathStyle" }, b]],
|
||||
[f, [W, "aws-cn"]],
|
||||
[p, [U, ".dualstack", i], "_s3e_ds"],
|
||||
[q, [{ [aw]: n(2) }, c]],
|
||||
[p, [T, "-fips", i], "_s3e_fips"],
|
||||
[p, [{ fn: g, [ax]: [{ [aw]: "DisableS3ExpressSessionAuth" }, c] }, s, "sigv4-s3express"], "_s3e_auth"],
|
||||
[t, [V, c]],
|
||||
["parseURL", aq, u],
|
||||
[e, [{ fn: g, [ax]: [{ [aw]: "UseS3ExpressControlEndpoint" }, c] }, b]],
|
||||
[t, [V, b]],
|
||||
[f, [{ fn: v, [ax]: [X, "scheme"] }, "http"]],
|
||||
[q, [Y, c]],
|
||||
["aws.parseArn", as, w],
|
||||
[v, [{ fn: "split", [ax]: [V, x, 0] }, "[-2]"], "s3expressAvailabilityZoneId"],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 0, 4, c] }, i] }, "arn:"]],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 16, 18, b] }, i] }, x]],
|
||||
[e, [{ fn: v, [ax]: [X, "isIp"] }, b]],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 21, 23, b] }, i] }, x]],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 27, 29, b] }, i] }, x]],
|
||||
[f, [{ [aw]: m }, "beta"]],
|
||||
["uriEncode", as, "uri_encoded_bucket"],
|
||||
[q, [Y, b]],
|
||||
[e, [{ fn: g, [ax]: [{ [aw]: "UseObjectLambdaEndpoint" }, c] }, b]],
|
||||
[v, [Z, "resourceId[0]"], y],
|
||||
[f, [aa, i]],
|
||||
[f, [aa, z]],
|
||||
[v, au, A(1)],
|
||||
[f, [ab, i]],
|
||||
[f, [ac, i]],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 14, 16, b] }, i] }, x]],
|
||||
[f, [ad, "e"]],
|
||||
[f, [ad, "o"]],
|
||||
[f, [Y, "aws-global"]],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 19, 21, b] }, i] }, x]],
|
||||
[f, [ae, B]],
|
||||
[e, [{ fn: g, [ax]: [{ [aw]: "DisableAccessPoints" }, c] }, b]],
|
||||
[f, [ae, C]],
|
||||
[j, [ac], D],
|
||||
[q, [ab, b]],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 26, 28, b] }, i] }, x]],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 15, 17, b] }, i] }, x]],
|
||||
[v, [Z, "resourceId[4]"]],
|
||||
[f, [{ fn: g, [ax]: [{ fn: h, [ax]: [V, 20, 22, b] }, i] }, x]],
|
||||
[e, [{ [aw]: "UseGlobalEndpoint" }, b]],
|
||||
[f, [Y, E]],
|
||||
[v, au, n(1)],
|
||||
[e, [{ fn: g, [ax]: [{ [aw]: "UseArnRegion" }, b] }, b]],
|
||||
[q, [{ [aw]: n(1) }, c]],
|
||||
[v, [Z, "resourceId[2]"], F],
|
||||
[f, [Y, ac]],
|
||||
[f, [{ fn: v, [ax]: [{ [aw]: D }, G] }, W]],
|
||||
[e, [{ [aw]: "DisableMultiRegionAccessPoints" }, b]],
|
||||
[q, [ac, b]],
|
||||
[f, [{ fn: v, [ax]: [Z, "partition"] }, W]],
|
||||
[f, [af, i]],
|
||||
[f, [ae, H]],
|
||||
[q, [af, c]],
|
||||
[v, [Z, "resourceId[3]"], A(2)],
|
||||
[q, [ab, c]],
|
||||
[f, [{ [aw]: F }, z]],
|
||||
[q, [{ [aw]: A(2) }, c]]
|
||||
],
|
||||
results: [
|
||||
[a],
|
||||
[a, "Accelerate cannot be used with FIPS"],
|
||||
[a, "Cannot set dual-stack in combination with a custom endpoint."],
|
||||
[a, "A custom endpoint cannot be combined with FIPS"],
|
||||
[a, "A custom endpoint cannot be combined with S3 Accelerate"],
|
||||
[a, "Partition does not support FIPS"],
|
||||
[a, "S3Express does not support S3 Accelerate."],
|
||||
["{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", ag],
|
||||
[I, ag],
|
||||
[a, "S3Express bucket name is not a valid virtual hostable name."],
|
||||
["https://s3express-control{_s3e_fips}{_s3e_ds}.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ah],
|
||||
["https://{Bucket}.s3express{_s3e_fips}-{s3expressAvailabilityZoneId}{_s3e_ds}.{Region}.{partitionResult#dnsSuffix}", ag],
|
||||
[a, "Unrecognized S3Express bucket name format."],
|
||||
[J, ag],
|
||||
["https://s3express-control{_s3e_fips}{_s3e_ds}.{Region}.{partitionResult#dnsSuffix}", ah],
|
||||
[a, "Expected a endpoint to be specified but no endpoint was found"],
|
||||
["https://{Bucket}.ec2.{url#authority}", ai],
|
||||
["https://{Bucket}.ec2.s3-outposts.{Region}.{partitionResult#dnsSuffix}", ai],
|
||||
["https://{Bucket}.op-{outpostId_ssa_2}.{url#authority}", ai],
|
||||
["https://{Bucket}.op-{outpostId_ssa_2}.s3-outposts.{Region}.{partitionResult#dnsSuffix}", ai],
|
||||
[a, "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\""],
|
||||
[a, "Invalid Outposts Bucket alias - it must be a valid bucket name."],
|
||||
[a, "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`."],
|
||||
[a, "Custom endpoint `{Endpoint}` was not a valid URI"],
|
||||
[a, "S3 Accelerate cannot be used in this region"],
|
||||
["https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj],
|
||||
["https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", ak],
|
||||
["https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", aj],
|
||||
["https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", ak],
|
||||
["https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj],
|
||||
["https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", ak],
|
||||
["https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj],
|
||||
["https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", ak],
|
||||
[K, aj],
|
||||
[I, aj],
|
||||
[K, ak],
|
||||
[I, ak],
|
||||
[L, aj],
|
||||
[L, ak],
|
||||
[M, aj],
|
||||
[M, ak],
|
||||
["https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", ak],
|
||||
[a, "Invalid region: region was not a valid DNS name."],
|
||||
[a, "S3 Object Lambda does not support Dual-stack"],
|
||||
[a, "S3 Object Lambda does not support S3 Accelerate"],
|
||||
[a, "Access points are not supported for this operation"],
|
||||
[a, "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`"],
|
||||
[a, "Invalid ARN: Missing account id"],
|
||||
[N(1), al],
|
||||
["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", al],
|
||||
["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", al],
|
||||
[a, O(1)],
|
||||
[a, "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`"],
|
||||
[a, "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)"],
|
||||
[a, "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`"],
|
||||
[a, "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."],
|
||||
[a, "Invalid ARN: bucket ARN is missing a region"],
|
||||
[a, "Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided"],
|
||||
[a, "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`"],
|
||||
[a, "Access Points do not support S3 Accelerate"],
|
||||
["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", am],
|
||||
["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", am],
|
||||
["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", am],
|
||||
[N(1), am],
|
||||
["https://{accessPointName_ssa_1}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", am],
|
||||
[a, "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}"],
|
||||
[a, "S3 MRAP does not support dual-stack"],
|
||||
[a, "S3 MRAP does not support FIPS"],
|
||||
[a, "S3 MRAP does not support S3 Accelerate"],
|
||||
[a, "Invalid configuration: Multi-Region Access Point ARNs are disabled."],
|
||||
["https://{accessPointName_ssa_1}.accesspoint.s3-global.{partitionResult#dnsSuffix}", { [az]: [{ [aA]: b, name: P, [aB]: H, [aD]: av }] }],
|
||||
[a, "Client was configured for partition `{partitionResult#name}` but bucket referred to partition `{bucketArn#partition}`"],
|
||||
[a, "Invalid Access Point Name"],
|
||||
[a, "S3 Outposts does not support Dual-stack"],
|
||||
[a, "S3 Outposts does not support FIPS"],
|
||||
[a, "S3 Outposts does not support S3 Accelerate"],
|
||||
[a, "Invalid Arn: Outpost Access Point ARN contains sub resources"],
|
||||
["https://{accessPointName_ssa_2}-{bucketArn#accountId}.{outpostId_ssa_1}.{url#authority}", an],
|
||||
["https://{accessPointName_ssa_2}-{bucketArn#accountId}.{outpostId_ssa_1}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", an],
|
||||
[a, O(2)],
|
||||
[a, "Expected an outpost type `accesspoint`, found {outpostType}"],
|
||||
[a, "Invalid ARN: expected an access point name"],
|
||||
[a, "Invalid ARN: Expected a 4-component resource"],
|
||||
[a, "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId_ssa_1}`"],
|
||||
[a, "Invalid ARN: The Outpost Id was not set"],
|
||||
[a, "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})"],
|
||||
[a, "Invalid ARN: No ARN type specified"],
|
||||
[a, "Invalid ARN: `{Bucket}` was not a valid ARN"],
|
||||
[a, "Path-style addressing cannot be used with ARN buckets"],
|
||||
["https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", aj],
|
||||
["https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ak],
|
||||
["https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", aj],
|
||||
["https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ak],
|
||||
["https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", aj],
|
||||
["https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ak],
|
||||
[Q, aj],
|
||||
[Q, ak],
|
||||
[R, aj],
|
||||
[R, ak],
|
||||
["https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", ak],
|
||||
[a, "Path-style addressing cannot be used with S3 Accelerate"],
|
||||
[J, ao],
|
||||
["https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", ao],
|
||||
["https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", ao],
|
||||
["https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj],
|
||||
["https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", ak],
|
||||
["https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", aj],
|
||||
["https://s3-fips.{Region}.{partitionResult#dnsSuffix}", ak],
|
||||
["https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", aj],
|
||||
["https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", ak],
|
||||
[J, aj],
|
||||
[J, ak],
|
||||
[S, aj],
|
||||
[S, ak],
|
||||
["https://s3.{Region}.{partitionResult#dnsSuffix}", ak],
|
||||
[a, "A region must be set when sending requests to S3."]
|
||||
]
|
||||
};
|
||||
const root = 2;
|
||||
const r = 100_000_000;
|
||||
const nodes = new Int32Array([
|
||||
-1, 1, -1,
|
||||
0, 3, r + 115,
|
||||
1, 424, 4,
|
||||
2, 272, 5,
|
||||
3, 233, 6,
|
||||
4, 85, 7,
|
||||
5, 15, 8,
|
||||
8, 9, r + 115,
|
||||
16, 10, 13,
|
||||
18, 11, 13,
|
||||
19, 12, 13,
|
||||
22, r + 14, 13,
|
||||
35, 14, r + 42,
|
||||
36, r + 103, 435,
|
||||
6, 271, 16,
|
||||
7, 270, 17,
|
||||
8, 19, 18,
|
||||
14, 501, 106,
|
||||
9, 20, 24,
|
||||
10, 21, 24,
|
||||
11, 22, 24,
|
||||
12, 23, 24,
|
||||
13, 547, 24,
|
||||
14, 77, 25,
|
||||
20, 73, 26,
|
||||
26, 27, 78,
|
||||
37, 28, r + 86,
|
||||
38, r + 86, 29,
|
||||
39, 47, 30,
|
||||
48, r + 58, 31,
|
||||
50, 32, r + 85,
|
||||
51, 33, 136,
|
||||
55, r + 76, 34,
|
||||
59, 35, r + 84,
|
||||
60, 39, 36,
|
||||
61, 37, r + 83,
|
||||
62, 38, 146,
|
||||
63, 41, r + 46,
|
||||
61, 40, r + 83,
|
||||
62, 41, 150,
|
||||
64, 42, r + 54,
|
||||
66, 43, r + 53,
|
||||
70, 44, r + 52,
|
||||
71, 45, r + 81,
|
||||
73, 46, r + 80,
|
||||
74, r + 78, r + 79,
|
||||
40, 48, r + 57,
|
||||
41, r + 57, 49,
|
||||
42, 185, 50,
|
||||
48, 62, 51,
|
||||
49, r + 45, 52,
|
||||
51, 53, 526,
|
||||
60, 56, 54,
|
||||
62, r + 55, 55,
|
||||
63, 57, r + 46,
|
||||
62, r + 55, 57,
|
||||
64, 58, r + 54,
|
||||
66, 59, r + 53,
|
||||
69, 60, r + 65,
|
||||
70, 61, r + 52,
|
||||
72, r + 64, r + 51,
|
||||
49, r + 45, 63,
|
||||
51, 64, 526,
|
||||
60, 67, 65,
|
||||
62, r + 55, 66,
|
||||
63, 68, r + 46,
|
||||
62, r + 55, 68,
|
||||
64, 69, r + 54,
|
||||
66, 70, r + 53,
|
||||
68, r + 47, 71,
|
||||
70, 72, r + 52,
|
||||
72, r + 50, r + 51,
|
||||
25, 74, r + 42,
|
||||
46, r + 39, 75,
|
||||
57, 76, r + 41,
|
||||
58, r + 40, r + 41,
|
||||
26, r + 88, 78,
|
||||
28, r + 87, 79,
|
||||
34, 82, 80,
|
||||
35, 81, 545,
|
||||
36, r + 103, r + 115,
|
||||
46, r + 97, 83,
|
||||
57, 84, r + 99,
|
||||
58, r + 98, r + 99,
|
||||
5, 101, 86,
|
||||
8, 87, r + 115,
|
||||
16, 88, 89,
|
||||
18, 91, 89,
|
||||
19, 90, 92,
|
||||
21, 97, 95,
|
||||
19, 93, 92,
|
||||
21, 98, 95,
|
||||
21, 97, 94,
|
||||
22, r + 14, 95,
|
||||
35, 96, r + 42,
|
||||
36, r + 103, r + 42,
|
||||
22, r + 13, 98,
|
||||
35, 99, r + 42,
|
||||
36, r + 101, 100,
|
||||
46, r + 110, r + 111,
|
||||
6, 214, 102,
|
||||
7, 208, 103,
|
||||
8, 119, 104,
|
||||
14, 118, 105,
|
||||
21, 106, r + 23,
|
||||
26, 107, 502,
|
||||
37, 108, r + 86,
|
||||
38, r + 86, 109,
|
||||
39, 112, 110,
|
||||
48, r + 58, 111,
|
||||
50, 136, r + 85,
|
||||
40, 113, r + 57,
|
||||
41, r + 57, 114,
|
||||
42, 115, 500,
|
||||
48, r + 56, 116,
|
||||
52, 117, r + 72,
|
||||
65, r + 69, r + 72,
|
||||
21, 501, r + 23,
|
||||
9, 120, 124,
|
||||
10, 121, 124,
|
||||
11, 122, 124,
|
||||
12, 123, 124,
|
||||
13, 202, 124,
|
||||
14, 195, 125,
|
||||
20, 190, 126,
|
||||
21, 127, r + 23,
|
||||
23, 128, 129,
|
||||
24, 189, 129,
|
||||
26, 130, 197,
|
||||
37, 131, r + 86,
|
||||
38, r + 86, 132,
|
||||
39, 159, 133,
|
||||
48, r + 58, 134,
|
||||
50, 135, r + 85,
|
||||
51, 141, 136,
|
||||
55, r + 76, 137,
|
||||
59, 138, r + 84,
|
||||
60, r + 83, 139,
|
||||
61, 140, r + 83,
|
||||
63, r + 83, r + 46,
|
||||
55, r + 76, 142,
|
||||
59, 143, r + 84,
|
||||
60, 148, 144,
|
||||
61, 145, r + 83,
|
||||
62, 147, 146,
|
||||
63, 150, r + 46,
|
||||
63, 153, r + 46,
|
||||
61, 149, r + 83,
|
||||
62, 153, 150,
|
||||
64, 151, r + 54,
|
||||
66, 152, r + 53,
|
||||
70, r + 82, r + 52,
|
||||
64, 154, r + 54,
|
||||
66, 155, r + 53,
|
||||
70, 156, r + 52,
|
||||
71, 157, r + 81,
|
||||
73, 158, r + 80,
|
||||
74, r + 77, r + 79,
|
||||
40, 160, r + 57,
|
||||
41, r + 57, 161,
|
||||
42, 185, 162,
|
||||
48, 174, 163,
|
||||
49, r + 45, 164,
|
||||
51, 165, 526,
|
||||
60, 168, 166,
|
||||
62, r + 55, 167,
|
||||
63, 169, r + 46,
|
||||
62, r + 55, 169,
|
||||
64, 170, r + 54,
|
||||
66, 171, r + 53,
|
||||
69, 172, r + 65,
|
||||
70, 173, r + 52,
|
||||
72, r + 63, r + 51,
|
||||
49, r + 45, 175,
|
||||
51, 176, 526,
|
||||
60, 179, 177,
|
||||
62, r + 55, 178,
|
||||
63, 180, r + 46,
|
||||
62, r + 55, 180,
|
||||
64, 181, r + 54,
|
||||
66, 182, r + 53,
|
||||
68, r + 47, 183,
|
||||
70, 184, r + 52,
|
||||
72, r + 48, r + 51,
|
||||
48, r + 56, 186,
|
||||
52, 187, r + 72,
|
||||
65, r + 69, 188,
|
||||
67, r + 70, r + 71,
|
||||
25, r + 36, r + 42,
|
||||
21, 191, r + 23,
|
||||
25, 192, r + 42,
|
||||
30, 194, 193,
|
||||
46, r + 34, r + 36,
|
||||
46, r + 33, r + 35,
|
||||
21, 196, r + 23,
|
||||
26, r + 88, 197,
|
||||
28, r + 87, 198,
|
||||
34, 201, 199,
|
||||
35, 200, 545,
|
||||
36, r + 101, r + 115,
|
||||
46, r + 95, r + 96,
|
||||
17, 203, r + 22,
|
||||
20, 204, r + 21,
|
||||
21, 205, 550,
|
||||
33, 206, 550,
|
||||
44, r + 16, 207,
|
||||
45, r + 18, r + 20,
|
||||
8, 209, 215,
|
||||
16, 210, 220,
|
||||
18, 211, 220,
|
||||
19, 212, 224,
|
||||
20, 213, 227,
|
||||
21, 231, 401,
|
||||
8, 218, 215,
|
||||
19, 216, r + 9,
|
||||
20, 217, 227,
|
||||
21, 231, r + 9,
|
||||
16, 219, 220,
|
||||
18, 223, 220,
|
||||
19, 221, 224,
|
||||
20, 222, 227,
|
||||
21, 231, r + 12,
|
||||
19, 226, 224,
|
||||
20, 225, r + 9,
|
||||
21, r + 9, r + 12,
|
||||
20, 230, 227,
|
||||
21, 228, r + 9,
|
||||
30, 229, r + 9,
|
||||
34, r + 7, r + 9,
|
||||
21, 231, 415,
|
||||
30, 232, r + 8,
|
||||
34, r + 7, r + 8,
|
||||
4, r + 2, 234,
|
||||
5, 235, 480,
|
||||
6, 271, 236,
|
||||
7, 270, 237,
|
||||
8, 238, 491,
|
||||
9, 239, 243,
|
||||
10, 240, 243,
|
||||
11, 241, 243,
|
||||
12, 242, 243,
|
||||
13, 547, 243,
|
||||
14, 266, 244,
|
||||
20, 264, 245,
|
||||
26, 246, 267,
|
||||
37, 247, r + 86,
|
||||
38, r + 86, 248,
|
||||
39, 249, 518,
|
||||
40, 250, r + 57,
|
||||
41, r + 57, 251,
|
||||
42, 538, 252,
|
||||
48, r + 43, 253,
|
||||
49, r + 45, 254,
|
||||
51, 255, 526,
|
||||
60, 258, 256,
|
||||
62, r + 55, 257,
|
||||
63, 259, r + 46,
|
||||
62, r + 55, 259,
|
||||
64, 260, r + 54,
|
||||
66, 261, r + 53,
|
||||
69, 262, r + 65,
|
||||
70, 263, r + 52,
|
||||
72, r + 62, r + 51,
|
||||
25, 265, r + 42,
|
||||
46, r + 31, r + 32,
|
||||
26, r + 88, 267,
|
||||
28, r + 87, 268,
|
||||
34, 269, 544,
|
||||
46, r + 93, r + 94,
|
||||
8, 397, r + 9,
|
||||
8, 407, r + 9,
|
||||
3, 346, 273,
|
||||
4, r + 3, 274,
|
||||
5, 284, 275,
|
||||
8, 276, r + 115,
|
||||
15, r + 5, 277,
|
||||
16, 278, 281,
|
||||
18, 279, 281,
|
||||
19, 280, 281,
|
||||
22, r + 14, 281,
|
||||
35, 282, r + 42,
|
||||
36, r + 102, 283,
|
||||
46, r + 106, r + 107,
|
||||
6, 405, 285,
|
||||
7, 395, 286,
|
||||
8, 295, 287,
|
||||
14, 501, 288,
|
||||
26, 289, 502,
|
||||
37, 290, r + 86,
|
||||
38, r + 86, 291,
|
||||
39, 292, 307,
|
||||
40, 293, r + 57,
|
||||
41, r + 57, 294,
|
||||
42, 335, 500,
|
||||
9, 296, 300,
|
||||
10, 297, 300,
|
||||
11, 298, 300,
|
||||
12, 299, 300,
|
||||
13, 394, 300,
|
||||
14, 339, 301,
|
||||
15, r + 5, 302,
|
||||
20, 337, 303,
|
||||
26, 304, 341,
|
||||
37, 305, r + 86,
|
||||
38, r + 86, 306,
|
||||
39, 309, 307,
|
||||
48, r + 58, 308,
|
||||
50, r + 74, r + 85,
|
||||
40, 310, r + 57,
|
||||
41, r + 57, 311,
|
||||
42, 335, 312,
|
||||
48, 324, 313,
|
||||
49, r + 45, 314,
|
||||
51, 315, 526,
|
||||
60, 318, 316,
|
||||
62, r + 55, 317,
|
||||
63, 319, r + 46,
|
||||
62, r + 55, 319,
|
||||
64, 320, r + 54,
|
||||
66, 321, r + 53,
|
||||
69, 322, r + 65,
|
||||
70, 323, r + 52,
|
||||
72, r + 61, r + 51,
|
||||
49, r + 45, 325,
|
||||
51, 326, 526,
|
||||
60, 329, 327,
|
||||
62, r + 55, 328,
|
||||
63, 330, r + 46,
|
||||
62, r + 55, 330,
|
||||
64, 331, r + 54,
|
||||
66, 332, r + 53,
|
||||
68, r + 47, 333,
|
||||
70, 334, r + 52,
|
||||
72, r + 49, r + 51,
|
||||
48, r + 56, 336,
|
||||
52, r + 67, r + 72,
|
||||
25, 338, r + 42,
|
||||
46, r + 27, r + 28,
|
||||
15, r + 5, 340,
|
||||
26, r + 88, 341,
|
||||
28, r + 87, 342,
|
||||
34, 345, 343,
|
||||
35, 344, 545,
|
||||
36, r + 102, r + 115,
|
||||
46, r + 91, r + 92,
|
||||
4, r + 2, 347,
|
||||
5, 357, 348,
|
||||
8, 349, r + 115,
|
||||
15, r + 5, 350,
|
||||
16, 351, 354,
|
||||
18, 352, 354,
|
||||
19, 353, 354,
|
||||
22, r + 14, 354,
|
||||
35, 355, r + 42,
|
||||
36, r + 43, 356,
|
||||
46, r + 104, r + 105,
|
||||
6, 405, 358,
|
||||
7, 395, 359,
|
||||
8, 360, 491,
|
||||
9, 361, 365,
|
||||
10, 362, 365,
|
||||
11, 363, 365,
|
||||
12, 364, 365,
|
||||
13, 394, 365,
|
||||
14, 389, 366,
|
||||
15, r + 5, 367,
|
||||
20, 387, 368,
|
||||
26, 369, 391,
|
||||
37, 370, r + 86,
|
||||
38, r + 86, 371,
|
||||
39, 372, 518,
|
||||
40, 373, r + 57,
|
||||
41, r + 57, 374,
|
||||
42, 538, 375,
|
||||
48, r + 43, 376,
|
||||
49, r + 45, 377,
|
||||
51, 378, 526,
|
||||
60, 381, 379,
|
||||
62, r + 55, 380,
|
||||
63, 382, r + 46,
|
||||
62, r + 55, 382,
|
||||
64, 383, r + 54,
|
||||
66, 384, r + 53,
|
||||
69, 385, r + 65,
|
||||
70, 386, r + 52,
|
||||
72, r + 60, r + 51,
|
||||
25, 388, r + 42,
|
||||
46, r + 25, r + 26,
|
||||
15, r + 5, 390,
|
||||
26, r + 88, 391,
|
||||
28, r + 87, 392,
|
||||
34, 393, 544,
|
||||
46, r + 89, r + 90,
|
||||
15, r + 5, 547,
|
||||
8, 396, r + 9,
|
||||
15, r + 5, 397,
|
||||
16, 398, 410,
|
||||
18, 399, 410,
|
||||
19, 400, 410,
|
||||
20, 401, r + 9,
|
||||
27, 402, r + 12,
|
||||
29, r + 11, 403,
|
||||
31, r + 11, 404,
|
||||
32, r + 11, 422,
|
||||
8, 406, r + 9,
|
||||
15, r + 5, 407,
|
||||
16, 408, 410,
|
||||
18, 409, 410,
|
||||
19, 411, 410,
|
||||
20, r + 12, r + 9,
|
||||
20, 414, 412,
|
||||
22, 413, r + 9,
|
||||
34, r + 10, r + 9,
|
||||
22, 416, 415,
|
||||
27, 419, r + 12,
|
||||
27, 418, 417,
|
||||
34, r + 10, r + 12,
|
||||
34, r + 10, 419,
|
||||
43, r + 11, 420,
|
||||
47, r + 11, 421,
|
||||
53, r + 11, 422,
|
||||
54, r + 11, 423,
|
||||
56, r + 11, r + 12,
|
||||
2, r + 1, 425,
|
||||
3, 478, 426,
|
||||
4, r + 4, 427,
|
||||
5, 438, 428,
|
||||
8, 429, r + 115,
|
||||
16, 430, 433,
|
||||
18, 431, 433,
|
||||
19, 432, 433,
|
||||
22, r + 14, 433,
|
||||
35, 434, r + 42,
|
||||
36, r + 44, 435,
|
||||
46, r + 112, 436,
|
||||
57, 437, r + 114,
|
||||
58, r + 113, r + 114,
|
||||
6, r + 6, 439,
|
||||
7, r + 6, 440,
|
||||
8, 450, 441,
|
||||
14, 501, 442,
|
||||
26, 443, 502,
|
||||
37, 444, r + 86,
|
||||
38, r + 86, 445,
|
||||
39, 446, 465,
|
||||
40, 447, r + 57,
|
||||
41, r + 57, 448,
|
||||
42, 471, 449,
|
||||
48, r + 44, 500,
|
||||
9, 451, 455,
|
||||
10, 452, 455,
|
||||
11, 453, 455,
|
||||
12, 454, 455,
|
||||
13, 547, 455,
|
||||
14, 473, 456,
|
||||
15, 460, 457,
|
||||
20, 458, 461,
|
||||
25, 459, r + 42,
|
||||
46, r + 37, r + 38,
|
||||
20, 540, 461,
|
||||
26, 462, 474,
|
||||
37, 463, r + 86,
|
||||
38, r + 86, 464,
|
||||
39, 467, 465,
|
||||
48, r + 58, 466,
|
||||
50, r + 75, r + 85,
|
||||
40, 468, r + 57,
|
||||
41, r + 57, 469,
|
||||
42, 471, 470,
|
||||
48, r + 44, 524,
|
||||
48, r + 44, 472,
|
||||
52, r + 68, r + 72,
|
||||
26, r + 88, 474,
|
||||
28, r + 87, 475,
|
||||
34, r + 100, 476,
|
||||
35, 477, 545,
|
||||
36, r + 44, r + 115,
|
||||
4, r + 2, 479,
|
||||
5, 488, 480,
|
||||
8, 481, r + 115,
|
||||
16, 482, 485,
|
||||
18, 483, 485,
|
||||
19, 484, 485,
|
||||
22, r + 14, 485,
|
||||
35, 486, r + 42,
|
||||
36, r + 43, 487,
|
||||
46, r + 108, r + 109,
|
||||
6, r + 6, 489,
|
||||
7, r + 6, 490,
|
||||
8, 503, 491,
|
||||
14, 501, 492,
|
||||
26, 493, 502,
|
||||
37, 494, r + 86,
|
||||
38, r + 86, 495,
|
||||
39, 496, 518,
|
||||
40, 497, r + 57,
|
||||
41, r + 57, 498,
|
||||
42, 538, 499,
|
||||
48, r + 43, 500,
|
||||
49, r + 45, 526,
|
||||
26, r + 88, 502,
|
||||
28, r + 87, r + 115,
|
||||
9, 504, 508,
|
||||
10, 505, 508,
|
||||
11, 506, 508,
|
||||
12, 507, 508,
|
||||
13, 547, 508,
|
||||
14, 541, 509,
|
||||
15, 513, 510,
|
||||
20, 511, 514,
|
||||
25, 512, r + 42,
|
||||
46, r + 29, r + 30,
|
||||
20, 540, 514,
|
||||
26, 515, 542,
|
||||
37, 516, r + 86,
|
||||
38, r + 86, 517,
|
||||
39, 520, 518,
|
||||
48, r + 58, 519,
|
||||
50, r + 73, r + 85,
|
||||
40, 521, r + 57,
|
||||
41, r + 57, 522,
|
||||
42, 538, 523,
|
||||
48, r + 43, 524,
|
||||
49, r + 45, 525,
|
||||
51, 529, 526,
|
||||
60, r + 55, 527,
|
||||
62, r + 55, 528,
|
||||
63, r + 55, r + 46,
|
||||
60, 532, 530,
|
||||
62, r + 55, 531,
|
||||
63, 533, r + 46,
|
||||
62, r + 55, 533,
|
||||
64, 534, r + 54,
|
||||
66, 535, r + 53,
|
||||
69, 536, r + 65,
|
||||
70, 537, r + 52,
|
||||
72, r + 59, r + 51,
|
||||
48, r + 43, 539,
|
||||
52, r + 66, r + 72,
|
||||
25, r + 24, r + 42,
|
||||
26, r + 88, 542,
|
||||
28, r + 87, 543,
|
||||
34, r + 100, 544,
|
||||
35, 546, 545,
|
||||
36, r + 42, r + 115,
|
||||
36, r + 43, r + 115,
|
||||
17, 548, r + 22,
|
||||
20, 549, r + 21,
|
||||
33, 552, 550,
|
||||
44, r + 17, 551,
|
||||
45, r + 19, r + 20,
|
||||
44, r + 15, 553,
|
||||
45, r + 15, r + 20,
|
||||
]);
|
||||
exports.bdd = endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.defaultEndpointResolver = void 0;
|
||||
const client_1 = require("@aws-sdk/core/client");
|
||||
const endpoints_1 = require("@smithy/core/endpoints");
|
||||
const bdd_1 = require("./bdd");
|
||||
const cache = new endpoints_1.EndpointCache({
|
||||
size: 50,
|
||||
params: [
|
||||
"Accelerate",
|
||||
"Bucket",
|
||||
"DisableAccessPoints",
|
||||
"DisableMultiRegionAccessPoints",
|
||||
"DisableS3ExpressSessionAuth",
|
||||
"Endpoint",
|
||||
"ForcePathStyle",
|
||||
"Region",
|
||||
"UseArnRegion",
|
||||
"UseDualStack",
|
||||
"UseFIPS",
|
||||
"UseGlobalEndpoint",
|
||||
"UseObjectLambdaEndpoint",
|
||||
"UseS3ExpressControlEndpoint",
|
||||
],
|
||||
});
|
||||
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
||||
return cache.get(endpointParams, () => (0, endpoints_1.decideEndpoint)(bdd_1.bdd, {
|
||||
endpointParams: endpointParams,
|
||||
logger: context.logger,
|
||||
}));
|
||||
};
|
||||
exports.defaultEndpointResolver = defaultEndpointResolver;
|
||||
endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
|
||||
+3055
File diff suppressed because it is too large
Load Diff
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.S3ServiceException = exports.__ServiceException = void 0;
|
||||
const client_1 = require("@smithy/core/client");
|
||||
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
||||
class S3ServiceException extends client_1.ServiceException {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
Object.setPrototypeOf(this, S3ServiceException.prototype);
|
||||
}
|
||||
}
|
||||
exports.S3ServiceException = S3ServiceException;
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ObjectAlreadyInActiveTierError = exports.IdempotencyParameterMismatch = exports.TooManyParts = exports.InvalidWriteOffset = exports.InvalidRequest = exports.EncryptionTypeMismatch = exports.NotFound = exports.NoSuchKey = exports.InvalidObjectState = exports.NoSuchBucket = exports.BucketAlreadyOwnedByYou = exports.BucketAlreadyExists = exports.ObjectNotInActiveTierError = exports.AccessDenied = exports.NoSuchUpload = void 0;
|
||||
const S3ServiceException_1 = require("./S3ServiceException");
|
||||
class NoSuchUpload extends S3ServiceException_1.S3ServiceException {
|
||||
name = "NoSuchUpload";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "NoSuchUpload",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, NoSuchUpload.prototype);
|
||||
}
|
||||
}
|
||||
exports.NoSuchUpload = NoSuchUpload;
|
||||
class AccessDenied extends S3ServiceException_1.S3ServiceException {
|
||||
name = "AccessDenied";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "AccessDenied",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, AccessDenied.prototype);
|
||||
}
|
||||
}
|
||||
exports.AccessDenied = AccessDenied;
|
||||
class ObjectNotInActiveTierError extends S3ServiceException_1.S3ServiceException {
|
||||
name = "ObjectNotInActiveTierError";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "ObjectNotInActiveTierError",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, ObjectNotInActiveTierError.prototype);
|
||||
}
|
||||
}
|
||||
exports.ObjectNotInActiveTierError = ObjectNotInActiveTierError;
|
||||
class BucketAlreadyExists extends S3ServiceException_1.S3ServiceException {
|
||||
name = "BucketAlreadyExists";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "BucketAlreadyExists",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, BucketAlreadyExists.prototype);
|
||||
}
|
||||
}
|
||||
exports.BucketAlreadyExists = BucketAlreadyExists;
|
||||
class BucketAlreadyOwnedByYou extends S3ServiceException_1.S3ServiceException {
|
||||
name = "BucketAlreadyOwnedByYou";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "BucketAlreadyOwnedByYou",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, BucketAlreadyOwnedByYou.prototype);
|
||||
}
|
||||
}
|
||||
exports.BucketAlreadyOwnedByYou = BucketAlreadyOwnedByYou;
|
||||
class NoSuchBucket extends S3ServiceException_1.S3ServiceException {
|
||||
name = "NoSuchBucket";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "NoSuchBucket",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, NoSuchBucket.prototype);
|
||||
}
|
||||
}
|
||||
exports.NoSuchBucket = NoSuchBucket;
|
||||
class InvalidObjectState extends S3ServiceException_1.S3ServiceException {
|
||||
name = "InvalidObjectState";
|
||||
$fault = "client";
|
||||
StorageClass;
|
||||
AccessTier;
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "InvalidObjectState",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, InvalidObjectState.prototype);
|
||||
this.StorageClass = opts.StorageClass;
|
||||
this.AccessTier = opts.AccessTier;
|
||||
}
|
||||
}
|
||||
exports.InvalidObjectState = InvalidObjectState;
|
||||
class NoSuchKey extends S3ServiceException_1.S3ServiceException {
|
||||
name = "NoSuchKey";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "NoSuchKey",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, NoSuchKey.prototype);
|
||||
}
|
||||
}
|
||||
exports.NoSuchKey = NoSuchKey;
|
||||
class NotFound extends S3ServiceException_1.S3ServiceException {
|
||||
name = "NotFound";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "NotFound",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, NotFound.prototype);
|
||||
}
|
||||
}
|
||||
exports.NotFound = NotFound;
|
||||
class EncryptionTypeMismatch extends S3ServiceException_1.S3ServiceException {
|
||||
name = "EncryptionTypeMismatch";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "EncryptionTypeMismatch",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, EncryptionTypeMismatch.prototype);
|
||||
}
|
||||
}
|
||||
exports.EncryptionTypeMismatch = EncryptionTypeMismatch;
|
||||
class InvalidRequest extends S3ServiceException_1.S3ServiceException {
|
||||
name = "InvalidRequest";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "InvalidRequest",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, InvalidRequest.prototype);
|
||||
}
|
||||
}
|
||||
exports.InvalidRequest = InvalidRequest;
|
||||
class InvalidWriteOffset extends S3ServiceException_1.S3ServiceException {
|
||||
name = "InvalidWriteOffset";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "InvalidWriteOffset",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, InvalidWriteOffset.prototype);
|
||||
}
|
||||
}
|
||||
exports.InvalidWriteOffset = InvalidWriteOffset;
|
||||
class TooManyParts extends S3ServiceException_1.S3ServiceException {
|
||||
name = "TooManyParts";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "TooManyParts",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, TooManyParts.prototype);
|
||||
}
|
||||
}
|
||||
exports.TooManyParts = TooManyParts;
|
||||
class IdempotencyParameterMismatch extends S3ServiceException_1.S3ServiceException {
|
||||
name = "IdempotencyParameterMismatch";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "IdempotencyParameterMismatch",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, IdempotencyParameterMismatch.prototype);
|
||||
}
|
||||
}
|
||||
exports.IdempotencyParameterMismatch = IdempotencyParameterMismatch;
|
||||
class ObjectAlreadyInActiveTierError extends S3ServiceException_1.S3ServiceException {
|
||||
name = "ObjectAlreadyInActiveTierError";
|
||||
$fault = "client";
|
||||
constructor(opts) {
|
||||
super({
|
||||
name: "ObjectAlreadyInActiveTierError",
|
||||
$fault: "client",
|
||||
...opts,
|
||||
});
|
||||
Object.setPrototypeOf(this, ObjectAlreadyInActiveTierError.prototype);
|
||||
}
|
||||
}
|
||||
exports.ObjectAlreadyInActiveTierError = ObjectAlreadyInActiveTierError;
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
||||
const sha1_browser_1 = require("@aws-crypto/sha1-browser");
|
||||
const sha256_browser_1 = require("@aws-crypto/sha256-browser");
|
||||
const client_1 = require("@aws-sdk/core/client");
|
||||
const checksum_1 = require("@smithy/core/checksum");
|
||||
const client_2 = require("@smithy/core/client");
|
||||
const config_1 = require("@smithy/core/config");
|
||||
const event_streams_1 = require("@smithy/core/event-streams");
|
||||
const retry_1 = require("@smithy/core/retry");
|
||||
const serde_1 = require("@smithy/core/serde");
|
||||
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
||||
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
||||
const getRuntimeConfig = (config) => {
|
||||
const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
return {
|
||||
...clientSharedValues,
|
||||
...config,
|
||||
runtime: "browser",
|
||||
defaultsMode,
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
|
||||
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? event_streams_1.eventStreamSerdeProvider,
|
||||
maxAttempts: config?.maxAttempts ?? retry_1.DEFAULT_MAX_ATTEMPTS,
|
||||
md5: config?.md5 ?? checksum_1.Md5,
|
||||
region: config?.region ?? (0, client_2.invalidProvider)("Region is missing"),
|
||||
requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
||||
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE),
|
||||
sha1: config?.sha1 ?? sha1_browser_1.Sha1,
|
||||
sha256: config?.sha256 ?? sha256_browser_1.Sha256,
|
||||
streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
|
||||
streamHasher: config?.streamHasher ?? checksum_1.blobHasher,
|
||||
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
||||
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_1.DEFAULT_USE_FIPS_ENDPOINT)),
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const tslib_1 = require("tslib");
|
||||
const package_json_1 = tslib_1.__importDefault(require("../package.json"));
|
||||
const client_1 = require("@aws-sdk/core/client");
|
||||
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
||||
const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
|
||||
const middleware_flexible_checksums_1 = require("@aws-sdk/middleware-flexible-checksums");
|
||||
const s3_1 = require("@aws-sdk/middleware-sdk-s3/s3");
|
||||
const checksum_1 = require("@smithy/core/checksum");
|
||||
const client_2 = require("@smithy/core/client");
|
||||
const config_1 = require("@smithy/core/config");
|
||||
const event_streams_1 = require("@smithy/core/event-streams");
|
||||
const retry_1 = require("@smithy/core/retry");
|
||||
const serde_1 = require("@smithy/core/serde");
|
||||
const node_http_handler_1 = require("@smithy/node-http-handler");
|
||||
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
||||
const getRuntimeConfig = (config) => {
|
||||
(0, client_2.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const defaultsMode = (0, config_1.resolveDefaultsModeConfig)(config);
|
||||
const defaultConfigProvider = () => defaultsMode().then(client_2.loadConfigsForDefaultMode);
|
||||
const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
|
||||
(0, client_1.emitWarningIfUnsupportedVersion)(process.version);
|
||||
const loaderConfig = {
|
||||
profile: config?.profile,
|
||||
logger: clientSharedValues.logger,
|
||||
};
|
||||
return {
|
||||
...clientSharedValues,
|
||||
...config,
|
||||
runtime: "node",
|
||||
defaultsMode,
|
||||
authSchemePreference: config?.authSchemePreference ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
||||
bodyLengthChecker: config?.bodyLengthChecker ?? serde_1.calculateBodyLength,
|
||||
credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
|
||||
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, client_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
||||
disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? (0, config_1.loadConfig)(s3_1.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, loaderConfig),
|
||||
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? event_streams_1.eventStreamSerdeProvider,
|
||||
maxAttempts: config?.maxAttempts ?? (0, config_1.loadConfig)(retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
||||
md5: config?.md5 ?? serde_1.Hash.bind(null, "md5"),
|
||||
region: config?.region ?? (0, config_1.loadConfig)(config_1.NODE_REGION_CONFIG_OPTIONS, { ...config_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
||||
requestChecksumCalculation: config?.requestChecksumCalculation ?? (0, config_1.loadConfig)(middleware_flexible_checksums_1.NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, loaderConfig),
|
||||
requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
||||
responseChecksumValidation: config?.responseChecksumValidation ?? (0, config_1.loadConfig)(middleware_flexible_checksums_1.NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, loaderConfig),
|
||||
retryMode: config?.retryMode ??
|
||||
(0, config_1.loadConfig)({
|
||||
...retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
||||
default: async () => (await defaultConfigProvider()).retryMode || retry_1.DEFAULT_RETRY_MODE,
|
||||
}, config),
|
||||
sha1: config?.sha1 ?? serde_1.Hash.bind(null, "sha1"),
|
||||
sha256: config?.sha256 ?? serde_1.Hash.bind(null, "sha256"),
|
||||
sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? (0, config_1.loadConfig)(httpAuthSchemes_1.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
|
||||
streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
|
||||
streamHasher: config?.streamHasher ?? checksum_1.readableStreamHasher,
|
||||
useArnRegion: config?.useArnRegion ?? (0, config_1.loadConfig)(s3_1.NODE_USE_ARN_REGION_CONFIG_OPTIONS, loaderConfig),
|
||||
useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
||||
useFipsEndpoint: config?.useFipsEndpoint ?? (0, config_1.loadConfig)(config_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
||||
userAgentAppId: config?.userAgentAppId ?? (0, config_1.loadConfig)(client_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
||||
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
||||
const getRuntimeConfig = (config) => {
|
||||
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
||||
return {
|
||||
...browserDefaults,
|
||||
...config,
|
||||
runtime: "react-native",
|
||||
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRuntimeConfig = void 0;
|
||||
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
||||
const s3_1 = require("@aws-sdk/middleware-sdk-s3/s3");
|
||||
const signature_v4_multi_region_1 = require("@aws-sdk/signature-v4-multi-region");
|
||||
const client_1 = require("@smithy/core/client");
|
||||
const protocols_1 = require("@smithy/core/protocols");
|
||||
const serde_1 = require("@smithy/core/serde");
|
||||
const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
|
||||
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
||||
const schemas_0_1 = require("./schemas/schemas_0");
|
||||
const getRuntimeConfig = (config) => {
|
||||
return {
|
||||
apiVersion: "2006-03-01",
|
||||
base64Decoder: config?.base64Decoder ?? serde_1.fromBase64,
|
||||
base64Encoder: config?.base64Encoder ?? serde_1.toBase64,
|
||||
disableHostPrefix: config?.disableHostPrefix ?? false,
|
||||
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
||||
extensions: config?.extensions ?? [],
|
||||
getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? serde_1.getAwsChunkedEncodingStream,
|
||||
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultS3HttpAuthSchemeProvider,
|
||||
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
||||
{
|
||||
schemeId: "aws.auth#sigv4",
|
||||
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
||||
signer: new httpAuthSchemes_1.AwsSdkSigV4Signer(),
|
||||
},
|
||||
{
|
||||
schemeId: "aws.auth#sigv4a",
|
||||
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
|
||||
signer: new httpAuthSchemes_1.AwsSdkSigV4ASigner(),
|
||||
},
|
||||
],
|
||||
logger: config?.logger ?? new client_1.NoOpLogger(),
|
||||
protocol: config?.protocol ?? s3_1.S3RestXmlProtocol,
|
||||
protocolSettings: config?.protocolSettings ?? {
|
||||
defaultNamespace: "com.amazonaws.s3",
|
||||
errorTypeRegistries: schemas_0_1.errorTypeRegistries,
|
||||
xmlNamespace: "http://s3.amazonaws.com/doc/2006-03-01/",
|
||||
version: "2006-03-01",
|
||||
serviceTarget: "AmazonS3",
|
||||
},
|
||||
sdkStreamMixin: config?.sdkStreamMixin ?? serde_1.sdkStreamMixin,
|
||||
serviceId: config?.serviceId ?? "S3",
|
||||
signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion,
|
||||
signingEscapePath: config?.signingEscapePath ?? false,
|
||||
urlParser: config?.urlParser ?? protocols_1.parseUrl,
|
||||
useArnRegion: config?.useArnRegion ?? undefined,
|
||||
utf8Decoder: config?.utf8Decoder ?? serde_1.fromUtf8,
|
||||
utf8Encoder: config?.utf8Encoder ?? serde_1.toUtf8,
|
||||
};
|
||||
};
|
||||
exports.getRuntimeConfig = getRuntimeConfig;
|
||||
+3273
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user