@aws-sdk/middleware-sdk-s3 3.972.45 → 3.972.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.browser.js +34 -0
- package/dist-cjs/index.js +57 -53
- package/dist-cjs/submodules/s3/index.browser.js +1028 -0
- package/dist-cjs/submodules/s3/index.js +1042 -0
- package/dist-cjs/submodules/s3-control/index.js +215 -0
- package/dist-es/index.browser.js +1 -0
- package/dist-es/index.js +1 -9
- package/dist-es/submodules/s3/NodeDisableMultiregionAccessPointConfigOptions.js +8 -0
- package/dist-es/submodules/s3/NodeUseArnRegionConfigOptions.js +8 -0
- package/dist-es/submodules/s3/index.browser.js +30 -0
- package/dist-es/submodules/s3/index.js +25 -0
- package/dist-es/submodules/s3/middleware-bucket-endpoint/bucketEndpointMiddleware.js +81 -0
- package/dist-es/submodules/s3/middleware-bucket-endpoint/bucketHostname.js +106 -0
- package/dist-es/submodules/s3/middleware-bucket-endpoint/bucketHostnameUtils.js +111 -0
- package/dist-es/submodules/s3/middleware-bucket-endpoint/configurations.js +12 -0
- package/dist-es/submodules/s3/middleware-expect-continue/middleware-expect-continue.js +41 -0
- package/dist-es/submodules/s3/middleware-location-constraint/configuration.js +3 -0
- package/dist-es/submodules/s3/middleware-location-constraint/middleware-location-constraint.js +24 -0
- package/dist-es/{s3Configuration.js → submodules/s3/middleware-s3-configuration/s3Configuration.js} +1 -1
- package/dist-es/submodules/s3/middleware-ssec/middleware-ssec.js +66 -0
- package/dist-es/{throw-200-exceptions.js → submodules/s3/middleware-throw-200-exceptions/throw-200-exceptions.js} +1 -1
- package/dist-es/{validate-bucket-name.js → submodules/s3/middleware-validate-bucket-name/validate-bucket-name.js} +1 -1
- package/dist-es/submodules/s3-control/configurations.js +7 -0
- package/dist-es/submodules/s3-control/constants.js +5 -0
- package/dist-es/submodules/s3-control/index.js +7 -0
- package/dist-es/submodules/s3-control/middleware-host-prefix-deduplication/hostPrefixDeduplicationMiddleware.js +17 -0
- package/dist-es/submodules/s3-control/middleware-process-arnables/getOutpostEndpoint.js +18 -0
- package/dist-es/submodules/s3-control/middleware-process-arnables/getProcessArnablesPlugin.js +8 -0
- package/dist-es/submodules/s3-control/middleware-process-arnables/parse-outpost-arnables.js +94 -0
- package/dist-es/submodules/s3-control/middleware-process-arnables/update-arnables-request.js +31 -0
- package/dist-es/submodules/s3-control/middleware-redirect-from-postid/redirect-from-postid.js +26 -0
- package/dist-types/index.browser.d.ts +2 -0
- package/dist-types/index.d.ts +2 -9
- package/dist-types/submodules/s3/NodeDisableMultiregionAccessPointConfigOptions.d.ts +4 -0
- package/dist-types/submodules/s3/NodeUseArnRegionConfigOptions.d.ts +9 -0
- package/dist-types/submodules/s3/index.browser.d.ts +36 -0
- package/dist-types/submodules/s3/index.d.ts +32 -0
- package/dist-types/submodules/s3/middleware-bucket-endpoint/bucketEndpointMiddleware.d.ts +17 -0
- package/dist-types/submodules/s3/middleware-bucket-endpoint/bucketHostname.d.ts +16 -0
- package/dist-types/submodules/s3/middleware-bucket-endpoint/bucketHostnameUtils.d.ts +174 -0
- package/dist-types/submodules/s3/middleware-bucket-endpoint/configurations.d.ts +95 -0
- package/dist-types/submodules/s3/middleware-expect-continue/middleware-expect-continue.d.ts +12 -0
- package/dist-types/submodules/s3/middleware-location-constraint/configuration.d.ts +17 -0
- package/dist-types/submodules/s3/middleware-location-constraint/middleware-location-constraint.d.ts +10 -0
- package/dist-types/{s3Configuration.d.ts → submodules/s3/middleware-s3-configuration/s3Configuration.d.ts} +1 -1
- package/dist-types/submodules/s3/middleware-ssec/middleware-ssec.d.ts +12 -0
- package/dist-types/{validate-bucket-name.d.ts → submodules/s3/middleware-validate-bucket-name/validate-bucket-name.d.ts} +1 -1
- package/dist-types/submodules/s3-control/configurations.d.ts +47 -0
- package/dist-types/submodules/s3-control/constants.d.ts +5 -0
- package/dist-types/submodules/s3-control/index.d.ts +9 -0
- package/dist-types/submodules/s3-control/middleware-host-prefix-deduplication/hostPrefixDeduplicationMiddleware.d.ts +17 -0
- package/dist-types/submodules/s3-control/middleware-process-arnables/getOutpostEndpoint.d.ts +6 -0
- package/dist-types/submodules/s3-control/middleware-process-arnables/getProcessArnablesPlugin.d.ts +3 -0
- package/dist-types/submodules/s3-control/middleware-process-arnables/parse-outpost-arnables.d.ts +27 -0
- package/dist-types/submodules/s3-control/middleware-process-arnables/update-arnables-request.d.ts +19 -0
- package/dist-types/submodules/s3-control/middleware-redirect-from-postid/redirect-from-postid.d.ts +17 -0
- package/dist-types/ts3.4/index.browser.d.ts +39 -0
- package/dist-types/ts3.4/index.d.ts +39 -9
- package/dist-types/ts3.4/submodules/s3/NodeDisableMultiregionAccessPointConfigOptions.d.ts +6 -0
- package/dist-types/ts3.4/submodules/s3/NodeUseArnRegionConfigOptions.d.ts +6 -0
- package/dist-types/ts3.4/submodules/s3/index.browser.d.ts +103 -0
- package/dist-types/ts3.4/submodules/s3/index.d.ts +107 -0
- package/dist-types/ts3.4/submodules/s3/middleware-bucket-endpoint/bucketEndpointMiddleware.d.ts +13 -0
- package/dist-types/ts3.4/submodules/s3/middleware-bucket-endpoint/bucketHostname.d.ts +10 -0
- package/dist-types/ts3.4/submodules/s3/middleware-bucket-endpoint/bucketHostnameUtils.d.ts +80 -0
- package/dist-types/ts3.4/submodules/s3/middleware-bucket-endpoint/configurations.d.ts +31 -0
- package/dist-types/ts3.4/submodules/s3/middleware-expect-continue/middleware-expect-continue.d.ts +22 -0
- package/dist-types/ts3.4/submodules/s3/middleware-location-constraint/configuration.d.ts +12 -0
- package/dist-types/ts3.4/submodules/s3/middleware-location-constraint/middleware-location-constraint.d.ts +13 -0
- package/dist-types/ts3.4/{s3Configuration.d.ts → submodules/s3/middleware-s3-configuration/s3Configuration.d.ts} +1 -1
- package/dist-types/ts3.4/submodules/s3/middleware-ssec/middleware-ssec.d.ts +27 -0
- package/dist-types/ts3.4/{validate-bucket-name.d.ts → submodules/s3/middleware-validate-bucket-name/validate-bucket-name.d.ts} +1 -1
- package/dist-types/ts3.4/submodules/s3-control/configurations.d.ts +23 -0
- package/dist-types/ts3.4/submodules/s3-control/constants.d.ts +5 -0
- package/dist-types/ts3.4/submodules/s3-control/index.d.ts +26 -0
- package/dist-types/ts3.4/submodules/s3-control/middleware-host-prefix-deduplication/hostPrefixDeduplicationMiddleware.d.ts +13 -0
- package/dist-types/ts3.4/submodules/s3-control/middleware-process-arnables/getOutpostEndpoint.d.ts +13 -0
- package/dist-types/ts3.4/submodules/s3-control/middleware-process-arnables/getProcessArnablesPlugin.d.ts +5 -0
- package/dist-types/ts3.4/submodules/s3-control/middleware-process-arnables/parse-outpost-arnables.d.ts +12 -0
- package/dist-types/ts3.4/submodules/s3-control/middleware-process-arnables/update-arnables-request.d.ts +13 -0
- package/dist-types/ts3.4/submodules/s3-control/middleware-redirect-from-postid/redirect-from-postid.d.ts +22 -0
- package/package.json +51 -5
- package/dist-cjs/toStream.browser.js +0 -11
- package/dist-cjs/toStream.js +0 -7
- package/dist-es/s3-express/index.js +0 -7
- package/dist-types/s3-express/index.d.ts +0 -9
- package/dist-types/ts3.4/s3-express/index.d.ts +0 -17
- /package/dist-es/{check-content-length-header.js → submodules/s3/middleware-check-content-length-header/check-content-length-header.js} +0 -0
- /package/dist-es/{bucket-endpoint-middleware.js → submodules/s3/middleware-region-redirect/bucket-endpoint-middleware.js} +0 -0
- /package/dist-es/{region-redirect-endpoint-middleware.js → submodules/s3/middleware-region-redirect/region-redirect-endpoint-middleware.js} +0 -0
- /package/dist-es/{region-redirect-middleware.js → submodules/s3/middleware-region-redirect/region-redirect-middleware.js} +0 -0
- /package/dist-es/{s3-expires-middleware.js → submodules/s3/middleware-s3-expires/s3-expires-middleware.js} +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/classes/S3ExpressIdentityCache.js +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/classes/S3ExpressIdentityCacheEntry.js +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/classes/S3ExpressIdentityProviderImpl.js +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/classes/SignatureV4S3Express.js +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/constants.js +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/functions/s3ExpressHttpSigningMiddleware.js +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/functions/s3ExpressMiddleware.js +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/functions/signS3Express.js +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/interfaces/S3ExpressIdentity.js +0 -0
- /package/dist-es/{s3-express → submodules/s3/middleware-s3-express}/interfaces/S3ExpressIdentityProvider.js +0 -0
- /package/dist-es/{protocol → submodules/s3/protocol}/S3RestXmlProtocol.js +0 -0
- /package/dist-es/{toStream.browser.js → submodules/s3/to-stream/toStream.browser.js} +0 -0
- /package/dist-es/{toStream.js → submodules/s3/to-stream/toStream.js} +0 -0
- /package/dist-types/{check-content-length-header.d.ts → submodules/s3/middleware-check-content-length-header/check-content-length-header.d.ts} +0 -0
- /package/dist-types/{bucket-endpoint-middleware.d.ts → submodules/s3/middleware-region-redirect/bucket-endpoint-middleware.d.ts} +0 -0
- /package/dist-types/{region-redirect-endpoint-middleware.d.ts → submodules/s3/middleware-region-redirect/region-redirect-endpoint-middleware.d.ts} +0 -0
- /package/dist-types/{region-redirect-middleware.d.ts → submodules/s3/middleware-region-redirect/region-redirect-middleware.d.ts} +0 -0
- /package/dist-types/{s3-expires-middleware.d.ts → submodules/s3/middleware-s3-expires/s3-expires-middleware.d.ts} +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/classes/S3ExpressIdentityCache.d.ts +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/classes/S3ExpressIdentityCacheEntry.d.ts +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/classes/S3ExpressIdentityProviderImpl.d.ts +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/classes/SignatureV4S3Express.d.ts +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/constants.d.ts +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/functions/s3ExpressHttpSigningMiddleware.d.ts +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/functions/s3ExpressMiddleware.d.ts +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/functions/signS3Express.d.ts +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/interfaces/S3ExpressIdentity.d.ts +0 -0
- /package/dist-types/{s3-express → submodules/s3/middleware-s3-express}/interfaces/S3ExpressIdentityProvider.d.ts +0 -0
- /package/dist-types/{throw-200-exceptions.d.ts → submodules/s3/middleware-throw-200-exceptions/throw-200-exceptions.d.ts} +0 -0
- /package/dist-types/{protocol → submodules/s3/protocol}/S3RestXmlProtocol.d.ts +0 -0
- /package/dist-types/{toStream.browser.d.ts → submodules/s3/to-stream/toStream.browser.d.ts} +0 -0
- /package/dist-types/{toStream.d.ts → submodules/s3/to-stream/toStream.d.ts} +0 -0
- /package/dist-types/ts3.4/{check-content-length-header.d.ts → submodules/s3/middleware-check-content-length-header/check-content-length-header.d.ts} +0 -0
- /package/dist-types/ts3.4/{bucket-endpoint-middleware.d.ts → submodules/s3/middleware-region-redirect/bucket-endpoint-middleware.d.ts} +0 -0
- /package/dist-types/ts3.4/{region-redirect-endpoint-middleware.d.ts → submodules/s3/middleware-region-redirect/region-redirect-endpoint-middleware.d.ts} +0 -0
- /package/dist-types/ts3.4/{region-redirect-middleware.d.ts → submodules/s3/middleware-region-redirect/region-redirect-middleware.d.ts} +0 -0
- /package/dist-types/ts3.4/{s3-expires-middleware.d.ts → submodules/s3/middleware-s3-expires/s3-expires-middleware.d.ts} +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/classes/S3ExpressIdentityCache.d.ts +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/classes/S3ExpressIdentityCacheEntry.d.ts +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/classes/S3ExpressIdentityProviderImpl.d.ts +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/classes/SignatureV4S3Express.d.ts +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/constants.d.ts +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/functions/s3ExpressHttpSigningMiddleware.d.ts +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/functions/s3ExpressMiddleware.d.ts +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/functions/signS3Express.d.ts +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/interfaces/S3ExpressIdentity.d.ts +0 -0
- /package/dist-types/ts3.4/{s3-express → submodules/s3/middleware-s3-express}/interfaces/S3ExpressIdentityProvider.d.ts +0 -0
- /package/dist-types/ts3.4/{throw-200-exceptions.d.ts → submodules/s3/middleware-throw-200-exceptions/throw-200-exceptions.d.ts} +0 -0
- /package/dist-types/ts3.4/{protocol → submodules/s3/protocol}/S3RestXmlProtocol.d.ts +0 -0
- /package/dist-types/ts3.4/{toStream.browser.d.ts → submodules/s3/to-stream/toStream.browser.d.ts} +0 -0
- /package/dist-types/ts3.4/{toStream.d.ts → submodules/s3/to-stream/toStream.d.ts} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { HttpRequest } from "@smithy/core/protocols";
|
|
2
|
+
export function addExpectContinueMiddleware(options) {
|
|
3
|
+
return (next) => async (args) => {
|
|
4
|
+
const { request } = args;
|
|
5
|
+
if (options.expectContinueHeader !== false &&
|
|
6
|
+
HttpRequest.isInstance(request) &&
|
|
7
|
+
request.body &&
|
|
8
|
+
options.runtime === "node" &&
|
|
9
|
+
options.requestHandler?.constructor?.name !== "FetchHttpHandler") {
|
|
10
|
+
let sendHeader = true;
|
|
11
|
+
if (typeof options.expectContinueHeader === "number") {
|
|
12
|
+
try {
|
|
13
|
+
const bodyLength = Number(request.headers?.["content-length"]) ?? options.bodyLengthChecker?.(request.body) ?? Infinity;
|
|
14
|
+
sendHeader = bodyLength >= options.expectContinueHeader;
|
|
15
|
+
}
|
|
16
|
+
catch (e) { }
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
sendHeader = !!options.expectContinueHeader;
|
|
20
|
+
}
|
|
21
|
+
if (sendHeader) {
|
|
22
|
+
request.headers.Expect = "100-continue";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return next({
|
|
26
|
+
...args,
|
|
27
|
+
request,
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export const addExpectContinueMiddlewareOptions = {
|
|
32
|
+
step: "build",
|
|
33
|
+
tags: ["SET_EXPECT_HEADER", "EXPECT_HEADER"],
|
|
34
|
+
name: "addExpectContinueMiddleware",
|
|
35
|
+
override: true,
|
|
36
|
+
};
|
|
37
|
+
export const getAddExpectContinuePlugin = (options) => ({
|
|
38
|
+
applyToStack: (clientStack) => {
|
|
39
|
+
clientStack.add(addExpectContinueMiddleware(options), addExpectContinueMiddlewareOptions);
|
|
40
|
+
},
|
|
41
|
+
});
|
package/dist-es/submodules/s3/middleware-location-constraint/middleware-location-constraint.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function locationConstraintMiddleware(options) {
|
|
2
|
+
return (next) => async (args) => {
|
|
3
|
+
const { CreateBucketConfiguration } = args.input;
|
|
4
|
+
const region = await options.region();
|
|
5
|
+
if (!CreateBucketConfiguration?.LocationConstraint && !CreateBucketConfiguration?.Location) {
|
|
6
|
+
if (region !== "us-east-1") {
|
|
7
|
+
args.input.CreateBucketConfiguration = args.input.CreateBucketConfiguration ?? {};
|
|
8
|
+
args.input.CreateBucketConfiguration.LocationConstraint = region;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return next(args);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export const locationConstraintMiddlewareOptions = {
|
|
15
|
+
step: "initialize",
|
|
16
|
+
tags: ["LOCATION_CONSTRAINT", "CREATE_BUCKET_CONFIGURATION"],
|
|
17
|
+
name: "locationConstraintMiddleware",
|
|
18
|
+
override: true,
|
|
19
|
+
};
|
|
20
|
+
export const getLocationConstraintPlugin = (config) => ({
|
|
21
|
+
applyToStack: (clientStack) => {
|
|
22
|
+
clientStack.add(locationConstraintMiddleware(config), locationConstraintMiddlewareOptions);
|
|
23
|
+
},
|
|
24
|
+
});
|
package/dist-es/{s3Configuration.js → submodules/s3/middleware-s3-configuration/s3Configuration.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S3ExpressIdentityProviderImpl } from "
|
|
1
|
+
import { S3ExpressIdentityProviderImpl } from "../middleware-s3-express/classes/S3ExpressIdentityProviderImpl";
|
|
2
2
|
export const resolveS3Config = (input, { session, }) => {
|
|
3
3
|
const [s3ClientProvider, CreateSessionCommandCtor] = session;
|
|
4
4
|
const { forcePathStyle, useAccelerateEndpoint, disableMultiregionAccessPoints, followRegionRedirects, s3ExpressIdentityProvider, bucketEndpoint, expectContinueHeader, } = input;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export function ssecMiddleware(options) {
|
|
2
|
+
return (next) => async (args) => {
|
|
3
|
+
const input = { ...args.input };
|
|
4
|
+
const properties = [
|
|
5
|
+
{
|
|
6
|
+
target: "SSECustomerKey",
|
|
7
|
+
hash: "SSECustomerKeyMD5",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
target: "CopySourceSSECustomerKey",
|
|
11
|
+
hash: "CopySourceSSECustomerKeyMD5",
|
|
12
|
+
},
|
|
13
|
+
];
|
|
14
|
+
for (const prop of properties) {
|
|
15
|
+
const value = input[prop.target];
|
|
16
|
+
if (value) {
|
|
17
|
+
let valueForHash;
|
|
18
|
+
if (typeof value === "string") {
|
|
19
|
+
if (isValidBase64EncodedSSECustomerKey(value, options)) {
|
|
20
|
+
valueForHash = options.base64Decoder(value);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
valueForHash = options.utf8Decoder(value);
|
|
24
|
+
input[prop.target] = options.base64Encoder(valueForHash);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
valueForHash = ArrayBuffer.isView(value)
|
|
29
|
+
? new Uint8Array(value.buffer, value.byteOffset, value.byteLength)
|
|
30
|
+
: new Uint8Array(value);
|
|
31
|
+
input[prop.target] = options.base64Encoder(valueForHash);
|
|
32
|
+
}
|
|
33
|
+
const hash = new options.md5();
|
|
34
|
+
hash.update(valueForHash);
|
|
35
|
+
input[prop.hash] = options.base64Encoder(await hash.digest());
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return next({
|
|
39
|
+
...args,
|
|
40
|
+
input,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export const ssecMiddlewareOptions = {
|
|
45
|
+
name: "ssecMiddleware",
|
|
46
|
+
step: "initialize",
|
|
47
|
+
tags: ["SSE"],
|
|
48
|
+
override: true,
|
|
49
|
+
};
|
|
50
|
+
export const getSsecPlugin = (config) => ({
|
|
51
|
+
applyToStack: (clientStack) => {
|
|
52
|
+
clientStack.add(ssecMiddleware(config), ssecMiddlewareOptions);
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
export function isValidBase64EncodedSSECustomerKey(str, options) {
|
|
56
|
+
const base64Regex = /^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
|
57
|
+
if (!base64Regex.test(str))
|
|
58
|
+
return false;
|
|
59
|
+
try {
|
|
60
|
+
const decodedBytes = options.base64Decoder(str);
|
|
61
|
+
return decodedBytes.length === 32;
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { validate as validateArn } from "@aws-sdk/core/util";
|
|
2
|
-
import { bucketEndpointMiddleware, bucketEndpointMiddlewareOptions } from "
|
|
2
|
+
import { bucketEndpointMiddleware, bucketEndpointMiddlewareOptions, } from "../middleware-region-redirect/bucket-endpoint-middleware";
|
|
3
3
|
export function validateBucketNameMiddleware({ bucketEndpoint }) {
|
|
4
4
|
return (next) => async (args) => {
|
|
5
5
|
const { input: { Bucket }, } = args;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { NODE_USE_ARN_REGION_CONFIG_OPTIONS } from "@aws-sdk/middleware-sdk-s3/s3";
|
|
2
|
+
export function resolveS3ControlConfig(input) {
|
|
3
|
+
const { useArnRegion } = input;
|
|
4
|
+
return Object.assign(input, {
|
|
5
|
+
useArnRegion: typeof useArnRegion === "function" ? useArnRegion : () => Promise.resolve(useArnRegion),
|
|
6
|
+
});
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const CONTEXT_OUTPOST_ID = "outpost_id";
|
|
2
|
+
export const CONTEXT_ACCOUNT_ID = "account_id";
|
|
3
|
+
export const CONTEXT_ARN_REGION = "outpost_arn_region";
|
|
4
|
+
export const CONTEXT_SIGNING_SERVICE = "signing_service";
|
|
5
|
+
export const CONTEXT_SIGNING_REGION = "signing_region";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { resolveS3ControlConfig } from "./configurations";
|
|
2
|
+
export { getProcessArnablesPlugin } from "./middleware-process-arnables/getProcessArnablesPlugin";
|
|
3
|
+
export { parseOutpostArnablesMiddleaware, parseOutpostArnablesMiddleawareOptions, } from "./middleware-process-arnables/parse-outpost-arnables";
|
|
4
|
+
export { updateArnablesRequestMiddleware, updateArnablesRequestMiddlewareOptions, } from "./middleware-process-arnables/update-arnables-request";
|
|
5
|
+
export { getOutpostEndpoint } from "./middleware-process-arnables/getOutpostEndpoint";
|
|
6
|
+
export { hostPrefixDeduplicationMiddleware, hostPrefixDeduplicationMiddlewareOptions, getHostPrefixDeduplicationPlugin, } from "./middleware-host-prefix-deduplication/hostPrefixDeduplicationMiddleware";
|
|
7
|
+
export { redirectFromPostIdMiddleware, redirectFromPostIdMiddlewareOptions, getRedirectFromPostIdPlugin, } from "./middleware-redirect-from-postid/redirect-from-postid";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const hostPrefixDeduplicationMiddleware = () => {
|
|
2
|
+
return (next, context) => (args) => {
|
|
3
|
+
return next(args);
|
|
4
|
+
};
|
|
5
|
+
};
|
|
6
|
+
export const hostPrefixDeduplicationMiddlewareOptions = {
|
|
7
|
+
tags: ["HOST_PREFIX_DEDUPLICATION", "ENDPOINT_V2", "ENDPOINT"],
|
|
8
|
+
toMiddleware: "serializerMiddleware",
|
|
9
|
+
relation: "after",
|
|
10
|
+
name: "hostPrefixDeduplicationMiddleware",
|
|
11
|
+
override: true,
|
|
12
|
+
};
|
|
13
|
+
export const getHostPrefixDeduplicationPlugin = (config) => ({
|
|
14
|
+
applyToStack: (clientStack) => {
|
|
15
|
+
clientStack.addRelativeTo(hostPrefixDeduplicationMiddleware(), hostPrefixDeduplicationMiddlewareOptions);
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const REGEX_S3CONTROL_HOSTNAME = /^(.+\.)?s3-control(-fips)?[.-]([a-z0-9-]+)\./;
|
|
2
|
+
export const getOutpostEndpoint = (hostname, { isCustomEndpoint, regionOverride, useFipsEndpoint }) => {
|
|
3
|
+
if (isCustomEndpoint) {
|
|
4
|
+
return hostname;
|
|
5
|
+
}
|
|
6
|
+
const match = hostname.match(REGEX_S3CONTROL_HOSTNAME);
|
|
7
|
+
if (!match) {
|
|
8
|
+
return hostname;
|
|
9
|
+
}
|
|
10
|
+
const [matched, prefix, fips, region] = hostname.match(REGEX_S3CONTROL_HOSTNAME);
|
|
11
|
+
return [
|
|
12
|
+
`s3-outposts${useFipsEndpoint ? "-fips" : ""}`,
|
|
13
|
+
regionOverride || region,
|
|
14
|
+
hostname.replace(new RegExp(`^${matched}`), ""),
|
|
15
|
+
]
|
|
16
|
+
.filter((part) => part !== undefined)
|
|
17
|
+
.join(".");
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { parseOutpostArnablesMiddleaware, parseOutpostArnablesMiddleawareOptions } from "./parse-outpost-arnables";
|
|
2
|
+
import { updateArnablesRequestMiddleware, updateArnablesRequestMiddlewareOptions } from "./update-arnables-request";
|
|
3
|
+
export const getProcessArnablesPlugin = (options) => ({
|
|
4
|
+
applyToStack: (clientStack) => {
|
|
5
|
+
clientStack.addRelativeTo(parseOutpostArnablesMiddleaware(options), parseOutpostArnablesMiddleawareOptions);
|
|
6
|
+
clientStack.addRelativeTo(updateArnablesRequestMiddleware(options), updateArnablesRequestMiddlewareOptions);
|
|
7
|
+
},
|
|
8
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { partition } from "@aws-sdk/core/client";
|
|
2
|
+
import { parse as parseArn, validate as validateArn } from "@aws-sdk/core/util";
|
|
3
|
+
import { getArnResources as getS3AccesspointArnResources, validateAccountId, validateOutpostService, validatePartition, } from "@aws-sdk/middleware-sdk-s3/s3";
|
|
4
|
+
import { CONTEXT_ARN_REGION, CONTEXT_OUTPOST_ID, CONTEXT_SIGNING_REGION, CONTEXT_SIGNING_SERVICE } from "../constants";
|
|
5
|
+
export const parseOutpostArnablesMiddleaware = (options) => (next, context) => async (args) => {
|
|
6
|
+
const { input } = args;
|
|
7
|
+
const parameter = input.Name && validateArn(input.Name) ? "Name" : input.Bucket && validateArn(input.Bucket) ? "Bucket" : undefined;
|
|
8
|
+
if (!parameter)
|
|
9
|
+
return next(args);
|
|
10
|
+
const clientRegion = await options.region();
|
|
11
|
+
const useArnRegion = await options.useArnRegion();
|
|
12
|
+
const useFipsEndpoint = await options.useFipsEndpoint();
|
|
13
|
+
const useDualstackEndpoint = await options.useDualstackEndpoint();
|
|
14
|
+
const baseRegion = clientRegion;
|
|
15
|
+
let clientPartition;
|
|
16
|
+
let signingRegion;
|
|
17
|
+
if (options.regionInfoProvider) {
|
|
18
|
+
({ partition: clientPartition, signingRegion = baseRegion } = (await options.regionInfoProvider(baseRegion, {
|
|
19
|
+
useFipsEndpoint,
|
|
20
|
+
useDualstackEndpoint,
|
|
21
|
+
})));
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
signingRegion = context.endpointV2?.properties?.authSchemes?.[0]?.signingRegion || baseRegion;
|
|
25
|
+
clientPartition = partition(signingRegion).name;
|
|
26
|
+
}
|
|
27
|
+
const validatorOptions = {
|
|
28
|
+
useFipsEndpoint,
|
|
29
|
+
useDualstackEndpoint,
|
|
30
|
+
clientRegion,
|
|
31
|
+
clientPartition,
|
|
32
|
+
signingRegion,
|
|
33
|
+
useArnRegion,
|
|
34
|
+
};
|
|
35
|
+
let arn;
|
|
36
|
+
if (parameter === "Name") {
|
|
37
|
+
arn = parseArn(input.Name);
|
|
38
|
+
validateOutpostsArn(arn, validatorOptions);
|
|
39
|
+
const { outpostId, accesspointName } = parseOutpostsAccessPointArnResource(arn.resource);
|
|
40
|
+
input.Name = accesspointName;
|
|
41
|
+
context[CONTEXT_OUTPOST_ID] = outpostId;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
arn = parseArn(input.Bucket);
|
|
45
|
+
validateOutpostsArn(arn, validatorOptions);
|
|
46
|
+
const { outpostId, bucketName } = parseOutpostBucketArnResource(arn.resource);
|
|
47
|
+
input.Bucket = bucketName;
|
|
48
|
+
context[CONTEXT_OUTPOST_ID] = outpostId;
|
|
49
|
+
}
|
|
50
|
+
context[CONTEXT_SIGNING_SERVICE] = arn.service;
|
|
51
|
+
context[CONTEXT_SIGNING_REGION] = useArnRegion ? arn.region : signingRegion;
|
|
52
|
+
if (!input.AccountId) {
|
|
53
|
+
input.AccountId = arn.accountId;
|
|
54
|
+
}
|
|
55
|
+
if (useArnRegion)
|
|
56
|
+
context[CONTEXT_ARN_REGION] = arn.region;
|
|
57
|
+
return next(args);
|
|
58
|
+
};
|
|
59
|
+
export const parseOutpostArnablesMiddleawareOptions = {
|
|
60
|
+
toMiddleware: "serializerMiddleware",
|
|
61
|
+
relation: "before",
|
|
62
|
+
tags: ["CONVERT_ARN", "OUTPOST_BUCKET_ARN", "OUTPOST_ACCESS_POINT_ARN", "OUTPOST"],
|
|
63
|
+
name: "parseOutpostArnablesMiddleaware",
|
|
64
|
+
};
|
|
65
|
+
const validateOutpostsArn = (arn, { clientPartition }) => {
|
|
66
|
+
const { service, partition, accountId, region } = arn;
|
|
67
|
+
validateOutpostService(service);
|
|
68
|
+
validatePartition(partition, { clientPartition });
|
|
69
|
+
validateAccountId(accountId);
|
|
70
|
+
};
|
|
71
|
+
const parseOutpostsAccessPointArnResource = (resource) => {
|
|
72
|
+
const { outpostId, accesspointName } = getS3AccesspointArnResources(resource);
|
|
73
|
+
if (!outpostId) {
|
|
74
|
+
throw new Error("ARN resource should begin with 'outpost'");
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
outpostId,
|
|
78
|
+
accesspointName,
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
const parseOutpostBucketArnResource = (resource) => {
|
|
82
|
+
const delimiter = resource.includes(":") ? ":" : "/";
|
|
83
|
+
const [resourceType, ...rest] = resource.split(delimiter);
|
|
84
|
+
if (resourceType === "outpost") {
|
|
85
|
+
if (!rest[0] || rest[1] !== "bucket" || !rest[2] || rest.length !== 3) {
|
|
86
|
+
throw new Error(`Outpost Bucket ARN should have resource outpost${delimiter}{outpostId}${delimiter}bucket${delimiter}{bucketName}`);
|
|
87
|
+
}
|
|
88
|
+
const [outpostId, _, bucketName] = rest;
|
|
89
|
+
return { outpostId, bucketName };
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
throw new Error(`ARN resource should begin with 'outpost${delimiter}'`);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HttpRequest } from "@smithy/core/protocols";
|
|
2
|
+
import { CONTEXT_ACCOUNT_ID, CONTEXT_ARN_REGION, CONTEXT_OUTPOST_ID } from "../constants";
|
|
3
|
+
import { getOutpostEndpoint } from "./getOutpostEndpoint";
|
|
4
|
+
const ACCOUNT_ID_HEADER = "x-amz-account-id";
|
|
5
|
+
const OUTPOST_ID_HEADER = "x-amz-outpost-id";
|
|
6
|
+
export const updateArnablesRequestMiddleware = (config) => (next, context) => async (args) => {
|
|
7
|
+
const { request } = args;
|
|
8
|
+
if (!HttpRequest.isInstance(request)) {
|
|
9
|
+
return next(args);
|
|
10
|
+
}
|
|
11
|
+
if (context[CONTEXT_ACCOUNT_ID]) {
|
|
12
|
+
request.headers[ACCOUNT_ID_HEADER] = context[CONTEXT_ACCOUNT_ID];
|
|
13
|
+
}
|
|
14
|
+
if (context[CONTEXT_OUTPOST_ID]) {
|
|
15
|
+
const { isCustomEndpoint } = config;
|
|
16
|
+
const useFipsEndpoint = await config.useFipsEndpoint();
|
|
17
|
+
request.headers[OUTPOST_ID_HEADER] = context[CONTEXT_OUTPOST_ID];
|
|
18
|
+
request.hostname = getOutpostEndpoint(request.hostname, {
|
|
19
|
+
isCustomEndpoint,
|
|
20
|
+
regionOverride: context[CONTEXT_ARN_REGION],
|
|
21
|
+
useFipsEndpoint,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return next(args);
|
|
25
|
+
};
|
|
26
|
+
export const updateArnablesRequestMiddlewareOptions = {
|
|
27
|
+
toMiddleware: "serializerMiddleware",
|
|
28
|
+
relation: "after",
|
|
29
|
+
name: "updateArnablesRequestMiddleware",
|
|
30
|
+
tags: ["ACCOUNT_ID", "OUTPOST_ID", "OUTPOST"],
|
|
31
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HttpRequest } from "@smithy/core/protocols";
|
|
2
|
+
import { CONTEXT_SIGNING_SERVICE } from "../constants";
|
|
3
|
+
import { getOutpostEndpoint } from "../middleware-process-arnables/getOutpostEndpoint";
|
|
4
|
+
export const redirectFromPostIdMiddleware = (config) => (next, context) => async (args) => {
|
|
5
|
+
const { input, request } = args;
|
|
6
|
+
if (!HttpRequest.isInstance(request))
|
|
7
|
+
return next(args);
|
|
8
|
+
if (input.OutpostId) {
|
|
9
|
+
const { isCustomEndpoint } = config;
|
|
10
|
+
const useFipsEndpoint = await config.useFipsEndpoint();
|
|
11
|
+
request.hostname = getOutpostEndpoint(request.hostname, { isCustomEndpoint, useFipsEndpoint });
|
|
12
|
+
context[CONTEXT_SIGNING_SERVICE] = "s3-outposts";
|
|
13
|
+
}
|
|
14
|
+
return next(args);
|
|
15
|
+
};
|
|
16
|
+
export const redirectFromPostIdMiddlewareOptions = {
|
|
17
|
+
step: "build",
|
|
18
|
+
name: "redirectFromPostIdMiddleware",
|
|
19
|
+
tags: ["OUTPOST"],
|
|
20
|
+
override: true,
|
|
21
|
+
};
|
|
22
|
+
export const getRedirectFromPostIdPlugin = (options) => ({
|
|
23
|
+
applyToStack: (clientStack) => {
|
|
24
|
+
clientStack.add(redirectFromPostIdMiddleware(options), redirectFromPostIdMiddlewareOptions);
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { checkContentLengthHeader, checkContentLengthHeaderMiddlewareOptions, getCheckContentLengthHeaderPlugin, regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions, regionRedirectMiddleware, regionRedirectMiddlewareOptions, getRegionRedirectMiddlewarePlugin, resolveS3Config, s3ExpiresMiddleware, s3ExpiresMiddlewareOptions, getS3ExpiresMiddlewarePlugin, S3ExpressIdentityCache, S3ExpressIdentityCacheEntry, S3ExpressIdentityProviderImpl, SignatureV4S3Express, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, getS3ExpressPlugin, s3ExpressMiddleware, s3ExpressMiddlewareOptions, getS3ExpressHttpSigningPlugin, s3ExpressHttpSigningMiddleware, s3ExpressHttpSigningMiddlewareOptions, throw200ExceptionsMiddleware, throw200ExceptionsMiddlewareOptions, getThrow200ExceptionsPlugin, validateBucketNameMiddleware, validateBucketNameMiddlewareOptions, getValidateBucketNamePlugin, S3RestXmlProtocol, } from "./submodules/s3/index.browser";
|
|
2
|
+
export type { PreviouslyResolved, S3InputConfig, S3ResolvedConfig, S3ExpressIdentity, S3ExpressIdentityProvider, } from "./submodules/s3/index.browser";
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export * from "./region-redirect-middleware";
|
|
4
|
-
export * from "./s3-expires-middleware";
|
|
5
|
-
export * from "./s3-express/index";
|
|
6
|
-
export * from "./s3Configuration";
|
|
7
|
-
export * from "./throw-200-exceptions";
|
|
8
|
-
export * from "./validate-bucket-name";
|
|
9
|
-
export { S3RestXmlProtocol } from "./protocol/S3RestXmlProtocol";
|
|
1
|
+
export { checkContentLengthHeader, checkContentLengthHeaderMiddlewareOptions, getCheckContentLengthHeaderPlugin, regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions, regionRedirectMiddleware, regionRedirectMiddlewareOptions, getRegionRedirectMiddlewarePlugin, resolveS3Config, s3ExpiresMiddleware, s3ExpiresMiddlewareOptions, getS3ExpiresMiddlewarePlugin, S3ExpressIdentityCache, S3ExpressIdentityCacheEntry, S3ExpressIdentityProviderImpl, SignatureV4S3Express, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, getS3ExpressPlugin, s3ExpressMiddleware, s3ExpressMiddlewareOptions, getS3ExpressHttpSigningPlugin, s3ExpressHttpSigningMiddleware, s3ExpressHttpSigningMiddlewareOptions, throw200ExceptionsMiddleware, throw200ExceptionsMiddlewareOptions, getThrow200ExceptionsPlugin, validateBucketNameMiddleware, validateBucketNameMiddlewareOptions, getValidateBucketNamePlugin, S3RestXmlProtocol, } from "./submodules/s3/index";
|
|
2
|
+
export type { PreviouslyResolved, S3InputConfig, S3ResolvedConfig, S3ExpressIdentity, S3ExpressIdentityProvider, } from "./submodules/s3/index";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LoadedConfigSelectors } from "@smithy/core/config";
|
|
2
|
+
export declare const NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS";
|
|
3
|
+
export declare const NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME = "s3_disable_multiregion_access_points";
|
|
4
|
+
export declare const NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS: LoadedConfigSelectors<boolean>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LoadedConfigSelectors } from "@smithy/core/config";
|
|
2
|
+
export declare const NODE_USE_ARN_REGION_ENV_NAME = "AWS_S3_USE_ARN_REGION";
|
|
3
|
+
export declare const NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region";
|
|
4
|
+
/**
|
|
5
|
+
* Config to load useArnRegion from environment variables and shared INI files
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const NODE_USE_ARN_REGION_CONFIG_OPTIONS: LoadedConfigSelectors<boolean | undefined>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export { checkContentLengthHeader, checkContentLengthHeaderMiddlewareOptions, getCheckContentLengthHeaderPlugin, } from "./middleware-check-content-length-header/check-content-length-header";
|
|
2
|
+
export { regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions, } from "./middleware-region-redirect/region-redirect-endpoint-middleware";
|
|
3
|
+
export { regionRedirectMiddleware, regionRedirectMiddlewareOptions, getRegionRedirectMiddlewarePlugin, } from "./middleware-region-redirect/region-redirect-middleware";
|
|
4
|
+
export type { PreviouslyResolved } from "./middleware-region-redirect/region-redirect-middleware";
|
|
5
|
+
export type { S3InputConfig, S3ResolvedConfig } from "./middleware-s3-configuration/s3Configuration";
|
|
6
|
+
export { resolveS3Config } from "./middleware-s3-configuration/s3Configuration";
|
|
7
|
+
export { s3ExpiresMiddleware, s3ExpiresMiddlewareOptions, getS3ExpiresMiddlewarePlugin, } from "./middleware-s3-expires/s3-expires-middleware";
|
|
8
|
+
export { S3ExpressIdentityCache } from "./middleware-s3-express/classes/S3ExpressIdentityCache";
|
|
9
|
+
export { S3ExpressIdentityCacheEntry } from "./middleware-s3-express/classes/S3ExpressIdentityCacheEntry";
|
|
10
|
+
export { S3ExpressIdentityProviderImpl } from "./middleware-s3-express/classes/S3ExpressIdentityProviderImpl";
|
|
11
|
+
export { SignatureV4S3Express } from "./middleware-s3-express/classes/SignatureV4S3Express";
|
|
12
|
+
export declare const NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS: symbol;
|
|
13
|
+
export { getS3ExpressPlugin, s3ExpressMiddleware, s3ExpressMiddlewareOptions, } from "./middleware-s3-express/functions/s3ExpressMiddleware";
|
|
14
|
+
export { getS3ExpressHttpSigningPlugin, s3ExpressHttpSigningMiddleware, s3ExpressHttpSigningMiddlewareOptions, } from "./middleware-s3-express/functions/s3ExpressHttpSigningMiddleware";
|
|
15
|
+
export type { S3ExpressIdentity } from "./middleware-s3-express/interfaces/S3ExpressIdentity";
|
|
16
|
+
export type { S3ExpressIdentityProvider } from "./middleware-s3-express/interfaces/S3ExpressIdentityProvider";
|
|
17
|
+
export { throw200ExceptionsMiddleware, throw200ExceptionsMiddlewareOptions, getThrow200ExceptionsPlugin, } from "./middleware-throw-200-exceptions/throw-200-exceptions";
|
|
18
|
+
export { validateBucketNameMiddleware, validateBucketNameMiddlewareOptions, getValidateBucketNamePlugin, } from "./middleware-validate-bucket-name/validate-bucket-name";
|
|
19
|
+
export { S3RestXmlProtocol } from "./protocol/S3RestXmlProtocol";
|
|
20
|
+
export declare const NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS: symbol;
|
|
21
|
+
export declare const NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME: symbol;
|
|
22
|
+
export declare const NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME: symbol;
|
|
23
|
+
export declare const NODE_USE_ARN_REGION_CONFIG_OPTIONS: symbol;
|
|
24
|
+
export declare const NODE_USE_ARN_REGION_ENV_NAME: symbol;
|
|
25
|
+
export declare const NODE_USE_ARN_REGION_INI_NAME: symbol;
|
|
26
|
+
export { bucketEndpointMiddleware, bucketEndpointMiddlewareOptions, getBucketEndpointPlugin, } from "./middleware-bucket-endpoint/bucketEndpointMiddleware";
|
|
27
|
+
export type { BucketHostname } from "./middleware-bucket-endpoint/bucketHostname";
|
|
28
|
+
export { bucketHostname } from "./middleware-bucket-endpoint/bucketHostname";
|
|
29
|
+
export type { BucketEndpointInputConfig, BucketEndpointResolvedConfig, } from "./middleware-bucket-endpoint/configurations";
|
|
30
|
+
export { resolveBucketEndpointConfig } from "./middleware-bucket-endpoint/configurations";
|
|
31
|
+
export { getArnResources, getSuffixForArnEndpoint, validateOutpostService, validatePartition, validateAccountId, validateRegion, validateDNSHostLabel, validateNoDualstack, validateNoFIPS, } from "./middleware-bucket-endpoint/bucketHostnameUtils";
|
|
32
|
+
export { addExpectContinueMiddleware, addExpectContinueMiddlewareOptions, getAddExpectContinuePlugin, } from "./middleware-expect-continue/middleware-expect-continue";
|
|
33
|
+
export { locationConstraintMiddleware, locationConstraintMiddlewareOptions, getLocationConstraintPlugin, } from "./middleware-location-constraint/middleware-location-constraint";
|
|
34
|
+
export type { LocationConstraintInputConfig, LocationConstraintResolvedConfig, } from "./middleware-location-constraint/configuration";
|
|
35
|
+
export { resolveLocationConstraintConfig } from "./middleware-location-constraint/configuration";
|
|
36
|
+
export { ssecMiddleware, ssecMiddlewareOptions, getSsecPlugin, isValidBase64EncodedSSECustomerKey, } from "./middleware-ssec/middleware-ssec";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export { checkContentLengthHeader, checkContentLengthHeaderMiddlewareOptions, getCheckContentLengthHeaderPlugin, } from "./middleware-check-content-length-header/check-content-length-header";
|
|
2
|
+
export { regionRedirectEndpointMiddleware, regionRedirectEndpointMiddlewareOptions, } from "./middleware-region-redirect/region-redirect-endpoint-middleware";
|
|
3
|
+
export { regionRedirectMiddleware, regionRedirectMiddlewareOptions, getRegionRedirectMiddlewarePlugin, } from "./middleware-region-redirect/region-redirect-middleware";
|
|
4
|
+
export type { PreviouslyResolved } from "./middleware-region-redirect/region-redirect-middleware";
|
|
5
|
+
export type { S3InputConfig, S3ResolvedConfig } from "./middleware-s3-configuration/s3Configuration";
|
|
6
|
+
export { resolveS3Config } from "./middleware-s3-configuration/s3Configuration";
|
|
7
|
+
export { s3ExpiresMiddleware, s3ExpiresMiddlewareOptions, getS3ExpiresMiddlewarePlugin, } from "./middleware-s3-expires/s3-expires-middleware";
|
|
8
|
+
export { S3ExpressIdentityCache } from "./middleware-s3-express/classes/S3ExpressIdentityCache";
|
|
9
|
+
export { S3ExpressIdentityCacheEntry } from "./middleware-s3-express/classes/S3ExpressIdentityCacheEntry";
|
|
10
|
+
export { S3ExpressIdentityProviderImpl } from "./middleware-s3-express/classes/S3ExpressIdentityProviderImpl";
|
|
11
|
+
export { SignatureV4S3Express } from "./middleware-s3-express/classes/SignatureV4S3Express";
|
|
12
|
+
export { NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS } from "./middleware-s3-express/constants";
|
|
13
|
+
export { getS3ExpressPlugin, s3ExpressMiddleware, s3ExpressMiddlewareOptions, } from "./middleware-s3-express/functions/s3ExpressMiddleware";
|
|
14
|
+
export { getS3ExpressHttpSigningPlugin, s3ExpressHttpSigningMiddleware, s3ExpressHttpSigningMiddlewareOptions, } from "./middleware-s3-express/functions/s3ExpressHttpSigningMiddleware";
|
|
15
|
+
export type { S3ExpressIdentity } from "./middleware-s3-express/interfaces/S3ExpressIdentity";
|
|
16
|
+
export type { S3ExpressIdentityProvider } from "./middleware-s3-express/interfaces/S3ExpressIdentityProvider";
|
|
17
|
+
export { throw200ExceptionsMiddleware, throw200ExceptionsMiddlewareOptions, getThrow200ExceptionsPlugin, } from "./middleware-throw-200-exceptions/throw-200-exceptions";
|
|
18
|
+
export { validateBucketNameMiddleware, validateBucketNameMiddlewareOptions, getValidateBucketNamePlugin, } from "./middleware-validate-bucket-name/validate-bucket-name";
|
|
19
|
+
export { S3RestXmlProtocol } from "./protocol/S3RestXmlProtocol";
|
|
20
|
+
export { NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS, NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME, NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME, } from "./NodeDisableMultiregionAccessPointConfigOptions";
|
|
21
|
+
export { NODE_USE_ARN_REGION_CONFIG_OPTIONS, NODE_USE_ARN_REGION_ENV_NAME, NODE_USE_ARN_REGION_INI_NAME, } from "./NodeUseArnRegionConfigOptions";
|
|
22
|
+
export { bucketEndpointMiddleware, bucketEndpointMiddlewareOptions, getBucketEndpointPlugin, } from "./middleware-bucket-endpoint/bucketEndpointMiddleware";
|
|
23
|
+
export type { BucketHostname } from "./middleware-bucket-endpoint/bucketHostname";
|
|
24
|
+
export { bucketHostname } from "./middleware-bucket-endpoint/bucketHostname";
|
|
25
|
+
export type { BucketEndpointInputConfig, BucketEndpointResolvedConfig, } from "./middleware-bucket-endpoint/configurations";
|
|
26
|
+
export { resolveBucketEndpointConfig } from "./middleware-bucket-endpoint/configurations";
|
|
27
|
+
export { getArnResources, getSuffixForArnEndpoint, validateOutpostService, validatePartition, validateAccountId, validateRegion, validateDNSHostLabel, validateNoDualstack, validateNoFIPS, } from "./middleware-bucket-endpoint/bucketHostnameUtils";
|
|
28
|
+
export { addExpectContinueMiddleware, addExpectContinueMiddlewareOptions, getAddExpectContinuePlugin, } from "./middleware-expect-continue/middleware-expect-continue";
|
|
29
|
+
export { locationConstraintMiddleware, locationConstraintMiddlewareOptions, getLocationConstraintPlugin, } from "./middleware-location-constraint/middleware-location-constraint";
|
|
30
|
+
export type { LocationConstraintInputConfig, LocationConstraintResolvedConfig, } from "./middleware-location-constraint/configuration";
|
|
31
|
+
export { resolveLocationConstraintConfig } from "./middleware-location-constraint/configuration";
|
|
32
|
+
export { ssecMiddleware, ssecMiddlewareOptions, getSsecPlugin, isValidBase64EncodedSSECustomerKey, } from "./middleware-ssec/middleware-ssec";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BuildMiddleware, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";
|
|
2
|
+
import type { BucketEndpointResolvedConfig } from "./configurations";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated unused as of EndpointsV2.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const bucketEndpointMiddleware: (options: BucketEndpointResolvedConfig) => BuildMiddleware<any, any>;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated unused as of EndpointsV2.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const bucketEndpointMiddlewareOptions: RelativeMiddlewareOptions;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated unused as of EndpointsV2.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const getBucketEndpointPlugin: (options: BucketEndpointResolvedConfig) => Pluggable<any, any>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ArnHostnameParams, BucketHostnameParams } from "./bucketHostnameUtils";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated unused as of EndpointsV2.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface BucketHostname {
|
|
7
|
+
hostname: string;
|
|
8
|
+
bucketEndpoint: boolean;
|
|
9
|
+
signingRegion?: string;
|
|
10
|
+
signingService?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated unused as of EndpointsV2.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export declare const bucketHostname: (options: BucketHostnameParams | ArnHostnameParams) => BucketHostname;
|