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 region = &_params.region;
|
17 - | #[allow(unused_variables)]
|
18 - | let use_fips = &_params.use_fips;
|
19 - | #[allow(unused_variables)]
|
20 - | let use_dual_stack = &_params.use_dual_stack;
|
21 - | #[allow(unused_variables)]
|
22 - | let endpoint = &_params.endpoint;
|
23 - | #[allow(unused_variables)]
|
24 - | let account_id = &_params.account_id;
|
25 - | #[allow(unused_variables)]
|
26 - | let requires_account_id = &_params.requires_account_id;
|
27 - | #[allow(unused_variables)]
|
28 - | let outpost_id = &_params.outpost_id;
|
29 - | #[allow(unused_variables)]
|
30 - | let bucket = &_params.bucket;
|
31 - | #[allow(unused_variables)]
|
32 - | let access_point_name = &_params.access_point_name;
|
33 - | #[allow(unused_variables)]
|
34 - | let use_arn_region = &_params.use_arn_region;
|
35 - | #[allow(unused_variables)]
|
36 - | let resource_arn = &_params.resource_arn;
|
37 - | #[allow(unused_variables)]
|
38 - | let use_s3_express_control_endpoint = &_params.use_s3_express_control_endpoint;
|
39 - | #[allow(unused_variables)]
|
40 - | if let Some(region) = region {
|
41 - | if (*use_fips) == (true) {
|
42 - | #[allow(unused_variables)]
|
43 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
44 - | if (partition_result.name()) == ("aws-cn") {
|
45 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
46 - | "Partition does not support FIPS".to_string(),
|
47 - | ));
|
48 - | }
|
49 - | }
|
50 - | }
|
51 - | #[allow(unused_variables)]
|
52 - | if let Some(outpost_id) = outpost_id {
|
53 - | #[allow(unused_variables)]
|
54 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
55 - | #[allow(unused_variables)]
|
56 - | if let Some(requires_account_id) = requires_account_id {
|
57 - | if (*requires_account_id) == (true) {
|
58 - | if !(account_id.is_some()) {
|
59 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
60 - | "AccountId is required but not set".to_string(),
|
61 - | ));
|
62 - | }
|
63 - | }
|
64 - | }
|
65 - | #[allow(unused_variables)]
|
66 - | if let Some(account_id) = account_id {
|
67 - | if !(crate::endpoint_lib::host::is_valid_host_label(account_id.as_ref() as &str, false, _diagnostic_collector)) {
|
68 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
69 - | "AccountId must only contain a-z, A-Z, 0-9 and `-`.".to_string(),
|
70 - | ));
|
71 - | }
|
72 - | }
|
73 - | if !(crate::endpoint_lib::host::is_valid_host_label(outpost_id.as_ref() as &str, false, _diagnostic_collector)) {
|
74 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
75 - | "OutpostId must only contain a-z, A-Z, 0-9 and `-`.".to_string(),
|
76 - | ));
|
77 - | }
|
78 - | #[allow(unused_variables)]
|
79 - | if let Some(endpoint) = endpoint {
|
80 - | if (*use_dual_stack) == (true) {
|
81 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
82 - | "Invalid Configuration: DualStack and custom endpoint are not supported".to_string(),
|
83 - | ));
|
84 - | }
|
85 - | }
|
86 - | if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, true, _diagnostic_collector) {
|
87 - | #[allow(unused_variables)]
|
88 - | if let Some(endpoint) = endpoint {
|
89 - | #[allow(unused_variables)]
|
90 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
91 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
92 - | .url({
|
93 - | let mut out = String::new();
|
94 - | #[allow(clippy::needless_borrow)]
|
95 - | out.push_str(&url.scheme());
|
96 - | out.push_str("://");
|
97 - | #[allow(clippy::needless_borrow)]
|
98 - | out.push_str(&url.authority());
|
99 - | #[allow(clippy::needless_borrow)]
|
100 - | out.push_str(&url.path());
|
101 - | out
|
102 - | })
|
103 - | .property(
|
104 - | "authSchemes",
|
105 - | vec![::aws_smithy_types::Document::from({
|
106 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
107 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
108 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
109 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
110 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
111 - | out
|
112 - | })],
|
113 - | )
|
114 - | .build());
|
115 - | }
|
116 - | }
|
117 - | if (*use_fips) == (true) {
|
118 - | if (*use_dual_stack) == (true) {
|
119 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
120 - | .url({
|
121 - | let mut out = String::new();
|
122 - | out.push_str("https://s3-outposts-fips.");
|
123 - | #[allow(clippy::needless_borrow)]
|
124 - | out.push_str(®ion.as_ref() as &str);
|
125 - | out.push('.');
|
126 - | #[allow(clippy::needless_borrow)]
|
127 - | out.push_str(&partition_result.dual_stack_dns_suffix());
|
128 - | out
|
129 - | })
|
130 - | .property(
|
131 - | "authSchemes",
|
132 - | vec![::aws_smithy_types::Document::from({
|
133 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
134 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
135 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
136 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
137 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
138 - | out
|
139 - | })],
|
140 - | )
|
141 - | .build());
|
142 - | }
|
143 - | }
|
144 - | if (*use_fips) == (true) {
|
145 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
146 - | .url({
|
147 - | let mut out = String::new();
|
148 - | out.push_str("https://s3-outposts-fips.");
|
149 - | #[allow(clippy::needless_borrow)]
|
150 - | out.push_str(®ion.as_ref() as &str);
|
151 - | out.push('.');
|
152 - | #[allow(clippy::needless_borrow)]
|
153 - | out.push_str(&partition_result.dns_suffix());
|
154 - | out
|
155 - | })
|
156 - | .property(
|
157 - | "authSchemes",
|
158 - | vec![::aws_smithy_types::Document::from({
|
159 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
160 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
161 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
162 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
163 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
164 - | out
|
165 - | })],
|
166 - | )
|
167 - | .build());
|
168 - | }
|
169 - | if (*use_dual_stack) == (true) {
|
170 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
171 - | .url({
|
172 - | let mut out = String::new();
|
173 - | out.push_str("https://s3-outposts.");
|
174 - | #[allow(clippy::needless_borrow)]
|
175 - | out.push_str(®ion.as_ref() as &str);
|
176 - | out.push('.');
|
177 - | #[allow(clippy::needless_borrow)]
|
178 - | out.push_str(&partition_result.dual_stack_dns_suffix());
|
179 - | out
|
180 - | })
|
181 - | .property(
|
182 - | "authSchemes",
|
183 - | vec![::aws_smithy_types::Document::from({
|
184 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
185 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
186 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
187 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
188 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
189 - | out
|
190 - | })],
|
191 - | )
|
192 - | .build());
|
193 - | }
|
194 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
195 - | .url({
|
196 - | let mut out = String::new();
|
197 - | out.push_str("https://s3-outposts.");
|
198 - | #[allow(clippy::needless_borrow)]
|
199 - | out.push_str(®ion.as_ref() as &str);
|
200 - | out.push('.');
|
201 - | #[allow(clippy::needless_borrow)]
|
202 - | out.push_str(&partition_result.dns_suffix());
|
203 - | out
|
204 - | })
|
205 - | .property(
|
206 - | "authSchemes",
|
207 - | vec![::aws_smithy_types::Document::from({
|
208 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
209 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
210 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
211 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
212 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
213 - | out
|
214 - | })],
|
215 - | )
|
216 - | .build());
|
217 - | }
|
218 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
219 - | "Invalid region: region was not a valid DNS name.".to_string(),
|
220 - | ));
|
221 - | }
|
222 - | #[allow(unreachable_code)]
|
223 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
224 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
225 - | )));
|
226 - | }
|
227 - | #[allow(unused_variables)]
|
228 - | if let Some(resource_arn) = resource_arn {
|
229 - | #[allow(unused_variables)]
|
230 - | if let Some(resource_arn) = crate::endpoint_lib::arn::parse_arn(resource_arn.as_ref() as &str, _diagnostic_collector) {
|
231 - | if (resource_arn.service()) == ("s3express") {
|
232 - | #[allow(unused_variables)]
|
233 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
234 - | #[allow(unused_variables)]
|
235 - | if let Some(arn_partition) = partition_resolver.resolve_partition(resource_arn.region(), _diagnostic_collector) {
|
236 - | if (arn_partition.name()) == (partition_result.name()) {
|
237 - | #[allow(unused_variables)]
|
238 - | if let Some(use_arn_region) = use_arn_region {
|
239 - | if (*use_arn_region) == (false) {
|
240 - | if !((resource_arn.region()) == (region.as_ref() as &str)) {
|
241 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
242 - | let mut out = String::new();
|
243 - | out.push_str("Invalid configuration: region from ARN `");
|
244 - | #[allow(clippy::needless_borrow)]
|
245 - | out.push_str(&resource_arn.region());
|
246 - | out.push_str("` does not match client region `");
|
247 - | #[allow(clippy::needless_borrow)]
|
248 - | out.push_str(®ion.as_ref() as &str);
|
249 - | out.push_str("` and UseArnRegion is `false`");
|
250 - | out
|
251 - | }));
|
252 - | }
|
253 - | }
|
254 - | }
|
255 - | #[allow(unused_variables)]
|
256 - | if let Some(endpoint) = endpoint {
|
257 - | if (*use_dual_stack) == (true) {
|
258 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
259 - | "Invalid Configuration: DualStack and custom endpoint are not supported".to_string(),
|
260 - | ));
|
261 - | }
|
262 - | }
|
263 - | if (*use_dual_stack) == (true) {
|
264 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
265 - | "S3Express does not support Dual-stack.".to_string(),
|
266 - | ));
|
267 - | }
|
268 - | #[allow(unused_variables)]
|
269 - | if let Some(endpoint) = endpoint {
|
270 - | #[allow(unused_variables)]
|
271 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
272 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
273 - | .url({
|
274 - | let mut out = String::new();
|
275 - | #[allow(clippy::needless_borrow)]
|
276 - | out.push_str(&url.scheme());
|
277 - | out.push_str("://");
|
278 - | #[allow(clippy::needless_borrow)]
|
279 - | out.push_str(&url.authority());
|
280 - | out
|
281 - | })
|
282 - | .property(
|
283 - | "authSchemes",
|
284 - | vec![::aws_smithy_types::Document::from({
|
285 - | let mut out =
|
286 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
287 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
288 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
289 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
290 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
291 - | out
|
292 - | })],
|
293 - | )
|
294 - | .build());
|
295 - | }
|
296 - | }
|
297 - | if (*use_fips) == (true) {
|
298 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
299 - | .url({
|
300 - | let mut out = String::new();
|
301 - | out.push_str("https://s3express-control-fips.");
|
302 - | #[allow(clippy::needless_borrow)]
|
303 - | out.push_str(®ion.as_ref() as &str);
|
304 - | out.push('.');
|
305 - | #[allow(clippy::needless_borrow)]
|
306 - | out.push_str(&partition_result.dns_suffix());
|
307 - | out
|
308 - | })
|
309 - | .property(
|
310 - | "authSchemes",
|
311 - | vec![::aws_smithy_types::Document::from({
|
312 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
313 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
314 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
315 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
316 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
317 - | out
|
318 - | })],
|
319 - | )
|
320 - | .build());
|
321 - | }
|
322 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
323 - | .url({
|
324 - | let mut out = String::new();
|
325 - | out.push_str("https://s3express-control.");
|
326 - | #[allow(clippy::needless_borrow)]
|
327 - | out.push_str(®ion.as_ref() as &str);
|
328 - | out.push('.');
|
329 - | #[allow(clippy::needless_borrow)]
|
330 - | out.push_str(&partition_result.dns_suffix());
|
331 - | out
|
332 - | })
|
333 - | .property(
|
334 - | "authSchemes",
|
335 - | vec![::aws_smithy_types::Document::from({
|
336 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
337 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
338 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
339 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
340 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
341 - | out
|
342 - | })],
|
343 - | )
|
344 - | .build());
|
345 - | }
|
346 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
347 - | let mut out = String::new();
|
348 - | out.push_str("Client was configured for partition `");
|
349 - | #[allow(clippy::needless_borrow)]
|
350 - | out.push_str(&partition_result.name());
|
351 - | out.push_str("` but ARN has `");
|
352 - | #[allow(clippy::needless_borrow)]
|
353 - | out.push_str(&arn_partition.name());
|
354 - | out.push('`');
|
355 - | out
|
356 - | }));
|
357 - | }
|
358 - | #[allow(unreachable_code)]
|
359 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
360 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
361 - | )));
|
362 - | }
|
363 - | #[allow(unreachable_code)]
|
364 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
365 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
366 - | )));
|
367 - | }
|
368 - | }
|
369 - | }
|
370 - | #[allow(unused_variables)]
|
371 - | if let Some(access_point_name) = access_point_name {
|
372 - | #[allow(unused_variables)]
|
373 - | if let Some(access_point_suffix) =
|
374 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 0, 7, true, _diagnostic_collector)
|
375 - | {
|
376 - | if (access_point_suffix.as_ref() as &str) == ("--xa-s3") {
|
377 - | #[allow(unused_variables)]
|
378 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
379 - | #[allow(unused_variables)]
|
380 - | if let Some(endpoint) = endpoint {
|
381 - | if (*use_dual_stack) == (true) {
|
382 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
383 - | "Invalid Configuration: DualStack and custom endpoint are not supported".to_string(),
|
384 - | ));
|
385 - | }
|
386 - | }
|
387 - | if (*use_dual_stack) == (true) {
|
388 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
389 - | "S3Express does not support Dual-stack.".to_string(),
|
390 - | ));
|
391 - | }
|
392 - | #[allow(unused_variables)]
|
393 - | if let Some(endpoint) = endpoint {
|
394 - | #[allow(unused_variables)]
|
395 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
396 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
397 - | .url({
|
398 - | let mut out = String::new();
|
399 - | #[allow(clippy::needless_borrow)]
|
400 - | out.push_str(&url.scheme());
|
401 - | out.push_str("://");
|
402 - | #[allow(clippy::needless_borrow)]
|
403 - | out.push_str(&url.authority());
|
404 - | out
|
405 - | })
|
406 - | .property(
|
407 - | "authSchemes",
|
408 - | vec![::aws_smithy_types::Document::from({
|
409 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
410 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
411 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
412 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
413 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
414 - | out
|
415 - | })],
|
416 - | )
|
417 - | .build());
|
418 - | }
|
419 - | }
|
420 - | #[allow(unused_variables)]
|
421 - | if let Some(s3express_availability_zone_id) =
|
422 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 15, true, _diagnostic_collector)
|
423 - | {
|
424 - | #[allow(unused_variables)]
|
425 - | if let Some(s3express_availability_zone_delim) =
|
426 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 15, 17, true, _diagnostic_collector)
|
427 - | {
|
428 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
429 - | if (*use_fips) == (true) {
|
430 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
431 - | .url({
|
432 - | let mut out = String::new();
|
433 - | out.push_str("https://s3express-control-fips.");
|
434 - | #[allow(clippy::needless_borrow)]
|
435 - | out.push_str(®ion.as_ref() as &str);
|
436 - | out.push('.');
|
437 - | #[allow(clippy::needless_borrow)]
|
438 - | out.push_str(&partition_result.dns_suffix());
|
439 - | out
|
440 - | })
|
441 - | .property(
|
442 - | "authSchemes",
|
443 - | vec![::aws_smithy_types::Document::from({
|
444 - | let mut out =
|
445 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
446 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
447 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
448 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
449 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
450 - | out
|
451 - | })],
|
452 - | )
|
453 - | .build());
|
454 - | }
|
455 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
456 - | .url({
|
457 - | let mut out = String::new();
|
458 - | out.push_str("https://s3express-control.");
|
459 - | #[allow(clippy::needless_borrow)]
|
460 - | out.push_str(®ion.as_ref() as &str);
|
461 - | out.push('.');
|
462 - | #[allow(clippy::needless_borrow)]
|
463 - | out.push_str(&partition_result.dns_suffix());
|
464 - | out
|
465 - | })
|
466 - | .property(
|
467 - | "authSchemes",
|
468 - | vec![::aws_smithy_types::Document::from({
|
469 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
470 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
471 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
472 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
473 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
474 - | out
|
475 - | })],
|
476 - | )
|
477 - | .build());
|
478 - | }
|
479 - | }
|
480 - | }
|
481 - | #[allow(unused_variables)]
|
482 - | if let Some(s3express_availability_zone_id) =
|
483 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 16, true, _diagnostic_collector)
|
484 - | {
|
485 - | #[allow(unused_variables)]
|
486 - | if let Some(s3express_availability_zone_delim) =
|
487 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 16, 18, true, _diagnostic_collector)
|
488 - | {
|
489 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
490 - | if (*use_fips) == (true) {
|
491 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
492 - | .url({
|
493 - | let mut out = String::new();
|
494 - | out.push_str("https://s3express-control-fips.");
|
495 - | #[allow(clippy::needless_borrow)]
|
496 - | out.push_str(®ion.as_ref() as &str);
|
497 - | out.push('.');
|
498 - | #[allow(clippy::needless_borrow)]
|
499 - | out.push_str(&partition_result.dns_suffix());
|
500 - | out
|
501 - | })
|
502 - | .property(
|
503 - | "authSchemes",
|
504 - | vec![::aws_smithy_types::Document::from({
|
505 - | let mut out =
|
506 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
507 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
508 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
509 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
510 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
511 - | out
|
512 - | })],
|
513 - | )
|
514 - | .build());
|
515 - | }
|
516 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
517 - | .url({
|
518 - | let mut out = String::new();
|
519 - | out.push_str("https://s3express-control.");
|
520 - | #[allow(clippy::needless_borrow)]
|
521 - | out.push_str(®ion.as_ref() as &str);
|
522 - | out.push('.');
|
523 - | #[allow(clippy::needless_borrow)]
|
524 - | out.push_str(&partition_result.dns_suffix());
|
525 - | out
|
526 - | })
|
527 - | .property(
|
528 - | "authSchemes",
|
529 - | vec![::aws_smithy_types::Document::from({
|
530 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
531 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
532 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
533 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
534 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
535 - | out
|
536 - | })],
|
537 - | )
|
538 - | .build());
|
539 - | }
|
540 - | }
|
541 - | }
|
542 - | #[allow(unused_variables)]
|
543 - | if let Some(s3express_availability_zone_id) =
|
544 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 20, true, _diagnostic_collector)
|
545 - | {
|
546 - | #[allow(unused_variables)]
|
547 - | if let Some(s3express_availability_zone_delim) =
|
548 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 20, 22, true, _diagnostic_collector)
|
549 - | {
|
550 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
551 - | if (*use_fips) == (true) {
|
552 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
553 - | .url({
|
554 - | let mut out = String::new();
|
555 - | out.push_str("https://s3express-control-fips.");
|
556 - | #[allow(clippy::needless_borrow)]
|
557 - | out.push_str(®ion.as_ref() as &str);
|
558 - | out.push('.');
|
559 - | #[allow(clippy::needless_borrow)]
|
560 - | out.push_str(&partition_result.dns_suffix());
|
561 - | out
|
562 - | })
|
563 - | .property(
|
564 - | "authSchemes",
|
565 - | vec![::aws_smithy_types::Document::from({
|
566 - | let mut out =
|
567 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
568 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
569 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
570 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
571 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
572 - | out
|
573 - | })],
|
574 - | )
|
575 - | .build());
|
576 - | }
|
577 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
578 - | .url({
|
579 - | let mut out = String::new();
|
580 - | out.push_str("https://s3express-control.");
|
581 - | #[allow(clippy::needless_borrow)]
|
582 - | out.push_str(®ion.as_ref() as &str);
|
583 - | out.push('.');
|
584 - | #[allow(clippy::needless_borrow)]
|
585 - | out.push_str(&partition_result.dns_suffix());
|
586 - | out
|
587 - | })
|
588 - | .property(
|
589 - | "authSchemes",
|
590 - | vec![::aws_smithy_types::Document::from({
|
591 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
592 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
593 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
594 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
595 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
596 - | out
|
597 - | })],
|
598 - | )
|
599 - | .build());
|
600 - | }
|
601 - | }
|
602 - | }
|
603 - | #[allow(unused_variables)]
|
604 - | if let Some(s3express_availability_zone_id) =
|
605 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 21, true, _diagnostic_collector)
|
606 - | {
|
607 - | #[allow(unused_variables)]
|
608 - | if let Some(s3express_availability_zone_delim) =
|
609 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 21, 23, true, _diagnostic_collector)
|
610 - | {
|
611 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
612 - | if (*use_fips) == (true) {
|
613 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
614 - | .url({
|
615 - | let mut out = String::new();
|
616 - | out.push_str("https://s3express-control-fips.");
|
617 - | #[allow(clippy::needless_borrow)]
|
618 - | out.push_str(®ion.as_ref() as &str);
|
619 - | out.push('.');
|
620 - | #[allow(clippy::needless_borrow)]
|
621 - | out.push_str(&partition_result.dns_suffix());
|
622 - | out
|
623 - | })
|
624 - | .property(
|
625 - | "authSchemes",
|
626 - | vec![::aws_smithy_types::Document::from({
|
627 - | let mut out =
|
628 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
629 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
630 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
631 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
632 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
633 - | out
|
634 - | })],
|
635 - | )
|
636 - | .build());
|
637 - | }
|
638 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
639 - | .url({
|
640 - | let mut out = String::new();
|
641 - | out.push_str("https://s3express-control.");
|
642 - | #[allow(clippy::needless_borrow)]
|
643 - | out.push_str(®ion.as_ref() as &str);
|
644 - | out.push('.');
|
645 - | #[allow(clippy::needless_borrow)]
|
646 - | out.push_str(&partition_result.dns_suffix());
|
647 - | out
|
648 - | })
|
649 - | .property(
|
650 - | "authSchemes",
|
651 - | vec![::aws_smithy_types::Document::from({
|
652 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
653 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
654 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
655 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
656 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
657 - | out
|
658 - | })],
|
659 - | )
|
660 - | .build());
|
661 - | }
|
662 - | }
|
663 - | }
|
664 - | #[allow(unused_variables)]
|
665 - | if let Some(s3express_availability_zone_id) =
|
666 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 27, true, _diagnostic_collector)
|
667 - | {
|
668 - | #[allow(unused_variables)]
|
669 - | if let Some(s3express_availability_zone_delim) =
|
670 - | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 27, 29, true, _diagnostic_collector)
|
671 - | {
|
672 - | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
673 - | if (*use_fips) == (true) {
|
674 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
675 - | .url({
|
676 - | let mut out = String::new();
|
677 - | out.push_str("https://s3express-control-fips.");
|
678 - | #[allow(clippy::needless_borrow)]
|
679 - | out.push_str(®ion.as_ref() as &str);
|
680 - | out.push('.');
|
681 - | #[allow(clippy::needless_borrow)]
|
682 - | out.push_str(&partition_result.dns_suffix());
|
683 - | out
|
684 - | })
|
685 - | .property(
|
686 - | "authSchemes",
|
687 - | vec![::aws_smithy_types::Document::from({
|
688 - | let mut out =
|
689 - | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
690 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
691 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
692 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
693 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
694 - | out
|
695 - | })],
|
696 - | )
|
697 - | .build());
|
698 - | }
|
699 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
700 - | .url({
|
701 - | let mut out = String::new();
|
702 - | out.push_str("https://s3express-control.");
|
703 - | #[allow(clippy::needless_borrow)]
|
704 - | out.push_str(®ion.as_ref() as &str);
|
705 - | out.push('.');
|
706 - | #[allow(clippy::needless_borrow)]
|
707 - | out.push_str(&partition_result.dns_suffix());
|
708 - | out
|
709 - | })
|
710 - | .property(
|
711 - | "authSchemes",
|
712 - | vec![::aws_smithy_types::Document::from({
|
713 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
714 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
715 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
716 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
717 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
718 - | out
|
719 - | })],
|
720 - | )
|
721 - | .build());
|
722 - | }
|
723 - | }
|
724 - | }
|
725 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
726 - | "Unrecognized S3Express Access Point name format.".to_string(),
|
727 - | ));
|
728 - | }
|
729 - | #[allow(unreachable_code)]
|
730 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
731 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
732 - | )));
|
733 - | }
|
734 - | }
|
735 - | }
|
736 - | #[allow(unused_variables)]
|
737 - | if let Some(use_s3_express_control_endpoint) = use_s3_express_control_endpoint {
|
738 - | if (*use_s3_express_control_endpoint) == (true) {
|
739 - | #[allow(unused_variables)]
|
740 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
741 - | #[allow(unused_variables)]
|
742 - | if let Some(endpoint) = endpoint {
|
743 - | if (*use_dual_stack) == (true) {
|
744 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
745 - | "Invalid Configuration: DualStack and custom endpoint are not supported".to_string(),
|
746 - | ));
|
747 - | }
|
748 - | }
|
749 - | if (*use_dual_stack) == (true) {
|
750 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
751 - | "S3Express does not support Dual-stack.".to_string(),
|
752 - | ));
|
753 - | }
|
754 - | #[allow(unused_variables)]
|
755 - | if let Some(endpoint) = endpoint {
|
756 - | #[allow(unused_variables)]
|
757 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
758 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
759 - | .url({
|
760 - | let mut out = String::new();
|
761 - | #[allow(clippy::needless_borrow)]
|
762 - | out.push_str(&url.scheme());
|
763 - | out.push_str("://");
|
764 - | #[allow(clippy::needless_borrow)]
|
765 - | out.push_str(&url.authority());
|
766 - | out
|
767 - | })
|
768 - | .property(
|
769 - | "authSchemes",
|
770 - | vec![::aws_smithy_types::Document::from({
|
771 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
772 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
773 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
774 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
775 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
776 - | out
|
777 - | })],
|
778 - | )
|
779 - | .build());
|
780 - | }
|
781 - | }
|
782 - | if (*use_fips) == (true) {
|
783 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
784 - | .url({
|
785 - | let mut out = String::new();
|
786 - | out.push_str("https://s3express-control-fips.");
|
787 - | #[allow(clippy::needless_borrow)]
|
788 - | out.push_str(®ion.as_ref() as &str);
|
789 - | out.push('.');
|
790 - | #[allow(clippy::needless_borrow)]
|
791 - | out.push_str(&partition_result.dns_suffix());
|
792 - | out
|
793 - | })
|
794 - | .property(
|
795 - | "authSchemes",
|
796 - | vec![::aws_smithy_types::Document::from({
|
797 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
798 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
799 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
800 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
801 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
802 - | out
|
803 - | })],
|
804 - | )
|
805 - | .build());
|
806 - | }
|
807 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
808 - | .url({
|
809 - | let mut out = String::new();
|
810 - | out.push_str("https://s3express-control.");
|
811 - | #[allow(clippy::needless_borrow)]
|
812 - | out.push_str(®ion.as_ref() as &str);
|
813 - | out.push('.');
|
814 - | #[allow(clippy::needless_borrow)]
|
815 - | out.push_str(&partition_result.dns_suffix());
|
816 - | out
|
817 - | })
|
818 - | .property(
|
819 - | "authSchemes",
|
820 - | vec![::aws_smithy_types::Document::from({
|
821 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
822 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
823 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
824 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
825 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
826 - | out
|
827 - | })],
|
828 - | )
|
829 - | .build());
|
830 - | }
|
831 - | #[allow(unreachable_code)]
|
832 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
833 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
834 - | )));
|
835 - | }
|
836 - | }
|
837 - | if (region.as_ref() as &str) == ("snow") {
|
838 - | #[allow(unused_variables)]
|
839 - | if let Some(endpoint) = endpoint {
|
840 - | #[allow(unused_variables)]
|
841 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
842 - | #[allow(unused_variables)]
|
843 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
844 - | if (*use_dual_stack) == (true) {
|
845 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
846 - | "S3 Snow does not support DualStack".to_string(),
|
847 - | ));
|
848 - | }
|
849 - | if (*use_fips) == (true) {
|
850 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
851 - | "S3 Snow does not support FIPS".to_string(),
|
852 - | ));
|
853 - | }
|
854 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
855 - | .url({
|
856 - | let mut out = String::new();
|
857 - | #[allow(clippy::needless_borrow)]
|
858 - | out.push_str(&url.scheme());
|
859 - | out.push_str("://");
|
860 - | #[allow(clippy::needless_borrow)]
|
861 - | out.push_str(&url.authority());
|
862 - | out
|
863 - | })
|
864 - | .property(
|
865 - | "authSchemes",
|
866 - | vec![::aws_smithy_types::Document::from({
|
867 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
868 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
869 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
870 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
871 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
872 - | out
|
873 - | })],
|
874 - | )
|
875 - | .build());
|
876 - | }
|
877 - | #[allow(unreachable_code)]
|
878 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
879 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
880 - | )));
|
881 - | }
|
882 - | }
|
883 - | }
|
884 - | #[allow(unused_variables)]
|
885 - | if let Some(access_point_name) = access_point_name {
|
886 - | #[allow(unused_variables)]
|
887 - | if let Some(access_point_arn) = crate::endpoint_lib::arn::parse_arn(access_point_name.as_ref() as &str, _diagnostic_collector) {
|
888 - | #[allow(unused_variables)]
|
889 - | if let Some(arn_type) = access_point_arn.resource_id().first().cloned() {
|
890 - | if !((arn_type.as_ref() as &str) == ("")) {
|
891 - | if (access_point_arn.service()) == ("s3-outposts") {
|
892 - | #[allow(unused_variables)]
|
893 - | if let Some(outpost_id) = access_point_arn.resource_id().get(1).cloned() {
|
894 - | if crate::endpoint_lib::host::is_valid_host_label(outpost_id.as_ref() as &str, false, _diagnostic_collector) {
|
895 - | #[allow(unused_variables)]
|
896 - | if let Some(endpoint) = endpoint {
|
897 - | if (*use_dual_stack) == (true) {
|
898 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
899 - | "Invalid Configuration: DualStack and custom endpoint are not supported".to_string(),
|
900 - | ));
|
901 - | }
|
902 - | }
|
903 - | #[allow(unused_variables)]
|
904 - | if let Some(use_arn_region) = use_arn_region {
|
905 - | if (*use_arn_region) == (false) {
|
906 - | if !((access_point_arn.region()) == (region.as_ref() as &str)) {
|
907 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
908 - | let mut out = String::new();
|
909 - | out.push_str("Invalid configuration: region from ARN `");
|
910 - | #[allow(clippy::needless_borrow)]
|
911 - | out.push_str(&access_point_arn.region());
|
912 - | out.push_str("` does not match client region `");
|
913 - | #[allow(clippy::needless_borrow)]
|
914 - | out.push_str(®ion.as_ref() as &str);
|
915 - | out.push_str("` and UseArnRegion is `false`");
|
916 - | out
|
917 - | }));
|
918 - | }
|
919 - | }
|
920 - | }
|
921 - | #[allow(unused_variables)]
|
922 - | if let Some(partition_result) =
|
923 - | partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
|
924 - | {
|
925 - | #[allow(unused_variables)]
|
926 - | if let Some(arn_partition) =
|
927 - | partition_resolver.resolve_partition(access_point_arn.region(), _diagnostic_collector)
|
928 - | {
|
929 - | if (arn_partition.name()) == (partition_result.name()) {
|
930 - | if crate::endpoint_lib::host::is_valid_host_label(
|
931 - | access_point_arn.region(),
|
932 - | true,
|
933 - | _diagnostic_collector,
|
934 - | ) {
|
935 - | if !((access_point_arn.account_id()) == ("")) {
|
936 - | if crate::endpoint_lib::host::is_valid_host_label(
|
937 - | access_point_arn.account_id(),
|
938 - | false,
|
939 - | _diagnostic_collector,
|
940 - | ) {
|
941 - | #[allow(unused_variables)]
|
942 - | if let Some(account_id) = account_id {
|
943 - | if !((account_id.as_ref() as &str) == (access_point_arn.account_id())) {
|
944 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
945 - | let mut out = String::new();
|
946 - | out.push_str("Invalid ARN: the accountId specified in the ARN (`");
|
947 - | #[allow(clippy::needless_borrow)]
|
948 - | out.push_str(&access_point_arn.account_id());
|
949 - | out.push_str("`) does not match the parameter (`");
|
950 - | #[allow(clippy::needless_borrow)]
|
951 - | out.push_str(&account_id.as_ref() as &str);
|
952 - | out.push_str("`)");
|
953 - | out
|
954 - | }));
|
955 - | }
|
956 - | }
|
957 - | #[allow(unused_variables)]
|
958 - | if let Some(outpost_type) = access_point_arn.resource_id().get(2).cloned() {
|
959 - | #[allow(unused_variables)]
|
960 - | if let Some(access_point_name) = access_point_arn.resource_id().get(3).cloned() {
|
961 - | if (outpost_type.as_ref() as &str) == ("accesspoint") {
|
962 - | if (*use_fips) == (true) {
|
963 - | if (*use_dual_stack) == (true) {
|
964 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
965 - | .url({
|
966 - | let mut out = String::new();
|
967 - | out.push_str("https://s3-outposts-fips.");
|
968 - | #[allow(clippy::needless_borrow)]
|
969 - | out.push_str(&access_point_arn.region());
|
970 - | out.push('.');
|
971 - | #[allow(clippy::needless_borrow)]
|
972 - | out.push_str(&arn_partition.dual_stack_dns_suffix());
|
973 - | out
|
974 - | })
|
975 - | .header(
|
976 - | "x-amz-account-id",
|
977 - | access_point_arn.account_id().to_owned(),
|
978 - | )
|
979 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
980 - | .property(
|
981 - | "authSchemes",
|
982 - | vec![::aws_smithy_types::Document::from({
|
983 - | let mut out = ::std::collections::HashMap::<
|
984 - | String,
|
985 - | ::aws_smithy_types::Document,
|
986 - | >::with_capacity(
|
987 - | 4
|
988 - | );
|
989 - | out.insert(
|
990 - | "disableDoubleEncoding".to_string(),
|
991 - | true.into(),
|
992 - | );
|
993 - | out.insert(
|
994 - | "name".to_string(),
|
995 - | "sigv4".to_string().into(),
|
996 - | );
|
997 - | out.insert(
|
998 - | "signingName".to_string(),
|
999 - | "s3-outposts".to_string().into(),
|
1000 - | );
|
1001 - | out.insert(
|
1002 - | "signingRegion".to_string(),
|
1003 - | access_point_arn.region().to_owned().into(),
|
1004 - | );
|
1005 - | out
|
1006 - | })],
|
1007 - | )
|
1008 - | .build());
|
1009 - | }
|
1010 - | }
|
1011 - | if (*use_fips) == (true) {
|
1012 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1013 - | .url({
|
1014 - | let mut out = String::new();
|
1015 - | out.push_str("https://s3-outposts-fips.");
|
1016 - | #[allow(clippy::needless_borrow)]
|
1017 - | out.push_str(&access_point_arn.region());
|
1018 - | out.push('.');
|
1019 - | #[allow(clippy::needless_borrow)]
|
1020 - | out.push_str(&arn_partition.dns_suffix());
|
1021 - | out
|
1022 - | })
|
1023 - | .header("x-amz-account-id", access_point_arn.account_id().to_owned())
|
1024 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1025 - | .property(
|
1026 - | "authSchemes",
|
1027 - | vec![::aws_smithy_types::Document::from({
|
1028 - | let mut out = ::std::collections::HashMap::<
|
1029 - | String,
|
1030 - | ::aws_smithy_types::Document,
|
1031 - | >::with_capacity(
|
1032 - | 4
|
1033 - | );
|
1034 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1035 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1036 - | out.insert(
|
1037 - | "signingName".to_string(),
|
1038 - | "s3-outposts".to_string().into(),
|
1039 - | );
|
1040 - | out.insert(
|
1041 - | "signingRegion".to_string(),
|
1042 - | access_point_arn.region().to_owned().into(),
|
1043 - | );
|
1044 - | out
|
1045 - | })],
|
1046 - | )
|
1047 - | .build());
|
1048 - | }
|
1049 - | if (*use_dual_stack) == (true) {
|
1050 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1051 - | .url({
|
1052 - | let mut out = String::new();
|
1053 - | out.push_str("https://s3-outposts.");
|
1054 - | #[allow(clippy::needless_borrow)]
|
1055 - | out.push_str(&access_point_arn.region());
|
1056 - | out.push('.');
|
1057 - | #[allow(clippy::needless_borrow)]
|
1058 - | out.push_str(&arn_partition.dual_stack_dns_suffix());
|
1059 - | out
|
1060 - | })
|
1061 - | .header("x-amz-account-id", access_point_arn.account_id().to_owned())
|
1062 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1063 - | .property(
|
1064 - | "authSchemes",
|
1065 - | vec![::aws_smithy_types::Document::from({
|
1066 - | let mut out = ::std::collections::HashMap::<
|
1067 - | String,
|
1068 - | ::aws_smithy_types::Document,
|
1069 - | >::with_capacity(
|
1070 - | 4
|
1071 - | );
|
1072 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1073 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1074 - | out.insert(
|
1075 - | "signingName".to_string(),
|
1076 - | "s3-outposts".to_string().into(),
|
1077 - | );
|
1078 - | out.insert(
|
1079 - | "signingRegion".to_string(),
|
1080 - | access_point_arn.region().to_owned().into(),
|
1081 - | );
|
1082 - | out
|
1083 - | })],
|
1084 - | )
|
1085 - | .build());
|
1086 - | }
|
1087 - | #[allow(unused_variables)]
|
1088 - | if let Some(endpoint) = endpoint {
|
1089 - | #[allow(unused_variables)]
|
1090 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
|
1091 - | endpoint.as_ref() as &str,
|
1092 - | _diagnostic_collector,
|
1093 - | ) {
|
1094 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1095 - | .url({
|
1096 - | let mut out = String::new();
|
1097 - | #[allow(clippy::needless_borrow)]
|
1098 - | out.push_str(&url.scheme());
|
1099 - | out.push_str("://");
|
1100 - | #[allow(clippy::needless_borrow)]
|
1101 - | out.push_str(&url.authority());
|
1102 - | #[allow(clippy::needless_borrow)]
|
1103 - | out.push_str(&url.path());
|
1104 - | out
|
1105 - | })
|
1106 - | .header(
|
1107 - | "x-amz-account-id",
|
1108 - | access_point_arn.account_id().to_owned(),
|
1109 - | )
|
1110 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1111 - | .property(
|
1112 - | "authSchemes",
|
1113 - | vec![::aws_smithy_types::Document::from({
|
1114 - | let mut out = ::std::collections::HashMap::<
|
1115 - | String,
|
1116 - | ::aws_smithy_types::Document,
|
1117 - | >::with_capacity(
|
1118 - | 4
|
1119 - | );
|
1120 - | out.insert(
|
1121 - | "disableDoubleEncoding".to_string(),
|
1122 - | true.into(),
|
1123 - | );
|
1124 - | out.insert(
|
1125 - | "name".to_string(),
|
1126 - | "sigv4".to_string().into(),
|
1127 - | );
|
1128 - | out.insert(
|
1129 - | "signingName".to_string(),
|
1130 - | "s3-outposts".to_string().into(),
|
1131 - | );
|
1132 - | out.insert(
|
1133 - | "signingRegion".to_string(),
|
1134 - | access_point_arn.region().to_owned().into(),
|
1135 - | );
|
1136 - | out
|
1137 - | })],
|
1138 - | )
|
1139 - | .build());
|
1140 - | }
|
1141 - | }
|
1142 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1143 - | .url({
|
1144 - | let mut out = String::new();
|
1145 - | out.push_str("https://s3-outposts.");
|
1146 - | #[allow(clippy::needless_borrow)]
|
1147 - | out.push_str(&access_point_arn.region());
|
1148 - | out.push('.');
|
1149 - | #[allow(clippy::needless_borrow)]
|
1150 - | out.push_str(&arn_partition.dns_suffix());
|
1151 - | out
|
1152 - | })
|
1153 - | .header("x-amz-account-id", access_point_arn.account_id().to_owned())
|
1154 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1155 - | .property(
|
1156 - | "authSchemes",
|
1157 - | vec![::aws_smithy_types::Document::from({
|
1158 - | let mut out = ::std::collections::HashMap::<
|
1159 - | String,
|
1160 - | ::aws_smithy_types::Document,
|
1161 - | >::with_capacity(
|
1162 - | 4
|
1163 - | );
|
1164 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1165 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1166 - | out.insert(
|
1167 - | "signingName".to_string(),
|
1168 - | "s3-outposts".to_string().into(),
|
1169 - | );
|
1170 - | out.insert(
|
1171 - | "signingRegion".to_string(),
|
1172 - | access_point_arn.region().to_owned().into(),
|
1173 - | );
|
1174 - | out
|
1175 - | })],
|
1176 - | )
|
1177 - | .build());
|
1178 - | }
|
1179 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1180 - | let mut out = String::new();
|
1181 - | out.push_str("Expected an outpost type `accesspoint`, found `");
|
1182 - | #[allow(clippy::needless_borrow)]
|
1183 - | out.push_str(&outpost_type.as_ref() as &str);
|
1184 - | out.push('`');
|
1185 - | out
|
1186 - | }));
|
1187 - | }
|
1188 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1189 - | "Invalid ARN: expected an access point name".to_string(),
|
1190 - | ));
|
1191 - | }
|
1192 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1193 - | "Invalid ARN: Expected a 4-component resource".to_string(),
|
1194 - | ));
|
1195 - | }
|
1196 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1197 - | let mut out = String::new();
|
1198 - | out.push_str(
|
1199 - | "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `",
|
1200 - | );
|
1201 - | #[allow(clippy::needless_borrow)]
|
1202 - | out.push_str(&access_point_arn.account_id());
|
1203 - | out.push('`');
|
1204 - | out
|
1205 - | }));
|
1206 - | }
|
1207 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1208 - | "Invalid ARN: missing account ID".to_string(),
|
1209 - | ));
|
1210 - | }
|
1211 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1212 - | let mut out = String::new();
|
1213 - | out.push_str("Invalid region in ARN: `");
|
1214 - | #[allow(clippy::needless_borrow)]
|
1215 - | out.push_str(&access_point_arn.region());
|
1216 - | out.push_str("` (invalid DNS name)");
|
1217 - | out
|
1218 - | }));
|
1219 - | }
|
1220 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1221 - | let mut out = String::new();
|
1222 - | out.push_str("Client was configured for partition `");
|
1223 - | #[allow(clippy::needless_borrow)]
|
1224 - | out.push_str(&partition_result.name());
|
1225 - | out.push_str("` but ARN has `");
|
1226 - | #[allow(clippy::needless_borrow)]
|
1227 - | out.push_str(&arn_partition.name());
|
1228 - | out.push('`');
|
1229 - | out
|
1230 - | }));
|
1231 - | }
|
1232 - | #[allow(unreachable_code)]
|
1233 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
1234 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
1235 - | )));
|
1236 - | }
|
1237 - | #[allow(unreachable_code)]
|
1238 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
1239 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
1240 - | )));
|
1241 - | }
|
1242 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1243 - | let mut out = String::new();
|
1244 - | out.push_str("Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`., found: `");
|
1245 - | #[allow(clippy::needless_borrow)]
|
1246 - | out.push_str(&outpost_id.as_ref() as &str);
|
1247 - | out.push('`');
|
1248 - | out
|
1249 - | }));
|
1250 - | }
|
1251 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1252 - | "Invalid ARN: The Outpost Id was not set".to_string(),
|
1253 - | ));
|
1254 - | }
|
1255 - | #[allow(unreachable_code)]
|
1256 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
1257 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
1258 - | )));
|
1259 - | }
|
1260 - | }
|
1261 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1262 - | "Invalid ARN: No ARN type specified".to_string(),
|
1263 - | ));
|
1264 - | }
|
1265 - | }
|
1266 - | #[allow(unused_variables)]
|
1267 - | if let Some(bucket) = bucket {
|
1268 - | #[allow(unused_variables)]
|
1269 - | if let Some(bucket_arn) = crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector) {
|
1270 - | #[allow(unused_variables)]
|
1271 - | if let Some(arn_type) = bucket_arn.resource_id().first().cloned() {
|
1272 - | if !((arn_type.as_ref() as &str) == ("")) {
|
1273 - | if (bucket_arn.service()) == ("s3-outposts") {
|
1274 - | #[allow(unused_variables)]
|
1275 - | if let Some(outpost_id) = bucket_arn.resource_id().get(1).cloned() {
|
1276 - | if crate::endpoint_lib::host::is_valid_host_label(outpost_id.as_ref() as &str, false, _diagnostic_collector) {
|
1277 - | #[allow(unused_variables)]
|
1278 - | if let Some(endpoint) = endpoint {
|
1279 - | if (*use_dual_stack) == (true) {
|
1280 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1281 - | "Invalid Configuration: DualStack and custom endpoint are not supported".to_string(),
|
1282 - | ));
|
1283 - | }
|
1284 - | }
|
1285 - | #[allow(unused_variables)]
|
1286 - | if let Some(use_arn_region) = use_arn_region {
|
1287 - | if (*use_arn_region) == (false) {
|
1288 - | if !((bucket_arn.region()) == (region.as_ref() as &str)) {
|
1289 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1290 - | let mut out = String::new();
|
1291 - | out.push_str("Invalid configuration: region from ARN `");
|
1292 - | #[allow(clippy::needless_borrow)]
|
1293 - | out.push_str(&bucket_arn.region());
|
1294 - | out.push_str("` does not match client region `");
|
1295 - | #[allow(clippy::needless_borrow)]
|
1296 - | out.push_str(®ion.as_ref() as &str);
|
1297 - | out.push_str("` and UseArnRegion is `false`");
|
1298 - | out
|
1299 - | }));
|
1300 - | }
|
1301 - | }
|
1302 - | }
|
1303 - | #[allow(unused_variables)]
|
1304 - | if let Some(arn_partition) = partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector) {
|
1305 - | #[allow(unused_variables)]
|
1306 - | if let Some(partition_result) =
|
1307 - | partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
|
1308 - | {
|
1309 - | if (arn_partition.name()) == (partition_result.name()) {
|
1310 - | if crate::endpoint_lib::host::is_valid_host_label(bucket_arn.region(), true, _diagnostic_collector) {
|
1311 - | if !((bucket_arn.account_id()) == ("")) {
|
1312 - | if crate::endpoint_lib::host::is_valid_host_label(
|
1313 - | bucket_arn.account_id(),
|
1314 - | false,
|
1315 - | _diagnostic_collector,
|
1316 - | ) {
|
1317 - | #[allow(unused_variables)]
|
1318 - | if let Some(account_id) = account_id {
|
1319 - | if !((account_id.as_ref() as &str) == (bucket_arn.account_id())) {
|
1320 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1321 - | let mut out = String::new();
|
1322 - | out.push_str("Invalid ARN: the accountId specified in the ARN (`");
|
1323 - | #[allow(clippy::needless_borrow)]
|
1324 - | out.push_str(&bucket_arn.account_id());
|
1325 - | out.push_str("`) does not match the parameter (`");
|
1326 - | #[allow(clippy::needless_borrow)]
|
1327 - | out.push_str(&account_id.as_ref() as &str);
|
1328 - | out.push_str("`)");
|
1329 - | out
|
1330 - | }));
|
1331 - | }
|
1332 - | }
|
1333 - | #[allow(unused_variables)]
|
1334 - | if let Some(outpost_type) = bucket_arn.resource_id().get(2).cloned() {
|
1335 - | #[allow(unused_variables)]
|
1336 - | if let Some(bucket_name) = bucket_arn.resource_id().get(3).cloned() {
|
1337 - | if (outpost_type.as_ref() as &str) == ("bucket") {
|
1338 - | if (*use_fips) == (true) {
|
1339 - | if (*use_dual_stack) == (true) {
|
1340 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1341 - | .url({
|
1342 - | let mut out = String::new();
|
1343 - | out.push_str("https://s3-outposts-fips.");
|
1344 - | #[allow(clippy::needless_borrow)]
|
1345 - | out.push_str(&bucket_arn.region());
|
1346 - | out.push('.');
|
1347 - | #[allow(clippy::needless_borrow)]
|
1348 - | out.push_str(&arn_partition.dual_stack_dns_suffix());
|
1349 - | out
|
1350 - | })
|
1351 - | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1352 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1353 - | .property(
|
1354 - | "authSchemes",
|
1355 - | vec![::aws_smithy_types::Document::from({
|
1356 - | let mut out = ::std::collections::HashMap::<
|
1357 - | String,
|
1358 - | ::aws_smithy_types::Document,
|
1359 - | >::with_capacity(
|
1360 - | 4
|
1361 - | );
|
1362 - | out.insert(
|
1363 - | "disableDoubleEncoding".to_string(),
|
1364 - | true.into(),
|
1365 - | );
|
1366 - | out.insert(
|
1367 - | "name".to_string(),
|
1368 - | "sigv4".to_string().into(),
|
1369 - | );
|
1370 - | out.insert(
|
1371 - | "signingName".to_string(),
|
1372 - | "s3-outposts".to_string().into(),
|
1373 - | );
|
1374 - | out.insert(
|
1375 - | "signingRegion".to_string(),
|
1376 - | bucket_arn.region().to_owned().into(),
|
1377 - | );
|
1378 - | out
|
1379 - | })],
|
1380 - | )
|
1381 - | .build());
|
1382 - | }
|
1383 - | }
|
1384 - | if (*use_fips) == (true) {
|
1385 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1386 - | .url({
|
1387 - | let mut out = String::new();
|
1388 - | out.push_str("https://s3-outposts-fips.");
|
1389 - | #[allow(clippy::needless_borrow)]
|
1390 - | out.push_str(&bucket_arn.region());
|
1391 - | out.push('.');
|
1392 - | #[allow(clippy::needless_borrow)]
|
1393 - | out.push_str(&arn_partition.dns_suffix());
|
1394 - | out
|
1395 - | })
|
1396 - | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1397 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1398 - | .property(
|
1399 - | "authSchemes",
|
1400 - | vec![::aws_smithy_types::Document::from({
|
1401 - | let mut out = ::std::collections::HashMap::<
|
1402 - | String,
|
1403 - | ::aws_smithy_types::Document,
|
1404 - | >::with_capacity(
|
1405 - | 4
|
1406 - | );
|
1407 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1408 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1409 - | out.insert(
|
1410 - | "signingName".to_string(),
|
1411 - | "s3-outposts".to_string().into(),
|
1412 - | );
|
1413 - | out.insert(
|
1414 - | "signingRegion".to_string(),
|
1415 - | bucket_arn.region().to_owned().into(),
|
1416 - | );
|
1417 - | out
|
1418 - | })],
|
1419 - | )
|
1420 - | .build());
|
1421 - | }
|
1422 - | if (*use_dual_stack) == (true) {
|
1423 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1424 - | .url({
|
1425 - | let mut out = String::new();
|
1426 - | out.push_str("https://s3-outposts.");
|
1427 - | #[allow(clippy::needless_borrow)]
|
1428 - | out.push_str(&bucket_arn.region());
|
1429 - | out.push('.');
|
1430 - | #[allow(clippy::needless_borrow)]
|
1431 - | out.push_str(&arn_partition.dual_stack_dns_suffix());
|
1432 - | out
|
1433 - | })
|
1434 - | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1435 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1436 - | .property(
|
1437 - | "authSchemes",
|
1438 - | vec![::aws_smithy_types::Document::from({
|
1439 - | let mut out = ::std::collections::HashMap::<
|
1440 - | String,
|
1441 - | ::aws_smithy_types::Document,
|
1442 - | >::with_capacity(
|
1443 - | 4
|
1444 - | );
|
1445 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1446 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1447 - | out.insert(
|
1448 - | "signingName".to_string(),
|
1449 - | "s3-outposts".to_string().into(),
|
1450 - | );
|
1451 - | out.insert(
|
1452 - | "signingRegion".to_string(),
|
1453 - | bucket_arn.region().to_owned().into(),
|
1454 - | );
|
1455 - | out
|
1456 - | })],
|
1457 - | )
|
1458 - | .build());
|
1459 - | }
|
1460 - | #[allow(unused_variables)]
|
1461 - | if let Some(endpoint) = endpoint {
|
1462 - | #[allow(unused_variables)]
|
1463 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
|
1464 - | endpoint.as_ref() as &str,
|
1465 - | _diagnostic_collector,
|
1466 - | ) {
|
1467 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1468 - | .url({
|
1469 - | let mut out = String::new();
|
1470 - | #[allow(clippy::needless_borrow)]
|
1471 - | out.push_str(&url.scheme());
|
1472 - | out.push_str("://");
|
1473 - | #[allow(clippy::needless_borrow)]
|
1474 - | out.push_str(&url.authority());
|
1475 - | #[allow(clippy::needless_borrow)]
|
1476 - | out.push_str(&url.path());
|
1477 - | out
|
1478 - | })
|
1479 - | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1480 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1481 - | .property(
|
1482 - | "authSchemes",
|
1483 - | vec![::aws_smithy_types::Document::from({
|
1484 - | let mut out = ::std::collections::HashMap::<
|
1485 - | String,
|
1486 - | ::aws_smithy_types::Document,
|
1487 - | >::with_capacity(
|
1488 - | 4
|
1489 - | );
|
1490 - | out.insert(
|
1491 - | "disableDoubleEncoding".to_string(),
|
1492 - | true.into(),
|
1493 - | );
|
1494 - | out.insert(
|
1495 - | "name".to_string(),
|
1496 - | "sigv4".to_string().into(),
|
1497 - | );
|
1498 - | out.insert(
|
1499 - | "signingName".to_string(),
|
1500 - | "s3-outposts".to_string().into(),
|
1501 - | );
|
1502 - | out.insert(
|
1503 - | "signingRegion".to_string(),
|
1504 - | bucket_arn.region().to_owned().into(),
|
1505 - | );
|
1506 - | out
|
1507 - | })],
|
1508 - | )
|
1509 - | .build());
|
1510 - | }
|
1511 - | }
|
1512 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1513 - | .url({
|
1514 - | let mut out = String::new();
|
1515 - | out.push_str("https://s3-outposts.");
|
1516 - | #[allow(clippy::needless_borrow)]
|
1517 - | out.push_str(&bucket_arn.region());
|
1518 - | out.push('.');
|
1519 - | #[allow(clippy::needless_borrow)]
|
1520 - | out.push_str(&arn_partition.dns_suffix());
|
1521 - | out
|
1522 - | })
|
1523 - | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1524 - | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1525 - | .property(
|
1526 - | "authSchemes",
|
1527 - | vec![::aws_smithy_types::Document::from({
|
1528 - | let mut out = ::std::collections::HashMap::<
|
1529 - | String,
|
1530 - | ::aws_smithy_types::Document,
|
1531 - | >::with_capacity(
|
1532 - | 4
|
1533 - | );
|
1534 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1535 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1536 - | out.insert(
|
1537 - | "signingName".to_string(),
|
1538 - | "s3-outposts".to_string().into(),
|
1539 - | );
|
1540 - | out.insert(
|
1541 - | "signingRegion".to_string(),
|
1542 - | bucket_arn.region().to_owned().into(),
|
1543 - | );
|
1544 - | out
|
1545 - | })],
|
1546 - | )
|
1547 - | .build());
|
1548 - | }
|
1549 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1550 - | let mut out = String::new();
|
1551 - | out.push_str("Invalid ARN: Expected an outpost type `bucket`, found `");
|
1552 - | #[allow(clippy::needless_borrow)]
|
1553 - | out.push_str(&outpost_type.as_ref() as &str);
|
1554 - | out.push('`');
|
1555 - | out
|
1556 - | }));
|
1557 - | }
|
1558 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1559 - | "Invalid ARN: expected a bucket name".to_string(),
|
1560 - | ));
|
1561 - | }
|
1562 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1563 - | "Invalid ARN: Expected a 4-component resource".to_string(),
|
1564 - | ));
|
1565 - | }
|
1566 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1567 - | let mut out = String::new();
|
1568 - | out.push_str(
|
1569 - | "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `",
|
1570 - | );
|
1571 - | #[allow(clippy::needless_borrow)]
|
1572 - | out.push_str(&bucket_arn.account_id());
|
1573 - | out.push('`');
|
1574 - | out
|
1575 - | }));
|
1576 - | }
|
1577 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1578 - | "Invalid ARN: missing account ID".to_string(),
|
1579 - | ));
|
1580 - | }
|
1581 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1582 - | let mut out = String::new();
|
1583 - | out.push_str("Invalid region in ARN: `");
|
1584 - | #[allow(clippy::needless_borrow)]
|
1585 - | out.push_str(&bucket_arn.region());
|
1586 - | out.push_str("` (invalid DNS name)");
|
1587 - | out
|
1588 - | }));
|
1589 - | }
|
1590 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1591 - | let mut out = String::new();
|
1592 - | out.push_str("Client was configured for partition `");
|
1593 - | #[allow(clippy::needless_borrow)]
|
1594 - | out.push_str(&partition_result.name());
|
1595 - | out.push_str("` but ARN has `");
|
1596 - | #[allow(clippy::needless_borrow)]
|
1597 - | out.push_str(&arn_partition.name());
|
1598 - | out.push('`');
|
1599 - | out
|
1600 - | }));
|
1601 - | }
|
1602 - | #[allow(unreachable_code)]
|
1603 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
1604 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
1605 - | )));
|
1606 - | }
|
1607 - | #[allow(unreachable_code)]
|
1608 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
1609 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
1610 - | )));
|
1611 - | }
|
1612 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
1613 - | let mut out = String::new();
|
1614 - | out.push_str("Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`., found: `");
|
1615 - | #[allow(clippy::needless_borrow)]
|
1616 - | out.push_str(&outpost_id.as_ref() as &str);
|
1617 - | out.push('`');
|
1618 - | out
|
1619 - | }));
|
1620 - | }
|
1621 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1622 - | "Invalid ARN: The Outpost Id was not set".to_string(),
|
1623 - | ));
|
1624 - | }
|
1625 - | #[allow(unreachable_code)]
|
1626 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
1627 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
1628 - | )));
|
1629 - | }
|
1630 - | }
|
1631 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1632 - | "Invalid ARN: No ARN type specified".to_string(),
|
1633 - | ));
|
1634 - | }
|
1635 - | }
|
1636 - | #[allow(unused_variables)]
|
1637 - | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
1638 - | if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, true, _diagnostic_collector) {
|
1639 - | #[allow(unused_variables)]
|
1640 - | if let Some(requires_account_id) = requires_account_id {
|
1641 - | if (*requires_account_id) == (true) {
|
1642 - | if !(account_id.is_some()) {
|
1643 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1644 - | "AccountId is required but not set".to_string(),
|
1645 - | ));
|
1646 - | }
|
1647 - | }
|
1648 - | }
|
1649 - | #[allow(unused_variables)]
|
1650 - | if let Some(account_id) = account_id {
|
1651 - | if !(crate::endpoint_lib::host::is_valid_host_label(account_id.as_ref() as &str, false, _diagnostic_collector)) {
|
1652 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1653 - | "AccountId must only contain a-z, A-Z, 0-9 and `-`.".to_string(),
|
1654 - | ));
|
1655 - | }
|
1656 - | }
|
1657 - | #[allow(unused_variables)]
|
1658 - | if let Some(endpoint) = endpoint {
|
1659 - | #[allow(unused_variables)]
|
1660 - | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
1661 - | if (*use_dual_stack) == (true) {
|
1662 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1663 - | "Invalid Configuration: DualStack and custom endpoint are not supported".to_string(),
|
1664 - | ));
|
1665 - | }
|
1666 - | #[allow(unused_variables)]
|
1667 - | if let Some(requires_account_id) = requires_account_id {
|
1668 - | if (*requires_account_id) == (true) {
|
1669 - | #[allow(unused_variables)]
|
1670 - | if let Some(account_id) = account_id {
|
1671 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1672 - | .url({
|
1673 - | let mut out = String::new();
|
1674 - | #[allow(clippy::needless_borrow)]
|
1675 - | out.push_str(&url.scheme());
|
1676 - | out.push_str("://");
|
1677 - | #[allow(clippy::needless_borrow)]
|
1678 - | out.push_str(&account_id.as_ref() as &str);
|
1679 - | out.push('.');
|
1680 - | #[allow(clippy::needless_borrow)]
|
1681 - | out.push_str(&url.authority());
|
1682 - | #[allow(clippy::needless_borrow)]
|
1683 - | out.push_str(&url.path());
|
1684 - | out
|
1685 - | })
|
1686 - | .property(
|
1687 - | "authSchemes",
|
1688 - | vec![::aws_smithy_types::Document::from({
|
1689 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1690 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1691 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1692 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1693 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1694 - | out
|
1695 - | })],
|
1696 - | )
|
1697 - | .build());
|
1698 - | }
|
1699 - | }
|
1700 - | }
|
1701 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1702 - | .url({
|
1703 - | let mut out = String::new();
|
1704 - | #[allow(clippy::needless_borrow)]
|
1705 - | out.push_str(&url.scheme());
|
1706 - | out.push_str("://");
|
1707 - | #[allow(clippy::needless_borrow)]
|
1708 - | out.push_str(&url.authority());
|
1709 - | #[allow(clippy::needless_borrow)]
|
1710 - | out.push_str(&url.path());
|
1711 - | out
|
1712 - | })
|
1713 - | .property(
|
1714 - | "authSchemes",
|
1715 - | vec![::aws_smithy_types::Document::from({
|
1716 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1717 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1718 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1719 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1720 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1721 - | out
|
1722 - | })],
|
1723 - | )
|
1724 - | .build());
|
1725 - | }
|
1726 - | }
|
1727 - | if (*use_fips) == (true) {
|
1728 - | if (*use_dual_stack) == (true) {
|
1729 - | #[allow(unused_variables)]
|
1730 - | if let Some(requires_account_id) = requires_account_id {
|
1731 - | if (*requires_account_id) == (true) {
|
1732 - | #[allow(unused_variables)]
|
1733 - | if let Some(account_id) = account_id {
|
1734 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1735 - | .url({
|
1736 - | let mut out = String::new();
|
1737 - | out.push_str("https://");
|
1738 - | #[allow(clippy::needless_borrow)]
|
1739 - | out.push_str(&account_id.as_ref() as &str);
|
1740 - | out.push_str(".s3-control-fips.dualstack.");
|
1741 - | #[allow(clippy::needless_borrow)]
|
1742 - | out.push_str(®ion.as_ref() as &str);
|
1743 - | out.push('.');
|
1744 - | #[allow(clippy::needless_borrow)]
|
1745 - | out.push_str(&partition_result.dns_suffix());
|
1746 - | out
|
1747 - | })
|
1748 - | .property(
|
1749 - | "authSchemes",
|
1750 - | vec![::aws_smithy_types::Document::from({
|
1751 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1752 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1753 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1754 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1755 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1756 - | out
|
1757 - | })],
|
1758 - | )
|
1759 - | .build());
|
1760 - | }
|
1761 - | }
|
1762 - | }
|
1763 - | }
|
1764 - | }
|
1765 - | if (*use_fips) == (true) {
|
1766 - | if (*use_dual_stack) == (true) {
|
1767 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1768 - | .url({
|
1769 - | let mut out = String::new();
|
1770 - | out.push_str("https://s3-control-fips.dualstack.");
|
1771 - | #[allow(clippy::needless_borrow)]
|
1772 - | out.push_str(®ion.as_ref() as &str);
|
1773 - | out.push('.');
|
1774 - | #[allow(clippy::needless_borrow)]
|
1775 - | out.push_str(&partition_result.dns_suffix());
|
1776 - | out
|
1777 - | })
|
1778 - | .property(
|
1779 - | "authSchemes",
|
1780 - | vec![::aws_smithy_types::Document::from({
|
1781 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1782 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1783 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1784 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1785 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1786 - | out
|
1787 - | })],
|
1788 - | )
|
1789 - | .build());
|
1790 - | }
|
1791 - | }
|
1792 - | if (*use_fips) == (true) {
|
1793 - | if (*use_dual_stack) == (false) {
|
1794 - | #[allow(unused_variables)]
|
1795 - | if let Some(requires_account_id) = requires_account_id {
|
1796 - | if (*requires_account_id) == (true) {
|
1797 - | #[allow(unused_variables)]
|
1798 - | if let Some(account_id) = account_id {
|
1799 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1800 - | .url({
|
1801 - | let mut out = String::new();
|
1802 - | out.push_str("https://");
|
1803 - | #[allow(clippy::needless_borrow)]
|
1804 - | out.push_str(&account_id.as_ref() as &str);
|
1805 - | out.push_str(".s3-control-fips.");
|
1806 - | #[allow(clippy::needless_borrow)]
|
1807 - | out.push_str(®ion.as_ref() as &str);
|
1808 - | out.push('.');
|
1809 - | #[allow(clippy::needless_borrow)]
|
1810 - | out.push_str(&partition_result.dns_suffix());
|
1811 - | out
|
1812 - | })
|
1813 - | .property(
|
1814 - | "authSchemes",
|
1815 - | vec![::aws_smithy_types::Document::from({
|
1816 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1817 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1818 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1819 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1820 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1821 - | out
|
1822 - | })],
|
1823 - | )
|
1824 - | .build());
|
1825 - | }
|
1826 - | }
|
1827 - | }
|
1828 - | }
|
1829 - | }
|
1830 - | if (*use_fips) == (true) {
|
1831 - | if (*use_dual_stack) == (false) {
|
1832 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1833 - | .url({
|
1834 - | let mut out = String::new();
|
1835 - | out.push_str("https://s3-control-fips.");
|
1836 - | #[allow(clippy::needless_borrow)]
|
1837 - | out.push_str(®ion.as_ref() as &str);
|
1838 - | out.push('.');
|
1839 - | #[allow(clippy::needless_borrow)]
|
1840 - | out.push_str(&partition_result.dns_suffix());
|
1841 - | out
|
1842 - | })
|
1843 - | .property(
|
1844 - | "authSchemes",
|
1845 - | vec![::aws_smithy_types::Document::from({
|
1846 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1847 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1848 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1849 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1850 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1851 - | out
|
1852 - | })],
|
1853 - | )
|
1854 - | .build());
|
1855 - | }
|
1856 - | }
|
1857 - | if (*use_fips) == (false) {
|
1858 - | if (*use_dual_stack) == (true) {
|
1859 - | #[allow(unused_variables)]
|
1860 - | if let Some(requires_account_id) = requires_account_id {
|
1861 - | if (*requires_account_id) == (true) {
|
1862 - | #[allow(unused_variables)]
|
1863 - | if let Some(account_id) = account_id {
|
1864 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1865 - | .url({
|
1866 - | let mut out = String::new();
|
1867 - | out.push_str("https://");
|
1868 - | #[allow(clippy::needless_borrow)]
|
1869 - | out.push_str(&account_id.as_ref() as &str);
|
1870 - | out.push_str(".s3-control.dualstack.");
|
1871 - | #[allow(clippy::needless_borrow)]
|
1872 - | out.push_str(®ion.as_ref() as &str);
|
1873 - | out.push('.');
|
1874 - | #[allow(clippy::needless_borrow)]
|
1875 - | out.push_str(&partition_result.dns_suffix());
|
1876 - | out
|
1877 - | })
|
1878 - | .property(
|
1879 - | "authSchemes",
|
1880 - | vec![::aws_smithy_types::Document::from({
|
1881 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1882 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1883 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1884 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1885 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1886 - | out
|
1887 - | })],
|
1888 - | )
|
1889 - | .build());
|
1890 - | }
|
1891 - | }
|
1892 - | }
|
1893 - | }
|
1894 - | }
|
1895 - | if (*use_fips) == (false) {
|
1896 - | if (*use_dual_stack) == (true) {
|
1897 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1898 - | .url({
|
1899 - | let mut out = String::new();
|
1900 - | out.push_str("https://s3-control.dualstack.");
|
1901 - | #[allow(clippy::needless_borrow)]
|
1902 - | out.push_str(®ion.as_ref() as &str);
|
1903 - | out.push('.');
|
1904 - | #[allow(clippy::needless_borrow)]
|
1905 - | out.push_str(&partition_result.dns_suffix());
|
1906 - | out
|
1907 - | })
|
1908 - | .property(
|
1909 - | "authSchemes",
|
1910 - | vec![::aws_smithy_types::Document::from({
|
1911 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1912 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1913 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1914 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1915 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1916 - | out
|
1917 - | })],
|
1918 - | )
|
1919 - | .build());
|
1920 - | }
|
1921 - | }
|
1922 - | if (*use_fips) == (false) {
|
1923 - | if (*use_dual_stack) == (false) {
|
1924 - | #[allow(unused_variables)]
|
1925 - | if let Some(requires_account_id) = requires_account_id {
|
1926 - | if (*requires_account_id) == (true) {
|
1927 - | #[allow(unused_variables)]
|
1928 - | if let Some(account_id) = account_id {
|
1929 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1930 - | .url({
|
1931 - | let mut out = String::new();
|
1932 - | out.push_str("https://");
|
1933 - | #[allow(clippy::needless_borrow)]
|
1934 - | out.push_str(&account_id.as_ref() as &str);
|
1935 - | out.push_str(".s3-control.");
|
1936 - | #[allow(clippy::needless_borrow)]
|
1937 - | out.push_str(®ion.as_ref() as &str);
|
1938 - | out.push('.');
|
1939 - | #[allow(clippy::needless_borrow)]
|
1940 - | out.push_str(&partition_result.dns_suffix());
|
1941 - | out
|
1942 - | })
|
1943 - | .property(
|
1944 - | "authSchemes",
|
1945 - | vec![::aws_smithy_types::Document::from({
|
1946 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1947 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1948 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1949 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1950 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1951 - | out
|
1952 - | })],
|
1953 - | )
|
1954 - | .build());
|
1955 - | }
|
1956 - | }
|
1957 - | }
|
1958 - | }
|
1959 - | }
|
1960 - | if (*use_fips) == (false) {
|
1961 - | if (*use_dual_stack) == (false) {
|
1962 - | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1963 - | .url({
|
1964 - | let mut out = String::new();
|
1965 - | out.push_str("https://s3-control.");
|
1966 - | #[allow(clippy::needless_borrow)]
|
1967 - | out.push_str(®ion.as_ref() as &str);
|
1968 - | out.push('.');
|
1969 - | #[allow(clippy::needless_borrow)]
|
1970 - | out.push_str(&partition_result.dns_suffix());
|
1971 - | out
|
1972 - | })
|
1973 - | .property(
|
1974 - | "authSchemes",
|
1975 - | vec![::aws_smithy_types::Document::from({
|
1976 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1977 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1978 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1979 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1980 - | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1981 - | out
|
1982 - | })],
|
1983 - | )
|
1984 - | .build());
|
1985 - | }
|
1986 - | }
|
1987 - | #[allow(unreachable_code)]
|
1988 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
1989 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
1990 - | )));
|
1991 - | }
|
1992 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
1993 - | "Invalid region: region was not a valid DNS name.".to_string(),
|
1994 - | ));
|
1995 - | }
|
1996 - | #[allow(unreachable_code)]
|
1997 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
1998 - | "No rules matched these parameters. This is a bug. {_params:?}"
|
1999 - | )));
|
2000 - | }
|
2001 - | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
2002 - | "Region must be set".to_string(),
|
2003 - | ));
|
2004 - | }
|