@aws-sdk/middleware-bucket-endpoint 3.808.0 → 3.830.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +7 -36
- package/dist-es/NodeUseArnRegionConfigOptions.js +1 -1
- package/dist-es/bucketHostname.js +1 -19
- package/dist-es/bucketHostnameUtils.js +2 -23
- package/dist-es/configurations.js +1 -1
- package/dist-types/NodeUseArnRegionConfigOptions.d.ts +2 -2
- package/dist-types/bucketEndpointMiddleware.d.ts +12 -0
- package/dist-types/bucketHostname.d.ts +8 -0
- package/dist-types/bucketHostnameUtils.d.ts +59 -3
- package/dist-types/configurations.d.ts +13 -1
- package/dist-types/ts3.4/NodeUseArnRegionConfigOptions.d.ts +3 -1
- package/dist-types/ts3.4/configurations.d.ts +1 -1
- package/package.json +5 -5
package/dist-cjs/index.js
CHANGED
|
@@ -61,7 +61,11 @@ var NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region";
|
|
|
61
61
|
var NODE_USE_ARN_REGION_CONFIG_OPTIONS = {
|
|
62
62
|
environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, NODE_USE_ARN_REGION_ENV_NAME, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"),
|
|
63
63
|
configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, NODE_USE_ARN_REGION_INI_NAME, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"),
|
|
64
|
-
|
|
64
|
+
/**
|
|
65
|
+
* useArnRegion has specific behavior when undefined instead of false.
|
|
66
|
+
* We therefore use undefined as the default value instead of false.
|
|
67
|
+
*/
|
|
68
|
+
default: void 0
|
|
65
69
|
};
|
|
66
70
|
|
|
67
71
|
// src/bucketEndpointMiddleware.ts
|
|
@@ -116,26 +120,12 @@ var validatePartition = /* @__PURE__ */ __name((partition, options) => {
|
|
|
116
120
|
}
|
|
117
121
|
}, "validatePartition");
|
|
118
122
|
var validateRegion = /* @__PURE__ */ __name((region, options) => {
|
|
119
|
-
if (region === "") {
|
|
120
|
-
throw new Error("ARN region is empty");
|
|
121
|
-
}
|
|
122
|
-
if (options.useFipsEndpoint) {
|
|
123
|
-
if (!options.allowFipsRegion) {
|
|
124
|
-
throw new Error("FIPS region is not supported");
|
|
125
|
-
} else if (!isEqualRegions(region, options.clientRegion)) {
|
|
126
|
-
throw new Error(`Client FIPS region ${options.clientRegion} doesn't match region ${region} in ARN`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
if (!options.useArnRegion && !isEqualRegions(region, options.clientRegion || "") && !isEqualRegions(region, options.clientSigningRegion || "")) {
|
|
130
|
-
throw new Error(`Region in ARN is incompatible, got ${region} but expected ${options.clientRegion}`);
|
|
131
|
-
}
|
|
132
123
|
}, "validateRegion");
|
|
133
124
|
var validateRegionalClient = /* @__PURE__ */ __name((region) => {
|
|
134
125
|
if (["s3-external-1", "aws-global"].includes(region)) {
|
|
135
126
|
throw new Error(`Client region ${region} is not regional`);
|
|
136
127
|
}
|
|
137
128
|
}, "validateRegionalClient");
|
|
138
|
-
var isEqualRegions = /* @__PURE__ */ __name((regionA, regionB) => regionA === regionB, "isEqualRegions");
|
|
139
129
|
var validateAccountId = /* @__PURE__ */ __name((accountId) => {
|
|
140
130
|
if (!/[0-9]{12}/.exec(accountId)) {
|
|
141
131
|
throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'");
|
|
@@ -173,8 +163,6 @@ var getArnResources = /* @__PURE__ */ __name((resource) => {
|
|
|
173
163
|
}
|
|
174
164
|
}, "getArnResources");
|
|
175
165
|
var validateNoDualstack = /* @__PURE__ */ __name((dualstackEndpoint) => {
|
|
176
|
-
if (dualstackEndpoint)
|
|
177
|
-
throw new Error("Dualstack endpoint is not supported with Outpost or Multi-region Access Point ARN.");
|
|
178
166
|
}, "validateNoDualstack");
|
|
179
167
|
var validateNoFIPS = /* @__PURE__ */ __name((useFipsEndpoint) => {
|
|
180
168
|
if (useFipsEndpoint) throw new Error(`FIPS region is not supported with Outpost.`);
|
|
@@ -269,14 +257,6 @@ var getEndpointFromObjectLambdaArn = /* @__PURE__ */ __name(({
|
|
|
269
257
|
}) => {
|
|
270
258
|
const { accountId, region, service } = bucketName;
|
|
271
259
|
validateRegionalClient(clientRegion);
|
|
272
|
-
validateRegion(region, {
|
|
273
|
-
useArnRegion,
|
|
274
|
-
clientRegion,
|
|
275
|
-
clientSigningRegion,
|
|
276
|
-
allowFipsRegion: true,
|
|
277
|
-
useFipsEndpoint: fipsEndpoint
|
|
278
|
-
});
|
|
279
|
-
validateNoDualstack(dualstackEndpoint);
|
|
280
260
|
const DNSHostLabel = `${accesspointName}-${accountId}`;
|
|
281
261
|
validateDNSHostLabel(DNSHostLabel, { tlsCompatible });
|
|
282
262
|
const endpointRegion = useArnRegion ? region : clientRegion;
|
|
@@ -299,7 +279,6 @@ var getEndpointFromMRAPArn = /* @__PURE__ */ __name(({
|
|
|
299
279
|
throw new Error("SDK is attempting to use a MRAP ARN. Please enable to feature.");
|
|
300
280
|
}
|
|
301
281
|
validateMrapAlias(mrapAlias);
|
|
302
|
-
validateNoDualstack(dualstackEndpoint);
|
|
303
282
|
return {
|
|
304
283
|
bucketEndpoint: true,
|
|
305
284
|
hostname: `${mrapAlias}${isCustomEndpoint ? "" : `.accesspoint.s3-global`}.${hostnameSuffix}`,
|
|
@@ -320,14 +299,12 @@ var getEndpointFromOutpostArn = /* @__PURE__ */ __name(({
|
|
|
320
299
|
hostnameSuffix
|
|
321
300
|
}) => {
|
|
322
301
|
validateRegionalClient(clientRegion);
|
|
323
|
-
validateRegion(bucketName.region, { useArnRegion, clientRegion, clientSigningRegion, useFipsEndpoint: fipsEndpoint });
|
|
324
302
|
const DNSHostLabel = `${accesspointName}-${bucketName.accountId}`;
|
|
325
303
|
validateDNSHostLabel(DNSHostLabel, { tlsCompatible });
|
|
326
304
|
const endpointRegion = useArnRegion ? bucketName.region : clientRegion;
|
|
327
305
|
const signingRegion = useArnRegion ? bucketName.region : clientSigningRegion;
|
|
328
306
|
validateOutpostService(bucketName.service);
|
|
329
307
|
validateDNSHostLabel(outpostId, { tlsCompatible });
|
|
330
|
-
validateNoDualstack(dualstackEndpoint);
|
|
331
308
|
validateNoFIPS(fipsEndpoint);
|
|
332
309
|
const hostnamePrefix = `${DNSHostLabel}.${outpostId}`;
|
|
333
310
|
return {
|
|
@@ -350,13 +327,6 @@ var getEndpointFromAccessPointArn = /* @__PURE__ */ __name(({
|
|
|
350
327
|
hostnameSuffix
|
|
351
328
|
}) => {
|
|
352
329
|
validateRegionalClient(clientRegion);
|
|
353
|
-
validateRegion(bucketName.region, {
|
|
354
|
-
useArnRegion,
|
|
355
|
-
clientRegion,
|
|
356
|
-
clientSigningRegion,
|
|
357
|
-
allowFipsRegion: true,
|
|
358
|
-
useFipsEndpoint: fipsEndpoint
|
|
359
|
-
});
|
|
360
330
|
const hostnamePrefix = `${accesspointName}-${bucketName.accountId}`;
|
|
361
331
|
validateDNSHostLabel(hostnamePrefix, { tlsCompatible });
|
|
362
332
|
const endpointRegion = useArnRegion ? bucketName.region : clientRegion;
|
|
@@ -458,7 +428,8 @@ function resolveBucketEndpointConfig(input) {
|
|
|
458
428
|
bucketEndpoint = false,
|
|
459
429
|
forcePathStyle = false,
|
|
460
430
|
useAccelerateEndpoint = false,
|
|
461
|
-
useArnRegion
|
|
431
|
+
// useArnRegion has specific behavior when undefined instead of false.
|
|
432
|
+
useArnRegion,
|
|
462
433
|
disableMultiregionAccessPoints = false
|
|
463
434
|
} = input;
|
|
464
435
|
return Object.assign(input, {
|
|
@@ -4,5 +4,5 @@ export const NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region";
|
|
|
4
4
|
export const NODE_USE_ARN_REGION_CONFIG_OPTIONS = {
|
|
5
5
|
environmentVariableSelector: (env) => booleanSelector(env, NODE_USE_ARN_REGION_ENV_NAME, SelectorType.ENV),
|
|
6
6
|
configFileSelector: (profile) => booleanSelector(profile, NODE_USE_ARN_REGION_INI_NAME, SelectorType.CONFIG),
|
|
7
|
-
default:
|
|
7
|
+
default: undefined,
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DOT_PATTERN, getArnResources, getSuffix, getSuffixForArnEndpoint, isBucketNameOptions, isDnsCompatibleBucketName, validateAccountId, validateArnEndpointOptions, validateCustomEndpoint, validateDNSHostLabel, validateMrapAlias,
|
|
1
|
+
import { DOT_PATTERN, getArnResources, getSuffix, getSuffixForArnEndpoint, isBucketNameOptions, isDnsCompatibleBucketName, validateAccountId, validateArnEndpointOptions, validateCustomEndpoint, validateDNSHostLabel, validateMrapAlias, validateNoFIPS, validateOutpostService, validatePartition, validateRegionalClient, validateS3Service, validateService, } from "./bucketHostnameUtils";
|
|
2
2
|
export const bucketHostname = (options) => {
|
|
3
3
|
validateCustomEndpoint(options);
|
|
4
4
|
return isBucketNameOptions(options)
|
|
@@ -50,14 +50,6 @@ const getEndpointFromArn = (options) => {
|
|
|
50
50
|
const getEndpointFromObjectLambdaArn = ({ dualstackEndpoint = false, fipsEndpoint = false, tlsCompatible = true, useArnRegion, clientRegion, clientSigningRegion = clientRegion, accesspointName, bucketName, hostnameSuffix, }) => {
|
|
51
51
|
const { accountId, region, service } = bucketName;
|
|
52
52
|
validateRegionalClient(clientRegion);
|
|
53
|
-
validateRegion(region, {
|
|
54
|
-
useArnRegion,
|
|
55
|
-
clientRegion,
|
|
56
|
-
clientSigningRegion,
|
|
57
|
-
allowFipsRegion: true,
|
|
58
|
-
useFipsEndpoint: fipsEndpoint,
|
|
59
|
-
});
|
|
60
|
-
validateNoDualstack(dualstackEndpoint);
|
|
61
53
|
const DNSHostLabel = `${accesspointName}-${accountId}`;
|
|
62
54
|
validateDNSHostLabel(DNSHostLabel, { tlsCompatible });
|
|
63
55
|
const endpointRegion = useArnRegion ? region : clientRegion;
|
|
@@ -74,7 +66,6 @@ const getEndpointFromMRAPArn = ({ disableMultiregionAccessPoints, dualstackEndpo
|
|
|
74
66
|
throw new Error("SDK is attempting to use a MRAP ARN. Please enable to feature.");
|
|
75
67
|
}
|
|
76
68
|
validateMrapAlias(mrapAlias);
|
|
77
|
-
validateNoDualstack(dualstackEndpoint);
|
|
78
69
|
return {
|
|
79
70
|
bucketEndpoint: true,
|
|
80
71
|
hostname: `${mrapAlias}${isCustomEndpoint ? "" : `.accesspoint.s3-global`}.${hostnameSuffix}`,
|
|
@@ -83,14 +74,12 @@ const getEndpointFromMRAPArn = ({ disableMultiregionAccessPoints, dualstackEndpo
|
|
|
83
74
|
};
|
|
84
75
|
const getEndpointFromOutpostArn = ({ useArnRegion, clientRegion, clientSigningRegion = clientRegion, bucketName, outpostId, dualstackEndpoint = false, fipsEndpoint = false, tlsCompatible = true, accesspointName, isCustomEndpoint, hostnameSuffix, }) => {
|
|
85
76
|
validateRegionalClient(clientRegion);
|
|
86
|
-
validateRegion(bucketName.region, { useArnRegion, clientRegion, clientSigningRegion, useFipsEndpoint: fipsEndpoint });
|
|
87
77
|
const DNSHostLabel = `${accesspointName}-${bucketName.accountId}`;
|
|
88
78
|
validateDNSHostLabel(DNSHostLabel, { tlsCompatible });
|
|
89
79
|
const endpointRegion = useArnRegion ? bucketName.region : clientRegion;
|
|
90
80
|
const signingRegion = useArnRegion ? bucketName.region : clientSigningRegion;
|
|
91
81
|
validateOutpostService(bucketName.service);
|
|
92
82
|
validateDNSHostLabel(outpostId, { tlsCompatible });
|
|
93
|
-
validateNoDualstack(dualstackEndpoint);
|
|
94
83
|
validateNoFIPS(fipsEndpoint);
|
|
95
84
|
const hostnamePrefix = `${DNSHostLabel}.${outpostId}`;
|
|
96
85
|
return {
|
|
@@ -102,13 +91,6 @@ const getEndpointFromOutpostArn = ({ useArnRegion, clientRegion, clientSigningRe
|
|
|
102
91
|
};
|
|
103
92
|
const getEndpointFromAccessPointArn = ({ useArnRegion, clientRegion, clientSigningRegion = clientRegion, bucketName, dualstackEndpoint = false, fipsEndpoint = false, tlsCompatible = true, accesspointName, isCustomEndpoint, hostnameSuffix, }) => {
|
|
104
93
|
validateRegionalClient(clientRegion);
|
|
105
|
-
validateRegion(bucketName.region, {
|
|
106
|
-
useArnRegion,
|
|
107
|
-
clientRegion,
|
|
108
|
-
clientSigningRegion,
|
|
109
|
-
allowFipsRegion: true,
|
|
110
|
-
useFipsEndpoint: fipsEndpoint,
|
|
111
|
-
});
|
|
112
94
|
const hostnamePrefix = `${accesspointName}-${bucketName.accountId}`;
|
|
113
95
|
validateDNSHostLabel(hostnamePrefix, { tlsCompatible });
|
|
114
96
|
const endpointRegion = useArnRegion ? bucketName.region : clientRegion;
|
|
@@ -46,30 +46,12 @@ export const validatePartition = (partition, options) => {
|
|
|
46
46
|
throw new Error(`Partition in ARN is incompatible, got "${partition}" but expected "${options.clientPartition}"`);
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
export const validateRegion = (region, options) => {
|
|
50
|
-
if (region === "") {
|
|
51
|
-
throw new Error("ARN region is empty");
|
|
52
|
-
}
|
|
53
|
-
if (options.useFipsEndpoint) {
|
|
54
|
-
if (!options.allowFipsRegion) {
|
|
55
|
-
throw new Error("FIPS region is not supported");
|
|
56
|
-
}
|
|
57
|
-
else if (!isEqualRegions(region, options.clientRegion)) {
|
|
58
|
-
throw new Error(`Client FIPS region ${options.clientRegion} doesn't match region ${region} in ARN`);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (!options.useArnRegion &&
|
|
62
|
-
!isEqualRegions(region, options.clientRegion || "") &&
|
|
63
|
-
!isEqualRegions(region, options.clientSigningRegion || "")) {
|
|
64
|
-
throw new Error(`Region in ARN is incompatible, got ${region} but expected ${options.clientRegion}`);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
49
|
+
export const validateRegion = (region, options) => { };
|
|
67
50
|
export const validateRegionalClient = (region) => {
|
|
68
51
|
if (["s3-external-1", "aws-global"].includes(region)) {
|
|
69
52
|
throw new Error(`Client region ${region} is not regional`);
|
|
70
53
|
}
|
|
71
54
|
};
|
|
72
|
-
const isEqualRegions = (regionA, regionB) => regionA === regionB;
|
|
73
55
|
export const validateAccountId = (accountId) => {
|
|
74
56
|
if (!/[0-9]{12}/.exec(accountId)) {
|
|
75
57
|
throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'");
|
|
@@ -112,10 +94,7 @@ export const getArnResources = (resource) => {
|
|
|
112
94
|
throw new Error(`ARN resource should begin with 'accesspoint${delimiter}' or 'outpost${delimiter}'`);
|
|
113
95
|
}
|
|
114
96
|
};
|
|
115
|
-
export const validateNoDualstack = (dualstackEndpoint) => {
|
|
116
|
-
if (dualstackEndpoint)
|
|
117
|
-
throw new Error("Dualstack endpoint is not supported with Outpost or Multi-region Access Point ARN.");
|
|
118
|
-
};
|
|
97
|
+
export const validateNoDualstack = (dualstackEndpoint) => { };
|
|
119
98
|
export const validateNoFIPS = (useFipsEndpoint) => {
|
|
120
99
|
if (useFipsEndpoint)
|
|
121
100
|
throw new Error(`FIPS region is not supported with Outpost.`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function resolveBucketEndpointConfig(input) {
|
|
2
|
-
const { bucketEndpoint = false, forcePathStyle = false, useAccelerateEndpoint = false, useArnRegion
|
|
2
|
+
const { bucketEndpoint = false, forcePathStyle = false, useAccelerateEndpoint = false, useArnRegion, disableMultiregionAccessPoints = false, } = input;
|
|
3
3
|
return Object.assign(input, {
|
|
4
4
|
bucketEndpoint,
|
|
5
5
|
forcePathStyle,
|
|
@@ -4,6 +4,6 @@ export declare const NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region";
|
|
|
4
4
|
/**
|
|
5
5
|
* Config to load useArnRegion from environment variables and shared INI files
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @internal
|
|
8
8
|
*/
|
|
9
|
-
export declare const NODE_USE_ARN_REGION_CONFIG_OPTIONS: LoadedConfigSelectors<boolean>;
|
|
9
|
+
export declare const NODE_USE_ARN_REGION_CONFIG_OPTIONS: LoadedConfigSelectors<boolean | undefined>;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { BuildMiddleware, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";
|
|
2
2
|
import { BucketEndpointResolvedConfig } from "./configurations";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated unused as of EndpointsV2.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
3
7
|
export declare const bucketEndpointMiddleware: (options: BucketEndpointResolvedConfig) => BuildMiddleware<any, any>;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated unused as of EndpointsV2.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
4
12
|
export declare const bucketEndpointMiddlewareOptions: RelativeMiddlewareOptions;
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated unused as of EndpointsV2.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
5
17
|
export declare const getBucketEndpointPlugin: (options: BucketEndpointResolvedConfig) => Pluggable<any, any>;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { ArnHostnameParams, BucketHostnameParams } from "./bucketHostnameUtils";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated unused as of EndpointsV2.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
2
6
|
export interface BucketHostname {
|
|
3
7
|
hostname: string;
|
|
4
8
|
bucketEndpoint: boolean;
|
|
5
9
|
signingRegion?: string;
|
|
6
10
|
signingService?: string;
|
|
7
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated unused as of EndpointsV2.
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
8
16
|
export declare const bucketHostname: (options: BucketHostnameParams | ArnHostnameParams) => BucketHostname;
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import { ARN } from "@aws-sdk/util-arn-parser";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated unused as of EndpointsV2.
|
|
4
|
+
*/
|
|
2
5
|
export declare const DOT_PATTERN: RegExp;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated unused as of EndpointsV2.
|
|
8
|
+
*/
|
|
3
9
|
export declare const S3_HOSTNAME_PATTERN: RegExp;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated unused as of EndpointsV2.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
4
14
|
export interface AccessPointArn extends ARN {
|
|
5
15
|
accessPointName: string;
|
|
6
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated unused as of EndpointsV2.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
7
21
|
export interface BucketHostnameParams {
|
|
8
22
|
isCustomEndpoint?: boolean;
|
|
9
23
|
baseHostname: string;
|
|
@@ -15,6 +29,10 @@ export interface BucketHostnameParams {
|
|
|
15
29
|
pathStyleEndpoint?: boolean;
|
|
16
30
|
tlsCompatible?: boolean;
|
|
17
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated unused as of EndpointsV2.
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
18
36
|
export interface ArnHostnameParams extends Omit<BucketHostnameParams, "bucketName"> {
|
|
19
37
|
bucketName: ARN;
|
|
20
38
|
clientSigningRegion?: string;
|
|
@@ -22,6 +40,10 @@ export interface ArnHostnameParams extends Omit<BucketHostnameParams, "bucketNam
|
|
|
22
40
|
useArnRegion?: boolean;
|
|
23
41
|
disableMultiregionAccessPoints?: boolean;
|
|
24
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated unused as of EndpointsV2.
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
25
47
|
export declare const isBucketNameOptions: (options: BucketHostnameParams | ArnHostnameParams) => options is BucketHostnameParams;
|
|
26
48
|
/**
|
|
27
49
|
* Determines whether a given string is DNS compliant per the rules outlined by
|
|
@@ -30,23 +52,46 @@ export declare const isBucketNameOptions: (options: BucketHostnameParams | ArnHo
|
|
|
30
52
|
* @internal
|
|
31
53
|
*
|
|
32
54
|
* @see https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html
|
|
55
|
+
*
|
|
56
|
+
* @deprecated unused as of EndpointsV2.
|
|
33
57
|
*/
|
|
34
58
|
export declare const isDnsCompatibleBucketName: (bucketName: string) => boolean;
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated unused as of EndpointsV2.
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
35
63
|
export declare const getSuffix: (hostname: string) => [string, string];
|
|
36
64
|
/**
|
|
37
65
|
* Infer region and hostname suffix from a complete hostname
|
|
38
66
|
* @internal
|
|
39
67
|
* @param hostname - Hostname
|
|
40
68
|
* @returns [Region, Hostname suffix]
|
|
69
|
+
*
|
|
70
|
+
* @deprecated unused as of EndpointsV2.
|
|
41
71
|
*/
|
|
42
72
|
export declare const getSuffixForArnEndpoint: (hostname: string) => [string, string];
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated unused as of EndpointsV2.
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
43
77
|
export declare const validateArnEndpointOptions: (options: {
|
|
44
78
|
accelerateEndpoint?: boolean;
|
|
45
79
|
tlsCompatible?: boolean;
|
|
46
80
|
pathStyleEndpoint?: boolean;
|
|
47
81
|
}) => void;
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated unused as of EndpointsV2.
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
48
86
|
export declare const validateService: (service: string) => void;
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated unused as of EndpointsV2.
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
49
91
|
export declare const validateS3Service: (service: string) => void;
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
50
95
|
export declare const validateOutpostService: (service: string) => void;
|
|
51
96
|
/**
|
|
52
97
|
* Validate partition inferred from ARN is the same to `options.clientPartition`.
|
|
@@ -56,10 +101,14 @@ export declare const validatePartition: (partition: string, options: {
|
|
|
56
101
|
clientPartition: string;
|
|
57
102
|
}) => void;
|
|
58
103
|
/**
|
|
104
|
+
* (Previous to deprecation)
|
|
59
105
|
* validate region value inferred from ARN. If `options.useArnRegion` is set, it validates the region is not a FIPS
|
|
60
106
|
* region. If `options.useArnRegion` is unset, it validates the region is equal to `options.clientRegion` or
|
|
61
107
|
* `options.clientSigningRegion`.
|
|
108
|
+
*
|
|
62
109
|
* @internal
|
|
110
|
+
*
|
|
111
|
+
* @deprecated validation is deferred to the endpoint ruleset.
|
|
63
112
|
*/
|
|
64
113
|
export declare const validateRegion: (region: string, options: {
|
|
65
114
|
useArnRegion?: boolean;
|
|
@@ -69,8 +118,7 @@ export declare const validateRegion: (region: string, options: {
|
|
|
69
118
|
useFipsEndpoint: boolean;
|
|
70
119
|
}) => void;
|
|
71
120
|
/**
|
|
72
|
-
*
|
|
73
|
-
* @param region
|
|
121
|
+
* @deprecated unused as of EndpointsV2.
|
|
74
122
|
*/
|
|
75
123
|
export declare const validateRegionalClient: (region: string) => void;
|
|
76
124
|
/**
|
|
@@ -81,10 +129,14 @@ export declare const validateAccountId: (accountId: string) => void;
|
|
|
81
129
|
/**
|
|
82
130
|
* Validate a host label according to https://tools.ietf.org/html/rfc3986#section-3.2.2
|
|
83
131
|
* @internal
|
|
132
|
+
* @deprecated unused as of EndpointsV2.
|
|
84
133
|
*/
|
|
85
134
|
export declare const validateDNSHostLabel: (label: string, options?: {
|
|
86
135
|
tlsCompatible?: boolean;
|
|
87
136
|
}) => void;
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated unused as of EndpointsV2.
|
|
139
|
+
*/
|
|
88
140
|
export declare const validateCustomEndpoint: (options: {
|
|
89
141
|
isCustomEndpoint?: boolean;
|
|
90
142
|
dualstackEndpoint?: boolean;
|
|
@@ -102,17 +154,21 @@ export declare const getArnResources: (resource: string) => {
|
|
|
102
154
|
outpostId?: string;
|
|
103
155
|
};
|
|
104
156
|
/**
|
|
105
|
-
* Throw if dual stack configuration is set to true.
|
|
157
|
+
* (Prior to deprecation) Throw if dual stack configuration is set to true.
|
|
106
158
|
* @internal
|
|
159
|
+
*
|
|
160
|
+
* @deprecated validation deferred to endpoints ruleset.
|
|
107
161
|
*/
|
|
108
162
|
export declare const validateNoDualstack: (dualstackEndpoint?: boolean) => void;
|
|
109
163
|
/**
|
|
110
164
|
* Validate fips endpoint is not set up.
|
|
111
165
|
* @internal
|
|
166
|
+
* @deprecated unused as of EndpointsV2.
|
|
112
167
|
*/
|
|
113
168
|
export declare const validateNoFIPS: (useFipsEndpoint?: boolean) => void;
|
|
114
169
|
/**
|
|
115
170
|
* Validate the multi-region access point alias.
|
|
116
171
|
* @internal
|
|
172
|
+
* @deprecated unused as of EndpointsV2.
|
|
117
173
|
*/
|
|
118
174
|
export declare const validateMrapAlias: (name: string) => void;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Provider, RegionInfoProvider } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated unused as of EndpointsV2.
|
|
4
|
+
*/
|
|
2
5
|
export interface BucketEndpointInputConfig {
|
|
3
6
|
/**
|
|
4
7
|
* Whether to use the bucket name as the endpoint for this request. The bucket
|
|
@@ -31,6 +34,9 @@ export interface BucketEndpointInputConfig {
|
|
|
31
34
|
*/
|
|
32
35
|
disableMultiregionAccessPoints?: boolean | Provider<boolean>;
|
|
33
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated unused as of EndpointsV2.
|
|
39
|
+
*/
|
|
34
40
|
interface PreviouslyResolved {
|
|
35
41
|
isCustomEndpoint?: boolean;
|
|
36
42
|
region: Provider<string>;
|
|
@@ -38,6 +44,9 @@ interface PreviouslyResolved {
|
|
|
38
44
|
useFipsEndpoint: Provider<boolean>;
|
|
39
45
|
useDualstackEndpoint: Provider<boolean>;
|
|
40
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated unused as of EndpointsV2.
|
|
49
|
+
*/
|
|
41
50
|
export interface BucketEndpointResolvedConfig {
|
|
42
51
|
/**
|
|
43
52
|
* Whether the endpoint is specified by caller.
|
|
@@ -67,7 +76,7 @@ export interface BucketEndpointResolvedConfig {
|
|
|
67
76
|
/**
|
|
68
77
|
* Resolved value for input config {@link BucketEndpointInputConfig.useArnRegion}
|
|
69
78
|
*/
|
|
70
|
-
useArnRegion: Provider<boolean>;
|
|
79
|
+
useArnRegion: Provider<boolean | undefined>;
|
|
71
80
|
/**
|
|
72
81
|
* Resolved value for input config {@link RegionInputConfig.region}
|
|
73
82
|
*/
|
|
@@ -79,5 +88,8 @@ export interface BucketEndpointResolvedConfig {
|
|
|
79
88
|
regionInfoProvider: RegionInfoProvider;
|
|
80
89
|
disableMultiregionAccessPoints: Provider<boolean>;
|
|
81
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated unused as of EndpointsV2.
|
|
93
|
+
*/
|
|
82
94
|
export declare function resolveBucketEndpointConfig<T>(input: T & PreviouslyResolved & BucketEndpointInputConfig): T & BucketEndpointResolvedConfig;
|
|
83
95
|
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { LoadedConfigSelectors } from "@smithy/node-config-provider";
|
|
2
2
|
export declare const NODE_USE_ARN_REGION_ENV_NAME = "AWS_S3_USE_ARN_REGION";
|
|
3
3
|
export declare const NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region";
|
|
4
|
-
export declare const NODE_USE_ARN_REGION_CONFIG_OPTIONS: LoadedConfigSelectors<
|
|
4
|
+
export declare const NODE_USE_ARN_REGION_CONFIG_OPTIONS: LoadedConfigSelectors<
|
|
5
|
+
boolean | undefined
|
|
6
|
+
>;
|
|
@@ -20,7 +20,7 @@ export interface BucketEndpointResolvedConfig {
|
|
|
20
20
|
useAccelerateEndpoint: boolean;
|
|
21
21
|
useFipsEndpoint: Provider<boolean>;
|
|
22
22
|
useDualstackEndpoint: Provider<boolean>;
|
|
23
|
-
useArnRegion: Provider<boolean>;
|
|
23
|
+
useArnRegion: Provider<boolean | undefined>;
|
|
24
24
|
region: Provider<string>;
|
|
25
25
|
regionInfoProvider: RegionInfoProvider;
|
|
26
26
|
disableMultiregionAccessPoints: Provider<boolean>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-bucket-endpoint",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.830.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline middleware-bucket-endpoint",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@aws-sdk/types": "3.
|
|
25
|
+
"@aws-sdk/types": "3.821.0",
|
|
26
26
|
"@aws-sdk/util-arn-parser": "3.804.0",
|
|
27
|
-
"@smithy/node-config-provider": "^4.1.
|
|
28
|
-
"@smithy/protocol-http": "^5.1.
|
|
29
|
-
"@smithy/types": "^4.
|
|
27
|
+
"@smithy/node-config-provider": "^4.1.3",
|
|
28
|
+
"@smithy/protocol-http": "^5.1.2",
|
|
29
|
+
"@smithy/types": "^4.3.1",
|
|
30
30
|
"@smithy/util-config-provider": "^4.0.0",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|