1 - | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 - | #[allow(
|
3 - | clippy::collapsible_if,
|
4 - | clippy::bool_comparison,
|
5 - | clippy::nonminimal_bool,
|
6 - | clippy::comparison_to_empty,
|
7 - | clippy::redundant_pattern_matching,
|
8 - | clippy::useless_asref
|
9 - | )]
|
10 - | pub(super) fn resolve_endpoint(
|
11 - | _params: &crate::config::endpoint::Params,
|
12 - | _diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector,
|
13 - | partition_resolver: &crate::endpoint_lib::partition::PartitionResolver,
|
14 - | ) -> ::aws_smithy_http::endpoint::Result {
|
15 - | #[allow(unused_variables)]
|
16 - | let bucket = &_params.bucket;
|
17 - | #[allow(unused_variables)]
|
18 - | let region = &_params.region;
|
19 - | #[allow(unused_variables)]
|
20 - | let use_fips = &_params.use_fips;
|
21 - | #[allow(unused_variables)]
|
22 - | let use_dual_stack = &_params.use_dual_stack;
|
23 - | #[allow(unused_variables)]
|
24 - | let endpoint = &_params.endpoint;
|
25 - | #[allow(unused_variables)]
|
26 - | let force_path_style = &_params.force_path_style;
|
27 - | #[allow(unused_variables)]
|
28 - | let accelerate = &_params.accelerate;
|
29 - | #[allow(unused_variables)]
|
30 - | let use_global_endpoint = &_params.use_global_endpoint;
|
31 - | #[allow(unused_variables)]
|
32 - | let use_object_lambda_endpoint = &_params.use_object_lambda_endpoint;
|
33 - | #[allow(unused_variables)]
|
34 - | let key = &_params.key;
|
35 - | #[allow(unused_variables)]
|
36 - | let prefix = &_params.prefix;
|
37 - | #[allow(unused_variables)]
|
38 - | let copy_source = &_params.copy_source;
|
39 - | #[allow(unused_variables)]
|
40 - | let disable_access_points = &_params.disable_access_points;
|
41 - | #[allow(unused_variables)]
|
42 - | let disable_multi_region_access_points = &_params.disable_multi_region_access_points;
|
43 - | #[allow(unused_variables)]
|
44 - | let use_arn_region = &_params.use_arn_region;
|
45 - | #[allow(unused_variables)]
|
46 - | let use_s3_express_control_endpoint = &_params.use_s3_express_control_endpoint;
|
47 - | #[allow(unused_variables)]
|
48 - | let disable_s3_express_session_auth = &_params.disable_s3_express_session_auth;
|
49 - | #[allow(unused_variables)]
|
50 - | if let Some(region) = region {
|
51 - | if (*accelerate) == (true) {
|
52 - | if (*use_fips) == (true) {
|
53 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
54 - | "Accelerate cannot be used with FIPS".to_string(),
|
55 - | ));
|
56 - | }
|
57 - | }
|
58 - | if (*use_dual_stack) == (true) {
|
59 - | #[allow(unused_variables)]
|
60 - | if let Some(endpoint) = endpoint {
|
61 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
62 - | "Cannot set dual-stack in combination with a custom endpoint.".to_string(),
|
63 - | ));
|
64 - | }
|
65 - | }
|
66 - | #[allow(unused_variables)]
|
67 - | if let Some(endpoint) = endpoint {
|
68 - | if (*use_fips) == (true) {
|
69 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
70 - | "A custom endpoint cannot be combined with FIPS".to_string(),
|
71 - | ));
|
72 - | }
|
73 - | }
|
74 - | #[allow(unused_variables)]
|
75 - | if let Some(endpoint) = endpoint {
|
76 - | if (*accelerate) == (true) {
|
77 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
78 - | "A custom endpoint cannot be combined with S3 Accelerate".to_string(),
|
79 - | ));
|
80 - | }
|
81 - | }
|
82 - | if (*use_fips) == (true) {
|
83 - | #[allow(unused_variables)]
|
84 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
85 - | if (partition_result.name()) == ("aws-cn") {
|
86 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
87 - | "Partition does not support FIPS".to_string(),
|
88 - | ));
|
89 - | }
|
90 - | }
|
91 - | }
|
92 - | #[allow(unused_variables)]
|
93 - | if let Some(bucket) = bucket {
|
94 - | #[allow(unused_variables)]
|
95 - | if let Some(bucket_suffix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 6, true, _diagnostic_collector) {
|
96 - | if (bucket_suffix.as_ref() as &str) == ("--x-s3") {
|
97 - | if (*use_dual_stack) == (true) {
|
98 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
99 - | "S3Express does not support Dual-stack.".to_string(),
|
100 - | ));
|
101 - | }
|
102 - | if (*accelerate) == (true) {
|
103 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
104 - | "S3Express does not support S3 Accelerate.".to_string(),
|
105 - | ));
|
106 - | }
|
107 - | #[allow(unused_variables)]
|
108 - | if let Some(endpoint) = endpoint {
|
109 - | #[allow(unused_variables)]
|
110 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
111 - | #[allow(unused_variables)]
|
112 - | if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
|
113 - | if (*disable_s3_express_session_auth) == (true) {
|
114 - | if (url.is_ip()) == (true) {
|
115 - | let uri_encoded_bucket =
|
116 - | crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
|
117 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
118 - | .url({
|
119 - | let mut out = String::new();
|
120 - | #[allow(clippy::needless_borrow)]
|
121 - | out.push_str(&url.scheme());
|
122 - | out.push_str("://");
|
123 - | #[allow(clippy::needless_borrow)]
|
124 - | out.push_str(&url.authority());
|
125 - | out.push('/');
|
126 - | #[allow(clippy::needless_borrow)]
|
127 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
128 - | #[allow(clippy::needless_borrow)]
|
129 - | out.push_str(&url.path());
|
130 - | out
|
131 - | })
|
132 - | .property("backend", "S3Express".to_string())
|
133 - | .property(
|
134 - | "authSchemes",
|
135 - | vec![::aws_smithy_types::Document::from({
|
136 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
137 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
138 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
139 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
140 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
141 - | out
|
142 - | })],
|
143 - | )
|
144 - | .build());
|
145 - | }
|
146 - | if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
|
147 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
148 - | .url({
|
149 - | let mut out = String::new();
|
150 - | #[allow(clippy::needless_borrow)]
|
151 - | out.push_str(&url.scheme());
|
152 - | out.push_str("://");
|
153 - | #[allow(clippy::needless_borrow)]
|
154 - | out.push_str(&bucket.as_ref() as &str);
|
155 - | out.push('.');
|
156 - | #[allow(clippy::needless_borrow)]
|
157 - | out.push_str(&url.authority());
|
158 - | #[allow(clippy::needless_borrow)]
|
159 - | out.push_str(&url.path());
|
160 - | out
|
161 - | })
|
162 - | .property("backend", "S3Express".to_string())
|
163 - | .property(
|
164 - | "authSchemes",
|
165 - | vec![::aws_smithy_types::Document::from({
|
166 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
167 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
168 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
169 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
170 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
171 - | out
|
172 - | })],
|
173 - | )
|
174 - | .build());
|
175 - | }
|
176 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
177 - | "S3Express bucket name is not a valid virtual hostable name.".to_string(),
|
178 - | ));
|
179 - | }
|
180 - | }
|
181 - | if (url.is_ip()) == (true) {
|
182 - | let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
|
183 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
184 - | .url({
|
185 - | let mut out = String::new();
|
186 - | #[allow(clippy::needless_borrow)]
|
187 - | out.push_str(&url.scheme());
|
188 - | out.push_str("://");
|
189 - | #[allow(clippy::needless_borrow)]
|
190 - | out.push_str(&url.authority());
|
191 - | out.push('/');
|
192 - | #[allow(clippy::needless_borrow)]
|
193 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
194 - | #[allow(clippy::needless_borrow)]
|
195 - | out.push_str(&url.path());
|
196 - | out
|
197 - | })
|
198 - | .property("backend", "S3Express".to_string())
|
199 - | .property(
|
200 - | "authSchemes",
|
201 - | vec![::aws_smithy_types::Document::from({
|
202 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
203 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
204 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
205 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
206 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
207 - | out
|
208 - | })],
|
209 - | )
|
210 - | .build());
|
211 - | }
|
212 - | if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
|
213 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
214 - | .url({
|
215 - | let mut out = String::new();
|
216 - | #[allow(clippy::needless_borrow)]
|
217 - | out.push_str(&url.scheme());
|
218 - | out.push_str("://");
|
219 - | #[allow(clippy::needless_borrow)]
|
220 - | out.push_str(&bucket.as_ref() as &str);
|
221 - | out.push('.');
|
222 - | #[allow(clippy::needless_borrow)]
|
223 - | out.push_str(&url.authority());
|
224 - | #[allow(clippy::needless_borrow)]
|
225 - | out.push_str(&url.path());
|
226 - | out
|
227 - | })
|
228 - | .property("backend", "S3Express".to_string())
|
229 - | .property(
|
230 - | "authSchemes",
|
231 - | vec![::aws_smithy_types::Document::from({
|
232 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
233 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
234 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
235 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
236 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
237 - | out
|
238 - | })],
|
239 - | )
|
240 - | .build());
|
241 - | }
|
242 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
243 - | "S3Express bucket name is not a valid virtual hostable name.".to_string(),
|
244 - | ));
|
245 - | }
|
246 - | }
|
247 - | #[allow(unused_variables)]
|
248 - | if let Some(use_s3_express_control_endpoint) = use_s3_express_control_endpoint {
|
249 - | if (*use_s3_express_control_endpoint) == (true) {
|
250 - | #[allow(unused_variables)]
|
251 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
252 - | let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
|
253 - | if !(endpoint.is_some()) {
|
254 - | if (*use_fips) == (true) {
|
255 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
256 - | .url({
|
257 - | let mut out = String::new();
|
258 - | out.push_str("https://s3express-control-fips.");
|
259 - | #[allow(clippy::needless_borrow)]
|
260 - | out.push_str(®ion.as_ref() as &str);
|
261 - | out.push('.');
|
262 - | #[allow(clippy::needless_borrow)]
|
263 - | out.push_str(&partition_result.dns_suffix());
|
264 - | out.push('/');
|
265 - | #[allow(clippy::needless_borrow)]
|
266 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
267 - | out
|
268 - | })
|
269 - | .property("backend", "S3Express".to_string())
|
270 - | .property(
|
271 - | "authSchemes",
|
272 - | vec![::aws_smithy_types::Document::from({
|
273 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
274 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
275 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
276 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
277 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
278 - | out
|
279 - | })],
|
280 - | )
|
281 - | .build());
|
282 - | }
|
283 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
284 - | .url({
|
285 - | let mut out = String::new();
|
286 - | out.push_str("https://s3express-control.");
|
287 - | #[allow(clippy::needless_borrow)]
|
288 - | out.push_str(®ion.as_ref() as &str);
|
289 - | out.push('.');
|
290 - | #[allow(clippy::needless_borrow)]
|
291 - | out.push_str(&partition_result.dns_suffix());
|
292 - | out.push('/');
|
293 - | #[allow(clippy::needless_borrow)]
|
294 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
295 - | out
|
296 - | })
|
297 - | .property("backend", "S3Express".to_string())
|
298 - | .property(
|
299 - | "authSchemes",
|
300 - | vec![::aws_smithy_types::Document::from({
|
301 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
302 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
303 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
304 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
305 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
306 - | out
|
307 - | })],
|
308 - | )
|
309 - | .build());
|
310 - | }
|
311 - | #[allow(unreachable_code)]
|
312 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
313 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
314 - | )));
|
315 - | }
|
316 - | #[allow(unreachable_code)]
|
317 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
318 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
319 - | )));
|
320 - | }
|
321 - | }
|
322 - | if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
|
323 - | #[allow(unused_variables)]
|
324 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
325 - | #[allow(unused_variables)]
|
326 - | if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
|
327 - | if (*disable_s3_express_session_auth) == (true) {
|
328 - | #[allow(unused_variables)]
|
329 - | if let Some(s3express_availability_zone_id) =
|
330 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 14, true, _diagnostic_collector)
|
331 - | {
|
332 - | #[allow(unused_variables)]
|
333 - | if let Some(s3express_availability_zone_delim) =
|
334 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 14, 16, true, _diagnostic_collector)
|
335 - | {
|
336 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
337 - | if (*use_fips) == (true) {
|
338 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
339 - | .url({
|
340 - | let mut out = String::new();
|
341 - | out.push_str("https://");
|
342 - | #[allow(clippy::needless_borrow)]
|
343 - | out.push_str(&bucket.as_ref() as &str);
|
344 - | out.push_str(".s3express-fips-");
|
345 - | #[allow(clippy::needless_borrow)]
|
346 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
347 - | out.push('.');
|
348 - | #[allow(clippy::needless_borrow)]
|
349 - | out.push_str(®ion.as_ref() as &str);
|
350 - | out.push('.');
|
351 - | #[allow(clippy::needless_borrow)]
|
352 - | out.push_str(&partition_result.dns_suffix());
|
353 - | out
|
354 - | })
|
355 - | .property("backend", "S3Express".to_string())
|
356 - | .property(
|
357 - | "authSchemes",
|
358 - | vec![::aws_smithy_types::Document::from({
|
359 - | let mut out =
|
360 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
361 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
362 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
363 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
364 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
365 - | out
|
366 - | })],
|
367 - | )
|
368 - | .build());
|
369 - | }
|
370 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
371 - | .url({
|
372 - | let mut out = String::new();
|
373 - | out.push_str("https://");
|
374 - | #[allow(clippy::needless_borrow)]
|
375 - | out.push_str(&bucket.as_ref() as &str);
|
376 - | out.push_str(".s3express-");
|
377 - | #[allow(clippy::needless_borrow)]
|
378 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
379 - | out.push('.');
|
380 - | #[allow(clippy::needless_borrow)]
|
381 - | out.push_str(®ion.as_ref() as &str);
|
382 - | out.push('.');
|
383 - | #[allow(clippy::needless_borrow)]
|
384 - | out.push_str(&partition_result.dns_suffix());
|
385 - | out
|
386 - | })
|
387 - | .property("backend", "S3Express".to_string())
|
388 - | .property(
|
389 - | "authSchemes",
|
390 - | vec![::aws_smithy_types::Document::from({
|
391 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
392 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
393 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
394 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
395 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
396 - | out
|
397 - | })],
|
398 - | )
|
399 - | .build());
|
400 - | }
|
401 - | }
|
402 - | }
|
403 - | #[allow(unused_variables)]
|
404 - | if let Some(s3express_availability_zone_id) =
|
405 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 15, true, _diagnostic_collector)
|
406 - | {
|
407 - | #[allow(unused_variables)]
|
408 - | if let Some(s3express_availability_zone_delim) =
|
409 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
|
410 - | {
|
411 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
412 - | if (*use_fips) == (true) {
|
413 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
414 - | .url({
|
415 - | let mut out = String::new();
|
416 - | out.push_str("https://");
|
417 - | #[allow(clippy::needless_borrow)]
|
418 - | out.push_str(&bucket.as_ref() as &str);
|
419 - | out.push_str(".s3express-fips-");
|
420 - | #[allow(clippy::needless_borrow)]
|
421 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
422 - | out.push('.');
|
423 - | #[allow(clippy::needless_borrow)]
|
424 - | out.push_str(®ion.as_ref() as &str);
|
425 - | out.push('.');
|
426 - | #[allow(clippy::needless_borrow)]
|
427 - | out.push_str(&partition_result.dns_suffix());
|
428 - | out
|
429 - | })
|
430 - | .property("backend", "S3Express".to_string())
|
431 - | .property(
|
432 - | "authSchemes",
|
433 - | vec![::aws_smithy_types::Document::from({
|
434 - | let mut out =
|
435 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
436 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
437 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
438 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
439 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
440 - | out
|
441 - | })],
|
442 - | )
|
443 - | .build());
|
444 - | }
|
445 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
446 - | .url({
|
447 - | let mut out = String::new();
|
448 - | out.push_str("https://");
|
449 - | #[allow(clippy::needless_borrow)]
|
450 - | out.push_str(&bucket.as_ref() as &str);
|
451 - | out.push_str(".s3express-");
|
452 - | #[allow(clippy::needless_borrow)]
|
453 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
454 - | out.push('.');
|
455 - | #[allow(clippy::needless_borrow)]
|
456 - | out.push_str(®ion.as_ref() as &str);
|
457 - | out.push('.');
|
458 - | #[allow(clippy::needless_borrow)]
|
459 - | out.push_str(&partition_result.dns_suffix());
|
460 - | out
|
461 - | })
|
462 - | .property("backend", "S3Express".to_string())
|
463 - | .property(
|
464 - | "authSchemes",
|
465 - | vec![::aws_smithy_types::Document::from({
|
466 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
467 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
468 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
469 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
470 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
471 - | out
|
472 - | })],
|
473 - | )
|
474 - | .build());
|
475 - | }
|
476 - | }
|
477 - | }
|
478 - | #[allow(unused_variables)]
|
479 - | if let Some(s3express_availability_zone_id) =
|
480 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 19, true, _diagnostic_collector)
|
481 - | {
|
482 - | #[allow(unused_variables)]
|
483 - | if let Some(s3express_availability_zone_delim) =
|
484 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 19, 21, true, _diagnostic_collector)
|
485 - | {
|
486 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
487 - | if (*use_fips) == (true) {
|
488 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
489 - | .url({
|
490 - | let mut out = String::new();
|
491 - | out.push_str("https://");
|
492 - | #[allow(clippy::needless_borrow)]
|
493 - | out.push_str(&bucket.as_ref() as &str);
|
494 - | out.push_str(".s3express-fips-");
|
495 - | #[allow(clippy::needless_borrow)]
|
496 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
497 - | out.push('.');
|
498 - | #[allow(clippy::needless_borrow)]
|
499 - | out.push_str(®ion.as_ref() as &str);
|
500 - | out.push('.');
|
501 - | #[allow(clippy::needless_borrow)]
|
502 - | out.push_str(&partition_result.dns_suffix());
|
503 - | out
|
504 - | })
|
505 - | .property("backend", "S3Express".to_string())
|
506 - | .property(
|
507 - | "authSchemes",
|
508 - | vec![::aws_smithy_types::Document::from({
|
509 - | let mut out =
|
510 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
511 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
512 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
513 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
514 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
515 - | out
|
516 - | })],
|
517 - | )
|
518 - | .build());
|
519 - | }
|
520 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
521 - | .url({
|
522 - | let mut out = String::new();
|
523 - | out.push_str("https://");
|
524 - | #[allow(clippy::needless_borrow)]
|
525 - | out.push_str(&bucket.as_ref() as &str);
|
526 - | out.push_str(".s3express-");
|
527 - | #[allow(clippy::needless_borrow)]
|
528 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
529 - | out.push('.');
|
530 - | #[allow(clippy::needless_borrow)]
|
531 - | out.push_str(®ion.as_ref() as &str);
|
532 - | out.push('.');
|
533 - | #[allow(clippy::needless_borrow)]
|
534 - | out.push_str(&partition_result.dns_suffix());
|
535 - | out
|
536 - | })
|
537 - | .property("backend", "S3Express".to_string())
|
538 - | .property(
|
539 - | "authSchemes",
|
540 - | vec![::aws_smithy_types::Document::from({
|
541 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
542 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
543 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
544 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
545 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
546 - | out
|
547 - | })],
|
548 - | )
|
549 - | .build());
|
550 - | }
|
551 - | }
|
552 - | }
|
553 - | #[allow(unused_variables)]
|
554 - | if let Some(s3express_availability_zone_id) =
|
555 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 20, true, _diagnostic_collector)
|
556 - | {
|
557 - | #[allow(unused_variables)]
|
558 - | if let Some(s3express_availability_zone_delim) =
|
559 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
|
560 - | {
|
561 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
562 - | if (*use_fips) == (true) {
|
563 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
564 - | .url({
|
565 - | let mut out = String::new();
|
566 - | out.push_str("https://");
|
567 - | #[allow(clippy::needless_borrow)]
|
568 - | out.push_str(&bucket.as_ref() as &str);
|
569 - | out.push_str(".s3express-fips-");
|
570 - | #[allow(clippy::needless_borrow)]
|
571 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
572 - | out.push('.');
|
573 - | #[allow(clippy::needless_borrow)]
|
574 - | out.push_str(®ion.as_ref() as &str);
|
575 - | out.push('.');
|
576 - | #[allow(clippy::needless_borrow)]
|
577 - | out.push_str(&partition_result.dns_suffix());
|
578 - | out
|
579 - | })
|
580 - | .property("backend", "S3Express".to_string())
|
581 - | .property(
|
582 - | "authSchemes",
|
583 - | vec![::aws_smithy_types::Document::from({
|
584 - | let mut out =
|
585 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
586 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
587 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
588 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
589 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
590 - | out
|
591 - | })],
|
592 - | )
|
593 - | .build());
|
594 - | }
|
595 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
596 - | .url({
|
597 - | let mut out = String::new();
|
598 - | out.push_str("https://");
|
599 - | #[allow(clippy::needless_borrow)]
|
600 - | out.push_str(&bucket.as_ref() as &str);
|
601 - | out.push_str(".s3express-");
|
602 - | #[allow(clippy::needless_borrow)]
|
603 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
604 - | out.push('.');
|
605 - | #[allow(clippy::needless_borrow)]
|
606 - | out.push_str(®ion.as_ref() as &str);
|
607 - | out.push('.');
|
608 - | #[allow(clippy::needless_borrow)]
|
609 - | out.push_str(&partition_result.dns_suffix());
|
610 - | out
|
611 - | })
|
612 - | .property("backend", "S3Express".to_string())
|
613 - | .property(
|
614 - | "authSchemes",
|
615 - | vec![::aws_smithy_types::Document::from({
|
616 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
617 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
618 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
619 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
620 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
621 - | out
|
622 - | })],
|
623 - | )
|
624 - | .build());
|
625 - | }
|
626 - | }
|
627 - | }
|
628 - | #[allow(unused_variables)]
|
629 - | if let Some(s3express_availability_zone_id) =
|
630 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 26, true, _diagnostic_collector)
|
631 - | {
|
632 - | #[allow(unused_variables)]
|
633 - | if let Some(s3express_availability_zone_delim) =
|
634 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 26, 28, true, _diagnostic_collector)
|
635 - | {
|
636 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
637 - | if (*use_fips) == (true) {
|
638 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
639 - | .url({
|
640 - | let mut out = String::new();
|
641 - | out.push_str("https://");
|
642 - | #[allow(clippy::needless_borrow)]
|
643 - | out.push_str(&bucket.as_ref() as &str);
|
644 - | out.push_str(".s3express-fips-");
|
645 - | #[allow(clippy::needless_borrow)]
|
646 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
647 - | out.push('.');
|
648 - | #[allow(clippy::needless_borrow)]
|
649 - | out.push_str(®ion.as_ref() as &str);
|
650 - | out.push('.');
|
651 - | #[allow(clippy::needless_borrow)]
|
652 - | out.push_str(&partition_result.dns_suffix());
|
653 - | out
|
654 - | })
|
655 - | .property("backend", "S3Express".to_string())
|
656 - | .property(
|
657 - | "authSchemes",
|
658 - | vec![::aws_smithy_types::Document::from({
|
659 - | let mut out =
|
660 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
661 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
662 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
663 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
664 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
665 - | out
|
666 - | })],
|
667 - | )
|
668 - | .build());
|
669 - | }
|
670 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
671 - | .url({
|
672 - | let mut out = String::new();
|
673 - | out.push_str("https://");
|
674 - | #[allow(clippy::needless_borrow)]
|
675 - | out.push_str(&bucket.as_ref() as &str);
|
676 - | out.push_str(".s3express-");
|
677 - | #[allow(clippy::needless_borrow)]
|
678 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
679 - | out.push('.');
|
680 - | #[allow(clippy::needless_borrow)]
|
681 - | out.push_str(®ion.as_ref() as &str);
|
682 - | out.push('.');
|
683 - | #[allow(clippy::needless_borrow)]
|
684 - | out.push_str(&partition_result.dns_suffix());
|
685 - | out
|
686 - | })
|
687 - | .property("backend", "S3Express".to_string())
|
688 - | .property(
|
689 - | "authSchemes",
|
690 - | vec![::aws_smithy_types::Document::from({
|
691 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
692 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
693 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
694 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
695 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
696 - | out
|
697 - | })],
|
698 - | )
|
699 - | .build());
|
700 - | }
|
701 - | }
|
702 - | }
|
703 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
704 - | "Unrecognized S3Express bucket name format.".to_string(),
|
705 - | ));
|
706 - | }
|
707 - | }
|
708 - | #[allow(unused_variables)]
|
709 - | if let Some(s3express_availability_zone_id) =
|
710 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 14, true, _diagnostic_collector)
|
711 - | {
|
712 - | #[allow(unused_variables)]
|
713 - | if let Some(s3express_availability_zone_delim) =
|
714 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 14, 16, true, _diagnostic_collector)
|
715 - | {
|
716 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
717 - | if (*use_fips) == (true) {
|
718 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
719 - | .url({
|
720 - | let mut out = String::new();
|
721 - | out.push_str("https://");
|
722 - | #[allow(clippy::needless_borrow)]
|
723 - | out.push_str(&bucket.as_ref() as &str);
|
724 - | out.push_str(".s3express-fips-");
|
725 - | #[allow(clippy::needless_borrow)]
|
726 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
727 - | out.push('.');
|
728 - | #[allow(clippy::needless_borrow)]
|
729 - | out.push_str(®ion.as_ref() as &str);
|
730 - | out.push('.');
|
731 - | #[allow(clippy::needless_borrow)]
|
732 - | out.push_str(&partition_result.dns_suffix());
|
733 - | out
|
734 - | })
|
735 - | .property("backend", "S3Express".to_string())
|
736 - | .property(
|
737 - | "authSchemes",
|
738 - | vec![::aws_smithy_types::Document::from({
|
739 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
740 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
741 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
742 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
743 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
744 - | out
|
745 - | })],
|
746 - | )
|
747 - | .build());
|
748 - | }
|
749 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
750 - | .url({
|
751 - | let mut out = String::new();
|
752 - | out.push_str("https://");
|
753 - | #[allow(clippy::needless_borrow)]
|
754 - | out.push_str(&bucket.as_ref() as &str);
|
755 - | out.push_str(".s3express-");
|
756 - | #[allow(clippy::needless_borrow)]
|
757 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
758 - | out.push('.');
|
759 - | #[allow(clippy::needless_borrow)]
|
760 - | out.push_str(®ion.as_ref() as &str);
|
761 - | out.push('.');
|
762 - | #[allow(clippy::needless_borrow)]
|
763 - | out.push_str(&partition_result.dns_suffix());
|
764 - | out
|
765 - | })
|
766 - | .property("backend", "S3Express".to_string())
|
767 - | .property(
|
768 - | "authSchemes",
|
769 - | vec![::aws_smithy_types::Document::from({
|
770 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
771 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
772 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
773 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
774 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
775 - | out
|
776 - | })],
|
777 - | )
|
778 - | .build());
|
779 - | }
|
780 - | }
|
781 - | }
|
782 - | #[allow(unused_variables)]
|
783 - | if let Some(s3express_availability_zone_id) =
|
784 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 15, true, _diagnostic_collector)
|
785 - | {
|
786 - | #[allow(unused_variables)]
|
787 - | if let Some(s3express_availability_zone_delim) =
|
788 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
|
789 - | {
|
790 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
791 - | if (*use_fips) == (true) {
|
792 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
793 - | .url({
|
794 - | let mut out = String::new();
|
795 - | out.push_str("https://");
|
796 - | #[allow(clippy::needless_borrow)]
|
797 - | out.push_str(&bucket.as_ref() as &str);
|
798 - | out.push_str(".s3express-fips-");
|
799 - | #[allow(clippy::needless_borrow)]
|
800 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
801 - | out.push('.');
|
802 - | #[allow(clippy::needless_borrow)]
|
803 - | out.push_str(®ion.as_ref() as &str);
|
804 - | out.push('.');
|
805 - | #[allow(clippy::needless_borrow)]
|
806 - | out.push_str(&partition_result.dns_suffix());
|
807 - | out
|
808 - | })
|
809 - | .property("backend", "S3Express".to_string())
|
810 - | .property(
|
811 - | "authSchemes",
|
812 - | vec![::aws_smithy_types::Document::from({
|
813 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
814 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
815 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
816 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
817 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
818 - | out
|
819 - | })],
|
820 - | )
|
821 - | .build());
|
822 - | }
|
823 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
824 - | .url({
|
825 - | let mut out = String::new();
|
826 - | out.push_str("https://");
|
827 - | #[allow(clippy::needless_borrow)]
|
828 - | out.push_str(&bucket.as_ref() as &str);
|
829 - | out.push_str(".s3express-");
|
830 - | #[allow(clippy::needless_borrow)]
|
831 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
832 - | out.push('.');
|
833 - | #[allow(clippy::needless_borrow)]
|
834 - | out.push_str(®ion.as_ref() as &str);
|
835 - | out.push('.');
|
836 - | #[allow(clippy::needless_borrow)]
|
837 - | out.push_str(&partition_result.dns_suffix());
|
838 - | out
|
839 - | })
|
840 - | .property("backend", "S3Express".to_string())
|
841 - | .property(
|
842 - | "authSchemes",
|
843 - | vec![::aws_smithy_types::Document::from({
|
844 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
845 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
846 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
847 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
848 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
849 - | out
|
850 - | })],
|
851 - | )
|
852 - | .build());
|
853 - | }
|
854 - | }
|
855 - | }
|
856 - | #[allow(unused_variables)]
|
857 - | if let Some(s3express_availability_zone_id) =
|
858 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 19, true, _diagnostic_collector)
|
859 - | {
|
860 - | #[allow(unused_variables)]
|
861 - | if let Some(s3express_availability_zone_delim) =
|
862 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 19, 21, true, _diagnostic_collector)
|
863 - | {
|
864 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
865 - | if (*use_fips) == (true) {
|
866 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
867 - | .url({
|
868 - | let mut out = String::new();
|
869 - | out.push_str("https://");
|
870 - | #[allow(clippy::needless_borrow)]
|
871 - | out.push_str(&bucket.as_ref() as &str);
|
872 - | out.push_str(".s3express-fips-");
|
873 - | #[allow(clippy::needless_borrow)]
|
874 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
875 - | out.push('.');
|
876 - | #[allow(clippy::needless_borrow)]
|
877 - | out.push_str(®ion.as_ref() as &str);
|
878 - | out.push('.');
|
879 - | #[allow(clippy::needless_borrow)]
|
880 - | out.push_str(&partition_result.dns_suffix());
|
881 - | out
|
882 - | })
|
883 - | .property("backend", "S3Express".to_string())
|
884 - | .property(
|
885 - | "authSchemes",
|
886 - | vec![::aws_smithy_types::Document::from({
|
887 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
888 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
889 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
890 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
891 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
892 - | out
|
893 - | })],
|
894 - | )
|
895 - | .build());
|
896 - | }
|
897 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
898 - | .url({
|
899 - | let mut out = String::new();
|
900 - | out.push_str("https://");
|
901 - | #[allow(clippy::needless_borrow)]
|
902 - | out.push_str(&bucket.as_ref() as &str);
|
903 - | out.push_str(".s3express-");
|
904 - | #[allow(clippy::needless_borrow)]
|
905 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
906 - | out.push('.');
|
907 - | #[allow(clippy::needless_borrow)]
|
908 - | out.push_str(®ion.as_ref() as &str);
|
909 - | out.push('.');
|
910 - | #[allow(clippy::needless_borrow)]
|
911 - | out.push_str(&partition_result.dns_suffix());
|
912 - | out
|
913 - | })
|
914 - | .property("backend", "S3Express".to_string())
|
915 - | .property(
|
916 - | "authSchemes",
|
917 - | vec![::aws_smithy_types::Document::from({
|
918 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
919 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
920 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
921 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
922 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
923 - | out
|
924 - | })],
|
925 - | )
|
926 - | .build());
|
927 - | }
|
928 - | }
|
929 - | }
|
930 - | #[allow(unused_variables)]
|
931 - | if let Some(s3express_availability_zone_id) =
|
932 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 20, true, _diagnostic_collector)
|
933 - | {
|
934 - | #[allow(unused_variables)]
|
935 - | if let Some(s3express_availability_zone_delim) =
|
936 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
|
937 - | {
|
938 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
939 - | if (*use_fips) == (true) {
|
940 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
941 - | .url({
|
942 - | let mut out = String::new();
|
943 - | out.push_str("https://");
|
944 - | #[allow(clippy::needless_borrow)]
|
945 - | out.push_str(&bucket.as_ref() as &str);
|
946 - | out.push_str(".s3express-fips-");
|
947 - | #[allow(clippy::needless_borrow)]
|
948 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
949 - | out.push('.');
|
950 - | #[allow(clippy::needless_borrow)]
|
951 - | out.push_str(®ion.as_ref() as &str);
|
952 - | out.push('.');
|
953 - | #[allow(clippy::needless_borrow)]
|
954 - | out.push_str(&partition_result.dns_suffix());
|
955 - | out
|
956 - | })
|
957 - | .property("backend", "S3Express".to_string())
|
958 - | .property(
|
959 - | "authSchemes",
|
960 - | vec![::aws_smithy_types::Document::from({
|
961 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
962 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
963 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
964 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
965 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
966 - | out
|
967 - | })],
|
968 - | )
|
969 - | .build());
|
970 - | }
|
971 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
972 - | .url({
|
973 - | let mut out = String::new();
|
974 - | out.push_str("https://");
|
975 - | #[allow(clippy::needless_borrow)]
|
976 - | out.push_str(&bucket.as_ref() as &str);
|
977 - | out.push_str(".s3express-");
|
978 - | #[allow(clippy::needless_borrow)]
|
979 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
980 - | out.push('.');
|
981 - | #[allow(clippy::needless_borrow)]
|
982 - | out.push_str(®ion.as_ref() as &str);
|
983 - | out.push('.');
|
984 - | #[allow(clippy::needless_borrow)]
|
985 - | out.push_str(&partition_result.dns_suffix());
|
986 - | out
|
987 - | })
|
988 - | .property("backend", "S3Express".to_string())
|
989 - | .property(
|
990 - | "authSchemes",
|
991 - | vec![::aws_smithy_types::Document::from({
|
992 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
993 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
994 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
995 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
996 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
997 - | out
|
998 - | })],
|
999 - | )
|
1000 - | .build());
|
1001 - | }
|
1002 - | }
|
1003 - | }
|
1004 - | #[allow(unused_variables)]
|
1005 - | if let Some(s3express_availability_zone_id) =
|
1006 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 26, true, _diagnostic_collector)
|
1007 - | {
|
1008 - | #[allow(unused_variables)]
|
1009 - | if let Some(s3express_availability_zone_delim) =
|
1010 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 26, 28, true, _diagnostic_collector)
|
1011 - | {
|
1012 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1013 - | if (*use_fips) == (true) {
|
1014 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1015 - | .url({
|
1016 - | let mut out = String::new();
|
1017 - | out.push_str("https://");
|
1018 - | #[allow(clippy::needless_borrow)]
|
1019 - | out.push_str(&bucket.as_ref() as &str);
|
1020 - | out.push_str(".s3express-fips-");
|
1021 - | #[allow(clippy::needless_borrow)]
|
1022 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1023 - | out.push('.');
|
1024 - | #[allow(clippy::needless_borrow)]
|
1025 - | out.push_str(®ion.as_ref() as &str);
|
1026 - | out.push('.');
|
1027 - | #[allow(clippy::needless_borrow)]
|
1028 - | out.push_str(&partition_result.dns_suffix());
|
1029 - | out
|
1030 - | })
|
1031 - | .property("backend", "S3Express".to_string())
|
1032 - | .property(
|
1033 - | "authSchemes",
|
1034 - | vec![::aws_smithy_types::Document::from({
|
1035 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1036 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1037 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1038 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1039 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1040 - | out
|
1041 - | })],
|
1042 - | )
|
1043 - | .build());
|
1044 - | }
|
1045 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1046 - | .url({
|
1047 - | let mut out = String::new();
|
1048 - | out.push_str("https://");
|
1049 - | #[allow(clippy::needless_borrow)]
|
1050 - | out.push_str(&bucket.as_ref() as &str);
|
1051 - | out.push_str(".s3express-");
|
1052 - | #[allow(clippy::needless_borrow)]
|
1053 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1054 - | out.push('.');
|
1055 - | #[allow(clippy::needless_borrow)]
|
1056 - | out.push_str(®ion.as_ref() as &str);
|
1057 - | out.push('.');
|
1058 - | #[allow(clippy::needless_borrow)]
|
1059 - | out.push_str(&partition_result.dns_suffix());
|
1060 - | out
|
1061 - | })
|
1062 - | .property("backend", "S3Express".to_string())
|
1063 - | .property(
|
1064 - | "authSchemes",
|
1065 - | vec![::aws_smithy_types::Document::from({
|
1066 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1067 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1068 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1069 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1070 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1071 - | out
|
1072 - | })],
|
1073 - | )
|
1074 - | .build());
|
1075 - | }
|
1076 - | }
|
1077 - | }
|
1078 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1079 - | "Unrecognized S3Express bucket name format.".to_string(),
|
1080 - | ));
|
1081 - | }
|
1082 - | #[allow(unreachable_code)]
|
1083 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
1084 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
1085 - | )));
|
1086 - | }
|
1087 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1088 - | "S3Express bucket name is not a valid virtual hostable name.".to_string(),
|
1089 - | ));
|
1090 - | }
|
1091 - | }
|
1092 - | }
|
1093 - | #[allow(unused_variables)]
|
1094 - | if let Some(bucket) = bucket {
|
1095 - | #[allow(unused_variables)]
|
1096 - | if let Some(access_point_suffix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 7, true, _diagnostic_collector) {
|
1097 - | if (access_point_suffix.as_ref() as &str) == ("--xa-s3") {
|
1098 - | if (*use_dual_stack) == (true) {
|
1099 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1100 - | "S3Express does not support Dual-stack.".to_string(),
|
1101 - | ));
|
1102 - | }
|
1103 - | if (*accelerate) == (true) {
|
1104 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1105 - | "S3Express does not support S3 Accelerate.".to_string(),
|
1106 - | ));
|
1107 - | }
|
1108 - | #[allow(unused_variables)]
|
1109 - | if let Some(endpoint) = endpoint {
|
1110 - | #[allow(unused_variables)]
|
1111 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
1112 - | #[allow(unused_variables)]
|
1113 - | if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
|
1114 - | if (*disable_s3_express_session_auth) == (true) {
|
1115 - | if (url.is_ip()) == (true) {
|
1116 - | let uri_encoded_bucket =
|
1117 - | crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
|
1118 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1119 - | .url({
|
1120 - | let mut out = String::new();
|
1121 - | #[allow(clippy::needless_borrow)]
|
1122 - | out.push_str(&url.scheme());
|
1123 - | out.push_str("://");
|
1124 - | #[allow(clippy::needless_borrow)]
|
1125 - | out.push_str(&url.authority());
|
1126 - | out.push('/');
|
1127 - | #[allow(clippy::needless_borrow)]
|
1128 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
1129 - | #[allow(clippy::needless_borrow)]
|
1130 - | out.push_str(&url.path());
|
1131 - | out
|
1132 - | })
|
1133 - | .property("backend", "S3Express".to_string())
|
1134 - | .property(
|
1135 - | "authSchemes",
|
1136 - | vec![::aws_smithy_types::Document::from({
|
1137 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1138 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1139 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1140 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1141 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1142 - | out
|
1143 - | })],
|
1144 - | )
|
1145 - | .build());
|
1146 - | }
|
1147 - | if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
|
1148 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1149 - | .url({
|
1150 - | let mut out = String::new();
|
1151 - | #[allow(clippy::needless_borrow)]
|
1152 - | out.push_str(&url.scheme());
|
1153 - | out.push_str("://");
|
1154 - | #[allow(clippy::needless_borrow)]
|
1155 - | out.push_str(&bucket.as_ref() as &str);
|
1156 - | out.push('.');
|
1157 - | #[allow(clippy::needless_borrow)]
|
1158 - | out.push_str(&url.authority());
|
1159 - | #[allow(clippy::needless_borrow)]
|
1160 - | out.push_str(&url.path());
|
1161 - | out
|
1162 - | })
|
1163 - | .property("backend", "S3Express".to_string())
|
1164 - | .property(
|
1165 - | "authSchemes",
|
1166 - | vec![::aws_smithy_types::Document::from({
|
1167 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1168 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1169 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1170 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1171 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1172 - | out
|
1173 - | })],
|
1174 - | )
|
1175 - | .build());
|
1176 - | }
|
1177 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1178 - | "S3Express bucket name is not a valid virtual hostable name.".to_string(),
|
1179 - | ));
|
1180 - | }
|
1181 - | }
|
1182 - | if (url.is_ip()) == (true) {
|
1183 - | let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
|
1184 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1185 - | .url({
|
1186 - | let mut out = String::new();
|
1187 - | #[allow(clippy::needless_borrow)]
|
1188 - | out.push_str(&url.scheme());
|
1189 - | out.push_str("://");
|
1190 - | #[allow(clippy::needless_borrow)]
|
1191 - | out.push_str(&url.authority());
|
1192 - | out.push('/');
|
1193 - | #[allow(clippy::needless_borrow)]
|
1194 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
1195 - | #[allow(clippy::needless_borrow)]
|
1196 - | out.push_str(&url.path());
|
1197 - | out
|
1198 - | })
|
1199 - | .property("backend", "S3Express".to_string())
|
1200 - | .property(
|
1201 - | "authSchemes",
|
1202 - | vec![::aws_smithy_types::Document::from({
|
1203 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1204 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1205 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1206 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1207 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1208 - | out
|
1209 - | })],
|
1210 - | )
|
1211 - | .build());
|
1212 - | }
|
1213 - | if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
|
1214 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1215 - | .url({
|
1216 - | let mut out = String::new();
|
1217 - | #[allow(clippy::needless_borrow)]
|
1218 - | out.push_str(&url.scheme());
|
1219 - | out.push_str("://");
|
1220 - | #[allow(clippy::needless_borrow)]
|
1221 - | out.push_str(&bucket.as_ref() as &str);
|
1222 - | out.push('.');
|
1223 - | #[allow(clippy::needless_borrow)]
|
1224 - | out.push_str(&url.authority());
|
1225 - | #[allow(clippy::needless_borrow)]
|
1226 - | out.push_str(&url.path());
|
1227 - | out
|
1228 - | })
|
1229 - | .property("backend", "S3Express".to_string())
|
1230 - | .property(
|
1231 - | "authSchemes",
|
1232 - | vec![::aws_smithy_types::Document::from({
|
1233 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1234 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1235 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1236 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1237 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1238 - | out
|
1239 - | })],
|
1240 - | )
|
1241 - | .build());
|
1242 - | }
|
1243 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1244 - | "S3Express bucket name is not a valid virtual hostable name.".to_string(),
|
1245 - | ));
|
1246 - | }
|
1247 - | }
|
1248 - | if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
|
1249 - | #[allow(unused_variables)]
|
1250 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
1251 - | #[allow(unused_variables)]
|
1252 - | if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
|
1253 - | if (*disable_s3_express_session_auth) == (true) {
|
1254 - | #[allow(unused_variables)]
|
1255 - | if let Some(s3express_availability_zone_id) =
|
1256 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 15, true, _diagnostic_collector)
|
1257 - | {
|
1258 - | #[allow(unused_variables)]
|
1259 - | if let Some(s3express_availability_zone_delim) =
|
1260 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
|
1261 - | {
|
1262 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1263 - | if (*use_fips) == (true) {
|
1264 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1265 - | .url({
|
1266 - | let mut out = String::new();
|
1267 - | out.push_str("https://");
|
1268 - | #[allow(clippy::needless_borrow)]
|
1269 - | out.push_str(&bucket.as_ref() as &str);
|
1270 - | out.push_str(".s3express-fips-");
|
1271 - | #[allow(clippy::needless_borrow)]
|
1272 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1273 - | out.push('.');
|
1274 - | #[allow(clippy::needless_borrow)]
|
1275 - | out.push_str(®ion.as_ref() as &str);
|
1276 - | out.push('.');
|
1277 - | #[allow(clippy::needless_borrow)]
|
1278 - | out.push_str(&partition_result.dns_suffix());
|
1279 - | out
|
1280 - | })
|
1281 - | .property("backend", "S3Express".to_string())
|
1282 - | .property(
|
1283 - | "authSchemes",
|
1284 - | vec![::aws_smithy_types::Document::from({
|
1285 - | let mut out =
|
1286 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1287 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1288 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1289 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1290 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1291 - | out
|
1292 - | })],
|
1293 - | )
|
1294 - | .build());
|
1295 - | }
|
1296 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1297 - | .url({
|
1298 - | let mut out = String::new();
|
1299 - | out.push_str("https://");
|
1300 - | #[allow(clippy::needless_borrow)]
|
1301 - | out.push_str(&bucket.as_ref() as &str);
|
1302 - | out.push_str(".s3express-");
|
1303 - | #[allow(clippy::needless_borrow)]
|
1304 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1305 - | out.push('.');
|
1306 - | #[allow(clippy::needless_borrow)]
|
1307 - | out.push_str(®ion.as_ref() as &str);
|
1308 - | out.push('.');
|
1309 - | #[allow(clippy::needless_borrow)]
|
1310 - | out.push_str(&partition_result.dns_suffix());
|
1311 - | out
|
1312 - | })
|
1313 - | .property("backend", "S3Express".to_string())
|
1314 - | .property(
|
1315 - | "authSchemes",
|
1316 - | vec![::aws_smithy_types::Document::from({
|
1317 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1318 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1319 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1320 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1321 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1322 - | out
|
1323 - | })],
|
1324 - | )
|
1325 - | .build());
|
1326 - | }
|
1327 - | }
|
1328 - | }
|
1329 - | #[allow(unused_variables)]
|
1330 - | if let Some(s3express_availability_zone_id) =
|
1331 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 16, true, _diagnostic_collector)
|
1332 - | {
|
1333 - | #[allow(unused_variables)]
|
1334 - | if let Some(s3express_availability_zone_delim) =
|
1335 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 16, 18, true, _diagnostic_collector)
|
1336 - | {
|
1337 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1338 - | if (*use_fips) == (true) {
|
1339 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1340 - | .url({
|
1341 - | let mut out = String::new();
|
1342 - | out.push_str("https://");
|
1343 - | #[allow(clippy::needless_borrow)]
|
1344 - | out.push_str(&bucket.as_ref() as &str);
|
1345 - | out.push_str(".s3express-fips-");
|
1346 - | #[allow(clippy::needless_borrow)]
|
1347 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1348 - | out.push('.');
|
1349 - | #[allow(clippy::needless_borrow)]
|
1350 - | out.push_str(®ion.as_ref() as &str);
|
1351 - | out.push('.');
|
1352 - | #[allow(clippy::needless_borrow)]
|
1353 - | out.push_str(&partition_result.dns_suffix());
|
1354 - | out
|
1355 - | })
|
1356 - | .property("backend", "S3Express".to_string())
|
1357 - | .property(
|
1358 - | "authSchemes",
|
1359 - | vec![::aws_smithy_types::Document::from({
|
1360 - | let mut out =
|
1361 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1362 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1363 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1364 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1365 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1366 - | out
|
1367 - | })],
|
1368 - | )
|
1369 - | .build());
|
1370 - | }
|
1371 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1372 - | .url({
|
1373 - | let mut out = String::new();
|
1374 - | out.push_str("https://");
|
1375 - | #[allow(clippy::needless_borrow)]
|
1376 - | out.push_str(&bucket.as_ref() as &str);
|
1377 - | out.push_str(".s3express-");
|
1378 - | #[allow(clippy::needless_borrow)]
|
1379 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1380 - | out.push('.');
|
1381 - | #[allow(clippy::needless_borrow)]
|
1382 - | out.push_str(®ion.as_ref() as &str);
|
1383 - | out.push('.');
|
1384 - | #[allow(clippy::needless_borrow)]
|
1385 - | out.push_str(&partition_result.dns_suffix());
|
1386 - | out
|
1387 - | })
|
1388 - | .property("backend", "S3Express".to_string())
|
1389 - | .property(
|
1390 - | "authSchemes",
|
1391 - | vec![::aws_smithy_types::Document::from({
|
1392 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1393 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1394 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1395 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1396 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1397 - | out
|
1398 - | })],
|
1399 - | )
|
1400 - | .build());
|
1401 - | }
|
1402 - | }
|
1403 - | }
|
1404 - | #[allow(unused_variables)]
|
1405 - | if let Some(s3express_availability_zone_id) =
|
1406 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 20, true, _diagnostic_collector)
|
1407 - | {
|
1408 - | #[allow(unused_variables)]
|
1409 - | if let Some(s3express_availability_zone_delim) =
|
1410 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
|
1411 - | {
|
1412 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1413 - | if (*use_fips) == (true) {
|
1414 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1415 - | .url({
|
1416 - | let mut out = String::new();
|
1417 - | out.push_str("https://");
|
1418 - | #[allow(clippy::needless_borrow)]
|
1419 - | out.push_str(&bucket.as_ref() as &str);
|
1420 - | out.push_str(".s3express-fips-");
|
1421 - | #[allow(clippy::needless_borrow)]
|
1422 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1423 - | out.push('.');
|
1424 - | #[allow(clippy::needless_borrow)]
|
1425 - | out.push_str(®ion.as_ref() as &str);
|
1426 - | out.push('.');
|
1427 - | #[allow(clippy::needless_borrow)]
|
1428 - | out.push_str(&partition_result.dns_suffix());
|
1429 - | out
|
1430 - | })
|
1431 - | .property("backend", "S3Express".to_string())
|
1432 - | .property(
|
1433 - | "authSchemes",
|
1434 - | vec![::aws_smithy_types::Document::from({
|
1435 - | let mut out =
|
1436 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1437 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1438 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1439 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1440 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1441 - | out
|
1442 - | })],
|
1443 - | )
|
1444 - | .build());
|
1445 - | }
|
1446 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1447 - | .url({
|
1448 - | let mut out = String::new();
|
1449 - | out.push_str("https://");
|
1450 - | #[allow(clippy::needless_borrow)]
|
1451 - | out.push_str(&bucket.as_ref() as &str);
|
1452 - | out.push_str(".s3express-");
|
1453 - | #[allow(clippy::needless_borrow)]
|
1454 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1455 - | out.push('.');
|
1456 - | #[allow(clippy::needless_borrow)]
|
1457 - | out.push_str(®ion.as_ref() as &str);
|
1458 - | out.push('.');
|
1459 - | #[allow(clippy::needless_borrow)]
|
1460 - | out.push_str(&partition_result.dns_suffix());
|
1461 - | out
|
1462 - | })
|
1463 - | .property("backend", "S3Express".to_string())
|
1464 - | .property(
|
1465 - | "authSchemes",
|
1466 - | vec![::aws_smithy_types::Document::from({
|
1467 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1468 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1469 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1470 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1471 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1472 - | out
|
1473 - | })],
|
1474 - | )
|
1475 - | .build());
|
1476 - | }
|
1477 - | }
|
1478 - | }
|
1479 - | #[allow(unused_variables)]
|
1480 - | if let Some(s3express_availability_zone_id) =
|
1481 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 21, true, _diagnostic_collector)
|
1482 - | {
|
1483 - | #[allow(unused_variables)]
|
1484 - | if let Some(s3express_availability_zone_delim) =
|
1485 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 21, 23, true, _diagnostic_collector)
|
1486 - | {
|
1487 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1488 - | if (*use_fips) == (true) {
|
1489 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1490 - | .url({
|
1491 - | let mut out = String::new();
|
1492 - | out.push_str("https://");
|
1493 - | #[allow(clippy::needless_borrow)]
|
1494 - | out.push_str(&bucket.as_ref() as &str);
|
1495 - | out.push_str(".s3express-fips-");
|
1496 - | #[allow(clippy::needless_borrow)]
|
1497 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1498 - | out.push('.');
|
1499 - | #[allow(clippy::needless_borrow)]
|
1500 - | out.push_str(®ion.as_ref() as &str);
|
1501 - | out.push('.');
|
1502 - | #[allow(clippy::needless_borrow)]
|
1503 - | out.push_str(&partition_result.dns_suffix());
|
1504 - | out
|
1505 - | })
|
1506 - | .property("backend", "S3Express".to_string())
|
1507 - | .property(
|
1508 - | "authSchemes",
|
1509 - | vec![::aws_smithy_types::Document::from({
|
1510 - | let mut out =
|
1511 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1512 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1513 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1514 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1515 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1516 - | out
|
1517 - | })],
|
1518 - | )
|
1519 - | .build());
|
1520 - | }
|
1521 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1522 - | .url({
|
1523 - | let mut out = String::new();
|
1524 - | out.push_str("https://");
|
1525 - | #[allow(clippy::needless_borrow)]
|
1526 - | out.push_str(&bucket.as_ref() as &str);
|
1527 - | out.push_str(".s3express-");
|
1528 - | #[allow(clippy::needless_borrow)]
|
1529 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1530 - | out.push('.');
|
1531 - | #[allow(clippy::needless_borrow)]
|
1532 - | out.push_str(®ion.as_ref() as &str);
|
1533 - | out.push('.');
|
1534 - | #[allow(clippy::needless_borrow)]
|
1535 - | out.push_str(&partition_result.dns_suffix());
|
1536 - | out
|
1537 - | })
|
1538 - | .property("backend", "S3Express".to_string())
|
1539 - | .property(
|
1540 - | "authSchemes",
|
1541 - | vec![::aws_smithy_types::Document::from({
|
1542 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1543 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1544 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1545 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1546 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1547 - | out
|
1548 - | })],
|
1549 - | )
|
1550 - | .build());
|
1551 - | }
|
1552 - | }
|
1553 - | }
|
1554 - | #[allow(unused_variables)]
|
1555 - | if let Some(s3express_availability_zone_id) =
|
1556 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 27, true, _diagnostic_collector)
|
1557 - | {
|
1558 - | #[allow(unused_variables)]
|
1559 - | if let Some(s3express_availability_zone_delim) =
|
1560 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 27, 29, true, _diagnostic_collector)
|
1561 - | {
|
1562 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1563 - | if (*use_fips) == (true) {
|
1564 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1565 - | .url({
|
1566 - | let mut out = String::new();
|
1567 - | out.push_str("https://");
|
1568 - | #[allow(clippy::needless_borrow)]
|
1569 - | out.push_str(&bucket.as_ref() as &str);
|
1570 - | out.push_str(".s3express-fips-");
|
1571 - | #[allow(clippy::needless_borrow)]
|
1572 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1573 - | out.push('.');
|
1574 - | #[allow(clippy::needless_borrow)]
|
1575 - | out.push_str(®ion.as_ref() as &str);
|
1576 - | out.push('.');
|
1577 - | #[allow(clippy::needless_borrow)]
|
1578 - | out.push_str(&partition_result.dns_suffix());
|
1579 - | out
|
1580 - | })
|
1581 - | .property("backend", "S3Express".to_string())
|
1582 - | .property(
|
1583 - | "authSchemes",
|
1584 - | vec![::aws_smithy_types::Document::from({
|
1585 - | let mut out =
|
1586 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1587 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1588 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1589 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1590 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1591 - | out
|
1592 - | })],
|
1593 - | )
|
1594 - | .build());
|
1595 - | }
|
1596 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1597 - | .url({
|
1598 - | let mut out = String::new();
|
1599 - | out.push_str("https://");
|
1600 - | #[allow(clippy::needless_borrow)]
|
1601 - | out.push_str(&bucket.as_ref() as &str);
|
1602 - | out.push_str(".s3express-");
|
1603 - | #[allow(clippy::needless_borrow)]
|
1604 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1605 - | out.push('.');
|
1606 - | #[allow(clippy::needless_borrow)]
|
1607 - | out.push_str(®ion.as_ref() as &str);
|
1608 - | out.push('.');
|
1609 - | #[allow(clippy::needless_borrow)]
|
1610 - | out.push_str(&partition_result.dns_suffix());
|
1611 - | out
|
1612 - | })
|
1613 - | .property("backend", "S3Express".to_string())
|
1614 - | .property(
|
1615 - | "authSchemes",
|
1616 - | vec![::aws_smithy_types::Document::from({
|
1617 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1618 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1619 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1620 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1621 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1622 - | out
|
1623 - | })],
|
1624 - | )
|
1625 - | .build());
|
1626 - | }
|
1627 - | }
|
1628 - | }
|
1629 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1630 - | "Unrecognized S3Express bucket name format.".to_string(),
|
1631 - | ));
|
1632 - | }
|
1633 - | }
|
1634 - | #[allow(unused_variables)]
|
1635 - | if let Some(s3express_availability_zone_id) =
|
1636 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 15, true, _diagnostic_collector)
|
1637 - | {
|
1638 - | #[allow(unused_variables)]
|
1639 - | if let Some(s3express_availability_zone_delim) =
|
1640 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
|
1641 - | {
|
1642 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1643 - | if (*use_fips) == (true) {
|
1644 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1645 - | .url({
|
1646 - | let mut out = String::new();
|
1647 - | out.push_str("https://");
|
1648 - | #[allow(clippy::needless_borrow)]
|
1649 - | out.push_str(&bucket.as_ref() as &str);
|
1650 - | out.push_str(".s3express-fips-");
|
1651 - | #[allow(clippy::needless_borrow)]
|
1652 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1653 - | out.push('.');
|
1654 - | #[allow(clippy::needless_borrow)]
|
1655 - | out.push_str(®ion.as_ref() as &str);
|
1656 - | out.push('.');
|
1657 - | #[allow(clippy::needless_borrow)]
|
1658 - | out.push_str(&partition_result.dns_suffix());
|
1659 - | out
|
1660 - | })
|
1661 - | .property("backend", "S3Express".to_string())
|
1662 - | .property(
|
1663 - | "authSchemes",
|
1664 - | vec![::aws_smithy_types::Document::from({
|
1665 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1666 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1667 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1668 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1669 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1670 - | out
|
1671 - | })],
|
1672 - | )
|
1673 - | .build());
|
1674 - | }
|
1675 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1676 - | .url({
|
1677 - | let mut out = String::new();
|
1678 - | out.push_str("https://");
|
1679 - | #[allow(clippy::needless_borrow)]
|
1680 - | out.push_str(&bucket.as_ref() as &str);
|
1681 - | out.push_str(".s3express-");
|
1682 - | #[allow(clippy::needless_borrow)]
|
1683 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1684 - | out.push('.');
|
1685 - | #[allow(clippy::needless_borrow)]
|
1686 - | out.push_str(®ion.as_ref() as &str);
|
1687 - | out.push('.');
|
1688 - | #[allow(clippy::needless_borrow)]
|
1689 - | out.push_str(&partition_result.dns_suffix());
|
1690 - | out
|
1691 - | })
|
1692 - | .property("backend", "S3Express".to_string())
|
1693 - | .property(
|
1694 - | "authSchemes",
|
1695 - | vec![::aws_smithy_types::Document::from({
|
1696 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1697 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1698 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1699 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1700 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1701 - | out
|
1702 - | })],
|
1703 - | )
|
1704 - | .build());
|
1705 - | }
|
1706 - | }
|
1707 - | }
|
1708 - | #[allow(unused_variables)]
|
1709 - | if let Some(s3express_availability_zone_id) =
|
1710 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 16, true, _diagnostic_collector)
|
1711 - | {
|
1712 - | #[allow(unused_variables)]
|
1713 - | if let Some(s3express_availability_zone_delim) =
|
1714 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 16, 18, true, _diagnostic_collector)
|
1715 - | {
|
1716 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1717 - | if (*use_fips) == (true) {
|
1718 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1719 - | .url({
|
1720 - | let mut out = String::new();
|
1721 - | out.push_str("https://");
|
1722 - | #[allow(clippy::needless_borrow)]
|
1723 - | out.push_str(&bucket.as_ref() as &str);
|
1724 - | out.push_str(".s3express-fips-");
|
1725 - | #[allow(clippy::needless_borrow)]
|
1726 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1727 - | out.push('.');
|
1728 - | #[allow(clippy::needless_borrow)]
|
1729 - | out.push_str(®ion.as_ref() as &str);
|
1730 - | out.push('.');
|
1731 - | #[allow(clippy::needless_borrow)]
|
1732 - | out.push_str(&partition_result.dns_suffix());
|
1733 - | out
|
1734 - | })
|
1735 - | .property("backend", "S3Express".to_string())
|
1736 - | .property(
|
1737 - | "authSchemes",
|
1738 - | vec![::aws_smithy_types::Document::from({
|
1739 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1740 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1741 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1742 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1743 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1744 - | out
|
1745 - | })],
|
1746 - | )
|
1747 - | .build());
|
1748 - | }
|
1749 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1750 - | .url({
|
1751 - | let mut out = String::new();
|
1752 - | out.push_str("https://");
|
1753 - | #[allow(clippy::needless_borrow)]
|
1754 - | out.push_str(&bucket.as_ref() as &str);
|
1755 - | out.push_str(".s3express-");
|
1756 - | #[allow(clippy::needless_borrow)]
|
1757 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1758 - | out.push('.');
|
1759 - | #[allow(clippy::needless_borrow)]
|
1760 - | out.push_str(®ion.as_ref() as &str);
|
1761 - | out.push('.');
|
1762 - | #[allow(clippy::needless_borrow)]
|
1763 - | out.push_str(&partition_result.dns_suffix());
|
1764 - | out
|
1765 - | })
|
1766 - | .property("backend", "S3Express".to_string())
|
1767 - | .property(
|
1768 - | "authSchemes",
|
1769 - | vec![::aws_smithy_types::Document::from({
|
1770 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1771 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1772 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1773 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1774 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1775 - | out
|
1776 - | })],
|
1777 - | )
|
1778 - | .build());
|
1779 - | }
|
1780 - | }
|
1781 - | }
|
1782 - | #[allow(unused_variables)]
|
1783 - | if let Some(s3express_availability_zone_id) =
|
1784 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 20, true, _diagnostic_collector)
|
1785 - | {
|
1786 - | #[allow(unused_variables)]
|
1787 - | if let Some(s3express_availability_zone_delim) =
|
1788 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
|
1789 - | {
|
1790 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1791 - | if (*use_fips) == (true) {
|
1792 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1793 - | .url({
|
1794 - | let mut out = String::new();
|
1795 - | out.push_str("https://");
|
1796 - | #[allow(clippy::needless_borrow)]
|
1797 - | out.push_str(&bucket.as_ref() as &str);
|
1798 - | out.push_str(".s3express-fips-");
|
1799 - | #[allow(clippy::needless_borrow)]
|
1800 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1801 - | out.push('.');
|
1802 - | #[allow(clippy::needless_borrow)]
|
1803 - | out.push_str(®ion.as_ref() as &str);
|
1804 - | out.push('.');
|
1805 - | #[allow(clippy::needless_borrow)]
|
1806 - | out.push_str(&partition_result.dns_suffix());
|
1807 - | out
|
1808 - | })
|
1809 - | .property("backend", "S3Express".to_string())
|
1810 - | .property(
|
1811 - | "authSchemes",
|
1812 - | vec![::aws_smithy_types::Document::from({
|
1813 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1814 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1815 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1816 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1817 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1818 - | out
|
1819 - | })],
|
1820 - | )
|
1821 - | .build());
|
1822 - | }
|
1823 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1824 - | .url({
|
1825 - | let mut out = String::new();
|
1826 - | out.push_str("https://");
|
1827 - | #[allow(clippy::needless_borrow)]
|
1828 - | out.push_str(&bucket.as_ref() as &str);
|
1829 - | out.push_str(".s3express-");
|
1830 - | #[allow(clippy::needless_borrow)]
|
1831 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1832 - | out.push('.');
|
1833 - | #[allow(clippy::needless_borrow)]
|
1834 - | out.push_str(®ion.as_ref() as &str);
|
1835 - | out.push('.');
|
1836 - | #[allow(clippy::needless_borrow)]
|
1837 - | out.push_str(&partition_result.dns_suffix());
|
1838 - | out
|
1839 - | })
|
1840 - | .property("backend", "S3Express".to_string())
|
1841 - | .property(
|
1842 - | "authSchemes",
|
1843 - | vec![::aws_smithy_types::Document::from({
|
1844 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1845 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1846 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1847 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1848 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1849 - | out
|
1850 - | })],
|
1851 - | )
|
1852 - | .build());
|
1853 - | }
|
1854 - | }
|
1855 - | }
|
1856 - | #[allow(unused_variables)]
|
1857 - | if let Some(s3express_availability_zone_id) =
|
1858 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 21, true, _diagnostic_collector)
|
1859 - | {
|
1860 - | #[allow(unused_variables)]
|
1861 - | if let Some(s3express_availability_zone_delim) =
|
1862 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 21, 23, true, _diagnostic_collector)
|
1863 - | {
|
1864 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1865 - | if (*use_fips) == (true) {
|
1866 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1867 - | .url({
|
1868 - | let mut out = String::new();
|
1869 - | out.push_str("https://");
|
1870 - | #[allow(clippy::needless_borrow)]
|
1871 - | out.push_str(&bucket.as_ref() as &str);
|
1872 - | out.push_str(".s3express-fips-");
|
1873 - | #[allow(clippy::needless_borrow)]
|
1874 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1875 - | out.push('.');
|
1876 - | #[allow(clippy::needless_borrow)]
|
1877 - | out.push_str(®ion.as_ref() as &str);
|
1878 - | out.push('.');
|
1879 - | #[allow(clippy::needless_borrow)]
|
1880 - | out.push_str(&partition_result.dns_suffix());
|
1881 - | out
|
1882 - | })
|
1883 - | .property("backend", "S3Express".to_string())
|
1884 - | .property(
|
1885 - | "authSchemes",
|
1886 - | vec![::aws_smithy_types::Document::from({
|
1887 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1888 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1889 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1890 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1891 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1892 - | out
|
1893 - | })],
|
1894 - | )
|
1895 - | .build());
|
1896 - | }
|
1897 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1898 - | .url({
|
1899 - | let mut out = String::new();
|
1900 - | out.push_str("https://");
|
1901 - | #[allow(clippy::needless_borrow)]
|
1902 - | out.push_str(&bucket.as_ref() as &str);
|
1903 - | out.push_str(".s3express-");
|
1904 - | #[allow(clippy::needless_borrow)]
|
1905 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1906 - | out.push('.');
|
1907 - | #[allow(clippy::needless_borrow)]
|
1908 - | out.push_str(®ion.as_ref() as &str);
|
1909 - | out.push('.');
|
1910 - | #[allow(clippy::needless_borrow)]
|
1911 - | out.push_str(&partition_result.dns_suffix());
|
1912 - | out
|
1913 - | })
|
1914 - | .property("backend", "S3Express".to_string())
|
1915 - | .property(
|
1916 - | "authSchemes",
|
1917 - | vec![::aws_smithy_types::Document::from({
|
1918 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1919 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1920 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1921 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1922 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1923 - | out
|
1924 - | })],
|
1925 - | )
|
1926 - | .build());
|
1927 - | }
|
1928 - | }
|
1929 - | }
|
1930 - | #[allow(unused_variables)]
|
1931 - | if let Some(s3express_availability_zone_id) =
|
1932 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 27, true, _diagnostic_collector)
|
1933 - | {
|
1934 - | #[allow(unused_variables)]
|
1935 - | if let Some(s3express_availability_zone_delim) =
|
1936 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 27, 29, true, _diagnostic_collector)
|
1937 - | {
|
1938 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
1939 - | if (*use_fips) == (true) {
|
1940 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1941 - | .url({
|
1942 - | let mut out = String::new();
|
1943 - | out.push_str("https://");
|
1944 - | #[allow(clippy::needless_borrow)]
|
1945 - | out.push_str(&bucket.as_ref() as &str);
|
1946 - | out.push_str(".s3express-fips-");
|
1947 - | #[allow(clippy::needless_borrow)]
|
1948 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1949 - | out.push('.');
|
1950 - | #[allow(clippy::needless_borrow)]
|
1951 - | out.push_str(®ion.as_ref() as &str);
|
1952 - | out.push('.');
|
1953 - | #[allow(clippy::needless_borrow)]
|
1954 - | out.push_str(&partition_result.dns_suffix());
|
1955 - | out
|
1956 - | })
|
1957 - | .property("backend", "S3Express".to_string())
|
1958 - | .property(
|
1959 - | "authSchemes",
|
1960 - | vec![::aws_smithy_types::Document::from({
|
1961 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1962 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1963 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1964 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1965 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1966 - | out
|
1967 - | })],
|
1968 - | )
|
1969 - | .build());
|
1970 - | }
|
1971 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1972 - | .url({
|
1973 - | let mut out = String::new();
|
1974 - | out.push_str("https://");
|
1975 - | #[allow(clippy::needless_borrow)]
|
1976 - | out.push_str(&bucket.as_ref() as &str);
|
1977 - | out.push_str(".s3express-");
|
1978 - | #[allow(clippy::needless_borrow)]
|
1979 - | out.push_str(&s3express_availability_zone_id.as_ref() as &str);
|
1980 - | out.push('.');
|
1981 - | #[allow(clippy::needless_borrow)]
|
1982 - | out.push_str(®ion.as_ref() as &str);
|
1983 - | out.push('.');
|
1984 - | #[allow(clippy::needless_borrow)]
|
1985 - | out.push_str(&partition_result.dns_suffix());
|
1986 - | out
|
1987 - | })
|
1988 - | .property("backend", "S3Express".to_string())
|
1989 - | .property(
|
1990 - | "authSchemes",
|
1991 - | vec![::aws_smithy_types::Document::from({
|
1992 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1993 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1994 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
1995 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
1996 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1997 - | out
|
1998 - | })],
|
1999 - | )
|
2000 - | .build());
|
2001 - | }
|
2002 - | }
|
2003 - | }
|
2004 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
2005 - | "Unrecognized S3Express bucket name format.".to_string(),
|
2006 - | ));
|
2007 - | }
|
2008 - | #[allow(unreachable_code)]
|
2009 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
2010 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
2011 - | )));
|
2012 - | }
|
2013 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
2014 - | "S3Express bucket name is not a valid virtual hostable name.".to_string(),
|
2015 - | ));
|
2016 - | }
|
2017 - | }
|
2018 - | }
|
2019 - | if !(bucket.is_some()) {
|
2020 - | #[allow(unused_variables)]
|
2021 - | if let Some(use_s3_express_control_endpoint) = use_s3_express_control_endpoint {
|
2022 - | if (*use_s3_express_control_endpoint) == (true) {
|
2023 - | #[allow(unused_variables)]
|
2024 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
2025 - | #[allow(unused_variables)]
|
2026 - | if let Some(endpoint) = endpoint {
|
2027 - | #[allow(unused_variables)]
|
2028 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
2029 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2030 - | .url({
|
2031 - | let mut out = String::new();
|
2032 - | #[allow(clippy::needless_borrow)]
|
2033 - | out.push_str(&url.scheme());
|
2034 - | out.push_str("://");
|
2035 - | #[allow(clippy::needless_borrow)]
|
2036 - | out.push_str(&url.authority());
|
2037 - | #[allow(clippy::needless_borrow)]
|
2038 - | out.push_str(&url.path());
|
2039 - | out
|
2040 - | })
|
2041 - | .property("backend", "S3Express".to_string())
|
2042 - | .property(
|
2043 - | "authSchemes",
|
2044 - | vec![::aws_smithy_types::Document::from({
|
2045 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2046 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2047 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2048 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
2049 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2050 - | out
|
2051 - | })],
|
2052 - | )
|
2053 - | .build());
|
2054 - | }
|
2055 - | }
|
2056 - | if (*use_fips) == (true) {
|
2057 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2058 - | .url({
|
2059 - | let mut out = String::new();
|
2060 - | out.push_str("https://s3express-control-fips.");
|
2061 - | #[allow(clippy::needless_borrow)]
|
2062 - | out.push_str(®ion.as_ref() as &str);
|
2063 - | out.push('.');
|
2064 - | #[allow(clippy::needless_borrow)]
|
2065 - | out.push_str(&partition_result.dns_suffix());
|
2066 - | out
|
2067 - | })
|
2068 - | .property("backend", "S3Express".to_string())
|
2069 - | .property(
|
2070 - | "authSchemes",
|
2071 - | vec![::aws_smithy_types::Document::from({
|
2072 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2073 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2074 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2075 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
2076 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2077 - | out
|
2078 - | })],
|
2079 - | )
|
2080 - | .build());
|
2081 - | }
|
2082 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2083 - | .url({
|
2084 - | let mut out = String::new();
|
2085 - | out.push_str("https://s3express-control.");
|
2086 - | #[allow(clippy::needless_borrow)]
|
2087 - | out.push_str(®ion.as_ref() as &str);
|
2088 - | out.push('.');
|
2089 - | #[allow(clippy::needless_borrow)]
|
2090 - | out.push_str(&partition_result.dns_suffix());
|
2091 - | out
|
2092 - | })
|
2093 - | .property("backend", "S3Express".to_string())
|
2094 - | .property(
|
2095 - | "authSchemes",
|
2096 - | vec![::aws_smithy_types::Document::from({
|
2097 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2098 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2099 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2100 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
2101 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2102 - | out
|
2103 - | })],
|
2104 - | )
|
2105 - | .build());
|
2106 - | }
|
2107 - | #[allow(unreachable_code)]
|
2108 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
2109 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
2110 - | )));
|
2111 - | }
|
2112 - | }
|
2113 - | }
|
2114 - | #[allow(unused_variables)]
|
2115 - | if let Some(bucket) = bucket {
|
2116 - | #[allow(unused_variables)]
|
2117 - | if let Some(hardware_type) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 49, 50, true, _diagnostic_collector) {
|
2118 - | #[allow(unused_variables)]
|
2119 - | if let Some(region_prefix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 8, 12, true, _diagnostic_collector) {
|
2120 - | #[allow(unused_variables)]
|
2121 - | if let Some(bucket_alias_suffix) =
|
2122 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 7, true, _diagnostic_collector)
|
2123 - | {
|
2124 - | #[allow(unused_variables)]
|
2125 - | if let Some(outpost_id) =
|
2126 - | crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 32, 49, true, _diagnostic_collector)
|
2127 - | {
|
2128 - | #[allow(unused_variables)]
|
2129 - | if let Some(region_partition) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
2130 - | if (bucket_alias_suffix.as_ref() as &str) == ("--op-s3") {
|
2131 - | if crate::endpoint_lib::host::is_valid_host_label(outpost_id.as_ref() as &str, false, _diagnostic_collector) {
|
2132 - | if (hardware_type.as_ref() as &str) == ("e") {
|
2133 - | if (region_prefix.as_ref() as &str) == ("beta") {
|
2134 - | if !(endpoint.is_some()) {
|
2135 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
2136 - | "Expected a endpoint to be specified but no endpoint was found".to_string(),
|
2137 - | ));
|
2138 - | }
|
2139 - | #[allow(unused_variables)]
|
2140 - | if let Some(endpoint) = endpoint {
|
2141 - | #[allow(unused_variables)]
|
2142 - | if let Some(url) =
|
2143 - | crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
|
2144 - | {
|
2145 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2146 - | .url({
|
2147 - | let mut out = String::new();
|
2148 - | out.push_str("https://");
|
2149 - | #[allow(clippy::needless_borrow)]
|
2150 - | out.push_str(&bucket.as_ref() as &str);
|
2151 - | out.push_str(".ec2.");
|
2152 - | #[allow(clippy::needless_borrow)]
|
2153 - | out.push_str(&url.authority());
|
2154 - | out
|
2155 - | })
|
2156 - | .property(
|
2157 - | "authSchemes",
|
2158 - | vec![
|
2159 - | ::aws_smithy_types::Document::from({
|
2160 - | let mut out =
|
2161 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
|
2162 - | );
|
2163 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2164 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
2165 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2166 - | out.insert(
|
2167 - | "signingRegionSet".to_string(),
|
2168 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
2169 - | );
|
2170 - | out
|
2171 - | }),
|
2172 - | ::aws_smithy_types::Document::from({
|
2173 - | let mut out =
|
2174 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
|
2175 - | );
|
2176 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2177 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2178 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2179 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2180 - | out
|
2181 - | }),
|
2182 - | ],
|
2183 - | )
|
2184 - | .build());
|
2185 - | }
|
2186 - | }
|
2187 - | #[allow(unreachable_code)]
|
2188 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
2189 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
2190 - | )));
|
2191 - | }
|
2192 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2193 - | .url({
|
2194 - | let mut out = String::new();
|
2195 - | out.push_str("https://");
|
2196 - | #[allow(clippy::needless_borrow)]
|
2197 - | out.push_str(&bucket.as_ref() as &str);
|
2198 - | out.push_str(".ec2.s3-outposts.");
|
2199 - | #[allow(clippy::needless_borrow)]
|
2200 - | out.push_str(®ion.as_ref() as &str);
|
2201 - | out.push('.');
|
2202 - | #[allow(clippy::needless_borrow)]
|
2203 - | out.push_str(®ion_partition.dns_suffix());
|
2204 - | out
|
2205 - | })
|
2206 - | .property(
|
2207 - | "authSchemes",
|
2208 - | vec![
|
2209 - | ::aws_smithy_types::Document::from({
|
2210 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2211 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2212 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
2213 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2214 - | out.insert(
|
2215 - | "signingRegionSet".to_string(),
|
2216 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
2217 - | );
|
2218 - | out
|
2219 - | }),
|
2220 - | ::aws_smithy_types::Document::from({
|
2221 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2222 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2223 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2224 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2225 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2226 - | out
|
2227 - | }),
|
2228 - | ],
|
2229 - | )
|
2230 - | .build());
|
2231 - | }
|
2232 - | if (hardware_type.as_ref() as &str) == ("o") {
|
2233 - | if (region_prefix.as_ref() as &str) == ("beta") {
|
2234 - | if !(endpoint.is_some()) {
|
2235 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
2236 - | "Expected a endpoint to be specified but no endpoint was found".to_string(),
|
2237 - | ));
|
2238 - | }
|
2239 - | #[allow(unused_variables)]
|
2240 - | if let Some(endpoint) = endpoint {
|
2241 - | #[allow(unused_variables)]
|
2242 - | if let Some(url) =
|
2243 - | crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
|
2244 - | {
|
2245 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2246 - | .url({
|
2247 - | let mut out = String::new();
|
2248 - | out.push_str("https://");
|
2249 - | #[allow(clippy::needless_borrow)]
|
2250 - | out.push_str(&bucket.as_ref() as &str);
|
2251 - | out.push_str(".op-");
|
2252 - | #[allow(clippy::needless_borrow)]
|
2253 - | out.push_str(&outpost_id.as_ref() as &str);
|
2254 - | out.push('.');
|
2255 - | #[allow(clippy::needless_borrow)]
|
2256 - | out.push_str(&url.authority());
|
2257 - | out
|
2258 - | })
|
2259 - | .property(
|
2260 - | "authSchemes",
|
2261 - | vec![
|
2262 - | ::aws_smithy_types::Document::from({
|
2263 - | let mut out =
|
2264 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
|
2265 - | );
|
2266 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2267 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
2268 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2269 - | out.insert(
|
2270 - | "signingRegionSet".to_string(),
|
2271 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
2272 - | );
|
2273 - | out
|
2274 - | }),
|
2275 - | ::aws_smithy_types::Document::from({
|
2276 - | let mut out =
|
2277 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
|
2278 - | );
|
2279 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2280 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2281 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2282 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2283 - | out
|
2284 - | }),
|
2285 - | ],
|
2286 - | )
|
2287 - | .build());
|
2288 - | }
|
2289 - | }
|
2290 - | #[allow(unreachable_code)]
|
2291 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
2292 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
2293 - | )));
|
2294 - | }
|
2295 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2296 - | .url({
|
2297 - | let mut out = String::new();
|
2298 - | out.push_str("https://");
|
2299 - | #[allow(clippy::needless_borrow)]
|
2300 - | out.push_str(&bucket.as_ref() as &str);
|
2301 - | out.push_str(".op-");
|
2302 - | #[allow(clippy::needless_borrow)]
|
2303 - | out.push_str(&outpost_id.as_ref() as &str);
|
2304 - | out.push_str(".s3-outposts.");
|
2305 - | #[allow(clippy::needless_borrow)]
|
2306 - | out.push_str(®ion.as_ref() as &str);
|
2307 - | out.push('.');
|
2308 - | #[allow(clippy::needless_borrow)]
|
2309 - | out.push_str(®ion_partition.dns_suffix());
|
2310 - | out
|
2311 - | })
|
2312 - | .property(
|
2313 - | "authSchemes",
|
2314 - | vec![
|
2315 - | ::aws_smithy_types::Document::from({
|
2316 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2317 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2318 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
2319 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2320 - | out.insert(
|
2321 - | "signingRegionSet".to_string(),
|
2322 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
2323 - | );
|
2324 - | out
|
2325 - | }),
|
2326 - | ::aws_smithy_types::Document::from({
|
2327 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2328 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2329 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2330 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2331 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2332 - | out
|
2333 - | }),
|
2334 - | ],
|
2335 - | )
|
2336 - | .build());
|
2337 - | }
|
2338 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
2339 - | let mut out = String::new();
|
2340 - | out.push_str("Unrecognized hardware type: \"Expected hardware type o or e but got ");
|
2341 - | #[allow(clippy::needless_borrow)]
|
2342 - | out.push_str(&hardware_type.as_ref() as &str);
|
2343 - | out.push('"');
|
2344 - | out
|
2345 - | }));
|
2346 - | }
|
2347 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
2348 - | "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.".to_string(),
|
2349 - | ));
|
2350 - | }
|
2351 - | }
|
2352 - | }
|
2353 - | }
|
2354 - | }
|
2355 - | }
|
2356 - | }
|
2357 - | #[allow(unused_variables)]
|
2358 - | if let Some(bucket) = bucket {
|
2359 - | #[allow(unused_variables)]
|
2360 - | if let Some(endpoint) = endpoint {
|
2361 - | if !(crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector).is_some()) {
|
2362 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
2363 - | let mut out = String::new();
|
2364 - | out.push_str("Custom endpoint `");
|
2365 - | #[allow(clippy::needless_borrow)]
|
2366 - | out.push_str(&endpoint.as_ref() as &str);
|
2367 - | out.push_str("` was not a valid URI");
|
2368 - | out
|
2369 - | }));
|
2370 - | }
|
2371 - | }
|
2372 - | if (*force_path_style) == (false) {
|
2373 - | if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
|
2374 - | #[allow(unused_variables)]
|
2375 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
2376 - | if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, false, _diagnostic_collector) {
|
2377 - | if (*accelerate) == (true) {
|
2378 - | if (partition_result.name()) == ("aws-cn") {
|
2379 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
2380 - | "S3 Accelerate cannot be used in this region".to_string(),
|
2381 - | ));
|
2382 - | }
|
2383 - | }
|
2384 - | if (*use_dual_stack) == (true) {
|
2385 - | if (*use_fips) == (true) {
|
2386 - | if (*accelerate) == (false) {
|
2387 - | if !(endpoint.is_some()) {
|
2388 - | if (region.as_ref() as &str) == ("aws-global") {
|
2389 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2390 - | .url({
|
2391 - | let mut out = String::new();
|
2392 - | out.push_str("https://");
|
2393 - | #[allow(clippy::needless_borrow)]
|
2394 - | out.push_str(&bucket.as_ref() as &str);
|
2395 - | out.push_str(".s3-fips.dualstack.us-east-1.");
|
2396 - | #[allow(clippy::needless_borrow)]
|
2397 - | out.push_str(&partition_result.dns_suffix());
|
2398 - | out
|
2399 - | })
|
2400 - | .property(
|
2401 - | "authSchemes",
|
2402 - | vec![::aws_smithy_types::Document::from({
|
2403 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2404 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2405 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2406 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2407 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2408 - | out
|
2409 - | })],
|
2410 - | )
|
2411 - | .build());
|
2412 - | }
|
2413 - | }
|
2414 - | }
|
2415 - | }
|
2416 - | }
|
2417 - | if (*use_dual_stack) == (true) {
|
2418 - | if (*use_fips) == (true) {
|
2419 - | if (*accelerate) == (false) {
|
2420 - | if !(endpoint.is_some()) {
|
2421 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
2422 - | if (*use_global_endpoint) == (true) {
|
2423 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2424 - | .url({
|
2425 - | let mut out = String::new();
|
2426 - | out.push_str("https://");
|
2427 - | #[allow(clippy::needless_borrow)]
|
2428 - | out.push_str(&bucket.as_ref() as &str);
|
2429 - | out.push_str(".s3-fips.dualstack.");
|
2430 - | #[allow(clippy::needless_borrow)]
|
2431 - | out.push_str(®ion.as_ref() as &str);
|
2432 - | out.push('.');
|
2433 - | #[allow(clippy::needless_borrow)]
|
2434 - | out.push_str(&partition_result.dns_suffix());
|
2435 - | out
|
2436 - | })
|
2437 - | .property(
|
2438 - | "authSchemes",
|
2439 - | vec![::aws_smithy_types::Document::from({
|
2440 - | let mut out =
|
2441 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2442 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2443 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2444 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2445 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2446 - | out
|
2447 - | })],
|
2448 - | )
|
2449 - | .build());
|
2450 - | }
|
2451 - | }
|
2452 - | }
|
2453 - | }
|
2454 - | }
|
2455 - | }
|
2456 - | if (*use_dual_stack) == (true) {
|
2457 - | if (*use_fips) == (true) {
|
2458 - | if (*accelerate) == (false) {
|
2459 - | if !(endpoint.is_some()) {
|
2460 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
2461 - | if (*use_global_endpoint) == (false) {
|
2462 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2463 - | .url({
|
2464 - | let mut out = String::new();
|
2465 - | out.push_str("https://");
|
2466 - | #[allow(clippy::needless_borrow)]
|
2467 - | out.push_str(&bucket.as_ref() as &str);
|
2468 - | out.push_str(".s3-fips.dualstack.");
|
2469 - | #[allow(clippy::needless_borrow)]
|
2470 - | out.push_str(®ion.as_ref() as &str);
|
2471 - | out.push('.');
|
2472 - | #[allow(clippy::needless_borrow)]
|
2473 - | out.push_str(&partition_result.dns_suffix());
|
2474 - | out
|
2475 - | })
|
2476 - | .property(
|
2477 - | "authSchemes",
|
2478 - | vec![::aws_smithy_types::Document::from({
|
2479 - | let mut out =
|
2480 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2481 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2482 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2483 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2484 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2485 - | out
|
2486 - | })],
|
2487 - | )
|
2488 - | .build());
|
2489 - | }
|
2490 - | }
|
2491 - | }
|
2492 - | }
|
2493 - | }
|
2494 - | }
|
2495 - | if (*use_dual_stack) == (false) {
|
2496 - | if (*use_fips) == (true) {
|
2497 - | if (*accelerate) == (false) {
|
2498 - | if !(endpoint.is_some()) {
|
2499 - | if (region.as_ref() as &str) == ("aws-global") {
|
2500 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2501 - | .url({
|
2502 - | let mut out = String::new();
|
2503 - | out.push_str("https://");
|
2504 - | #[allow(clippy::needless_borrow)]
|
2505 - | out.push_str(&bucket.as_ref() as &str);
|
2506 - | out.push_str(".s3-fips.us-east-1.");
|
2507 - | #[allow(clippy::needless_borrow)]
|
2508 - | out.push_str(&partition_result.dns_suffix());
|
2509 - | out
|
2510 - | })
|
2511 - | .property(
|
2512 - | "authSchemes",
|
2513 - | vec![::aws_smithy_types::Document::from({
|
2514 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2515 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2516 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2517 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2518 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2519 - | out
|
2520 - | })],
|
2521 - | )
|
2522 - | .build());
|
2523 - | }
|
2524 - | }
|
2525 - | }
|
2526 - | }
|
2527 - | }
|
2528 - | if (*use_dual_stack) == (false) {
|
2529 - | if (*use_fips) == (true) {
|
2530 - | if (*accelerate) == (false) {
|
2531 - | if !(endpoint.is_some()) {
|
2532 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
2533 - | if (*use_global_endpoint) == (true) {
|
2534 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2535 - | .url({
|
2536 - | let mut out = String::new();
|
2537 - | out.push_str("https://");
|
2538 - | #[allow(clippy::needless_borrow)]
|
2539 - | out.push_str(&bucket.as_ref() as &str);
|
2540 - | out.push_str(".s3-fips.");
|
2541 - | #[allow(clippy::needless_borrow)]
|
2542 - | out.push_str(®ion.as_ref() as &str);
|
2543 - | out.push('.');
|
2544 - | #[allow(clippy::needless_borrow)]
|
2545 - | out.push_str(&partition_result.dns_suffix());
|
2546 - | out
|
2547 - | })
|
2548 - | .property(
|
2549 - | "authSchemes",
|
2550 - | vec![::aws_smithy_types::Document::from({
|
2551 - | let mut out =
|
2552 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2553 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2554 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2555 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2556 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2557 - | out
|
2558 - | })],
|
2559 - | )
|
2560 - | .build());
|
2561 - | }
|
2562 - | }
|
2563 - | }
|
2564 - | }
|
2565 - | }
|
2566 - | }
|
2567 - | if (*use_dual_stack) == (false) {
|
2568 - | if (*use_fips) == (true) {
|
2569 - | if (*accelerate) == (false) {
|
2570 - | if !(endpoint.is_some()) {
|
2571 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
2572 - | if (*use_global_endpoint) == (false) {
|
2573 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2574 - | .url({
|
2575 - | let mut out = String::new();
|
2576 - | out.push_str("https://");
|
2577 - | #[allow(clippy::needless_borrow)]
|
2578 - | out.push_str(&bucket.as_ref() as &str);
|
2579 - | out.push_str(".s3-fips.");
|
2580 - | #[allow(clippy::needless_borrow)]
|
2581 - | out.push_str(®ion.as_ref() as &str);
|
2582 - | out.push('.');
|
2583 - | #[allow(clippy::needless_borrow)]
|
2584 - | out.push_str(&partition_result.dns_suffix());
|
2585 - | out
|
2586 - | })
|
2587 - | .property(
|
2588 - | "authSchemes",
|
2589 - | vec![::aws_smithy_types::Document::from({
|
2590 - | let mut out =
|
2591 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2592 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2593 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2594 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2595 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2596 - | out
|
2597 - | })],
|
2598 - | )
|
2599 - | .build());
|
2600 - | }
|
2601 - | }
|
2602 - | }
|
2603 - | }
|
2604 - | }
|
2605 - | }
|
2606 - | if (*use_dual_stack) == (true) {
|
2607 - | if (*use_fips) == (false) {
|
2608 - | if (*accelerate) == (true) {
|
2609 - | if !(endpoint.is_some()) {
|
2610 - | if (region.as_ref() as &str) == ("aws-global") {
|
2611 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2612 - | .url({
|
2613 - | let mut out = String::new();
|
2614 - | out.push_str("https://");
|
2615 - | #[allow(clippy::needless_borrow)]
|
2616 - | out.push_str(&bucket.as_ref() as &str);
|
2617 - | out.push_str(".s3-accelerate.dualstack.us-east-1.");
|
2618 - | #[allow(clippy::needless_borrow)]
|
2619 - | out.push_str(&partition_result.dns_suffix());
|
2620 - | out
|
2621 - | })
|
2622 - | .property(
|
2623 - | "authSchemes",
|
2624 - | vec![::aws_smithy_types::Document::from({
|
2625 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2626 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2627 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2628 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2629 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2630 - | out
|
2631 - | })],
|
2632 - | )
|
2633 - | .build());
|
2634 - | }
|
2635 - | }
|
2636 - | }
|
2637 - | }
|
2638 - | }
|
2639 - | if (*use_dual_stack) == (true) {
|
2640 - | if (*use_fips) == (false) {
|
2641 - | if (*accelerate) == (true) {
|
2642 - | if !(endpoint.is_some()) {
|
2643 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
2644 - | if (*use_global_endpoint) == (true) {
|
2645 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2646 - | .url({
|
2647 - | let mut out = String::new();
|
2648 - | out.push_str("https://");
|
2649 - | #[allow(clippy::needless_borrow)]
|
2650 - | out.push_str(&bucket.as_ref() as &str);
|
2651 - | out.push_str(".s3-accelerate.dualstack.");
|
2652 - | #[allow(clippy::needless_borrow)]
|
2653 - | out.push_str(&partition_result.dns_suffix());
|
2654 - | out
|
2655 - | })
|
2656 - | .property(
|
2657 - | "authSchemes",
|
2658 - | vec![::aws_smithy_types::Document::from({
|
2659 - | let mut out =
|
2660 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2661 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2662 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2663 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2664 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2665 - | out
|
2666 - | })],
|
2667 - | )
|
2668 - | .build());
|
2669 - | }
|
2670 - | }
|
2671 - | }
|
2672 - | }
|
2673 - | }
|
2674 - | }
|
2675 - | if (*use_dual_stack) == (true) {
|
2676 - | if (*use_fips) == (false) {
|
2677 - | if (*accelerate) == (true) {
|
2678 - | if !(endpoint.is_some()) {
|
2679 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
2680 - | if (*use_global_endpoint) == (false) {
|
2681 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2682 - | .url({
|
2683 - | let mut out = String::new();
|
2684 - | out.push_str("https://");
|
2685 - | #[allow(clippy::needless_borrow)]
|
2686 - | out.push_str(&bucket.as_ref() as &str);
|
2687 - | out.push_str(".s3-accelerate.dualstack.");
|
2688 - | #[allow(clippy::needless_borrow)]
|
2689 - | out.push_str(&partition_result.dns_suffix());
|
2690 - | out
|
2691 - | })
|
2692 - | .property(
|
2693 - | "authSchemes",
|
2694 - | vec![::aws_smithy_types::Document::from({
|
2695 - | let mut out =
|
2696 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2697 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2698 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2699 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2700 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2701 - | out
|
2702 - | })],
|
2703 - | )
|
2704 - | .build());
|
2705 - | }
|
2706 - | }
|
2707 - | }
|
2708 - | }
|
2709 - | }
|
2710 - | }
|
2711 - | if (*use_dual_stack) == (true) {
|
2712 - | if (*use_fips) == (false) {
|
2713 - | if (*accelerate) == (false) {
|
2714 - | if !(endpoint.is_some()) {
|
2715 - | if (region.as_ref() as &str) == ("aws-global") {
|
2716 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2717 - | .url({
|
2718 - | let mut out = String::new();
|
2719 - | out.push_str("https://");
|
2720 - | #[allow(clippy::needless_borrow)]
|
2721 - | out.push_str(&bucket.as_ref() as &str);
|
2722 - | out.push_str(".s3.dualstack.us-east-1.");
|
2723 - | #[allow(clippy::needless_borrow)]
|
2724 - | out.push_str(&partition_result.dns_suffix());
|
2725 - | out
|
2726 - | })
|
2727 - | .property(
|
2728 - | "authSchemes",
|
2729 - | vec![::aws_smithy_types::Document::from({
|
2730 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2731 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2732 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2733 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2734 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2735 - | out
|
2736 - | })],
|
2737 - | )
|
2738 - | .build());
|
2739 - | }
|
2740 - | }
|
2741 - | }
|
2742 - | }
|
2743 - | }
|
2744 - | if (*use_dual_stack) == (true) {
|
2745 - | if (*use_fips) == (false) {
|
2746 - | if (*accelerate) == (false) {
|
2747 - | if !(endpoint.is_some()) {
|
2748 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
2749 - | if (*use_global_endpoint) == (true) {
|
2750 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2751 - | .url({
|
2752 - | let mut out = String::new();
|
2753 - | out.push_str("https://");
|
2754 - | #[allow(clippy::needless_borrow)]
|
2755 - | out.push_str(&bucket.as_ref() as &str);
|
2756 - | out.push_str(".s3.dualstack.");
|
2757 - | #[allow(clippy::needless_borrow)]
|
2758 - | out.push_str(®ion.as_ref() as &str);
|
2759 - | out.push('.');
|
2760 - | #[allow(clippy::needless_borrow)]
|
2761 - | out.push_str(&partition_result.dns_suffix());
|
2762 - | out
|
2763 - | })
|
2764 - | .property(
|
2765 - | "authSchemes",
|
2766 - | vec![::aws_smithy_types::Document::from({
|
2767 - | let mut out =
|
2768 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2769 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2770 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2771 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2772 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2773 - | out
|
2774 - | })],
|
2775 - | )
|
2776 - | .build());
|
2777 - | }
|
2778 - | }
|
2779 - | }
|
2780 - | }
|
2781 - | }
|
2782 - | }
|
2783 - | if (*use_dual_stack) == (true) {
|
2784 - | if (*use_fips) == (false) {
|
2785 - | if (*accelerate) == (false) {
|
2786 - | if !(endpoint.is_some()) {
|
2787 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
2788 - | if (*use_global_endpoint) == (false) {
|
2789 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2790 - | .url({
|
2791 - | let mut out = String::new();
|
2792 - | out.push_str("https://");
|
2793 - | #[allow(clippy::needless_borrow)]
|
2794 - | out.push_str(&bucket.as_ref() as &str);
|
2795 - | out.push_str(".s3.dualstack.");
|
2796 - | #[allow(clippy::needless_borrow)]
|
2797 - | out.push_str(®ion.as_ref() as &str);
|
2798 - | out.push('.');
|
2799 - | #[allow(clippy::needless_borrow)]
|
2800 - | out.push_str(&partition_result.dns_suffix());
|
2801 - | out
|
2802 - | })
|
2803 - | .property(
|
2804 - | "authSchemes",
|
2805 - | vec![::aws_smithy_types::Document::from({
|
2806 - | let mut out =
|
2807 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2808 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2809 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2810 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2811 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2812 - | out
|
2813 - | })],
|
2814 - | )
|
2815 - | .build());
|
2816 - | }
|
2817 - | }
|
2818 - | }
|
2819 - | }
|
2820 - | }
|
2821 - | }
|
2822 - | if (*use_dual_stack) == (false) {
|
2823 - | if (*use_fips) == (false) {
|
2824 - | if (*accelerate) == (false) {
|
2825 - | #[allow(unused_variables)]
|
2826 - | if let Some(endpoint) = endpoint {
|
2827 - | #[allow(unused_variables)]
|
2828 - | if let Some(url) =
|
2829 - | crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
|
2830 - | {
|
2831 - | if (url.is_ip()) == (true) {
|
2832 - | if (region.as_ref() as &str) == ("aws-global") {
|
2833 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2834 - | .url({
|
2835 - | let mut out = String::new();
|
2836 - | #[allow(clippy::needless_borrow)]
|
2837 - | out.push_str(&url.scheme());
|
2838 - | out.push_str("://");
|
2839 - | #[allow(clippy::needless_borrow)]
|
2840 - | out.push_str(&url.authority());
|
2841 - | #[allow(clippy::needless_borrow)]
|
2842 - | out.push_str(&url.normalized_path());
|
2843 - | #[allow(clippy::needless_borrow)]
|
2844 - | out.push_str(&bucket.as_ref() as &str);
|
2845 - | out
|
2846 - | })
|
2847 - | .property(
|
2848 - | "authSchemes",
|
2849 - | vec![::aws_smithy_types::Document::from({
|
2850 - | let mut out =
|
2851 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2852 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2853 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2854 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2855 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2856 - | out
|
2857 - | })],
|
2858 - | )
|
2859 - | .build());
|
2860 - | }
|
2861 - | }
|
2862 - | }
|
2863 - | }
|
2864 - | }
|
2865 - | }
|
2866 - | }
|
2867 - | if (*use_dual_stack) == (false) {
|
2868 - | if (*use_fips) == (false) {
|
2869 - | if (*accelerate) == (false) {
|
2870 - | #[allow(unused_variables)]
|
2871 - | if let Some(endpoint) = endpoint {
|
2872 - | #[allow(unused_variables)]
|
2873 - | if let Some(url) =
|
2874 - | crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
|
2875 - | {
|
2876 - | if (url.is_ip()) == (false) {
|
2877 - | if (region.as_ref() as &str) == ("aws-global") {
|
2878 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2879 - | .url({
|
2880 - | let mut out = String::new();
|
2881 - | #[allow(clippy::needless_borrow)]
|
2882 - | out.push_str(&url.scheme());
|
2883 - | out.push_str("://");
|
2884 - | #[allow(clippy::needless_borrow)]
|
2885 - | out.push_str(&bucket.as_ref() as &str);
|
2886 - | out.push('.');
|
2887 - | #[allow(clippy::needless_borrow)]
|
2888 - | out.push_str(&url.authority());
|
2889 - | #[allow(clippy::needless_borrow)]
|
2890 - | out.push_str(&url.path());
|
2891 - | out
|
2892 - | })
|
2893 - | .property(
|
2894 - | "authSchemes",
|
2895 - | vec![::aws_smithy_types::Document::from({
|
2896 - | let mut out =
|
2897 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2898 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2899 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2900 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2901 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2902 - | out
|
2903 - | })],
|
2904 - | )
|
2905 - | .build());
|
2906 - | }
|
2907 - | }
|
2908 - | }
|
2909 - | }
|
2910 - | }
|
2911 - | }
|
2912 - | }
|
2913 - | if (*use_dual_stack) == (false) {
|
2914 - | if (*use_fips) == (false) {
|
2915 - | if (*accelerate) == (false) {
|
2916 - | #[allow(unused_variables)]
|
2917 - | if let Some(endpoint) = endpoint {
|
2918 - | #[allow(unused_variables)]
|
2919 - | if let Some(url) =
|
2920 - | crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
|
2921 - | {
|
2922 - | if (url.is_ip()) == (true) {
|
2923 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
2924 - | if (*use_global_endpoint) == (true) {
|
2925 - | if (region.as_ref() as &str) == ("us-east-1") {
|
2926 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2927 - | .url({
|
2928 - | let mut out = String::new();
|
2929 - | #[allow(clippy::needless_borrow)]
|
2930 - | out.push_str(&url.scheme());
|
2931 - | out.push_str("://");
|
2932 - | #[allow(clippy::needless_borrow)]
|
2933 - | out.push_str(&url.authority());
|
2934 - | #[allow(clippy::needless_borrow)]
|
2935 - | out.push_str(&url.normalized_path());
|
2936 - | #[allow(clippy::needless_borrow)]
|
2937 - | out.push_str(&bucket.as_ref() as &str);
|
2938 - | out
|
2939 - | })
|
2940 - | .property(
|
2941 - | "authSchemes",
|
2942 - | vec![::aws_smithy_types::Document::from({
|
2943 - | let mut out = ::std::collections::HashMap::<
|
2944 - | String,
|
2945 - | ::aws_smithy_types::Document,
|
2946 - | >::new(
|
2947 - | );
|
2948 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2949 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2950 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2951 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2952 - | out
|
2953 - | })],
|
2954 - | )
|
2955 - | .build());
|
2956 - | }
|
2957 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
2958 - | .url({
|
2959 - | let mut out = String::new();
|
2960 - | #[allow(clippy::needless_borrow)]
|
2961 - | out.push_str(&url.scheme());
|
2962 - | out.push_str("://");
|
2963 - | #[allow(clippy::needless_borrow)]
|
2964 - | out.push_str(&url.authority());
|
2965 - | #[allow(clippy::needless_borrow)]
|
2966 - | out.push_str(&url.normalized_path());
|
2967 - | #[allow(clippy::needless_borrow)]
|
2968 - | out.push_str(&bucket.as_ref() as &str);
|
2969 - | out
|
2970 - | })
|
2971 - | .property(
|
2972 - | "authSchemes",
|
2973 - | vec![::aws_smithy_types::Document::from({
|
2974 - | let mut out =
|
2975 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
|
2976 - | );
|
2977 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2978 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2979 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2980 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
2981 - | out
|
2982 - | })],
|
2983 - | )
|
2984 - | .build());
|
2985 - | }
|
2986 - | }
|
2987 - | }
|
2988 - | }
|
2989 - | }
|
2990 - | }
|
2991 - | }
|
2992 - | }
|
2993 - | if (*use_dual_stack) == (false) {
|
2994 - | if (*use_fips) == (false) {
|
2995 - | if (*accelerate) == (false) {
|
2996 - | #[allow(unused_variables)]
|
2997 - | if let Some(endpoint) = endpoint {
|
2998 - | #[allow(unused_variables)]
|
2999 - | if let Some(url) =
|
3000 - | crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
|
3001 - | {
|
3002 - | if (url.is_ip()) == (false) {
|
3003 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
3004 - | if (*use_global_endpoint) == (true) {
|
3005 - | if (region.as_ref() as &str) == ("us-east-1") {
|
3006 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3007 - | .url({
|
3008 - | let mut out = String::new();
|
3009 - | #[allow(clippy::needless_borrow)]
|
3010 - | out.push_str(&url.scheme());
|
3011 - | out.push_str("://");
|
3012 - | #[allow(clippy::needless_borrow)]
|
3013 - | out.push_str(&bucket.as_ref() as &str);
|
3014 - | out.push('.');
|
3015 - | #[allow(clippy::needless_borrow)]
|
3016 - | out.push_str(&url.authority());
|
3017 - | #[allow(clippy::needless_borrow)]
|
3018 - | out.push_str(&url.path());
|
3019 - | out
|
3020 - | })
|
3021 - | .property(
|
3022 - | "authSchemes",
|
3023 - | vec![::aws_smithy_types::Document::from({
|
3024 - | let mut out = ::std::collections::HashMap::<
|
3025 - | String,
|
3026 - | ::aws_smithy_types::Document,
|
3027 - | >::new(
|
3028 - | );
|
3029 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3030 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3031 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3032 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3033 - | out
|
3034 - | })],
|
3035 - | )
|
3036 - | .build());
|
3037 - | }
|
3038 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3039 - | .url({
|
3040 - | let mut out = String::new();
|
3041 - | #[allow(clippy::needless_borrow)]
|
3042 - | out.push_str(&url.scheme());
|
3043 - | out.push_str("://");
|
3044 - | #[allow(clippy::needless_borrow)]
|
3045 - | out.push_str(&bucket.as_ref() as &str);
|
3046 - | out.push('.');
|
3047 - | #[allow(clippy::needless_borrow)]
|
3048 - | out.push_str(&url.authority());
|
3049 - | #[allow(clippy::needless_borrow)]
|
3050 - | out.push_str(&url.path());
|
3051 - | out
|
3052 - | })
|
3053 - | .property(
|
3054 - | "authSchemes",
|
3055 - | vec![::aws_smithy_types::Document::from({
|
3056 - | let mut out =
|
3057 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
|
3058 - | );
|
3059 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3060 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3061 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3062 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3063 - | out
|
3064 - | })],
|
3065 - | )
|
3066 - | .build());
|
3067 - | }
|
3068 - | }
|
3069 - | }
|
3070 - | }
|
3071 - | }
|
3072 - | }
|
3073 - | }
|
3074 - | }
|
3075 - | if (*use_dual_stack) == (false) {
|
3076 - | if (*use_fips) == (false) {
|
3077 - | if (*accelerate) == (false) {
|
3078 - | #[allow(unused_variables)]
|
3079 - | if let Some(endpoint) = endpoint {
|
3080 - | #[allow(unused_variables)]
|
3081 - | if let Some(url) =
|
3082 - | crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
|
3083 - | {
|
3084 - | if (url.is_ip()) == (true) {
|
3085 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
3086 - | if (*use_global_endpoint) == (false) {
|
3087 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3088 - | .url({
|
3089 - | let mut out = String::new();
|
3090 - | #[allow(clippy::needless_borrow)]
|
3091 - | out.push_str(&url.scheme());
|
3092 - | out.push_str("://");
|
3093 - | #[allow(clippy::needless_borrow)]
|
3094 - | out.push_str(&url.authority());
|
3095 - | #[allow(clippy::needless_borrow)]
|
3096 - | out.push_str(&url.normalized_path());
|
3097 - | #[allow(clippy::needless_borrow)]
|
3098 - | out.push_str(&bucket.as_ref() as &str);
|
3099 - | out
|
3100 - | })
|
3101 - | .property(
|
3102 - | "authSchemes",
|
3103 - | vec![::aws_smithy_types::Document::from({
|
3104 - | let mut out =
|
3105 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
|
3106 - | );
|
3107 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3108 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3109 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3110 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3111 - | out
|
3112 - | })],
|
3113 - | )
|
3114 - | .build());
|
3115 - | }
|
3116 - | }
|
3117 - | }
|
3118 - | }
|
3119 - | }
|
3120 - | }
|
3121 - | }
|
3122 - | }
|
3123 - | if (*use_dual_stack) == (false) {
|
3124 - | if (*use_fips) == (false) {
|
3125 - | if (*accelerate) == (false) {
|
3126 - | #[allow(unused_variables)]
|
3127 - | if let Some(endpoint) = endpoint {
|
3128 - | #[allow(unused_variables)]
|
3129 - | if let Some(url) =
|
3130 - | crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
|
3131 - | {
|
3132 - | if (url.is_ip()) == (false) {
|
3133 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
3134 - | if (*use_global_endpoint) == (false) {
|
3135 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3136 - | .url({
|
3137 - | let mut out = String::new();
|
3138 - | #[allow(clippy::needless_borrow)]
|
3139 - | out.push_str(&url.scheme());
|
3140 - | out.push_str("://");
|
3141 - | #[allow(clippy::needless_borrow)]
|
3142 - | out.push_str(&bucket.as_ref() as &str);
|
3143 - | out.push('.');
|
3144 - | #[allow(clippy::needless_borrow)]
|
3145 - | out.push_str(&url.authority());
|
3146 - | #[allow(clippy::needless_borrow)]
|
3147 - | out.push_str(&url.path());
|
3148 - | out
|
3149 - | })
|
3150 - | .property(
|
3151 - | "authSchemes",
|
3152 - | vec![::aws_smithy_types::Document::from({
|
3153 - | let mut out =
|
3154 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
|
3155 - | );
|
3156 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3157 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3158 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3159 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3160 - | out
|
3161 - | })],
|
3162 - | )
|
3163 - | .build());
|
3164 - | }
|
3165 - | }
|
3166 - | }
|
3167 - | }
|
3168 - | }
|
3169 - | }
|
3170 - | }
|
3171 - | }
|
3172 - | if (*use_dual_stack) == (false) {
|
3173 - | if (*use_fips) == (false) {
|
3174 - | if (*accelerate) == (true) {
|
3175 - | if !(endpoint.is_some()) {
|
3176 - | if (region.as_ref() as &str) == ("aws-global") {
|
3177 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3178 - | .url({
|
3179 - | let mut out = String::new();
|
3180 - | out.push_str("https://");
|
3181 - | #[allow(clippy::needless_borrow)]
|
3182 - | out.push_str(&bucket.as_ref() as &str);
|
3183 - | out.push_str(".s3-accelerate.");
|
3184 - | #[allow(clippy::needless_borrow)]
|
3185 - | out.push_str(&partition_result.dns_suffix());
|
3186 - | out
|
3187 - | })
|
3188 - | .property(
|
3189 - | "authSchemes",
|
3190 - | vec![::aws_smithy_types::Document::from({
|
3191 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3192 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3193 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3194 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3195 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3196 - | out
|
3197 - | })],
|
3198 - | )
|
3199 - | .build());
|
3200 - | }
|
3201 - | }
|
3202 - | }
|
3203 - | }
|
3204 - | }
|
3205 - | if (*use_dual_stack) == (false) {
|
3206 - | if (*use_fips) == (false) {
|
3207 - | if (*accelerate) == (true) {
|
3208 - | if !(endpoint.is_some()) {
|
3209 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
3210 - | if (*use_global_endpoint) == (true) {
|
3211 - | if (region.as_ref() as &str) == ("us-east-1") {
|
3212 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3213 - | .url({
|
3214 - | let mut out = String::new();
|
3215 - | out.push_str("https://");
|
3216 - | #[allow(clippy::needless_borrow)]
|
3217 - | out.push_str(&bucket.as_ref() as &str);
|
3218 - | out.push_str(".s3-accelerate.");
|
3219 - | #[allow(clippy::needless_borrow)]
|
3220 - | out.push_str(&partition_result.dns_suffix());
|
3221 - | out
|
3222 - | })
|
3223 - | .property(
|
3224 - | "authSchemes",
|
3225 - | vec![::aws_smithy_types::Document::from({
|
3226 - | let mut out =
|
3227 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3228 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3229 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3230 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3231 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3232 - | out
|
3233 - | })],
|
3234 - | )
|
3235 - | .build());
|
3236 - | }
|
3237 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3238 - | .url({
|
3239 - | let mut out = String::new();
|
3240 - | out.push_str("https://");
|
3241 - | #[allow(clippy::needless_borrow)]
|
3242 - | out.push_str(&bucket.as_ref() as &str);
|
3243 - | out.push_str(".s3-accelerate.");
|
3244 - | #[allow(clippy::needless_borrow)]
|
3245 - | out.push_str(&partition_result.dns_suffix());
|
3246 - | out
|
3247 - | })
|
3248 - | .property(
|
3249 - | "authSchemes",
|
3250 - | vec![::aws_smithy_types::Document::from({
|
3251 - | let mut out =
|
3252 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3253 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3254 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3255 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3256 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3257 - | out
|
3258 - | })],
|
3259 - | )
|
3260 - | .build());
|
3261 - | }
|
3262 - | }
|
3263 - | }
|
3264 - | }
|
3265 - | }
|
3266 - | }
|
3267 - | if (*use_dual_stack) == (false) {
|
3268 - | if (*use_fips) == (false) {
|
3269 - | if (*accelerate) == (true) {
|
3270 - | if !(endpoint.is_some()) {
|
3271 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
3272 - | if (*use_global_endpoint) == (false) {
|
3273 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3274 - | .url({
|
3275 - | let mut out = String::new();
|
3276 - | out.push_str("https://");
|
3277 - | #[allow(clippy::needless_borrow)]
|
3278 - | out.push_str(&bucket.as_ref() as &str);
|
3279 - | out.push_str(".s3-accelerate.");
|
3280 - | #[allow(clippy::needless_borrow)]
|
3281 - | out.push_str(&partition_result.dns_suffix());
|
3282 - | out
|
3283 - | })
|
3284 - | .property(
|
3285 - | "authSchemes",
|
3286 - | vec![::aws_smithy_types::Document::from({
|
3287 - | let mut out =
|
3288 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3289 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3290 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3291 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3292 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3293 - | out
|
3294 - | })],
|
3295 - | )
|
3296 - | .build());
|
3297 - | }
|
3298 - | }
|
3299 - | }
|
3300 - | }
|
3301 - | }
|
3302 - | }
|
3303 - | if (*use_dual_stack) == (false) {
|
3304 - | if (*use_fips) == (false) {
|
3305 - | if (*accelerate) == (false) {
|
3306 - | if !(endpoint.is_some()) {
|
3307 - | if (region.as_ref() as &str) == ("aws-global") {
|
3308 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3309 - | .url({
|
3310 - | let mut out = String::new();
|
3311 - | out.push_str("https://");
|
3312 - | #[allow(clippy::needless_borrow)]
|
3313 - | out.push_str(&bucket.as_ref() as &str);
|
3314 - | out.push_str(".s3.");
|
3315 - | #[allow(clippy::needless_borrow)]
|
3316 - | out.push_str(&partition_result.dns_suffix());
|
3317 - | out
|
3318 - | })
|
3319 - | .property(
|
3320 - | "authSchemes",
|
3321 - | vec![::aws_smithy_types::Document::from({
|
3322 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3323 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3324 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3325 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3326 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3327 - | out
|
3328 - | })],
|
3329 - | )
|
3330 - | .build());
|
3331 - | }
|
3332 - | }
|
3333 - | }
|
3334 - | }
|
3335 - | }
|
3336 - | if (*use_dual_stack) == (false) {
|
3337 - | if (*use_fips) == (false) {
|
3338 - | if (*accelerate) == (false) {
|
3339 - | if !(endpoint.is_some()) {
|
3340 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
3341 - | if (*use_global_endpoint) == (true) {
|
3342 - | if (region.as_ref() as &str) == ("us-east-1") {
|
3343 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3344 - | .url({
|
3345 - | let mut out = String::new();
|
3346 - | out.push_str("https://");
|
3347 - | #[allow(clippy::needless_borrow)]
|
3348 - | out.push_str(&bucket.as_ref() as &str);
|
3349 - | out.push_str(".s3.");
|
3350 - | #[allow(clippy::needless_borrow)]
|
3351 - | out.push_str(&partition_result.dns_suffix());
|
3352 - | out
|
3353 - | })
|
3354 - | .property(
|
3355 - | "authSchemes",
|
3356 - | vec![::aws_smithy_types::Document::from({
|
3357 - | let mut out =
|
3358 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3359 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3360 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3361 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3362 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3363 - | out
|
3364 - | })],
|
3365 - | )
|
3366 - | .build());
|
3367 - | }
|
3368 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3369 - | .url({
|
3370 - | let mut out = String::new();
|
3371 - | out.push_str("https://");
|
3372 - | #[allow(clippy::needless_borrow)]
|
3373 - | out.push_str(&bucket.as_ref() as &str);
|
3374 - | out.push_str(".s3.");
|
3375 - | #[allow(clippy::needless_borrow)]
|
3376 - | out.push_str(®ion.as_ref() as &str);
|
3377 - | out.push('.');
|
3378 - | #[allow(clippy::needless_borrow)]
|
3379 - | out.push_str(&partition_result.dns_suffix());
|
3380 - | out
|
3381 - | })
|
3382 - | .property(
|
3383 - | "authSchemes",
|
3384 - | vec![::aws_smithy_types::Document::from({
|
3385 - | let mut out =
|
3386 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3387 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3388 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3389 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3390 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3391 - | out
|
3392 - | })],
|
3393 - | )
|
3394 - | .build());
|
3395 - | }
|
3396 - | }
|
3397 - | }
|
3398 - | }
|
3399 - | }
|
3400 - | }
|
3401 - | if (*use_dual_stack) == (false) {
|
3402 - | if (*use_fips) == (false) {
|
3403 - | if (*accelerate) == (false) {
|
3404 - | if !(endpoint.is_some()) {
|
3405 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
3406 - | if (*use_global_endpoint) == (false) {
|
3407 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3408 - | .url({
|
3409 - | let mut out = String::new();
|
3410 - | out.push_str("https://");
|
3411 - | #[allow(clippy::needless_borrow)]
|
3412 - | out.push_str(&bucket.as_ref() as &str);
|
3413 - | out.push_str(".s3.");
|
3414 - | #[allow(clippy::needless_borrow)]
|
3415 - | out.push_str(®ion.as_ref() as &str);
|
3416 - | out.push('.');
|
3417 - | #[allow(clippy::needless_borrow)]
|
3418 - | out.push_str(&partition_result.dns_suffix());
|
3419 - | out
|
3420 - | })
|
3421 - | .property(
|
3422 - | "authSchemes",
|
3423 - | vec![::aws_smithy_types::Document::from({
|
3424 - | let mut out =
|
3425 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3426 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3427 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3428 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3429 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3430 - | out
|
3431 - | })],
|
3432 - | )
|
3433 - | .build());
|
3434 - | }
|
3435 - | }
|
3436 - | }
|
3437 - | }
|
3438 - | }
|
3439 - | }
|
3440 - | #[allow(unreachable_code)]
|
3441 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
3442 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
3443 - | )));
|
3444 - | }
|
3445 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3446 - | "Invalid region: region was not a valid DNS name.".to_string(),
|
3447 - | ));
|
3448 - | }
|
3449 - | #[allow(unreachable_code)]
|
3450 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
3451 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
3452 - | )));
|
3453 - | }
|
3454 - | }
|
3455 - | #[allow(unused_variables)]
|
3456 - | if let Some(endpoint) = endpoint {
|
3457 - | #[allow(unused_variables)]
|
3458 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
3459 - | if (url.scheme()) == ("http") {
|
3460 - | if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, true, _diagnostic_collector) {
|
3461 - | if (*force_path_style) == (false) {
|
3462 - | if (*use_fips) == (false) {
|
3463 - | if (*use_dual_stack) == (false) {
|
3464 - | if (*accelerate) == (false) {
|
3465 - | #[allow(unused_variables)]
|
3466 - | if let Some(partition_result) =
|
3467 - | partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
|
3468 - | {
|
3469 - | if crate::endpoint_lib::host::is_valid_host_label(
|
3470 - | region.as_ref() as &str,
|
3471 - | false,
|
3472 - | _diagnostic_collector,
|
3473 - | ) {
|
3474 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3475 - | .url({
|
3476 - | let mut out = String::new();
|
3477 - | #[allow(clippy::needless_borrow)]
|
3478 - | out.push_str(&url.scheme());
|
3479 - | out.push_str("://");
|
3480 - | #[allow(clippy::needless_borrow)]
|
3481 - | out.push_str(&bucket.as_ref() as &str);
|
3482 - | out.push('.');
|
3483 - | #[allow(clippy::needless_borrow)]
|
3484 - | out.push_str(&url.authority());
|
3485 - | #[allow(clippy::needless_borrow)]
|
3486 - | out.push_str(&url.path());
|
3487 - | out
|
3488 - | })
|
3489 - | .property(
|
3490 - | "authSchemes",
|
3491 - | vec![::aws_smithy_types::Document::from({
|
3492 - | let mut out =
|
3493 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3494 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3495 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3496 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
3497 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
3498 - | out
|
3499 - | })],
|
3500 - | )
|
3501 - | .build());
|
3502 - | }
|
3503 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3504 - | "Invalid region: region was not a valid DNS name.".to_string(),
|
3505 - | ));
|
3506 - | }
|
3507 - | #[allow(unreachable_code)]
|
3508 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
3509 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
3510 - | )));
|
3511 - | }
|
3512 - | }
|
3513 - | }
|
3514 - | }
|
3515 - | }
|
3516 - | }
|
3517 - | }
|
3518 - | }
|
3519 - | if (*force_path_style) == (false) {
|
3520 - | #[allow(unused_variables)]
|
3521 - | if let Some(bucket_arn) = crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector) {
|
3522 - | #[allow(unused_variables)]
|
3523 - | if let Some(arn_type) = bucket_arn.resource_id().first().cloned() {
|
3524 - | if !((arn_type.as_ref() as &str) == ("")) {
|
3525 - | if (bucket_arn.service()) == ("s3-object-lambda") {
|
3526 - | if (arn_type.as_ref() as &str) == ("accesspoint") {
|
3527 - | #[allow(unused_variables)]
|
3528 - | if let Some(access_point_name) = bucket_arn.resource_id().get(1).cloned() {
|
3529 - | if !((access_point_name.as_ref() as &str) == ("")) {
|
3530 - | if (*use_dual_stack) == (true) {
|
3531 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3532 - | "S3 Object Lambda does not support Dual-stack".to_string(),
|
3533 - | ));
|
3534 - | }
|
3535 - | if (*accelerate) == (true) {
|
3536 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3537 - | "S3 Object Lambda does not support S3 Accelerate".to_string(),
|
3538 - | ));
|
3539 - | }
|
3540 - | if !((bucket_arn.region()) == ("")) {
|
3541 - | #[allow(unused_variables)]
|
3542 - | if let Some(disable_access_points) = disable_access_points {
|
3543 - | if (*disable_access_points) == (true) {
|
3544 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3545 - | "Access points are not supported for this operation".to_string(),
|
3546 - | ));
|
3547 - | }
|
3548 - | }
|
3549 - | if !(bucket_arn.resource_id().get(2).cloned().is_some()) {
|
3550 - | #[allow(unused_variables)]
|
3551 - | if let Some(use_arn_region) = use_arn_region {
|
3552 - | if (*use_arn_region) == (false) {
|
3553 - | if !((bucket_arn.region()) == (region.as_ref() as &str)) {
|
3554 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
3555 - | let mut out = String::new();
|
3556 - | out.push_str("Invalid configuration: region from ARN `");
|
3557 - | #[allow(clippy::needless_borrow)]
|
3558 - | out.push_str(&bucket_arn.region());
|
3559 - | out.push_str("` does not match client region `");
|
3560 - | #[allow(clippy::needless_borrow)]
|
3561 - | out.push_str(®ion.as_ref() as &str);
|
3562 - | out.push_str("` and UseArnRegion is `false`");
|
3563 - | out
|
3564 - | }));
|
3565 - | }
|
3566 - | }
|
3567 - | }
|
3568 - | #[allow(unused_variables)]
|
3569 - | if let Some(bucket_partition) =
|
3570 - | partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector)
|
3571 - | {
|
3572 - | #[allow(unused_variables)]
|
3573 - | if let Some(partition_result) =
|
3574 - | partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
|
3575 - | {
|
3576 - | if (bucket_partition.name()) == (partition_result.name()) {
|
3577 - | if crate::endpoint_lib::host::is_valid_host_label(
|
3578 - | bucket_arn.region(),
|
3579 - | true,
|
3580 - | _diagnostic_collector,
|
3581 - | ) {
|
3582 - | if (bucket_arn.account_id()) == ("") {
|
3583 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3584 - | "Invalid ARN: Missing account id".to_string(),
|
3585 - | ));
|
3586 - | }
|
3587 - | if crate::endpoint_lib::host::is_valid_host_label(
|
3588 - | bucket_arn.account_id(),
|
3589 - | false,
|
3590 - | _diagnostic_collector,
|
3591 - | ) {
|
3592 - | if crate::endpoint_lib::host::is_valid_host_label(
|
3593 - | access_point_name.as_ref() as &str,
|
3594 - | false,
|
3595 - | _diagnostic_collector,
|
3596 - | ) {
|
3597 - | #[allow(unused_variables)]
|
3598 - | if let Some(endpoint) = endpoint {
|
3599 - | #[allow(unused_variables)]
|
3600 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
|
3601 - | endpoint.as_ref() as &str,
|
3602 - | _diagnostic_collector,
|
3603 - | ) {
|
3604 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3605 - | .url({
|
3606 - | let mut out = String::new();
|
3607 - | #[allow(clippy::needless_borrow)]
|
3608 - | out.push_str(&url.scheme());
|
3609 - | out.push_str("://");
|
3610 - | #[allow(clippy::needless_borrow)]
|
3611 - | out.push_str(&access_point_name.as_ref() as &str);
|
3612 - | out.push('-');
|
3613 - | #[allow(clippy::needless_borrow)]
|
3614 - | out.push_str(&bucket_arn.account_id());
|
3615 - | out.push('.');
|
3616 - | #[allow(clippy::needless_borrow)]
|
3617 - | out.push_str(&url.authority());
|
3618 - | #[allow(clippy::needless_borrow)]
|
3619 - | out.push_str(&url.path());
|
3620 - | out
|
3621 - | })
|
3622 - | .property(
|
3623 - | "authSchemes",
|
3624 - | vec![::aws_smithy_types::Document::from({
|
3625 - | let mut out = ::std::collections::HashMap::<
|
3626 - | String,
|
3627 - | ::aws_smithy_types::Document,
|
3628 - | >::new(
|
3629 - | );
|
3630 - | out.insert(
|
3631 - | "disableDoubleEncoding".to_string(),
|
3632 - | true.into(),
|
3633 - | );
|
3634 - | out.insert(
|
3635 - | "name".to_string(),
|
3636 - | "sigv4".to_string().into(),
|
3637 - | );
|
3638 - | out.insert(
|
3639 - | "signingName".to_string(),
|
3640 - | "s3-object-lambda".to_string().into(),
|
3641 - | );
|
3642 - | out.insert(
|
3643 - | "signingRegion".to_string(),
|
3644 - | bucket_arn.region().to_owned().into(),
|
3645 - | );
|
3646 - | out
|
3647 - | })],
|
3648 - | )
|
3649 - | .build());
|
3650 - | }
|
3651 - | }
|
3652 - | if (*use_fips) == (true) {
|
3653 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3654 - | .url({
|
3655 - | let mut out = String::new();
|
3656 - | out.push_str("https://");
|
3657 - | #[allow(clippy::needless_borrow)]
|
3658 - | out.push_str(&access_point_name.as_ref() as &str);
|
3659 - | out.push('-');
|
3660 - | #[allow(clippy::needless_borrow)]
|
3661 - | out.push_str(&bucket_arn.account_id());
|
3662 - | out.push_str(".s3-object-lambda-fips.");
|
3663 - | #[allow(clippy::needless_borrow)]
|
3664 - | out.push_str(&bucket_arn.region());
|
3665 - | out.push('.');
|
3666 - | #[allow(clippy::needless_borrow)]
|
3667 - | out.push_str(&bucket_partition.dns_suffix());
|
3668 - | out
|
3669 - | })
|
3670 - | .property(
|
3671 - | "authSchemes",
|
3672 - | vec![::aws_smithy_types::Document::from({
|
3673 - | let mut out = ::std::collections::HashMap::<
|
3674 - | String,
|
3675 - | ::aws_smithy_types::Document,
|
3676 - | >::new(
|
3677 - | );
|
3678 - | out.insert(
|
3679 - | "disableDoubleEncoding".to_string(),
|
3680 - | true.into(),
|
3681 - | );
|
3682 - | out.insert(
|
3683 - | "name".to_string(),
|
3684 - | "sigv4".to_string().into(),
|
3685 - | );
|
3686 - | out.insert(
|
3687 - | "signingName".to_string(),
|
3688 - | "s3-object-lambda".to_string().into(),
|
3689 - | );
|
3690 - | out.insert(
|
3691 - | "signingRegion".to_string(),
|
3692 - | bucket_arn.region().to_owned().into(),
|
3693 - | );
|
3694 - | out
|
3695 - | })],
|
3696 - | )
|
3697 - | .build());
|
3698 - | }
|
3699 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
3700 - | .url({
|
3701 - | let mut out = String::new();
|
3702 - | out.push_str("https://");
|
3703 - | #[allow(clippy::needless_borrow)]
|
3704 - | out.push_str(&access_point_name.as_ref() as &str);
|
3705 - | out.push('-');
|
3706 - | #[allow(clippy::needless_borrow)]
|
3707 - | out.push_str(&bucket_arn.account_id());
|
3708 - | out.push_str(".s3-object-lambda.");
|
3709 - | #[allow(clippy::needless_borrow)]
|
3710 - | out.push_str(&bucket_arn.region());
|
3711 - | out.push('.');
|
3712 - | #[allow(clippy::needless_borrow)]
|
3713 - | out.push_str(&bucket_partition.dns_suffix());
|
3714 - | out
|
3715 - | })
|
3716 - | .property(
|
3717 - | "authSchemes",
|
3718 - | vec![::aws_smithy_types::Document::from({
|
3719 - | let mut out = ::std::collections::HashMap::<
|
3720 - | String,
|
3721 - | ::aws_smithy_types::Document,
|
3722 - | >::new(
|
3723 - | );
|
3724 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3725 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3726 - | out.insert(
|
3727 - | "signingName".to_string(),
|
3728 - | "s3-object-lambda".to_string().into(),
|
3729 - | );
|
3730 - | out.insert(
|
3731 - | "signingRegion".to_string(),
|
3732 - | bucket_arn.region().to_owned().into(),
|
3733 - | );
|
3734 - | out
|
3735 - | })],
|
3736 - | )
|
3737 - | .build());
|
3738 - | }
|
3739 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
3740 - | let mut out = String::new();
|
3741 - | out.push_str("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
3742 - | #[allow(clippy::needless_borrow)]
|
3743 - | out.push_str(&access_point_name.as_ref() as &str);
|
3744 - | out.push('`');
|
3745 - | out
|
3746 - | }));
|
3747 - | }
|
3748 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
3749 - | let mut out = String::new();
|
3750 - | out.push_str("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
3751 - | #[allow(clippy::needless_borrow)]
|
3752 - | out.push_str(&bucket_arn.account_id());
|
3753 - | out.push('`');
|
3754 - | out
|
3755 - | }));
|
3756 - | }
|
3757 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
3758 - | let mut out = String::new();
|
3759 - | out.push_str("Invalid region in ARN: `");
|
3760 - | #[allow(clippy::needless_borrow)]
|
3761 - | out.push_str(&bucket_arn.region());
|
3762 - | out.push_str("` (invalid DNS name)");
|
3763 - | out
|
3764 - | }));
|
3765 - | }
|
3766 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
3767 - | let mut out = String::new();
|
3768 - | out.push_str("Client was configured for partition `");
|
3769 - | #[allow(clippy::needless_borrow)]
|
3770 - | out.push_str(&partition_result.name());
|
3771 - | out.push_str("` but ARN (`");
|
3772 - | #[allow(clippy::needless_borrow)]
|
3773 - | out.push_str(&bucket.as_ref() as &str);
|
3774 - | out.push_str("`) has `");
|
3775 - | #[allow(clippy::needless_borrow)]
|
3776 - | out.push_str(&bucket_partition.name());
|
3777 - | out.push('`');
|
3778 - | out
|
3779 - | }));
|
3780 - | }
|
3781 - | #[allow(unreachable_code)]
|
3782 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
3783 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
3784 - | )));
|
3785 - | }
|
3786 - | #[allow(unreachable_code)]
|
3787 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
3788 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
3789 - | )));
|
3790 - | }
|
3791 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3792 - | "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
|
3793 - | .to_string(),
|
3794 - | ));
|
3795 - | }
|
3796 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3797 - | "Invalid ARN: bucket ARN is missing a region".to_string(),
|
3798 - | ));
|
3799 - | }
|
3800 - | }
|
3801 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3802 - | "Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided"
|
3803 - | .to_string(),
|
3804 - | ));
|
3805 - | }
|
3806 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
3807 - | let mut out = String::new();
|
3808 - | out.push_str("Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `");
|
3809 - | #[allow(clippy::needless_borrow)]
|
3810 - | out.push_str(&arn_type.as_ref() as &str);
|
3811 - | out.push('`');
|
3812 - | out
|
3813 - | }));
|
3814 - | }
|
3815 - | if (arn_type.as_ref() as &str) == ("accesspoint") {
|
3816 - | #[allow(unused_variables)]
|
3817 - | if let Some(access_point_name) = bucket_arn.resource_id().get(1).cloned() {
|
3818 - | if !((access_point_name.as_ref() as &str) == ("")) {
|
3819 - | if !((bucket_arn.region()) == ("")) {
|
3820 - | if (arn_type.as_ref() as &str) == ("accesspoint") {
|
3821 - | if !((bucket_arn.region()) == ("")) {
|
3822 - | #[allow(unused_variables)]
|
3823 - | if let Some(disable_access_points) = disable_access_points {
|
3824 - | if (*disable_access_points) == (true) {
|
3825 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
3826 - | "Access points are not supported for this operation".to_string(),
|
3827 - | ));
|
3828 - | }
|
3829 - | }
|
3830 - | if !(bucket_arn.resource_id().get(2).cloned().is_some()) {
|
3831 - | #[allow(unused_variables)]
|
3832 - | if let Some(use_arn_region) = use_arn_region {
|
3833 - | if (*use_arn_region) == (false) {
|
3834 - | if !((bucket_arn.region()) == (region.as_ref() as &str)) {
|
3835 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
3836 - | let mut out = String::new();
|
3837 - | out.push_str("Invalid configuration: region from ARN `");
|
3838 - | #[allow(clippy::needless_borrow)]
|
3839 - | out.push_str(&bucket_arn.region());
|
3840 - | out.push_str("` does not match client region `");
|
3841 - | #[allow(clippy::needless_borrow)]
|
3842 - | out.push_str(®ion.as_ref() as &str);
|
3843 - | out.push_str("` and UseArnRegion is `false`");
|
3844 - | out
|
3845 - | }));
|
3846 - | }
|
3847 - | }
|
3848 - | }
|
3849 - | #[allow(unused_variables)]
|
3850 - | if let Some(bucket_partition) =
|
3851 - | partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector)
|
3852 - | {
|
3853 - | #[allow(unused_variables)]
|
3854 - | if let Some(partition_result) =
|
3855 - | partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
|
3856 - | {
|
3857 - | if (bucket_partition.name()) == (partition_result.name()) {
|
3858 - | if crate::endpoint_lib::host::is_valid_host_label(
|
3859 - | bucket_arn.region(),
|
3860 - | true,
|
3861 - | _diagnostic_collector,
|
3862 - | ) {
|
3863 - | if (bucket_arn.service()) == ("s3") {
|
3864 - | if crate::endpoint_lib::host::is_valid_host_label(
|
3865 - | bucket_arn.account_id(),
|
3866 - | false,
|
3867 - | _diagnostic_collector,
|
3868 - | ) {
|
3869 - | if crate::endpoint_lib::host::is_valid_host_label(
|
3870 - | access_point_name.as_ref() as &str,
|
3871 - | false,
|
3872 - | _diagnostic_collector,
|
3873 - | ) {
|
3874 - | if (*accelerate) == (true) {
|
3875 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message("Access Points do not support S3 Accelerate"
|
3876 - | .to_string()));
|
3877 - | }
|
3878 - | if (*use_fips) == (true) {
|
3879 - | if (*use_dual_stack) == (true) {
|
3880 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
3881 - | out.push_str("https://");
|
3882 - | #[allow(clippy::needless_borrow)]
|
3883 - | out.push_str(&access_point_name.as_ref() as &str);
|
3884 - | out.push('-');
|
3885 - | #[allow(clippy::needless_borrow)]
|
3886 - | out.push_str(&bucket_arn.account_id());
|
3887 - | out.push_str(".s3-accesspoint-fips.dualstack.");
|
3888 - | #[allow(clippy::needless_borrow)]
|
3889 - | out.push_str(&bucket_arn.region());
|
3890 - | out.push('.');
|
3891 - | #[allow(clippy::needless_borrow)]
|
3892 - | out.push_str(&bucket_partition.dns_suffix());
|
3893 - | out })
|
3894 - | .property("authSchemes", vec![::aws_smithy_types::Document::from( {
|
3895 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3896 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3897 - | out.insert("name".to_string(), "sigv4"
|
3898 - | .to_string().into());
|
3899 - | out.insert("signingName".to_string(), "s3"
|
3900 - | .to_string().into());
|
3901 - | out.insert("signingRegion".to_string(), bucket_arn.region()
|
3902 - | .to_owned().into());
|
3903 - | out
|
3904 - | }),])
|
3905 - | .build());
|
3906 - | }
|
3907 - | }
|
3908 - | if (*use_fips) == (true) {
|
3909 - | if (*use_dual_stack) == (false) {
|
3910 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
3911 - | out.push_str("https://");
|
3912 - | #[allow(clippy::needless_borrow)]
|
3913 - | out.push_str(&access_point_name.as_ref() as &str);
|
3914 - | out.push('-');
|
3915 - | #[allow(clippy::needless_borrow)]
|
3916 - | out.push_str(&bucket_arn.account_id());
|
3917 - | out.push_str(".s3-accesspoint-fips.");
|
3918 - | #[allow(clippy::needless_borrow)]
|
3919 - | out.push_str(&bucket_arn.region());
|
3920 - | out.push('.');
|
3921 - | #[allow(clippy::needless_borrow)]
|
3922 - | out.push_str(&bucket_partition.dns_suffix());
|
3923 - | out })
|
3924 - | .property("authSchemes", vec![::aws_smithy_types::Document::from( {
|
3925 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3926 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3927 - | out.insert("name".to_string(), "sigv4"
|
3928 - | .to_string().into());
|
3929 - | out.insert("signingName".to_string(), "s3"
|
3930 - | .to_string().into());
|
3931 - | out.insert("signingRegion".to_string(), bucket_arn.region()
|
3932 - | .to_owned().into());
|
3933 - | out
|
3934 - | }),])
|
3935 - | .build());
|
3936 - | }
|
3937 - | }
|
3938 - | if (*use_fips) == (false) {
|
3939 - | if (*use_dual_stack) == (true) {
|
3940 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
3941 - | out.push_str("https://");
|
3942 - | #[allow(clippy::needless_borrow)]
|
3943 - | out.push_str(&access_point_name.as_ref() as &str);
|
3944 - | out.push('-');
|
3945 - | #[allow(clippy::needless_borrow)]
|
3946 - | out.push_str(&bucket_arn.account_id());
|
3947 - | out.push_str(".s3-accesspoint.dualstack.");
|
3948 - | #[allow(clippy::needless_borrow)]
|
3949 - | out.push_str(&bucket_arn.region());
|
3950 - | out.push('.');
|
3951 - | #[allow(clippy::needless_borrow)]
|
3952 - | out.push_str(&bucket_partition.dns_suffix());
|
3953 - | out })
|
3954 - | .property("authSchemes", vec![::aws_smithy_types::Document::from( {
|
3955 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3956 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3957 - | out.insert("name".to_string(), "sigv4"
|
3958 - | .to_string().into());
|
3959 - | out.insert("signingName".to_string(), "s3"
|
3960 - | .to_string().into());
|
3961 - | out.insert("signingRegion".to_string(), bucket_arn.region()
|
3962 - | .to_owned().into());
|
3963 - | out
|
3964 - | }),])
|
3965 - | .build());
|
3966 - | }
|
3967 - | }
|
3968 - | if (*use_fips) == (false) {
|
3969 - | if (*use_dual_stack) == (false) {
|
3970 - | #[allow(unused_variables)]
|
3971 - | if let Some(endpoint) = endpoint {
|
3972 - | #[allow(unused_variables)]
|
3973 - | if let Some(url) =
|
3974 - | crate::endpoint_lib::parse_url::parse_url(
|
3975 - | endpoint.as_ref() as &str,
|
3976 - | _diagnostic_collector,
|
3977 - | )
|
3978 - | {
|
3979 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
3980 - | #[allow(clippy::needless_borrow)]
|
3981 - | out.push_str(&url.scheme());
|
3982 - | out.push_str("://");
|
3983 - | #[allow(clippy::needless_borrow)]
|
3984 - | out.push_str(&access_point_name.as_ref() as &str);
|
3985 - | out.push('-');
|
3986 - | #[allow(clippy::needless_borrow)]
|
3987 - | out.push_str(&bucket_arn.account_id());
|
3988 - | out.push('.');
|
3989 - | #[allow(clippy::needless_borrow)]
|
3990 - | out.push_str(&url.authority());
|
3991 - | #[allow(clippy::needless_borrow)]
|
3992 - | out.push_str(&url.path());
|
3993 - | out })
|
3994 - | .property("authSchemes", vec![::aws_smithy_types::Document::from( {
|
3995 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3996 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
3997 - | out.insert("name".to_string(), "sigv4"
|
3998 - | .to_string().into());
|
3999 - | out.insert("signingName".to_string(), "s3"
|
4000 - | .to_string().into());
|
4001 - | out.insert("signingRegion".to_string(), bucket_arn.region()
|
4002 - | .to_owned().into());
|
4003 - | out
|
4004 - | }),])
|
4005 - | .build());
|
4006 - | }
|
4007 - | }
|
4008 - | }
|
4009 - | }
|
4010 - | if (*use_fips) == (false) {
|
4011 - | if (*use_dual_stack) == (false) {
|
4012 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
4013 - | out.push_str("https://");
|
4014 - | #[allow(clippy::needless_borrow)]
|
4015 - | out.push_str(&access_point_name.as_ref() as &str);
|
4016 - | out.push('-');
|
4017 - | #[allow(clippy::needless_borrow)]
|
4018 - | out.push_str(&bucket_arn.account_id());
|
4019 - | out.push_str(".s3-accesspoint.");
|
4020 - | #[allow(clippy::needless_borrow)]
|
4021 - | out.push_str(&bucket_arn.region());
|
4022 - | out.push('.');
|
4023 - | #[allow(clippy::needless_borrow)]
|
4024 - | out.push_str(&bucket_partition.dns_suffix());
|
4025 - | out })
|
4026 - | .property("authSchemes", vec![::aws_smithy_types::Document::from( {
|
4027 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4028 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4029 - | out.insert("name".to_string(), "sigv4"
|
4030 - | .to_string().into());
|
4031 - | out.insert("signingName".to_string(), "s3"
|
4032 - | .to_string().into());
|
4033 - | out.insert("signingRegion".to_string(), bucket_arn.region()
|
4034 - | .to_owned().into());
|
4035 - | out
|
4036 - | }),])
|
4037 - | .build());
|
4038 - | }
|
4039 - | }
|
4040 - | #[allow(unreachable_code)]
|
4041 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!("No rules matched these parameters. This is a bug. {_params:?}")));
|
4042 - | }
|
4043 - | return Err(
|
4044 - | ::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4045 - | let mut out = String::new();
|
4046 - | out.push_str("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
4047 - | #[allow(clippy::needless_borrow)]
|
4048 - | out.push_str(&access_point_name.as_ref() as &str);
|
4049 - | out.push('`');
|
4050 - | out
|
4051 - | }),
|
4052 - | );
|
4053 - | }
|
4054 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4055 - | {
|
4056 - | let mut out = String::new();
|
4057 - | out.push_str("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
4058 - | #[allow(clippy::needless_borrow)]
|
4059 - | out.push_str(&bucket_arn.account_id());
|
4060 - | out.push('`');
|
4061 - | out
|
4062 - | },
|
4063 - | ));
|
4064 - | }
|
4065 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4066 - | let mut out = String::new();
|
4067 - | out.push_str("Invalid ARN: The ARN was not for the S3 service, found: ");
|
4068 - | #[allow(clippy::needless_borrow)]
|
4069 - | out.push_str(&bucket_arn.service());
|
4070 - | out
|
4071 - | }));
|
4072 - | }
|
4073 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4074 - | let mut out = String::new();
|
4075 - | out.push_str("Invalid region in ARN: `");
|
4076 - | #[allow(clippy::needless_borrow)]
|
4077 - | out.push_str(&bucket_arn.region());
|
4078 - | out.push_str("` (invalid DNS name)");
|
4079 - | out
|
4080 - | }));
|
4081 - | }
|
4082 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4083 - | let mut out = String::new();
|
4084 - | out.push_str("Client was configured for partition `");
|
4085 - | #[allow(clippy::needless_borrow)]
|
4086 - | out.push_str(&partition_result.name());
|
4087 - | out.push_str("` but ARN (`");
|
4088 - | #[allow(clippy::needless_borrow)]
|
4089 - | out.push_str(&bucket.as_ref() as &str);
|
4090 - | out.push_str("`) has `");
|
4091 - | #[allow(clippy::needless_borrow)]
|
4092 - | out.push_str(&bucket_partition.name());
|
4093 - | out.push('`');
|
4094 - | out
|
4095 - | }));
|
4096 - | }
|
4097 - | #[allow(unreachable_code)]
|
4098 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
4099 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
4100 - | )));
|
4101 - | }
|
4102 - | #[allow(unreachable_code)]
|
4103 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
4104 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
4105 - | )));
|
4106 - | }
|
4107 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4108 - | "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
|
4109 - | .to_string(),
|
4110 - | ));
|
4111 - | }
|
4112 - | #[allow(unreachable_code)]
|
4113 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
4114 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
4115 - | )));
|
4116 - | }
|
4117 - | #[allow(unreachable_code)]
|
4118 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
4119 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
4120 - | )));
|
4121 - | }
|
4122 - | if crate::endpoint_lib::host::is_valid_host_label(
|
4123 - | access_point_name.as_ref() as &str,
|
4124 - | true,
|
4125 - | _diagnostic_collector,
|
4126 - | ) {
|
4127 - | if (*use_dual_stack) == (true) {
|
4128 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4129 - | "S3 MRAP does not support dual-stack".to_string(),
|
4130 - | ));
|
4131 - | }
|
4132 - | if (*use_fips) == (true) {
|
4133 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4134 - | "S3 MRAP does not support FIPS".to_string(),
|
4135 - | ));
|
4136 - | }
|
4137 - | if (*accelerate) == (true) {
|
4138 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4139 - | "S3 MRAP does not support S3 Accelerate".to_string(),
|
4140 - | ));
|
4141 - | }
|
4142 - | if (*disable_multi_region_access_points) == (true) {
|
4143 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4144 - | "Invalid configuration: Multi-Region Access Point ARNs are disabled.".to_string(),
|
4145 - | ));
|
4146 - | }
|
4147 - | #[allow(unused_variables)]
|
4148 - | if let Some(mrap_partition) =
|
4149 - | partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
|
4150 - | {
|
4151 - | if (mrap_partition.name()) == (bucket_arn.partition()) {
|
4152 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4153 - | .url({
|
4154 - | let mut out = String::new();
|
4155 - | out.push_str("https://");
|
4156 - | #[allow(clippy::needless_borrow)]
|
4157 - | out.push_str(&access_point_name.as_ref() as &str);
|
4158 - | out.push_str(".accesspoint.s3-global.");
|
4159 - | #[allow(clippy::needless_borrow)]
|
4160 - | out.push_str(&mrap_partition.dns_suffix());
|
4161 - | out
|
4162 - | })
|
4163 - | .property(
|
4164 - | "authSchemes",
|
4165 - | vec![::aws_smithy_types::Document::from({
|
4166 - | let mut out =
|
4167 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4168 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4169 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
4170 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4171 - | out.insert(
|
4172 - | "signingRegionSet".to_string(),
|
4173 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
4174 - | );
|
4175 - | out
|
4176 - | })],
|
4177 - | )
|
4178 - | .build());
|
4179 - | }
|
4180 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4181 - | let mut out = String::new();
|
4182 - | out.push_str("Client was configured for partition `");
|
4183 - | #[allow(clippy::needless_borrow)]
|
4184 - | out.push_str(&mrap_partition.name());
|
4185 - | out.push_str("` but bucket referred to partition `");
|
4186 - | #[allow(clippy::needless_borrow)]
|
4187 - | out.push_str(&bucket_arn.partition());
|
4188 - | out.push('`');
|
4189 - | out
|
4190 - | }));
|
4191 - | }
|
4192 - | #[allow(unreachable_code)]
|
4193 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
4194 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
4195 - | )));
|
4196 - | }
|
4197 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4198 - | "Invalid Access Point Name".to_string(),
|
4199 - | ));
|
4200 - | }
|
4201 - | }
|
4202 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4203 - | "Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided"
|
4204 - | .to_string(),
|
4205 - | ));
|
4206 - | }
|
4207 - | if (bucket_arn.service()) == ("s3-outposts") {
|
4208 - | if (*use_dual_stack) == (true) {
|
4209 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4210 - | "S3 Outposts does not support Dual-stack".to_string(),
|
4211 - | ));
|
4212 - | }
|
4213 - | if (*use_fips) == (true) {
|
4214 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4215 - | "S3 Outposts does not support FIPS".to_string(),
|
4216 - | ));
|
4217 - | }
|
4218 - | if (*accelerate) == (true) {
|
4219 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4220 - | "S3 Outposts does not support S3 Accelerate".to_string(),
|
4221 - | ));
|
4222 - | }
|
4223 - | #[allow(unused_variables)]
|
4224 - | if let Some(_) = bucket_arn.resource_id().get(4).cloned() {
|
4225 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4226 - | "Invalid Arn: Outpost Access Point ARN contains sub resources".to_string(),
|
4227 - | ));
|
4228 - | }
|
4229 - | #[allow(unused_variables)]
|
4230 - | if let Some(outpost_id) = bucket_arn.resource_id().get(1).cloned() {
|
4231 - | if crate::endpoint_lib::host::is_valid_host_label(outpost_id.as_ref() as &str, false, _diagnostic_collector) {
|
4232 - | #[allow(unused_variables)]
|
4233 - | if let Some(use_arn_region) = use_arn_region {
|
4234 - | if (*use_arn_region) == (false) {
|
4235 - | if !((bucket_arn.region()) == (region.as_ref() as &str)) {
|
4236 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4237 - | let mut out = String::new();
|
4238 - | out.push_str("Invalid configuration: region from ARN `");
|
4239 - | #[allow(clippy::needless_borrow)]
|
4240 - | out.push_str(&bucket_arn.region());
|
4241 - | out.push_str("` does not match client region `");
|
4242 - | #[allow(clippy::needless_borrow)]
|
4243 - | out.push_str(®ion.as_ref() as &str);
|
4244 - | out.push_str("` and UseArnRegion is `false`");
|
4245 - | out
|
4246 - | }));
|
4247 - | }
|
4248 - | }
|
4249 - | }
|
4250 - | #[allow(unused_variables)]
|
4251 - | if let Some(bucket_partition) =
|
4252 - | partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector)
|
4253 - | {
|
4254 - | #[allow(unused_variables)]
|
4255 - | if let Some(partition_result) =
|
4256 - | partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
|
4257 - | {
|
4258 - | if (bucket_partition.name()) == (partition_result.name()) {
|
4259 - | if crate::endpoint_lib::host::is_valid_host_label(
|
4260 - | bucket_arn.region(),
|
4261 - | true,
|
4262 - | _diagnostic_collector,
|
4263 - | ) {
|
4264 - | if crate::endpoint_lib::host::is_valid_host_label(
|
4265 - | bucket_arn.account_id(),
|
4266 - | false,
|
4267 - | _diagnostic_collector,
|
4268 - | ) {
|
4269 - | #[allow(unused_variables)]
|
4270 - | if let Some(outpost_type) = bucket_arn.resource_id().get(2).cloned() {
|
4271 - | #[allow(unused_variables)]
|
4272 - | if let Some(access_point_name) = bucket_arn.resource_id().get(3).cloned() {
|
4273 - | if (outpost_type.as_ref() as &str) == ("accesspoint") {
|
4274 - | #[allow(unused_variables)]
|
4275 - | if let Some(endpoint) = endpoint {
|
4276 - | #[allow(unused_variables)]
|
4277 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
|
4278 - | endpoint.as_ref() as &str,
|
4279 - | _diagnostic_collector,
|
4280 - | ) {
|
4281 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4282 - | .url({
|
4283 - | let mut out = String::new();
|
4284 - | out.push_str("https://");
|
4285 - | #[allow(clippy::needless_borrow)]
|
4286 - | out.push_str(&access_point_name.as_ref() as &str);
|
4287 - | out.push('-');
|
4288 - | #[allow(clippy::needless_borrow)]
|
4289 - | out.push_str(&bucket_arn.account_id());
|
4290 - | out.push('.');
|
4291 - | #[allow(clippy::needless_borrow)]
|
4292 - | out.push_str(&outpost_id.as_ref() as &str);
|
4293 - | out.push('.');
|
4294 - | #[allow(clippy::needless_borrow)]
|
4295 - | out.push_str(&url.authority());
|
4296 - | out
|
4297 - | })
|
4298 - | .property(
|
4299 - | "authSchemes",
|
4300 - | vec![
|
4301 - | ::aws_smithy_types::Document::from({
|
4302 - | let mut out = ::std::collections::HashMap::<
|
4303 - | String,
|
4304 - | ::aws_smithy_types::Document,
|
4305 - | >::new(
|
4306 - | );
|
4307 - | out.insert(
|
4308 - | "disableDoubleEncoding".to_string(),
|
4309 - | true.into(),
|
4310 - | );
|
4311 - | out.insert(
|
4312 - | "name".to_string(),
|
4313 - | "sigv4a".to_string().into(),
|
4314 - | );
|
4315 - | out.insert(
|
4316 - | "signingName".to_string(),
|
4317 - | "s3-outposts".to_string().into(),
|
4318 - | );
|
4319 - | out.insert(
|
4320 - | "signingRegionSet".to_string(),
|
4321 - | vec![::aws_smithy_types::Document::from(
|
4322 - | "*".to_string(),
|
4323 - | )]
|
4324 - | .into(),
|
4325 - | );
|
4326 - | out
|
4327 - | }),
|
4328 - | ::aws_smithy_types::Document::from({
|
4329 - | let mut out = ::std::collections::HashMap::<
|
4330 - | String,
|
4331 - | ::aws_smithy_types::Document,
|
4332 - | >::new(
|
4333 - | );
|
4334 - | out.insert(
|
4335 - | "disableDoubleEncoding".to_string(),
|
4336 - | true.into(),
|
4337 - | );
|
4338 - | out.insert(
|
4339 - | "name".to_string(),
|
4340 - | "sigv4".to_string().into(),
|
4341 - | );
|
4342 - | out.insert(
|
4343 - | "signingName".to_string(),
|
4344 - | "s3-outposts".to_string().into(),
|
4345 - | );
|
4346 - | out.insert(
|
4347 - | "signingRegion".to_string(),
|
4348 - | bucket_arn.region().to_owned().into(),
|
4349 - | );
|
4350 - | out
|
4351 - | }),
|
4352 - | ],
|
4353 - | )
|
4354 - | .build());
|
4355 - | }
|
4356 - | }
|
4357 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4358 - | .url({
|
4359 - | let mut out = String::new();
|
4360 - | out.push_str("https://");
|
4361 - | #[allow(clippy::needless_borrow)]
|
4362 - | out.push_str(&access_point_name.as_ref() as &str);
|
4363 - | out.push('-');
|
4364 - | #[allow(clippy::needless_borrow)]
|
4365 - | out.push_str(&bucket_arn.account_id());
|
4366 - | out.push('.');
|
4367 - | #[allow(clippy::needless_borrow)]
|
4368 - | out.push_str(&outpost_id.as_ref() as &str);
|
4369 - | out.push_str(".s3-outposts.");
|
4370 - | #[allow(clippy::needless_borrow)]
|
4371 - | out.push_str(&bucket_arn.region());
|
4372 - | out.push('.');
|
4373 - | #[allow(clippy::needless_borrow)]
|
4374 - | out.push_str(&bucket_partition.dns_suffix());
|
4375 - | out
|
4376 - | })
|
4377 - | .property(
|
4378 - | "authSchemes",
|
4379 - | vec![
|
4380 - | ::aws_smithy_types::Document::from({
|
4381 - | let mut out = ::std::collections::HashMap::<
|
4382 - | String,
|
4383 - | ::aws_smithy_types::Document,
|
4384 - | >::new(
|
4385 - | );
|
4386 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4387 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
4388 - | out.insert(
|
4389 - | "signingName".to_string(),
|
4390 - | "s3-outposts".to_string().into(),
|
4391 - | );
|
4392 - | out.insert(
|
4393 - | "signingRegionSet".to_string(),
|
4394 - | vec![::aws_smithy_types::Document::from("*".to_string())]
|
4395 - | .into(),
|
4396 - | );
|
4397 - | out
|
4398 - | }),
|
4399 - | ::aws_smithy_types::Document::from({
|
4400 - | let mut out = ::std::collections::HashMap::<
|
4401 - | String,
|
4402 - | ::aws_smithy_types::Document,
|
4403 - | >::new(
|
4404 - | );
|
4405 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4406 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4407 - | out.insert(
|
4408 - | "signingName".to_string(),
|
4409 - | "s3-outposts".to_string().into(),
|
4410 - | );
|
4411 - | out.insert(
|
4412 - | "signingRegion".to_string(),
|
4413 - | bucket_arn.region().to_owned().into(),
|
4414 - | );
|
4415 - | out
|
4416 - | }),
|
4417 - | ],
|
4418 - | )
|
4419 - | .build());
|
4420 - | }
|
4421 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4422 - | let mut out = String::new();
|
4423 - | out.push_str("Expected an outpost type `accesspoint`, found ");
|
4424 - | #[allow(clippy::needless_borrow)]
|
4425 - | out.push_str(&outpost_type.as_ref() as &str);
|
4426 - | out
|
4427 - | }));
|
4428 - | }
|
4429 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4430 - | "Invalid ARN: expected an access point name".to_string(),
|
4431 - | ));
|
4432 - | }
|
4433 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4434 - | "Invalid ARN: Expected a 4-component resource".to_string(),
|
4435 - | ));
|
4436 - | }
|
4437 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4438 - | let mut out = String::new();
|
4439 - | out.push_str(
|
4440 - | "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `",
|
4441 - | );
|
4442 - | #[allow(clippy::needless_borrow)]
|
4443 - | out.push_str(&bucket_arn.account_id());
|
4444 - | out.push('`');
|
4445 - | out
|
4446 - | }));
|
4447 - | }
|
4448 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4449 - | let mut out = String::new();
|
4450 - | out.push_str("Invalid region in ARN: `");
|
4451 - | #[allow(clippy::needless_borrow)]
|
4452 - | out.push_str(&bucket_arn.region());
|
4453 - | out.push_str("` (invalid DNS name)");
|
4454 - | out
|
4455 - | }));
|
4456 - | }
|
4457 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4458 - | let mut out = String::new();
|
4459 - | out.push_str("Client was configured for partition `");
|
4460 - | #[allow(clippy::needless_borrow)]
|
4461 - | out.push_str(&partition_result.name());
|
4462 - | out.push_str("` but ARN (`");
|
4463 - | #[allow(clippy::needless_borrow)]
|
4464 - | out.push_str(&bucket.as_ref() as &str);
|
4465 - | out.push_str("`) has `");
|
4466 - | #[allow(clippy::needless_borrow)]
|
4467 - | out.push_str(&bucket_partition.name());
|
4468 - | out.push('`');
|
4469 - | out
|
4470 - | }));
|
4471 - | }
|
4472 - | #[allow(unreachable_code)]
|
4473 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
4474 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
4475 - | )));
|
4476 - | }
|
4477 - | #[allow(unreachable_code)]
|
4478 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
4479 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
4480 - | )));
|
4481 - | }
|
4482 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4483 - | let mut out = String::new();
|
4484 - | out.push_str("Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
4485 - | #[allow(clippy::needless_borrow)]
|
4486 - | out.push_str(&outpost_id.as_ref() as &str);
|
4487 - | out.push('`');
|
4488 - | out
|
4489 - | }));
|
4490 - | }
|
4491 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4492 - | "Invalid ARN: The Outpost Id was not set".to_string(),
|
4493 - | ));
|
4494 - | }
|
4495 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4496 - | let mut out = String::new();
|
4497 - | out.push_str("Invalid ARN: Unrecognized format: ");
|
4498 - | #[allow(clippy::needless_borrow)]
|
4499 - | out.push_str(&bucket.as_ref() as &str);
|
4500 - | out.push_str(" (type: ");
|
4501 - | #[allow(clippy::needless_borrow)]
|
4502 - | out.push_str(&arn_type.as_ref() as &str);
|
4503 - | out.push(')');
|
4504 - | out
|
4505 - | }));
|
4506 - | }
|
4507 - | }
|
4508 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4509 - | "Invalid ARN: No ARN type specified".to_string(),
|
4510 - | ));
|
4511 - | }
|
4512 - | }
|
4513 - | #[allow(unused_variables)]
|
4514 - | if let Some(arn_prefix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 4, false, _diagnostic_collector) {
|
4515 - | if (arn_prefix.as_ref() as &str) == ("arn:") {
|
4516 - | if !(crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector).is_some()) {
|
4517 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
4518 - | let mut out = String::new();
|
4519 - | out.push_str("Invalid ARN: `");
|
4520 - | #[allow(clippy::needless_borrow)]
|
4521 - | out.push_str(&bucket.as_ref() as &str);
|
4522 - | out.push_str("` was not a valid ARN");
|
4523 - | out
|
4524 - | }));
|
4525 - | }
|
4526 - | }
|
4527 - | }
|
4528 - | if (*force_path_style) == (true) {
|
4529 - | #[allow(unused_variables)]
|
4530 - | if let Some(_) = crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector) {
|
4531 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
4532 - | "Path-style addressing cannot be used with ARN buckets".to_string(),
|
4533 - | ));
|
4534 - | }
|
4535 - | }
|
4536 - | let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
|
4537 - | #[allow(unused_variables)]
|
4538 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
4539 - | if (*accelerate) == (false) {
|
4540 - | if (*use_dual_stack) == (true) {
|
4541 - | if !(endpoint.is_some()) {
|
4542 - | if (*use_fips) == (true) {
|
4543 - | if (region.as_ref() as &str) == ("aws-global") {
|
4544 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4545 - | .url({
|
4546 - | let mut out = String::new();
|
4547 - | out.push_str("https://s3-fips.dualstack.us-east-1.");
|
4548 - | #[allow(clippy::needless_borrow)]
|
4549 - | out.push_str(&partition_result.dns_suffix());
|
4550 - | out.push('/');
|
4551 - | #[allow(clippy::needless_borrow)]
|
4552 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4553 - | out
|
4554 - | })
|
4555 - | .property(
|
4556 - | "authSchemes",
|
4557 - | vec![::aws_smithy_types::Document::from({
|
4558 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4559 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4560 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4561 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4562 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4563 - | out
|
4564 - | })],
|
4565 - | )
|
4566 - | .build());
|
4567 - | }
|
4568 - | }
|
4569 - | }
|
4570 - | }
|
4571 - | if (*use_dual_stack) == (true) {
|
4572 - | if !(endpoint.is_some()) {
|
4573 - | if (*use_fips) == (true) {
|
4574 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
4575 - | if (*use_global_endpoint) == (true) {
|
4576 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4577 - | .url({
|
4578 - | let mut out = String::new();
|
4579 - | out.push_str("https://s3-fips.dualstack.");
|
4580 - | #[allow(clippy::needless_borrow)]
|
4581 - | out.push_str(®ion.as_ref() as &str);
|
4582 - | out.push('.');
|
4583 - | #[allow(clippy::needless_borrow)]
|
4584 - | out.push_str(&partition_result.dns_suffix());
|
4585 - | out.push('/');
|
4586 - | #[allow(clippy::needless_borrow)]
|
4587 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4588 - | out
|
4589 - | })
|
4590 - | .property(
|
4591 - | "authSchemes",
|
4592 - | vec![::aws_smithy_types::Document::from({
|
4593 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4594 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4595 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4596 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4597 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
4598 - | out
|
4599 - | })],
|
4600 - | )
|
4601 - | .build());
|
4602 - | }
|
4603 - | }
|
4604 - | }
|
4605 - | }
|
4606 - | }
|
4607 - | if (*use_dual_stack) == (true) {
|
4608 - | if !(endpoint.is_some()) {
|
4609 - | if (*use_fips) == (true) {
|
4610 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
4611 - | if (*use_global_endpoint) == (false) {
|
4612 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4613 - | .url({
|
4614 - | let mut out = String::new();
|
4615 - | out.push_str("https://s3-fips.dualstack.");
|
4616 - | #[allow(clippy::needless_borrow)]
|
4617 - | out.push_str(®ion.as_ref() as &str);
|
4618 - | out.push('.');
|
4619 - | #[allow(clippy::needless_borrow)]
|
4620 - | out.push_str(&partition_result.dns_suffix());
|
4621 - | out.push('/');
|
4622 - | #[allow(clippy::needless_borrow)]
|
4623 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4624 - | out
|
4625 - | })
|
4626 - | .property(
|
4627 - | "authSchemes",
|
4628 - | vec![::aws_smithy_types::Document::from({
|
4629 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4630 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4631 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4632 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4633 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
4634 - | out
|
4635 - | })],
|
4636 - | )
|
4637 - | .build());
|
4638 - | }
|
4639 - | }
|
4640 - | }
|
4641 - | }
|
4642 - | }
|
4643 - | if (*use_dual_stack) == (false) {
|
4644 - | if !(endpoint.is_some()) {
|
4645 - | if (*use_fips) == (true) {
|
4646 - | if (region.as_ref() as &str) == ("aws-global") {
|
4647 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4648 - | .url({
|
4649 - | let mut out = String::new();
|
4650 - | out.push_str("https://s3-fips.us-east-1.");
|
4651 - | #[allow(clippy::needless_borrow)]
|
4652 - | out.push_str(&partition_result.dns_suffix());
|
4653 - | out.push('/');
|
4654 - | #[allow(clippy::needless_borrow)]
|
4655 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4656 - | out
|
4657 - | })
|
4658 - | .property(
|
4659 - | "authSchemes",
|
4660 - | vec![::aws_smithy_types::Document::from({
|
4661 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4662 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4663 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4664 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4665 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4666 - | out
|
4667 - | })],
|
4668 - | )
|
4669 - | .build());
|
4670 - | }
|
4671 - | }
|
4672 - | }
|
4673 - | }
|
4674 - | if (*use_dual_stack) == (false) {
|
4675 - | if !(endpoint.is_some()) {
|
4676 - | if (*use_fips) == (true) {
|
4677 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
4678 - | if (*use_global_endpoint) == (true) {
|
4679 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4680 - | .url({
|
4681 - | let mut out = String::new();
|
4682 - | out.push_str("https://s3-fips.");
|
4683 - | #[allow(clippy::needless_borrow)]
|
4684 - | out.push_str(®ion.as_ref() as &str);
|
4685 - | out.push('.');
|
4686 - | #[allow(clippy::needless_borrow)]
|
4687 - | out.push_str(&partition_result.dns_suffix());
|
4688 - | out.push('/');
|
4689 - | #[allow(clippy::needless_borrow)]
|
4690 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4691 - | out
|
4692 - | })
|
4693 - | .property(
|
4694 - | "authSchemes",
|
4695 - | vec![::aws_smithy_types::Document::from({
|
4696 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4697 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4698 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4699 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4700 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
4701 - | out
|
4702 - | })],
|
4703 - | )
|
4704 - | .build());
|
4705 - | }
|
4706 - | }
|
4707 - | }
|
4708 - | }
|
4709 - | }
|
4710 - | if (*use_dual_stack) == (false) {
|
4711 - | if !(endpoint.is_some()) {
|
4712 - | if (*use_fips) == (true) {
|
4713 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
4714 - | if (*use_global_endpoint) == (false) {
|
4715 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4716 - | .url({
|
4717 - | let mut out = String::new();
|
4718 - | out.push_str("https://s3-fips.");
|
4719 - | #[allow(clippy::needless_borrow)]
|
4720 - | out.push_str(®ion.as_ref() as &str);
|
4721 - | out.push('.');
|
4722 - | #[allow(clippy::needless_borrow)]
|
4723 - | out.push_str(&partition_result.dns_suffix());
|
4724 - | out.push('/');
|
4725 - | #[allow(clippy::needless_borrow)]
|
4726 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4727 - | out
|
4728 - | })
|
4729 - | .property(
|
4730 - | "authSchemes",
|
4731 - | vec![::aws_smithy_types::Document::from({
|
4732 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4733 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4734 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4735 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4736 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
4737 - | out
|
4738 - | })],
|
4739 - | )
|
4740 - | .build());
|
4741 - | }
|
4742 - | }
|
4743 - | }
|
4744 - | }
|
4745 - | }
|
4746 - | if (*use_dual_stack) == (true) {
|
4747 - | if !(endpoint.is_some()) {
|
4748 - | if (*use_fips) == (false) {
|
4749 - | if (region.as_ref() as &str) == ("aws-global") {
|
4750 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4751 - | .url({
|
4752 - | let mut out = String::new();
|
4753 - | out.push_str("https://s3.dualstack.us-east-1.");
|
4754 - | #[allow(clippy::needless_borrow)]
|
4755 - | out.push_str(&partition_result.dns_suffix());
|
4756 - | out.push('/');
|
4757 - | #[allow(clippy::needless_borrow)]
|
4758 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4759 - | out
|
4760 - | })
|
4761 - | .property(
|
4762 - | "authSchemes",
|
4763 - | vec![::aws_smithy_types::Document::from({
|
4764 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4765 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4766 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4767 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4768 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4769 - | out
|
4770 - | })],
|
4771 - | )
|
4772 - | .build());
|
4773 - | }
|
4774 - | }
|
4775 - | }
|
4776 - | }
|
4777 - | if (*use_dual_stack) == (true) {
|
4778 - | if !(endpoint.is_some()) {
|
4779 - | if (*use_fips) == (false) {
|
4780 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
4781 - | if (*use_global_endpoint) == (true) {
|
4782 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4783 - | .url({
|
4784 - | let mut out = String::new();
|
4785 - | out.push_str("https://s3.dualstack.");
|
4786 - | #[allow(clippy::needless_borrow)]
|
4787 - | out.push_str(®ion.as_ref() as &str);
|
4788 - | out.push('.');
|
4789 - | #[allow(clippy::needless_borrow)]
|
4790 - | out.push_str(&partition_result.dns_suffix());
|
4791 - | out.push('/');
|
4792 - | #[allow(clippy::needless_borrow)]
|
4793 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4794 - | out
|
4795 - | })
|
4796 - | .property(
|
4797 - | "authSchemes",
|
4798 - | vec![::aws_smithy_types::Document::from({
|
4799 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4800 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4801 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4802 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4803 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
4804 - | out
|
4805 - | })],
|
4806 - | )
|
4807 - | .build());
|
4808 - | }
|
4809 - | }
|
4810 - | }
|
4811 - | }
|
4812 - | }
|
4813 - | if (*use_dual_stack) == (true) {
|
4814 - | if !(endpoint.is_some()) {
|
4815 - | if (*use_fips) == (false) {
|
4816 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
4817 - | if (*use_global_endpoint) == (false) {
|
4818 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4819 - | .url({
|
4820 - | let mut out = String::new();
|
4821 - | out.push_str("https://s3.dualstack.");
|
4822 - | #[allow(clippy::needless_borrow)]
|
4823 - | out.push_str(®ion.as_ref() as &str);
|
4824 - | out.push('.');
|
4825 - | #[allow(clippy::needless_borrow)]
|
4826 - | out.push_str(&partition_result.dns_suffix());
|
4827 - | out.push('/');
|
4828 - | #[allow(clippy::needless_borrow)]
|
4829 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4830 - | out
|
4831 - | })
|
4832 - | .property(
|
4833 - | "authSchemes",
|
4834 - | vec![::aws_smithy_types::Document::from({
|
4835 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4836 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4837 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4838 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4839 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
4840 - | out
|
4841 - | })],
|
4842 - | )
|
4843 - | .build());
|
4844 - | }
|
4845 - | }
|
4846 - | }
|
4847 - | }
|
4848 - | }
|
4849 - | if (*use_dual_stack) == (false) {
|
4850 - | #[allow(unused_variables)]
|
4851 - | if let Some(endpoint) = endpoint {
|
4852 - | #[allow(unused_variables)]
|
4853 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
4854 - | if (*use_fips) == (false) {
|
4855 - | if (region.as_ref() as &str) == ("aws-global") {
|
4856 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4857 - | .url({
|
4858 - | let mut out = String::new();
|
4859 - | #[allow(clippy::needless_borrow)]
|
4860 - | out.push_str(&url.scheme());
|
4861 - | out.push_str("://");
|
4862 - | #[allow(clippy::needless_borrow)]
|
4863 - | out.push_str(&url.authority());
|
4864 - | #[allow(clippy::needless_borrow)]
|
4865 - | out.push_str(&url.normalized_path());
|
4866 - | #[allow(clippy::needless_borrow)]
|
4867 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4868 - | out
|
4869 - | })
|
4870 - | .property(
|
4871 - | "authSchemes",
|
4872 - | vec![::aws_smithy_types::Document::from({
|
4873 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4874 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4875 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4876 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4877 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4878 - | out
|
4879 - | })],
|
4880 - | )
|
4881 - | .build());
|
4882 - | }
|
4883 - | }
|
4884 - | }
|
4885 - | }
|
4886 - | }
|
4887 - | if (*use_dual_stack) == (false) {
|
4888 - | #[allow(unused_variables)]
|
4889 - | if let Some(endpoint) = endpoint {
|
4890 - | #[allow(unused_variables)]
|
4891 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
4892 - | if (*use_fips) == (false) {
|
4893 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
4894 - | if (*use_global_endpoint) == (true) {
|
4895 - | if (region.as_ref() as &str) == ("us-east-1") {
|
4896 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4897 - | .url({
|
4898 - | let mut out = String::new();
|
4899 - | #[allow(clippy::needless_borrow)]
|
4900 - | out.push_str(&url.scheme());
|
4901 - | out.push_str("://");
|
4902 - | #[allow(clippy::needless_borrow)]
|
4903 - | out.push_str(&url.authority());
|
4904 - | #[allow(clippy::needless_borrow)]
|
4905 - | out.push_str(&url.normalized_path());
|
4906 - | #[allow(clippy::needless_borrow)]
|
4907 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4908 - | out
|
4909 - | })
|
4910 - | .property(
|
4911 - | "authSchemes",
|
4912 - | vec![::aws_smithy_types::Document::from({
|
4913 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4914 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4915 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4916 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4917 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
4918 - | out
|
4919 - | })],
|
4920 - | )
|
4921 - | .build());
|
4922 - | }
|
4923 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4924 - | .url({
|
4925 - | let mut out = String::new();
|
4926 - | #[allow(clippy::needless_borrow)]
|
4927 - | out.push_str(&url.scheme());
|
4928 - | out.push_str("://");
|
4929 - | #[allow(clippy::needless_borrow)]
|
4930 - | out.push_str(&url.authority());
|
4931 - | #[allow(clippy::needless_borrow)]
|
4932 - | out.push_str(&url.normalized_path());
|
4933 - | #[allow(clippy::needless_borrow)]
|
4934 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4935 - | out
|
4936 - | })
|
4937 - | .property(
|
4938 - | "authSchemes",
|
4939 - | vec![::aws_smithy_types::Document::from({
|
4940 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4941 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4942 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4943 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4944 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
4945 - | out
|
4946 - | })],
|
4947 - | )
|
4948 - | .build());
|
4949 - | }
|
4950 - | }
|
4951 - | }
|
4952 - | }
|
4953 - | }
|
4954 - | }
|
4955 - | if (*use_dual_stack) == (false) {
|
4956 - | #[allow(unused_variables)]
|
4957 - | if let Some(endpoint) = endpoint {
|
4958 - | #[allow(unused_variables)]
|
4959 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
4960 - | if (*use_fips) == (false) {
|
4961 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
4962 - | if (*use_global_endpoint) == (false) {
|
4963 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
4964 - | .url({
|
4965 - | let mut out = String::new();
|
4966 - | #[allow(clippy::needless_borrow)]
|
4967 - | out.push_str(&url.scheme());
|
4968 - | out.push_str("://");
|
4969 - | #[allow(clippy::needless_borrow)]
|
4970 - | out.push_str(&url.authority());
|
4971 - | #[allow(clippy::needless_borrow)]
|
4972 - | out.push_str(&url.normalized_path());
|
4973 - | #[allow(clippy::needless_borrow)]
|
4974 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
4975 - | out
|
4976 - | })
|
4977 - | .property(
|
4978 - | "authSchemes",
|
4979 - | vec![::aws_smithy_types::Document::from({
|
4980 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4981 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
4982 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4983 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
4984 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
4985 - | out
|
4986 - | })],
|
4987 - | )
|
4988 - | .build());
|
4989 - | }
|
4990 - | }
|
4991 - | }
|
4992 - | }
|
4993 - | }
|
4994 - | }
|
4995 - | if (*use_dual_stack) == (false) {
|
4996 - | if !(endpoint.is_some()) {
|
4997 - | if (*use_fips) == (false) {
|
4998 - | if (region.as_ref() as &str) == ("aws-global") {
|
4999 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5000 - | .url({
|
5001 - | let mut out = String::new();
|
5002 - | out.push_str("https://s3.");
|
5003 - | #[allow(clippy::needless_borrow)]
|
5004 - | out.push_str(&partition_result.dns_suffix());
|
5005 - | out.push('/');
|
5006 - | #[allow(clippy::needless_borrow)]
|
5007 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
5008 - | out
|
5009 - | })
|
5010 - | .property(
|
5011 - | "authSchemes",
|
5012 - | vec![::aws_smithy_types::Document::from({
|
5013 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5014 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5015 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5016 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5017 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
5018 - | out
|
5019 - | })],
|
5020 - | )
|
5021 - | .build());
|
5022 - | }
|
5023 - | }
|
5024 - | }
|
5025 - | }
|
5026 - | if (*use_dual_stack) == (false) {
|
5027 - | if !(endpoint.is_some()) {
|
5028 - | if (*use_fips) == (false) {
|
5029 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5030 - | if (*use_global_endpoint) == (true) {
|
5031 - | if (region.as_ref() as &str) == ("us-east-1") {
|
5032 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5033 - | .url({
|
5034 - | let mut out = String::new();
|
5035 - | out.push_str("https://s3.");
|
5036 - | #[allow(clippy::needless_borrow)]
|
5037 - | out.push_str(&partition_result.dns_suffix());
|
5038 - | out.push('/');
|
5039 - | #[allow(clippy::needless_borrow)]
|
5040 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
5041 - | out
|
5042 - | })
|
5043 - | .property(
|
5044 - | "authSchemes",
|
5045 - | vec![::aws_smithy_types::Document::from({
|
5046 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5047 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5048 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5049 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5050 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5051 - | out
|
5052 - | })],
|
5053 - | )
|
5054 - | .build());
|
5055 - | }
|
5056 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5057 - | .url({
|
5058 - | let mut out = String::new();
|
5059 - | out.push_str("https://s3.");
|
5060 - | #[allow(clippy::needless_borrow)]
|
5061 - | out.push_str(®ion.as_ref() as &str);
|
5062 - | out.push('.');
|
5063 - | #[allow(clippy::needless_borrow)]
|
5064 - | out.push_str(&partition_result.dns_suffix());
|
5065 - | out.push('/');
|
5066 - | #[allow(clippy::needless_borrow)]
|
5067 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
5068 - | out
|
5069 - | })
|
5070 - | .property(
|
5071 - | "authSchemes",
|
5072 - | vec![::aws_smithy_types::Document::from({
|
5073 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5074 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5075 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5076 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5077 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5078 - | out
|
5079 - | })],
|
5080 - | )
|
5081 - | .build());
|
5082 - | }
|
5083 - | }
|
5084 - | }
|
5085 - | }
|
5086 - | }
|
5087 - | if (*use_dual_stack) == (false) {
|
5088 - | if !(endpoint.is_some()) {
|
5089 - | if (*use_fips) == (false) {
|
5090 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5091 - | if (*use_global_endpoint) == (false) {
|
5092 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5093 - | .url({
|
5094 - | let mut out = String::new();
|
5095 - | out.push_str("https://s3.");
|
5096 - | #[allow(clippy::needless_borrow)]
|
5097 - | out.push_str(®ion.as_ref() as &str);
|
5098 - | out.push('.');
|
5099 - | #[allow(clippy::needless_borrow)]
|
5100 - | out.push_str(&partition_result.dns_suffix());
|
5101 - | out.push('/');
|
5102 - | #[allow(clippy::needless_borrow)]
|
5103 - | out.push_str(&uri_encoded_bucket.as_ref() as &str);
|
5104 - | out
|
5105 - | })
|
5106 - | .property(
|
5107 - | "authSchemes",
|
5108 - | vec![::aws_smithy_types::Document::from({
|
5109 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5110 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5111 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5112 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5113 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5114 - | out
|
5115 - | })],
|
5116 - | )
|
5117 - | .build());
|
5118 - | }
|
5119 - | }
|
5120 - | }
|
5121 - | }
|
5122 - | }
|
5123 - | #[allow(unreachable_code)]
|
5124 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
5125 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
5126 - | )));
|
5127 - | }
|
5128 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
5129 - | "Path-style addressing cannot be used with S3 Accelerate".to_string(),
|
5130 - | ));
|
5131 - | }
|
5132 - | #[allow(unreachable_code)]
|
5133 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
5134 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
5135 - | )));
|
5136 - | }
|
5137 - | #[allow(unused_variables)]
|
5138 - | if let Some(use_object_lambda_endpoint) = use_object_lambda_endpoint {
|
5139 - | if (*use_object_lambda_endpoint) == (true) {
|
5140 - | #[allow(unused_variables)]
|
5141 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
5142 - | if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, true, _diagnostic_collector) {
|
5143 - | if (*use_dual_stack) == (true) {
|
5144 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
5145 - | "S3 Object Lambda does not support Dual-stack".to_string(),
|
5146 - | ));
|
5147 - | }
|
5148 - | if (*accelerate) == (true) {
|
5149 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
5150 - | "S3 Object Lambda does not support S3 Accelerate".to_string(),
|
5151 - | ));
|
5152 - | }
|
5153 - | #[allow(unused_variables)]
|
5154 - | if let Some(endpoint) = endpoint {
|
5155 - | #[allow(unused_variables)]
|
5156 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
5157 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5158 - | .url({
|
5159 - | let mut out = String::new();
|
5160 - | #[allow(clippy::needless_borrow)]
|
5161 - | out.push_str(&url.scheme());
|
5162 - | out.push_str("://");
|
5163 - | #[allow(clippy::needless_borrow)]
|
5164 - | out.push_str(&url.authority());
|
5165 - | #[allow(clippy::needless_borrow)]
|
5166 - | out.push_str(&url.path());
|
5167 - | out
|
5168 - | })
|
5169 - | .property(
|
5170 - | "authSchemes",
|
5171 - | vec![::aws_smithy_types::Document::from({
|
5172 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5173 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5174 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5175 - | out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
|
5176 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5177 - | out
|
5178 - | })],
|
5179 - | )
|
5180 - | .build());
|
5181 - | }
|
5182 - | }
|
5183 - | if (*use_fips) == (true) {
|
5184 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5185 - | .url({
|
5186 - | let mut out = String::new();
|
5187 - | out.push_str("https://s3-object-lambda-fips.");
|
5188 - | #[allow(clippy::needless_borrow)]
|
5189 - | out.push_str(®ion.as_ref() as &str);
|
5190 - | out.push('.');
|
5191 - | #[allow(clippy::needless_borrow)]
|
5192 - | out.push_str(&partition_result.dns_suffix());
|
5193 - | out
|
5194 - | })
|
5195 - | .property(
|
5196 - | "authSchemes",
|
5197 - | vec![::aws_smithy_types::Document::from({
|
5198 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5199 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5200 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5201 - | out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
|
5202 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5203 - | out
|
5204 - | })],
|
5205 - | )
|
5206 - | .build());
|
5207 - | }
|
5208 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5209 - | .url({
|
5210 - | let mut out = String::new();
|
5211 - | out.push_str("https://s3-object-lambda.");
|
5212 - | #[allow(clippy::needless_borrow)]
|
5213 - | out.push_str(®ion.as_ref() as &str);
|
5214 - | out.push('.');
|
5215 - | #[allow(clippy::needless_borrow)]
|
5216 - | out.push_str(&partition_result.dns_suffix());
|
5217 - | out
|
5218 - | })
|
5219 - | .property(
|
5220 - | "authSchemes",
|
5221 - | vec![::aws_smithy_types::Document::from({
|
5222 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5223 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5224 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5225 - | out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
|
5226 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5227 - | out
|
5228 - | })],
|
5229 - | )
|
5230 - | .build());
|
5231 - | }
|
5232 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
5233 - | "Invalid region: region was not a valid DNS name.".to_string(),
|
5234 - | ));
|
5235 - | }
|
5236 - | #[allow(unreachable_code)]
|
5237 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
5238 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
5239 - | )));
|
5240 - | }
|
5241 - | }
|
5242 - | if !(bucket.is_some()) {
|
5243 - | #[allow(unused_variables)]
|
5244 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
5245 - | if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, true, _diagnostic_collector) {
|
5246 - | if (*use_fips) == (true) {
|
5247 - | if (*use_dual_stack) == (true) {
|
5248 - | if !(endpoint.is_some()) {
|
5249 - | if (region.as_ref() as &str) == ("aws-global") {
|
5250 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5251 - | .url({
|
5252 - | let mut out = String::new();
|
5253 - | out.push_str("https://s3-fips.dualstack.us-east-1.");
|
5254 - | #[allow(clippy::needless_borrow)]
|
5255 - | out.push_str(&partition_result.dns_suffix());
|
5256 - | out
|
5257 - | })
|
5258 - | .property(
|
5259 - | "authSchemes",
|
5260 - | vec![::aws_smithy_types::Document::from({
|
5261 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5262 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5263 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5264 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5265 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
5266 - | out
|
5267 - | })],
|
5268 - | )
|
5269 - | .build());
|
5270 - | }
|
5271 - | }
|
5272 - | }
|
5273 - | }
|
5274 - | if (*use_fips) == (true) {
|
5275 - | if (*use_dual_stack) == (true) {
|
5276 - | if !(endpoint.is_some()) {
|
5277 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5278 - | if (*use_global_endpoint) == (true) {
|
5279 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5280 - | .url({
|
5281 - | let mut out = String::new();
|
5282 - | out.push_str("https://s3-fips.dualstack.");
|
5283 - | #[allow(clippy::needless_borrow)]
|
5284 - | out.push_str(®ion.as_ref() as &str);
|
5285 - | out.push('.');
|
5286 - | #[allow(clippy::needless_borrow)]
|
5287 - | out.push_str(&partition_result.dns_suffix());
|
5288 - | out
|
5289 - | })
|
5290 - | .property(
|
5291 - | "authSchemes",
|
5292 - | vec![::aws_smithy_types::Document::from({
|
5293 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5294 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5295 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5296 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5297 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5298 - | out
|
5299 - | })],
|
5300 - | )
|
5301 - | .build());
|
5302 - | }
|
5303 - | }
|
5304 - | }
|
5305 - | }
|
5306 - | }
|
5307 - | if (*use_fips) == (true) {
|
5308 - | if (*use_dual_stack) == (true) {
|
5309 - | if !(endpoint.is_some()) {
|
5310 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5311 - | if (*use_global_endpoint) == (false) {
|
5312 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5313 - | .url({
|
5314 - | let mut out = String::new();
|
5315 - | out.push_str("https://s3-fips.dualstack.");
|
5316 - | #[allow(clippy::needless_borrow)]
|
5317 - | out.push_str(®ion.as_ref() as &str);
|
5318 - | out.push('.');
|
5319 - | #[allow(clippy::needless_borrow)]
|
5320 - | out.push_str(&partition_result.dns_suffix());
|
5321 - | out
|
5322 - | })
|
5323 - | .property(
|
5324 - | "authSchemes",
|
5325 - | vec![::aws_smithy_types::Document::from({
|
5326 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5327 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5328 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5329 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5330 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5331 - | out
|
5332 - | })],
|
5333 - | )
|
5334 - | .build());
|
5335 - | }
|
5336 - | }
|
5337 - | }
|
5338 - | }
|
5339 - | }
|
5340 - | if (*use_fips) == (true) {
|
5341 - | if (*use_dual_stack) == (false) {
|
5342 - | if !(endpoint.is_some()) {
|
5343 - | if (region.as_ref() as &str) == ("aws-global") {
|
5344 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5345 - | .url({
|
5346 - | let mut out = String::new();
|
5347 - | out.push_str("https://s3-fips.us-east-1.");
|
5348 - | #[allow(clippy::needless_borrow)]
|
5349 - | out.push_str(&partition_result.dns_suffix());
|
5350 - | out
|
5351 - | })
|
5352 - | .property(
|
5353 - | "authSchemes",
|
5354 - | vec![::aws_smithy_types::Document::from({
|
5355 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5356 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5357 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5358 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5359 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
5360 - | out
|
5361 - | })],
|
5362 - | )
|
5363 - | .build());
|
5364 - | }
|
5365 - | }
|
5366 - | }
|
5367 - | }
|
5368 - | if (*use_fips) == (true) {
|
5369 - | if (*use_dual_stack) == (false) {
|
5370 - | if !(endpoint.is_some()) {
|
5371 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5372 - | if (*use_global_endpoint) == (true) {
|
5373 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5374 - | .url({
|
5375 - | let mut out = String::new();
|
5376 - | out.push_str("https://s3-fips.");
|
5377 - | #[allow(clippy::needless_borrow)]
|
5378 - | out.push_str(®ion.as_ref() as &str);
|
5379 - | out.push('.');
|
5380 - | #[allow(clippy::needless_borrow)]
|
5381 - | out.push_str(&partition_result.dns_suffix());
|
5382 - | out
|
5383 - | })
|
5384 - | .property(
|
5385 - | "authSchemes",
|
5386 - | vec![::aws_smithy_types::Document::from({
|
5387 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5388 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5389 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5390 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5391 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5392 - | out
|
5393 - | })],
|
5394 - | )
|
5395 - | .build());
|
5396 - | }
|
5397 - | }
|
5398 - | }
|
5399 - | }
|
5400 - | }
|
5401 - | if (*use_fips) == (true) {
|
5402 - | if (*use_dual_stack) == (false) {
|
5403 - | if !(endpoint.is_some()) {
|
5404 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5405 - | if (*use_global_endpoint) == (false) {
|
5406 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5407 - | .url({
|
5408 - | let mut out = String::new();
|
5409 - | out.push_str("https://s3-fips.");
|
5410 - | #[allow(clippy::needless_borrow)]
|
5411 - | out.push_str(®ion.as_ref() as &str);
|
5412 - | out.push('.');
|
5413 - | #[allow(clippy::needless_borrow)]
|
5414 - | out.push_str(&partition_result.dns_suffix());
|
5415 - | out
|
5416 - | })
|
5417 - | .property(
|
5418 - | "authSchemes",
|
5419 - | vec![::aws_smithy_types::Document::from({
|
5420 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5421 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5422 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5423 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5424 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5425 - | out
|
5426 - | })],
|
5427 - | )
|
5428 - | .build());
|
5429 - | }
|
5430 - | }
|
5431 - | }
|
5432 - | }
|
5433 - | }
|
5434 - | if (*use_fips) == (false) {
|
5435 - | if (*use_dual_stack) == (true) {
|
5436 - | if !(endpoint.is_some()) {
|
5437 - | if (region.as_ref() as &str) == ("aws-global") {
|
5438 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5439 - | .url({
|
5440 - | let mut out = String::new();
|
5441 - | out.push_str("https://s3.dualstack.us-east-1.");
|
5442 - | #[allow(clippy::needless_borrow)]
|
5443 - | out.push_str(&partition_result.dns_suffix());
|
5444 - | out
|
5445 - | })
|
5446 - | .property(
|
5447 - | "authSchemes",
|
5448 - | vec![::aws_smithy_types::Document::from({
|
5449 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5450 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5451 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5452 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5453 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
5454 - | out
|
5455 - | })],
|
5456 - | )
|
5457 - | .build());
|
5458 - | }
|
5459 - | }
|
5460 - | }
|
5461 - | }
|
5462 - | if (*use_fips) == (false) {
|
5463 - | if (*use_dual_stack) == (true) {
|
5464 - | if !(endpoint.is_some()) {
|
5465 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5466 - | if (*use_global_endpoint) == (true) {
|
5467 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5468 - | .url({
|
5469 - | let mut out = String::new();
|
5470 - | out.push_str("https://s3.dualstack.");
|
5471 - | #[allow(clippy::needless_borrow)]
|
5472 - | out.push_str(®ion.as_ref() as &str);
|
5473 - | out.push('.');
|
5474 - | #[allow(clippy::needless_borrow)]
|
5475 - | out.push_str(&partition_result.dns_suffix());
|
5476 - | out
|
5477 - | })
|
5478 - | .property(
|
5479 - | "authSchemes",
|
5480 - | vec![::aws_smithy_types::Document::from({
|
5481 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5482 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5483 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5484 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5485 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5486 - | out
|
5487 - | })],
|
5488 - | )
|
5489 - | .build());
|
5490 - | }
|
5491 - | }
|
5492 - | }
|
5493 - | }
|
5494 - | }
|
5495 - | if (*use_fips) == (false) {
|
5496 - | if (*use_dual_stack) == (true) {
|
5497 - | if !(endpoint.is_some()) {
|
5498 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5499 - | if (*use_global_endpoint) == (false) {
|
5500 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5501 - | .url({
|
5502 - | let mut out = String::new();
|
5503 - | out.push_str("https://s3.dualstack.");
|
5504 - | #[allow(clippy::needless_borrow)]
|
5505 - | out.push_str(®ion.as_ref() as &str);
|
5506 - | out.push('.');
|
5507 - | #[allow(clippy::needless_borrow)]
|
5508 - | out.push_str(&partition_result.dns_suffix());
|
5509 - | out
|
5510 - | })
|
5511 - | .property(
|
5512 - | "authSchemes",
|
5513 - | vec![::aws_smithy_types::Document::from({
|
5514 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5515 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5516 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5517 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5518 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5519 - | out
|
5520 - | })],
|
5521 - | )
|
5522 - | .build());
|
5523 - | }
|
5524 - | }
|
5525 - | }
|
5526 - | }
|
5527 - | }
|
5528 - | if (*use_fips) == (false) {
|
5529 - | if (*use_dual_stack) == (false) {
|
5530 - | #[allow(unused_variables)]
|
5531 - | if let Some(endpoint) = endpoint {
|
5532 - | #[allow(unused_variables)]
|
5533 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
5534 - | if (region.as_ref() as &str) == ("aws-global") {
|
5535 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5536 - | .url({
|
5537 - | let mut out = String::new();
|
5538 - | #[allow(clippy::needless_borrow)]
|
5539 - | out.push_str(&url.scheme());
|
5540 - | out.push_str("://");
|
5541 - | #[allow(clippy::needless_borrow)]
|
5542 - | out.push_str(&url.authority());
|
5543 - | #[allow(clippy::needless_borrow)]
|
5544 - | out.push_str(&url.path());
|
5545 - | out
|
5546 - | })
|
5547 - | .property(
|
5548 - | "authSchemes",
|
5549 - | vec![::aws_smithy_types::Document::from({
|
5550 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5551 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5552 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5553 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5554 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
5555 - | out
|
5556 - | })],
|
5557 - | )
|
5558 - | .build());
|
5559 - | }
|
5560 - | }
|
5561 - | }
|
5562 - | }
|
5563 - | }
|
5564 - | if (*use_fips) == (false) {
|
5565 - | if (*use_dual_stack) == (false) {
|
5566 - | #[allow(unused_variables)]
|
5567 - | if let Some(endpoint) = endpoint {
|
5568 - | #[allow(unused_variables)]
|
5569 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
5570 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5571 - | if (*use_global_endpoint) == (true) {
|
5572 - | if (region.as_ref() as &str) == ("us-east-1") {
|
5573 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5574 - | .url({
|
5575 - | let mut out = String::new();
|
5576 - | #[allow(clippy::needless_borrow)]
|
5577 - | out.push_str(&url.scheme());
|
5578 - | out.push_str("://");
|
5579 - | #[allow(clippy::needless_borrow)]
|
5580 - | out.push_str(&url.authority());
|
5581 - | #[allow(clippy::needless_borrow)]
|
5582 - | out.push_str(&url.path());
|
5583 - | out
|
5584 - | })
|
5585 - | .property(
|
5586 - | "authSchemes",
|
5587 - | vec![::aws_smithy_types::Document::from({
|
5588 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5589 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5590 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5591 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5592 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5593 - | out
|
5594 - | })],
|
5595 - | )
|
5596 - | .build());
|
5597 - | }
|
5598 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5599 - | .url({
|
5600 - | let mut out = String::new();
|
5601 - | #[allow(clippy::needless_borrow)]
|
5602 - | out.push_str(&url.scheme());
|
5603 - | out.push_str("://");
|
5604 - | #[allow(clippy::needless_borrow)]
|
5605 - | out.push_str(&url.authority());
|
5606 - | #[allow(clippy::needless_borrow)]
|
5607 - | out.push_str(&url.path());
|
5608 - | out
|
5609 - | })
|
5610 - | .property(
|
5611 - | "authSchemes",
|
5612 - | vec![::aws_smithy_types::Document::from({
|
5613 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5614 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5615 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5616 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5617 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5618 - | out
|
5619 - | })],
|
5620 - | )
|
5621 - | .build());
|
5622 - | }
|
5623 - | }
|
5624 - | }
|
5625 - | }
|
5626 - | }
|
5627 - | }
|
5628 - | if (*use_fips) == (false) {
|
5629 - | if (*use_dual_stack) == (false) {
|
5630 - | #[allow(unused_variables)]
|
5631 - | if let Some(endpoint) = endpoint {
|
5632 - | #[allow(unused_variables)]
|
5633 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
5634 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5635 - | if (*use_global_endpoint) == (false) {
|
5636 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5637 - | .url({
|
5638 - | let mut out = String::new();
|
5639 - | #[allow(clippy::needless_borrow)]
|
5640 - | out.push_str(&url.scheme());
|
5641 - | out.push_str("://");
|
5642 - | #[allow(clippy::needless_borrow)]
|
5643 - | out.push_str(&url.authority());
|
5644 - | #[allow(clippy::needless_borrow)]
|
5645 - | out.push_str(&url.path());
|
5646 - | out
|
5647 - | })
|
5648 - | .property(
|
5649 - | "authSchemes",
|
5650 - | vec![::aws_smithy_types::Document::from({
|
5651 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5652 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5653 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5654 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5655 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5656 - | out
|
5657 - | })],
|
5658 - | )
|
5659 - | .build());
|
5660 - | }
|
5661 - | }
|
5662 - | }
|
5663 - | }
|
5664 - | }
|
5665 - | }
|
5666 - | if (*use_fips) == (false) {
|
5667 - | if (*use_dual_stack) == (false) {
|
5668 - | if !(endpoint.is_some()) {
|
5669 - | if (region.as_ref() as &str) == ("aws-global") {
|
5670 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5671 - | .url({
|
5672 - | let mut out = String::new();
|
5673 - | out.push_str("https://s3.");
|
5674 - | #[allow(clippy::needless_borrow)]
|
5675 - | out.push_str(&partition_result.dns_suffix());
|
5676 - | out
|
5677 - | })
|
5678 - | .property(
|
5679 - | "authSchemes",
|
5680 - | vec![::aws_smithy_types::Document::from({
|
5681 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5682 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5683 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5684 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5685 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
5686 - | out
|
5687 - | })],
|
5688 - | )
|
5689 - | .build());
|
5690 - | }
|
5691 - | }
|
5692 - | }
|
5693 - | }
|
5694 - | if (*use_fips) == (false) {
|
5695 - | if (*use_dual_stack) == (false) {
|
5696 - | if !(endpoint.is_some()) {
|
5697 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5698 - | if (*use_global_endpoint) == (true) {
|
5699 - | if (region.as_ref() as &str) == ("us-east-1") {
|
5700 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5701 - | .url({
|
5702 - | let mut out = String::new();
|
5703 - | out.push_str("https://s3.");
|
5704 - | #[allow(clippy::needless_borrow)]
|
5705 - | out.push_str(&partition_result.dns_suffix());
|
5706 - | out
|
5707 - | })
|
5708 - | .property(
|
5709 - | "authSchemes",
|
5710 - | vec![::aws_smithy_types::Document::from({
|
5711 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5712 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5713 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5714 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5715 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5716 - | out
|
5717 - | })],
|
5718 - | )
|
5719 - | .build());
|
5720 - | }
|
5721 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5722 - | .url({
|
5723 - | let mut out = String::new();
|
5724 - | out.push_str("https://s3.");
|
5725 - | #[allow(clippy::needless_borrow)]
|
5726 - | out.push_str(®ion.as_ref() as &str);
|
5727 - | out.push('.');
|
5728 - | #[allow(clippy::needless_borrow)]
|
5729 - | out.push_str(&partition_result.dns_suffix());
|
5730 - | out
|
5731 - | })
|
5732 - | .property(
|
5733 - | "authSchemes",
|
5734 - | vec![::aws_smithy_types::Document::from({
|
5735 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5736 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5737 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5738 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5739 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5740 - | out
|
5741 - | })],
|
5742 - | )
|
5743 - | .build());
|
5744 - | }
|
5745 - | }
|
5746 - | }
|
5747 - | }
|
5748 - | }
|
5749 - | if (*use_fips) == (false) {
|
5750 - | if (*use_dual_stack) == (false) {
|
5751 - | if !(endpoint.is_some()) {
|
5752 - | if !((region.as_ref() as &str) == ("aws-global")) {
|
5753 - | if (*use_global_endpoint) == (false) {
|
5754 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
5755 - | .url({
|
5756 - | let mut out = String::new();
|
5757 - | out.push_str("https://s3.");
|
5758 - | #[allow(clippy::needless_borrow)]
|
5759 - | out.push_str(®ion.as_ref() as &str);
|
5760 - | out.push('.');
|
5761 - | #[allow(clippy::needless_borrow)]
|
5762 - | out.push_str(&partition_result.dns_suffix());
|
5763 - | out
|
5764 - | })
|
5765 - | .property(
|
5766 - | "authSchemes",
|
5767 - | vec![::aws_smithy_types::Document::from({
|
5768 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
5769 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
5770 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
5771 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
5772 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
5773 - | out
|
5774 - | })],
|
5775 - | )
|
5776 - | .build());
|
5777 - | }
|
5778 - | }
|
5779 - | }
|
5780 - | }
|
5781 - | }
|
5782 - | #[allow(unreachable_code)]
|
5783 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
5784 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
5785 - | )));
|
5786 - | }
|
5787 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
5788 - | "Invalid region: region was not a valid DNS name.".to_string(),
|
5789 - | ));
|
5790 - | }
|
5791 - | #[allow(unreachable_code)]
|
5792 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
5793 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
5794 - | )));
|
5795 - | }
|
5796 - | #[allow(unreachable_code)]
|
5797 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
5798 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
5799 - | )));
|
5800 - | }
|
5801 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
5802 - | "A region must be set when sending requests to S3.".to_string(),
|
5803 - | ));
|
5804 - | }
|