@aws-sdk/client-s3 3.38.0 → 3.41.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.
Files changed (108) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist-cjs/endpoints.js +399 -142
  3. package/dist-cjs/runtimeConfig.browser.js +6 -3
  4. package/dist-cjs/runtimeConfig.js +5 -3
  5. package/dist-es/endpoints.js +399 -142
  6. package/dist-es/runtimeConfig.browser.js +3 -2
  7. package/dist-es/runtimeConfig.js +3 -3
  8. package/dist-types/S3Client.d.ts +8 -0
  9. package/dist-types/commands/AbortMultipartUploadCommand.d.ts +1 -1
  10. package/dist-types/commands/CompleteMultipartUploadCommand.d.ts +1 -1
  11. package/dist-types/commands/CopyObjectCommand.d.ts +1 -1
  12. package/dist-types/commands/CreateBucketCommand.d.ts +1 -1
  13. package/dist-types/commands/CreateMultipartUploadCommand.d.ts +1 -1
  14. package/dist-types/commands/DeleteBucketAnalyticsConfigurationCommand.d.ts +1 -1
  15. package/dist-types/commands/DeleteBucketCommand.d.ts +1 -1
  16. package/dist-types/commands/DeleteBucketCorsCommand.d.ts +1 -1
  17. package/dist-types/commands/DeleteBucketEncryptionCommand.d.ts +1 -1
  18. package/dist-types/commands/DeleteBucketIntelligentTieringConfigurationCommand.d.ts +1 -1
  19. package/dist-types/commands/DeleteBucketInventoryConfigurationCommand.d.ts +1 -1
  20. package/dist-types/commands/DeleteBucketLifecycleCommand.d.ts +1 -1
  21. package/dist-types/commands/DeleteBucketMetricsConfigurationCommand.d.ts +1 -1
  22. package/dist-types/commands/DeleteBucketOwnershipControlsCommand.d.ts +1 -1
  23. package/dist-types/commands/DeleteBucketPolicyCommand.d.ts +1 -1
  24. package/dist-types/commands/DeleteBucketReplicationCommand.d.ts +1 -1
  25. package/dist-types/commands/DeleteBucketTaggingCommand.d.ts +1 -1
  26. package/dist-types/commands/DeleteBucketWebsiteCommand.d.ts +1 -1
  27. package/dist-types/commands/DeleteObjectCommand.d.ts +1 -1
  28. package/dist-types/commands/DeleteObjectTaggingCommand.d.ts +1 -1
  29. package/dist-types/commands/DeleteObjectsCommand.d.ts +1 -1
  30. package/dist-types/commands/DeletePublicAccessBlockCommand.d.ts +1 -1
  31. package/dist-types/commands/GetBucketAccelerateConfigurationCommand.d.ts +1 -1
  32. package/dist-types/commands/GetBucketAclCommand.d.ts +1 -1
  33. package/dist-types/commands/GetBucketAnalyticsConfigurationCommand.d.ts +1 -1
  34. package/dist-types/commands/GetBucketCorsCommand.d.ts +1 -1
  35. package/dist-types/commands/GetBucketEncryptionCommand.d.ts +1 -1
  36. package/dist-types/commands/GetBucketIntelligentTieringConfigurationCommand.d.ts +1 -1
  37. package/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +1 -1
  38. package/dist-types/commands/GetBucketLifecycleConfigurationCommand.d.ts +1 -1
  39. package/dist-types/commands/GetBucketLocationCommand.d.ts +1 -1
  40. package/dist-types/commands/GetBucketLoggingCommand.d.ts +1 -1
  41. package/dist-types/commands/GetBucketMetricsConfigurationCommand.d.ts +1 -1
  42. package/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +1 -1
  43. package/dist-types/commands/GetBucketOwnershipControlsCommand.d.ts +1 -1
  44. package/dist-types/commands/GetBucketPolicyCommand.d.ts +1 -1
  45. package/dist-types/commands/GetBucketPolicyStatusCommand.d.ts +1 -1
  46. package/dist-types/commands/GetBucketReplicationCommand.d.ts +1 -1
  47. package/dist-types/commands/GetBucketRequestPaymentCommand.d.ts +1 -1
  48. package/dist-types/commands/GetBucketTaggingCommand.d.ts +1 -1
  49. package/dist-types/commands/GetBucketVersioningCommand.d.ts +1 -1
  50. package/dist-types/commands/GetBucketWebsiteCommand.d.ts +1 -1
  51. package/dist-types/commands/GetObjectAclCommand.d.ts +1 -1
  52. package/dist-types/commands/GetObjectCommand.d.ts +1 -1
  53. package/dist-types/commands/GetObjectLegalHoldCommand.d.ts +1 -1
  54. package/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +1 -1
  55. package/dist-types/commands/GetObjectRetentionCommand.d.ts +1 -1
  56. package/dist-types/commands/GetObjectTaggingCommand.d.ts +1 -1
  57. package/dist-types/commands/GetObjectTorrentCommand.d.ts +1 -1
  58. package/dist-types/commands/GetPublicAccessBlockCommand.d.ts +1 -1
  59. package/dist-types/commands/HeadBucketCommand.d.ts +1 -1
  60. package/dist-types/commands/HeadObjectCommand.d.ts +1 -1
  61. package/dist-types/commands/ListBucketAnalyticsConfigurationsCommand.d.ts +1 -1
  62. package/dist-types/commands/ListBucketIntelligentTieringConfigurationsCommand.d.ts +1 -1
  63. package/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +1 -1
  64. package/dist-types/commands/ListBucketMetricsConfigurationsCommand.d.ts +1 -1
  65. package/dist-types/commands/ListBucketsCommand.d.ts +1 -1
  66. package/dist-types/commands/ListMultipartUploadsCommand.d.ts +1 -1
  67. package/dist-types/commands/ListObjectVersionsCommand.d.ts +1 -1
  68. package/dist-types/commands/ListObjectsCommand.d.ts +1 -1
  69. package/dist-types/commands/ListObjectsV2Command.d.ts +1 -1
  70. package/dist-types/commands/ListPartsCommand.d.ts +1 -1
  71. package/dist-types/commands/PutBucketAccelerateConfigurationCommand.d.ts +1 -1
  72. package/dist-types/commands/PutBucketAclCommand.d.ts +1 -1
  73. package/dist-types/commands/PutBucketAnalyticsConfigurationCommand.d.ts +1 -1
  74. package/dist-types/commands/PutBucketCorsCommand.d.ts +1 -1
  75. package/dist-types/commands/PutBucketEncryptionCommand.d.ts +1 -1
  76. package/dist-types/commands/PutBucketIntelligentTieringConfigurationCommand.d.ts +1 -1
  77. package/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +1 -1
  78. package/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +1 -1
  79. package/dist-types/commands/PutBucketLoggingCommand.d.ts +1 -1
  80. package/dist-types/commands/PutBucketMetricsConfigurationCommand.d.ts +1 -1
  81. package/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +1 -1
  82. package/dist-types/commands/PutBucketOwnershipControlsCommand.d.ts +1 -1
  83. package/dist-types/commands/PutBucketPolicyCommand.d.ts +1 -1
  84. package/dist-types/commands/PutBucketReplicationCommand.d.ts +1 -1
  85. package/dist-types/commands/PutBucketRequestPaymentCommand.d.ts +1 -1
  86. package/dist-types/commands/PutBucketTaggingCommand.d.ts +1 -1
  87. package/dist-types/commands/PutBucketVersioningCommand.d.ts +1 -1
  88. package/dist-types/commands/PutBucketWebsiteCommand.d.ts +1 -1
  89. package/dist-types/commands/PutObjectAclCommand.d.ts +1 -1
  90. package/dist-types/commands/PutObjectCommand.d.ts +1 -1
  91. package/dist-types/commands/PutObjectLegalHoldCommand.d.ts +1 -1
  92. package/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +1 -1
  93. package/dist-types/commands/PutObjectRetentionCommand.d.ts +1 -1
  94. package/dist-types/commands/PutObjectTaggingCommand.d.ts +1 -1
  95. package/dist-types/commands/PutPublicAccessBlockCommand.d.ts +1 -1
  96. package/dist-types/commands/RestoreObjectCommand.d.ts +1 -1
  97. package/dist-types/commands/SelectObjectContentCommand.d.ts +1 -1
  98. package/dist-types/commands/UploadPartCommand.d.ts +1 -1
  99. package/dist-types/commands/UploadPartCopyCommand.d.ts +1 -1
  100. package/dist-types/commands/WriteGetObjectResponseCommand.d.ts +1 -1
  101. package/dist-types/runtimeConfig.browser.d.ts +2 -1
  102. package/dist-types/runtimeConfig.d.ts +2 -1
  103. package/dist-types/runtimeConfig.native.d.ts +2 -1
  104. package/dist-types/ts3.4/S3Client.d.ts +4 -0
  105. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -1
  106. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -1
  107. package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -1
  108. package/package.json +38 -38
@@ -20,7 +20,7 @@ const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
20
20
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
21
21
  const smithy_client_1 = require("@aws-sdk/smithy-client");
22
22
  const getRuntimeConfig = (config) => {
23
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
23
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
24
24
  smithy_client_1.emitWarningIfUnsupportedVersion(process.version);
25
25
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
26
26
  return {
@@ -42,8 +42,10 @@ const getRuntimeConfig = (config) => {
42
42
  streamCollector: (_o = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _o !== void 0 ? _o : node_http_handler_1.streamCollector,
43
43
  streamHasher: (_p = config === null || config === void 0 ? void 0 : config.streamHasher) !== null && _p !== void 0 ? _p : hash_stream_node_1.fileStreamHasher,
44
44
  useArnRegion: (_q = config === null || config === void 0 ? void 0 : config.useArnRegion) !== null && _q !== void 0 ? _q : node_config_provider_1.loadConfig(middleware_bucket_endpoint_1.NODE_USE_ARN_REGION_CONFIG_OPTIONS),
45
- utf8Decoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _r !== void 0 ? _r : util_utf8_node_1.fromUtf8,
46
- utf8Encoder: (_s = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _s !== void 0 ? _s : util_utf8_node_1.toUtf8,
45
+ useDualstackEndpoint: (_r = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _r !== void 0 ? _r : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
46
+ useFipsEndpoint: (_s = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _s !== void 0 ? _s : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
47
+ utf8Decoder: (_t = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _t !== void 0 ? _t : util_utf8_node_1.fromUtf8,
48
+ utf8Encoder: (_u = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _u !== void 0 ? _u : util_utf8_node_1.toUtf8,
47
49
  };
48
50
  };
49
51
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,169 +1,376 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
3
  var regionHash = {
4
- "accesspoint-af-south-1": {
5
- hostname: "s3-accesspoint.af-south-1.amazonaws.com",
6
- },
7
- "accesspoint-ap-east-1": {
8
- hostname: "s3-accesspoint.ap-east-1.amazonaws.com",
9
- },
10
- "accesspoint-ap-northeast-1": {
11
- hostname: "s3-accesspoint.ap-northeast-1.amazonaws.com",
12
- },
13
- "accesspoint-ap-northeast-2": {
14
- hostname: "s3-accesspoint.ap-northeast-2.amazonaws.com",
15
- },
16
- "accesspoint-ap-northeast-3": {
17
- hostname: "s3-accesspoint.ap-northeast-3.amazonaws.com",
18
- },
19
- "accesspoint-ap-south-1": {
20
- hostname: "s3-accesspoint.ap-south-1.amazonaws.com",
21
- },
22
- "accesspoint-ap-southeast-1": {
23
- hostname: "s3-accesspoint.ap-southeast-1.amazonaws.com",
24
- },
25
- "accesspoint-ap-southeast-2": {
26
- hostname: "s3-accesspoint.ap-southeast-2.amazonaws.com",
27
- },
28
- "accesspoint-ca-central-1": {
29
- hostname: "s3-accesspoint.ca-central-1.amazonaws.com",
30
- },
31
- "accesspoint-cn-north-1": {
32
- hostname: "s3-accesspoint.cn-north-1.amazonaws.com.cn",
33
- },
34
- "accesspoint-cn-northwest-1": {
35
- hostname: "s3-accesspoint.cn-northwest-1.amazonaws.com.cn",
36
- },
37
- "accesspoint-eu-central-1": {
38
- hostname: "s3-accesspoint.eu-central-1.amazonaws.com",
39
- },
40
- "accesspoint-eu-north-1": {
41
- hostname: "s3-accesspoint.eu-north-1.amazonaws.com",
42
- },
43
- "accesspoint-eu-south-1": {
44
- hostname: "s3-accesspoint.eu-south-1.amazonaws.com",
45
- },
46
- "accesspoint-eu-west-1": {
47
- hostname: "s3-accesspoint.eu-west-1.amazonaws.com",
48
- },
49
- "accesspoint-eu-west-2": {
50
- hostname: "s3-accesspoint.eu-west-2.amazonaws.com",
51
- },
52
- "accesspoint-eu-west-3": {
53
- hostname: "s3-accesspoint.eu-west-3.amazonaws.com",
54
- },
55
- "accesspoint-me-south-1": {
56
- hostname: "s3-accesspoint.me-south-1.amazonaws.com",
57
- },
58
- "accesspoint-sa-east-1": {
59
- hostname: "s3-accesspoint.sa-east-1.amazonaws.com",
60
- },
61
- "accesspoint-us-east-1": {
62
- hostname: "s3-accesspoint.us-east-1.amazonaws.com",
63
- },
64
- "accesspoint-us-east-2": {
65
- hostname: "s3-accesspoint.us-east-2.amazonaws.com",
4
+ "af-south-1": {
5
+ variants: [
6
+ {
7
+ hostname: "s3.af-south-1.amazonaws.com",
8
+ tags: [],
9
+ },
10
+ {
11
+ hostname: "s3.dualstack.af-south-1.amazonaws.com",
12
+ tags: ["dualstack"],
13
+ },
14
+ ],
66
15
  },
67
- "accesspoint-us-gov-east-1": {
68
- hostname: "s3-accesspoint.us-gov-east-1.amazonaws.com",
16
+ "ap-east-1": {
17
+ variants: [
18
+ {
19
+ hostname: "s3.ap-east-1.amazonaws.com",
20
+ tags: [],
21
+ },
22
+ {
23
+ hostname: "s3.dualstack.ap-east-1.amazonaws.com",
24
+ tags: ["dualstack"],
25
+ },
26
+ ],
69
27
  },
70
- "accesspoint-us-gov-west-1": {
71
- hostname: "s3-accesspoint.us-gov-west-1.amazonaws.com",
28
+ "ap-northeast-1": {
29
+ variants: [
30
+ {
31
+ hostname: "s3.ap-northeast-1.amazonaws.com",
32
+ tags: [],
33
+ },
34
+ {
35
+ hostname: "s3.dualstack.ap-northeast-1.amazonaws.com",
36
+ tags: ["dualstack"],
37
+ },
38
+ ],
72
39
  },
73
- "accesspoint-us-west-1": {
74
- hostname: "s3-accesspoint.us-west-1.amazonaws.com",
40
+ "ap-northeast-2": {
41
+ variants: [
42
+ {
43
+ hostname: "s3.ap-northeast-2.amazonaws.com",
44
+ tags: [],
45
+ },
46
+ {
47
+ hostname: "s3.dualstack.ap-northeast-2.amazonaws.com",
48
+ tags: ["dualstack"],
49
+ },
50
+ ],
75
51
  },
76
- "accesspoint-us-west-2": {
77
- hostname: "s3-accesspoint.us-west-2.amazonaws.com",
52
+ "ap-northeast-3": {
53
+ variants: [
54
+ {
55
+ hostname: "s3.ap-northeast-3.amazonaws.com",
56
+ tags: [],
57
+ },
58
+ {
59
+ hostname: "s3.dualstack.ap-northeast-3.amazonaws.com",
60
+ tags: ["dualstack"],
61
+ },
62
+ ],
78
63
  },
79
- "ap-northeast-1": {
80
- hostname: "s3.ap-northeast-1.amazonaws.com",
64
+ "ap-south-1": {
65
+ variants: [
66
+ {
67
+ hostname: "s3.ap-south-1.amazonaws.com",
68
+ tags: [],
69
+ },
70
+ {
71
+ hostname: "s3.dualstack.ap-south-1.amazonaws.com",
72
+ tags: ["dualstack"],
73
+ },
74
+ ],
81
75
  },
82
76
  "ap-southeast-1": {
83
- hostname: "s3.ap-southeast-1.amazonaws.com",
77
+ variants: [
78
+ {
79
+ hostname: "s3.ap-southeast-1.amazonaws.com",
80
+ tags: [],
81
+ },
82
+ {
83
+ hostname: "s3.dualstack.ap-southeast-1.amazonaws.com",
84
+ tags: ["dualstack"],
85
+ },
86
+ ],
84
87
  },
85
88
  "ap-southeast-2": {
86
- hostname: "s3.ap-southeast-2.amazonaws.com",
89
+ variants: [
90
+ {
91
+ hostname: "s3.ap-southeast-2.amazonaws.com",
92
+ tags: [],
93
+ },
94
+ {
95
+ hostname: "s3.dualstack.ap-southeast-2.amazonaws.com",
96
+ tags: ["dualstack"],
97
+ },
98
+ ],
87
99
  },
88
100
  "aws-global": {
89
- hostname: "s3.amazonaws.com",
101
+ variants: [
102
+ {
103
+ hostname: "s3.amazonaws.com",
104
+ tags: [],
105
+ },
106
+ ],
90
107
  signingRegion: "us-east-1",
91
108
  },
92
- "eu-west-1": {
93
- hostname: "s3.eu-west-1.amazonaws.com",
109
+ "ca-central-1": {
110
+ variants: [
111
+ {
112
+ hostname: "s3.ca-central-1.amazonaws.com",
113
+ tags: [],
114
+ },
115
+ {
116
+ hostname: "s3-fips.ca-central-1.amazonaws.com",
117
+ tags: ["fips"],
118
+ },
119
+ {
120
+ hostname: "s3-fips.dualstack.ca-central-1.amazonaws.com",
121
+ tags: ["dualstack", "fips"],
122
+ },
123
+ {
124
+ hostname: "s3.dualstack.ca-central-1.amazonaws.com",
125
+ tags: ["dualstack"],
126
+ },
127
+ ],
94
128
  },
95
- "fips-accesspoint-ca-central-1": {
96
- hostname: "s3-accesspoint-fips.ca-central-1.amazonaws.com",
129
+ "cn-north-1": {
130
+ variants: [
131
+ {
132
+ hostname: "s3.cn-north-1.amazonaws.com.cn",
133
+ tags: [],
134
+ },
135
+ {
136
+ hostname: "s3.dualstack.cn-north-1.amazonaws.com.cn",
137
+ tags: ["dualstack"],
138
+ },
139
+ ],
97
140
  },
98
- "fips-accesspoint-us-east-1": {
99
- hostname: "s3-accesspoint-fips.us-east-1.amazonaws.com",
141
+ "cn-northwest-1": {
142
+ variants: [
143
+ {
144
+ hostname: "s3.cn-northwest-1.amazonaws.com.cn",
145
+ tags: [],
146
+ },
147
+ {
148
+ hostname: "s3.dualstack.cn-northwest-1.amazonaws.com.cn",
149
+ tags: ["dualstack"],
150
+ },
151
+ ],
100
152
  },
101
- "fips-accesspoint-us-east-2": {
102
- hostname: "s3-accesspoint-fips.us-east-2.amazonaws.com",
153
+ "eu-central-1": {
154
+ variants: [
155
+ {
156
+ hostname: "s3.eu-central-1.amazonaws.com",
157
+ tags: [],
158
+ },
159
+ {
160
+ hostname: "s3.dualstack.eu-central-1.amazonaws.com",
161
+ tags: ["dualstack"],
162
+ },
163
+ ],
103
164
  },
104
- "fips-accesspoint-us-gov-east-1": {
105
- hostname: "s3-accesspoint-fips.us-gov-east-1.amazonaws.com",
165
+ "eu-north-1": {
166
+ variants: [
167
+ {
168
+ hostname: "s3.eu-north-1.amazonaws.com",
169
+ tags: [],
170
+ },
171
+ {
172
+ hostname: "s3.dualstack.eu-north-1.amazonaws.com",
173
+ tags: ["dualstack"],
174
+ },
175
+ ],
106
176
  },
107
- "fips-accesspoint-us-gov-west-1": {
108
- hostname: "s3-accesspoint-fips.us-gov-west-1.amazonaws.com",
177
+ "eu-south-1": {
178
+ variants: [
179
+ {
180
+ hostname: "s3.eu-south-1.amazonaws.com",
181
+ tags: [],
182
+ },
183
+ {
184
+ hostname: "s3.dualstack.eu-south-1.amazonaws.com",
185
+ tags: ["dualstack"],
186
+ },
187
+ ],
109
188
  },
110
- "fips-accesspoint-us-west-1": {
111
- hostname: "s3-accesspoint-fips.us-west-1.amazonaws.com",
189
+ "eu-west-1": {
190
+ variants: [
191
+ {
192
+ hostname: "s3.eu-west-1.amazonaws.com",
193
+ tags: [],
194
+ },
195
+ {
196
+ hostname: "s3.dualstack.eu-west-1.amazonaws.com",
197
+ tags: ["dualstack"],
198
+ },
199
+ ],
112
200
  },
113
- "fips-accesspoint-us-west-2": {
114
- hostname: "s3-accesspoint-fips.us-west-2.amazonaws.com",
201
+ "eu-west-2": {
202
+ variants: [
203
+ {
204
+ hostname: "s3.eu-west-2.amazonaws.com",
205
+ tags: [],
206
+ },
207
+ {
208
+ hostname: "s3.dualstack.eu-west-2.amazonaws.com",
209
+ tags: ["dualstack"],
210
+ },
211
+ ],
115
212
  },
116
- "fips-us-gov-west-1": {
117
- hostname: "s3-fips.us-gov-west-1.amazonaws.com",
118
- signingRegion: "us-gov-west-1",
213
+ "eu-west-3": {
214
+ variants: [
215
+ {
216
+ hostname: "s3.eu-west-3.amazonaws.com",
217
+ tags: [],
218
+ },
219
+ {
220
+ hostname: "s3.dualstack.eu-west-3.amazonaws.com",
221
+ tags: ["dualstack"],
222
+ },
223
+ ],
224
+ },
225
+ "me-south-1": {
226
+ variants: [
227
+ {
228
+ hostname: "s3.me-south-1.amazonaws.com",
229
+ tags: [],
230
+ },
231
+ {
232
+ hostname: "s3.dualstack.me-south-1.amazonaws.com",
233
+ tags: ["dualstack"],
234
+ },
235
+ ],
119
236
  },
120
237
  "s3-external-1": {
121
- hostname: "s3-external-1.amazonaws.com",
238
+ variants: [
239
+ {
240
+ hostname: "s3-external-1.amazonaws.com",
241
+ tags: [],
242
+ },
243
+ ],
122
244
  signingRegion: "us-east-1",
123
245
  },
124
246
  "sa-east-1": {
125
- hostname: "s3.sa-east-1.amazonaws.com",
247
+ variants: [
248
+ {
249
+ hostname: "s3.sa-east-1.amazonaws.com",
250
+ tags: [],
251
+ },
252
+ {
253
+ hostname: "s3.dualstack.sa-east-1.amazonaws.com",
254
+ tags: ["dualstack"],
255
+ },
256
+ ],
126
257
  },
127
258
  "us-east-1": {
128
- hostname: "s3.us-east-1.amazonaws.com",
259
+ variants: [
260
+ {
261
+ hostname: "s3.us-east-1.amazonaws.com",
262
+ tags: [],
263
+ },
264
+ {
265
+ hostname: "s3-fips.dualstack.us-east-1.amazonaws.com",
266
+ tags: ["dualstack", "fips"],
267
+ },
268
+ {
269
+ hostname: "s3-fips.us-east-1.amazonaws.com",
270
+ tags: ["fips"],
271
+ },
272
+ {
273
+ hostname: "s3.dualstack.us-east-1.amazonaws.com",
274
+ tags: ["dualstack"],
275
+ },
276
+ ],
277
+ },
278
+ "us-east-2": {
279
+ variants: [
280
+ {
281
+ hostname: "s3.us-east-2.amazonaws.com",
282
+ tags: [],
283
+ },
284
+ {
285
+ hostname: "s3-fips.dualstack.us-east-2.amazonaws.com",
286
+ tags: ["dualstack", "fips"],
287
+ },
288
+ {
289
+ hostname: "s3-fips.us-east-2.amazonaws.com",
290
+ tags: ["fips"],
291
+ },
292
+ {
293
+ hostname: "s3.dualstack.us-east-2.amazonaws.com",
294
+ tags: ["dualstack"],
295
+ },
296
+ ],
129
297
  },
130
298
  "us-gov-east-1": {
131
- hostname: "s3.us-gov-east-1.amazonaws.com",
299
+ variants: [
300
+ {
301
+ hostname: "s3.us-gov-east-1.amazonaws.com",
302
+ tags: [],
303
+ },
304
+ {
305
+ hostname: "s3-fips.us-gov-east-1.amazonaws.com",
306
+ tags: ["fips"],
307
+ },
308
+ {
309
+ hostname: "s3.dualstack.us-gov-east-1.amazonaws.com",
310
+ tags: ["dualstack"],
311
+ },
312
+ ],
132
313
  },
133
314
  "us-gov-west-1": {
134
- hostname: "s3.us-gov-west-1.amazonaws.com",
315
+ variants: [
316
+ {
317
+ hostname: "s3.us-gov-west-1.amazonaws.com",
318
+ tags: [],
319
+ },
320
+ {
321
+ hostname: "s3-fips.us-gov-west-1.amazonaws.com",
322
+ tags: ["fips"],
323
+ },
324
+ {
325
+ hostname: "s3.dualstack.us-gov-west-1.amazonaws.com",
326
+ tags: ["dualstack"],
327
+ },
328
+ ],
135
329
  },
136
330
  "us-west-1": {
137
- hostname: "s3.us-west-1.amazonaws.com",
331
+ variants: [
332
+ {
333
+ hostname: "s3.us-west-1.amazonaws.com",
334
+ tags: [],
335
+ },
336
+ {
337
+ hostname: "s3-fips.dualstack.us-west-1.amazonaws.com",
338
+ tags: ["dualstack", "fips"],
339
+ },
340
+ {
341
+ hostname: "s3-fips.us-west-1.amazonaws.com",
342
+ tags: ["fips"],
343
+ },
344
+ {
345
+ hostname: "s3.dualstack.us-west-1.amazonaws.com",
346
+ tags: ["dualstack"],
347
+ },
348
+ ],
138
349
  },
139
350
  "us-west-2": {
140
- hostname: "s3.us-west-2.amazonaws.com",
351
+ variants: [
352
+ {
353
+ hostname: "s3.us-west-2.amazonaws.com",
354
+ tags: [],
355
+ },
356
+ {
357
+ hostname: "s3-fips.dualstack.us-west-2.amazonaws.com",
358
+ tags: ["dualstack", "fips"],
359
+ },
360
+ {
361
+ hostname: "s3-fips.us-west-2.amazonaws.com",
362
+ tags: ["fips"],
363
+ },
364
+ {
365
+ hostname: "s3.dualstack.us-west-2.amazonaws.com",
366
+ tags: ["dualstack"],
367
+ },
368
+ ],
141
369
  },
142
370
  };
143
371
  var partitionHash = {
144
372
  aws: {
145
373
  regions: [
146
- "accesspoint-af-south-1",
147
- "accesspoint-ap-east-1",
148
- "accesspoint-ap-northeast-1",
149
- "accesspoint-ap-northeast-2",
150
- "accesspoint-ap-northeast-3",
151
- "accesspoint-ap-south-1",
152
- "accesspoint-ap-southeast-1",
153
- "accesspoint-ap-southeast-2",
154
- "accesspoint-ca-central-1",
155
- "accesspoint-eu-central-1",
156
- "accesspoint-eu-north-1",
157
- "accesspoint-eu-south-1",
158
- "accesspoint-eu-west-1",
159
- "accesspoint-eu-west-2",
160
- "accesspoint-eu-west-3",
161
- "accesspoint-me-south-1",
162
- "accesspoint-sa-east-1",
163
- "accesspoint-us-east-1",
164
- "accesspoint-us-east-2",
165
- "accesspoint-us-west-1",
166
- "accesspoint-us-west-2",
167
374
  "af-south-1",
168
375
  "ap-east-1",
169
376
  "ap-northeast-1",
@@ -180,11 +387,11 @@ var partitionHash = {
180
387
  "eu-west-1",
181
388
  "eu-west-2",
182
389
  "eu-west-3",
183
- "fips-accesspoint-ca-central-1",
184
- "fips-accesspoint-us-east-1",
185
- "fips-accesspoint-us-east-2",
186
- "fips-accesspoint-us-west-1",
187
- "fips-accesspoint-us-west-2",
390
+ "fips-ca-central-1",
391
+ "fips-us-east-1",
392
+ "fips-us-east-2",
393
+ "fips-us-west-1",
394
+ "fips-us-west-2",
188
395
  "me-south-1",
189
396
  "s3-external-1",
190
397
  "sa-east-1",
@@ -193,31 +400,81 @@ var partitionHash = {
193
400
  "us-west-1",
194
401
  "us-west-2",
195
402
  ],
196
- hostname: "s3.{region}.amazonaws.com",
403
+ regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
404
+ variants: [
405
+ {
406
+ hostname: "s3.{region}.amazonaws.com",
407
+ tags: [],
408
+ },
409
+ {
410
+ hostname: "s3-fips.dualstack.{region}.amazonaws.com",
411
+ tags: ["dualstack", "fips"],
412
+ },
413
+ {
414
+ hostname: "s3.dualstack.{region}.amazonaws.com",
415
+ tags: ["dualstack"],
416
+ },
417
+ ],
197
418
  },
198
419
  "aws-cn": {
199
- regions: ["accesspoint-cn-north-1", "accesspoint-cn-northwest-1", "cn-north-1", "cn-northwest-1"],
200
- hostname: "s3.{region}.amazonaws.com.cn",
420
+ regions: ["cn-north-1", "cn-northwest-1"],
421
+ regionRegex: "^cn\\-\\w+\\-\\d+$",
422
+ variants: [
423
+ {
424
+ hostname: "s3.{region}.amazonaws.com.cn",
425
+ tags: [],
426
+ },
427
+ {
428
+ hostname: "s3.dualstack.{region}.amazonaws.com.cn",
429
+ tags: ["dualstack"],
430
+ },
431
+ ],
201
432
  },
202
433
  "aws-iso": {
203
434
  regions: ["us-iso-east-1", "us-iso-west-1"],
204
- hostname: "s3.{region}.c2s.ic.gov",
435
+ regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
436
+ variants: [
437
+ {
438
+ hostname: "s3.{region}.c2s.ic.gov",
439
+ tags: [],
440
+ },
441
+ {
442
+ hostname: "s3-fips.{region}.c2s.ic.gov",
443
+ tags: ["fips"],
444
+ },
445
+ ],
205
446
  },
206
447
  "aws-iso-b": {
207
448
  regions: ["us-isob-east-1"],
208
- hostname: "s3.{region}.sc2s.sgov.gov",
449
+ regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
450
+ variants: [
451
+ {
452
+ hostname: "s3.{region}.sc2s.sgov.gov",
453
+ tags: [],
454
+ },
455
+ {
456
+ hostname: "s3-fips.{region}.sc2s.sgov.gov",
457
+ tags: ["fips"],
458
+ },
459
+ ],
209
460
  },
210
461
  "aws-us-gov": {
211
- regions: [
212
- "accesspoint-us-gov-east-1",
213
- "accesspoint-us-gov-west-1",
214
- "fips-accesspoint-us-gov-east-1",
215
- "fips-accesspoint-us-gov-west-1",
216
- "fips-us-gov-west-1",
217
- "us-gov-east-1",
218
- "us-gov-west-1",
219
- ],
220
- hostname: "s3.{region}.amazonaws.com",
462
+ regions: ["fips-us-gov-east-1", "fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"],
463
+ regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
464
+ variants: [
465
+ {
466
+ hostname: "s3.{region}.amazonaws.com",
467
+ tags: [],
468
+ },
469
+ {
470
+ hostname: "s3-fips.dualstack.{region}.amazonaws.com",
471
+ tags: ["dualstack", "fips"],
472
+ },
473
+ {
474
+ hostname: "s3.dualstack.{region}.amazonaws.com",
475
+ tags: ["dualstack"],
476
+ },
477
+ ],
221
478
  },
222
479
  };
223
480
  export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
@@ -1,6 +1,7 @@
1
1
  import { __assign } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
4
5
  import { eventStreamSerdeProvider } from "@aws-sdk/eventstream-serde-browser";
5
6
  import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
7
  import { blobHasher as streamHasher } from "@aws-sdk/hash-blob-browser";
@@ -13,7 +14,7 @@ import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
13
14
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
14
15
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
16
  export var getRuntimeConfig = function (config) {
16
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
17
18
  var clientSharedValues = getSharedRuntimeConfig(config);
18
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), eventStreamSerdeProvider: (_f = config === null || config === void 0 ? void 0 : config.eventStreamSerdeProvider) !== null && _f !== void 0 ? _f : eventStreamSerdeProvider, maxAttempts: (_g = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _g !== void 0 ? _g : DEFAULT_MAX_ATTEMPTS, md5: (_h = config === null || config === void 0 ? void 0 : config.md5) !== null && _h !== void 0 ? _h : Md5, region: (_j = config === null || config === void 0 ? void 0 : config.region) !== null && _j !== void 0 ? _j : invalidProvider("Region is missing"), requestHandler: (_k = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _k !== void 0 ? _k : new FetchHttpHandler(), retryMode: (_l = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _l !== void 0 ? _l : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_m = config === null || config === void 0 ? void 0 : config.sha256) !== null && _m !== void 0 ? _m : Sha256, streamCollector: (_o = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _o !== void 0 ? _o : streamCollector, streamHasher: (_p = config === null || config === void 0 ? void 0 : config.streamHasher) !== null && _p !== void 0 ? _p : streamHasher, utf8Decoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _q !== void 0 ? _q : fromUtf8, utf8Encoder: (_r = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _r !== void 0 ? _r : toUtf8 });
19
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), eventStreamSerdeProvider: (_f = config === null || config === void 0 ? void 0 : config.eventStreamSerdeProvider) !== null && _f !== void 0 ? _f : eventStreamSerdeProvider, maxAttempts: (_g = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _g !== void 0 ? _g : DEFAULT_MAX_ATTEMPTS, md5: (_h = config === null || config === void 0 ? void 0 : config.md5) !== null && _h !== void 0 ? _h : Md5, region: (_j = config === null || config === void 0 ? void 0 : config.region) !== null && _j !== void 0 ? _j : invalidProvider("Region is missing"), requestHandler: (_k = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _k !== void 0 ? _k : new FetchHttpHandler(), retryMode: (_l = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _l !== void 0 ? _l : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_m = config === null || config === void 0 ? void 0 : config.sha256) !== null && _m !== void 0 ? _m : Sha256, streamCollector: (_o = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _o !== void 0 ? _o : streamCollector, streamHasher: (_p = config === null || config === void 0 ? void 0 : config.streamHasher) !== null && _p !== void 0 ? _p : streamHasher, useDualstackEndpoint: (_q = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _q !== void 0 ? _q : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_r = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _r !== void 0 ? _r : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_s = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _s !== void 0 ? _s : fromUtf8, utf8Encoder: (_t = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _t !== void 0 ? _t : toUtf8 });
19
20
  };