2598 2592 | .region("local".to_string())
|
2599 2593 | .build()
|
2600 2594 | .expect("invalid params");
|
2601 2595 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2602 2596 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2603 2597 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
2604 2598 | assert_eq!(
|
2605 2599 | endpoint,
|
2606 2600 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2607 2601 | .url("http://localhost:8000")
|
2608 - | .property(
|
2609 - | "authSchemes",
|
2610 - | vec![{
|
2611 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2612 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
2613 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2614 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2615 - | out
|
2616 - | }
|
2617 - | .into()]
|
2602 + | .auth_scheme(
|
2603 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
2604 + | .put("signingName", "dynamodb".to_string())
|
2605 + | .put("signingRegion", "us-east-1".to_string())
|
2618 2606 | )
|
2619 2607 | .build()
|
2620 2608 | );
|
2621 2609 | }
|
2622 2610 |
|
2623 2611 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=local}
|
2624 2612 | #[test]
|
2625 2613 | fn test_128() {
|
2626 2614 | let params = crate::config::endpoint::Params::builder()
|
2627 2615 | .use_fips(false)
|
2628 2616 | .use_dual_stack(false)
|
2629 2617 | .account_id("111111111111".to_string())
|
2630 2618 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
2631 2619 | .account_id_endpoint_mode("preferred".to_string())
|
2632 2620 | .region("local".to_string())
|
2633 2621 | .build()
|
2634 2622 | .expect("invalid params");
|
2635 2623 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2636 2624 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2637 2625 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
2638 2626 | assert_eq!(
|
2639 2627 | endpoint,
|
2640 2628 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2641 2629 | .url("http://localhost:8000")
|
2642 - | .property(
|
2643 - | "authSchemes",
|
2644 - | vec![{
|
2645 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2646 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
2647 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2648 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2649 - | out
|
2650 - | }
|
2651 - | .into()]
|
2630 + | .auth_scheme(
|
2631 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
2632 + | .put("signingName", "dynamodb".to_string())
|
2633 + | .put("signingRegion", "us-east-1".to_string())
|
2652 2634 | )
|
2653 2635 | .build()
|
2654 2636 | );
|
2655 2637 | }
|
2656 2638 |
|
2657 2639 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=local}
|
2658 2640 | #[test]
|
2659 2641 | fn test_129() {
|
2660 2642 | let params = crate::config::endpoint::Params::builder()
|
2661 2643 | .use_fips(false)
|
2662 2644 | .use_dual_stack(false)
|
2663 2645 | .account_id("111111111111".to_string())
|
2664 2646 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
2665 2647 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
2666 2648 | .account_id_endpoint_mode("preferred".to_string())
|
2667 2649 | .region("local".to_string())
|
2668 2650 | .build()
|
2669 2651 | .expect("invalid params");
|
2670 2652 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2671 2653 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2672 2654 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
2673 2655 | assert_eq!(
|
2674 2656 | endpoint,
|
2675 2657 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2676 2658 | .url("http://localhost:8000")
|
2677 - | .property(
|
2678 - | "authSchemes",
|
2679 - | vec![{
|
2680 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2681 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
2682 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2683 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2684 - | out
|
2685 - | }
|
2686 - | .into()]
|
2659 + | .auth_scheme(
|
2660 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
2661 + | .put("signingName", "dynamodb".to_string())
|
2662 + | .put("signingRegion", "us-east-1".to_string())
|
2687 2663 | )
|
2688 2664 | .build()
|
2689 2665 | );
|
2690 2666 | }
|
2691 2667 |
|
2692 2668 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=local}
|
2693 2669 | #[test]
|
2694 2670 | fn test_130() {
|
2695 2671 | let params = crate::config::endpoint::Params::builder()
|
2696 2672 | .use_fips(false)
|
2697 2673 | .use_dual_stack(false)
|
2698 2674 | .account_id("111111111111".to_string())
|
2699 2675 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
2700 2676 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
2701 2677 | .account_id_endpoint_mode("preferred".to_string())
|
2702 2678 | .region("local".to_string())
|
2703 2679 | .build()
|
2704 2680 | .expect("invalid params");
|
2705 2681 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2706 2682 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2707 2683 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
2708 2684 | assert_eq!(
|
2709 2685 | endpoint,
|
2710 2686 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2711 2687 | .url("http://localhost:8000")
|
2712 - | .property(
|
2713 - | "authSchemes",
|
2714 - | vec![{
|
2715 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2716 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
2717 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2718 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2719 - | out
|
2720 - | }
|
2721 - | .into()]
|
2688 + | .auth_scheme(
|
2689 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
2690 + | .put("signingName", "dynamodb".to_string())
|
2691 + | .put("signingRegion", "us-east-1".to_string())
|
2722 2692 | )
|
2723 2693 | .build()
|
2724 2694 | );
|
2725 2695 | }
|
2726 2696 |
|
2727 2697 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=local}
|
2728 2698 | #[test]
|
2729 2699 | fn test_131() {
|
2730 2700 | let params = crate::config::endpoint::Params::builder()
|
2731 2701 | .use_fips(false)
|
2732 2702 | .use_dual_stack(false)
|
2733 2703 | .account_id("111111111111".to_string())
|
2734 2704 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
2735 2705 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
2736 2706 | .account_id_endpoint_mode("preferred".to_string())
|
2737 2707 | .region("local".to_string())
|
2738 2708 | .build()
|
2739 2709 | .expect("invalid params");
|
2740 2710 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2741 2711 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2742 2712 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
2743 2713 | assert_eq!(
|
2744 2714 | endpoint,
|
2745 2715 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2746 2716 | .url("http://localhost:8000")
|
2747 - | .property(
|
2748 - | "authSchemes",
|
2749 - | vec![{
|
2750 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2751 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
2752 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2753 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2754 - | out
|
2755 - | }
|
2756 - | .into()]
|
2717 + | .auth_scheme(
|
2718 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
2719 + | .put("signingName", "dynamodb".to_string())
|
2720 + | .put("signingRegion", "us-east-1".to_string())
|
2757 2721 | )
|
2758 2722 | .build()
|
2759 2723 | );
|
2760 2724 | }
|
2761 2725 |
|
2762 2726 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-west-2:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=local}
|
2763 2727 | #[test]
|
2764 2728 | fn test_132() {
|
2765 2729 | let params = crate::config::endpoint::Params::builder()
|
2766 2730 | .use_fips(false)
|
2767 2731 | .use_dual_stack(false)
|
2768 2732 | .account_id("111111111111".to_string())
|
2769 2733 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
2770 2734 | .resource_arn_list(vec!["arn:aws:dynamodb:us-west-2:333333333333:table/table_name".to_string().into()])
|
2771 2735 | .account_id_endpoint_mode("preferred".to_string())
|
2772 2736 | .region("local".to_string())
|
2773 2737 | .build()
|
2774 2738 | .expect("invalid params");
|
2775 2739 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2776 2740 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2777 2741 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
2778 2742 | assert_eq!(
|
2779 2743 | endpoint,
|
2780 2744 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2781 2745 | .url("http://localhost:8000")
|
2782 - | .property(
|
2783 - | "authSchemes",
|
2784 - | vec![{
|
2785 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2786 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
2787 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2788 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2789 - | out
|
2790 - | }
|
2791 - | .into()]
|
2746 + | .auth_scheme(
|
2747 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
2748 + | .put("signingName", "dynamodb".to_string())
|
2749 + | .put("signingRegion", "us-east-1".to_string())
|
2792 2750 | )
|
2793 2751 | .build()
|
2794 2752 | );
|
2795 2753 | }
|
2796 2754 |
|
2797 2755 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:s3:us-east-1:333333333333:stream/testStream], AccountIdEndpointMode=preferred, Region=local}
|
2798 2756 | #[test]
|
2799 2757 | fn test_133() {
|
2800 2758 | let params = crate::config::endpoint::Params::builder()
|
2801 2759 | .use_fips(false)
|
2802 2760 | .use_dual_stack(false)
|
2803 2761 | .account_id("111111111111".to_string())
|
2804 2762 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
2805 2763 | .resource_arn_list(vec!["arn:aws:s3:us-east-1:333333333333:stream/testStream".to_string().into()])
|
2806 2764 | .account_id_endpoint_mode("preferred".to_string())
|
2807 2765 | .region("local".to_string())
|
2808 2766 | .build()
|
2809 2767 | .expect("invalid params");
|
2810 2768 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2811 2769 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2812 2770 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
2813 2771 | assert_eq!(
|
2814 2772 | endpoint,
|
2815 2773 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2816 2774 | .url("http://localhost:8000")
|
2817 - | .property(
|
2818 - | "authSchemes",
|
2819 - | vec![{
|
2820 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2821 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
2822 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2823 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2824 - | out
|
2825 - | }
|
2826 - | .into()]
|
2775 + | .auth_scheme(
|
2776 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
2777 + | .put("signingName", "dynamodb".to_string())
|
2778 + | .put("signingRegion", "us-east-1".to_string())
|
2827 2779 | )
|
2828 2780 | .build()
|
2829 2781 | );
|
2830 2782 | }
|
2831 2783 |
|
2832 2784 | /// {UseFIPS=false, UseDualStack=false, AccountId=, AccountIdEndpointMode=preferred, Region=local}
|
2833 2785 | #[test]
|
2834 2786 | fn test_134() {
|
2835 2787 | let params = crate::config::endpoint::Params::builder()
|
2836 2788 | .use_fips(false)
|
2837 2789 | .use_dual_stack(false)
|
2838 2790 | .account_id("".to_string())
|
2839 2791 | .account_id_endpoint_mode("preferred".to_string())
|
2840 2792 | .region("local".to_string())
|
2841 2793 | .build()
|
2842 2794 | .expect("invalid params");
|
2843 2795 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2844 2796 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2845 2797 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
2846 2798 | assert_eq!(
|
2847 2799 | endpoint,
|
2848 2800 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2849 2801 | .url("http://localhost:8000")
|
2850 - | .property(
|
2851 - | "authSchemes",
|
2852 - | vec![{
|
2853 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2854 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
2855 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2856 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2857 - | out
|
2858 - | }
|
2859 - | .into()]
|
2802 + | .auth_scheme(
|
2803 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
2804 + | .put("signingName", "dynamodb".to_string())
|
2805 + | .put("signingRegion", "us-east-1".to_string())
|
2860 2806 | )
|
2861 2807 | .build()
|
2862 2808 | );
|
2863 2809 | }
|
2864 2810 |
|
2865 2811 | /// {UseFIPS=true, UseDualStack=true, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=local}
|
2866 2812 | #[test]
|
2867 2813 | fn test_135() {
|
2868 2814 | let params = crate::config::endpoint::Params::builder()
|
2869 2815 | .use_fips(true)
|
3266 3170 | .region("local".to_string())
|
3267 3171 | .build()
|
3268 3172 | .expect("invalid params");
|
3269 3173 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3270 3174 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3271 3175 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3272 3176 | assert_eq!(
|
3273 3177 | endpoint,
|
3274 3178 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3275 3179 | .url("http://localhost:8000")
|
3276 - | .property(
|
3277 - | "authSchemes",
|
3278 - | vec![{
|
3279 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3280 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3281 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3282 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3283 - | out
|
3284 - | }
|
3285 - | .into()]
|
3180 + | .auth_scheme(
|
3181 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3182 + | .put("signingName", "dynamodb".to_string())
|
3183 + | .put("signingRegion", "us-east-1".to_string())
|
3286 3184 | )
|
3287 3185 | .build()
|
3288 3186 | );
|
3289 3187 | }
|
3290 3188 |
|
3291 3189 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=disabled, Region=local}
|
3292 3190 | #[test]
|
3293 3191 | fn test_152() {
|
3294 3192 | let params = crate::config::endpoint::Params::builder()
|
3295 3193 | .use_fips(false)
|
3296 3194 | .use_dual_stack(false)
|
3297 3195 | .account_id("111111111111".to_string())
|
3298 3196 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
3299 3197 | .account_id_endpoint_mode("disabled".to_string())
|
3300 3198 | .region("local".to_string())
|
3301 3199 | .build()
|
3302 3200 | .expect("invalid params");
|
3303 3201 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3304 3202 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3305 3203 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3306 3204 | assert_eq!(
|
3307 3205 | endpoint,
|
3308 3206 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3309 3207 | .url("http://localhost:8000")
|
3310 - | .property(
|
3311 - | "authSchemes",
|
3312 - | vec![{
|
3313 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3314 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3315 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3316 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3317 - | out
|
3318 - | }
|
3319 - | .into()]
|
3208 + | .auth_scheme(
|
3209 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3210 + | .put("signingName", "dynamodb".to_string())
|
3211 + | .put("signingRegion", "us-east-1".to_string())
|
3320 3212 | )
|
3321 3213 | .build()
|
3322 3214 | );
|
3323 3215 | }
|
3324 3216 |
|
3325 3217 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=disabled, Region=local}
|
3326 3218 | #[test]
|
3327 3219 | fn test_153() {
|
3328 3220 | let params = crate::config::endpoint::Params::builder()
|
3329 3221 | .use_fips(false)
|
3330 3222 | .use_dual_stack(false)
|
3331 3223 | .account_id("111111111111".to_string())
|
3332 3224 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
3333 3225 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
3334 3226 | .account_id_endpoint_mode("disabled".to_string())
|
3335 3227 | .region("local".to_string())
|
3336 3228 | .build()
|
3337 3229 | .expect("invalid params");
|
3338 3230 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3339 3231 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3340 3232 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3341 3233 | assert_eq!(
|
3342 3234 | endpoint,
|
3343 3235 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3344 3236 | .url("http://localhost:8000")
|
3345 - | .property(
|
3346 - | "authSchemes",
|
3347 - | vec![{
|
3348 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3349 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3350 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3351 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3352 - | out
|
3353 - | }
|
3354 - | .into()]
|
3237 + | .auth_scheme(
|
3238 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3239 + | .put("signingName", "dynamodb".to_string())
|
3240 + | .put("signingRegion", "us-east-1".to_string())
|
3355 3241 | )
|
3356 3242 | .build()
|
3357 3243 | );
|
3358 3244 | }
|
3359 3245 |
|
3360 3246 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=disabled, Region=local}
|
3361 3247 | #[test]
|
3362 3248 | fn test_154() {
|
3363 3249 | let params = crate::config::endpoint::Params::builder()
|
3364 3250 | .use_fips(false)
|
3365 3251 | .use_dual_stack(false)
|
3366 3252 | .account_id("111111111111".to_string())
|
3367 3253 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
3368 3254 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
3369 3255 | .account_id_endpoint_mode("disabled".to_string())
|
3370 3256 | .region("local".to_string())
|
3371 3257 | .build()
|
3372 3258 | .expect("invalid params");
|
3373 3259 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3374 3260 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3375 3261 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3376 3262 | assert_eq!(
|
3377 3263 | endpoint,
|
3378 3264 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3379 3265 | .url("http://localhost:8000")
|
3380 - | .property(
|
3381 - | "authSchemes",
|
3382 - | vec![{
|
3383 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3384 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3385 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3386 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3387 - | out
|
3388 - | }
|
3389 - | .into()]
|
3266 + | .auth_scheme(
|
3267 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3268 + | .put("signingName", "dynamodb".to_string())
|
3269 + | .put("signingRegion", "us-east-1".to_string())
|
3390 3270 | )
|
3391 3271 | .build()
|
3392 3272 | );
|
3393 3273 | }
|
3394 3274 |
|
3395 3275 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=disabled, Region=local}
|
3396 3276 | #[test]
|
3397 3277 | fn test_155() {
|
3398 3278 | let params = crate::config::endpoint::Params::builder()
|
3399 3279 | .use_fips(false)
|
3400 3280 | .use_dual_stack(false)
|
3401 3281 | .account_id("111111111111".to_string())
|
3402 3282 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
3403 3283 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
3404 3284 | .account_id_endpoint_mode("disabled".to_string())
|
3405 3285 | .region("local".to_string())
|
3406 3286 | .build()
|
3407 3287 | .expect("invalid params");
|
3408 3288 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3409 3289 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3410 3290 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3411 3291 | assert_eq!(
|
3412 3292 | endpoint,
|
3413 3293 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3414 3294 | .url("http://localhost:8000")
|
3415 - | .property(
|
3416 - | "authSchemes",
|
3417 - | vec![{
|
3418 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3419 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3420 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3421 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3422 - | out
|
3423 - | }
|
3424 - | .into()]
|
3295 + | .auth_scheme(
|
3296 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3297 + | .put("signingName", "dynamodb".to_string())
|
3298 + | .put("signingRegion", "us-east-1".to_string())
|
3425 3299 | )
|
3426 3300 | .build()
|
3427 3301 | );
|
3428 3302 | }
|
3429 3303 |
|
3430 3304 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-west-2:333333333333:table/table_name], AccountIdEndpointMode=disabled, Region=local}
|
3431 3305 | #[test]
|
3432 3306 | fn test_156() {
|
3433 3307 | let params = crate::config::endpoint::Params::builder()
|
3434 3308 | .use_fips(false)
|
3435 3309 | .use_dual_stack(false)
|
3436 3310 | .account_id("111111111111".to_string())
|
3437 3311 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
3438 3312 | .resource_arn_list(vec!["arn:aws:dynamodb:us-west-2:333333333333:table/table_name".to_string().into()])
|
3439 3313 | .account_id_endpoint_mode("disabled".to_string())
|
3440 3314 | .region("local".to_string())
|
3441 3315 | .build()
|
3442 3316 | .expect("invalid params");
|
3443 3317 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3444 3318 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3445 3319 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3446 3320 | assert_eq!(
|
3447 3321 | endpoint,
|
3448 3322 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3449 3323 | .url("http://localhost:8000")
|
3450 - | .property(
|
3451 - | "authSchemes",
|
3452 - | vec![{
|
3453 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3454 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3455 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3456 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3457 - | out
|
3458 - | }
|
3459 - | .into()]
|
3324 + | .auth_scheme(
|
3325 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3326 + | .put("signingName", "dynamodb".to_string())
|
3327 + | .put("signingRegion", "us-east-1".to_string())
|
3460 3328 | )
|
3461 3329 | .build()
|
3462 3330 | );
|
3463 3331 | }
|
3464 3332 |
|
3465 3333 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:s3:us-east-1:333333333333:stream/testStream], AccountIdEndpointMode=disabled, Region=local}
|
3466 3334 | #[test]
|
3467 3335 | fn test_157() {
|
3468 3336 | let params = crate::config::endpoint::Params::builder()
|
3469 3337 | .use_fips(false)
|
3470 3338 | .use_dual_stack(false)
|
3471 3339 | .account_id("111111111111".to_string())
|
3472 3340 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
3473 3341 | .resource_arn_list(vec!["arn:aws:s3:us-east-1:333333333333:stream/testStream".to_string().into()])
|
3474 3342 | .account_id_endpoint_mode("disabled".to_string())
|
3475 3343 | .region("local".to_string())
|
3476 3344 | .build()
|
3477 3345 | .expect("invalid params");
|
3478 3346 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3479 3347 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3480 3348 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3481 3349 | assert_eq!(
|
3482 3350 | endpoint,
|
3483 3351 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3484 3352 | .url("http://localhost:8000")
|
3485 - | .property(
|
3486 - | "authSchemes",
|
3487 - | vec![{
|
3488 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3489 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3490 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3491 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3492 - | out
|
3493 - | }
|
3494 - | .into()]
|
3353 + | .auth_scheme(
|
3354 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3355 + | .put("signingName", "dynamodb".to_string())
|
3356 + | .put("signingRegion", "us-east-1".to_string())
|
3495 3357 | )
|
3496 3358 | .build()
|
3497 3359 | );
|
3498 3360 | }
|
3499 3361 |
|
3500 3362 | /// {UseFIPS=false, UseDualStack=false, AccountId=, AccountIdEndpointMode=disabled, Region=local}
|
3501 3363 | #[test]
|
3502 3364 | fn test_158() {
|
3503 3365 | let params = crate::config::endpoint::Params::builder()
|
3504 3366 | .use_fips(false)
|
3505 3367 | .use_dual_stack(false)
|
3506 3368 | .account_id("".to_string())
|
3507 3369 | .account_id_endpoint_mode("disabled".to_string())
|
3508 3370 | .region("local".to_string())
|
3509 3371 | .build()
|
3510 3372 | .expect("invalid params");
|
3511 3373 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3512 3374 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3513 3375 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3514 3376 | assert_eq!(
|
3515 3377 | endpoint,
|
3516 3378 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3517 3379 | .url("http://localhost:8000")
|
3518 - | .property(
|
3519 - | "authSchemes",
|
3520 - | vec![{
|
3521 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3522 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3523 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3524 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3525 - | out
|
3526 - | }
|
3527 - | .into()]
|
3380 + | .auth_scheme(
|
3381 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3382 + | .put("signingName", "dynamodb".to_string())
|
3383 + | .put("signingRegion", "us-east-1".to_string())
|
3528 3384 | )
|
3529 3385 | .build()
|
3530 3386 | );
|
3531 3387 | }
|
3532 3388 |
|
3533 3389 | /// {UseFIPS=true, UseDualStack=true, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=disabled, Region=local}
|
3534 3390 | #[test]
|
3535 3391 | fn test_159() {
|
3536 3392 | let params = crate::config::endpoint::Params::builder()
|
3537 3393 | .use_fips(true)
|
3934 3748 | .region("local".to_string())
|
3935 3749 | .build()
|
3936 3750 | .expect("invalid params");
|
3937 3751 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3938 3752 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3939 3753 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3940 3754 | assert_eq!(
|
3941 3755 | endpoint,
|
3942 3756 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3943 3757 | .url("http://localhost:8000")
|
3944 - | .property(
|
3945 - | "authSchemes",
|
3946 - | vec![{
|
3947 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3948 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3949 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3950 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3951 - | out
|
3952 - | }
|
3953 - | .into()]
|
3758 + | .auth_scheme(
|
3759 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3760 + | .put("signingName", "dynamodb".to_string())
|
3761 + | .put("signingRegion", "us-east-1".to_string())
|
3954 3762 | )
|
3955 3763 | .build()
|
3956 3764 | );
|
3957 3765 | }
|
3958 3766 |
|
3959 3767 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=required, Region=local}
|
3960 3768 | #[test]
|
3961 3769 | fn test_176() {
|
3962 3770 | let params = crate::config::endpoint::Params::builder()
|
3963 3771 | .use_fips(false)
|
3964 3772 | .use_dual_stack(false)
|
3965 3773 | .account_id("111111111111".to_string())
|
3966 3774 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
3967 3775 | .account_id_endpoint_mode("required".to_string())
|
3968 3776 | .region("local".to_string())
|
3969 3777 | .build()
|
3970 3778 | .expect("invalid params");
|
3971 3779 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
3972 3780 | let endpoint = resolver.resolve_endpoint(¶ms);
|
3973 3781 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
3974 3782 | assert_eq!(
|
3975 3783 | endpoint,
|
3976 3784 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
3977 3785 | .url("http://localhost:8000")
|
3978 - | .property(
|
3979 - | "authSchemes",
|
3980 - | vec![{
|
3981 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
3982 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
3983 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
3984 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
3985 - | out
|
3986 - | }
|
3987 - | .into()]
|
3786 + | .auth_scheme(
|
3787 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3788 + | .put("signingName", "dynamodb".to_string())
|
3789 + | .put("signingRegion", "us-east-1".to_string())
|
3988 3790 | )
|
3989 3791 | .build()
|
3990 3792 | );
|
3991 3793 | }
|
3992 3794 |
|
3993 3795 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=required, Region=local}
|
3994 3796 | #[test]
|
3995 3797 | fn test_177() {
|
3996 3798 | let params = crate::config::endpoint::Params::builder()
|
3997 3799 | .use_fips(false)
|
3998 3800 | .use_dual_stack(false)
|
3999 3801 | .account_id("111111111111".to_string())
|
4000 3802 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
4001 3803 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
4002 3804 | .account_id_endpoint_mode("required".to_string())
|
4003 3805 | .region("local".to_string())
|
4004 3806 | .build()
|
4005 3807 | .expect("invalid params");
|
4006 3808 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
4007 3809 | let endpoint = resolver.resolve_endpoint(¶ms);
|
4008 3810 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
4009 3811 | assert_eq!(
|
4010 3812 | endpoint,
|
4011 3813 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
4012 3814 | .url("http://localhost:8000")
|
4013 - | .property(
|
4014 - | "authSchemes",
|
4015 - | vec![{
|
4016 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4017 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
4018 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4019 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4020 - | out
|
4021 - | }
|
4022 - | .into()]
|
3815 + | .auth_scheme(
|
3816 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3817 + | .put("signingName", "dynamodb".to_string())
|
3818 + | .put("signingRegion", "us-east-1".to_string())
|
4023 3819 | )
|
4024 3820 | .build()
|
4025 3821 | );
|
4026 3822 | }
|
4027 3823 |
|
4028 3824 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=required, Region=local}
|
4029 3825 | #[test]
|
4030 3826 | fn test_178() {
|
4031 3827 | let params = crate::config::endpoint::Params::builder()
|
4032 3828 | .use_fips(false)
|
4033 3829 | .use_dual_stack(false)
|
4034 3830 | .account_id("111111111111".to_string())
|
4035 3831 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
4036 3832 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
4037 3833 | .account_id_endpoint_mode("required".to_string())
|
4038 3834 | .region("local".to_string())
|
4039 3835 | .build()
|
4040 3836 | .expect("invalid params");
|
4041 3837 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
4042 3838 | let endpoint = resolver.resolve_endpoint(¶ms);
|
4043 3839 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
4044 3840 | assert_eq!(
|
4045 3841 | endpoint,
|
4046 3842 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
4047 3843 | .url("http://localhost:8000")
|
4048 - | .property(
|
4049 - | "authSchemes",
|
4050 - | vec![{
|
4051 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4052 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
4053 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4054 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4055 - | out
|
4056 - | }
|
4057 - | .into()]
|
3844 + | .auth_scheme(
|
3845 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3846 + | .put("signingName", "dynamodb".to_string())
|
3847 + | .put("signingRegion", "us-east-1".to_string())
|
4058 3848 | )
|
4059 3849 | .build()
|
4060 3850 | );
|
4061 3851 | }
|
4062 3852 |
|
4063 3853 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=required, Region=local}
|
4064 3854 | #[test]
|
4065 3855 | fn test_179() {
|
4066 3856 | let params = crate::config::endpoint::Params::builder()
|
4067 3857 | .use_fips(false)
|
4068 3858 | .use_dual_stack(false)
|
4069 3859 | .account_id("111111111111".to_string())
|
4070 3860 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
4071 3861 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
4072 3862 | .account_id_endpoint_mode("required".to_string())
|
4073 3863 | .region("local".to_string())
|
4074 3864 | .build()
|
4075 3865 | .expect("invalid params");
|
4076 3866 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
4077 3867 | let endpoint = resolver.resolve_endpoint(¶ms);
|
4078 3868 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
4079 3869 | assert_eq!(
|
4080 3870 | endpoint,
|
4081 3871 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
4082 3872 | .url("http://localhost:8000")
|
4083 - | .property(
|
4084 - | "authSchemes",
|
4085 - | vec![{
|
4086 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4087 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
4088 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4089 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4090 - | out
|
4091 - | }
|
4092 - | .into()]
|
3873 + | .auth_scheme(
|
3874 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3875 + | .put("signingName", "dynamodb".to_string())
|
3876 + | .put("signingRegion", "us-east-1".to_string())
|
4093 3877 | )
|
4094 3878 | .build()
|
4095 3879 | );
|
4096 3880 | }
|
4097 3881 |
|
4098 3882 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-west-2:333333333333:table/table_name], AccountIdEndpointMode=required, Region=local}
|
4099 3883 | #[test]
|
4100 3884 | fn test_180() {
|
4101 3885 | let params = crate::config::endpoint::Params::builder()
|
4102 3886 | .use_fips(false)
|
4103 3887 | .use_dual_stack(false)
|
4104 3888 | .account_id("111111111111".to_string())
|
4105 3889 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
4106 3890 | .resource_arn_list(vec!["arn:aws:dynamodb:us-west-2:333333333333:table/table_name".to_string().into()])
|
4107 3891 | .account_id_endpoint_mode("required".to_string())
|
4108 3892 | .region("local".to_string())
|
4109 3893 | .build()
|
4110 3894 | .expect("invalid params");
|
4111 3895 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
4112 3896 | let endpoint = resolver.resolve_endpoint(¶ms);
|
4113 3897 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
4114 3898 | assert_eq!(
|
4115 3899 | endpoint,
|
4116 3900 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
4117 3901 | .url("http://localhost:8000")
|
4118 - | .property(
|
4119 - | "authSchemes",
|
4120 - | vec![{
|
4121 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4122 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
4123 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4124 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4125 - | out
|
4126 - | }
|
4127 - | .into()]
|
3902 + | .auth_scheme(
|
3903 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3904 + | .put("signingName", "dynamodb".to_string())
|
3905 + | .put("signingRegion", "us-east-1".to_string())
|
4128 3906 | )
|
4129 3907 | .build()
|
4130 3908 | );
|
4131 3909 | }
|
4132 3910 |
|
4133 3911 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:s3:us-east-1:333333333333:stream/testStream], AccountIdEndpointMode=required, Region=local}
|
4134 3912 | #[test]
|
4135 3913 | fn test_181() {
|
4136 3914 | let params = crate::config::endpoint::Params::builder()
|
4137 3915 | .use_fips(false)
|
4138 3916 | .use_dual_stack(false)
|
4139 3917 | .account_id("111111111111".to_string())
|
4140 3918 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
4141 3919 | .resource_arn_list(vec!["arn:aws:s3:us-east-1:333333333333:stream/testStream".to_string().into()])
|
4142 3920 | .account_id_endpoint_mode("required".to_string())
|
4143 3921 | .region("local".to_string())
|
4144 3922 | .build()
|
4145 3923 | .expect("invalid params");
|
4146 3924 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
4147 3925 | let endpoint = resolver.resolve_endpoint(¶ms);
|
4148 3926 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
4149 3927 | assert_eq!(
|
4150 3928 | endpoint,
|
4151 3929 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
4152 3930 | .url("http://localhost:8000")
|
4153 - | .property(
|
4154 - | "authSchemes",
|
4155 - | vec![{
|
4156 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4157 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
4158 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4159 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4160 - | out
|
4161 - | }
|
4162 - | .into()]
|
3931 + | .auth_scheme(
|
3932 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3933 + | .put("signingName", "dynamodb".to_string())
|
3934 + | .put("signingRegion", "us-east-1".to_string())
|
4163 3935 | )
|
4164 3936 | .build()
|
4165 3937 | );
|
4166 3938 | }
|
4167 3939 |
|
4168 3940 | /// {UseFIPS=false, UseDualStack=false, AccountId=, AccountIdEndpointMode=required, Region=local}
|
4169 3941 | #[test]
|
4170 3942 | fn test_182() {
|
4171 3943 | let params = crate::config::endpoint::Params::builder()
|
4172 3944 | .use_fips(false)
|
4173 3945 | .use_dual_stack(false)
|
4174 3946 | .account_id("".to_string())
|
4175 3947 | .account_id_endpoint_mode("required".to_string())
|
4176 3948 | .region("local".to_string())
|
4177 3949 | .build()
|
4178 3950 | .expect("invalid params");
|
4179 3951 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
4180 3952 | let endpoint = resolver.resolve_endpoint(¶ms);
|
4181 3953 | let endpoint = endpoint.expect("Expected valid endpoint: http://localhost:8000");
|
4182 3954 | assert_eq!(
|
4183 3955 | endpoint,
|
4184 3956 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
4185 3957 | .url("http://localhost:8000")
|
4186 - | .property(
|
4187 - | "authSchemes",
|
4188 - | vec![{
|
4189 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
4190 - | out.insert("signingName".to_string(), "dynamodb".to_string().into());
|
4191 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
4192 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
4193 - | out
|
4194 - | }
|
4195 - | .into()]
|
3958 + | .auth_scheme(
|
3959 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 2)
|
3960 + | .put("signingName", "dynamodb".to_string())
|
3961 + | .put("signingRegion", "us-east-1".to_string())
|
4196 3962 | )
|
4197 3963 | .build()
|
4198 3964 | );
|
4199 3965 | }
|
4200 3966 |
|
4201 3967 | /// {UseFIPS=true, UseDualStack=true, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=required, Region=local}
|
4202 3968 | #[test]
|
4203 3969 | fn test_183() {
|
4204 3970 | let params = crate::config::endpoint::Params::builder()
|
4205 3971 | .use_fips(true)
|
7141 6897 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7142 6898 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.cn-north-1.amazonaws.com.cn");
|
7143 6899 | assert_eq!(
|
7144 6900 | endpoint,
|
7145 6901 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7146 6902 | .url("https://dynamodb.cn-north-1.amazonaws.com.cn")
|
7147 6903 | .build()
|
7148 6904 | );
|
7149 6905 | }
|
7150 6906 |
|
7151 - | /// {UseFIPS=true, UseDualStack=false, AccountId=111111111111, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
6907 + | /// {UseFIPS=true, UseDualStack=true, AccountId=111111111111, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7152 6908 | #[test]
|
7153 6909 | fn test_316() {
|
6910 + | let params = crate::config::endpoint::Params::builder()
|
6911 + | .use_fips(true)
|
6912 + | .use_dual_stack(true)
|
6913 + | .account_id("111111111111".to_string())
|
6914 + | .account_id_endpoint_mode("preferred".to_string())
|
6915 + | .region("us-iso-east-1".to_string())
|
6916 + | .build()
|
6917 + | .expect("invalid params");
|
6918 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
6919 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
6920 + | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb-fips.us-iso-east-1.api.aws.ic.gov");
|
6921 + | assert_eq!(
|
6922 + | endpoint,
|
6923 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
6924 + | .url("https://dynamodb-fips.us-iso-east-1.api.aws.ic.gov")
|
6925 + | .build()
|
6926 + | );
|
6927 + | }
|
6928 + |
|
6929 + | /// {UseFIPS=true, UseDualStack=false, AccountId=111111111111, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
6930 + | #[test]
|
6931 + | fn test_317() {
|
7154 6932 | let params = crate::config::endpoint::Params::builder()
|
7155 6933 | .use_fips(true)
|
7156 6934 | .use_dual_stack(false)
|
7157 6935 | .account_id("111111111111".to_string())
|
7158 6936 | .account_id_endpoint_mode("preferred".to_string())
|
7159 6937 | .region("us-iso-east-1".to_string())
|
7160 6938 | .build()
|
7161 6939 | .expect("invalid params");
|
7162 6940 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7163 6941 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7164 6942 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb-fips.us-iso-east-1.c2s.ic.gov");
|
7165 6943 | assert_eq!(
|
7166 6944 | endpoint,
|
7167 6945 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7168 6946 | .url("https://dynamodb-fips.us-iso-east-1.c2s.ic.gov")
|
7169 6947 | .build()
|
7170 6948 | );
|
7171 6949 | }
|
7172 6950 |
|
6951 + | /// {UseFIPS=false, UseDualStack=true, AccountId=111111111111, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
6952 + | #[test]
|
6953 + | fn test_318() {
|
6954 + | let params = crate::config::endpoint::Params::builder()
|
6955 + | .use_fips(false)
|
6956 + | .use_dual_stack(true)
|
6957 + | .account_id("111111111111".to_string())
|
6958 + | .account_id_endpoint_mode("preferred".to_string())
|
6959 + | .region("us-iso-east-1".to_string())
|
6960 + | .build()
|
6961 + | .expect("invalid params");
|
6962 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
6963 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
6964 + | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.api.aws.ic.gov");
|
6965 + | assert_eq!(
|
6966 + | endpoint,
|
6967 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
6968 + | .url("https://dynamodb.us-iso-east-1.api.aws.ic.gov")
|
6969 + | .build()
|
6970 + | );
|
6971 + | }
|
6972 + |
|
7173 6973 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7174 6974 | #[test]
|
7175 - | fn test_317() {
|
6975 + | fn test_319() {
|
7176 6976 | let params = crate::config::endpoint::Params::builder()
|
7177 6977 | .use_fips(false)
|
7178 6978 | .use_dual_stack(false)
|
7179 6979 | .account_id("111111111111".to_string())
|
7180 6980 | .account_id_endpoint_mode("preferred".to_string())
|
7181 6981 | .region("us-iso-east-1".to_string())
|
7182 6982 | .build()
|
7183 6983 | .expect("invalid params");
|
7184 6984 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7185 6985 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7186 6986 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7187 6987 | assert_eq!(
|
7188 6988 | endpoint,
|
7189 6989 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7190 6990 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7191 6991 | .build()
|
7192 6992 | );
|
7193 6993 | }
|
7194 6994 |
|
7195 6995 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7196 6996 | #[test]
|
7197 - | fn test_318() {
|
6997 + | fn test_320() {
|
7198 6998 | let params = crate::config::endpoint::Params::builder()
|
7199 6999 | .use_fips(false)
|
7200 7000 | .use_dual_stack(false)
|
7201 7001 | .account_id("111111111111".to_string())
|
7202 7002 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7203 7003 | .account_id_endpoint_mode("preferred".to_string())
|
7204 7004 | .region("us-iso-east-1".to_string())
|
7205 7005 | .build()
|
7206 7006 | .expect("invalid params");
|
7207 7007 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7208 7008 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7209 7009 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7210 7010 | assert_eq!(
|
7211 7011 | endpoint,
|
7212 7012 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7213 7013 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7214 7014 | .build()
|
7215 7015 | );
|
7216 7016 | }
|
7217 7017 |
|
7218 7018 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7219 7019 | #[test]
|
7220 - | fn test_319() {
|
7020 + | fn test_321() {
|
7221 7021 | let params = crate::config::endpoint::Params::builder()
|
7222 7022 | .use_fips(false)
|
7223 7023 | .use_dual_stack(false)
|
7224 7024 | .account_id("111111111111".to_string())
|
7225 7025 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7226 7026 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7227 7027 | .account_id_endpoint_mode("preferred".to_string())
|
7228 7028 | .region("us-iso-east-1".to_string())
|
7229 7029 | .build()
|
7230 7030 | .expect("invalid params");
|
7231 7031 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7232 7032 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7233 7033 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7234 7034 | assert_eq!(
|
7235 7035 | endpoint,
|
7236 7036 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7237 7037 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7238 7038 | .build()
|
7239 7039 | );
|
7240 7040 | }
|
7241 7041 |
|
7242 7042 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7243 7043 | #[test]
|
7244 - | fn test_320() {
|
7044 + | fn test_322() {
|
7245 7045 | let params = crate::config::endpoint::Params::builder()
|
7246 7046 | .use_fips(false)
|
7247 7047 | .use_dual_stack(false)
|
7248 7048 | .account_id("111111111111".to_string())
|
7249 7049 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
7250 7050 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7251 7051 | .account_id_endpoint_mode("preferred".to_string())
|
7252 7052 | .region("us-iso-east-1".to_string())
|
7253 7053 | .build()
|
7254 7054 | .expect("invalid params");
|
7255 7055 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7256 7056 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7257 7057 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7258 7058 | assert_eq!(
|
7259 7059 | endpoint,
|
7260 7060 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7261 7061 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7262 7062 | .build()
|
7263 7063 | );
|
7264 7064 | }
|
7265 7065 |
|
7266 7066 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7267 7067 | #[test]
|
7268 - | fn test_321() {
|
7068 + | fn test_323() {
|
7269 7069 | let params = crate::config::endpoint::Params::builder()
|
7270 7070 | .use_fips(false)
|
7271 7071 | .use_dual_stack(false)
|
7272 7072 | .account_id("111111111111".to_string())
|
7273 7073 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
7274 7074 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7275 7075 | .account_id_endpoint_mode("preferred".to_string())
|
7276 7076 | .region("us-iso-east-1".to_string())
|
7277 7077 | .build()
|
7278 7078 | .expect("invalid params");
|
7279 7079 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7280 7080 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7281 7081 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7282 7082 | assert_eq!(
|
7283 7083 | endpoint,
|
7284 7084 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7285 7085 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7286 7086 | .build()
|
7287 7087 | );
|
7288 7088 | }
|
7289 7089 |
|
7290 7090 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-west-2:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7291 7091 | #[test]
|
7292 - | fn test_322() {
|
7092 + | fn test_324() {
|
7293 7093 | let params = crate::config::endpoint::Params::builder()
|
7294 7094 | .use_fips(false)
|
7295 7095 | .use_dual_stack(false)
|
7296 7096 | .account_id("111111111111".to_string())
|
7297 7097 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
7298 7098 | .resource_arn_list(vec!["arn:aws:dynamodb:us-west-2:333333333333:table/table_name".to_string().into()])
|
7299 7099 | .account_id_endpoint_mode("preferred".to_string())
|
7300 7100 | .region("us-iso-east-1".to_string())
|
7301 7101 | .build()
|
7302 7102 | .expect("invalid params");
|
7303 7103 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7304 7104 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7305 7105 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7306 7106 | assert_eq!(
|
7307 7107 | endpoint,
|
7308 7108 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7309 7109 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7310 7110 | .build()
|
7311 7111 | );
|
7312 7112 | }
|
7313 7113 |
|
7314 7114 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:s3:us-east-1:333333333333:stream/testStream], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7315 7115 | #[test]
|
7316 - | fn test_323() {
|
7116 + | fn test_325() {
|
7317 7117 | let params = crate::config::endpoint::Params::builder()
|
7318 7118 | .use_fips(false)
|
7319 7119 | .use_dual_stack(false)
|
7320 7120 | .account_id("111111111111".to_string())
|
7321 7121 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
7322 7122 | .resource_arn_list(vec!["arn:aws:s3:us-east-1:333333333333:stream/testStream".to_string().into()])
|
7323 7123 | .account_id_endpoint_mode("preferred".to_string())
|
7324 7124 | .region("us-iso-east-1".to_string())
|
7325 7125 | .build()
|
7326 7126 | .expect("invalid params");
|
7327 7127 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7328 7128 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7329 7129 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7330 7130 | assert_eq!(
|
7331 7131 | endpoint,
|
7332 7132 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7333 7133 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7334 7134 | .build()
|
7335 7135 | );
|
7336 7136 | }
|
7337 7137 |
|
7338 7138 | /// {UseFIPS=false, UseDualStack=false, AccountId=, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7339 7139 | #[test]
|
7340 - | fn test_324() {
|
7140 + | fn test_326() {
|
7341 7141 | let params = crate::config::endpoint::Params::builder()
|
7342 7142 | .use_fips(false)
|
7343 7143 | .use_dual_stack(false)
|
7344 7144 | .account_id("".to_string())
|
7345 7145 | .account_id_endpoint_mode("preferred".to_string())
|
7346 7146 | .region("us-iso-east-1".to_string())
|
7347 7147 | .build()
|
7348 7148 | .expect("invalid params");
|
7349 7149 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7350 7150 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7351 7151 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7352 7152 | assert_eq!(
|
7353 7153 | endpoint,
|
7354 7154 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7355 7155 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7356 7156 | .build()
|
7357 7157 | );
|
7358 7158 | }
|
7359 7159 |
|
7160 + | /// {UseFIPS=true, UseDualStack=true, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7161 + | #[test]
|
7162 + | fn test_327() {
|
7163 + | let params = crate::config::endpoint::Params::builder()
|
7164 + | .use_fips(true)
|
7165 + | .use_dual_stack(true)
|
7166 + | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7167 + | .account_id_endpoint_mode("preferred".to_string())
|
7168 + | .region("us-iso-east-1".to_string())
|
7169 + | .build()
|
7170 + | .expect("invalid params");
|
7171 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7172 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
7173 + | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb-fips.us-iso-east-1.api.aws.ic.gov");
|
7174 + | assert_eq!(
|
7175 + | endpoint,
|
7176 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7177 + | .url("https://dynamodb-fips.us-iso-east-1.api.aws.ic.gov")
|
7178 + | .build()
|
7179 + | );
|
7180 + | }
|
7181 + |
|
7360 7182 | /// {UseFIPS=true, UseDualStack=false, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7361 7183 | #[test]
|
7362 - | fn test_325() {
|
7184 + | fn test_328() {
|
7363 7185 | let params = crate::config::endpoint::Params::builder()
|
7364 7186 | .use_fips(true)
|
7365 7187 | .use_dual_stack(false)
|
7366 7188 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7367 7189 | .account_id_endpoint_mode("preferred".to_string())
|
7368 7190 | .region("us-iso-east-1".to_string())
|
7369 7191 | .build()
|
7370 7192 | .expect("invalid params");
|
7371 7193 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7372 7194 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7373 7195 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb-fips.us-iso-east-1.c2s.ic.gov");
|
7374 7196 | assert_eq!(
|
7375 7197 | endpoint,
|
7376 7198 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7377 7199 | .url("https://dynamodb-fips.us-iso-east-1.c2s.ic.gov")
|
7378 7200 | .build()
|
7379 7201 | );
|
7380 7202 | }
|
7381 7203 |
|
7204 + | /// {UseFIPS=false, UseDualStack=true, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7205 + | #[test]
|
7206 + | fn test_329() {
|
7207 + | let params = crate::config::endpoint::Params::builder()
|
7208 + | .use_fips(false)
|
7209 + | .use_dual_stack(true)
|
7210 + | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7211 + | .account_id_endpoint_mode("preferred".to_string())
|
7212 + | .region("us-iso-east-1".to_string())
|
7213 + | .build()
|
7214 + | .expect("invalid params");
|
7215 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7216 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
7217 + | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.api.aws.ic.gov");
|
7218 + | assert_eq!(
|
7219 + | endpoint,
|
7220 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7221 + | .url("https://dynamodb.us-iso-east-1.api.aws.ic.gov")
|
7222 + | .build()
|
7223 + | );
|
7224 + | }
|
7225 + |
|
7382 7226 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7383 7227 | #[test]
|
7384 - | fn test_326() {
|
7228 + | fn test_330() {
|
7385 7229 | let params = crate::config::endpoint::Params::builder()
|
7386 7230 | .use_fips(false)
|
7387 7231 | .use_dual_stack(false)
|
7388 7232 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7389 7233 | .account_id_endpoint_mode("preferred".to_string())
|
7390 7234 | .region("us-iso-east-1".to_string())
|
7391 7235 | .build()
|
7392 7236 | .expect("invalid params");
|
7393 7237 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7394 7238 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7395 7239 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7396 7240 | assert_eq!(
|
7397 7241 | endpoint,
|
7398 7242 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7399 7243 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7400 7244 | .build()
|
7401 7245 | );
|
7402 7246 | }
|
7403 7247 |
|
7404 7248 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7405 7249 | #[test]
|
7406 - | fn test_327() {
|
7250 + | fn test_331() {
|
7407 7251 | let params = crate::config::endpoint::Params::builder()
|
7408 7252 | .use_fips(false)
|
7409 7253 | .use_dual_stack(false)
|
7410 7254 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
7411 7255 | .account_id_endpoint_mode("preferred".to_string())
|
7412 7256 | .region("us-iso-east-1".to_string())
|
7413 7257 | .build()
|
7414 7258 | .expect("invalid params");
|
7415 7259 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7416 7260 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7417 7261 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7418 7262 | assert_eq!(
|
7419 7263 | endpoint,
|
7420 7264 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7421 7265 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7422 7266 | .build()
|
7423 7267 | );
|
7424 7268 | }
|
7425 7269 |
|
7426 7270 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7427 7271 | #[test]
|
7428 - | fn test_328() {
|
7272 + | fn test_332() {
|
7429 7273 | let params = crate::config::endpoint::Params::builder()
|
7430 7274 | .use_fips(false)
|
7431 7275 | .use_dual_stack(false)
|
7432 7276 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
7433 7277 | .account_id_endpoint_mode("preferred".to_string())
|
7434 7278 | .region("us-iso-east-1".to_string())
|
7435 7279 | .build()
|
7436 7280 | .expect("invalid params");
|
7437 7281 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7438 7282 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7439 7283 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7440 7284 | assert_eq!(
|
7441 7285 | endpoint,
|
7442 7286 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7443 7287 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7444 7288 | .build()
|
7445 7289 | );
|
7446 7290 | }
|
7447 7291 |
|
7448 7292 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7449 7293 | #[test]
|
7450 - | fn test_329() {
|
7294 + | fn test_333() {
|
7451 7295 | let params = crate::config::endpoint::Params::builder()
|
7452 7296 | .use_fips(false)
|
7453 7297 | .use_dual_stack(false)
|
7454 7298 | .resource_arn("".to_string())
|
7455 7299 | .account_id_endpoint_mode("preferred".to_string())
|
7456 7300 | .region("us-iso-east-1".to_string())
|
7457 7301 | .build()
|
7458 7302 | .expect("invalid params");
|
7459 7303 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7460 7304 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7461 7305 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7462 7306 | assert_eq!(
|
7463 7307 | endpoint,
|
7464 7308 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7465 7309 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7466 7310 | .build()
|
7467 7311 | );
|
7468 7312 | }
|
7469 7313 |
|
7314 + | /// {UseFIPS=true, UseDualStack=true, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7315 + | #[test]
|
7316 + | fn test_334() {
|
7317 + | let params = crate::config::endpoint::Params::builder()
|
7318 + | .use_fips(true)
|
7319 + | .use_dual_stack(true)
|
7320 + | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7321 + | .account_id_endpoint_mode("preferred".to_string())
|
7322 + | .region("us-iso-east-1".to_string())
|
7323 + | .build()
|
7324 + | .expect("invalid params");
|
7325 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7326 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
7327 + | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb-fips.us-iso-east-1.api.aws.ic.gov");
|
7328 + | assert_eq!(
|
7329 + | endpoint,
|
7330 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7331 + | .url("https://dynamodb-fips.us-iso-east-1.api.aws.ic.gov")
|
7332 + | .build()
|
7333 + | );
|
7334 + | }
|
7335 + |
|
7470 7336 | /// {UseFIPS=true, UseDualStack=false, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7471 7337 | #[test]
|
7472 - | fn test_330() {
|
7338 + | fn test_335() {
|
7473 7339 | let params = crate::config::endpoint::Params::builder()
|
7474 7340 | .use_fips(true)
|
7475 7341 | .use_dual_stack(false)
|
7476 7342 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7477 7343 | .account_id_endpoint_mode("preferred".to_string())
|
7478 7344 | .region("us-iso-east-1".to_string())
|
7479 7345 | .build()
|
7480 7346 | .expect("invalid params");
|
7481 7347 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7482 7348 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7483 7349 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb-fips.us-iso-east-1.c2s.ic.gov");
|
7484 7350 | assert_eq!(
|
7485 7351 | endpoint,
|
7486 7352 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7487 7353 | .url("https://dynamodb-fips.us-iso-east-1.c2s.ic.gov")
|
7488 7354 | .build()
|
7489 7355 | );
|
7490 7356 | }
|
7491 7357 |
|
7358 + | /// {UseFIPS=false, UseDualStack=true, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7359 + | #[test]
|
7360 + | fn test_336() {
|
7361 + | let params = crate::config::endpoint::Params::builder()
|
7362 + | .use_fips(false)
|
7363 + | .use_dual_stack(true)
|
7364 + | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7365 + | .account_id_endpoint_mode("preferred".to_string())
|
7366 + | .region("us-iso-east-1".to_string())
|
7367 + | .build()
|
7368 + | .expect("invalid params");
|
7369 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7370 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
7371 + | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.api.aws.ic.gov");
|
7372 + | assert_eq!(
|
7373 + | endpoint,
|
7374 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7375 + | .url("https://dynamodb.us-iso-east-1.api.aws.ic.gov")
|
7376 + | .build()
|
7377 + | );
|
7378 + | }
|
7379 + |
|
7492 7380 | /// {UseFIPS=false, UseDualStack=false, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7493 7381 | #[test]
|
7494 - | fn test_331() {
|
7382 + | fn test_337() {
|
7495 7383 | let params = crate::config::endpoint::Params::builder()
|
7496 7384 | .use_fips(false)
|
7497 7385 | .use_dual_stack(false)
|
7498 7386 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7499 7387 | .account_id_endpoint_mode("preferred".to_string())
|
7500 7388 | .region("us-iso-east-1".to_string())
|
7501 7389 | .build()
|
7502 7390 | .expect("invalid params");
|
7503 7391 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7504 7392 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7505 7393 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7506 7394 | assert_eq!(
|
7507 7395 | endpoint,
|
7508 7396 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7509 7397 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7510 7398 | .build()
|
7511 7399 | );
|
7512 7400 | }
|
7513 7401 |
|
7514 7402 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7515 7403 | #[test]
|
7516 - | fn test_332() {
|
7404 + | fn test_338() {
|
7517 7405 | let params = crate::config::endpoint::Params::builder()
|
7518 7406 | .use_fips(false)
|
7519 7407 | .use_dual_stack(false)
|
7520 7408 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7521 7409 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7522 7410 | .account_id_endpoint_mode("preferred".to_string())
|
7523 7411 | .region("us-iso-east-1".to_string())
|
7524 7412 | .build()
|
7525 7413 | .expect("invalid params");
|
7526 7414 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7527 7415 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7528 7416 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7529 7417 | assert_eq!(
|
7530 7418 | endpoint,
|
7531 7419 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7532 7420 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7533 7421 | .build()
|
7534 7422 | );
|
7535 7423 | }
|
7536 7424 |
|
7537 7425 | /// {UseFIPS=false, UseDualStack=false, AccountIdEndpointMode=preferred, Region=us-iso-east-1}
|
7538 7426 | #[test]
|
7539 - | fn test_333() {
|
7427 + | fn test_339() {
|
7540 7428 | let params = crate::config::endpoint::Params::builder()
|
7541 7429 | .use_fips(false)
|
7542 7430 | .use_dual_stack(false)
|
7543 7431 | .account_id_endpoint_mode("preferred".to_string())
|
7544 7432 | .region("us-iso-east-1".to_string())
|
7545 7433 | .build()
|
7546 7434 | .expect("invalid params");
|
7547 7435 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7548 7436 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7549 7437 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-iso-east-1.c2s.ic.gov");
|
7550 7438 | assert_eq!(
|
7551 7439 | endpoint,
|
7552 7440 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7553 7441 | .url("https://dynamodb.us-iso-east-1.c2s.ic.gov")
|
7554 7442 | .build()
|
7555 7443 | );
|
7556 7444 | }
|
7557 7445 |
|
7558 7446 | /// {UseFIPS=true, UseDualStack=true, AccountId=111111111111, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7559 7447 | #[test]
|
7560 - | fn test_334() {
|
7448 + | fn test_340() {
|
7561 7449 | let params = crate::config::endpoint::Params::builder()
|
7562 7450 | .use_fips(true)
|
7563 7451 | .use_dual_stack(true)
|
7564 7452 | .account_id("111111111111".to_string())
|
7565 7453 | .account_id_endpoint_mode("preferred".to_string())
|
7566 7454 | .region("us-gov-east-1".to_string())
|
7567 7455 | .build()
|
7568 7456 | .expect("invalid params");
|
7569 7457 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7570 7458 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7571 7459 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb-fips.us-gov-east-1.api.aws");
|
7572 7460 | assert_eq!(
|
7573 7461 | endpoint,
|
7574 7462 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7575 7463 | .url("https://dynamodb-fips.us-gov-east-1.api.aws")
|
7576 7464 | .build()
|
7577 7465 | );
|
7578 7466 | }
|
7579 7467 |
|
7580 7468 | /// {UseFIPS=true, UseDualStack=false, AccountId=111111111111, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7581 7469 | #[test]
|
7582 - | fn test_335() {
|
7470 + | fn test_341() {
|
7583 7471 | let params = crate::config::endpoint::Params::builder()
|
7584 7472 | .use_fips(true)
|
7585 7473 | .use_dual_stack(false)
|
7586 7474 | .account_id("111111111111".to_string())
|
7587 7475 | .account_id_endpoint_mode("preferred".to_string())
|
7588 7476 | .region("us-gov-east-1".to_string())
|
7589 7477 | .build()
|
7590 7478 | .expect("invalid params");
|
7591 7479 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7592 7480 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7593 7481 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7594 7482 | assert_eq!(
|
7595 7483 | endpoint,
|
7596 7484 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7597 7485 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7598 7486 | .build()
|
7599 7487 | );
|
7600 7488 | }
|
7601 7489 |
|
7602 7490 | /// {UseFIPS=false, UseDualStack=true, AccountId=111111111111, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7603 7491 | #[test]
|
7604 - | fn test_336() {
|
7492 + | fn test_342() {
|
7605 7493 | let params = crate::config::endpoint::Params::builder()
|
7606 7494 | .use_fips(false)
|
7607 7495 | .use_dual_stack(true)
|
7608 7496 | .account_id("111111111111".to_string())
|
7609 7497 | .account_id_endpoint_mode("preferred".to_string())
|
7610 7498 | .region("us-gov-east-1".to_string())
|
7611 7499 | .build()
|
7612 7500 | .expect("invalid params");
|
7613 7501 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7614 7502 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7615 7503 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.api.aws");
|
7616 7504 | assert_eq!(
|
7617 7505 | endpoint,
|
7618 7506 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7619 7507 | .url("https://dynamodb.us-gov-east-1.api.aws")
|
7620 7508 | .build()
|
7621 7509 | );
|
7622 7510 | }
|
7623 7511 |
|
7624 7512 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7625 7513 | #[test]
|
7626 - | fn test_337() {
|
7514 + | fn test_343() {
|
7627 7515 | let params = crate::config::endpoint::Params::builder()
|
7628 7516 | .use_fips(false)
|
7629 7517 | .use_dual_stack(false)
|
7630 7518 | .account_id("111111111111".to_string())
|
7631 7519 | .account_id_endpoint_mode("preferred".to_string())
|
7632 7520 | .region("us-gov-east-1".to_string())
|
7633 7521 | .build()
|
7634 7522 | .expect("invalid params");
|
7635 7523 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7636 7524 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7637 7525 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7638 7526 | assert_eq!(
|
7639 7527 | endpoint,
|
7640 7528 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7641 7529 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7642 7530 | .build()
|
7643 7531 | );
|
7644 7532 | }
|
7645 7533 |
|
7646 7534 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7647 7535 | #[test]
|
7648 - | fn test_338() {
|
7536 + | fn test_344() {
|
7649 7537 | let params = crate::config::endpoint::Params::builder()
|
7650 7538 | .use_fips(false)
|
7651 7539 | .use_dual_stack(false)
|
7652 7540 | .account_id("111111111111".to_string())
|
7653 7541 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7654 7542 | .account_id_endpoint_mode("preferred".to_string())
|
7655 7543 | .region("us-gov-east-1".to_string())
|
7656 7544 | .build()
|
7657 7545 | .expect("invalid params");
|
7658 7546 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7659 7547 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7660 7548 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7661 7549 | assert_eq!(
|
7662 7550 | endpoint,
|
7663 7551 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7664 7552 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7665 7553 | .build()
|
7666 7554 | );
|
7667 7555 | }
|
7668 7556 |
|
7669 7557 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7670 7558 | #[test]
|
7671 - | fn test_339() {
|
7559 + | fn test_345() {
|
7672 7560 | let params = crate::config::endpoint::Params::builder()
|
7673 7561 | .use_fips(false)
|
7674 7562 | .use_dual_stack(false)
|
7675 7563 | .account_id("111111111111".to_string())
|
7676 7564 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7677 7565 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7678 7566 | .account_id_endpoint_mode("preferred".to_string())
|
7679 7567 | .region("us-gov-east-1".to_string())
|
7680 7568 | .build()
|
7681 7569 | .expect("invalid params");
|
7682 7570 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7683 7571 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7684 7572 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7685 7573 | assert_eq!(
|
7686 7574 | endpoint,
|
7687 7575 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7688 7576 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7689 7577 | .build()
|
7690 7578 | );
|
7691 7579 | }
|
7692 7580 |
|
7693 7581 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7694 7582 | #[test]
|
7695 - | fn test_340() {
|
7583 + | fn test_346() {
|
7696 7584 | let params = crate::config::endpoint::Params::builder()
|
7697 7585 | .use_fips(false)
|
7698 7586 | .use_dual_stack(false)
|
7699 7587 | .account_id("111111111111".to_string())
|
7700 7588 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
7701 7589 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7702 7590 | .account_id_endpoint_mode("preferred".to_string())
|
7703 7591 | .region("us-gov-east-1".to_string())
|
7704 7592 | .build()
|
7705 7593 | .expect("invalid params");
|
7706 7594 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7707 7595 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7708 7596 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7709 7597 | assert_eq!(
|
7710 7598 | endpoint,
|
7711 7599 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7712 7600 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7713 7601 | .build()
|
7714 7602 | );
|
7715 7603 | }
|
7716 7604 |
|
7717 7605 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7718 7606 | #[test]
|
7719 - | fn test_341() {
|
7607 + | fn test_347() {
|
7720 7608 | let params = crate::config::endpoint::Params::builder()
|
7721 7609 | .use_fips(false)
|
7722 7610 | .use_dual_stack(false)
|
7723 7611 | .account_id("111111111111".to_string())
|
7724 7612 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
7725 7613 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7726 7614 | .account_id_endpoint_mode("preferred".to_string())
|
7727 7615 | .region("us-gov-east-1".to_string())
|
7728 7616 | .build()
|
7729 7617 | .expect("invalid params");
|
7730 7618 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7731 7619 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7732 7620 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7733 7621 | assert_eq!(
|
7734 7622 | endpoint,
|
7735 7623 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7736 7624 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7737 7625 | .build()
|
7738 7626 | );
|
7739 7627 | }
|
7740 7628 |
|
7741 7629 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-west-2:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7742 7630 | #[test]
|
7743 - | fn test_342() {
|
7631 + | fn test_348() {
|
7744 7632 | let params = crate::config::endpoint::Params::builder()
|
7745 7633 | .use_fips(false)
|
7746 7634 | .use_dual_stack(false)
|
7747 7635 | .account_id("111111111111".to_string())
|
7748 7636 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
7749 7637 | .resource_arn_list(vec!["arn:aws:dynamodb:us-west-2:333333333333:table/table_name".to_string().into()])
|
7750 7638 | .account_id_endpoint_mode("preferred".to_string())
|
7751 7639 | .region("us-gov-east-1".to_string())
|
7752 7640 | .build()
|
7753 7641 | .expect("invalid params");
|
7754 7642 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7755 7643 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7756 7644 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7757 7645 | assert_eq!(
|
7758 7646 | endpoint,
|
7759 7647 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7760 7648 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7761 7649 | .build()
|
7762 7650 | );
|
7763 7651 | }
|
7764 7652 |
|
7765 7653 | /// {UseFIPS=false, UseDualStack=false, AccountId=111111111111, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, ResourceArnList=[arn:aws:s3:us-east-1:333333333333:stream/testStream], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7766 7654 | #[test]
|
7767 - | fn test_343() {
|
7655 + | fn test_349() {
|
7768 7656 | let params = crate::config::endpoint::Params::builder()
|
7769 7657 | .use_fips(false)
|
7770 7658 | .use_dual_stack(false)
|
7771 7659 | .account_id("111111111111".to_string())
|
7772 7660 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
7773 7661 | .resource_arn_list(vec!["arn:aws:s3:us-east-1:333333333333:stream/testStream".to_string().into()])
|
7774 7662 | .account_id_endpoint_mode("preferred".to_string())
|
7775 7663 | .region("us-gov-east-1".to_string())
|
7776 7664 | .build()
|
7777 7665 | .expect("invalid params");
|
7778 7666 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7779 7667 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7780 7668 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7781 7669 | assert_eq!(
|
7782 7670 | endpoint,
|
7783 7671 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7784 7672 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7785 7673 | .build()
|
7786 7674 | );
|
7787 7675 | }
|
7788 7676 |
|
7789 7677 | /// {UseFIPS=false, UseDualStack=false, AccountId=, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7790 7678 | #[test]
|
7791 - | fn test_344() {
|
7679 + | fn test_350() {
|
7792 7680 | let params = crate::config::endpoint::Params::builder()
|
7793 7681 | .use_fips(false)
|
7794 7682 | .use_dual_stack(false)
|
7795 7683 | .account_id("".to_string())
|
7796 7684 | .account_id_endpoint_mode("preferred".to_string())
|
7797 7685 | .region("us-gov-east-1".to_string())
|
7798 7686 | .build()
|
7799 7687 | .expect("invalid params");
|
7800 7688 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7801 7689 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7802 7690 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7803 7691 | assert_eq!(
|
7804 7692 | endpoint,
|
7805 7693 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7806 7694 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7807 7695 | .build()
|
7808 7696 | );
|
7809 7697 | }
|
7810 7698 |
|
7811 7699 | /// {UseFIPS=true, UseDualStack=true, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7812 7700 | #[test]
|
7813 - | fn test_345() {
|
7701 + | fn test_351() {
|
7814 7702 | let params = crate::config::endpoint::Params::builder()
|
7815 7703 | .use_fips(true)
|
7816 7704 | .use_dual_stack(true)
|
7817 7705 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7818 7706 | .account_id_endpoint_mode("preferred".to_string())
|
7819 7707 | .region("us-gov-east-1".to_string())
|
7820 7708 | .build()
|
7821 7709 | .expect("invalid params");
|
7822 7710 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7823 7711 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7824 7712 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb-fips.us-gov-east-1.api.aws");
|
7825 7713 | assert_eq!(
|
7826 7714 | endpoint,
|
7827 7715 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7828 7716 | .url("https://dynamodb-fips.us-gov-east-1.api.aws")
|
7829 7717 | .build()
|
7830 7718 | );
|
7831 7719 | }
|
7832 7720 |
|
7833 7721 | /// {UseFIPS=true, UseDualStack=false, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7834 7722 | #[test]
|
7835 - | fn test_346() {
|
7723 + | fn test_352() {
|
7836 7724 | let params = crate::config::endpoint::Params::builder()
|
7837 7725 | .use_fips(true)
|
7838 7726 | .use_dual_stack(false)
|
7839 7727 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7840 7728 | .account_id_endpoint_mode("preferred".to_string())
|
7841 7729 | .region("us-gov-east-1".to_string())
|
7842 7730 | .build()
|
7843 7731 | .expect("invalid params");
|
7844 7732 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7845 7733 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7846 7734 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7847 7735 | assert_eq!(
|
7848 7736 | endpoint,
|
7849 7737 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7850 7738 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7851 7739 | .build()
|
7852 7740 | );
|
7853 7741 | }
|
7854 7742 |
|
7855 7743 | /// {UseFIPS=false, UseDualStack=true, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7856 7744 | #[test]
|
7857 - | fn test_347() {
|
7745 + | fn test_353() {
|
7858 7746 | let params = crate::config::endpoint::Params::builder()
|
7859 7747 | .use_fips(false)
|
7860 7748 | .use_dual_stack(true)
|
7861 7749 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7862 7750 | .account_id_endpoint_mode("preferred".to_string())
|
7863 7751 | .region("us-gov-east-1".to_string())
|
7864 7752 | .build()
|
7865 7753 | .expect("invalid params");
|
7866 7754 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7867 7755 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7868 7756 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.api.aws");
|
7869 7757 | assert_eq!(
|
7870 7758 | endpoint,
|
7871 7759 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7872 7760 | .url("https://dynamodb.us-gov-east-1.api.aws")
|
7873 7761 | .build()
|
7874 7762 | );
|
7875 7763 | }
|
7876 7764 |
|
7877 7765 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7878 7766 | #[test]
|
7879 - | fn test_348() {
|
7767 + | fn test_354() {
|
7880 7768 | let params = crate::config::endpoint::Params::builder()
|
7881 7769 | .use_fips(false)
|
7882 7770 | .use_dual_stack(false)
|
7883 7771 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
7884 7772 | .account_id_endpoint_mode("preferred".to_string())
|
7885 7773 | .region("us-gov-east-1".to_string())
|
7886 7774 | .build()
|
7887 7775 | .expect("invalid params");
|
7888 7776 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7889 7777 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7890 7778 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7891 7779 | assert_eq!(
|
7892 7780 | endpoint,
|
7893 7781 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7894 7782 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7895 7783 | .build()
|
7896 7784 | );
|
7897 7785 | }
|
7898 7786 |
|
7899 7787 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=arn:aws:dynamodb:us-west-2:222222222222:table/table_name, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7900 7788 | #[test]
|
7901 - | fn test_349() {
|
7789 + | fn test_355() {
|
7902 7790 | let params = crate::config::endpoint::Params::builder()
|
7903 7791 | .use_fips(false)
|
7904 7792 | .use_dual_stack(false)
|
7905 7793 | .resource_arn("arn:aws:dynamodb:us-west-2:222222222222:table/table_name".to_string())
|
7906 7794 | .account_id_endpoint_mode("preferred".to_string())
|
7907 7795 | .region("us-gov-east-1".to_string())
|
7908 7796 | .build()
|
7909 7797 | .expect("invalid params");
|
7910 7798 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7911 7799 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7912 7800 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7913 7801 | assert_eq!(
|
7914 7802 | endpoint,
|
7915 7803 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7916 7804 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7917 7805 | .build()
|
7918 7806 | );
|
7919 7807 | }
|
7920 7808 |
|
7921 7809 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=arn:aws:s3:us-west-2:222222222222:stream/testStream, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7922 7810 | #[test]
|
7923 - | fn test_350() {
|
7811 + | fn test_356() {
|
7924 7812 | let params = crate::config::endpoint::Params::builder()
|
7925 7813 | .use_fips(false)
|
7926 7814 | .use_dual_stack(false)
|
7927 7815 | .resource_arn("arn:aws:s3:us-west-2:222222222222:stream/testStream".to_string())
|
7928 7816 | .account_id_endpoint_mode("preferred".to_string())
|
7929 7817 | .region("us-gov-east-1".to_string())
|
7930 7818 | .build()
|
7931 7819 | .expect("invalid params");
|
7932 7820 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7933 7821 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7934 7822 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7935 7823 | assert_eq!(
|
7936 7824 | endpoint,
|
7937 7825 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7938 7826 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7939 7827 | .build()
|
7940 7828 | );
|
7941 7829 | }
|
7942 7830 |
|
7943 7831 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7944 7832 | #[test]
|
7945 - | fn test_351() {
|
7833 + | fn test_357() {
|
7946 7834 | let params = crate::config::endpoint::Params::builder()
|
7947 7835 | .use_fips(false)
|
7948 7836 | .use_dual_stack(false)
|
7949 7837 | .resource_arn("".to_string())
|
7950 7838 | .account_id_endpoint_mode("preferred".to_string())
|
7951 7839 | .region("us-gov-east-1".to_string())
|
7952 7840 | .build()
|
7953 7841 | .expect("invalid params");
|
7954 7842 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7955 7843 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7956 7844 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
7957 7845 | assert_eq!(
|
7958 7846 | endpoint,
|
7959 7847 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7960 7848 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
7961 7849 | .build()
|
7962 7850 | );
|
7963 7851 | }
|
7964 7852 |
|
7965 7853 | /// {UseFIPS=true, UseDualStack=true, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7966 7854 | #[test]
|
7967 - | fn test_352() {
|
7855 + | fn test_358() {
|
7968 7856 | let params = crate::config::endpoint::Params::builder()
|
7969 7857 | .use_fips(true)
|
7970 7858 | .use_dual_stack(true)
|
7971 7859 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7972 7860 | .account_id_endpoint_mode("preferred".to_string())
|
7973 7861 | .region("us-gov-east-1".to_string())
|
7974 7862 | .build()
|
7975 7863 | .expect("invalid params");
|
7976 7864 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7977 7865 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7978 7866 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb-fips.us-gov-east-1.api.aws");
|
7979 7867 | assert_eq!(
|
7980 7868 | endpoint,
|
7981 7869 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7982 7870 | .url("https://dynamodb-fips.us-gov-east-1.api.aws")
|
7983 7871 | .build()
|
7984 7872 | );
|
7985 7873 | }
|
7986 7874 |
|
7987 7875 | /// {UseFIPS=true, UseDualStack=false, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
7988 7876 | #[test]
|
7989 - | fn test_353() {
|
7877 + | fn test_359() {
|
7990 7878 | let params = crate::config::endpoint::Params::builder()
|
7991 7879 | .use_fips(true)
|
7992 7880 | .use_dual_stack(false)
|
7993 7881 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
7994 7882 | .account_id_endpoint_mode("preferred".to_string())
|
7995 7883 | .region("us-gov-east-1".to_string())
|
7996 7884 | .build()
|
7997 7885 | .expect("invalid params");
|
7998 7886 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7999 7887 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8000 7888 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
8001 7889 | assert_eq!(
|
8002 7890 | endpoint,
|
8003 7891 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8004 7892 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
8005 7893 | .build()
|
8006 7894 | );
|
8007 7895 | }
|
8008 7896 |
|
8009 7897 | /// {UseFIPS=false, UseDualStack=true, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
8010 7898 | #[test]
|
8011 - | fn test_354() {
|
7899 + | fn test_360() {
|
8012 7900 | let params = crate::config::endpoint::Params::builder()
|
8013 7901 | .use_fips(false)
|
8014 7902 | .use_dual_stack(true)
|
8015 7903 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
8016 7904 | .account_id_endpoint_mode("preferred".to_string())
|
8017 7905 | .region("us-gov-east-1".to_string())
|
8018 7906 | .build()
|
8019 7907 | .expect("invalid params");
|
8020 7908 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8021 7909 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8022 7910 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.api.aws");
|
8023 7911 | assert_eq!(
|
8024 7912 | endpoint,
|
8025 7913 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8026 7914 | .url("https://dynamodb.us-gov-east-1.api.aws")
|
8027 7915 | .build()
|
8028 7916 | );
|
8029 7917 | }
|
8030 7918 |
|
8031 7919 | /// {UseFIPS=false, UseDualStack=false, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
8032 7920 | #[test]
|
8033 - | fn test_355() {
|
7921 + | fn test_361() {
|
8034 7922 | let params = crate::config::endpoint::Params::builder()
|
8035 7923 | .use_fips(false)
|
8036 7924 | .use_dual_stack(false)
|
8037 7925 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
8038 7926 | .account_id_endpoint_mode("preferred".to_string())
|
8039 7927 | .region("us-gov-east-1".to_string())
|
8040 7928 | .build()
|
8041 7929 | .expect("invalid params");
|
8042 7930 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8043 7931 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8044 7932 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
8045 7933 | assert_eq!(
|
8046 7934 | endpoint,
|
8047 7935 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8048 7936 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
8049 7937 | .build()
|
8050 7938 | );
|
8051 7939 | }
|
8052 7940 |
|
8053 7941 | /// {UseFIPS=false, UseDualStack=false, ResourceArn=arn:aws:dynamodb:us-east-1:222222222222:table/table_name, ResourceArnList=[arn:aws:dynamodb:us-east-1:333333333333:table/table_name], AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
8054 7942 | #[test]
|
8055 - | fn test_356() {
|
7943 + | fn test_362() {
|
8056 7944 | let params = crate::config::endpoint::Params::builder()
|
8057 7945 | .use_fips(false)
|
8058 7946 | .use_dual_stack(false)
|
8059 7947 | .resource_arn("arn:aws:dynamodb:us-east-1:222222222222:table/table_name".to_string())
|
8060 7948 | .resource_arn_list(vec!["arn:aws:dynamodb:us-east-1:333333333333:table/table_name".to_string().into()])
|
8061 7949 | .account_id_endpoint_mode("preferred".to_string())
|
8062 7950 | .region("us-gov-east-1".to_string())
|
8063 7951 | .build()
|
8064 7952 | .expect("invalid params");
|
8065 7953 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8066 7954 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8067 7955 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
8068 7956 | assert_eq!(
|
8069 7957 | endpoint,
|
8070 7958 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8071 7959 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
8072 7960 | .build()
|
8073 7961 | );
|
8074 7962 | }
|
8075 7963 |
|
8076 7964 | /// {UseFIPS=false, UseDualStack=false, AccountIdEndpointMode=preferred, Region=us-gov-east-1}
|
8077 7965 | #[test]
|
8078 - | fn test_357() {
|
7966 + | fn test_363() {
|
8079 7967 | let params = crate::config::endpoint::Params::builder()
|
8080 7968 | .use_fips(false)
|
8081 7969 | .use_dual_stack(false)
|
8082 7970 | .account_id_endpoint_mode("preferred".to_string())
|
8083 7971 | .region("us-gov-east-1".to_string())
|
8084 7972 | .build()
|
8085 7973 | .expect("invalid params");
|
8086 7974 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8087 7975 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8088 7976 | let endpoint = endpoint.expect("Expected valid endpoint: https://dynamodb.us-gov-east-1.amazonaws.com");
|
8089 7977 | assert_eq!(
|
8090 7978 | endpoint,
|
8091 7979 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8092 7980 | .url("https://dynamodb.us-gov-east-1.amazonaws.com")
|
8093 7981 | .build()
|
8094 7982 | );
|
8095 7983 | }
|
7984 + |
|
7985 + | /// {Endpoint=https://dynamodb.cn-north-1.api.amazonwebservices.com.cn, Region=cn-north-1}
|
7986 + | #[test]
|
7987 + | fn test_364() {
|
7988 + | let params = crate::config::endpoint::Params::builder()
|
7989 + | .endpoint("https://dynamodb.cn-north-1.api.amazonwebservices.com.cn".to_string())
|
7990 + | .region("cn-north-1".to_string())
|
7991 + | .build()
|
7992 + | .expect("invalid params");
|
7993 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7994 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
7995 + | let error = endpoint.expect_err("expected error: Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html [{Endpoint=https://dynamodb.cn-north-1.api.amazonwebservices.com.cn, Region=cn-north-1}]");
|
7996 + | assert_eq!(format!("{}", error), "Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html")
|
7997 + | }
|
7998 + |
|
7999 + | /// {Endpoint=https://dynamodb.us-gov-east-1.api.aws, Region=us-gov-east-1}
|
8000 + | #[test]
|
8001 + | fn test_365() {
|
8002 + | let params = crate::config::endpoint::Params::builder()
|
8003 + | .endpoint("https://dynamodb.us-gov-east-1.api.aws".to_string())
|
8004 + | .region("us-gov-east-1".to_string())
|
8005 + | .build()
|
8006 + | .expect("invalid params");
|
8007 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8008 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
8009 + | let error = endpoint.expect_err("expected error: Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html [{Endpoint=https://dynamodb.us-gov-east-1.api.aws, Region=us-gov-east-1}]");
|
8010 + | assert_eq!(format!("{}", error), "Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html")
|
8011 + | }
|
8012 + |
|
8013 + | /// {Endpoint=https://dynamodb.us-east-1.api.aws, Region=us-east-1}
|
8014 + | #[test]
|
8015 + | fn test_366() {
|
8016 + | let params = crate::config::endpoint::Params::builder()
|
8017 + | .endpoint("https://dynamodb.us-east-1.api.aws".to_string())
|
8018 + | .region("us-east-1".to_string())
|
8019 + | .build()
|
8020 + | .expect("invalid params");
|
8021 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8022 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
8023 + | let error = endpoint.expect_err("expected error: Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html [{Endpoint=https://dynamodb.us-east-1.api.aws, Region=us-east-1}]");
|
8024 + | assert_eq!(format!("{}", error), "Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html")
|
8025 + | }
|
8026 + |
|
8027 + | /// {Endpoint=https://111111111111.ddb.us-east-1.api.aws, Region=us-east-1}
|
8028 + | #[test]
|
8029 + | fn test_367() {
|
8030 + | let params = crate::config::endpoint::Params::builder()
|
8031 + | .endpoint("https://111111111111.ddb.us-east-1.api.aws".to_string())
|
8032 + | .region("us-east-1".to_string())
|
8033 + | .build()
|
8034 + | .expect("invalid params");
|
8035 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8036 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
8037 + | let endpoint = endpoint.expect("Expected valid endpoint: https://111111111111.ddb.us-east-1.api.aws");
|
8038 + | assert_eq!(
|
8039 + | endpoint,
|
8040 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8041 + | .url("https://111111111111.ddb.us-east-1.api.aws")
|
8042 + | .build()
|
8043 + | );
|
8044 + | }
|
8045 + |
|
8046 + | /// {Endpoint=https://vpce-1a2b3c4d-5e6f.dynamodb.us-east-1.vpce.api.aws, Region=us-east-1}
|
8047 + | #[test]
|
8048 + | fn test_368() {
|
8049 + | let params = crate::config::endpoint::Params::builder()
|
8050 + | .endpoint("https://vpce-1a2b3c4d-5e6f.dynamodb.us-east-1.vpce.api.aws".to_string())
|
8051 + | .region("us-east-1".to_string())
|
8052 + | .build()
|
8053 + | .expect("invalid params");
|
8054 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8055 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
8056 + | let endpoint = endpoint.expect("Expected valid endpoint: https://vpce-1a2b3c4d-5e6f.dynamodb.us-east-1.vpce.api.aws");
|
8057 + | assert_eq!(
|
8058 + | endpoint,
|
8059 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8060 + | .url("https://vpce-1a2b3c4d-5e6f.dynamodb.us-east-1.vpce.api.aws")
|
8061 + | .build()
|
8062 + | );
|
8063 + | }
|
8064 + |
|
8065 + | /// {Endpoint=https://dynamodb.eu-west-1.api.aws, Region=eu-west-1}
|
8066 + | #[test]
|
8067 + | fn test_369() {
|
8068 + | let params = crate::config::endpoint::Params::builder()
|
8069 + | .endpoint("https://dynamodb.eu-west-1.api.aws".to_string())
|
8070 + | .region("eu-west-1".to_string())
|
8071 + | .build()
|
8072 + | .expect("invalid params");
|
8073 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8074 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
8075 + | let error = endpoint.expect_err("expected error: Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html [{Endpoint=https://dynamodb.eu-west-1.api.aws, Region=eu-west-1}]");
|
8076 + | assert_eq!(format!("{}", error), "Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html")
|
8077 + | }
|
8078 + |
|
8079 + | /// {Endpoint=https://dynamodb.us-west-2.api.aws, Region=us-west-2}
|
8080 + | #[test]
|
8081 + | fn test_370() {
|
8082 + | let params = crate::config::endpoint::Params::builder()
|
8083 + | .endpoint("https://dynamodb.us-west-2.api.aws".to_string())
|
8084 + | .region("us-west-2".to_string())
|
8085 + | .build()
|
8086 + | .expect("invalid params");
|
8087 + | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8088 + | let endpoint = resolver.resolve_endpoint(¶ms);
|
8089 + | let error = endpoint.expect_err("expected error: Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html [{Endpoint=https://dynamodb.us-west-2.api.aws, Region=us-west-2}]");
|
8090 + | assert_eq!(format!("{}", error), "Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html")
|
8091 + | }
|
8096 8092 | }
|
8097 8093 |
|
8098 8094 | /// Endpoint resolver trait specific to Amazon DynamoDB
|
8099 8095 | pub trait ResolveEndpoint: ::std::marker::Send + ::std::marker::Sync + ::std::fmt::Debug {
|
8100 8096 | /// Resolve an endpoint with the given parameters
|
8101 8097 | fn resolve_endpoint<'a>(&'a self, params: &'a crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a>;
|
8102 8098 |
|
8103 8099 | /// Convert this service-specific resolver into a `SharedEndpointResolver`
|
8104 8100 | ///
|
8105 8101 | /// The resulting resolver will downcast `EndpointResolverParams` into `crate::config::endpoint::Params`.
|
8156 8152 | // No account ID; nothing to do.
|
8157 8153 | }
|
8158 8154 | (::std::option::Option::None, _) => {
|
8159 8155 | return ::std::result::Result::Err("service-specific endpoint params was not present".into());
|
8160 8156 | }
|
8161 8157 | }
|
8162 8158 | ::std::result::Result::Ok(())
|
8163 8159 | }
|
8164 8160 | }
|
8165 8161 |
|
8166 - | /// The default endpoint resolver
|
8167 - | #[derive(Debug, Default)]
|
8162 + | #[derive(Debug)]
|
8163 + | /// The default endpoint resolver.
|
8168 8164 | pub struct DefaultResolver {
|
8169 - | partition_resolver: crate::endpoint_lib::partition::PartitionResolver,
|
8165 + | partition_resolver: &'static crate::endpoint_lib::partition::PartitionResolver,
|
8166 + | endpoint_cache: ::arc_swap::ArcSwap<::std::option::Option<(Params, ::aws_smithy_types::endpoint::Endpoint)>>,
|
8167 + | }
|
8168 + |
|
8169 + | impl Default for DefaultResolver {
|
8170 + | fn default() -> Self {
|
8171 + | Self::new()
|
8172 + | }
|
8170 8173 | }
|
8171 8174 |
|
8172 8175 | impl DefaultResolver {
|
8173 - | /// Create a new endpoint resolver with default settings
|
8176 + | /// Create a new DefaultResolver
|
8174 8177 | pub fn new() -> Self {
|
8175 8178 | Self {
|
8176 - | partition_resolver: crate::endpoint_lib::DEFAULT_PARTITION_RESOLVER.clone(),
|
8179 + | partition_resolver: &crate::endpoint_lib::DEFAULT_PARTITION_RESOLVER,
|
8180 + | endpoint_cache: ::arc_swap::ArcSwap::from_pointee(None),
|
8177 8181 | }
|
8178 8182 | }
|
8179 8183 |
|
8180 - | fn resolve_endpoint(
|
8181 - | &self,
|
8182 - | params: &crate::config::endpoint::Params,
|
8184 + | #[allow(
|
8185 + | unused_variables,
|
8186 + | unused_parens,
|
8187 + | clippy::double_parens,
|
8188 + | clippy::useless_conversion,
|
8189 + | clippy::bool_comparison,
|
8190 + | clippy::comparison_to_empty,
|
8191 + | clippy::needless_borrow,
|
8192 + | clippy::useless_asref,
|
8193 + | clippy::redundant_closure_call,
|
8194 + | clippy::clone_on_copy
|
8195 + | )]
|
8196 + | fn resolve_endpoint<'a>(
|
8197 + | &'a self,
|
8198 + | params: &'a crate::config::endpoint::Params,
|
8183 8199 | ) -> ::std::result::Result<::aws_smithy_types::endpoint::Endpoint, ::aws_smithy_runtime_api::box_error::BoxError> {
|
8184 - | let mut diagnostic_collector = crate::endpoint_lib::diagnostic::DiagnosticCollector::new();
|
8185 - | Ok(
|
8186 - | crate::config::endpoint::internals::resolve_endpoint(params, &mut diagnostic_collector, &self.partition_resolver)
|
8187 - | .map_err(|err| err.with_source(diagnostic_collector.take_last_error()))?,
|
8188 - | )
|
8200 + | let mut _diagnostic_collector = crate::endpoint_lib::diagnostic::DiagnosticCollector::new();
|
8201 + | #[allow(unused_mut)]
|
8202 + | let mut context = ConditionContext::default();
|
8203 + |
|
8204 + | // Param bindings
|
8205 + | let region = ¶ms.region;
|
8206 + | let use_dual_stack = ¶ms.use_dual_stack;
|
8207 + | let use_fips = ¶ms.use_fips;
|
8208 + | let endpoint = ¶ms.endpoint;
|
8209 + | let account_id = ¶ms.account_id;
|
8210 + | let account_id_endpoint_mode = ¶ms.account_id_endpoint_mode;
|
8211 + | let resource_arn = ¶ms.resource_arn;
|
8212 + | let resource_arn_list = ¶ms.resource_arn_list;
|
8213 + |
|
8214 + | let mut current_ref: i32 = 67;
|
8215 + | loop {
|
8216 + | match current_ref {
|
8217 + | ref_val if ref_val >= 100_000_000 => {
|
8218 + | return match (ref_val - 100_000_000) as usize {
|
8219 + | 0 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("No endpoint rule matched")) as ::aws_smithy_runtime_api::box_error::BoxError),
|
8220 + | 1 => {
|
8221 + |
|
8222 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("Invalid Configuration: FIPS and custom endpoint are not supported"
|
8223 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8224 + | },
|
8225 + | 2 => {
|
8226 + |
|
8227 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("Invalid Configuration: Dualstack and custom endpoint are not supported"
|
8228 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8229 + | },
|
8230 + | 3 => {
|
8231 + |
|
8232 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html"
|
8233 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8234 + | },
|
8235 + | 4 => {
|
8236 + | let endpoint = params.endpoint.as_deref().unwrap_or_default();
|
8237 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url(endpoint.to_owned())
|
8238 + | .build())
|
8239 + | },
|
8240 + | 5 => {
|
8241 + |
|
8242 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("Invalid Configuration: FIPS and local endpoint are not supported"
|
8243 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8244 + | },
|
8245 + | 6 => {
|
8246 + |
|
8247 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("Invalid Configuration: Dualstack and local endpoint are not supported"
|
8248 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8249 + | },
|
8250 + | 7 => {
|
8251 + |
|
8252 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url("http://localhost:8000"
|
8253 + | .to_string())
|
8254 + | .auth_scheme(::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4"
|
8255 + | .to_string(), 2)
|
8256 + | .put("signingName", "dynamodb")
|
8257 + | .put("signingRegion", "us-east-1")
|
8258 + | )
|
8259 + | .build())
|
8260 + | },
|
8261 + | 8 => {
|
8262 + |
|
8263 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("Invalid Configuration: AccountIdEndpointMode is required and FIPS is enabled, but FIPS account endpoints are not supported"
|
8264 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8265 + | },
|
8266 + | 9 => {
|
8267 + | let region = params.region.as_deref().unwrap_or_default();
|
8268 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8269 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8270 + | out.push_str("https://dynamodb-fips.");
|
8271 + | #[allow(clippy::needless_borrow)]
|
8272 + | out.push_str(®ion.as_ref());
|
8273 + | out.push('.');
|
8274 + | #[allow(clippy::needless_borrow)]
|
8275 + | out.push_str(&partition_result.dual_stack_dns_suffix());
|
8276 + | out })
|
8277 + | .build())
|
8278 + | },
|
8279 + | 10 => {
|
8280 + |
|
8281 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("FIPS and DualStack are enabled, but this partition does not support one or both"
|
8282 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8283 + | },
|
8284 + | 11 => {
|
8285 + | let region = params.region.as_deref().unwrap_or_default();
|
8286 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8287 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8288 + | out.push_str("https://dynamodb.");
|
8289 + | #[allow(clippy::needless_borrow)]
|
8290 + | out.push_str(®ion.as_ref());
|
8291 + | out.push('.');
|
8292 + | #[allow(clippy::needless_borrow)]
|
8293 + | out.push_str(&partition_result.dns_suffix());
|
8294 + | out })
|
8295 + | .build())
|
8296 + | },
|
8297 + | 12 => {
|
8298 + | let region = params.region.as_deref().unwrap_or_default();
|
8299 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8300 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8301 + | out.push_str("https://dynamodb-fips.");
|
8302 + | #[allow(clippy::needless_borrow)]
|
8303 + | out.push_str(®ion.as_ref());
|
8304 + | out.push('.');
|
8305 + | #[allow(clippy::needless_borrow)]
|
8306 + | out.push_str(&partition_result.dns_suffix());
|
8307 + | out })
|
8308 + | .build())
|
8309 + | },
|
8310 + | 13 => {
|
8311 + |
|
8312 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("FIPS is enabled but this partition does not support FIPS"
|
8313 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8314 + | },
|
8315 + | 14 => {
|
8316 + | let region = params.region.as_deref().unwrap_or_default();
|
8317 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8318 + | let parsed_arn_ssa_2 = context.parsed_arn_ssa_2.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8319 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8320 + | out.push_str("https://");
|
8321 + | #[allow(clippy::needless_borrow)]
|
8322 + | out.push_str(&parsed_arn_ssa_2.account_id());
|
8323 + | out.push_str(".ddb.");
|
8324 + | #[allow(clippy::needless_borrow)]
|
8325 + | out.push_str(®ion.as_ref());
|
8326 + | out.push('.');
|
8327 + | #[allow(clippy::needless_borrow)]
|
8328 + | out.push_str(&partition_result.dual_stack_dns_suffix());
|
8329 + | out })
|
8330 + | .property("metricValues", vec![::aws_smithy_types::Document::from("O"
|
8331 + | .to_string()),])
|
8332 + | .build())
|
8333 + | },
|
8334 + | 15 => {
|
8335 + | let region = params.region.as_deref().unwrap_or_default();
|
8336 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8337 + | let parsed_arn_ssa_1 = context.parsed_arn_ssa_1.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8338 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8339 + | out.push_str("https://");
|
8340 + | #[allow(clippy::needless_borrow)]
|
8341 + | out.push_str(&parsed_arn_ssa_1.account_id());
|
8342 + | out.push_str(".ddb.");
|
8343 + | #[allow(clippy::needless_borrow)]
|
8344 + | out.push_str(®ion.as_ref());
|
8345 + | out.push('.');
|
8346 + | #[allow(clippy::needless_borrow)]
|
8347 + | out.push_str(&partition_result.dual_stack_dns_suffix());
|
8348 + | out })
|
8349 + | .property("metricValues", vec![::aws_smithy_types::Document::from("O"
|
8350 + | .to_string()),])
|
8351 + | .build())
|
8352 + | },
|
8353 + | 16 => {
|
8354 + | let region = params.region.as_deref().unwrap_or_default();
|
8355 + | let account_id = params.account_id.as_deref().unwrap_or_default();
|
8356 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8357 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8358 + | out.push_str("https://");
|
8359 + | #[allow(clippy::needless_borrow)]
|
8360 + | out.push_str(&account_id.as_ref());
|
8361 + | out.push_str(".ddb.");
|
8362 + | #[allow(clippy::needless_borrow)]
|
8363 + | out.push_str(®ion.as_ref());
|
8364 + | out.push('.');
|
8365 + | #[allow(clippy::needless_borrow)]
|
8366 + | out.push_str(&partition_result.dual_stack_dns_suffix());
|
8367 + | out })
|
8368 + | .property("metricValues", vec![::aws_smithy_types::Document::from("O"
|
8369 + | .to_string()),])
|
8370 + | .build())
|
8371 + | },
|
8372 + | 17 => {
|
8373 + |
|
8374 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("Credentials-sourced account ID parameter is invalid"
|
8375 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8376 + | },
|
8377 + | 18 => {
|
8378 + |
|
8379 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("AccountIdEndpointMode is required but no AccountID was provided or able to be loaded"
|
8380 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8381 + | },
|
8382 + | 19 => {
|
8383 + |
|
8384 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("Invalid Configuration: AccountIdEndpointMode is required but account endpoints are not supported in this partition"
|
8385 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8386 + | },
|
8387 + | 20 => {
|
8388 + | let region = params.region.as_deref().unwrap_or_default();
|
8389 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8390 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8391 + | out.push_str("https://dynamodb.");
|
8392 + | #[allow(clippy::needless_borrow)]
|
8393 + | out.push_str(®ion.as_ref());
|
8394 + | out.push('.');
|
8395 + | #[allow(clippy::needless_borrow)]
|
8396 + | out.push_str(&partition_result.dual_stack_dns_suffix());
|
8397 + | out })
|
8398 + | .build())
|
8399 + | },
|
8400 + | 21 => {
|
8401 + |
|
8402 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("DualStack is enabled but this partition does not support DualStack"
|
8403 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8404 + | },
|
8405 + | 22 => {
|
8406 + | let region = params.region.as_deref().unwrap_or_default();
|
8407 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8408 + | let parsed_arn_ssa_2 = context.parsed_arn_ssa_2.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8409 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8410 + | out.push_str("https://");
|
8411 + | #[allow(clippy::needless_borrow)]
|
8412 + | out.push_str(&parsed_arn_ssa_2.account_id());
|
8413 + | out.push_str(".ddb.");
|
8414 + | #[allow(clippy::needless_borrow)]
|
8415 + | out.push_str(®ion.as_ref());
|
8416 + | out.push('.');
|
8417 + | #[allow(clippy::needless_borrow)]
|
8418 + | out.push_str(&partition_result.dns_suffix());
|
8419 + | out })
|
8420 + | .property("metricValues", vec![::aws_smithy_types::Document::from("O"
|
8421 + | .to_string()),])
|
8422 + | .build())
|
8423 + | },
|
8424 + | 23 => {
|
8425 + | let region = params.region.as_deref().unwrap_or_default();
|
8426 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8427 + | let parsed_arn_ssa_1 = context.parsed_arn_ssa_1.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8428 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8429 + | out.push_str("https://");
|
8430 + | #[allow(clippy::needless_borrow)]
|
8431 + | out.push_str(&parsed_arn_ssa_1.account_id());
|
8432 + | out.push_str(".ddb.");
|
8433 + | #[allow(clippy::needless_borrow)]
|
8434 + | out.push_str(®ion.as_ref());
|
8435 + | out.push('.');
|
8436 + | #[allow(clippy::needless_borrow)]
|
8437 + | out.push_str(&partition_result.dns_suffix());
|
8438 + | out })
|
8439 + | .property("metricValues", vec![::aws_smithy_types::Document::from("O"
|
8440 + | .to_string()),])
|
8441 + | .build())
|
8442 + | },
|
8443 + | 24 => {
|
8444 + | let region = params.region.as_deref().unwrap_or_default();
|
8445 + | let account_id = params.account_id.as_deref().unwrap_or_default();
|
8446 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
8447 + | ::std::result::Result::Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
|
8448 + | out.push_str("https://");
|
8449 + | #[allow(clippy::needless_borrow)]
|
8450 + | out.push_str(&account_id.as_ref());
|
8451 + | out.push_str(".ddb.");
|
8452 + | #[allow(clippy::needless_borrow)]
|
8453 + | out.push_str(®ion.as_ref());
|
8454 + | out.push('.');
|
8455 + | #[allow(clippy::needless_borrow)]
|
8456 + | out.push_str(&partition_result.dns_suffix());
|
8457 + | out })
|
8458 + | .property("metricValues", vec![::aws_smithy_types::Document::from("O"
|
8459 + | .to_string()),])
|
8460 + | .build())
|
8461 + | },
|
8462 + | 25 => {
|
8463 + |
|
8464 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("Invalid Configuration: Missing Region"
|
8465 + | .to_string())) as ::aws_smithy_runtime_api::box_error::BoxError)
|
8466 + | },
|
8467 + | _ => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("No endpoint rule matched")) as ::aws_smithy_runtime_api::box_error::BoxError),
|
8468 + | };
|
8469 + | }
|
8470 + | 1 | -1 => {
|
8471 + | return ::std::result::Result::Err(
|
8472 + | Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("No endpoint rule matched"))
|
8473 + | as ::aws_smithy_runtime_api::box_error::BoxError,
|
8474 + | )
|
8475 + | }
|
8476 + | ref_val => {
|
8477 + | let is_complement = ref_val < 0;
|
8478 + | let node = &NODES[(ref_val.unsigned_abs() as usize) - 1];
|
8479 + | let condition_result = match node.condition_index {
|
8480 + | 0 => region.is_some(),
|
8481 + | 1 => endpoint.is_some(),
|
8482 + | 2 => (use_fips) == (&true),
|
8483 + | 3 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8484 + | let partition_result = &mut context.partition_result;
|
8485 + | let partition_resolver = &self.partition_resolver;
|
8486 + | {
|
8487 + | *partition_result = partition_resolver
|
8488 + | .resolve_partition(if let Some(param) = region { param } else { return false }, _diagnostic_collector)
|
8489 + | .map(|inner| inner.into());
|
8490 + | partition_result.is_some()
|
8491 + | }
|
8492 + | })(&mut _diagnostic_collector),
|
8493 + | 4 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8494 + | let partition_resolver = &self.partition_resolver;
|
8495 + | (region) == &mut Some(("local".to_string().into()))
|
8496 + | })(&mut _diagnostic_collector),
|
8497 + | 5 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8498 + | let partition_result = &context.partition_result;
|
8499 + | let partition_resolver = &self.partition_resolver;
|
8500 + | (if let Some(inner) = partition_result {
|
8501 + | inner.supports_fips()
|
8502 + | } else {
|
8503 + | return false;
|
8504 + | }) == (true)
|
8505 + | })(&mut _diagnostic_collector),
|
8506 + | 6 => (use_dual_stack) == (&true),
|
8507 + | 7 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8508 + | let partition_result = &context.partition_result;
|
8509 + | let partition_resolver = &self.partition_resolver;
|
8510 + | (if let Some(inner) = partition_result {
|
8511 + | inner.supports_dual_stack()
|
8512 + | } else {
|
8513 + | return false;
|
8514 + | }) == (true)
|
8515 + | })(&mut _diagnostic_collector),
|
8516 + | 8 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8517 + | let partition_result = &context.partition_result;
|
8518 + | let partition_resolver = &self.partition_resolver;
|
8519 + | &mut Some(
|
8520 + | ({
|
8521 + | let mut out = String::new();
|
8522 + | out.push_str("https://dynamodb.");
|
8523 + | #[allow(clippy::needless_borrow)]
|
8524 + | out.push_str(®ion.as_deref().unwrap_or_default());
|
8525 + | out.push('.');
|
8526 + | #[allow(clippy::needless_borrow)]
|
8527 + | out.push_str(&if let Some(inner) = partition_result {
|
8528 + | inner.dual_stack_dns_suffix()
|
8529 + | } else {
|
8530 + | return false;
|
8531 + | });
|
8532 + | out
|
8533 + | }
|
8534 + | .into()),
|
8535 + | ) == (endpoint)
|
8536 + | })(&mut _diagnostic_collector),
|
8537 + | 9 => account_id_endpoint_mode.is_some(),
|
8538 + | 10 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8539 + | let partition_result = &context.partition_result;
|
8540 + | let partition_resolver = &self.partition_resolver;
|
8541 + | (if let Some(inner) = partition_result {
|
8542 + | inner.name()
|
8543 + | } else {
|
8544 + | return false;
|
8545 + | }) == ("aws")
|
8546 + | })(&mut _diagnostic_collector),
|
8547 + | 11 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8548 + | let partition_resolver = &self.partition_resolver;
|
8549 + | (account_id_endpoint_mode) == &mut Some(("disabled".to_string().into()))
|
8550 + | })(&mut _diagnostic_collector),
|
8551 + | 12 => resource_arn.is_some(),
|
8552 + | 13 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8553 + | let parsed_arn_ssa_2 = &mut context.parsed_arn_ssa_2;
|
8554 + | let partition_resolver = &self.partition_resolver;
|
8555 + | {
|
8556 + | *parsed_arn_ssa_2 = crate::endpoint_lib::arn::parse_arn(
|
8557 + | if let Some(param) = resource_arn { param } else { return false },
|
8558 + | _diagnostic_collector,
|
8559 + | )
|
8560 + | .map(|inner| inner.into());
|
8561 + | parsed_arn_ssa_2.is_some()
|
8562 + | }
|
8563 + | })(&mut _diagnostic_collector),
|
8564 + | 14 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8565 + | let parsed_arn_ssa_2 = &context.parsed_arn_ssa_2;
|
8566 + | let partition_resolver = &self.partition_resolver;
|
8567 + | &mut Some(
|
8568 + | (if let Some(inner) = parsed_arn_ssa_2 {
|
8569 + | inner.region()
|
8570 + | } else {
|
8571 + | return false;
|
8572 + | }
|
8573 + | .into()),
|
8574 + | ) == (region)
|
8575 + | })(&mut _diagnostic_collector),
|
8576 + | 15 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8577 + | let parsed_arn_ssa_2 = &context.parsed_arn_ssa_2;
|
8578 + | let partition_resolver = &self.partition_resolver;
|
8579 + | (if let Some(inner) = parsed_arn_ssa_2 {
|
8580 + | inner.service()
|
8581 + | } else {
|
8582 + | return false;
|
8583 + | }) == ("dynamodb")
|
8584 + | })(&mut _diagnostic_collector),
|
8585 + | 16 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8586 + | let parsed_arn_ssa_2 = &context.parsed_arn_ssa_2;
|
8587 + | let partition_resolver = &self.partition_resolver;
|
8588 + | crate::endpoint_lib::host::is_valid_host_label(
|
8589 + | if let Some(inner) = parsed_arn_ssa_2 {
|
8590 + | inner.account_id()
|
8591 + | } else {
|
8592 + | return false;
|
8593 + | },
|
8594 + | false,
|
8595 + | _diagnostic_collector,
|
8596 + | )
|
8597 + | })(&mut _diagnostic_collector),
|
8598 + | 17 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8599 + | let parsed_arn_ssa_2 = &context.parsed_arn_ssa_2;
|
8600 + | let partition_resolver = &self.partition_resolver;
|
8601 + | crate::endpoint_lib::host::is_valid_host_label(
|
8602 + | if let Some(inner) = parsed_arn_ssa_2 {
|
8603 + | inner.region()
|
8604 + | } else {
|
8605 + | return false;
|
8606 + | },
|
8607 + | false,
|
8608 + | _diagnostic_collector,
|
8609 + | )
|
8610 + | })(&mut _diagnostic_collector),
|
8611 + | 18 => resource_arn_list.is_some(),
|
8612 + | 19 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8613 + | let first_arn = &mut context.first_arn;
|
8614 + | let partition_resolver = &self.partition_resolver;
|
8615 + | {
|
8616 + | *first_arn = if let Some(inner) = resource_arn_list {
|
8617 + | inner.first().map(|s| s.as_str())
|
8618 + | } else {
|
8619 + | return false;
|
8620 + | };
|
8621 + | first_arn.is_some()
|
8622 + | }
|
8623 + | })(&mut _diagnostic_collector),
|
8624 + | 20 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8625 + | let first_arn = &context.first_arn;
|
8626 + | let parsed_arn_ssa_1 = &mut context.parsed_arn_ssa_1;
|
8627 + | let partition_resolver = &self.partition_resolver;
|
8628 + | {
|
8629 + | *parsed_arn_ssa_1 = crate::endpoint_lib::arn::parse_arn(
|
8630 + | if let Some(param) = first_arn { param } else { return false },
|
8631 + | _diagnostic_collector,
|
8632 + | )
|
8633 + | .map(|inner| inner.into());
|
8634 + | parsed_arn_ssa_1.is_some()
|
8635 + | }
|
8636 + | })(&mut _diagnostic_collector),
|
8637 + | 21 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8638 + | let parsed_arn_ssa_1 = &context.parsed_arn_ssa_1;
|
8639 + | let partition_resolver = &self.partition_resolver;
|
8640 + | &mut Some(
|
8641 + | (if let Some(inner) = parsed_arn_ssa_1 {
|
8642 + | inner.region()
|
8643 + | } else {
|
8644 + | return false;
|
8645 + | }
|
8646 + | .into()),
|
8647 + | ) == (region)
|
8648 + | })(&mut _diagnostic_collector),
|
8649 + | 22 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8650 + | let parsed_arn_ssa_1 = &context.parsed_arn_ssa_1;
|
8651 + | let partition_resolver = &self.partition_resolver;
|
8652 + | (if let Some(inner) = parsed_arn_ssa_1 {
|
8653 + | inner.service()
|
8654 + | } else {
|
8655 + | return false;
|
8656 + | }) == ("dynamodb")
|
8657 + | })(&mut _diagnostic_collector),
|
8658 + | 23 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8659 + | let parsed_arn_ssa_1 = &context.parsed_arn_ssa_1;
|
8660 + | let partition_resolver = &self.partition_resolver;
|
8661 + | crate::endpoint_lib::host::is_valid_host_label(
|
8662 + | if let Some(inner) = parsed_arn_ssa_1 {
|
8663 + | inner.account_id()
|
8664 + | } else {
|
8665 + | return false;
|
8666 + | },
|
8667 + | false,
|
8668 + | _diagnostic_collector,
|
8669 + | )
|
8670 + | })(&mut _diagnostic_collector),
|
8671 + | 24 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8672 + | let parsed_arn_ssa_1 = &context.parsed_arn_ssa_1;
|
8673 + | let partition_resolver = &self.partition_resolver;
|
8674 + | crate::endpoint_lib::host::is_valid_host_label(
|
8675 + | if let Some(inner) = parsed_arn_ssa_1 {
|
8676 + | inner.region()
|
8677 + | } else {
|
8678 + | return false;
|
8679 + | },
|
8680 + | false,
|
8681 + | _diagnostic_collector,
|
8682 + | )
|
8683 + | })(&mut _diagnostic_collector),
|
8684 + | 25 => account_id.is_some(),
|
8685 + | 26 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8686 + | let partition_resolver = &self.partition_resolver;
|
8687 + | (account_id_endpoint_mode) == &mut Some(("required".to_string().into()))
|
8688 + | })(&mut _diagnostic_collector),
|
8689 + | 27 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8690 + | let partition_resolver = &self.partition_resolver;
|
8691 + | crate::endpoint_lib::host::is_valid_host_label(
|
8692 + | if let Some(param) = account_id { param } else { return false },
|
8693 + | false,
|
8694 + | _diagnostic_collector,
|
8695 + | )
|
8696 + | })(&mut _diagnostic_collector),
|
8697 + | 28 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
8698 + | let partition_result = &context.partition_result;
|
8699 + | let partition_resolver = &self.partition_resolver;
|
8700 + | (if let Some(inner) = partition_result {
|
8701 + | inner.name()
|
8702 + | } else {
|
8703 + | return false;
|
8704 + | }) == ("aws-us-gov")
|
8705 + | })(&mut _diagnostic_collector),
|
8706 + | _ => unreachable!("Invalid condition index"),
|
8707 + | };
|
8708 + | current_ref = if is_complement ^ condition_result { node.high_ref } else { node.low_ref };
|
8709 + | }
|
8710 + | }
|
8711 + | }
|
8189 8712 | }
|
8190 8713 | }
|
8191 8714 |
|
8192 8715 | impl crate::config::endpoint::ResolveEndpoint for DefaultResolver {
|
8193 - | fn resolve_endpoint(&self, params: &crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'_> {
|
8194 - | ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(self.resolve_endpoint(params))
|
8716 + | fn resolve_endpoint<'a>(&'a self, params: &'a crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a> {
|
8717 + | // Check single-entry cache (lock-free read via ArcSwap)
|
8718 + | let cached = self.endpoint_cache.load();
|
8719 + | if let Some((cached_params, cached_endpoint)) = cached.as_ref() {
|
8720 + | if cached_params == params {
|
8721 + | return ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(::std::result::Result::Ok(cached_endpoint.clone()));
|
8722 + | }
|
8723 + | }
|
8724 + | drop(cached);
|
8725 + | let result = self.resolve_endpoint(params);
|
8726 + | if let ::std::result::Result::Ok(ref endpoint) = result {
|
8727 + | self.endpoint_cache.store(::std::sync::Arc::new(Some((params.clone(), endpoint.clone()))));
|
8728 + | }
|
8729 + | ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(result)
|
8195 8730 | }
|
8196 8731 | }
|
8732 + | const NODES: [crate::endpoint_lib::bdd_interpreter::BddNode; 67] = [
|
8733 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8734 + | condition_index: -1,
|
8735 + | high_ref: 1,
|
8736 + | low_ref: -1,
|
8737 + | },
|
8738 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8739 + | condition_index: 8,
|
8740 + | high_ref: 100000003,
|
8741 + | low_ref: 100000004,
|
8742 + | },
|
8743 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8744 + | condition_index: 6,
|
8745 + | high_ref: 100000002,
|
8746 + | low_ref: 2,
|
8747 + | },
|
8748 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8749 + | condition_index: 6,
|
8750 + | high_ref: 100000002,
|
8751 + | low_ref: 100000004,
|
8752 + | },
|
8753 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8754 + | condition_index: 3,
|
8755 + | high_ref: 3,
|
8756 + | low_ref: 4,
|
8757 + | },
|
8758 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8759 + | condition_index: 2,
|
8760 + | high_ref: 100000001,
|
8761 + | low_ref: 5,
|
8762 + | },
|
8763 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8764 + | condition_index: 26,
|
8765 + | high_ref: 100000008,
|
8766 + | low_ref: 100000009,
|
8767 + | },
|
8768 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8769 + | condition_index: 9,
|
8770 + | high_ref: 7,
|
8771 + | low_ref: 100000009,
|
8772 + | },
|
8773 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8774 + | condition_index: 7,
|
8775 + | high_ref: 8,
|
8776 + | low_ref: 100000010,
|
8777 + | },
|
8778 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8779 + | condition_index: 28,
|
8780 + | high_ref: 100000011,
|
8781 + | low_ref: 100000012,
|
8782 + | },
|
8783 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8784 + | condition_index: 26,
|
8785 + | high_ref: 100000008,
|
8786 + | low_ref: 10,
|
8787 + | },
|
8788 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8789 + | condition_index: 9,
|
8790 + | high_ref: 11,
|
8791 + | low_ref: 10,
|
8792 + | },
|
8793 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8794 + | condition_index: 6,
|
8795 + | high_ref: 9,
|
8796 + | low_ref: 12,
|
8797 + | },
|
8798 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8799 + | condition_index: 6,
|
8800 + | high_ref: 100000010,
|
8801 + | low_ref: 100000013,
|
8802 + | },
|
8803 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8804 + | condition_index: 5,
|
8805 + | high_ref: 13,
|
8806 + | low_ref: 14,
|
8807 + | },
|
8808 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8809 + | condition_index: 4,
|
8810 + | high_ref: 100000005,
|
8811 + | low_ref: 15,
|
8812 + | },
|
8813 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8814 + | condition_index: 3,
|
8815 + | high_ref: 16,
|
8816 + | low_ref: 100000025,
|
8817 + | },
|
8818 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8819 + | condition_index: 6,
|
8820 + | high_ref: 100000006,
|
8821 + | low_ref: 100000007,
|
8822 + | },
|
8823 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8824 + | condition_index: 26,
|
8825 + | high_ref: 100000018,
|
8826 + | low_ref: 100000020,
|
8827 + | },
|
8828 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8829 + | condition_index: 27,
|
8830 + | high_ref: 100000016,
|
8831 + | low_ref: 100000017,
|
8832 + | },
|
8833 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8834 + | condition_index: 25,
|
8835 + | high_ref: 20,
|
8836 + | low_ref: 19,
|
8837 + | },
|
8838 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8839 + | condition_index: 24,
|
8840 + | high_ref: 100000015,
|
8841 + | low_ref: 21,
|
8842 + | },
|
8843 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8844 + | condition_index: 23,
|
8845 + | high_ref: 22,
|
8846 + | low_ref: 21,
|
8847 + | },
|
8848 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8849 + | condition_index: 22,
|
8850 + | high_ref: 23,
|
8851 + | low_ref: 21,
|
8852 + | },
|
8853 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8854 + | condition_index: 21,
|
8855 + | high_ref: 24,
|
8856 + | low_ref: 21,
|
8857 + | },
|
8858 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8859 + | condition_index: 20,
|
8860 + | high_ref: 25,
|
8861 + | low_ref: 21,
|
8862 + | },
|
8863 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8864 + | condition_index: 19,
|
8865 + | high_ref: 26,
|
8866 + | low_ref: 21,
|
8867 + | },
|
8868 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8869 + | condition_index: 18,
|
8870 + | high_ref: 27,
|
8871 + | low_ref: 21,
|
8872 + | },
|
8873 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8874 + | condition_index: 17,
|
8875 + | high_ref: 100000014,
|
8876 + | low_ref: 28,
|
8877 + | },
|
8878 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8879 + | condition_index: 16,
|
8880 + | high_ref: 29,
|
8881 + | low_ref: 28,
|
8882 + | },
|
8883 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8884 + | condition_index: 15,
|
8885 + | high_ref: 30,
|
8886 + | low_ref: 28,
|
8887 + | },
|
8888 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8889 + | condition_index: 14,
|
8890 + | high_ref: 31,
|
8891 + | low_ref: 28,
|
8892 + | },
|
8893 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8894 + | condition_index: 13,
|
8895 + | high_ref: 32,
|
8896 + | low_ref: 28,
|
8897 + | },
|
8898 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8899 + | condition_index: 12,
|
8900 + | high_ref: 33,
|
8901 + | low_ref: 28,
|
8902 + | },
|
8903 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8904 + | condition_index: 11,
|
8905 + | high_ref: 19,
|
8906 + | low_ref: 34,
|
8907 + | },
|
8908 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8909 + | condition_index: 26,
|
8910 + | high_ref: 100000019,
|
8911 + | low_ref: 100000020,
|
8912 + | },
|
8913 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8914 + | condition_index: 10,
|
8915 + | high_ref: 35,
|
8916 + | low_ref: 36,
|
8917 + | },
|
8918 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8919 + | condition_index: 9,
|
8920 + | high_ref: 37,
|
8921 + | low_ref: 100000020,
|
8922 + | },
|
8923 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8924 + | condition_index: 7,
|
8925 + | high_ref: 38,
|
8926 + | low_ref: 100000021,
|
8927 + | },
|
8928 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8929 + | condition_index: 26,
|
8930 + | high_ref: 100000018,
|
8931 + | low_ref: 100000011,
|
8932 + | },
|
8933 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8934 + | condition_index: 27,
|
8935 + | high_ref: 100000024,
|
8936 + | low_ref: 100000017,
|
8937 + | },
|
8938 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8939 + | condition_index: 25,
|
8940 + | high_ref: 41,
|
8941 + | low_ref: 40,
|
8942 + | },
|
8943 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8944 + | condition_index: 24,
|
8945 + | high_ref: 100000023,
|
8946 + | low_ref: 42,
|
8947 + | },
|
8948 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8949 + | condition_index: 23,
|
8950 + | high_ref: 43,
|
8951 + | low_ref: 42,
|
8952 + | },
|
8953 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8954 + | condition_index: 22,
|
8955 + | high_ref: 44,
|
8956 + | low_ref: 42,
|
8957 + | },
|
8958 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8959 + | condition_index: 21,
|
8960 + | high_ref: 45,
|
8961 + | low_ref: 42,
|
8962 + | },
|
8963 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8964 + | condition_index: 20,
|
8965 + | high_ref: 46,
|
8966 + | low_ref: 42,
|
8967 + | },
|
8968 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8969 + | condition_index: 19,
|
8970 + | high_ref: 47,
|
8971 + | low_ref: 42,
|
8972 + | },
|
8973 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8974 + | condition_index: 18,
|
8975 + | high_ref: 48,
|
8976 + | low_ref: 42,
|
8977 + | },
|
8978 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8979 + | condition_index: 17,
|
8980 + | high_ref: 100000022,
|
8981 + | low_ref: 49,
|
8982 + | },
|
8983 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8984 + | condition_index: 16,
|
8985 + | high_ref: 50,
|
8986 + | low_ref: 49,
|
8987 + | },
|
8988 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8989 + | condition_index: 15,
|
8990 + | high_ref: 51,
|
8991 + | low_ref: 49,
|
8992 + | },
|
8993 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8994 + | condition_index: 14,
|
8995 + | high_ref: 52,
|
8996 + | low_ref: 49,
|
8997 + | },
|
8998 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
8999 + | condition_index: 13,
|
9000 + | high_ref: 53,
|
9001 + | low_ref: 49,
|
9002 + | },
|
9003 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9004 + | condition_index: 12,
|
9005 + | high_ref: 54,
|
9006 + | low_ref: 49,
|
9007 + | },
|
9008 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9009 + | condition_index: 11,
|
9010 + | high_ref: 40,
|
9011 + | low_ref: 55,
|
9012 + | },
|
9013 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9014 + | condition_index: 26,
|
9015 + | high_ref: 100000019,
|
9016 + | low_ref: 100000011,
|
9017 + | },
|
9018 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9019 + | condition_index: 10,
|
9020 + | high_ref: 56,
|
9021 + | low_ref: 57,
|
9022 + | },
|
9023 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9024 + | condition_index: 9,
|
9025 + | high_ref: 58,
|
9026 + | low_ref: 100000011,
|
9027 + | },
|
9028 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9029 + | condition_index: 6,
|
9030 + | high_ref: 39,
|
9031 + | low_ref: 59,
|
9032 + | },
|
9033 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9034 + | condition_index: 4,
|
9035 + | high_ref: 18,
|
9036 + | low_ref: 60,
|
9037 + | },
|
9038 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9039 + | condition_index: 3,
|
9040 + | high_ref: 61,
|
9041 + | low_ref: 100000025,
|
9042 + | },
|
9043 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9044 + | condition_index: 2,
|
9045 + | high_ref: 17,
|
9046 + | low_ref: 62,
|
9047 + | },
|
9048 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9049 + | condition_index: 1,
|
9050 + | high_ref: 6,
|
9051 + | low_ref: 63,
|
9052 + | },
|
9053 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9054 + | condition_index: 2,
|
9055 + | high_ref: 100000001,
|
9056 + | low_ref: 4,
|
9057 + | },
|
9058 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9059 + | condition_index: 1,
|
9060 + | high_ref: 65,
|
9061 + | low_ref: 100000025,
|
9062 + | },
|
9063 + | crate::endpoint_lib::bdd_interpreter::BddNode {
|
9064 + | condition_index: 0,
|
9065 + | high_ref: 64,
|
9066 + | low_ref: 66,
|
9067 + | },
|
9068 + | ];
|
9069 + | // These are all optional since they are set by conditions and will
|
9070 + | // all be unset when we start evaluation
|
9071 + | #[derive(Default)]
|
9072 + | #[allow(unused_lifetimes)]
|
9073 + | pub(crate) struct ConditionContext<'a> {
|
9074 + | pub(crate) partition_result: Option<crate::endpoint_lib::partition::Partition<'a>>,
|
9075 + | pub(crate) parsed_arn_ssa_2: Option<crate::endpoint_lib::arn::Arn<'a>>,
|
9076 + | pub(crate) first_arn: Option<&'a str>,
|
9077 + | pub(crate) parsed_arn_ssa_1: Option<crate::endpoint_lib::arn::Arn<'a>>,
|
9078 + | // Sometimes none of the members reference the lifetime, this makes it still valid
|
9079 + | phantom: std::marker::PhantomData<&'a ()>,
|
9080 + | }
|
8197 9081 |
|
8198 9082 | #[non_exhaustive]
|
8199 9083 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
8200 9084 | /// Configuration parameters for resolving the correct endpoint
|
8201 9085 | pub struct Params {
|
8202 9086 | /// The AWS region used to dispatch the request.
|
8203 9087 | pub(crate) region: ::std::option::Option<::std::string::String>,
|
8204 9088 | /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
8205 9089 | pub(crate) use_dual_stack: bool,
|
8206 9090 | /// When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|