39 39 | #[allow(unused_variables)]
|
40 40 | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
41 41 | if (partition_result.name()) == ("aws") {
|
42 42 | if (*use_fips) == (false) {
|
43 43 | if (*use_dual_stack) == (true) {
|
44 44 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
45 45 | .url("https://iam.global.api.aws".to_string())
|
46 46 | .property(
|
47 47 | "authSchemes",
|
48 48 | vec![::aws_smithy_types::Document::from({
|
49 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
49 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
50 50 | out.insert("name".to_string(), "sigv4".to_string().into());
|
51 51 | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
52 52 | out
|
53 53 | })],
|
54 54 | )
|
55 55 | .build());
|
56 56 | }
|
57 57 | }
|
58 58 | }
|
59 59 | if (partition_result.name()) == ("aws") {
|
60 60 | if (*use_fips) == (true) {
|
61 61 | if (*use_dual_stack) == (true) {
|
62 62 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
63 63 | .url("https://iam-fips.global.api.aws".to_string())
|
64 64 | .property(
|
65 65 | "authSchemes",
|
66 66 | vec![::aws_smithy_types::Document::from({
|
67 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
67 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
68 68 | out.insert("name".to_string(), "sigv4".to_string().into());
|
69 69 | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
70 70 | out
|
71 71 | })],
|
72 72 | )
|
73 73 | .build());
|
74 74 | }
|
75 75 | }
|
76 76 | }
|
77 77 | if (partition_result.name()) == ("aws-cn") {
|
78 78 | if (*use_fips) == (false) {
|
79 79 | if (*use_dual_stack) == (true) {
|
80 80 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
81 81 | .url("https://iam.global.api.amazonwebservices.com.cn".to_string())
|
82 82 | .property(
|
83 83 | "authSchemes",
|
84 84 | vec![::aws_smithy_types::Document::from({
|
85 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
85 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
86 86 | out.insert("name".to_string(), "sigv4".to_string().into());
|
87 87 | out.insert("signingRegion".to_string(), "cn-north-1".to_string().into());
|
88 88 | out
|
89 89 | })],
|
90 90 | )
|
91 91 | .build());
|
92 92 | }
|
93 93 | }
|
94 94 | }
|
95 95 | if (partition_result.name()) == ("aws-cn") {
|
96 96 | if (*use_fips) == (false) {
|
97 97 | if (*use_dual_stack) == (false) {
|
98 98 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
99 99 | .url("https://iam.cn-north-1.amazonaws.com.cn".to_string())
|
100 100 | .property(
|
101 101 | "authSchemes",
|
102 102 | vec![::aws_smithy_types::Document::from({
|
103 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
103 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
104 104 | out.insert("name".to_string(), "sigv4".to_string().into());
|
105 105 | out.insert("signingRegion".to_string(), "cn-north-1".to_string().into());
|
106 106 | out
|
107 107 | })],
|
108 108 | )
|
109 109 | .build());
|
110 110 | }
|
111 111 | }
|
112 112 | }
|
113 113 | if (partition_result.name()) == ("aws-us-gov") {
|
114 114 | if (*use_fips) == (false) {
|
115 115 | if (*use_dual_stack) == (true) {
|
116 116 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
117 117 | .url("https://iam.us-gov.api.aws".to_string())
|
118 118 | .property(
|
119 119 | "authSchemes",
|
120 120 | vec![::aws_smithy_types::Document::from({
|
121 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
121 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
122 122 | out.insert("name".to_string(), "sigv4".to_string().into());
|
123 123 | out.insert("signingRegion".to_string(), "us-gov-west-1".to_string().into());
|
124 124 | out
|
125 125 | })],
|
126 126 | )
|
127 127 | .build());
|
128 128 | }
|
129 129 | }
|
130 130 | }
|
131 131 | if (partition_result.name()) == ("aws-us-gov") {
|
132 132 | if (*use_fips) == (true) {
|
133 133 | if (*use_dual_stack) == (true) {
|
134 134 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
135 135 | .url("https://iam.us-gov.api.aws".to_string())
|
136 136 | .property(
|
137 137 | "authSchemes",
|
138 138 | vec![::aws_smithy_types::Document::from({
|
139 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
139 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
140 140 | out.insert("name".to_string(), "sigv4".to_string().into());
|
141 141 | out.insert("signingRegion".to_string(), "us-gov-west-1".to_string().into());
|
142 142 | out
|
143 143 | })],
|
144 144 | )
|
145 145 | .build());
|
146 146 | }
|
147 147 | }
|
148 148 | }
|
149 149 | if (partition_result.name()) == ("aws-us-gov") {
|
150 150 | if (*use_fips) == (false) {
|
151 151 | if (*use_dual_stack) == (false) {
|
152 152 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
153 153 | .url("https://iam.us-gov.amazonaws.com".to_string())
|
154 154 | .property(
|
155 155 | "authSchemes",
|
156 156 | vec![::aws_smithy_types::Document::from({
|
157 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
157 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
158 158 | out.insert("name".to_string(), "sigv4".to_string().into());
|
159 159 | out.insert("signingRegion".to_string(), "us-gov-west-1".to_string().into());
|
160 160 | out
|
161 161 | })],
|
162 162 | )
|
163 163 | .build());
|
164 164 | }
|
165 165 | }
|
166 166 | }
|
167 167 | if (partition_result.name()) == ("aws-us-gov") {
|
168 168 | if (*use_fips) == (true) {
|
169 169 | if (*use_dual_stack) == (false) {
|
170 170 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
171 171 | .url("https://iam.us-gov.amazonaws.com".to_string())
|
172 172 | .property(
|
173 173 | "authSchemes",
|
174 174 | vec![::aws_smithy_types::Document::from({
|
175 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
175 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
176 176 | out.insert("name".to_string(), "sigv4".to_string().into());
|
177 177 | out.insert("signingRegion".to_string(), "us-gov-west-1".to_string().into());
|
178 178 | out
|
179 179 | })],
|
180 180 | )
|
181 181 | .build());
|
182 182 | }
|
183 183 | }
|
184 184 | }
|
185 185 | if (partition_result.name()) == ("aws-iso") {
|
186 186 | if (*use_fips) == (false) {
|
187 187 | if (*use_dual_stack) == (false) {
|
188 188 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
189 189 | .url("https://iam.us-iso-east-1.c2s.ic.gov".to_string())
|
190 190 | .property(
|
191 191 | "authSchemes",
|
192 192 | vec![::aws_smithy_types::Document::from({
|
193 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
193 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
194 194 | out.insert("name".to_string(), "sigv4".to_string().into());
|
195 195 | out.insert("signingRegion".to_string(), "us-iso-east-1".to_string().into());
|
196 196 | out
|
197 197 | })],
|
198 198 | )
|
199 199 | .build());
|
200 200 | }
|
201 201 | }
|
202 202 | }
|
203 203 | if (partition_result.name()) == ("aws-iso") {
|
204 204 | if (*use_fips) == (true) {
|
205 205 | if (*use_dual_stack) == (false) {
|
206 206 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
207 207 | .url("https://iam-fips.us-iso-east-1.c2s.ic.gov".to_string())
|
208 208 | .property(
|
209 209 | "authSchemes",
|
210 210 | vec![::aws_smithy_types::Document::from({
|
211 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
211 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
212 212 | out.insert("name".to_string(), "sigv4".to_string().into());
|
213 213 | out.insert("signingRegion".to_string(), "us-iso-east-1".to_string().into());
|
214 214 | out
|
215 215 | })],
|
216 216 | )
|
217 217 | .build());
|
218 218 | }
|
219 219 | }
|
220 220 | }
|
221 221 | if (partition_result.name()) == ("aws-iso-b") {
|
222 222 | if (*use_fips) == (false) {
|
223 223 | if (*use_dual_stack) == (false) {
|
224 224 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
225 225 | .url("https://iam.us-isob-east-1.sc2s.sgov.gov".to_string())
|
226 226 | .property(
|
227 227 | "authSchemes",
|
228 228 | vec![::aws_smithy_types::Document::from({
|
229 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
229 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
230 230 | out.insert("name".to_string(), "sigv4".to_string().into());
|
231 231 | out.insert("signingRegion".to_string(), "us-isob-east-1".to_string().into());
|
232 232 | out
|
233 233 | })],
|
234 234 | )
|
235 235 | .build());
|
236 236 | }
|
237 237 | }
|
238 238 | }
|
239 239 | if (partition_result.name()) == ("aws-iso-b") {
|
240 240 | if (*use_fips) == (true) {
|
241 241 | if (*use_dual_stack) == (false) {
|
242 242 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
243 243 | .url("https://iam-fips.us-isob-east-1.sc2s.sgov.gov".to_string())
|
244 244 | .property(
|
245 245 | "authSchemes",
|
246 246 | vec![::aws_smithy_types::Document::from({
|
247 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
247 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
248 248 | out.insert("name".to_string(), "sigv4".to_string().into());
|
249 249 | out.insert("signingRegion".to_string(), "us-isob-east-1".to_string().into());
|
250 250 | out
|
251 251 | })],
|
252 252 | )
|
253 253 | .build());
|
254 254 | }
|
255 255 | }
|
256 256 | }
|
257 257 | if (partition_result.name()) == ("aws-iso-e") {
|
258 258 | if (*use_fips) == (false) {
|
259 259 | if (*use_dual_stack) == (false) {
|
260 260 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
261 261 | .url("https://iam.eu-isoe-west-1.cloud.adc-e.uk".to_string())
|
262 262 | .property(
|
263 263 | "authSchemes",
|
264 264 | vec![::aws_smithy_types::Document::from({
|
265 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
265 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
266 266 | out.insert("name".to_string(), "sigv4".to_string().into());
|
267 267 | out.insert("signingRegion".to_string(), "eu-isoe-west-1".to_string().into());
|
268 268 | out
|
269 269 | })],
|
270 270 | )
|
271 271 | .build());
|
272 272 | }
|
273 273 | }
|
274 274 | }
|
275 275 | if (partition_result.name()) == ("aws-iso-f") {
|
276 276 | if (*use_fips) == (false) {
|
277 277 | if (*use_dual_stack) == (false) {
|
278 278 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
279 279 | .url("https://iam.us-isof-south-1.csp.hci.ic.gov".to_string())
|
280 280 | .property(
|
281 281 | "authSchemes",
|
282 282 | vec![::aws_smithy_types::Document::from({
|
283 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
283 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
284 284 | out.insert("name".to_string(), "sigv4".to_string().into());
|
285 285 | out.insert("signingRegion".to_string(), "us-isof-south-1".to_string().into());
|
286 286 | out
|
287 287 | })],
|
288 288 | )
|
289 289 | .build());
|
290 290 | }
|
291 291 | }
|
292 292 | }
|
293 293 | if (partition_result.name()) == ("aws-eusc") {
|
294 294 | if (*use_fips) == (false) {
|
295 295 | if (*use_dual_stack) == (false) {
|
296 296 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
297 297 | .url("https://iam.eusc-de-east-1.amazonaws.eu".to_string())
|
298 298 | .property(
|
299 299 | "authSchemes",
|
300 300 | vec![::aws_smithy_types::Document::from({
|
301 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
301 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
302 302 | out.insert("name".to_string(), "sigv4".to_string().into());
|
303 303 | out.insert("signingRegion".to_string(), "eusc-de-east-1".to_string().into());
|
304 304 | out
|
305 305 | })],
|
306 306 | )
|
307 307 | .build());
|
308 308 | }
|
309 309 | }
|
310 310 | }
|
311 311 | if (*use_fips) == (true) {
|
312 312 | if (*use_dual_stack) == (true) {
|
313 313 | if (true) == (partition_result.supports_fips()) {
|
314 314 | if (true) == (partition_result.supports_dual_stack()) {
|
315 315 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
316 316 | .url({
|
317 317 | let mut out = String::new();
|
318 318 | out.push_str("https://iam-fips.");
|
319 319 | #[allow(clippy::needless_borrow)]
|
320 320 | out.push_str(&partition_result.dual_stack_dns_suffix());
|
321 321 | out
|
322 322 | })
|
323 323 | .property(
|
324 324 | "authSchemes",
|
325 325 | vec![::aws_smithy_types::Document::from({
|
326 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
326 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
327 327 | out.insert("name".to_string(), "sigv4".to_string().into());
|
328 328 | out.insert("signingRegion".to_string(), partition_result.implicit_global_region().to_owned().into());
|
329 329 | out
|
330 330 | })],
|
331 331 | )
|
332 332 | .build());
|
333 333 | }
|
334 334 | }
|
335 335 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
336 336 | "FIPS and DualStack are enabled, but this partition does not support one or both".to_string(),
|
337 337 | ));
|
338 338 | }
|
339 339 | }
|
340 340 | if (*use_fips) == (true) {
|
341 341 | if (*use_dual_stack) == (false) {
|
342 342 | if (partition_result.supports_fips()) == (true) {
|
343 343 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
344 344 | .url({
|
345 345 | let mut out = String::new();
|
346 346 | out.push_str("https://iam-fips.");
|
347 347 | #[allow(clippy::needless_borrow)]
|
348 348 | out.push_str(&partition_result.dns_suffix());
|
349 349 | out
|
350 350 | })
|
351 351 | .property(
|
352 352 | "authSchemes",
|
353 353 | vec![::aws_smithy_types::Document::from({
|
354 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
354 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
355 355 | out.insert("name".to_string(), "sigv4".to_string().into());
|
356 356 | out.insert("signingRegion".to_string(), partition_result.implicit_global_region().to_owned().into());
|
357 357 | out
|
358 358 | })],
|
359 359 | )
|
360 360 | .build());
|
361 361 | }
|
362 362 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
363 363 | "FIPS is enabled but this partition does not support FIPS".to_string(),
|
364 364 | ));
|
365 365 | }
|
366 366 | }
|
367 367 | if (*use_fips) == (false) {
|
368 368 | if (*use_dual_stack) == (true) {
|
369 369 | if (true) == (partition_result.supports_dual_stack()) {
|
370 370 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
371 371 | .url({
|
372 372 | let mut out = String::new();
|
373 373 | out.push_str("https://iam.");
|
374 374 | #[allow(clippy::needless_borrow)]
|
375 375 | out.push_str(&partition_result.dual_stack_dns_suffix());
|
376 376 | out
|
377 377 | })
|
378 378 | .property(
|
379 379 | "authSchemes",
|
380 380 | vec![::aws_smithy_types::Document::from({
|
381 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
381 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
382 382 | out.insert("name".to_string(), "sigv4".to_string().into());
|
383 383 | out.insert("signingRegion".to_string(), partition_result.implicit_global_region().to_owned().into());
|
384 384 | out
|
385 385 | })],
|
386 386 | )
|
387 387 | .build());
|
388 388 | }
|
389 389 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
390 390 | "DualStack is enabled but this partition does not support DualStack".to_string(),
|
391 391 | ));
|
392 392 | }
|
393 393 | }
|
394 394 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
395 395 | .url({
|
396 396 | let mut out = String::new();
|
397 397 | out.push_str("https://iam.");
|
398 398 | #[allow(clippy::needless_borrow)]
|
399 399 | out.push_str(&partition_result.dns_suffix());
|
400 400 | out
|
401 401 | })
|
402 402 | .property(
|
403 403 | "authSchemes",
|
404 404 | vec![::aws_smithy_types::Document::from({
|
405 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
405 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(2);
|
406 406 | out.insert("name".to_string(), "sigv4".to_string().into());
|
407 407 | out.insert("signingRegion".to_string(), partition_result.implicit_global_region().to_owned().into());
|
408 408 | out
|
409 409 | })],
|
410 410 | )
|
411 411 | .build());
|
412 412 | }
|
413 413 | #[allow(unreachable_code)]
|
414 414 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
415 415 | "No rules matched these parameters. This is a bug. {_params:?}"
|