538 508 | .use_fips(false)
|
539 509 | .build()
|
540 510 | .expect("invalid params");
|
541 511 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
542 512 | let endpoint = resolver.resolve_endpoint(¶ms);
|
543 513 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.dualstack.us-west-2.amazonaws.com/99_ab");
|
544 514 | assert_eq!(
|
545 515 | endpoint,
|
546 516 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
547 517 | .url("https://s3.dualstack.us-west-2.amazonaws.com/99_ab")
|
548 - | .property(
|
549 - | "authSchemes",
|
550 - | vec![{
|
551 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
552 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
553 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
554 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
555 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
556 - | out
|
557 - | }
|
558 - | .into()]
|
518 + | .auth_scheme(
|
519 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
520 + | .put("disableDoubleEncoding", true)
|
521 + | .put("signingName", "s3".to_string())
|
522 + | .put("signingRegion", "us-west-2".to_string())
|
559 523 | )
|
560 524 | .build()
|
561 525 | );
|
562 526 | }
|
563 527 |
|
564 528 | /// implicit path style bucket + dualstack
|
565 529 | #[test]
|
566 530 | fn test_24() {
|
567 531 | let params = crate::config::endpoint::Params::builder()
|
568 532 | .accelerate(false)
|
569 533 | .bucket("99_ab".to_string())
|
570 534 | .region("us-west-2".to_string())
|
571 535 | .use_dual_stack(true)
|
572 536 | .use_fips(false)
|
573 537 | .endpoint("http://abc.com".to_string())
|
574 538 | .build()
|
575 539 | .expect("invalid params");
|
576 540 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
577 541 | let endpoint = resolver.resolve_endpoint(¶ms);
|
578 542 | let error = endpoint
|
579 543 | .expect_err("expected error: Cannot set dual-stack in combination with a custom endpoint. [implicit path style bucket + dualstack]");
|
580 544 | assert_eq!(format!("{}", error), "Cannot set dual-stack in combination with a custom endpoint.")
|
581 545 | }
|
582 546 |
|
583 547 | /// don't allow URL injections in the bucket
|
584 548 | #[test]
|
585 549 | fn test_25() {
|
586 550 | let params = crate::config::endpoint::Params::builder()
|
587 551 | .bucket("example.com#".to_string())
|
588 552 | .region("us-west-2".to_string())
|
589 553 | .use_dual_stack(false)
|
590 554 | .use_fips(false)
|
591 555 | .accelerate(false)
|
592 556 | .build()
|
593 557 | .expect("invalid params");
|
594 558 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
595 559 | let endpoint = resolver.resolve_endpoint(¶ms);
|
596 560 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.us-west-2.amazonaws.com/example.com%23");
|
597 561 | assert_eq!(
|
598 562 | endpoint,
|
599 563 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
600 564 | .url("https://s3.us-west-2.amazonaws.com/example.com%23")
|
601 - | .property(
|
602 - | "authSchemes",
|
603 - | vec![{
|
604 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
605 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
606 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
607 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
608 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
609 - | out
|
610 - | }
|
611 - | .into()]
|
565 + | .auth_scheme(
|
566 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
567 + | .put("disableDoubleEncoding", true)
|
568 + | .put("signingName", "s3".to_string())
|
569 + | .put("signingRegion", "us-west-2".to_string())
|
612 570 | )
|
613 571 | .build()
|
614 572 | );
|
615 573 | }
|
616 574 |
|
617 575 | /// URI encode bucket names in the path
|
618 576 | #[test]
|
619 577 | fn test_26() {
|
620 578 | let params = crate::config::endpoint::Params::builder()
|
621 579 | .bucket("bucket name".to_string())
|
622 580 | .region("us-west-2".to_string())
|
623 581 | .use_dual_stack(false)
|
624 582 | .use_fips(false)
|
625 583 | .accelerate(false)
|
626 584 | .build()
|
627 585 | .expect("invalid params");
|
628 586 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
629 587 | let endpoint = resolver.resolve_endpoint(¶ms);
|
630 588 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.us-west-2.amazonaws.com/bucket%20name");
|
631 589 | assert_eq!(
|
632 590 | endpoint,
|
633 591 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
634 592 | .url("https://s3.us-west-2.amazonaws.com/bucket%20name")
|
635 - | .property(
|
636 - | "authSchemes",
|
637 - | vec![{
|
638 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
639 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
640 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
641 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
642 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
643 - | out
|
644 - | }
|
645 - | .into()]
|
593 + | .auth_scheme(
|
594 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
595 + | .put("disableDoubleEncoding", true)
|
596 + | .put("signingName", "s3".to_string())
|
597 + | .put("signingRegion", "us-west-2".to_string())
|
646 598 | )
|
647 599 | .build()
|
648 600 | );
|
649 601 | }
|
650 602 |
|
651 603 | /// scheme is respected
|
652 604 | #[test]
|
653 605 | fn test_27() {
|
654 606 | let params = crate::config::endpoint::Params::builder()
|
655 607 | .accelerate(false)
|
656 608 | .bucket("99_ab".to_string())
|
657 609 | .endpoint("http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com".to_string())
|
658 610 | .region("af-south-1".to_string())
|
659 611 | .use_dual_stack(false)
|
660 612 | .use_fips(false)
|
661 613 | .build()
|
662 614 | .expect("invalid params");
|
663 615 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
664 616 | let endpoint = resolver.resolve_endpoint(¶ms);
|
665 617 | let endpoint = endpoint.expect("Expected valid endpoint: http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab");
|
666 618 | assert_eq!(
|
667 619 | endpoint,
|
668 620 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
669 621 | .url("http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab")
|
670 - | .property(
|
671 - | "authSchemes",
|
672 - | vec![{
|
673 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
674 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
675 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
676 - | out.insert("signingRegion".to_string(), "af-south-1".to_string().into());
|
677 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
678 - | out
|
679 - | }
|
680 - | .into()]
|
622 + | .auth_scheme(
|
623 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
624 + | .put("disableDoubleEncoding", true)
|
625 + | .put("signingName", "s3".to_string())
|
626 + | .put("signingRegion", "af-south-1".to_string())
|
681 627 | )
|
682 628 | .build()
|
683 629 | );
|
684 630 | }
|
685 631 |
|
686 632 | /// scheme is respected (virtual addressing)
|
687 633 | #[test]
|
688 634 | fn test_28() {
|
689 635 | let params = crate::config::endpoint::Params::builder()
|
690 636 | .accelerate(false)
|
691 637 | .bucket("bucketname".to_string())
|
692 638 | .endpoint("http://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo".to_string())
|
693 639 | .region("af-south-1".to_string())
|
694 640 | .use_dual_stack(false)
|
695 641 | .use_fips(false)
|
696 642 | .build()
|
697 643 | .expect("invalid params");
|
698 644 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
699 645 | let endpoint = resolver.resolve_endpoint(¶ms);
|
700 646 | let endpoint = endpoint.expect("Expected valid endpoint: http://bucketname.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo");
|
701 647 | assert_eq!(
|
702 648 | endpoint,
|
703 649 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
704 650 | .url("http://bucketname.control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/foo")
|
705 - | .property(
|
706 - | "authSchemes",
|
707 - | vec![{
|
708 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
709 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
710 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
711 - | out.insert("signingRegion".to_string(), "af-south-1".to_string().into());
|
712 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
713 - | out
|
714 - | }
|
715 - | .into()]
|
651 + | .auth_scheme(
|
652 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
653 + | .put("disableDoubleEncoding", true)
|
654 + | .put("signingName", "s3".to_string())
|
655 + | .put("signingRegion", "af-south-1".to_string())
|
716 656 | )
|
717 657 | .build()
|
718 658 | );
|
719 659 | }
|
720 660 |
|
721 661 | /// path style + implicit private link
|
722 662 | #[test]
|
723 663 | fn test_29() {
|
724 664 | let params = crate::config::endpoint::Params::builder()
|
725 665 | .accelerate(false)
|
726 666 | .bucket("99_ab".to_string())
|
727 667 | .endpoint("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com".to_string())
|
728 668 | .region("af-south-1".to_string())
|
729 669 | .use_dual_stack(false)
|
730 670 | .use_fips(false)
|
731 671 | .build()
|
732 672 | .expect("invalid params");
|
733 673 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
734 674 | let endpoint = resolver.resolve_endpoint(¶ms);
|
735 675 | let endpoint = endpoint.expect("Expected valid endpoint: https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab");
|
736 676 | assert_eq!(
|
737 677 | endpoint,
|
738 678 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
739 679 | .url("https://control.vpce-1a2b3c4d-5e6f.s3.us-west-2.vpce.amazonaws.com/99_ab")
|
740 - | .property(
|
741 - | "authSchemes",
|
742 - | vec![{
|
743 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
744 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
745 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
746 - | out.insert("signingRegion".to_string(), "af-south-1".to_string().into());
|
747 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
748 - | out
|
749 - | }
|
750 - | .into()]
|
680 + | .auth_scheme(
|
681 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
682 + | .put("disableDoubleEncoding", true)
|
683 + | .put("signingName", "s3".to_string())
|
684 + | .put("signingRegion", "af-south-1".to_string())
|
751 685 | )
|
752 686 | .build()
|
753 687 | );
|
754 688 | }
|
755 689 |
|
756 690 | /// invalid Endpoint override
|
757 691 | #[test]
|
758 692 | fn test_30() {
|
759 693 | let params = crate::config::endpoint::Params::builder()
|
760 694 | .accelerate(false)
|
761 695 | .bucket("bucketname".to_string())
|
762 696 | .endpoint("abcde://nota#url".to_string())
|
763 697 | .region("af-south-1".to_string())
|
764 698 | .use_dual_stack(false)
|
765 699 | .use_fips(false)
|
766 700 | .build()
|
767 701 | .expect("invalid params");
|
768 702 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
769 703 | let endpoint = resolver.resolve_endpoint(¶ms);
|
770 704 | let error = endpoint.expect_err("expected error: Custom endpoint `abcde://nota#url` was not a valid URI [invalid Endpoint override]");
|
771 705 | assert_eq!(format!("{}", error), "Custom endpoint `abcde://nota#url` was not a valid URI")
|
772 706 | }
|
773 707 |
|
774 708 | /// using an IPv4 address forces path style
|
775 709 | #[test]
|
776 710 | fn test_31() {
|
777 711 | let params = crate::config::endpoint::Params::builder()
|
778 712 | .accelerate(false)
|
779 713 | .bucket("bucketname".to_string())
|
780 714 | .endpoint("https://123.123.0.1".to_string())
|
781 715 | .region("af-south-1".to_string())
|
782 716 | .use_dual_stack(false)
|
783 717 | .use_fips(false)
|
784 718 | .build()
|
785 719 | .expect("invalid params");
|
786 720 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
787 721 | let endpoint = resolver.resolve_endpoint(¶ms);
|
788 722 | let endpoint = endpoint.expect("Expected valid endpoint: https://123.123.0.1/bucketname");
|
789 723 | assert_eq!(
|
790 724 | endpoint,
|
791 725 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
792 726 | .url("https://123.123.0.1/bucketname")
|
793 - | .property(
|
794 - | "authSchemes",
|
795 - | vec![{
|
796 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
797 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
798 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
799 - | out.insert("signingRegion".to_string(), "af-south-1".to_string().into());
|
800 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
801 - | out
|
802 - | }
|
803 - | .into()]
|
727 + | .auth_scheme(
|
728 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
729 + | .put("disableDoubleEncoding", true)
|
730 + | .put("signingName", "s3".to_string())
|
731 + | .put("signingRegion", "af-south-1".to_string())
|
804 732 | )
|
805 733 | .build()
|
806 734 | );
|
807 735 | }
|
808 736 |
|
809 737 | /// vanilla access point arn with region mismatch and UseArnRegion=false
|
810 738 | #[test]
|
811 739 | fn test_32() {
|
812 740 | let params = crate::config::endpoint::Params::builder()
|
813 741 | .accelerate(false)
|
814 742 | .bucket("arn:aws:s3:us-east-1:123456789012:accesspoint:myendpoint".to_string())
|
815 743 | .force_path_style(false)
|
816 744 | .use_arn_region(false)
|
817 745 | .region("us-west-2".to_string())
|
818 746 | .use_dual_stack(false)
|
819 747 | .use_fips(false)
|
820 748 | .build()
|
821 749 | .expect("invalid params");
|
822 750 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
823 751 | let endpoint = resolver.resolve_endpoint(¶ms);
|
824 752 | let error = endpoint.expect_err("expected error: Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false` [vanilla access point arn with region mismatch and UseArnRegion=false]");
|
825 753 | assert_eq!(
|
826 754 | format!("{}", error),
|
827 755 | "Invalid configuration: region from ARN `us-east-1` does not match client region `us-west-2` and UseArnRegion is `false`"
|
828 756 | )
|
829 757 | }
|
830 758 |
|
831 759 | /// vanilla access point arn with region mismatch and UseArnRegion unset
|
832 760 | #[test]
|
833 761 | fn test_33() {
|
834 762 | let params = crate::config::endpoint::Params::builder()
|
835 763 | .accelerate(false)
|
836 764 | .bucket("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_string())
|
837 765 | .force_path_style(false)
|
838 766 | .region("us-east-1".to_string())
|
839 767 | .use_dual_stack(false)
|
840 768 | .use_fips(false)
|
841 769 | .build()
|
842 770 | .expect("invalid params");
|
843 771 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
844 772 | let endpoint = resolver.resolve_endpoint(¶ms);
|
845 773 | let endpoint = endpoint.expect("Expected valid endpoint: https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com");
|
846 774 | assert_eq!(
|
847 775 | endpoint,
|
848 776 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
849 777 | .url("https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com")
|
850 - | .property(
|
851 - | "authSchemes",
|
852 - | vec![{
|
853 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
854 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
855 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
856 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
857 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
858 - | out
|
859 - | }
|
860 - | .into()]
|
778 + | .auth_scheme(
|
779 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
780 + | .put("disableDoubleEncoding", true)
|
781 + | .put("signingName", "s3".to_string())
|
782 + | .put("signingRegion", "us-west-2".to_string())
|
861 783 | )
|
862 784 | .build()
|
863 785 | );
|
864 786 | }
|
865 787 |
|
866 788 | /// vanilla access point arn with region mismatch and UseArnRegion=true
|
867 789 | #[test]
|
868 790 | fn test_34() {
|
869 791 | let params = crate::config::endpoint::Params::builder()
|
870 792 | .accelerate(false)
|
871 793 | .bucket("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_string())
|
872 794 | .force_path_style(false)
|
873 795 | .use_arn_region(true)
|
874 796 | .region("us-east-1".to_string())
|
875 797 | .use_dual_stack(false)
|
876 798 | .use_fips(false)
|
877 799 | .build()
|
878 800 | .expect("invalid params");
|
879 801 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
880 802 | let endpoint = resolver.resolve_endpoint(¶ms);
|
881 803 | let endpoint = endpoint.expect("Expected valid endpoint: https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com");
|
882 804 | assert_eq!(
|
883 805 | endpoint,
|
884 806 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
885 807 | .url("https://myendpoint-123456789012.s3-accesspoint.us-west-2.amazonaws.com")
|
886 - | .property(
|
887 - | "authSchemes",
|
888 - | vec![{
|
889 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
890 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
891 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
892 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
893 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
894 - | out
|
895 - | }
|
896 - | .into()]
|
808 + | .auth_scheme(
|
809 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
810 + | .put("disableDoubleEncoding", true)
|
811 + | .put("signingName", "s3".to_string())
|
812 + | .put("signingRegion", "us-west-2".to_string())
|
897 813 | )
|
898 814 | .build()
|
899 815 | );
|
900 816 | }
|
901 817 |
|
902 818 | /// subdomains are not allowed in virtual buckets
|
903 819 | #[test]
|
904 820 | fn test_35() {
|
905 821 | let params = crate::config::endpoint::Params::builder()
|
906 822 | .bucket("bucket.name".to_string())
|
907 823 | .region("us-east-1".to_string())
|
908 824 | .build()
|
909 825 | .expect("invalid params");
|
910 826 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
911 827 | let endpoint = resolver.resolve_endpoint(¶ms);
|
912 828 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.us-east-1.amazonaws.com/bucket.name");
|
913 829 | assert_eq!(
|
914 830 | endpoint,
|
915 831 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
916 832 | .url("https://s3.us-east-1.amazonaws.com/bucket.name")
|
917 - | .property(
|
918 - | "authSchemes",
|
919 - | vec![{
|
920 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
921 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
922 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
923 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
924 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
925 - | out
|
926 - | }
|
927 - | .into()]
|
833 + | .auth_scheme(
|
834 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
835 + | .put("disableDoubleEncoding", true)
|
836 + | .put("signingName", "s3".to_string())
|
837 + | .put("signingRegion", "us-east-1".to_string())
|
928 838 | )
|
929 839 | .build()
|
930 840 | );
|
931 841 | }
|
932 842 |
|
933 843 | /// bucket names with 3 characters are allowed in virtual buckets
|
934 844 | #[test]
|
935 845 | fn test_36() {
|
936 846 | let params = crate::config::endpoint::Params::builder()
|
937 847 | .bucket("aaa".to_string())
|
938 848 | .region("us-east-1".to_string())
|
939 849 | .build()
|
940 850 | .expect("invalid params");
|
941 851 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
942 852 | let endpoint = resolver.resolve_endpoint(¶ms);
|
943 853 | let endpoint = endpoint.expect("Expected valid endpoint: https://aaa.s3.us-east-1.amazonaws.com");
|
944 854 | assert_eq!(
|
945 855 | endpoint,
|
946 856 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
947 857 | .url("https://aaa.s3.us-east-1.amazonaws.com")
|
948 - | .property(
|
949 - | "authSchemes",
|
950 - | vec![{
|
951 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
952 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
953 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
954 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
955 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
956 - | out
|
957 - | }
|
958 - | .into()]
|
858 + | .auth_scheme(
|
859 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
860 + | .put("disableDoubleEncoding", true)
|
861 + | .put("signingName", "s3".to_string())
|
862 + | .put("signingRegion", "us-east-1".to_string())
|
959 863 | )
|
960 864 | .build()
|
961 865 | );
|
962 866 | }
|
963 867 |
|
964 868 | /// bucket names with fewer than 3 characters are not allowed in virtual host
|
965 869 | #[test]
|
966 870 | fn test_37() {
|
967 871 | let params = crate::config::endpoint::Params::builder()
|
968 872 | .bucket("aa".to_string())
|
969 873 | .region("us-east-1".to_string())
|
970 874 | .build()
|
971 875 | .expect("invalid params");
|
972 876 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
973 877 | let endpoint = resolver.resolve_endpoint(¶ms);
|
974 878 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.us-east-1.amazonaws.com/aa");
|
975 879 | assert_eq!(
|
976 880 | endpoint,
|
977 881 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
978 882 | .url("https://s3.us-east-1.amazonaws.com/aa")
|
979 - | .property(
|
980 - | "authSchemes",
|
981 - | vec![{
|
982 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
983 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
984 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
985 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
986 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
987 - | out
|
988 - | }
|
989 - | .into()]
|
883 + | .auth_scheme(
|
884 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
885 + | .put("disableDoubleEncoding", true)
|
886 + | .put("signingName", "s3".to_string())
|
887 + | .put("signingRegion", "us-east-1".to_string())
|
990 888 | )
|
991 889 | .build()
|
992 890 | );
|
993 891 | }
|
994 892 |
|
995 893 | /// bucket names with uppercase characters are not allowed in virtual host
|
996 894 | #[test]
|
997 895 | fn test_38() {
|
998 896 | let params = crate::config::endpoint::Params::builder()
|
999 897 | .bucket("BucketName".to_string())
|
1000 898 | .region("us-east-1".to_string())
|
1001 899 | .build()
|
1002 900 | .expect("invalid params");
|
1003 901 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1004 902 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1005 903 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.us-east-1.amazonaws.com/BucketName");
|
1006 904 | assert_eq!(
|
1007 905 | endpoint,
|
1008 906 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1009 907 | .url("https://s3.us-east-1.amazonaws.com/BucketName")
|
1010 - | .property(
|
1011 - | "authSchemes",
|
1012 - | vec![{
|
1013 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1014 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1015 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1016 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1017 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1018 - | out
|
1019 - | }
|
1020 - | .into()]
|
908 + | .auth_scheme(
|
909 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
910 + | .put("disableDoubleEncoding", true)
|
911 + | .put("signingName", "s3".to_string())
|
912 + | .put("signingRegion", "us-east-1".to_string())
|
1021 913 | )
|
1022 914 | .build()
|
1023 915 | );
|
1024 916 | }
|
1025 917 |
|
1026 918 | /// subdomains are allowed in virtual buckets on http endpoints
|
1027 919 | #[test]
|
1028 920 | fn test_39() {
|
1029 921 | let params = crate::config::endpoint::Params::builder()
|
1030 922 | .bucket("bucket.name".to_string())
|
1031 923 | .region("us-east-1".to_string())
|
1032 924 | .endpoint("http://example.com".to_string())
|
1033 925 | .build()
|
1034 926 | .expect("invalid params");
|
1035 927 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1036 928 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1037 929 | let endpoint = endpoint.expect("Expected valid endpoint: http://bucket.name.example.com");
|
1038 930 | assert_eq!(
|
1039 931 | endpoint,
|
1040 932 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1041 933 | .url("http://bucket.name.example.com")
|
1042 - | .property(
|
1043 - | "authSchemes",
|
1044 - | vec![{
|
1045 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1046 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1047 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1048 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1049 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1050 - | out
|
1051 - | }
|
1052 - | .into()]
|
934 + | .auth_scheme(
|
935 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
936 + | .put("disableDoubleEncoding", true)
|
937 + | .put("signingName", "s3".to_string())
|
938 + | .put("signingRegion", "us-east-1".to_string())
|
1053 939 | )
|
1054 940 | .build()
|
1055 941 | );
|
1056 942 | }
|
1057 943 |
|
1058 944 | /// no region set
|
1059 945 | #[test]
|
1060 946 | fn test_40() {
|
1061 947 | let params = crate::config::endpoint::Params::builder()
|
1062 948 | .bucket("bucket-name".to_string())
|
1063 949 | .build()
|
1064 950 | .expect("invalid params");
|
1065 951 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1066 952 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1067 953 | let error = endpoint.expect_err("expected error: A region must be set when sending requests to S3. [no region set]");
|
1068 954 | assert_eq!(format!("{}", error), "A region must be set when sending requests to S3.")
|
1069 955 | }
|
1070 956 |
|
1071 957 | /// UseGlobalEndpoints=true, region=us-east-1 uses the global endpoint
|
1072 958 | #[test]
|
1073 959 | fn test_41() {
|
1074 960 | let params = crate::config::endpoint::Params::builder()
|
1075 961 | .region("us-east-1".to_string())
|
1076 962 | .use_global_endpoint(true)
|
1077 963 | .use_fips(false)
|
1078 964 | .use_dual_stack(false)
|
1079 965 | .accelerate(false)
|
1080 966 | .build()
|
1081 967 | .expect("invalid params");
|
1082 968 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1083 969 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1084 970 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.amazonaws.com");
|
1085 971 | assert_eq!(
|
1086 972 | endpoint,
|
1087 973 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1088 974 | .url("https://s3.amazonaws.com")
|
1089 - | .property(
|
1090 - | "authSchemes",
|
1091 - | vec![{
|
1092 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1093 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1094 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1095 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1096 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1097 - | out
|
1098 - | }
|
1099 - | .into()]
|
975 + | .auth_scheme(
|
976 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
977 + | .put("disableDoubleEncoding", true)
|
978 + | .put("signingName", "s3".to_string())
|
979 + | .put("signingRegion", "us-east-1".to_string())
|
1100 980 | )
|
1101 981 | .build()
|
1102 982 | );
|
1103 983 | }
|
1104 984 |
|
1105 985 | /// UseGlobalEndpoints=true, region=us-west-2 uses the regional endpoint
|
1106 986 | #[test]
|
1107 987 | fn test_42() {
|
1108 988 | let params = crate::config::endpoint::Params::builder()
|
1109 989 | .region("us-west-2".to_string())
|
1110 990 | .use_global_endpoint(true)
|
1111 991 | .use_fips(false)
|
1112 992 | .use_dual_stack(false)
|
1113 993 | .accelerate(false)
|
1114 994 | .build()
|
1115 995 | .expect("invalid params");
|
1116 996 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1117 997 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1118 998 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.us-west-2.amazonaws.com");
|
1119 999 | assert_eq!(
|
1120 1000 | endpoint,
|
1121 1001 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1122 1002 | .url("https://s3.us-west-2.amazonaws.com")
|
1123 - | .property(
|
1124 - | "authSchemes",
|
1125 - | vec![{
|
1126 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1127 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1128 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1129 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
1130 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1131 - | out
|
1132 - | }
|
1133 - | .into()]
|
1003 + | .auth_scheme(
|
1004 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1005 + | .put("disableDoubleEncoding", true)
|
1006 + | .put("signingName", "s3".to_string())
|
1007 + | .put("signingRegion", "us-west-2".to_string())
|
1134 1008 | )
|
1135 1009 | .build()
|
1136 1010 | );
|
1137 1011 | }
|
1138 1012 |
|
1139 1013 | /// UseGlobalEndpoints=true, region=cn-north-1 uses the regional endpoint
|
1140 1014 | #[test]
|
1141 1015 | fn test_43() {
|
1142 1016 | let params = crate::config::endpoint::Params::builder()
|
1143 1017 | .region("cn-north-1".to_string())
|
1144 1018 | .use_global_endpoint(true)
|
1145 1019 | .use_fips(false)
|
1146 1020 | .use_dual_stack(false)
|
1147 1021 | .accelerate(false)
|
1148 1022 | .build()
|
1149 1023 | .expect("invalid params");
|
1150 1024 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1151 1025 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1152 1026 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.cn-north-1.amazonaws.com.cn");
|
1153 1027 | assert_eq!(
|
1154 1028 | endpoint,
|
1155 1029 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1156 1030 | .url("https://s3.cn-north-1.amazonaws.com.cn")
|
1157 - | .property(
|
1158 - | "authSchemes",
|
1159 - | vec![{
|
1160 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1161 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1162 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1163 - | out.insert("signingRegion".to_string(), "cn-north-1".to_string().into());
|
1164 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1165 - | out
|
1166 - | }
|
1167 - | .into()]
|
1031 + | .auth_scheme(
|
1032 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1033 + | .put("disableDoubleEncoding", true)
|
1034 + | .put("signingName", "s3".to_string())
|
1035 + | .put("signingRegion", "cn-north-1".to_string())
|
1168 1036 | )
|
1169 1037 | .build()
|
1170 1038 | );
|
1171 1039 | }
|
1172 1040 |
|
1173 1041 | /// UseGlobalEndpoints=true, region=us-east-1, fips=true uses the regional endpoint with fips
|
1174 1042 | #[test]
|
1175 1043 | fn test_44() {
|
1176 1044 | let params = crate::config::endpoint::Params::builder()
|
1177 1045 | .region("us-east-1".to_string())
|
1178 1046 | .use_global_endpoint(true)
|
1179 1047 | .use_fips(true)
|
1180 1048 | .use_dual_stack(false)
|
1181 1049 | .accelerate(false)
|
1182 1050 | .build()
|
1183 1051 | .expect("invalid params");
|
1184 1052 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1185 1053 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1186 1054 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3-fips.us-east-1.amazonaws.com");
|
1187 1055 | assert_eq!(
|
1188 1056 | endpoint,
|
1189 1057 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1190 1058 | .url("https://s3-fips.us-east-1.amazonaws.com")
|
1191 - | .property(
|
1192 - | "authSchemes",
|
1193 - | vec![{
|
1194 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1195 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1196 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1197 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1198 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1199 - | out
|
1200 - | }
|
1201 - | .into()]
|
1059 + | .auth_scheme(
|
1060 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1061 + | .put("disableDoubleEncoding", true)
|
1062 + | .put("signingName", "s3".to_string())
|
1063 + | .put("signingRegion", "us-east-1".to_string())
|
1202 1064 | )
|
1203 1065 | .build()
|
1204 1066 | );
|
1205 1067 | }
|
1206 1068 |
|
1207 1069 | /// UseGlobalEndpoints=true, region=us-east-1, dualstack=true uses the regional endpoint with dualstack
|
1208 1070 | #[test]
|
1209 1071 | fn test_45() {
|
1210 1072 | let params = crate::config::endpoint::Params::builder()
|
1211 1073 | .region("us-east-1".to_string())
|
1212 1074 | .use_global_endpoint(true)
|
1213 1075 | .use_fips(false)
|
1214 1076 | .use_dual_stack(true)
|
1215 1077 | .accelerate(false)
|
1216 1078 | .build()
|
1217 1079 | .expect("invalid params");
|
1218 1080 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1219 1081 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1220 1082 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.dualstack.us-east-1.amazonaws.com");
|
1221 1083 | assert_eq!(
|
1222 1084 | endpoint,
|
1223 1085 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1224 1086 | .url("https://s3.dualstack.us-east-1.amazonaws.com")
|
1225 - | .property(
|
1226 - | "authSchemes",
|
1227 - | vec![{
|
1228 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1229 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1230 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1231 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1232 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1233 - | out
|
1234 - | }
|
1235 - | .into()]
|
1087 + | .auth_scheme(
|
1088 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1089 + | .put("disableDoubleEncoding", true)
|
1090 + | .put("signingName", "s3".to_string())
|
1091 + | .put("signingRegion", "us-east-1".to_string())
|
1236 1092 | )
|
1237 1093 | .build()
|
1238 1094 | );
|
1239 1095 | }
|
1240 1096 |
|
1241 1097 | /// UseGlobalEndpoints=true, region=us-east-1, dualstack and fips uses the regional endpoint with fips/dualstack
|
1242 1098 | #[test]
|
1243 1099 | fn test_46() {
|
1244 1100 | let params = crate::config::endpoint::Params::builder()
|
1245 1101 | .region("us-east-1".to_string())
|
1246 1102 | .use_global_endpoint(true)
|
1247 1103 | .use_fips(true)
|
1248 1104 | .use_dual_stack(true)
|
1249 1105 | .accelerate(false)
|
1250 1106 | .build()
|
1251 1107 | .expect("invalid params");
|
1252 1108 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1253 1109 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1254 1110 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3-fips.dualstack.us-east-1.amazonaws.com");
|
1255 1111 | assert_eq!(
|
1256 1112 | endpoint,
|
1257 1113 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1258 1114 | .url("https://s3-fips.dualstack.us-east-1.amazonaws.com")
|
1259 - | .property(
|
1260 - | "authSchemes",
|
1261 - | vec![{
|
1262 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1263 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1264 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1265 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1266 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1267 - | out
|
1268 - | }
|
1269 - | .into()]
|
1115 + | .auth_scheme(
|
1116 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1117 + | .put("disableDoubleEncoding", true)
|
1118 + | .put("signingName", "s3".to_string())
|
1119 + | .put("signingRegion", "us-east-1".to_string())
|
1270 1120 | )
|
1271 1121 | .build()
|
1272 1122 | );
|
1273 1123 | }
|
1274 1124 |
|
1275 1125 | /// UseGlobalEndpoints=true, region=us-east-1 with custom endpoint, uses custom
|
1276 1126 | #[test]
|
1277 1127 | fn test_47() {
|
1278 1128 | let params = crate::config::endpoint::Params::builder()
|
1279 1129 | .region("us-east-1".to_string())
|
1280 1130 | .endpoint("https://example.com".to_string())
|
1281 1131 | .use_global_endpoint(true)
|
1282 1132 | .use_fips(false)
|
1283 1133 | .use_dual_stack(false)
|
1284 1134 | .accelerate(false)
|
1285 1135 | .build()
|
1286 1136 | .expect("invalid params");
|
1287 1137 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1288 1138 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1289 1139 | let endpoint = endpoint.expect("Expected valid endpoint: https://example.com");
|
1290 1140 | assert_eq!(
|
1291 1141 | endpoint,
|
1292 1142 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1293 1143 | .url("https://example.com")
|
1294 - | .property(
|
1295 - | "authSchemes",
|
1296 - | vec![{
|
1297 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1298 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1299 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1300 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1301 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1302 - | out
|
1303 - | }
|
1304 - | .into()]
|
1144 + | .auth_scheme(
|
1145 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1146 + | .put("disableDoubleEncoding", true)
|
1147 + | .put("signingName", "s3".to_string())
|
1148 + | .put("signingRegion", "us-east-1".to_string())
|
1305 1149 | )
|
1306 1150 | .build()
|
1307 1151 | );
|
1308 1152 | }
|
1309 1153 |
|
1310 1154 | /// UseGlobalEndpoints=true, region=us-west-2 with custom endpoint, uses custom
|
1311 1155 | #[test]
|
1312 1156 | fn test_48() {
|
1313 1157 | let params = crate::config::endpoint::Params::builder()
|
1314 1158 | .region("us-west-2".to_string())
|
1315 1159 | .endpoint("https://example.com".to_string())
|
1316 1160 | .use_global_endpoint(true)
|
1317 1161 | .use_fips(false)
|
1318 1162 | .use_dual_stack(false)
|
1319 1163 | .accelerate(false)
|
1320 1164 | .build()
|
1321 1165 | .expect("invalid params");
|
1322 1166 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1323 1167 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1324 1168 | let endpoint = endpoint.expect("Expected valid endpoint: https://example.com");
|
1325 1169 | assert_eq!(
|
1326 1170 | endpoint,
|
1327 1171 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1328 1172 | .url("https://example.com")
|
1329 - | .property(
|
1330 - | "authSchemes",
|
1331 - | vec![{
|
1332 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1333 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1334 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1335 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
1336 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1337 - | out
|
1338 - | }
|
1339 - | .into()]
|
1173 + | .auth_scheme(
|
1174 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1175 + | .put("disableDoubleEncoding", true)
|
1176 + | .put("signingName", "s3".to_string())
|
1177 + | .put("signingRegion", "us-west-2".to_string())
|
1340 1178 | )
|
1341 1179 | .build()
|
1342 1180 | );
|
1343 1181 | }
|
1344 1182 |
|
1345 1183 | /// UseGlobalEndpoints=true, region=us-east-1 with accelerate on non bucket case uses the global endpoint and ignores accelerate
|
1346 1184 | #[test]
|
1347 1185 | fn test_49() {
|
1348 1186 | let params = crate::config::endpoint::Params::builder()
|
1349 1187 | .region("us-east-1".to_string())
|
1350 1188 | .use_global_endpoint(true)
|
1351 1189 | .use_fips(false)
|
1352 1190 | .use_dual_stack(false)
|
1353 1191 | .accelerate(true)
|
1354 1192 | .build()
|
1355 1193 | .expect("invalid params");
|
1356 1194 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1357 1195 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1358 1196 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.amazonaws.com");
|
1359 1197 | assert_eq!(
|
1360 1198 | endpoint,
|
1361 1199 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1362 1200 | .url("https://s3.amazonaws.com")
|
1363 - | .property(
|
1364 - | "authSchemes",
|
1365 - | vec![{
|
1366 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1367 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1368 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1369 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1370 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1371 - | out
|
1372 - | }
|
1373 - | .into()]
|
1201 + | .auth_scheme(
|
1202 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1203 + | .put("disableDoubleEncoding", true)
|
1204 + | .put("signingName", "s3".to_string())
|
1205 + | .put("signingRegion", "us-east-1".to_string())
|
1374 1206 | )
|
1375 1207 | .build()
|
1376 1208 | );
|
1377 1209 | }
|
1378 1210 |
|
1379 1211 | /// aws-global region uses the global endpoint
|
1380 1212 | #[test]
|
1381 1213 | fn test_50() {
|
1382 1214 | let params = crate::config::endpoint::Params::builder()
|
1383 1215 | .region("aws-global".to_string())
|
1384 1216 | .use_fips(false)
|
1385 1217 | .use_dual_stack(false)
|
1386 1218 | .accelerate(false)
|
1387 1219 | .build()
|
1388 1220 | .expect("invalid params");
|
1389 1221 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1390 1222 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1391 1223 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.amazonaws.com");
|
1392 1224 | assert_eq!(
|
1393 1225 | endpoint,
|
1394 1226 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1395 1227 | .url("https://s3.amazonaws.com")
|
1396 - | .property(
|
1397 - | "authSchemes",
|
1398 - | vec![{
|
1399 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1400 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1401 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1402 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1403 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1404 - | out
|
1405 - | }
|
1406 - | .into()]
|
1228 + | .auth_scheme(
|
1229 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1230 + | .put("disableDoubleEncoding", true)
|
1231 + | .put("signingName", "s3".to_string())
|
1232 + | .put("signingRegion", "us-east-1".to_string())
|
1407 1233 | )
|
1408 1234 | .build()
|
1409 1235 | );
|
1410 1236 | }
|
1411 1237 |
|
1412 1238 | /// aws-global region with fips uses the regional endpoint
|
1413 1239 | #[test]
|
1414 1240 | fn test_51() {
|
1415 1241 | let params = crate::config::endpoint::Params::builder()
|
1416 1242 | .region("aws-global".to_string())
|
1417 1243 | .use_fips(true)
|
1418 1244 | .use_dual_stack(false)
|
1419 1245 | .accelerate(false)
|
1420 1246 | .build()
|
1421 1247 | .expect("invalid params");
|
1422 1248 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1423 1249 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1424 1250 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3-fips.us-east-1.amazonaws.com");
|
1425 1251 | assert_eq!(
|
1426 1252 | endpoint,
|
1427 1253 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1428 1254 | .url("https://s3-fips.us-east-1.amazonaws.com")
|
1429 - | .property(
|
1430 - | "authSchemes",
|
1431 - | vec![{
|
1432 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1433 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1434 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1435 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1436 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1437 - | out
|
1438 - | }
|
1439 - | .into()]
|
1255 + | .auth_scheme(
|
1256 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1257 + | .put("disableDoubleEncoding", true)
|
1258 + | .put("signingName", "s3".to_string())
|
1259 + | .put("signingRegion", "us-east-1".to_string())
|
1440 1260 | )
|
1441 1261 | .build()
|
1442 1262 | );
|
1443 1263 | }
|
1444 1264 |
|
1445 1265 | /// aws-global region with dualstack uses the regional endpoint
|
1446 1266 | #[test]
|
1447 1267 | fn test_52() {
|
1448 1268 | let params = crate::config::endpoint::Params::builder()
|
1449 1269 | .region("aws-global".to_string())
|
1450 1270 | .use_fips(false)
|
1451 1271 | .use_dual_stack(true)
|
1452 1272 | .accelerate(false)
|
1453 1273 | .build()
|
1454 1274 | .expect("invalid params");
|
1455 1275 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1456 1276 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1457 1277 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.dualstack.us-east-1.amazonaws.com");
|
1458 1278 | assert_eq!(
|
1459 1279 | endpoint,
|
1460 1280 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1461 1281 | .url("https://s3.dualstack.us-east-1.amazonaws.com")
|
1462 - | .property(
|
1463 - | "authSchemes",
|
1464 - | vec![{
|
1465 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1466 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1467 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1468 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1469 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1470 - | out
|
1471 - | }
|
1472 - | .into()]
|
1282 + | .auth_scheme(
|
1283 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1284 + | .put("disableDoubleEncoding", true)
|
1285 + | .put("signingName", "s3".to_string())
|
1286 + | .put("signingRegion", "us-east-1".to_string())
|
1473 1287 | )
|
1474 1288 | .build()
|
1475 1289 | );
|
1476 1290 | }
|
1477 1291 |
|
1478 1292 | /// aws-global region with fips and dualstack uses the regional endpoint
|
1479 1293 | #[test]
|
1480 1294 | fn test_53() {
|
1481 1295 | let params = crate::config::endpoint::Params::builder()
|
1482 1296 | .region("aws-global".to_string())
|
1483 1297 | .use_fips(true)
|
1484 1298 | .use_dual_stack(true)
|
1485 1299 | .accelerate(false)
|
1486 1300 | .build()
|
1487 1301 | .expect("invalid params");
|
1488 1302 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1489 1303 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1490 1304 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3-fips.dualstack.us-east-1.amazonaws.com");
|
1491 1305 | assert_eq!(
|
1492 1306 | endpoint,
|
1493 1307 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1494 1308 | .url("https://s3-fips.dualstack.us-east-1.amazonaws.com")
|
1495 - | .property(
|
1496 - | "authSchemes",
|
1497 - | vec![{
|
1498 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1499 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1500 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1501 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1502 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1503 - | out
|
1504 - | }
|
1505 - | .into()]
|
1309 + | .auth_scheme(
|
1310 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1311 + | .put("disableDoubleEncoding", true)
|
1312 + | .put("signingName", "s3".to_string())
|
1313 + | .put("signingRegion", "us-east-1".to_string())
|
1506 1314 | )
|
1507 1315 | .build()
|
1508 1316 | );
|
1509 1317 | }
|
1510 1318 |
|
1511 1319 | /// aws-global region with accelerate on non-bucket case, uses global endpoint and ignores accelerate
|
1512 1320 | #[test]
|
1513 1321 | fn test_54() {
|
1514 1322 | let params = crate::config::endpoint::Params::builder()
|
1515 1323 | .region("aws-global".to_string())
|
1516 1324 | .use_fips(false)
|
1517 1325 | .use_dual_stack(false)
|
1518 1326 | .accelerate(true)
|
1519 1327 | .build()
|
1520 1328 | .expect("invalid params");
|
1521 1329 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1522 1330 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1523 1331 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.amazonaws.com");
|
1524 1332 | assert_eq!(
|
1525 1333 | endpoint,
|
1526 1334 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1527 1335 | .url("https://s3.amazonaws.com")
|
1528 - | .property(
|
1529 - | "authSchemes",
|
1530 - | vec![{
|
1531 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1532 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1533 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1534 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1535 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1536 - | out
|
1537 - | }
|
1538 - | .into()]
|
1336 + | .auth_scheme(
|
1337 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1338 + | .put("disableDoubleEncoding", true)
|
1339 + | .put("signingName", "s3".to_string())
|
1340 + | .put("signingRegion", "us-east-1".to_string())
|
1539 1341 | )
|
1540 1342 | .build()
|
1541 1343 | );
|
1542 1344 | }
|
1543 1345 |
|
1544 1346 | /// aws-global region with custom endpoint, uses custom
|
1545 1347 | #[test]
|
1546 1348 | fn test_55() {
|
1547 1349 | let params = crate::config::endpoint::Params::builder()
|
1548 1350 | .region("aws-global".to_string())
|
1549 1351 | .endpoint("https://example.com".to_string())
|
1550 1352 | .use_global_endpoint(false)
|
1551 1353 | .use_fips(false)
|
1552 1354 | .use_dual_stack(false)
|
1553 1355 | .accelerate(false)
|
1554 1356 | .build()
|
1555 1357 | .expect("invalid params");
|
1556 1358 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1557 1359 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1558 1360 | let endpoint = endpoint.expect("Expected valid endpoint: https://example.com");
|
1559 1361 | assert_eq!(
|
1560 1362 | endpoint,
|
1561 1363 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1562 1364 | .url("https://example.com")
|
1563 - | .property(
|
1564 - | "authSchemes",
|
1565 - | vec![{
|
1566 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1567 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1568 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1569 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1570 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1571 - | out
|
1572 - | }
|
1573 - | .into()]
|
1365 + | .auth_scheme(
|
1366 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1367 + | .put("disableDoubleEncoding", true)
|
1368 + | .put("signingName", "s3".to_string())
|
1369 + | .put("signingRegion", "us-east-1".to_string())
|
1574 1370 | )
|
1575 1371 | .build()
|
1576 1372 | );
|
1577 1373 | }
|
1578 1374 |
|
1579 1375 | /// virtual addressing, aws-global region uses the global endpoint
|
1580 1376 | #[test]
|
1581 1377 | fn test_56() {
|
1582 1378 | let params = crate::config::endpoint::Params::builder()
|
1583 1379 | .region("aws-global".to_string())
|
1584 1380 | .bucket("bucket-name".to_string())
|
1585 1381 | .use_fips(false)
|
1586 1382 | .use_dual_stack(false)
|
1587 1383 | .accelerate(false)
|
1588 1384 | .build()
|
1589 1385 | .expect("invalid params");
|
1590 1386 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1591 1387 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1592 1388 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3.amazonaws.com");
|
1593 1389 | assert_eq!(
|
1594 1390 | endpoint,
|
1595 1391 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1596 1392 | .url("https://bucket-name.s3.amazonaws.com")
|
1597 - | .property(
|
1598 - | "authSchemes",
|
1599 - | vec![{
|
1600 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1601 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1602 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1603 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1604 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1605 - | out
|
1606 - | }
|
1607 - | .into()]
|
1393 + | .auth_scheme(
|
1394 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1395 + | .put("disableDoubleEncoding", true)
|
1396 + | .put("signingName", "s3".to_string())
|
1397 + | .put("signingRegion", "us-east-1".to_string())
|
1608 1398 | )
|
1609 1399 | .build()
|
1610 1400 | );
|
1611 1401 | }
|
1612 1402 |
|
1613 1403 | /// virtual addressing, aws-global region with Prefix, and Key uses the global endpoint. Prefix and Key parameters should not be used in endpoint evaluation.
|
1614 1404 | #[test]
|
1615 1405 | fn test_57() {
|
1616 1406 | let params = crate::config::endpoint::Params::builder()
|
1617 1407 | .region("aws-global".to_string())
|
1618 1408 | .bucket("bucket-name".to_string())
|
1619 1409 | .use_fips(false)
|
1620 1410 | .use_dual_stack(false)
|
1621 1411 | .accelerate(false)
|
1622 1412 | .prefix("prefix".to_string())
|
1623 1413 | .key("key".to_string())
|
1624 1414 | .build()
|
1625 1415 | .expect("invalid params");
|
1626 1416 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1627 1417 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1628 1418 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3.amazonaws.com");
|
1629 1419 | assert_eq!(
|
1630 1420 | endpoint,
|
1631 1421 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1632 1422 | .url("https://bucket-name.s3.amazonaws.com")
|
1633 - | .property(
|
1634 - | "authSchemes",
|
1635 - | vec![{
|
1636 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1637 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1638 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1639 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1640 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1641 - | out
|
1642 - | }
|
1643 - | .into()]
|
1423 + | .auth_scheme(
|
1424 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1425 + | .put("disableDoubleEncoding", true)
|
1426 + | .put("signingName", "s3".to_string())
|
1427 + | .put("signingRegion", "us-east-1".to_string())
|
1644 1428 | )
|
1645 1429 | .build()
|
1646 1430 | );
|
1647 1431 | }
|
1648 1432 |
|
1649 1433 | /// virtual addressing, aws-global region with Copy Source, and Key uses the global endpoint. Copy Source and Key parameters should not be used in endpoint evaluation.
|
1650 1434 | #[test]
|
1651 1435 | fn test_58() {
|
1652 1436 | let params = crate::config::endpoint::Params::builder()
|
1653 1437 | .region("aws-global".to_string())
|
1654 1438 | .bucket("bucket-name".to_string())
|
1655 1439 | .use_fips(false)
|
1656 1440 | .use_dual_stack(false)
|
1657 1441 | .accelerate(false)
|
1658 1442 | .copy_source("/copy/source".to_string())
|
1659 1443 | .key("key".to_string())
|
1660 1444 | .build()
|
1661 1445 | .expect("invalid params");
|
1662 1446 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1663 1447 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1664 1448 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3.amazonaws.com");
|
1665 1449 | assert_eq!(
|
1666 1450 | endpoint,
|
1667 1451 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1668 1452 | .url("https://bucket-name.s3.amazonaws.com")
|
1669 - | .property(
|
1670 - | "authSchemes",
|
1671 - | vec![{
|
1672 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1673 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1674 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1675 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1676 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1677 - | out
|
1678 - | }
|
1679 - | .into()]
|
1453 + | .auth_scheme(
|
1454 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1455 + | .put("disableDoubleEncoding", true)
|
1456 + | .put("signingName", "s3".to_string())
|
1457 + | .put("signingRegion", "us-east-1".to_string())
|
1680 1458 | )
|
1681 1459 | .build()
|
1682 1460 | );
|
1683 1461 | }
|
1684 1462 |
|
1685 1463 | /// virtual addressing, aws-global region with fips uses the regional fips endpoint
|
1686 1464 | #[test]
|
1687 1465 | fn test_59() {
|
1688 1466 | let params = crate::config::endpoint::Params::builder()
|
1689 1467 | .region("aws-global".to_string())
|
1690 1468 | .bucket("bucket-name".to_string())
|
1691 1469 | .use_fips(true)
|
1692 1470 | .use_dual_stack(false)
|
1693 1471 | .accelerate(false)
|
1694 1472 | .build()
|
1695 1473 | .expect("invalid params");
|
1696 1474 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1697 1475 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1698 1476 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3-fips.us-east-1.amazonaws.com");
|
1699 1477 | assert_eq!(
|
1700 1478 | endpoint,
|
1701 1479 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1702 1480 | .url("https://bucket-name.s3-fips.us-east-1.amazonaws.com")
|
1703 - | .property(
|
1704 - | "authSchemes",
|
1705 - | vec![{
|
1706 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1707 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1708 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1709 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1710 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1711 - | out
|
1712 - | }
|
1713 - | .into()]
|
1481 + | .auth_scheme(
|
1482 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1483 + | .put("disableDoubleEncoding", true)
|
1484 + | .put("signingName", "s3".to_string())
|
1485 + | .put("signingRegion", "us-east-1".to_string())
|
1714 1486 | )
|
1715 1487 | .build()
|
1716 1488 | );
|
1717 1489 | }
|
1718 1490 |
|
1719 1491 | /// virtual addressing, aws-global region with dualstack uses the regional dualstack endpoint
|
1720 1492 | #[test]
|
1721 1493 | fn test_60() {
|
1722 1494 | let params = crate::config::endpoint::Params::builder()
|
1723 1495 | .region("aws-global".to_string())
|
1724 1496 | .bucket("bucket-name".to_string())
|
1725 1497 | .use_fips(false)
|
1726 1498 | .use_dual_stack(true)
|
1727 1499 | .accelerate(false)
|
1728 1500 | .build()
|
1729 1501 | .expect("invalid params");
|
1730 1502 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1731 1503 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1732 1504 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3.dualstack.us-east-1.amazonaws.com");
|
1733 1505 | assert_eq!(
|
1734 1506 | endpoint,
|
1735 1507 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1736 1508 | .url("https://bucket-name.s3.dualstack.us-east-1.amazonaws.com")
|
1737 - | .property(
|
1738 - | "authSchemes",
|
1739 - | vec![{
|
1740 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1741 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1742 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1743 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1744 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1745 - | out
|
1746 - | }
|
1747 - | .into()]
|
1509 + | .auth_scheme(
|
1510 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1511 + | .put("disableDoubleEncoding", true)
|
1512 + | .put("signingName", "s3".to_string())
|
1513 + | .put("signingRegion", "us-east-1".to_string())
|
1748 1514 | )
|
1749 1515 | .build()
|
1750 1516 | );
|
1751 1517 | }
|
1752 1518 |
|
1753 1519 | /// virtual addressing, aws-global region with fips/dualstack uses the regional fips/dualstack endpoint
|
1754 1520 | #[test]
|
1755 1521 | fn test_61() {
|
1756 1522 | let params = crate::config::endpoint::Params::builder()
|
1757 1523 | .region("aws-global".to_string())
|
1758 1524 | .bucket("bucket-name".to_string())
|
1759 1525 | .use_fips(true)
|
1760 1526 | .use_dual_stack(true)
|
1761 1527 | .accelerate(false)
|
1762 1528 | .build()
|
1763 1529 | .expect("invalid params");
|
1764 1530 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1765 1531 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1766 1532 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3-fips.dualstack.us-east-1.amazonaws.com");
|
1767 1533 | assert_eq!(
|
1768 1534 | endpoint,
|
1769 1535 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1770 1536 | .url("https://bucket-name.s3-fips.dualstack.us-east-1.amazonaws.com")
|
1771 - | .property(
|
1772 - | "authSchemes",
|
1773 - | vec![{
|
1774 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1775 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1776 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1777 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1778 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1779 - | out
|
1780 - | }
|
1781 - | .into()]
|
1537 + | .auth_scheme(
|
1538 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1539 + | .put("disableDoubleEncoding", true)
|
1540 + | .put("signingName", "s3".to_string())
|
1541 + | .put("signingRegion", "us-east-1".to_string())
|
1782 1542 | )
|
1783 1543 | .build()
|
1784 1544 | );
|
1785 1545 | }
|
1786 1546 |
|
1787 1547 | /// virtual addressing, aws-global region with accelerate uses the global accelerate endpoint
|
1788 1548 | #[test]
|
1789 1549 | fn test_62() {
|
1790 1550 | let params = crate::config::endpoint::Params::builder()
|
1791 1551 | .region("aws-global".to_string())
|
1792 1552 | .bucket("bucket-name".to_string())
|
1793 1553 | .use_fips(false)
|
1794 1554 | .use_dual_stack(false)
|
1795 1555 | .accelerate(true)
|
1796 1556 | .build()
|
1797 1557 | .expect("invalid params");
|
1798 1558 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1799 1559 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1800 1560 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3-accelerate.amazonaws.com");
|
1801 1561 | assert_eq!(
|
1802 1562 | endpoint,
|
1803 1563 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1804 1564 | .url("https://bucket-name.s3-accelerate.amazonaws.com")
|
1805 - | .property(
|
1806 - | "authSchemes",
|
1807 - | vec![{
|
1808 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1809 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1810 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1811 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1812 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1813 - | out
|
1814 - | }
|
1815 - | .into()]
|
1565 + | .auth_scheme(
|
1566 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1567 + | .put("disableDoubleEncoding", true)
|
1568 + | .put("signingName", "s3".to_string())
|
1569 + | .put("signingRegion", "us-east-1".to_string())
|
1816 1570 | )
|
1817 1571 | .build()
|
1818 1572 | );
|
1819 1573 | }
|
1820 1574 |
|
1821 1575 | /// virtual addressing, aws-global region with custom endpoint
|
1822 1576 | #[test]
|
1823 1577 | fn test_63() {
|
1824 1578 | let params = crate::config::endpoint::Params::builder()
|
1825 1579 | .region("aws-global".to_string())
|
1826 1580 | .endpoint("https://example.com".to_string())
|
1827 1581 | .bucket("bucket-name".to_string())
|
1828 1582 | .use_fips(false)
|
1829 1583 | .use_dual_stack(false)
|
1830 1584 | .accelerate(false)
|
1831 1585 | .build()
|
1832 1586 | .expect("invalid params");
|
1833 1587 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1834 1588 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1835 1589 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.example.com");
|
1836 1590 | assert_eq!(
|
1837 1591 | endpoint,
|
1838 1592 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1839 1593 | .url("https://bucket-name.example.com")
|
1840 - | .property(
|
1841 - | "authSchemes",
|
1842 - | vec![{
|
1843 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1844 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1845 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1846 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1847 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1848 - | out
|
1849 - | }
|
1850 - | .into()]
|
1594 + | .auth_scheme(
|
1595 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1596 + | .put("disableDoubleEncoding", true)
|
1597 + | .put("signingName", "s3".to_string())
|
1598 + | .put("signingRegion", "us-east-1".to_string())
|
1851 1599 | )
|
1852 1600 | .build()
|
1853 1601 | );
|
1854 1602 | }
|
1855 1603 |
|
1856 1604 | /// virtual addressing, UseGlobalEndpoint and us-east-1 region uses the global endpoint
|
1857 1605 | #[test]
|
1858 1606 | fn test_64() {
|
1859 1607 | let params = crate::config::endpoint::Params::builder()
|
1860 1608 | .region("us-east-1".to_string())
|
1861 1609 | .use_global_endpoint(true)
|
1862 1610 | .bucket("bucket-name".to_string())
|
1863 1611 | .use_fips(false)
|
1864 1612 | .use_dual_stack(false)
|
1865 1613 | .accelerate(false)
|
1866 1614 | .build()
|
1867 1615 | .expect("invalid params");
|
1868 1616 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1869 1617 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1870 1618 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3.amazonaws.com");
|
1871 1619 | assert_eq!(
|
1872 1620 | endpoint,
|
1873 1621 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1874 1622 | .url("https://bucket-name.s3.amazonaws.com")
|
1875 - | .property(
|
1876 - | "authSchemes",
|
1877 - | vec![{
|
1878 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1879 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1880 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1881 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1882 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1883 - | out
|
1884 - | }
|
1885 - | .into()]
|
1623 + | .auth_scheme(
|
1624 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1625 + | .put("disableDoubleEncoding", true)
|
1626 + | .put("signingName", "s3".to_string())
|
1627 + | .put("signingRegion", "us-east-1".to_string())
|
1886 1628 | )
|
1887 1629 | .build()
|
1888 1630 | );
|
1889 1631 | }
|
1890 1632 |
|
1891 1633 | /// virtual addressing, UseGlobalEndpoint and us-west-2 region uses the regional endpoint
|
1892 1634 | #[test]
|
1893 1635 | fn test_65() {
|
1894 1636 | let params = crate::config::endpoint::Params::builder()
|
1895 1637 | .region("us-west-2".to_string())
|
1896 1638 | .use_global_endpoint(true)
|
1897 1639 | .bucket("bucket-name".to_string())
|
1898 1640 | .use_fips(false)
|
1899 1641 | .use_dual_stack(false)
|
1900 1642 | .accelerate(false)
|
1901 1643 | .build()
|
1902 1644 | .expect("invalid params");
|
1903 1645 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1904 1646 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1905 1647 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3.us-west-2.amazonaws.com");
|
1906 1648 | assert_eq!(
|
1907 1649 | endpoint,
|
1908 1650 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1909 1651 | .url("https://bucket-name.s3.us-west-2.amazonaws.com")
|
1910 - | .property(
|
1911 - | "authSchemes",
|
1912 - | vec![{
|
1913 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1914 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1915 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1916 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
1917 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1918 - | out
|
1919 - | }
|
1920 - | .into()]
|
1652 + | .auth_scheme(
|
1653 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1654 + | .put("disableDoubleEncoding", true)
|
1655 + | .put("signingName", "s3".to_string())
|
1656 + | .put("signingRegion", "us-west-2".to_string())
|
1921 1657 | )
|
1922 1658 | .build()
|
1923 1659 | );
|
1924 1660 | }
|
1925 1661 |
|
1926 1662 | /// virtual addressing, UseGlobalEndpoint and us-east-1 region and fips uses the regional fips endpoint
|
1927 1663 | #[test]
|
1928 1664 | fn test_66() {
|
1929 1665 | let params = crate::config::endpoint::Params::builder()
|
1930 1666 | .region("us-east-1".to_string())
|
1931 1667 | .use_global_endpoint(true)
|
1932 1668 | .bucket("bucket-name".to_string())
|
1933 1669 | .use_fips(true)
|
1934 1670 | .use_dual_stack(false)
|
1935 1671 | .accelerate(false)
|
1936 1672 | .build()
|
1937 1673 | .expect("invalid params");
|
1938 1674 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1939 1675 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1940 1676 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3-fips.us-east-1.amazonaws.com");
|
1941 1677 | assert_eq!(
|
1942 1678 | endpoint,
|
1943 1679 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1944 1680 | .url("https://bucket-name.s3-fips.us-east-1.amazonaws.com")
|
1945 - | .property(
|
1946 - | "authSchemes",
|
1947 - | vec![{
|
1948 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1949 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1950 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1951 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1952 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1953 - | out
|
1954 - | }
|
1955 - | .into()]
|
1681 + | .auth_scheme(
|
1682 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1683 + | .put("disableDoubleEncoding", true)
|
1684 + | .put("signingName", "s3".to_string())
|
1685 + | .put("signingRegion", "us-east-1".to_string())
|
1956 1686 | )
|
1957 1687 | .build()
|
1958 1688 | );
|
1959 1689 | }
|
1960 1690 |
|
1961 1691 | /// virtual addressing, UseGlobalEndpoint and us-east-1 region and dualstack uses the regional dualstack endpoint
|
1962 1692 | #[test]
|
1963 1693 | fn test_67() {
|
1964 1694 | let params = crate::config::endpoint::Params::builder()
|
1965 1695 | .region("us-east-1".to_string())
|
1966 1696 | .use_global_endpoint(true)
|
1967 1697 | .bucket("bucket-name".to_string())
|
1968 1698 | .use_fips(false)
|
1969 1699 | .use_dual_stack(true)
|
1970 1700 | .accelerate(false)
|
1971 1701 | .build()
|
1972 1702 | .expect("invalid params");
|
1973 1703 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
1974 1704 | let endpoint = resolver.resolve_endpoint(¶ms);
|
1975 1705 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3.dualstack.us-east-1.amazonaws.com");
|
1976 1706 | assert_eq!(
|
1977 1707 | endpoint,
|
1978 1708 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
1979 1709 | .url("https://bucket-name.s3.dualstack.us-east-1.amazonaws.com")
|
1980 - | .property(
|
1981 - | "authSchemes",
|
1982 - | vec![{
|
1983 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1984 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
1985 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
1986 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
1987 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1988 - | out
|
1989 - | }
|
1990 - | .into()]
|
1710 + | .auth_scheme(
|
1711 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1712 + | .put("disableDoubleEncoding", true)
|
1713 + | .put("signingName", "s3".to_string())
|
1714 + | .put("signingRegion", "us-east-1".to_string())
|
1991 1715 | )
|
1992 1716 | .build()
|
1993 1717 | );
|
1994 1718 | }
|
1995 1719 |
|
1996 1720 | /// virtual addressing, UseGlobalEndpoint and us-east-1 region and accelerate uses the global accelerate endpoint
|
1997 1721 | #[test]
|
1998 1722 | fn test_68() {
|
1999 1723 | let params = crate::config::endpoint::Params::builder()
|
2000 1724 | .region("us-east-1".to_string())
|
2001 1725 | .use_global_endpoint(true)
|
2002 1726 | .bucket("bucket-name".to_string())
|
2003 1727 | .use_fips(false)
|
2004 1728 | .use_dual_stack(false)
|
2005 1729 | .accelerate(true)
|
2006 1730 | .build()
|
2007 1731 | .expect("invalid params");
|
2008 1732 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2009 1733 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2010 1734 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.s3-accelerate.amazonaws.com");
|
2011 1735 | assert_eq!(
|
2012 1736 | endpoint,
|
2013 1737 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2014 1738 | .url("https://bucket-name.s3-accelerate.amazonaws.com")
|
2015 - | .property(
|
2016 - | "authSchemes",
|
2017 - | vec![{
|
2018 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2019 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2020 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2021 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2022 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2023 - | out
|
2024 - | }
|
2025 - | .into()]
|
1739 + | .auth_scheme(
|
1740 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1741 + | .put("disableDoubleEncoding", true)
|
1742 + | .put("signingName", "s3".to_string())
|
1743 + | .put("signingRegion", "us-east-1".to_string())
|
2026 1744 | )
|
2027 1745 | .build()
|
2028 1746 | );
|
2029 1747 | }
|
2030 1748 |
|
2031 1749 | /// virtual addressing, UseGlobalEndpoint and us-east-1 region with custom endpoint
|
2032 1750 | #[test]
|
2033 1751 | fn test_69() {
|
2034 1752 | let params = crate::config::endpoint::Params::builder()
|
2035 1753 | .region("us-east-1".to_string())
|
2036 1754 | .endpoint("https://example.com".to_string())
|
2037 1755 | .use_global_endpoint(true)
|
2038 1756 | .bucket("bucket-name".to_string())
|
2039 1757 | .use_fips(false)
|
2040 1758 | .use_dual_stack(false)
|
2041 1759 | .accelerate(false)
|
2042 1760 | .build()
|
2043 1761 | .expect("invalid params");
|
2044 1762 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2045 1763 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2046 1764 | let endpoint = endpoint.expect("Expected valid endpoint: https://bucket-name.example.com");
|
2047 1765 | assert_eq!(
|
2048 1766 | endpoint,
|
2049 1767 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2050 1768 | .url("https://bucket-name.example.com")
|
2051 - | .property(
|
2052 - | "authSchemes",
|
2053 - | vec![{
|
2054 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2055 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2056 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2057 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2058 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2059 - | out
|
2060 - | }
|
2061 - | .into()]
|
1769 + | .auth_scheme(
|
1770 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1771 + | .put("disableDoubleEncoding", true)
|
1772 + | .put("signingName", "s3".to_string())
|
1773 + | .put("signingRegion", "us-east-1".to_string())
|
2062 1774 | )
|
2063 1775 | .build()
|
2064 1776 | );
|
2065 1777 | }
|
2066 1778 |
|
2067 1779 | /// ForcePathStyle, aws-global region uses the global endpoint
|
2068 1780 | #[test]
|
2069 1781 | fn test_70() {
|
2070 1782 | let params = crate::config::endpoint::Params::builder()
|
2071 1783 | .region("aws-global".to_string())
|
2072 1784 | .bucket("bucket-name".to_string())
|
2073 1785 | .force_path_style(true)
|
2074 1786 | .use_fips(false)
|
2075 1787 | .use_dual_stack(false)
|
2076 1788 | .accelerate(false)
|
2077 1789 | .build()
|
2078 1790 | .expect("invalid params");
|
2079 1791 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2080 1792 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2081 1793 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.amazonaws.com/bucket-name");
|
2082 1794 | assert_eq!(
|
2083 1795 | endpoint,
|
2084 1796 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2085 1797 | .url("https://s3.amazonaws.com/bucket-name")
|
2086 - | .property(
|
2087 - | "authSchemes",
|
2088 - | vec![{
|
2089 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2090 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2091 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2092 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2093 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2094 - | out
|
2095 - | }
|
2096 - | .into()]
|
1798 + | .auth_scheme(
|
1799 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1800 + | .put("disableDoubleEncoding", true)
|
1801 + | .put("signingName", "s3".to_string())
|
1802 + | .put("signingRegion", "us-east-1".to_string())
|
2097 1803 | )
|
2098 1804 | .build()
|
2099 1805 | );
|
2100 1806 | }
|
2101 1807 |
|
2102 1808 | /// ForcePathStyle, aws-global region with fips is invalid
|
2103 1809 | #[test]
|
2104 1810 | fn test_71() {
|
2105 1811 | let params = crate::config::endpoint::Params::builder()
|
2106 1812 | .region("aws-global".to_string())
|
2107 1813 | .bucket("bucket-name".to_string())
|
2108 1814 | .force_path_style(true)
|
2109 1815 | .use_fips(true)
|
2110 1816 | .use_dual_stack(false)
|
2111 1817 | .accelerate(false)
|
2112 1818 | .build()
|
2113 1819 | .expect("invalid params");
|
2114 1820 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2115 1821 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2116 1822 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3-fips.us-east-1.amazonaws.com/bucket-name");
|
2117 1823 | assert_eq!(
|
2118 1824 | endpoint,
|
2119 1825 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2120 1826 | .url("https://s3-fips.us-east-1.amazonaws.com/bucket-name")
|
2121 - | .property(
|
2122 - | "authSchemes",
|
2123 - | vec![{
|
2124 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2125 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2126 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2127 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2128 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2129 - | out
|
2130 - | }
|
2131 - | .into()]
|
1827 + | .auth_scheme(
|
1828 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1829 + | .put("disableDoubleEncoding", true)
|
1830 + | .put("signingName", "s3".to_string())
|
1831 + | .put("signingRegion", "us-east-1".to_string())
|
2132 1832 | )
|
2133 1833 | .build()
|
2134 1834 | );
|
2135 1835 | }
|
2136 1836 |
|
2137 1837 | /// ForcePathStyle, aws-global region with dualstack uses regional dualstack endpoint
|
2138 1838 | #[test]
|
2139 1839 | fn test_72() {
|
2140 1840 | let params = crate::config::endpoint::Params::builder()
|
2141 1841 | .region("aws-global".to_string())
|
2142 1842 | .bucket("bucket-name".to_string())
|
2143 1843 | .force_path_style(true)
|
2144 1844 | .use_fips(false)
|
2145 1845 | .use_dual_stack(true)
|
2146 1846 | .accelerate(false)
|
2147 1847 | .build()
|
2148 1848 | .expect("invalid params");
|
2149 1849 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2150 1850 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2151 1851 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.dualstack.us-east-1.amazonaws.com/bucket-name");
|
2152 1852 | assert_eq!(
|
2153 1853 | endpoint,
|
2154 1854 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2155 1855 | .url("https://s3.dualstack.us-east-1.amazonaws.com/bucket-name")
|
2156 - | .property(
|
2157 - | "authSchemes",
|
2158 - | vec![{
|
2159 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2160 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2161 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2162 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2163 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2164 - | out
|
2165 - | }
|
2166 - | .into()]
|
1856 + | .auth_scheme(
|
1857 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1858 + | .put("disableDoubleEncoding", true)
|
1859 + | .put("signingName", "s3".to_string())
|
1860 + | .put("signingRegion", "us-east-1".to_string())
|
2167 1861 | )
|
2168 1862 | .build()
|
2169 1863 | );
|
2170 1864 | }
|
2171 1865 |
|
2172 1866 | /// ForcePathStyle, aws-global region custom endpoint uses the custom endpoint
|
2173 1867 | #[test]
|
2174 1868 | fn test_73() {
|
2175 1869 | let params = crate::config::endpoint::Params::builder()
|
2176 1870 | .region("aws-global".to_string())
|
2177 1871 | .endpoint("https://example.com".to_string())
|
2178 1872 | .bucket("bucket-name".to_string())
|
2179 1873 | .force_path_style(true)
|
2180 1874 | .use_fips(false)
|
2181 1875 | .use_dual_stack(false)
|
2182 1876 | .accelerate(false)
|
2183 1877 | .build()
|
2184 1878 | .expect("invalid params");
|
2185 1879 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2186 1880 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2187 1881 | let endpoint = endpoint.expect("Expected valid endpoint: https://example.com/bucket-name");
|
2188 1882 | assert_eq!(
|
2189 1883 | endpoint,
|
2190 1884 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2191 1885 | .url("https://example.com/bucket-name")
|
2192 - | .property(
|
2193 - | "authSchemes",
|
2194 - | vec![{
|
2195 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2196 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2197 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2198 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2199 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2200 - | out
|
2201 - | }
|
2202 - | .into()]
|
1886 + | .auth_scheme(
|
1887 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1888 + | .put("disableDoubleEncoding", true)
|
1889 + | .put("signingName", "s3".to_string())
|
1890 + | .put("signingRegion", "us-east-1".to_string())
|
2203 1891 | )
|
2204 1892 | .build()
|
2205 1893 | );
|
2206 1894 | }
|
2207 1895 |
|
2208 1896 | /// ForcePathStyle, UseGlobalEndpoint us-east-1 region uses the global endpoint
|
2209 1897 | #[test]
|
2210 1898 | fn test_74() {
|
2211 1899 | let params = crate::config::endpoint::Params::builder()
|
2212 1900 | .region("us-east-1".to_string())
|
2213 1901 | .bucket("bucket-name".to_string())
|
2214 1902 | .use_global_endpoint(true)
|
2215 1903 | .force_path_style(true)
|
2216 1904 | .use_fips(false)
|
2217 1905 | .use_dual_stack(false)
|
2218 1906 | .accelerate(false)
|
2219 1907 | .build()
|
2220 1908 | .expect("invalid params");
|
2221 1909 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2222 1910 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2223 1911 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.amazonaws.com/bucket-name");
|
2224 1912 | assert_eq!(
|
2225 1913 | endpoint,
|
2226 1914 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2227 1915 | .url("https://s3.amazonaws.com/bucket-name")
|
2228 - | .property(
|
2229 - | "authSchemes",
|
2230 - | vec![{
|
2231 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2232 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2233 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2234 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2235 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2236 - | out
|
2237 - | }
|
2238 - | .into()]
|
1916 + | .auth_scheme(
|
1917 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1918 + | .put("disableDoubleEncoding", true)
|
1919 + | .put("signingName", "s3".to_string())
|
1920 + | .put("signingRegion", "us-east-1".to_string())
|
2239 1921 | )
|
2240 1922 | .build()
|
2241 1923 | );
|
2242 1924 | }
|
2243 1925 |
|
2244 1926 | /// ForcePathStyle, UseGlobalEndpoint us-west-2 region uses the regional endpoint
|
2245 1927 | #[test]
|
2246 1928 | fn test_75() {
|
2247 1929 | let params = crate::config::endpoint::Params::builder()
|
2248 1930 | .region("us-west-2".to_string())
|
2249 1931 | .bucket("bucket-name".to_string())
|
2250 1932 | .use_global_endpoint(true)
|
2251 1933 | .force_path_style(true)
|
2252 1934 | .use_fips(false)
|
2253 1935 | .use_dual_stack(false)
|
2254 1936 | .accelerate(false)
|
2255 1937 | .build()
|
2256 1938 | .expect("invalid params");
|
2257 1939 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2258 1940 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2259 1941 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.us-west-2.amazonaws.com/bucket-name");
|
2260 1942 | assert_eq!(
|
2261 1943 | endpoint,
|
2262 1944 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2263 1945 | .url("https://s3.us-west-2.amazonaws.com/bucket-name")
|
2264 - | .property(
|
2265 - | "authSchemes",
|
2266 - | vec![{
|
2267 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2268 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2269 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2270 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
2271 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2272 - | out
|
2273 - | }
|
2274 - | .into()]
|
1946 + | .auth_scheme(
|
1947 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1948 + | .put("disableDoubleEncoding", true)
|
1949 + | .put("signingName", "s3".to_string())
|
1950 + | .put("signingRegion", "us-west-2".to_string())
|
2275 1951 | )
|
2276 1952 | .build()
|
2277 1953 | );
|
2278 1954 | }
|
2279 1955 |
|
2280 1956 | /// ForcePathStyle, UseGlobalEndpoint us-east-1 region, dualstack uses the regional dualstack endpoint
|
2281 1957 | #[test]
|
2282 1958 | fn test_76() {
|
2283 1959 | let params = crate::config::endpoint::Params::builder()
|
2284 1960 | .region("us-east-1".to_string())
|
2285 1961 | .bucket("bucket-name".to_string())
|
2286 1962 | .use_global_endpoint(true)
|
2287 1963 | .force_path_style(true)
|
2288 1964 | .use_fips(false)
|
2289 1965 | .use_dual_stack(true)
|
2290 1966 | .accelerate(false)
|
2291 1967 | .build()
|
2292 1968 | .expect("invalid params");
|
2293 1969 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2294 1970 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2295 1971 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3.dualstack.us-east-1.amazonaws.com/bucket-name");
|
2296 1972 | assert_eq!(
|
2297 1973 | endpoint,
|
2298 1974 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2299 1975 | .url("https://s3.dualstack.us-east-1.amazonaws.com/bucket-name")
|
2300 - | .property(
|
2301 - | "authSchemes",
|
2302 - | vec![{
|
2303 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2304 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2305 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2306 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2307 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2308 - | out
|
2309 - | }
|
2310 - | .into()]
|
1976 + | .auth_scheme(
|
1977 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
1978 + | .put("disableDoubleEncoding", true)
|
1979 + | .put("signingName", "s3".to_string())
|
1980 + | .put("signingRegion", "us-east-1".to_string())
|
2311 1981 | )
|
2312 1982 | .build()
|
2313 1983 | );
|
2314 1984 | }
|
2315 1985 |
|
2316 1986 | /// ForcePathStyle, UseGlobalEndpoint us-east-1 region custom endpoint uses the custom endpoint
|
2317 1987 | #[test]
|
2318 1988 | fn test_77() {
|
2319 1989 | let params = crate::config::endpoint::Params::builder()
|
2320 1990 | .region("us-east-1".to_string())
|
2321 1991 | .bucket("bucket-name".to_string())
|
2322 1992 | .endpoint("https://example.com".to_string())
|
2323 1993 | .use_global_endpoint(true)
|
2324 1994 | .force_path_style(true)
|
2325 1995 | .use_fips(false)
|
2326 1996 | .use_dual_stack(false)
|
2327 1997 | .accelerate(false)
|
2328 1998 | .build()
|
2329 1999 | .expect("invalid params");
|
2330 2000 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2331 2001 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2332 2002 | let endpoint = endpoint.expect("Expected valid endpoint: https://example.com/bucket-name");
|
2333 2003 | assert_eq!(
|
2334 2004 | endpoint,
|
2335 2005 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2336 2006 | .url("https://example.com/bucket-name")
|
2337 - | .property(
|
2338 - | "authSchemes",
|
2339 - | vec![{
|
2340 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2341 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2342 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2343 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2344 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2345 - | out
|
2346 - | }
|
2347 - | .into()]
|
2007 + | .auth_scheme(
|
2008 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
2009 + | .put("disableDoubleEncoding", true)
|
2010 + | .put("signingName", "s3".to_string())
|
2011 + | .put("signingRegion", "us-east-1".to_string())
|
2348 2012 | )
|
2349 2013 | .build()
|
2350 2014 | );
|
2351 2015 | }
|
2352 2016 |
|
2353 2017 | /// ARN with aws-global region and UseArnRegion uses the regional endpoint
|
2354 2018 | #[test]
|
2355 2019 | fn test_78() {
|
2356 2020 | let params = crate::config::endpoint::Params::builder()
|
2357 2021 | .region("aws-global".to_string())
|
2358 2022 | .use_arn_region(true)
|
2359 2023 | .use_fips(false)
|
2360 2024 | .use_dual_stack(false)
|
2361 2025 | .accelerate(false)
|
2362 2026 | .bucket("arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-01234567890123456/accesspoint/reports".to_string())
|
2363 2027 | .build()
|
2364 2028 | .expect("invalid params");
|
2365 2029 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2366 2030 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2367 2031 | let endpoint =
|
2368 2032 | endpoint.expect("Expected valid endpoint: https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com");
|
2369 2033 | assert_eq!(
|
2370 2034 | endpoint,
|
2371 2035 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2372 2036 | .url("https://reports-123456789012.op-01234567890123456.s3-outposts.us-east-1.amazonaws.com")
|
2373 - | .property(
|
2374 - | "authSchemes",
|
2375 - | vec![
|
2376 - | {
|
2377 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2378 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
2379 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2380 - | out.insert("signingRegionSet".to_string(), vec!["*".to_string().into()].into());
|
2381 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2382 - | out
|
2383 - | }
|
2384 - | .into(),
|
2385 - | {
|
2386 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2387 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2388 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
2389 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
2390 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2391 - | out
|
2392 - | }
|
2393 - | .into()
|
2394 - | ]
|
2037 + | .auth_scheme(
|
2038 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4a", 3)
|
2039 + | .put("disableDoubleEncoding", true)
|
2040 + | .put("signingName", "s3-outposts".to_string())
|
2041 + | .put("signingRegionSet", vec!["*".to_string().into()])
|
2042 + | )
|
2043 + | .auth_scheme(
|
2044 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
2045 + | .put("disableDoubleEncoding", true)
|
2046 + | .put("signingName", "s3-outposts".to_string())
|
2047 + | .put("signingRegion", "us-east-1".to_string())
|
2395 2048 | )
|
2396 2049 | .build()
|
2397 2050 | );
|
2398 2051 | }
|
2399 2052 |
|
2400 2053 | /// cross partition MRAP ARN is an error
|
2401 2054 | #[test]
|
2402 2055 | fn test_79() {
|
2403 2056 | let params = crate::config::endpoint::Params::builder()
|
2404 2057 | .bucket("arn:aws-cn:s3::123456789012:accesspoint:mfzwi23gnjvgw.mrap".to_string())
|
2405 2058 | .region("us-west-1".to_string())
|
2406 2059 | .build()
|
2407 2060 | .expect("invalid params");
|
2408 2061 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2409 2062 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2410 2063 | let error = endpoint.expect_err("expected error: Client was configured for partition `aws` but bucket referred to partition `aws-cn` [cross partition MRAP ARN is an error]");
|
2411 2064 | assert_eq!(
|
2412 2065 | format!("{}", error),
|
2413 2066 | "Client was configured for partition `aws` but bucket referred to partition `aws-cn`"
|
2414 2067 | )
|
2415 2068 | }
|
2416 2069 |
|
2417 2070 | /// Endpoint override, accesspoint with HTTP, port
|
2418 2071 | #[test]
|
2419 2072 | fn test_80() {
|
2420 2073 | let params = crate::config::endpoint::Params::builder()
|
2421 2074 | .endpoint("http://beta.example.com:1234".to_string())
|
2422 2075 | .region("us-west-2".to_string())
|
2423 2076 | .bucket("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_string())
|
2424 2077 | .build()
|
2425 2078 | .expect("invalid params");
|
2426 2079 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2427 2080 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2428 2081 | let endpoint = endpoint.expect("Expected valid endpoint: http://myendpoint-123456789012.beta.example.com:1234");
|
2429 2082 | assert_eq!(
|
2430 2083 | endpoint,
|
2431 2084 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2432 2085 | .url("http://myendpoint-123456789012.beta.example.com:1234")
|
2433 - | .property(
|
2434 - | "authSchemes",
|
2435 - | vec![{
|
2436 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2437 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2438 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2439 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
2440 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2441 - | out
|
2442 - | }
|
2443 - | .into()]
|
2086 + | .auth_scheme(
|
2087 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
2088 + | .put("disableDoubleEncoding", true)
|
2089 + | .put("signingName", "s3".to_string())
|
2090 + | .put("signingRegion", "us-west-2".to_string())
|
2444 2091 | )
|
2445 2092 | .build()
|
2446 2093 | );
|
2447 2094 | }
|
2448 2095 |
|
2449 2096 | /// Endpoint override, accesspoint with http, path, query, and port
|
2450 2097 | #[test]
|
2451 2098 | fn test_81() {
|
2452 2099 | let params = crate::config::endpoint::Params::builder()
|
2453 2100 | .region("us-west-2".to_string())
|
2454 2101 | .bucket("arn:aws:s3:us-west-2:123456789012:accesspoint:myendpoint".to_string())
|
2455 2102 | .endpoint("http://beta.example.com:1234/path".to_string())
|
2456 2103 | .use_fips(false)
|
2457 2104 | .use_dual_stack(false)
|
2458 2105 | .accelerate(false)
|
2459 2106 | .build()
|
2460 2107 | .expect("invalid params");
|
2461 2108 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
2462 2109 | let endpoint = resolver.resolve_endpoint(¶ms);
|
2463 2110 | let endpoint = endpoint.expect("Expected valid endpoint: http://myendpoint-123456789012.beta.example.com:1234/path");
|
2464 2111 | assert_eq!(
|
2465 2112 | endpoint,
|
2466 2113 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
2467 2114 | .url("http://myendpoint-123456789012.beta.example.com:1234/path")
|
2468 - | .property(
|
2469 - | "authSchemes",
|
2470 - | vec![{
|
2471 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
2472 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
2473 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
2474 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
2475 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
2476 - | out
|
2477 - | }
|
2478 - | .into()]
|
2115 + | .auth_scheme(
|
2116 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
2117 + | .put("disableDoubleEncoding", true)
|
2118 + | .put("signingName", "s3".to_string())
|
2119 + | .put("signingRegion", "us-west-2".to_string())
|
2479 2120 | )
|
2480 2121 | .build()
|
2481 2122 | );
|
2482 2123 | }
|
2483 2124 |
|
2484 2125 | /// non-bucket endpoint override with FIPS = error
|
2485 2126 | #[test]
|
2486 2127 | fn test_82() {
|
2487 2128 | let params = crate::config::endpoint::Params::builder()
|
2488 2129 | .region("us-west-2".to_string())
|
7712 6696 | .accelerate(false)
|
7713 6697 | .build()
|
7714 6698 | .expect("invalid params");
|
7715 6699 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7716 6700 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7717 6701 | let endpoint = endpoint.expect("Expected valid endpoint: http://10.0.1.12:433/bucketName");
|
7718 6702 | assert_eq!(
|
7719 6703 | endpoint,
|
7720 6704 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7721 6705 | .url("http://10.0.1.12:433/bucketName")
|
7722 - | .property(
|
7723 - | "authSchemes",
|
7724 - | vec![{
|
7725 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
7726 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
7727 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
7728 - | out.insert("signingRegion".to_string(), "snow".to_string().into());
|
7729 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
7730 - | out
|
7731 - | }
|
7732 - | .into()]
|
6706 + | .auth_scheme(
|
6707 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
6708 + | .put("disableDoubleEncoding", true)
|
6709 + | .put("signingName", "s3".to_string())
|
6710 + | .put("signingRegion", "snow".to_string())
|
7733 6711 | )
|
7734 6712 | .build()
|
7735 6713 | );
|
7736 6714 | }
|
7737 6715 |
|
7738 6716 | /// S3 Snow without bucket
|
7739 6717 | #[test]
|
7740 6718 | fn test_272() {
|
7741 6719 | let params = crate::config::endpoint::Params::builder()
|
7742 6720 | .region("snow".to_string())
|
7743 6721 | .endpoint("https://10.0.1.12:433".to_string())
|
7744 6722 | .use_fips(false)
|
7745 6723 | .use_dual_stack(false)
|
7746 6724 | .accelerate(false)
|
7747 6725 | .build()
|
7748 6726 | .expect("invalid params");
|
7749 6727 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7750 6728 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7751 6729 | let endpoint = endpoint.expect("Expected valid endpoint: https://10.0.1.12:433");
|
7752 6730 | assert_eq!(
|
7753 6731 | endpoint,
|
7754 6732 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7755 6733 | .url("https://10.0.1.12:433")
|
7756 - | .property(
|
7757 - | "authSchemes",
|
7758 - | vec![{
|
7759 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
7760 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
7761 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
7762 - | out.insert("signingRegion".to_string(), "snow".to_string().into());
|
7763 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
7764 - | out
|
7765 - | }
|
7766 - | .into()]
|
6734 + | .auth_scheme(
|
6735 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
6736 + | .put("disableDoubleEncoding", true)
|
6737 + | .put("signingName", "s3".to_string())
|
6738 + | .put("signingRegion", "snow".to_string())
|
7767 6739 | )
|
7768 6740 | .build()
|
7769 6741 | );
|
7770 6742 | }
|
7771 6743 |
|
7772 6744 | /// S3 Snow no port
|
7773 6745 | #[test]
|
7774 6746 | fn test_273() {
|
7775 6747 | let params = crate::config::endpoint::Params::builder()
|
7776 6748 | .region("snow".to_string())
|
7777 6749 | .bucket("bucketName".to_string())
|
7778 6750 | .endpoint("http://10.0.1.12".to_string())
|
7779 6751 | .use_fips(false)
|
7780 6752 | .use_dual_stack(false)
|
7781 6753 | .accelerate(false)
|
7782 6754 | .build()
|
7783 6755 | .expect("invalid params");
|
7784 6756 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7785 6757 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7786 6758 | let endpoint = endpoint.expect("Expected valid endpoint: http://10.0.1.12/bucketName");
|
7787 6759 | assert_eq!(
|
7788 6760 | endpoint,
|
7789 6761 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7790 6762 | .url("http://10.0.1.12/bucketName")
|
7791 - | .property(
|
7792 - | "authSchemes",
|
7793 - | vec![{
|
7794 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
7795 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
7796 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
7797 - | out.insert("signingRegion".to_string(), "snow".to_string().into());
|
7798 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
7799 - | out
|
7800 - | }
|
7801 - | .into()]
|
6763 + | .auth_scheme(
|
6764 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
6765 + | .put("disableDoubleEncoding", true)
|
6766 + | .put("signingName", "s3".to_string())
|
6767 + | .put("signingRegion", "snow".to_string())
|
7802 6768 | )
|
7803 6769 | .build()
|
7804 6770 | );
|
7805 6771 | }
|
7806 6772 |
|
7807 6773 | /// S3 Snow dns endpoint
|
7808 6774 | #[test]
|
7809 6775 | fn test_274() {
|
7810 6776 | let params = crate::config::endpoint::Params::builder()
|
7811 6777 | .region("snow".to_string())
|
7812 6778 | .bucket("bucketName".to_string())
|
7813 6779 | .endpoint("https://amazonaws.com".to_string())
|
7814 6780 | .use_fips(false)
|
7815 6781 | .use_dual_stack(false)
|
7816 6782 | .accelerate(false)
|
7817 6783 | .build()
|
7818 6784 | .expect("invalid params");
|
7819 6785 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7820 6786 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7821 6787 | let endpoint = endpoint.expect("Expected valid endpoint: https://amazonaws.com/bucketName");
|
7822 6788 | assert_eq!(
|
7823 6789 | endpoint,
|
7824 6790 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7825 6791 | .url("https://amazonaws.com/bucketName")
|
7826 - | .property(
|
7827 - | "authSchemes",
|
7828 - | vec![{
|
7829 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
7830 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
7831 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
7832 - | out.insert("signingRegion".to_string(), "snow".to_string().into());
|
7833 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
7834 - | out
|
7835 - | }
|
7836 - | .into()]
|
6792 + | .auth_scheme(
|
6793 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
6794 + | .put("disableDoubleEncoding", true)
|
6795 + | .put("signingName", "s3".to_string())
|
6796 + | .put("signingRegion", "snow".to_string())
|
7837 6797 | )
|
7838 6798 | .build()
|
7839 6799 | );
|
7840 6800 | }
|
7841 6801 |
|
7842 6802 | /// Data Plane with short zone name
|
7843 6803 | #[test]
|
7844 6804 | fn test_275() {
|
7845 6805 | let params = crate::config::endpoint::Params::builder()
|
7846 6806 | .region("us-east-1".to_string())
|
7847 6807 | .bucket("mybucket--abcd-ab1--x-s3".to_string())
|
7848 6808 | .use_fips(false)
|
7849 6809 | .use_dual_stack(false)
|
7850 6810 | .accelerate(false)
|
7851 6811 | .use_s3_express_control_endpoint(false)
|
7852 6812 | .build()
|
7853 6813 | .expect("invalid params");
|
7854 6814 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7855 6815 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7856 6816 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.us-east-1.amazonaws.com");
|
7857 6817 | assert_eq!(
|
7858 6818 | endpoint,
|
7859 6819 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7860 6820 | .url("https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.us-east-1.amazonaws.com")
|
7861 - | .property(
|
7862 - | "authSchemes",
|
7863 - | vec![{
|
7864 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
7865 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
7866 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
7867 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
7868 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
7869 - | out
|
7870 - | }
|
7871 - | .into()]
|
6821 + | .auth_scheme(
|
6822 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
6823 + | .put("disableDoubleEncoding", true)
|
6824 + | .put("signingName", "s3express".to_string())
|
6825 + | .put("signingRegion", "us-east-1".to_string())
|
7872 6826 | )
|
7873 6827 | .property("backend", "S3Express".to_string())
|
7874 6828 | .build()
|
7875 6829 | );
|
7876 6830 | }
|
7877 6831 |
|
7878 6832 | /// Data Plane with short zone name china region
|
7879 6833 | #[test]
|
7880 6834 | fn test_276() {
|
7881 6835 | let params = crate::config::endpoint::Params::builder()
|
7882 6836 | .region("cn-north-1".to_string())
|
7883 6837 | .bucket("mybucket--abcd-ab1--x-s3".to_string())
|
7884 6838 | .use_fips(false)
|
7885 6839 | .use_dual_stack(false)
|
7886 6840 | .accelerate(false)
|
7887 6841 | .use_s3_express_control_endpoint(false)
|
7888 6842 | .build()
|
7889 6843 | .expect("invalid params");
|
7890 6844 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7891 6845 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7892 6846 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn");
|
7893 6847 | assert_eq!(
|
7894 6848 | endpoint,
|
7895 6849 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7896 6850 | .url("https://mybucket--abcd-ab1--x-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn")
|
7897 - | .property(
|
7898 - | "authSchemes",
|
7899 - | vec![{
|
7900 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
7901 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
7902 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
7903 - | out.insert("signingRegion".to_string(), "cn-north-1".to_string().into());
|
7904 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
7905 - | out
|
7906 - | }
|
7907 - | .into()]
|
6851 + | .auth_scheme(
|
6852 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
6853 + | .put("disableDoubleEncoding", true)
|
6854 + | .put("signingName", "s3express".to_string())
|
6855 + | .put("signingRegion", "cn-north-1".to_string())
|
7908 6856 | )
|
7909 6857 | .property("backend", "S3Express".to_string())
|
7910 6858 | .build()
|
7911 6859 | );
|
7912 6860 | }
|
7913 6861 |
|
7914 6862 | /// Data Plane with short zone name with AP
|
7915 6863 | #[test]
|
7916 6864 | fn test_277() {
|
7917 6865 | let params = crate::config::endpoint::Params::builder()
|
7918 6866 | .region("us-east-1".to_string())
|
7919 6867 | .bucket("myaccesspoint--abcd-ab1--xa-s3".to_string())
|
7920 6868 | .use_fips(false)
|
7921 6869 | .use_dual_stack(false)
|
7922 6870 | .accelerate(false)
|
7923 6871 | .use_s3_express_control_endpoint(false)
|
7924 6872 | .build()
|
7925 6873 | .expect("invalid params");
|
7926 6874 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7927 6875 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7928 6876 | let endpoint = endpoint.expect("Expected valid endpoint: https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.us-east-1.amazonaws.com");
|
7929 6877 | assert_eq!(
|
7930 6878 | endpoint,
|
7931 6879 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7932 6880 | .url("https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.us-east-1.amazonaws.com")
|
7933 - | .property(
|
7934 - | "authSchemes",
|
7935 - | vec![{
|
7936 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
7937 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
7938 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
7939 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
7940 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
7941 - | out
|
7942 - | }
|
7943 - | .into()]
|
6881 + | .auth_scheme(
|
6882 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
6883 + | .put("disableDoubleEncoding", true)
|
6884 + | .put("signingName", "s3express".to_string())
|
6885 + | .put("signingRegion", "us-east-1".to_string())
|
7944 6886 | )
|
7945 6887 | .property("backend", "S3Express".to_string())
|
7946 6888 | .build()
|
7947 6889 | );
|
7948 6890 | }
|
7949 6891 |
|
7950 6892 | /// Data Plane with short zone name with AP china region
|
7951 6893 | #[test]
|
7952 6894 | fn test_278() {
|
7953 6895 | let params = crate::config::endpoint::Params::builder()
|
7954 6896 | .region("cn-north-1".to_string())
|
7955 6897 | .bucket("myaccesspoint--abcd-ab1--xa-s3".to_string())
|
7956 6898 | .use_fips(false)
|
7957 6899 | .use_dual_stack(false)
|
7958 6900 | .accelerate(false)
|
7959 6901 | .use_s3_express_control_endpoint(false)
|
7960 6902 | .build()
|
7961 6903 | .expect("invalid params");
|
7962 6904 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
7963 6905 | let endpoint = resolver.resolve_endpoint(¶ms);
|
7964 6906 | let endpoint =
|
7965 6907 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn");
|
7966 6908 | assert_eq!(
|
7967 6909 | endpoint,
|
7968 6910 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
7969 6911 | .url("https://myaccesspoint--abcd-ab1--xa-s3.s3express-abcd-ab1.cn-north-1.amazonaws.com.cn")
|
7970 - | .property(
|
7971 - | "authSchemes",
|
7972 - | vec![{
|
7973 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
7974 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
7975 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
7976 - | out.insert("signingRegion".to_string(), "cn-north-1".to_string().into());
|
7977 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
7978 - | out
|
7979 - | }
|
7980 - | .into()]
|
6912 + | .auth_scheme(
|
6913 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
6914 + | .put("disableDoubleEncoding", true)
|
6915 + | .put("signingName", "s3express".to_string())
|
6916 + | .put("signingRegion", "cn-north-1".to_string())
|
7981 6917 | )
|
7982 6918 | .property("backend", "S3Express".to_string())
|
7983 6919 | .build()
|
7984 6920 | );
|
7985 6921 | }
|
7986 6922 |
|
7987 6923 | /// Data Plane with short zone names (13 chars)
|
7988 6924 | #[test]
|
7989 6925 | fn test_279() {
|
7990 6926 | let params = crate::config::endpoint::Params::builder()
|
7991 6927 | .region("us-west-2".to_string())
|
7992 6928 | .bucket("mybucket--test-zone-ab1--x-s3".to_string())
|
7993 6929 | .use_fips(false)
|
7994 6930 | .use_dual_stack(false)
|
7995 6931 | .accelerate(false)
|
7996 6932 | .use_s3_express_control_endpoint(false)
|
7997 6933 | .build()
|
7998 6934 | .expect("invalid params");
|
7999 6935 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8000 6936 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8001 6937 | let endpoint =
|
8002 6938 | endpoint.expect("Expected valid endpoint: https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com");
|
8003 6939 | assert_eq!(
|
8004 6940 | endpoint,
|
8005 6941 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8006 6942 | .url("https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com")
|
8007 - | .property(
|
8008 - | "authSchemes",
|
8009 - | vec![{
|
8010 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8011 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8012 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8013 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8014 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8015 - | out
|
8016 - | }
|
8017 - | .into()]
|
6943 + | .auth_scheme(
|
6944 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
6945 + | .put("disableDoubleEncoding", true)
|
6946 + | .put("signingName", "s3express".to_string())
|
6947 + | .put("signingRegion", "us-west-2".to_string())
|
8018 6948 | )
|
8019 6949 | .property("backend", "S3Express".to_string())
|
8020 6950 | .build()
|
8021 6951 | );
|
8022 6952 | }
|
8023 6953 |
|
8024 6954 | /// Data Plane with short zone names (13 chars) with AP
|
8025 6955 | #[test]
|
8026 6956 | fn test_280() {
|
8027 6957 | let params = crate::config::endpoint::Params::builder()
|
8028 6958 | .region("us-west-2".to_string())
|
8029 6959 | .bucket("myaccesspoint--test-zone-ab1--xa-s3".to_string())
|
8030 6960 | .use_fips(false)
|
8031 6961 | .use_dual_stack(false)
|
8032 6962 | .accelerate(false)
|
8033 6963 | .use_s3_express_control_endpoint(false)
|
8034 6964 | .build()
|
8035 6965 | .expect("invalid params");
|
8036 6966 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8037 6967 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8038 6968 | let endpoint =
|
8039 6969 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com");
|
8040 6970 | assert_eq!(
|
8041 6971 | endpoint,
|
8042 6972 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8043 6973 | .url("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com")
|
8044 - | .property(
|
8045 - | "authSchemes",
|
8046 - | vec![{
|
8047 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8048 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8049 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8050 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8051 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8052 - | out
|
8053 - | }
|
8054 - | .into()]
|
6974 + | .auth_scheme(
|
6975 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
6976 + | .put("disableDoubleEncoding", true)
|
6977 + | .put("signingName", "s3express".to_string())
|
6978 + | .put("signingRegion", "us-west-2".to_string())
|
8055 6979 | )
|
8056 6980 | .property("backend", "S3Express".to_string())
|
8057 6981 | .build()
|
8058 6982 | );
|
8059 6983 | }
|
8060 6984 |
|
8061 6985 | /// Data Plane with medium zone names (14 chars)
|
8062 6986 | #[test]
|
8063 6987 | fn test_281() {
|
8064 6988 | let params = crate::config::endpoint::Params::builder()
|
8065 6989 | .region("us-west-2".to_string())
|
8066 6990 | .bucket("mybucket--test1-zone-ab1--x-s3".to_string())
|
8067 6991 | .use_fips(false)
|
8068 6992 | .use_dual_stack(false)
|
8069 6993 | .accelerate(false)
|
8070 6994 | .use_s3_express_control_endpoint(false)
|
8071 6995 | .build()
|
8072 6996 | .expect("invalid params");
|
8073 6997 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8074 6998 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8075 6999 | let endpoint =
|
8076 7000 | endpoint.expect("Expected valid endpoint: https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com");
|
8077 7001 | assert_eq!(
|
8078 7002 | endpoint,
|
8079 7003 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8080 7004 | .url("https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com")
|
8081 - | .property(
|
8082 - | "authSchemes",
|
8083 - | vec![{
|
8084 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8085 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8086 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8087 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8088 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8089 - | out
|
8090 - | }
|
8091 - | .into()]
|
7005 + | .auth_scheme(
|
7006 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7007 + | .put("disableDoubleEncoding", true)
|
7008 + | .put("signingName", "s3express".to_string())
|
7009 + | .put("signingRegion", "us-west-2".to_string())
|
8092 7010 | )
|
8093 7011 | .property("backend", "S3Express".to_string())
|
8094 7012 | .build()
|
8095 7013 | );
|
8096 7014 | }
|
8097 7015 |
|
8098 7016 | /// Data Plane with medium zone names (14 chars) with AP
|
8099 7017 | #[test]
|
8100 7018 | fn test_282() {
|
8101 7019 | let params = crate::config::endpoint::Params::builder()
|
8102 7020 | .region("us-west-2".to_string())
|
8103 7021 | .bucket("myaccesspoint--test1-zone-ab1--xa-s3".to_string())
|
8104 7022 | .use_fips(false)
|
8105 7023 | .use_dual_stack(false)
|
8106 7024 | .accelerate(false)
|
8107 7025 | .use_s3_express_control_endpoint(false)
|
8108 7026 | .build()
|
8109 7027 | .expect("invalid params");
|
8110 7028 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8111 7029 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8112 7030 | let endpoint =
|
8113 7031 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com");
|
8114 7032 | assert_eq!(
|
8115 7033 | endpoint,
|
8116 7034 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8117 7035 | .url("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com")
|
8118 - | .property(
|
8119 - | "authSchemes",
|
8120 - | vec![{
|
8121 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8122 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8123 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8124 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8125 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8126 - | out
|
8127 - | }
|
8128 - | .into()]
|
7036 + | .auth_scheme(
|
7037 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7038 + | .put("disableDoubleEncoding", true)
|
7039 + | .put("signingName", "s3express".to_string())
|
7040 + | .put("signingRegion", "us-west-2".to_string())
|
8129 7041 | )
|
8130 7042 | .property("backend", "S3Express".to_string())
|
8131 7043 | .build()
|
8132 7044 | );
|
8133 7045 | }
|
8134 7046 |
|
8135 7047 | /// Data Plane with long zone names (20 chars)
|
8136 7048 | #[test]
|
8137 7049 | fn test_283() {
|
8138 7050 | let params = crate::config::endpoint::Params::builder()
|
8139 7051 | .region("us-west-2".to_string())
|
8140 7052 | .bucket("mybucket--test1-long1-zone-ab1--x-s3".to_string())
|
8141 7053 | .use_fips(false)
|
8142 7054 | .use_dual_stack(false)
|
8143 7055 | .accelerate(false)
|
8144 7056 | .use_s3_express_control_endpoint(false)
|
8145 7057 | .build()
|
8146 7058 | .expect("invalid params");
|
8147 7059 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8148 7060 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8149 7061 | let endpoint = endpoint
|
8150 7062 | .expect("Expected valid endpoint: https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com");
|
8151 7063 | assert_eq!(
|
8152 7064 | endpoint,
|
8153 7065 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8154 7066 | .url("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com")
|
8155 - | .property(
|
8156 - | "authSchemes",
|
8157 - | vec![{
|
8158 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8159 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8160 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8161 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8162 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8163 - | out
|
8164 - | }
|
8165 - | .into()]
|
7067 + | .auth_scheme(
|
7068 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7069 + | .put("disableDoubleEncoding", true)
|
7070 + | .put("signingName", "s3express".to_string())
|
7071 + | .put("signingRegion", "us-west-2".to_string())
|
8166 7072 | )
|
8167 7073 | .property("backend", "S3Express".to_string())
|
8168 7074 | .build()
|
8169 7075 | );
|
8170 7076 | }
|
8171 7077 |
|
8172 7078 | /// Data Plane with long zone names (20 chars)
|
8173 7079 | #[test]
|
8174 7080 | fn test_284() {
|
8175 7081 | let params = crate::config::endpoint::Params::builder()
|
8176 7082 | .region("us-west-2".to_string())
|
8177 7083 | .bucket("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_string())
|
8178 7084 | .use_fips(false)
|
8179 7085 | .use_dual_stack(false)
|
8180 7086 | .accelerate(false)
|
8181 7087 | .use_s3_express_control_endpoint(false)
|
8182 7088 | .build()
|
8183 7089 | .expect("invalid params");
|
8184 7090 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8185 7091 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8186 7092 | let endpoint = endpoint.expect(
|
8187 7093 | "Expected valid endpoint: https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com",
|
8188 7094 | );
|
8189 7095 | assert_eq!(
|
8190 7096 | endpoint,
|
8191 7097 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8192 7098 | .url("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com")
|
8193 - | .property(
|
8194 - | "authSchemes",
|
8195 - | vec![{
|
8196 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8197 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8198 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8199 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8200 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8201 - | out
|
8202 - | }
|
8203 - | .into()]
|
7099 + | .auth_scheme(
|
7100 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7101 + | .put("disableDoubleEncoding", true)
|
7102 + | .put("signingName", "s3express".to_string())
|
7103 + | .put("signingRegion", "us-west-2".to_string())
|
8204 7104 | )
|
8205 7105 | .property("backend", "S3Express".to_string())
|
8206 7106 | .build()
|
8207 7107 | );
|
8208 7108 | }
|
8209 7109 |
|
8210 7110 | /// Data Plane with short zone fips
|
8211 7111 | #[test]
|
8212 7112 | fn test_285() {
|
8213 7113 | let params = crate::config::endpoint::Params::builder()
|
8214 7114 | .region("us-east-1".to_string())
|
8215 7115 | .bucket("mybucket--test-ab1--x-s3".to_string())
|
8216 7116 | .use_fips(true)
|
8217 7117 | .use_dual_stack(false)
|
8218 7118 | .accelerate(false)
|
8219 7119 | .use_s3_express_control_endpoint(false)
|
8220 7120 | .build()
|
8221 7121 | .expect("invalid params");
|
8222 7122 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8223 7123 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8224 7124 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--test-ab1--x-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com");
|
8225 7125 | assert_eq!(
|
8226 7126 | endpoint,
|
8227 7127 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8228 7128 | .url("https://mybucket--test-ab1--x-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com")
|
8229 - | .property(
|
8230 - | "authSchemes",
|
8231 - | vec![{
|
8232 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8233 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8234 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8235 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
8236 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8237 - | out
|
8238 - | }
|
8239 - | .into()]
|
7129 + | .auth_scheme(
|
7130 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7131 + | .put("disableDoubleEncoding", true)
|
7132 + | .put("signingName", "s3express".to_string())
|
7133 + | .put("signingRegion", "us-east-1".to_string())
|
8240 7134 | )
|
8241 7135 | .property("backend", "S3Express".to_string())
|
8242 7136 | .build()
|
8243 7137 | );
|
8244 7138 | }
|
8245 7139 |
|
8246 7140 | /// Data Plane with short zone fips china region
|
8247 7141 | #[test]
|
8248 7142 | fn test_286() {
|
8249 7143 | let params = crate::config::endpoint::Params::builder()
|
8250 7144 | .region("cn-north-1".to_string())
|
8251 7145 | .bucket("mybucket--test-ab1--x-s3".to_string())
|
8252 7146 | .use_fips(true)
|
8253 7147 | .use_dual_stack(false)
|
8254 7148 | .accelerate(false)
|
8255 7149 | .use_s3_express_control_endpoint(false)
|
8256 7150 | .build()
|
8257 7151 | .expect("invalid params");
|
8258 7152 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8259 7153 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8260 7154 | let error = endpoint.expect_err("expected error: Partition does not support FIPS [Data Plane with short zone fips china region]");
|
8261 7155 | assert_eq!(format!("{}", error), "Partition does not support FIPS")
|
8262 7156 | }
|
8263 7157 |
|
8264 7158 | /// Data Plane with short zone fips with AP
|
8265 7159 | #[test]
|
8266 7160 | fn test_287() {
|
8267 7161 | let params = crate::config::endpoint::Params::builder()
|
8268 7162 | .region("us-east-1".to_string())
|
8269 7163 | .bucket("myaccesspoint--test-ab1--xa-s3".to_string())
|
8270 7164 | .use_fips(true)
|
8271 7165 | .use_dual_stack(false)
|
8272 7166 | .accelerate(false)
|
8273 7167 | .use_s3_express_control_endpoint(false)
|
8274 7168 | .build()
|
8275 7169 | .expect("invalid params");
|
8276 7170 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8277 7171 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8278 7172 | let endpoint =
|
8279 7173 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--test-ab1--xa-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com");
|
8280 7174 | assert_eq!(
|
8281 7175 | endpoint,
|
8282 7176 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8283 7177 | .url("https://myaccesspoint--test-ab1--xa-s3.s3express-fips-test-ab1.us-east-1.amazonaws.com")
|
8284 - | .property(
|
8285 - | "authSchemes",
|
8286 - | vec![{
|
8287 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8288 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8289 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8290 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
8291 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8292 - | out
|
8293 - | }
|
8294 - | .into()]
|
7178 + | .auth_scheme(
|
7179 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7180 + | .put("disableDoubleEncoding", true)
|
7181 + | .put("signingName", "s3express".to_string())
|
7182 + | .put("signingRegion", "us-east-1".to_string())
|
8295 7183 | )
|
8296 7184 | .property("backend", "S3Express".to_string())
|
8297 7185 | .build()
|
8298 7186 | );
|
8299 7187 | }
|
8300 7188 |
|
8301 7189 | /// Data Plane with short zone fips with AP china region
|
8302 7190 | #[test]
|
8303 7191 | fn test_288() {
|
8304 7192 | let params = crate::config::endpoint::Params::builder()
|
8305 7193 | .region("cn-north-1".to_string())
|
8306 7194 | .bucket("myaccesspoint--test-ab1--xa-s3".to_string())
|
8307 7195 | .use_fips(true)
|
8308 7196 | .use_dual_stack(false)
|
8309 7197 | .accelerate(false)
|
8310 7198 | .use_s3_express_control_endpoint(false)
|
8311 7199 | .build()
|
8312 7200 | .expect("invalid params");
|
8313 7201 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8314 7202 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8315 7203 | let error = endpoint.expect_err("expected error: Partition does not support FIPS [Data Plane with short zone fips with AP china region]");
|
8316 7204 | assert_eq!(format!("{}", error), "Partition does not support FIPS")
|
8317 7205 | }
|
8318 7206 |
|
8319 7207 | /// Data Plane with short zone (13 chars) fips
|
8320 7208 | #[test]
|
8321 7209 | fn test_289() {
|
8322 7210 | let params = crate::config::endpoint::Params::builder()
|
8323 7211 | .region("us-west-2".to_string())
|
8324 7212 | .bucket("mybucket--test-zone-ab1--x-s3".to_string())
|
8325 7213 | .use_fips(true)
|
8326 7214 | .use_dual_stack(false)
|
8327 7215 | .accelerate(false)
|
8328 7216 | .use_s3_express_control_endpoint(false)
|
8329 7217 | .build()
|
8330 7218 | .expect("invalid params");
|
8331 7219 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8332 7220 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8333 7221 | let endpoint =
|
8334 7222 | endpoint.expect("Expected valid endpoint: https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com");
|
8335 7223 | assert_eq!(
|
8336 7224 | endpoint,
|
8337 7225 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8338 7226 | .url("https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com")
|
8339 - | .property(
|
8340 - | "authSchemes",
|
8341 - | vec![{
|
8342 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8343 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8344 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8345 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8346 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8347 - | out
|
8348 - | }
|
8349 - | .into()]
|
7227 + | .auth_scheme(
|
7228 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7229 + | .put("disableDoubleEncoding", true)
|
7230 + | .put("signingName", "s3express".to_string())
|
7231 + | .put("signingRegion", "us-west-2".to_string())
|
8350 7232 | )
|
8351 7233 | .property("backend", "S3Express".to_string())
|
8352 7234 | .build()
|
8353 7235 | );
|
8354 7236 | }
|
8355 7237 |
|
8356 7238 | /// Data Plane with short zone (13 chars) fips with AP
|
8357 7239 | #[test]
|
8358 7240 | fn test_290() {
|
8359 7241 | let params = crate::config::endpoint::Params::builder()
|
8360 7242 | .region("us-west-2".to_string())
|
8361 7243 | .bucket("myaccesspoint--test-zone-ab1--xa-s3".to_string())
|
8362 7244 | .use_fips(true)
|
8363 7245 | .use_dual_stack(false)
|
8364 7246 | .accelerate(false)
|
8365 7247 | .use_s3_express_control_endpoint(false)
|
8366 7248 | .build()
|
8367 7249 | .expect("invalid params");
|
8368 7250 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8369 7251 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8370 7252 | let endpoint = endpoint
|
8371 7253 | .expect("Expected valid endpoint: https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com");
|
8372 7254 | assert_eq!(
|
8373 7255 | endpoint,
|
8374 7256 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8375 7257 | .url("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com")
|
8376 - | .property(
|
8377 - | "authSchemes",
|
8378 - | vec![{
|
8379 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8380 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8381 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8382 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8383 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8384 - | out
|
8385 - | }
|
8386 - | .into()]
|
7258 + | .auth_scheme(
|
7259 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7260 + | .put("disableDoubleEncoding", true)
|
7261 + | .put("signingName", "s3express".to_string())
|
7262 + | .put("signingRegion", "us-west-2".to_string())
|
8387 7263 | )
|
8388 7264 | .property("backend", "S3Express".to_string())
|
8389 7265 | .build()
|
8390 7266 | );
|
8391 7267 | }
|
8392 7268 |
|
8393 7269 | /// Data Plane with medium zone (14 chars) fips
|
8394 7270 | #[test]
|
8395 7271 | fn test_291() {
|
8396 7272 | let params = crate::config::endpoint::Params::builder()
|
8397 7273 | .region("us-west-2".to_string())
|
8398 7274 | .bucket("mybucket--test1-zone-ab1--x-s3".to_string())
|
8399 7275 | .use_fips(true)
|
8400 7276 | .use_dual_stack(false)
|
8401 7277 | .accelerate(false)
|
8402 7278 | .use_s3_express_control_endpoint(false)
|
8403 7279 | .build()
|
8404 7280 | .expect("invalid params");
|
8405 7281 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8406 7282 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8407 7283 | let endpoint =
|
8408 7284 | endpoint.expect("Expected valid endpoint: https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com");
|
8409 7285 | assert_eq!(
|
8410 7286 | endpoint,
|
8411 7287 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8412 7288 | .url("https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com")
|
8413 - | .property(
|
8414 - | "authSchemes",
|
8415 - | vec![{
|
8416 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8417 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8418 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8419 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8420 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8421 - | out
|
8422 - | }
|
8423 - | .into()]
|
7289 + | .auth_scheme(
|
7290 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7291 + | .put("disableDoubleEncoding", true)
|
7292 + | .put("signingName", "s3express".to_string())
|
7293 + | .put("signingRegion", "us-west-2".to_string())
|
8424 7294 | )
|
8425 7295 | .property("backend", "S3Express".to_string())
|
8426 7296 | .build()
|
8427 7297 | );
|
8428 7298 | }
|
8429 7299 |
|
8430 7300 | /// Data Plane with medium zone (14 chars) fips with AP
|
8431 7301 | #[test]
|
8432 7302 | fn test_292() {
|
8433 7303 | let params = crate::config::endpoint::Params::builder()
|
8434 7304 | .region("us-west-2".to_string())
|
8435 7305 | .bucket("myaccesspoint--test1-zone-ab1--xa-s3".to_string())
|
8436 7306 | .use_fips(true)
|
8437 7307 | .use_dual_stack(false)
|
8438 7308 | .accelerate(false)
|
8439 7309 | .use_s3_express_control_endpoint(false)
|
8440 7310 | .build()
|
8441 7311 | .expect("invalid params");
|
8442 7312 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8443 7313 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8444 7314 | let endpoint = endpoint
|
8445 7315 | .expect("Expected valid endpoint: https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com");
|
8446 7316 | assert_eq!(
|
8447 7317 | endpoint,
|
8448 7318 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8449 7319 | .url("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com")
|
8450 - | .property(
|
8451 - | "authSchemes",
|
8452 - | vec![{
|
8453 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8454 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8455 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8456 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8457 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8458 - | out
|
8459 - | }
|
8460 - | .into()]
|
7320 + | .auth_scheme(
|
7321 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7322 + | .put("disableDoubleEncoding", true)
|
7323 + | .put("signingName", "s3express".to_string())
|
7324 + | .put("signingRegion", "us-west-2".to_string())
|
8461 7325 | )
|
8462 7326 | .property("backend", "S3Express".to_string())
|
8463 7327 | .build()
|
8464 7328 | );
|
8465 7329 | }
|
8466 7330 |
|
8467 7331 | /// Data Plane with long zone (20 chars) fips
|
8468 7332 | #[test]
|
8469 7333 | fn test_293() {
|
8470 7334 | let params = crate::config::endpoint::Params::builder()
|
8471 7335 | .region("us-west-2".to_string())
|
8472 7336 | .bucket("mybucket--test1-long1-zone-ab1--x-s3".to_string())
|
8473 7337 | .use_fips(true)
|
8474 7338 | .use_dual_stack(false)
|
8475 7339 | .accelerate(false)
|
8476 7340 | .use_s3_express_control_endpoint(false)
|
8477 7341 | .build()
|
8478 7342 | .expect("invalid params");
|
8479 7343 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8480 7344 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8481 7345 | let endpoint = endpoint.expect(
|
8482 7346 | "Expected valid endpoint: https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com",
|
8483 7347 | );
|
8484 7348 | assert_eq!(
|
8485 7349 | endpoint,
|
8486 7350 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8487 7351 | .url("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com")
|
8488 - | .property(
|
8489 - | "authSchemes",
|
8490 - | vec![{
|
8491 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8492 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8493 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8494 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8495 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8496 - | out
|
8497 - | }
|
8498 - | .into()]
|
7352 + | .auth_scheme(
|
7353 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7354 + | .put("disableDoubleEncoding", true)
|
7355 + | .put("signingName", "s3express".to_string())
|
7356 + | .put("signingRegion", "us-west-2".to_string())
|
8499 7357 | )
|
8500 7358 | .property("backend", "S3Express".to_string())
|
8501 7359 | .build()
|
8502 7360 | );
|
8503 7361 | }
|
8504 7362 |
|
8505 7363 | /// Data Plane with long zone (20 chars) fips with AP
|
8506 7364 | #[test]
|
8507 7365 | fn test_294() {
|
8508 7366 | let params = crate::config::endpoint::Params::builder()
|
8509 7367 | .region("us-west-2".to_string())
|
8510 7368 | .bucket("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_string())
|
8511 7369 | .use_fips(true)
|
8512 7370 | .use_dual_stack(false)
|
8513 7371 | .accelerate(false)
|
8514 7372 | .use_s3_express_control_endpoint(false)
|
8515 7373 | .build()
|
8516 7374 | .expect("invalid params");
|
8517 7375 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8518 7376 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8519 7377 | let endpoint = endpoint.expect(
|
8520 7378 | "Expected valid endpoint: https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com",
|
8521 7379 | );
|
8522 7380 | assert_eq!(
|
8523 7381 | endpoint,
|
8524 7382 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8525 7383 | .url("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com")
|
8526 - | .property(
|
8527 - | "authSchemes",
|
8528 - | vec![{
|
8529 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8530 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8531 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8532 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8533 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8534 - | out
|
8535 - | }
|
8536 - | .into()]
|
7384 + | .auth_scheme(
|
7385 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7386 + | .put("disableDoubleEncoding", true)
|
7387 + | .put("signingName", "s3express".to_string())
|
7388 + | .put("signingRegion", "us-west-2".to_string())
|
8537 7389 | )
|
8538 7390 | .property("backend", "S3Express".to_string())
|
8539 7391 | .build()
|
8540 7392 | );
|
8541 7393 | }
|
8542 7394 |
|
8543 7395 | /// Data Plane with long AZ
|
8544 7396 | #[test]
|
8545 7397 | fn test_295() {
|
8546 7398 | let params = crate::config::endpoint::Params::builder()
|
8547 7399 | .region("us-west-2".to_string())
|
8548 7400 | .bucket("mybucket--test1-az1--x-s3".to_string())
|
8549 7401 | .use_fips(false)
|
8550 7402 | .use_dual_stack(false)
|
8551 7403 | .accelerate(false)
|
8552 7404 | .use_s3_express_control_endpoint(false)
|
8553 7405 | .build()
|
8554 7406 | .expect("invalid params");
|
8555 7407 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8556 7408 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8557 7409 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com");
|
8558 7410 | assert_eq!(
|
8559 7411 | endpoint,
|
8560 7412 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8561 7413 | .url("https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com")
|
8562 - | .property(
|
8563 - | "authSchemes",
|
8564 - | vec![{
|
8565 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8566 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8567 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8568 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8569 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8570 - | out
|
8571 - | }
|
8572 - | .into()]
|
7414 + | .auth_scheme(
|
7415 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7416 + | .put("disableDoubleEncoding", true)
|
7417 + | .put("signingName", "s3express".to_string())
|
7418 + | .put("signingRegion", "us-west-2".to_string())
|
8573 7419 | )
|
8574 7420 | .property("backend", "S3Express".to_string())
|
8575 7421 | .build()
|
8576 7422 | );
|
8577 7423 | }
|
8578 7424 |
|
8579 7425 | /// Data Plane with long AZ with AP
|
8580 7426 | #[test]
|
8581 7427 | fn test_296() {
|
8582 7428 | let params = crate::config::endpoint::Params::builder()
|
8583 7429 | .region("us-west-2".to_string())
|
8584 7430 | .bucket("myaccesspoint--test1-az1--xa-s3".to_string())
|
8585 7431 | .use_fips(false)
|
8586 7432 | .use_dual_stack(false)
|
8587 7433 | .accelerate(false)
|
8588 7434 | .use_s3_express_control_endpoint(false)
|
8589 7435 | .build()
|
8590 7436 | .expect("invalid params");
|
8591 7437 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8592 7438 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8593 7439 | let endpoint =
|
8594 7440 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com");
|
8595 7441 | assert_eq!(
|
8596 7442 | endpoint,
|
8597 7443 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8598 7444 | .url("https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com")
|
8599 - | .property(
|
8600 - | "authSchemes",
|
8601 - | vec![{
|
8602 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8603 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8604 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8605 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8606 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8607 - | out
|
8608 - | }
|
8609 - | .into()]
|
7445 + | .auth_scheme(
|
7446 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7447 + | .put("disableDoubleEncoding", true)
|
7448 + | .put("signingName", "s3express".to_string())
|
7449 + | .put("signingRegion", "us-west-2".to_string())
|
8610 7450 | )
|
8611 7451 | .property("backend", "S3Express".to_string())
|
8612 7452 | .build()
|
8613 7453 | );
|
8614 7454 | }
|
8615 7455 |
|
8616 7456 | /// Data Plane with long AZ fips
|
8617 7457 | #[test]
|
8618 7458 | fn test_297() {
|
8619 7459 | let params = crate::config::endpoint::Params::builder()
|
8620 7460 | .region("us-west-2".to_string())
|
8621 7461 | .bucket("mybucket--test1-az1--x-s3".to_string())
|
8622 7462 | .use_fips(true)
|
8623 7463 | .use_dual_stack(false)
|
8624 7464 | .accelerate(false)
|
8625 7465 | .use_s3_express_control_endpoint(false)
|
8626 7466 | .build()
|
8627 7467 | .expect("invalid params");
|
8628 7468 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8629 7469 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8630 7470 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com");
|
8631 7471 | assert_eq!(
|
8632 7472 | endpoint,
|
8633 7473 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8634 7474 | .url("https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com")
|
8635 - | .property(
|
8636 - | "authSchemes",
|
8637 - | vec![{
|
8638 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8639 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8640 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8641 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8642 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8643 - | out
|
8644 - | }
|
8645 - | .into()]
|
7475 + | .auth_scheme(
|
7476 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7477 + | .put("disableDoubleEncoding", true)
|
7478 + | .put("signingName", "s3express".to_string())
|
7479 + | .put("signingRegion", "us-west-2".to_string())
|
8646 7480 | )
|
8647 7481 | .property("backend", "S3Express".to_string())
|
8648 7482 | .build()
|
8649 7483 | );
|
8650 7484 | }
|
8651 7485 |
|
8652 7486 | /// Data Plane with long AZ fips with AP
|
8653 7487 | #[test]
|
8654 7488 | fn test_298() {
|
8655 7489 | let params = crate::config::endpoint::Params::builder()
|
8656 7490 | .region("us-west-2".to_string())
|
8657 7491 | .bucket("myaccesspoint--test1-az1--xa-s3".to_string())
|
8658 7492 | .use_fips(true)
|
8659 7493 | .use_dual_stack(false)
|
8660 7494 | .accelerate(false)
|
8661 7495 | .use_s3_express_control_endpoint(false)
|
8662 7496 | .build()
|
8663 7497 | .expect("invalid params");
|
8664 7498 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8665 7499 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8666 7500 | let endpoint =
|
8667 7501 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com");
|
8668 7502 | assert_eq!(
|
8669 7503 | endpoint,
|
8670 7504 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8671 7505 | .url("https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com")
|
8672 - | .property(
|
8673 - | "authSchemes",
|
8674 - | vec![{
|
8675 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8676 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
8677 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8678 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8679 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8680 - | out
|
8681 - | }
|
8682 - | .into()]
|
7506 + | .auth_scheme(
|
7507 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
7508 + | .put("disableDoubleEncoding", true)
|
7509 + | .put("signingName", "s3express".to_string())
|
7510 + | .put("signingRegion", "us-west-2".to_string())
|
8683 7511 | )
|
8684 7512 | .property("backend", "S3Express".to_string())
|
8685 7513 | .build()
|
8686 7514 | );
|
8687 7515 | }
|
8688 7516 |
|
8689 7517 | /// Control plane with short AZ bucket
|
8690 7518 | #[test]
|
8691 7519 | fn test_299() {
|
8692 7520 | let params = crate::config::endpoint::Params::builder()
|
8693 7521 | .region("us-east-1".to_string())
|
8694 7522 | .bucket("mybucket--test-ab1--x-s3".to_string())
|
8695 7523 | .use_fips(false)
|
8696 7524 | .use_dual_stack(false)
|
8697 7525 | .accelerate(false)
|
8698 7526 | .use_s3_express_control_endpoint(true)
|
8699 7527 | .disable_s3_express_session_auth(false)
|
8700 7528 | .build()
|
8701 7529 | .expect("invalid params");
|
8702 7530 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8703 7531 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8704 7532 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3express-control.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3");
|
8705 7533 | assert_eq!(
|
8706 7534 | endpoint,
|
8707 7535 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8708 7536 | .url("https://s3express-control.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3")
|
8709 - | .property(
|
8710 - | "authSchemes",
|
8711 - | vec![{
|
8712 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8713 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
8714 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8715 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
8716 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8717 - | out
|
8718 - | }
|
8719 - | .into()]
|
7537 + | .auth_scheme(
|
7538 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7539 + | .put("disableDoubleEncoding", true)
|
7540 + | .put("signingName", "s3express".to_string())
|
7541 + | .put("signingRegion", "us-east-1".to_string())
|
8720 7542 | )
|
8721 7543 | .property("backend", "S3Express".to_string())
|
8722 7544 | .build()
|
8723 7545 | );
|
8724 7546 | }
|
8725 7547 |
|
8726 7548 | /// Control plane with short AZ bucket china region
|
8727 7549 | #[test]
|
8728 7550 | fn test_300() {
|
8729 7551 | let params = crate::config::endpoint::Params::builder()
|
8730 7552 | .region("cn-north-1".to_string())
|
8731 7553 | .bucket("mybucket--test-ab1--x-s3".to_string())
|
8732 7554 | .use_fips(false)
|
8733 7555 | .use_dual_stack(false)
|
8734 7556 | .accelerate(false)
|
8735 7557 | .use_s3_express_control_endpoint(true)
|
8736 7558 | .disable_s3_express_session_auth(false)
|
8737 7559 | .build()
|
8738 7560 | .expect("invalid params");
|
8739 7561 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8740 7562 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8741 7563 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3express-control.cn-north-1.amazonaws.com.cn/mybucket--test-ab1--x-s3");
|
8742 7564 | assert_eq!(
|
8743 7565 | endpoint,
|
8744 7566 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8745 7567 | .url("https://s3express-control.cn-north-1.amazonaws.com.cn/mybucket--test-ab1--x-s3")
|
8746 - | .property(
|
8747 - | "authSchemes",
|
8748 - | vec![{
|
8749 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8750 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
8751 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8752 - | out.insert("signingRegion".to_string(), "cn-north-1".to_string().into());
|
8753 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8754 - | out
|
8755 - | }
|
8756 - | .into()]
|
7568 + | .auth_scheme(
|
7569 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7570 + | .put("disableDoubleEncoding", true)
|
7571 + | .put("signingName", "s3express".to_string())
|
7572 + | .put("signingRegion", "cn-north-1".to_string())
|
8757 7573 | )
|
8758 7574 | .property("backend", "S3Express".to_string())
|
8759 7575 | .build()
|
8760 7576 | );
|
8761 7577 | }
|
8762 7578 |
|
8763 7579 | /// Control plane with short AZ bucket and fips
|
8764 7580 | #[test]
|
8765 7581 | fn test_301() {
|
8766 7582 | let params = crate::config::endpoint::Params::builder()
|
8767 7583 | .region("us-east-1".to_string())
|
8768 7584 | .bucket("mybucket--test-ab1--x-s3".to_string())
|
8769 7585 | .use_fips(true)
|
8770 7586 | .use_dual_stack(false)
|
8771 7587 | .accelerate(false)
|
8772 7588 | .use_s3_express_control_endpoint(true)
|
8773 7589 | .disable_s3_express_session_auth(false)
|
8774 7590 | .build()
|
8775 7591 | .expect("invalid params");
|
8776 7592 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8777 7593 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8778 7594 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3express-control-fips.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3");
|
8779 7595 | assert_eq!(
|
8780 7596 | endpoint,
|
8781 7597 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8782 7598 | .url("https://s3express-control-fips.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3")
|
8783 - | .property(
|
8784 - | "authSchemes",
|
8785 - | vec![{
|
8786 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8787 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
8788 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8789 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
8790 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8791 - | out
|
8792 - | }
|
8793 - | .into()]
|
7599 + | .auth_scheme(
|
7600 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7601 + | .put("disableDoubleEncoding", true)
|
7602 + | .put("signingName", "s3express".to_string())
|
7603 + | .put("signingRegion", "us-east-1".to_string())
|
8794 7604 | )
|
8795 7605 | .property("backend", "S3Express".to_string())
|
8796 7606 | .build()
|
8797 7607 | );
|
8798 7608 | }
|
8799 7609 |
|
8800 7610 | /// Control plane with short AZ bucket and fips china region
|
8801 7611 | #[test]
|
8802 7612 | fn test_302() {
|
8803 7613 | let params = crate::config::endpoint::Params::builder()
|
8804 7614 | .region("cn-north-1".to_string())
|
8805 7615 | .bucket("mybucket--test-ab1--x-s3".to_string())
|
8806 7616 | .use_fips(true)
|
8807 7617 | .use_dual_stack(false)
|
8808 7618 | .accelerate(false)
|
8809 7619 | .use_s3_express_control_endpoint(true)
|
8810 7620 | .disable_s3_express_session_auth(false)
|
8811 7621 | .build()
|
8812 7622 | .expect("invalid params");
|
8813 7623 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8814 7624 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8815 7625 | let error = endpoint.expect_err("expected error: Partition does not support FIPS [Control plane with short AZ bucket and fips china region]");
|
8816 7626 | assert_eq!(format!("{}", error), "Partition does not support FIPS")
|
8817 7627 | }
|
8818 7628 |
|
8819 7629 | /// Control plane without bucket
|
8820 7630 | #[test]
|
8821 7631 | fn test_303() {
|
8822 7632 | let params = crate::config::endpoint::Params::builder()
|
8823 7633 | .region("us-east-1".to_string())
|
8824 7634 | .use_fips(false)
|
8825 7635 | .use_dual_stack(false)
|
8826 7636 | .accelerate(false)
|
8827 7637 | .use_s3_express_control_endpoint(true)
|
8828 7638 | .disable_s3_express_session_auth(false)
|
8829 7639 | .build()
|
8830 7640 | .expect("invalid params");
|
8831 7641 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8832 7642 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8833 7643 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3express-control.us-east-1.amazonaws.com");
|
8834 7644 | assert_eq!(
|
8835 7645 | endpoint,
|
8836 7646 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8837 7647 | .url("https://s3express-control.us-east-1.amazonaws.com")
|
8838 - | .property(
|
8839 - | "authSchemes",
|
8840 - | vec![{
|
8841 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8842 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
8843 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8844 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
8845 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8846 - | out
|
8847 - | }
|
8848 - | .into()]
|
7648 + | .auth_scheme(
|
7649 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7650 + | .put("disableDoubleEncoding", true)
|
7651 + | .put("signingName", "s3express".to_string())
|
7652 + | .put("signingRegion", "us-east-1".to_string())
|
8849 7653 | )
|
8850 7654 | .property("backend", "S3Express".to_string())
|
8851 7655 | .build()
|
8852 7656 | );
|
8853 7657 | }
|
8854 7658 |
|
8855 7659 | /// Control plane without bucket and fips
|
8856 7660 | #[test]
|
8857 7661 | fn test_304() {
|
8858 7662 | let params = crate::config::endpoint::Params::builder()
|
8859 7663 | .region("us-east-1".to_string())
|
8860 7664 | .use_fips(true)
|
8861 7665 | .use_dual_stack(false)
|
8862 7666 | .accelerate(false)
|
8863 7667 | .use_s3_express_control_endpoint(true)
|
8864 7668 | .disable_s3_express_session_auth(false)
|
8865 7669 | .build()
|
8866 7670 | .expect("invalid params");
|
8867 7671 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8868 7672 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8869 7673 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3express-control-fips.us-east-1.amazonaws.com");
|
8870 7674 | assert_eq!(
|
8871 7675 | endpoint,
|
8872 7676 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8873 7677 | .url("https://s3express-control-fips.us-east-1.amazonaws.com")
|
8874 - | .property(
|
8875 - | "authSchemes",
|
8876 - | vec![{
|
8877 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8878 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
8879 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8880 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
8881 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8882 - | out
|
8883 - | }
|
8884 - | .into()]
|
7678 + | .auth_scheme(
|
7679 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7680 + | .put("disableDoubleEncoding", true)
|
7681 + | .put("signingName", "s3express".to_string())
|
7682 + | .put("signingRegion", "us-east-1".to_string())
|
8885 7683 | )
|
8886 7684 | .property("backend", "S3Express".to_string())
|
8887 7685 | .build()
|
8888 7686 | );
|
8889 7687 | }
|
8890 7688 |
|
8891 7689 | /// Data Plane sigv4 auth with short AZ
|
8892 7690 | #[test]
|
8893 7691 | fn test_305() {
|
8894 7692 | let params = crate::config::endpoint::Params::builder()
|
8895 7693 | .region("us-west-2".to_string())
|
8896 7694 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
8897 7695 | .use_fips(false)
|
8898 7696 | .use_dual_stack(false)
|
8899 7697 | .accelerate(false)
|
8900 7698 | .disable_s3_express_session_auth(true)
|
8901 7699 | .build()
|
8902 7700 | .expect("invalid params");
|
8903 7701 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8904 7702 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8905 7703 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.us-west-2.amazonaws.com");
|
8906 7704 | assert_eq!(
|
8907 7705 | endpoint,
|
8908 7706 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8909 7707 | .url("https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.us-west-2.amazonaws.com")
|
8910 - | .property(
|
8911 - | "authSchemes",
|
8912 - | vec![{
|
8913 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8914 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
8915 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8916 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8917 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8918 - | out
|
8919 - | }
|
8920 - | .into()]
|
7708 + | .auth_scheme(
|
7709 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7710 + | .put("disableDoubleEncoding", true)
|
7711 + | .put("signingName", "s3express".to_string())
|
7712 + | .put("signingRegion", "us-west-2".to_string())
|
8921 7713 | )
|
8922 7714 | .property("backend", "S3Express".to_string())
|
8923 7715 | .build()
|
8924 7716 | );
|
8925 7717 | }
|
8926 7718 |
|
8927 7719 | /// Data Plane sigv4 auth with short AZ with AP
|
8928 7720 | #[test]
|
8929 7721 | fn test_306() {
|
8930 7722 | let params = crate::config::endpoint::Params::builder()
|
8931 7723 | .region("us-west-2".to_string())
|
8932 7724 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
8933 7725 | .use_fips(false)
|
8934 7726 | .use_dual_stack(false)
|
8935 7727 | .accelerate(false)
|
8936 7728 | .disable_s3_express_session_auth(true)
|
8937 7729 | .build()
|
8938 7730 | .expect("invalid params");
|
8939 7731 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8940 7732 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8941 7733 | let endpoint = endpoint.expect("Expected valid endpoint: https://myaccesspoint--usw2-az1--xa-s3.s3express-usw2-az1.us-west-2.amazonaws.com");
|
8942 7734 | assert_eq!(
|
8943 7735 | endpoint,
|
8944 7736 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8945 7737 | .url("https://myaccesspoint--usw2-az1--xa-s3.s3express-usw2-az1.us-west-2.amazonaws.com")
|
8946 - | .property(
|
8947 - | "authSchemes",
|
8948 - | vec![{
|
8949 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8950 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
8951 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8952 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8953 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8954 - | out
|
8955 - | }
|
8956 - | .into()]
|
7738 + | .auth_scheme(
|
7739 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7740 + | .put("disableDoubleEncoding", true)
|
7741 + | .put("signingName", "s3express".to_string())
|
7742 + | .put("signingRegion", "us-west-2".to_string())
|
8957 7743 | )
|
8958 7744 | .property("backend", "S3Express".to_string())
|
8959 7745 | .build()
|
8960 7746 | );
|
8961 7747 | }
|
8962 7748 |
|
8963 7749 | /// Data Plane sigv4 auth with short zone (13 chars)
|
8964 7750 | #[test]
|
8965 7751 | fn test_307() {
|
8966 7752 | let params = crate::config::endpoint::Params::builder()
|
8967 7753 | .region("us-west-2".to_string())
|
8968 7754 | .bucket("mybucket--test-zone-ab1--x-s3".to_string())
|
8969 7755 | .use_fips(false)
|
8970 7756 | .use_dual_stack(false)
|
8971 7757 | .accelerate(false)
|
8972 7758 | .disable_s3_express_session_auth(true)
|
8973 7759 | .build()
|
8974 7760 | .expect("invalid params");
|
8975 7761 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
8976 7762 | let endpoint = resolver.resolve_endpoint(¶ms);
|
8977 7763 | let endpoint =
|
8978 7764 | endpoint.expect("Expected valid endpoint: https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com");
|
8979 7765 | assert_eq!(
|
8980 7766 | endpoint,
|
8981 7767 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
8982 7768 | .url("https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com")
|
8983 - | .property(
|
8984 - | "authSchemes",
|
8985 - | vec![{
|
8986 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
8987 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
8988 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
8989 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
8990 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
8991 - | out
|
8992 - | }
|
8993 - | .into()]
|
7769 + | .auth_scheme(
|
7770 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7771 + | .put("disableDoubleEncoding", true)
|
7772 + | .put("signingName", "s3express".to_string())
|
7773 + | .put("signingRegion", "us-west-2".to_string())
|
8994 7774 | )
|
8995 7775 | .property("backend", "S3Express".to_string())
|
8996 7776 | .build()
|
8997 7777 | );
|
8998 7778 | }
|
8999 7779 |
|
9000 7780 | /// Data Plane sigv4 auth with short zone (13 chars) with AP
|
9001 7781 | #[test]
|
9002 7782 | fn test_308() {
|
9003 7783 | let params = crate::config::endpoint::Params::builder()
|
9004 7784 | .region("us-west-2".to_string())
|
9005 7785 | .bucket("myaccesspoint--test-zone-ab1--xa-s3".to_string())
|
9006 7786 | .use_fips(false)
|
9007 7787 | .use_dual_stack(false)
|
9008 7788 | .accelerate(false)
|
9009 7789 | .disable_s3_express_session_auth(true)
|
9010 7790 | .build()
|
9011 7791 | .expect("invalid params");
|
9012 7792 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9013 7793 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9014 7794 | let endpoint =
|
9015 7795 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com");
|
9016 7796 | assert_eq!(
|
9017 7797 | endpoint,
|
9018 7798 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9019 7799 | .url("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.us-west-2.amazonaws.com")
|
9020 - | .property(
|
9021 - | "authSchemes",
|
9022 - | vec![{
|
9023 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9024 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9025 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9026 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9027 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9028 - | out
|
9029 - | }
|
9030 - | .into()]
|
7800 + | .auth_scheme(
|
7801 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7802 + | .put("disableDoubleEncoding", true)
|
7803 + | .put("signingName", "s3express".to_string())
|
7804 + | .put("signingRegion", "us-west-2".to_string())
|
9031 7805 | )
|
9032 7806 | .property("backend", "S3Express".to_string())
|
9033 7807 | .build()
|
9034 7808 | );
|
9035 7809 | }
|
9036 7810 |
|
9037 7811 | /// Data Plane sigv4 auth with short AZ fips
|
9038 7812 | #[test]
|
9039 7813 | fn test_309() {
|
9040 7814 | let params = crate::config::endpoint::Params::builder()
|
9041 7815 | .region("us-west-2".to_string())
|
9042 7816 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
9043 7817 | .use_fips(true)
|
9044 7818 | .use_dual_stack(false)
|
9045 7819 | .accelerate(false)
|
9046 7820 | .disable_s3_express_session_auth(true)
|
9047 7821 | .build()
|
9048 7822 | .expect("invalid params");
|
9049 7823 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9050 7824 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9051 7825 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com");
|
9052 7826 | assert_eq!(
|
9053 7827 | endpoint,
|
9054 7828 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9055 7829 | .url("https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com")
|
9056 - | .property(
|
9057 - | "authSchemes",
|
9058 - | vec![{
|
9059 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9060 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9061 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9062 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9063 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9064 - | out
|
9065 - | }
|
9066 - | .into()]
|
7830 + | .auth_scheme(
|
7831 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7832 + | .put("disableDoubleEncoding", true)
|
7833 + | .put("signingName", "s3express".to_string())
|
7834 + | .put("signingRegion", "us-west-2".to_string())
|
9067 7835 | )
|
9068 7836 | .property("backend", "S3Express".to_string())
|
9069 7837 | .build()
|
9070 7838 | );
|
9071 7839 | }
|
9072 7840 |
|
9073 7841 | /// Data Plane sigv4 auth with short AZ fips with AP
|
9074 7842 | #[test]
|
9075 7843 | fn test_310() {
|
9076 7844 | let params = crate::config::endpoint::Params::builder()
|
9077 7845 | .region("us-west-2".to_string())
|
9078 7846 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
9079 7847 | .use_fips(true)
|
9080 7848 | .use_dual_stack(false)
|
9081 7849 | .accelerate(false)
|
9082 7850 | .disable_s3_express_session_auth(true)
|
9083 7851 | .build()
|
9084 7852 | .expect("invalid params");
|
9085 7853 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9086 7854 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9087 7855 | let endpoint =
|
9088 7856 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--usw2-az1--xa-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com");
|
9089 7857 | assert_eq!(
|
9090 7858 | endpoint,
|
9091 7859 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9092 7860 | .url("https://myaccesspoint--usw2-az1--xa-s3.s3express-fips-usw2-az1.us-west-2.amazonaws.com")
|
9093 - | .property(
|
9094 - | "authSchemes",
|
9095 - | vec![{
|
9096 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9097 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9098 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9099 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9100 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9101 - | out
|
9102 - | }
|
9103 - | .into()]
|
7861 + | .auth_scheme(
|
7862 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7863 + | .put("disableDoubleEncoding", true)
|
7864 + | .put("signingName", "s3express".to_string())
|
7865 + | .put("signingRegion", "us-west-2".to_string())
|
9104 7866 | )
|
9105 7867 | .property("backend", "S3Express".to_string())
|
9106 7868 | .build()
|
9107 7869 | );
|
9108 7870 | }
|
9109 7871 |
|
9110 7872 | /// Data Plane sigv4 auth with short zone (13 chars) fips
|
9111 7873 | #[test]
|
9112 7874 | fn test_311() {
|
9113 7875 | let params = crate::config::endpoint::Params::builder()
|
9114 7876 | .region("us-west-2".to_string())
|
9115 7877 | .bucket("mybucket--test-zone-ab1--x-s3".to_string())
|
9116 7878 | .use_fips(true)
|
9117 7879 | .use_dual_stack(false)
|
9118 7880 | .accelerate(false)
|
9119 7881 | .disable_s3_express_session_auth(true)
|
9120 7882 | .build()
|
9121 7883 | .expect("invalid params");
|
9122 7884 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9123 7885 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9124 7886 | let endpoint =
|
9125 7887 | endpoint.expect("Expected valid endpoint: https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com");
|
9126 7888 | assert_eq!(
|
9127 7889 | endpoint,
|
9128 7890 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9129 7891 | .url("https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com")
|
9130 - | .property(
|
9131 - | "authSchemes",
|
9132 - | vec![{
|
9133 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9134 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9135 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9136 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9137 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9138 - | out
|
9139 - | }
|
9140 - | .into()]
|
7892 + | .auth_scheme(
|
7893 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7894 + | .put("disableDoubleEncoding", true)
|
7895 + | .put("signingName", "s3express".to_string())
|
7896 + | .put("signingRegion", "us-west-2".to_string())
|
9141 7897 | )
|
9142 7898 | .property("backend", "S3Express".to_string())
|
9143 7899 | .build()
|
9144 7900 | );
|
9145 7901 | }
|
9146 7902 |
|
9147 7903 | /// Data Plane sigv4 auth with short zone (13 chars) fips with AP
|
9148 7904 | #[test]
|
9149 7905 | fn test_312() {
|
9150 7906 | let params = crate::config::endpoint::Params::builder()
|
9151 7907 | .region("us-west-2".to_string())
|
9152 7908 | .bucket("myaccesspoint--test-zone-ab1--xa-s3".to_string())
|
9153 7909 | .use_fips(true)
|
9154 7910 | .use_dual_stack(false)
|
9155 7911 | .accelerate(false)
|
9156 7912 | .disable_s3_express_session_auth(true)
|
9157 7913 | .build()
|
9158 7914 | .expect("invalid params");
|
9159 7915 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9160 7916 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9161 7917 | let endpoint = endpoint
|
9162 7918 | .expect("Expected valid endpoint: https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com");
|
9163 7919 | assert_eq!(
|
9164 7920 | endpoint,
|
9165 7921 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9166 7922 | .url("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.us-west-2.amazonaws.com")
|
9167 - | .property(
|
9168 - | "authSchemes",
|
9169 - | vec![{
|
9170 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9171 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9172 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9173 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9174 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9175 - | out
|
9176 - | }
|
9177 - | .into()]
|
7923 + | .auth_scheme(
|
7924 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7925 + | .put("disableDoubleEncoding", true)
|
7926 + | .put("signingName", "s3express".to_string())
|
7927 + | .put("signingRegion", "us-west-2".to_string())
|
9178 7928 | )
|
9179 7929 | .property("backend", "S3Express".to_string())
|
9180 7930 | .build()
|
9181 7931 | );
|
9182 7932 | }
|
9183 7933 |
|
9184 7934 | /// Data Plane sigv4 auth with long AZ
|
9185 7935 | #[test]
|
9186 7936 | fn test_313() {
|
9187 7937 | let params = crate::config::endpoint::Params::builder()
|
9188 7938 | .region("us-west-2".to_string())
|
9189 7939 | .bucket("mybucket--test1-az1--x-s3".to_string())
|
9190 7940 | .use_fips(false)
|
9191 7941 | .use_dual_stack(false)
|
9192 7942 | .accelerate(false)
|
9193 7943 | .use_s3_express_control_endpoint(false)
|
9194 7944 | .disable_s3_express_session_auth(true)
|
9195 7945 | .build()
|
9196 7946 | .expect("invalid params");
|
9197 7947 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9198 7948 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9199 7949 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com");
|
9200 7950 | assert_eq!(
|
9201 7951 | endpoint,
|
9202 7952 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9203 7953 | .url("https://mybucket--test1-az1--x-s3.s3express-test1-az1.us-west-2.amazonaws.com")
|
9204 - | .property(
|
9205 - | "authSchemes",
|
9206 - | vec![{
|
9207 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9208 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9209 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9210 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9211 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9212 - | out
|
9213 - | }
|
9214 - | .into()]
|
7954 + | .auth_scheme(
|
7955 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7956 + | .put("disableDoubleEncoding", true)
|
7957 + | .put("signingName", "s3express".to_string())
|
7958 + | .put("signingRegion", "us-west-2".to_string())
|
9215 7959 | )
|
9216 7960 | .property("backend", "S3Express".to_string())
|
9217 7961 | .build()
|
9218 7962 | );
|
9219 7963 | }
|
9220 7964 |
|
9221 7965 | /// Data Plane sigv4 auth with long AZ with AP
|
9222 7966 | #[test]
|
9223 7967 | fn test_314() {
|
9224 7968 | let params = crate::config::endpoint::Params::builder()
|
9225 7969 | .region("us-west-2".to_string())
|
9226 7970 | .bucket("myaccesspoint--test1-az1--xa-s3".to_string())
|
9227 7971 | .use_fips(false)
|
9228 7972 | .use_dual_stack(false)
|
9229 7973 | .accelerate(false)
|
9230 7974 | .use_s3_express_control_endpoint(false)
|
9231 7975 | .disable_s3_express_session_auth(true)
|
9232 7976 | .build()
|
9233 7977 | .expect("invalid params");
|
9234 7978 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9235 7979 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9236 7980 | let endpoint =
|
9237 7981 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com");
|
9238 7982 | assert_eq!(
|
9239 7983 | endpoint,
|
9240 7984 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9241 7985 | .url("https://myaccesspoint--test1-az1--xa-s3.s3express-test1-az1.us-west-2.amazonaws.com")
|
9242 - | .property(
|
9243 - | "authSchemes",
|
9244 - | vec![{
|
9245 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9246 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9247 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9248 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9249 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9250 - | out
|
9251 - | }
|
9252 - | .into()]
|
7986 + | .auth_scheme(
|
7987 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
7988 + | .put("disableDoubleEncoding", true)
|
7989 + | .put("signingName", "s3express".to_string())
|
7990 + | .put("signingRegion", "us-west-2".to_string())
|
9253 7991 | )
|
9254 7992 | .property("backend", "S3Express".to_string())
|
9255 7993 | .build()
|
9256 7994 | );
|
9257 7995 | }
|
9258 7996 |
|
9259 7997 | /// Data Plane sigv4 auth with medium zone(14 chars)
|
9260 7998 | #[test]
|
9261 7999 | fn test_315() {
|
9262 8000 | let params = crate::config::endpoint::Params::builder()
|
9263 8001 | .region("us-west-2".to_string())
|
9264 8002 | .bucket("mybucket--test1-zone-ab1--x-s3".to_string())
|
9265 8003 | .use_fips(false)
|
9266 8004 | .use_dual_stack(false)
|
9267 8005 | .accelerate(false)
|
9268 8006 | .use_s3_express_control_endpoint(false)
|
9269 8007 | .disable_s3_express_session_auth(true)
|
9270 8008 | .build()
|
9271 8009 | .expect("invalid params");
|
9272 8010 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9273 8011 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9274 8012 | let endpoint =
|
9275 8013 | endpoint.expect("Expected valid endpoint: https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com");
|
9276 8014 | assert_eq!(
|
9277 8015 | endpoint,
|
9278 8016 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9279 8017 | .url("https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com")
|
9280 - | .property(
|
9281 - | "authSchemes",
|
9282 - | vec![{
|
9283 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9284 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9285 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9286 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9287 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9288 - | out
|
9289 - | }
|
9290 - | .into()]
|
8018 + | .auth_scheme(
|
8019 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8020 + | .put("disableDoubleEncoding", true)
|
8021 + | .put("signingName", "s3express".to_string())
|
8022 + | .put("signingRegion", "us-west-2".to_string())
|
9291 8023 | )
|
9292 8024 | .property("backend", "S3Express".to_string())
|
9293 8025 | .build()
|
9294 8026 | );
|
9295 8027 | }
|
9296 8028 |
|
9297 8029 | /// Data Plane sigv4 auth with medium zone(14 chars) with AP
|
9298 8030 | #[test]
|
9299 8031 | fn test_316() {
|
9300 8032 | let params = crate::config::endpoint::Params::builder()
|
9301 8033 | .region("us-west-2".to_string())
|
9302 8034 | .bucket("myaccesspoint--test1-zone-ab1--xa-s3".to_string())
|
9303 8035 | .use_fips(false)
|
9304 8036 | .use_dual_stack(false)
|
9305 8037 | .accelerate(false)
|
9306 8038 | .use_s3_express_control_endpoint(false)
|
9307 8039 | .disable_s3_express_session_auth(true)
|
9308 8040 | .build()
|
9309 8041 | .expect("invalid params");
|
9310 8042 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9311 8043 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9312 8044 | let endpoint =
|
9313 8045 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com");
|
9314 8046 | assert_eq!(
|
9315 8047 | endpoint,
|
9316 8048 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9317 8049 | .url("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.us-west-2.amazonaws.com")
|
9318 - | .property(
|
9319 - | "authSchemes",
|
9320 - | vec![{
|
9321 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9322 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9323 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9324 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9325 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9326 - | out
|
9327 - | }
|
9328 - | .into()]
|
8050 + | .auth_scheme(
|
8051 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8052 + | .put("disableDoubleEncoding", true)
|
8053 + | .put("signingName", "s3express".to_string())
|
8054 + | .put("signingRegion", "us-west-2".to_string())
|
9329 8055 | )
|
9330 8056 | .property("backend", "S3Express".to_string())
|
9331 8057 | .build()
|
9332 8058 | );
|
9333 8059 | }
|
9334 8060 |
|
9335 8061 | /// Data Plane sigv4 auth with long zone(20 chars)
|
9336 8062 | #[test]
|
9337 8063 | fn test_317() {
|
9338 8064 | let params = crate::config::endpoint::Params::builder()
|
9339 8065 | .region("us-west-2".to_string())
|
9340 8066 | .bucket("mybucket--test1-long1-zone-ab1--x-s3".to_string())
|
9341 8067 | .use_fips(false)
|
9342 8068 | .use_dual_stack(false)
|
9343 8069 | .accelerate(false)
|
9344 8070 | .use_s3_express_control_endpoint(false)
|
9345 8071 | .disable_s3_express_session_auth(true)
|
9346 8072 | .build()
|
9347 8073 | .expect("invalid params");
|
9348 8074 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9349 8075 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9350 8076 | let endpoint = endpoint
|
9351 8077 | .expect("Expected valid endpoint: https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com");
|
9352 8078 | assert_eq!(
|
9353 8079 | endpoint,
|
9354 8080 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9355 8081 | .url("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com")
|
9356 - | .property(
|
9357 - | "authSchemes",
|
9358 - | vec![{
|
9359 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9360 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9361 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9362 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9363 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9364 - | out
|
9365 - | }
|
9366 - | .into()]
|
8082 + | .auth_scheme(
|
8083 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8084 + | .put("disableDoubleEncoding", true)
|
8085 + | .put("signingName", "s3express".to_string())
|
8086 + | .put("signingRegion", "us-west-2".to_string())
|
9367 8087 | )
|
9368 8088 | .property("backend", "S3Express".to_string())
|
9369 8089 | .build()
|
9370 8090 | );
|
9371 8091 | }
|
9372 8092 |
|
9373 8093 | /// Data Plane sigv4 auth with long zone(20 chars) with AP
|
9374 8094 | #[test]
|
9375 8095 | fn test_318() {
|
9376 8096 | let params = crate::config::endpoint::Params::builder()
|
9377 8097 | .region("us-west-2".to_string())
|
9378 8098 | .bucket("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_string())
|
9379 8099 | .use_fips(false)
|
9380 8100 | .use_dual_stack(false)
|
9381 8101 | .accelerate(false)
|
9382 8102 | .use_s3_express_control_endpoint(false)
|
9383 8103 | .disable_s3_express_session_auth(true)
|
9384 8104 | .build()
|
9385 8105 | .expect("invalid params");
|
9386 8106 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9387 8107 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9388 8108 | let endpoint = endpoint.expect(
|
9389 8109 | "Expected valid endpoint: https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com",
|
9390 8110 | );
|
9391 8111 | assert_eq!(
|
9392 8112 | endpoint,
|
9393 8113 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9394 8114 | .url("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.us-west-2.amazonaws.com")
|
9395 - | .property(
|
9396 - | "authSchemes",
|
9397 - | vec![{
|
9398 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9399 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9400 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9401 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9402 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9403 - | out
|
9404 - | }
|
9405 - | .into()]
|
8115 + | .auth_scheme(
|
8116 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8117 + | .put("disableDoubleEncoding", true)
|
8118 + | .put("signingName", "s3express".to_string())
|
8119 + | .put("signingRegion", "us-west-2".to_string())
|
9406 8120 | )
|
9407 8121 | .property("backend", "S3Express".to_string())
|
9408 8122 | .build()
|
9409 8123 | );
|
9410 8124 | }
|
9411 8125 |
|
9412 8126 | /// Data Plane sigv4 auth with long AZ fips
|
9413 8127 | #[test]
|
9414 8128 | fn test_319() {
|
9415 8129 | let params = crate::config::endpoint::Params::builder()
|
9416 8130 | .region("us-west-2".to_string())
|
9417 8131 | .bucket("mybucket--test1-az1--x-s3".to_string())
|
9418 8132 | .use_fips(true)
|
9419 8133 | .use_dual_stack(false)
|
9420 8134 | .accelerate(false)
|
9421 8135 | .use_s3_express_control_endpoint(false)
|
9422 8136 | .disable_s3_express_session_auth(true)
|
9423 8137 | .build()
|
9424 8138 | .expect("invalid params");
|
9425 8139 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9426 8140 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9427 8141 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com");
|
9428 8142 | assert_eq!(
|
9429 8143 | endpoint,
|
9430 8144 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9431 8145 | .url("https://mybucket--test1-az1--x-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com")
|
9432 - | .property(
|
9433 - | "authSchemes",
|
9434 - | vec![{
|
9435 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9436 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9437 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9438 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9439 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9440 - | out
|
9441 - | }
|
9442 - | .into()]
|
8146 + | .auth_scheme(
|
8147 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8148 + | .put("disableDoubleEncoding", true)
|
8149 + | .put("signingName", "s3express".to_string())
|
8150 + | .put("signingRegion", "us-west-2".to_string())
|
9443 8151 | )
|
9444 8152 | .property("backend", "S3Express".to_string())
|
9445 8153 | .build()
|
9446 8154 | );
|
9447 8155 | }
|
9448 8156 |
|
9449 8157 | /// Data Plane sigv4 auth with long AZ fips with AP
|
9450 8158 | #[test]
|
9451 8159 | fn test_320() {
|
9452 8160 | let params = crate::config::endpoint::Params::builder()
|
9453 8161 | .region("us-west-2".to_string())
|
9454 8162 | .bucket("myaccesspoint--test1-az1--xa-s3".to_string())
|
9455 8163 | .use_fips(true)
|
9456 8164 | .use_dual_stack(false)
|
9457 8165 | .accelerate(false)
|
9458 8166 | .use_s3_express_control_endpoint(false)
|
9459 8167 | .disable_s3_express_session_auth(true)
|
9460 8168 | .build()
|
9461 8169 | .expect("invalid params");
|
9462 8170 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9463 8171 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9464 8172 | let endpoint =
|
9465 8173 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com");
|
9466 8174 | assert_eq!(
|
9467 8175 | endpoint,
|
9468 8176 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9469 8177 | .url("https://myaccesspoint--test1-az1--xa-s3.s3express-fips-test1-az1.us-west-2.amazonaws.com")
|
9470 - | .property(
|
9471 - | "authSchemes",
|
9472 - | vec![{
|
9473 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9474 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9475 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9476 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9477 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9478 - | out
|
9479 - | }
|
9480 - | .into()]
|
8178 + | .auth_scheme(
|
8179 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8180 + | .put("disableDoubleEncoding", true)
|
8181 + | .put("signingName", "s3express".to_string())
|
8182 + | .put("signingRegion", "us-west-2".to_string())
|
9481 8183 | )
|
9482 8184 | .property("backend", "S3Express".to_string())
|
9483 8185 | .build()
|
9484 8186 | );
|
9485 8187 | }
|
9486 8188 |
|
9487 8189 | /// Data Plane sigv4 auth with medium zone (14 chars) fips
|
9488 8190 | #[test]
|
9489 8191 | fn test_321() {
|
9490 8192 | let params = crate::config::endpoint::Params::builder()
|
9491 8193 | .region("us-west-2".to_string())
|
9492 8194 | .bucket("mybucket--test1-zone-ab1--x-s3".to_string())
|
9493 8195 | .use_fips(true)
|
9494 8196 | .use_dual_stack(false)
|
9495 8197 | .accelerate(false)
|
9496 8198 | .use_s3_express_control_endpoint(false)
|
9497 8199 | .disable_s3_express_session_auth(true)
|
9498 8200 | .build()
|
9499 8201 | .expect("invalid params");
|
9500 8202 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9501 8203 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9502 8204 | let endpoint =
|
9503 8205 | endpoint.expect("Expected valid endpoint: https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com");
|
9504 8206 | assert_eq!(
|
9505 8207 | endpoint,
|
9506 8208 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9507 8209 | .url("https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com")
|
9508 - | .property(
|
9509 - | "authSchemes",
|
9510 - | vec![{
|
9511 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9512 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9513 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9514 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9515 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9516 - | out
|
9517 - | }
|
9518 - | .into()]
|
8210 + | .auth_scheme(
|
8211 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8212 + | .put("disableDoubleEncoding", true)
|
8213 + | .put("signingName", "s3express".to_string())
|
8214 + | .put("signingRegion", "us-west-2".to_string())
|
9519 8215 | )
|
9520 8216 | .property("backend", "S3Express".to_string())
|
9521 8217 | .build()
|
9522 8218 | );
|
9523 8219 | }
|
9524 8220 |
|
9525 8221 | /// Data Plane sigv4 auth with medium zone (14 chars) fips with AP
|
9526 8222 | #[test]
|
9527 8223 | fn test_322() {
|
9528 8224 | let params = crate::config::endpoint::Params::builder()
|
9529 8225 | .region("us-west-2".to_string())
|
9530 8226 | .bucket("myaccesspoint--test1-zone-ab1--xa-s3".to_string())
|
9531 8227 | .use_fips(true)
|
9532 8228 | .use_dual_stack(false)
|
9533 8229 | .accelerate(false)
|
9534 8230 | .use_s3_express_control_endpoint(false)
|
9535 8231 | .disable_s3_express_session_auth(true)
|
9536 8232 | .build()
|
9537 8233 | .expect("invalid params");
|
9538 8234 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9539 8235 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9540 8236 | let endpoint = endpoint
|
9541 8237 | .expect("Expected valid endpoint: https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com");
|
9542 8238 | assert_eq!(
|
9543 8239 | endpoint,
|
9544 8240 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9545 8241 | .url("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.us-west-2.amazonaws.com")
|
9546 - | .property(
|
9547 - | "authSchemes",
|
9548 - | vec![{
|
9549 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9550 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9551 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9552 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9553 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9554 - | out
|
9555 - | }
|
9556 - | .into()]
|
8242 + | .auth_scheme(
|
8243 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8244 + | .put("disableDoubleEncoding", true)
|
8245 + | .put("signingName", "s3express".to_string())
|
8246 + | .put("signingRegion", "us-west-2".to_string())
|
9557 8247 | )
|
9558 8248 | .property("backend", "S3Express".to_string())
|
9559 8249 | .build()
|
9560 8250 | );
|
9561 8251 | }
|
9562 8252 |
|
9563 8253 | /// Data Plane sigv4 auth with long zone (20 chars) fips
|
9564 8254 | #[test]
|
9565 8255 | fn test_323() {
|
9566 8256 | let params = crate::config::endpoint::Params::builder()
|
9567 8257 | .region("us-west-2".to_string())
|
9568 8258 | .bucket("mybucket--test1-long1-zone-ab1--x-s3".to_string())
|
9569 8259 | .use_fips(true)
|
9570 8260 | .use_dual_stack(false)
|
9571 8261 | .accelerate(false)
|
9572 8262 | .use_s3_express_control_endpoint(false)
|
9573 8263 | .disable_s3_express_session_auth(true)
|
9574 8264 | .build()
|
9575 8265 | .expect("invalid params");
|
9576 8266 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9577 8267 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9578 8268 | let endpoint = endpoint.expect(
|
9579 8269 | "Expected valid endpoint: https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com",
|
9580 8270 | );
|
9581 8271 | assert_eq!(
|
9582 8272 | endpoint,
|
9583 8273 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9584 8274 | .url("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com")
|
9585 - | .property(
|
9586 - | "authSchemes",
|
9587 - | vec![{
|
9588 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9589 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9590 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9591 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9592 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9593 - | out
|
9594 - | }
|
9595 - | .into()]
|
8275 + | .auth_scheme(
|
8276 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8277 + | .put("disableDoubleEncoding", true)
|
8278 + | .put("signingName", "s3express".to_string())
|
8279 + | .put("signingRegion", "us-west-2".to_string())
|
9596 8280 | )
|
9597 8281 | .property("backend", "S3Express".to_string())
|
9598 8282 | .build()
|
9599 8283 | );
|
9600 8284 | }
|
9601 8285 |
|
9602 8286 | /// Data Plane sigv4 auth with long zone (20 chars) fips with AP
|
9603 8287 | #[test]
|
9604 8288 | fn test_324() {
|
9605 8289 | let params = crate::config::endpoint::Params::builder()
|
9606 8290 | .region("us-west-2".to_string())
|
9607 8291 | .bucket("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_string())
|
9608 8292 | .use_fips(true)
|
9609 8293 | .use_dual_stack(false)
|
9610 8294 | .accelerate(false)
|
9611 8295 | .use_s3_express_control_endpoint(false)
|
9612 8296 | .disable_s3_express_session_auth(true)
|
9613 8297 | .build()
|
9614 8298 | .expect("invalid params");
|
9615 8299 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9616 8300 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9617 8301 | let endpoint = endpoint.expect(
|
9618 8302 | "Expected valid endpoint: https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com",
|
9619 8303 | );
|
9620 8304 | assert_eq!(
|
9621 8305 | endpoint,
|
9622 8306 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9623 8307 | .url("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.us-west-2.amazonaws.com")
|
9624 - | .property(
|
9625 - | "authSchemes",
|
9626 - | vec![{
|
9627 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9628 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9629 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9630 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9631 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9632 - | out
|
9633 - | }
|
9634 - | .into()]
|
8308 + | .auth_scheme(
|
8309 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8310 + | .put("disableDoubleEncoding", true)
|
8311 + | .put("signingName", "s3express".to_string())
|
8312 + | .put("signingRegion", "us-west-2".to_string())
|
9635 8313 | )
|
9636 8314 | .property("backend", "S3Express".to_string())
|
9637 8315 | .build()
|
9638 8316 | );
|
9639 8317 | }
|
9640 8318 |
|
9641 8319 | /// Control Plane host override
|
9642 8320 | #[test]
|
9643 8321 | fn test_325() {
|
9644 8322 | let params = crate::config::endpoint::Params::builder()
|
9645 8323 | .region("us-west-2".to_string())
|
9646 8324 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
9647 8325 | .use_fips(false)
|
9648 8326 | .use_dual_stack(false)
|
9649 8327 | .accelerate(false)
|
9650 8328 | .use_s3_express_control_endpoint(true)
|
9651 8329 | .disable_s3_express_session_auth(true)
|
9652 8330 | .endpoint("https://custom.com".to_string())
|
9653 8331 | .build()
|
9654 8332 | .expect("invalid params");
|
9655 8333 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9656 8334 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9657 8335 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az1--x-s3.custom.com");
|
9658 8336 | assert_eq!(
|
9659 8337 | endpoint,
|
9660 8338 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9661 8339 | .url("https://mybucket--usw2-az1--x-s3.custom.com")
|
9662 - | .property(
|
9663 - | "authSchemes",
|
9664 - | vec![{
|
9665 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9666 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9667 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9668 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9669 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9670 - | out
|
9671 - | }
|
9672 - | .into()]
|
8340 + | .auth_scheme(
|
8341 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8342 + | .put("disableDoubleEncoding", true)
|
8343 + | .put("signingName", "s3express".to_string())
|
8344 + | .put("signingRegion", "us-west-2".to_string())
|
9673 8345 | )
|
9674 8346 | .property("backend", "S3Express".to_string())
|
9675 8347 | .build()
|
9676 8348 | );
|
9677 8349 | }
|
9678 8350 |
|
9679 8351 | /// Control Plane host override with AP
|
9680 8352 | #[test]
|
9681 8353 | fn test_326() {
|
9682 8354 | let params = crate::config::endpoint::Params::builder()
|
9683 8355 | .region("us-west-2".to_string())
|
9684 8356 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
9685 8357 | .use_fips(false)
|
9686 8358 | .use_dual_stack(false)
|
9687 8359 | .accelerate(false)
|
9688 8360 | .use_s3_express_control_endpoint(true)
|
9689 8361 | .disable_s3_express_session_auth(true)
|
9690 8362 | .endpoint("https://custom.com".to_string())
|
9691 8363 | .build()
|
9692 8364 | .expect("invalid params");
|
9693 8365 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9694 8366 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9695 8367 | let endpoint = endpoint.expect("Expected valid endpoint: https://myaccesspoint--usw2-az1--xa-s3.custom.com");
|
9696 8368 | assert_eq!(
|
9697 8369 | endpoint,
|
9698 8370 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9699 8371 | .url("https://myaccesspoint--usw2-az1--xa-s3.custom.com")
|
9700 - | .property(
|
9701 - | "authSchemes",
|
9702 - | vec![{
|
9703 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9704 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9705 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9706 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9707 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9708 - | out
|
9709 - | }
|
9710 - | .into()]
|
8372 + | .auth_scheme(
|
8373 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8374 + | .put("disableDoubleEncoding", true)
|
8375 + | .put("signingName", "s3express".to_string())
|
8376 + | .put("signingRegion", "us-west-2".to_string())
|
9711 8377 | )
|
9712 8378 | .property("backend", "S3Express".to_string())
|
9713 8379 | .build()
|
9714 8380 | );
|
9715 8381 | }
|
9716 8382 |
|
9717 8383 | /// Control Plane host override no bucket
|
9718 8384 | #[test]
|
9719 8385 | fn test_327() {
|
9720 8386 | let params = crate::config::endpoint::Params::builder()
|
9721 8387 | .region("us-west-2".to_string())
|
9722 8388 | .use_fips(false)
|
9723 8389 | .use_dual_stack(false)
|
9724 8390 | .accelerate(false)
|
9725 8391 | .use_s3_express_control_endpoint(true)
|
9726 8392 | .disable_s3_express_session_auth(true)
|
9727 8393 | .endpoint("https://custom.com".to_string())
|
9728 8394 | .build()
|
9729 8395 | .expect("invalid params");
|
9730 8396 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9731 8397 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9732 8398 | let endpoint = endpoint.expect("Expected valid endpoint: https://custom.com");
|
9733 8399 | assert_eq!(
|
9734 8400 | endpoint,
|
9735 8401 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9736 8402 | .url("https://custom.com")
|
9737 - | .property(
|
9738 - | "authSchemes",
|
9739 - | vec![{
|
9740 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9741 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9742 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9743 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9744 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9745 - | out
|
9746 - | }
|
9747 - | .into()]
|
8403 + | .auth_scheme(
|
8404 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8405 + | .put("disableDoubleEncoding", true)
|
8406 + | .put("signingName", "s3express".to_string())
|
8407 + | .put("signingRegion", "us-west-2".to_string())
|
9748 8408 | )
|
9749 8409 | .property("backend", "S3Express".to_string())
|
9750 8410 | .build()
|
9751 8411 | );
|
9752 8412 | }
|
9753 8413 |
|
9754 8414 | /// Data plane host override non virtual session auth
|
9755 8415 | #[test]
|
9756 8416 | fn test_328() {
|
9757 8417 | let params = crate::config::endpoint::Params::builder()
|
9758 8418 | .region("us-west-2".to_string())
|
9759 8419 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
9760 8420 | .use_fips(false)
|
9761 8421 | .use_dual_stack(false)
|
9762 8422 | .accelerate(false)
|
9763 8423 | .endpoint("https://10.0.0.1".to_string())
|
9764 8424 | .build()
|
9765 8425 | .expect("invalid params");
|
9766 8426 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9767 8427 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9768 8428 | let endpoint = endpoint.expect("Expected valid endpoint: https://10.0.0.1/mybucket--usw2-az1--x-s3");
|
9769 8429 | assert_eq!(
|
9770 8430 | endpoint,
|
9771 8431 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9772 8432 | .url("https://10.0.0.1/mybucket--usw2-az1--x-s3")
|
9773 - | .property(
|
9774 - | "authSchemes",
|
9775 - | vec![{
|
9776 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9777 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
9778 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9779 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9780 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9781 - | out
|
9782 - | }
|
9783 - | .into()]
|
8433 + | .auth_scheme(
|
8434 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
8435 + | .put("disableDoubleEncoding", true)
|
8436 + | .put("signingName", "s3express".to_string())
|
8437 + | .put("signingRegion", "us-west-2".to_string())
|
9784 8438 | )
|
9785 8439 | .property("backend", "S3Express".to_string())
|
9786 8440 | .build()
|
9787 8441 | );
|
9788 8442 | }
|
9789 8443 |
|
9790 8444 | /// Data plane host override non virtual session auth with AP
|
9791 8445 | #[test]
|
9792 8446 | fn test_329() {
|
9793 8447 | let params = crate::config::endpoint::Params::builder()
|
9794 8448 | .region("us-west-2".to_string())
|
9795 8449 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
9796 8450 | .use_fips(false)
|
9797 8451 | .use_dual_stack(false)
|
9798 8452 | .accelerate(false)
|
9799 8453 | .endpoint("https://10.0.0.1".to_string())
|
9800 8454 | .build()
|
9801 8455 | .expect("invalid params");
|
9802 8456 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9803 8457 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9804 8458 | let endpoint = endpoint.expect("Expected valid endpoint: https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3");
|
9805 8459 | assert_eq!(
|
9806 8460 | endpoint,
|
9807 8461 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9808 8462 | .url("https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3")
|
9809 - | .property(
|
9810 - | "authSchemes",
|
9811 - | vec![{
|
9812 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9813 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
9814 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9815 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9816 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9817 - | out
|
9818 - | }
|
9819 - | .into()]
|
8463 + | .auth_scheme(
|
8464 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
8465 + | .put("disableDoubleEncoding", true)
|
8466 + | .put("signingName", "s3express".to_string())
|
8467 + | .put("signingRegion", "us-west-2".to_string())
|
9820 8468 | )
|
9821 8469 | .property("backend", "S3Express".to_string())
|
9822 8470 | .build()
|
9823 8471 | );
|
9824 8472 | }
|
9825 8473 |
|
9826 8474 | /// Control Plane host override ip
|
9827 8475 | #[test]
|
9828 8476 | fn test_330() {
|
9829 8477 | let params = crate::config::endpoint::Params::builder()
|
9830 8478 | .region("us-west-2".to_string())
|
9831 8479 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
9832 8480 | .use_fips(false)
|
9833 8481 | .use_dual_stack(false)
|
9834 8482 | .accelerate(false)
|
9835 8483 | .use_s3_express_control_endpoint(true)
|
9836 8484 | .disable_s3_express_session_auth(true)
|
9837 8485 | .endpoint("https://10.0.0.1".to_string())
|
9838 8486 | .build()
|
9839 8487 | .expect("invalid params");
|
9840 8488 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9841 8489 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9842 8490 | let endpoint = endpoint.expect("Expected valid endpoint: https://10.0.0.1/mybucket--usw2-az1--x-s3");
|
9843 8491 | assert_eq!(
|
9844 8492 | endpoint,
|
9845 8493 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9846 8494 | .url("https://10.0.0.1/mybucket--usw2-az1--x-s3")
|
9847 - | .property(
|
9848 - | "authSchemes",
|
9849 - | vec![{
|
9850 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9851 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9852 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9853 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9854 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9855 - | out
|
9856 - | }
|
9857 - | .into()]
|
8495 + | .auth_scheme(
|
8496 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8497 + | .put("disableDoubleEncoding", true)
|
8498 + | .put("signingName", "s3express".to_string())
|
8499 + | .put("signingRegion", "us-west-2".to_string())
|
9858 8500 | )
|
9859 8501 | .property("backend", "S3Express".to_string())
|
9860 8502 | .build()
|
9861 8503 | );
|
9862 8504 | }
|
9863 8505 |
|
9864 8506 | /// Control Plane host override ip with AP
|
9865 8507 | #[test]
|
9866 8508 | fn test_331() {
|
9867 8509 | let params = crate::config::endpoint::Params::builder()
|
9868 8510 | .region("us-west-2".to_string())
|
9869 8511 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
9870 8512 | .use_fips(false)
|
9871 8513 | .use_dual_stack(false)
|
9872 8514 | .accelerate(false)
|
9873 8515 | .use_s3_express_control_endpoint(true)
|
9874 8516 | .disable_s3_express_session_auth(true)
|
9875 8517 | .endpoint("https://10.0.0.1".to_string())
|
9876 8518 | .build()
|
9877 8519 | .expect("invalid params");
|
9878 8520 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9879 8521 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9880 8522 | let endpoint = endpoint.expect("Expected valid endpoint: https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3");
|
9881 8523 | assert_eq!(
|
9882 8524 | endpoint,
|
9883 8525 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9884 8526 | .url("https://10.0.0.1/myaccesspoint--usw2-az1--xa-s3")
|
9885 - | .property(
|
9886 - | "authSchemes",
|
9887 - | vec![{
|
9888 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9889 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
9890 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9891 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9892 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9893 - | out
|
9894 - | }
|
9895 - | .into()]
|
8527 + | .auth_scheme(
|
8528 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8529 + | .put("disableDoubleEncoding", true)
|
8530 + | .put("signingName", "s3express".to_string())
|
8531 + | .put("signingRegion", "us-west-2".to_string())
|
9896 8532 | )
|
9897 8533 | .property("backend", "S3Express".to_string())
|
9898 8534 | .build()
|
9899 8535 | );
|
9900 8536 | }
|
9901 8537 |
|
9902 8538 | /// Data plane host override
|
9903 8539 | #[test]
|
9904 8540 | fn test_332() {
|
9905 8541 | let params = crate::config::endpoint::Params::builder()
|
9906 8542 | .region("us-west-2".to_string())
|
9907 8543 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
9908 8544 | .use_fips(false)
|
9909 8545 | .use_dual_stack(false)
|
9910 8546 | .accelerate(false)
|
9911 8547 | .endpoint("https://custom.com".to_string())
|
9912 8548 | .build()
|
9913 8549 | .expect("invalid params");
|
9914 8550 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9915 8551 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9916 8552 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az1--x-s3.custom.com");
|
9917 8553 | assert_eq!(
|
9918 8554 | endpoint,
|
9919 8555 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9920 8556 | .url("https://mybucket--usw2-az1--x-s3.custom.com")
|
9921 - | .property(
|
9922 - | "authSchemes",
|
9923 - | vec![{
|
9924 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9925 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
9926 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9927 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9928 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9929 - | out
|
9930 - | }
|
9931 - | .into()]
|
8557 + | .auth_scheme(
|
8558 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
8559 + | .put("disableDoubleEncoding", true)
|
8560 + | .put("signingName", "s3express".to_string())
|
8561 + | .put("signingRegion", "us-west-2".to_string())
|
9932 8562 | )
|
9933 8563 | .property("backend", "S3Express".to_string())
|
9934 8564 | .build()
|
9935 8565 | );
|
9936 8566 | }
|
9937 8567 |
|
9938 8568 | /// Data plane host override with AP
|
9939 8569 | #[test]
|
9940 8570 | fn test_333() {
|
9941 8571 | let params = crate::config::endpoint::Params::builder()
|
9942 8572 | .region("us-west-2".to_string())
|
9943 8573 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
9944 8574 | .use_fips(false)
|
9945 8575 | .use_dual_stack(false)
|
9946 8576 | .accelerate(false)
|
9947 8577 | .endpoint("https://custom.com".to_string())
|
9948 8578 | .build()
|
9949 8579 | .expect("invalid params");
|
9950 8580 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
9951 8581 | let endpoint = resolver.resolve_endpoint(¶ms);
|
9952 8582 | let endpoint = endpoint.expect("Expected valid endpoint: https://myaccesspoint--usw2-az1--xa-s3.custom.com");
|
9953 8583 | assert_eq!(
|
9954 8584 | endpoint,
|
9955 8585 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
9956 8586 | .url("https://myaccesspoint--usw2-az1--xa-s3.custom.com")
|
9957 - | .property(
|
9958 - | "authSchemes",
|
9959 - | vec![{
|
9960 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
9961 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
9962 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
9963 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
9964 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
9965 - | out
|
9966 - | }
|
9967 - | .into()]
|
8587 + | .auth_scheme(
|
8588 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
8589 + | .put("disableDoubleEncoding", true)
|
8590 + | .put("signingName", "s3express".to_string())
|
8591 + | .put("signingRegion", "us-west-2".to_string())
|
9968 8592 | )
|
9969 8593 | .property("backend", "S3Express".to_string())
|
9970 8594 | .build()
|
9971 8595 | );
|
9972 8596 | }
|
9973 8597 |
|
9974 8598 | /// bad format error
|
9975 8599 | #[test]
|
9976 8600 | fn test_334() {
|
9977 8601 | let params = crate::config::endpoint::Params::builder()
|
10210 8834 | .disable_s3_express_session_auth(false)
|
10211 8835 | .build()
|
10212 8836 | .expect("invalid params");
|
10213 8837 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10214 8838 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10215 8839 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3express-control.dualstack.us-east-1.amazonaws.com");
|
10216 8840 | assert_eq!(
|
10217 8841 | endpoint,
|
10218 8842 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10219 8843 | .url("https://s3express-control.dualstack.us-east-1.amazonaws.com")
|
10220 - | .property(
|
10221 - | "authSchemes",
|
10222 - | vec![{
|
10223 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10224 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10225 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10226 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
10227 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10228 - | out
|
10229 - | }
|
10230 - | .into()]
|
8844 + | .auth_scheme(
|
8845 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8846 + | .put("disableDoubleEncoding", true)
|
8847 + | .put("signingName", "s3express".to_string())
|
8848 + | .put("signingRegion", "us-east-1".to_string())
|
10231 8849 | )
|
10232 8850 | .property("backend", "S3Express".to_string())
|
10233 8851 | .build()
|
10234 8852 | );
|
10235 8853 | }
|
10236 8854 |
|
10237 8855 | /// Control plane without bucket, fips and dualstack
|
10238 8856 | #[test]
|
10239 8857 | fn test_347() {
|
10240 8858 | let params = crate::config::endpoint::Params::builder()
|
10241 8859 | .region("us-east-1".to_string())
|
10242 8860 | .use_fips(true)
|
10243 8861 | .use_dual_stack(true)
|
10244 8862 | .accelerate(false)
|
10245 8863 | .use_s3_express_control_endpoint(true)
|
10246 8864 | .disable_s3_express_session_auth(false)
|
10247 8865 | .build()
|
10248 8866 | .expect("invalid params");
|
10249 8867 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10250 8868 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10251 8869 | let endpoint = endpoint.expect("Expected valid endpoint: https://s3express-control-fips.dualstack.us-east-1.amazonaws.com");
|
10252 8870 | assert_eq!(
|
10253 8871 | endpoint,
|
10254 8872 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10255 8873 | .url("https://s3express-control-fips.dualstack.us-east-1.amazonaws.com")
|
10256 - | .property(
|
10257 - | "authSchemes",
|
10258 - | vec![{
|
10259 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10260 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10261 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10262 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
10263 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10264 - | out
|
10265 - | }
|
10266 - | .into()]
|
8874 + | .auth_scheme(
|
8875 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8876 + | .put("disableDoubleEncoding", true)
|
8877 + | .put("signingName", "s3express".to_string())
|
8878 + | .put("signingRegion", "us-east-1".to_string())
|
10267 8879 | )
|
10268 8880 | .property("backend", "S3Express".to_string())
|
10269 8881 | .build()
|
10270 8882 | );
|
10271 8883 | }
|
10272 8884 |
|
10273 8885 | /// Data Plane with short AZ and dualstack
|
10274 8886 | #[test]
|
10275 8887 | fn test_348() {
|
10276 8888 | let params = crate::config::endpoint::Params::builder()
|
10277 8889 | .region("us-west-2".to_string())
|
10278 8890 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
10279 8891 | .use_fips(false)
|
10280 8892 | .use_dual_stack(true)
|
10281 8893 | .accelerate(false)
|
10282 8894 | .use_s3_express_control_endpoint(false)
|
10283 8895 | .build()
|
10284 8896 | .expect("invalid params");
|
10285 8897 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10286 8898 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10287 8899 | let endpoint =
|
10288 8900 | endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com");
|
10289 8901 | assert_eq!(
|
10290 8902 | endpoint,
|
10291 8903 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10292 8904 | .url("https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com")
|
10293 - | .property(
|
10294 - | "authSchemes",
|
10295 - | vec![{
|
10296 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10297 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10298 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10299 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10300 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10301 - | out
|
10302 - | }
|
10303 - | .into()]
|
8905 + | .auth_scheme(
|
8906 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
8907 + | .put("disableDoubleEncoding", true)
|
8908 + | .put("signingName", "s3express".to_string())
|
8909 + | .put("signingRegion", "us-west-2".to_string())
|
10304 8910 | )
|
10305 8911 | .property("backend", "S3Express".to_string())
|
10306 8912 | .build()
|
10307 8913 | );
|
10308 8914 | }
|
10309 8915 |
|
10310 8916 | /// Data Plane with short AZ and FIPS with dualstack
|
10311 8917 | #[test]
|
10312 8918 | fn test_349() {
|
10313 8919 | let params = crate::config::endpoint::Params::builder()
|
10314 8920 | .region("us-west-2".to_string())
|
10315 8921 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
10316 8922 | .use_fips(true)
|
10317 8923 | .use_dual_stack(true)
|
10318 8924 | .accelerate(false)
|
10319 8925 | .use_s3_express_control_endpoint(false)
|
10320 8926 | .build()
|
10321 8927 | .expect("invalid params");
|
10322 8928 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10323 8929 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10324 8930 | let endpoint =
|
10325 8931 | endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com");
|
10326 8932 | assert_eq!(
|
10327 8933 | endpoint,
|
10328 8934 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10329 8935 | .url("https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com")
|
10330 - | .property(
|
10331 - | "authSchemes",
|
10332 - | vec![{
|
10333 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10334 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10335 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10336 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10337 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10338 - | out
|
10339 - | }
|
10340 - | .into()]
|
8936 + | .auth_scheme(
|
8937 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
8938 + | .put("disableDoubleEncoding", true)
|
8939 + | .put("signingName", "s3express".to_string())
|
8940 + | .put("signingRegion", "us-west-2".to_string())
|
10341 8941 | )
|
10342 8942 | .property("backend", "S3Express".to_string())
|
10343 8943 | .build()
|
10344 8944 | );
|
10345 8945 | }
|
10346 8946 |
|
10347 8947 | /// Data Plane sigv4 auth with short AZ and dualstack
|
10348 8948 | #[test]
|
10349 8949 | fn test_350() {
|
10350 8950 | let params = crate::config::endpoint::Params::builder()
|
10351 8951 | .region("us-west-2".to_string())
|
10352 8952 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
10353 8953 | .use_fips(false)
|
10354 8954 | .use_dual_stack(true)
|
10355 8955 | .accelerate(false)
|
10356 8956 | .disable_s3_express_session_auth(true)
|
10357 8957 | .build()
|
10358 8958 | .expect("invalid params");
|
10359 8959 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10360 8960 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10361 8961 | let endpoint =
|
10362 8962 | endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com");
|
10363 8963 | assert_eq!(
|
10364 8964 | endpoint,
|
10365 8965 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10366 8966 | .url("https://mybucket--usw2-az1--x-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com")
|
10367 - | .property(
|
10368 - | "authSchemes",
|
10369 - | vec![{
|
10370 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10371 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10372 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10373 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10374 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10375 - | out
|
10376 - | }
|
10377 - | .into()]
|
8967 + | .auth_scheme(
|
8968 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
8969 + | .put("disableDoubleEncoding", true)
|
8970 + | .put("signingName", "s3express".to_string())
|
8971 + | .put("signingRegion", "us-west-2".to_string())
|
10378 8972 | )
|
10379 8973 | .property("backend", "S3Express".to_string())
|
10380 8974 | .build()
|
10381 8975 | );
|
10382 8976 | }
|
10383 8977 |
|
10384 8978 | /// Data Plane sigv4 auth with short AZ and FIPS with dualstack
|
10385 8979 | #[test]
|
10386 8980 | fn test_351() {
|
10387 8981 | let params = crate::config::endpoint::Params::builder()
|
10388 8982 | .region("us-west-2".to_string())
|
10389 8983 | .bucket("mybucket--usw2-az1--x-s3".to_string())
|
10390 8984 | .use_fips(true)
|
10391 8985 | .use_dual_stack(true)
|
10392 8986 | .accelerate(false)
|
10393 8987 | .disable_s3_express_session_auth(true)
|
10394 8988 | .build()
|
10395 8989 | .expect("invalid params");
|
10396 8990 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10397 8991 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10398 8992 | let endpoint =
|
10399 8993 | endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com");
|
10400 8994 | assert_eq!(
|
10401 8995 | endpoint,
|
10402 8996 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10403 8997 | .url("https://mybucket--usw2-az1--x-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com")
|
10404 - | .property(
|
10405 - | "authSchemes",
|
10406 - | vec![{
|
10407 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10408 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10409 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10410 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10411 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10412 - | out
|
10413 - | }
|
10414 - | .into()]
|
8998 + | .auth_scheme(
|
8999 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9000 + | .put("disableDoubleEncoding", true)
|
9001 + | .put("signingName", "s3express".to_string())
|
9002 + | .put("signingRegion", "us-west-2".to_string())
|
10415 9003 | )
|
10416 9004 | .property("backend", "S3Express".to_string())
|
10417 9005 | .build()
|
10418 9006 | );
|
10419 9007 | }
|
10420 9008 |
|
10421 9009 | /// Data Plane with zone and dualstack
|
10422 9010 | #[test]
|
10423 9011 | fn test_352() {
|
10424 9012 | let params = crate::config::endpoint::Params::builder()
|
10425 9013 | .region("us-west-2".to_string())
|
10426 9014 | .bucket("mybucket--usw2-az12--x-s3".to_string())
|
10427 9015 | .use_fips(false)
|
10428 9016 | .use_dual_stack(true)
|
10429 9017 | .accelerate(false)
|
10430 9018 | .use_s3_express_control_endpoint(false)
|
10431 9019 | .build()
|
10432 9020 | .expect("invalid params");
|
10433 9021 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10434 9022 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10435 9023 | let endpoint =
|
10436 9024 | endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az12--x-s3.s3express-usw2-az12.dualstack.us-west-2.amazonaws.com");
|
10437 9025 | assert_eq!(
|
10438 9026 | endpoint,
|
10439 9027 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10440 9028 | .url("https://mybucket--usw2-az12--x-s3.s3express-usw2-az12.dualstack.us-west-2.amazonaws.com")
|
10441 - | .property(
|
10442 - | "authSchemes",
|
10443 - | vec![{
|
10444 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10445 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10446 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10447 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10448 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10449 - | out
|
10450 - | }
|
10451 - | .into()]
|
9029 + | .auth_scheme(
|
9030 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9031 + | .put("disableDoubleEncoding", true)
|
9032 + | .put("signingName", "s3express".to_string())
|
9033 + | .put("signingRegion", "us-west-2".to_string())
|
10452 9034 | )
|
10453 9035 | .property("backend", "S3Express".to_string())
|
10454 9036 | .build()
|
10455 9037 | );
|
10456 9038 | }
|
10457 9039 |
|
10458 9040 | /// Data Plane with zone and FIPS with dualstack
|
10459 9041 | #[test]
|
10460 9042 | fn test_353() {
|
10461 9043 | let params = crate::config::endpoint::Params::builder()
|
10462 9044 | .region("us-west-2".to_string())
|
10463 9045 | .bucket("mybucket--usw2-az12--x-s3".to_string())
|
10464 9046 | .use_fips(true)
|
10465 9047 | .use_dual_stack(true)
|
10466 9048 | .accelerate(false)
|
10467 9049 | .use_s3_express_control_endpoint(false)
|
10468 9050 | .build()
|
10469 9051 | .expect("invalid params");
|
10470 9052 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10471 9053 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10472 9054 | let endpoint =
|
10473 9055 | endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az12--x-s3.s3express-fips-usw2-az12.dualstack.us-west-2.amazonaws.com");
|
10474 9056 | assert_eq!(
|
10475 9057 | endpoint,
|
10476 9058 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10477 9059 | .url("https://mybucket--usw2-az12--x-s3.s3express-fips-usw2-az12.dualstack.us-west-2.amazonaws.com")
|
10478 - | .property(
|
10479 - | "authSchemes",
|
10480 - | vec![{
|
10481 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10482 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10483 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10484 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10485 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10486 - | out
|
10487 - | }
|
10488 - | .into()]
|
9060 + | .auth_scheme(
|
9061 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9062 + | .put("disableDoubleEncoding", true)
|
9063 + | .put("signingName", "s3express".to_string())
|
9064 + | .put("signingRegion", "us-west-2".to_string())
|
10489 9065 | )
|
10490 9066 | .property("backend", "S3Express".to_string())
|
10491 9067 | .build()
|
10492 9068 | );
|
10493 9069 | }
|
10494 9070 |
|
10495 9071 | /// Data Plane sigv4 auth with zone and dualstack
|
10496 9072 | #[test]
|
10497 9073 | fn test_354() {
|
10498 9074 | let params = crate::config::endpoint::Params::builder()
|
10499 9075 | .region("us-west-2".to_string())
|
10500 9076 | .bucket("mybucket--usw2-az12--x-s3".to_string())
|
10501 9077 | .use_fips(false)
|
10502 9078 | .use_dual_stack(true)
|
10503 9079 | .accelerate(false)
|
10504 9080 | .disable_s3_express_session_auth(true)
|
10505 9081 | .build()
|
10506 9082 | .expect("invalid params");
|
10507 9083 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10508 9084 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10509 9085 | let endpoint =
|
10510 9086 | endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az12--x-s3.s3express-usw2-az12.dualstack.us-west-2.amazonaws.com");
|
10511 9087 | assert_eq!(
|
10512 9088 | endpoint,
|
10513 9089 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10514 9090 | .url("https://mybucket--usw2-az12--x-s3.s3express-usw2-az12.dualstack.us-west-2.amazonaws.com")
|
10515 - | .property(
|
10516 - | "authSchemes",
|
10517 - | vec![{
|
10518 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10519 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10520 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10521 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10522 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10523 - | out
|
10524 - | }
|
10525 - | .into()]
|
9091 + | .auth_scheme(
|
9092 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9093 + | .put("disableDoubleEncoding", true)
|
9094 + | .put("signingName", "s3express".to_string())
|
9095 + | .put("signingRegion", "us-west-2".to_string())
|
10526 9096 | )
|
10527 9097 | .property("backend", "S3Express".to_string())
|
10528 9098 | .build()
|
10529 9099 | );
|
10530 9100 | }
|
10531 9101 |
|
10532 9102 | /// Data Plane sigv4 auth with 9-char zone and FIPS with dualstack
|
10533 9103 | #[test]
|
10534 9104 | fn test_355() {
|
10535 9105 | let params = crate::config::endpoint::Params::builder()
|
10536 9106 | .region("us-west-2".to_string())
|
10537 9107 | .bucket("mybucket--usw2-az12--x-s3".to_string())
|
10538 9108 | .use_fips(true)
|
10539 9109 | .use_dual_stack(true)
|
10540 9110 | .accelerate(false)
|
10541 9111 | .disable_s3_express_session_auth(true)
|
10542 9112 | .build()
|
10543 9113 | .expect("invalid params");
|
10544 9114 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10545 9115 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10546 9116 | let endpoint =
|
10547 9117 | endpoint.expect("Expected valid endpoint: https://mybucket--usw2-az12--x-s3.s3express-fips-usw2-az12.dualstack.us-west-2.amazonaws.com");
|
10548 9118 | assert_eq!(
|
10549 9119 | endpoint,
|
10550 9120 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10551 9121 | .url("https://mybucket--usw2-az12--x-s3.s3express-fips-usw2-az12.dualstack.us-west-2.amazonaws.com")
|
10552 - | .property(
|
10553 - | "authSchemes",
|
10554 - | vec![{
|
10555 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10556 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10557 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10558 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10559 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10560 - | out
|
10561 - | }
|
10562 - | .into()]
|
9122 + | .auth_scheme(
|
9123 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9124 + | .put("disableDoubleEncoding", true)
|
9125 + | .put("signingName", "s3express".to_string())
|
9126 + | .put("signingRegion", "us-west-2".to_string())
|
10563 9127 | )
|
10564 9128 | .property("backend", "S3Express".to_string())
|
10565 9129 | .build()
|
10566 9130 | );
|
10567 9131 | }
|
10568 9132 |
|
10569 9133 | /// Data Plane with 13-char zone and dualstack
|
10570 9134 | #[test]
|
10571 9135 | fn test_356() {
|
10572 9136 | let params = crate::config::endpoint::Params::builder()
|
10573 9137 | .region("us-west-2".to_string())
|
10574 9138 | .bucket("mybucket--test-zone-ab1--x-s3".to_string())
|
10575 9139 | .use_fips(false)
|
10576 9140 | .use_dual_stack(true)
|
10577 9141 | .accelerate(false)
|
10578 9142 | .use_s3_express_control_endpoint(false)
|
10579 9143 | .build()
|
10580 9144 | .expect("invalid params");
|
10581 9145 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10582 9146 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10583 9147 | let endpoint = endpoint
|
10584 9148 | .expect("Expected valid endpoint: https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
10585 9149 | assert_eq!(
|
10586 9150 | endpoint,
|
10587 9151 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10588 9152 | .url("https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10589 - | .property(
|
10590 - | "authSchemes",
|
10591 - | vec![{
|
10592 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10593 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10594 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10595 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10596 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10597 - | out
|
10598 - | }
|
10599 - | .into()]
|
9153 + | .auth_scheme(
|
9154 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9155 + | .put("disableDoubleEncoding", true)
|
9156 + | .put("signingName", "s3express".to_string())
|
9157 + | .put("signingRegion", "us-west-2".to_string())
|
10600 9158 | )
|
10601 9159 | .property("backend", "S3Express".to_string())
|
10602 9160 | .build()
|
10603 9161 | );
|
10604 9162 | }
|
10605 9163 |
|
10606 9164 | /// Data Plane with 13-char zone and FIPS with dualstack
|
10607 9165 | #[test]
|
10608 9166 | fn test_357() {
|
10609 9167 | let params = crate::config::endpoint::Params::builder()
|
10610 9168 | .region("us-west-2".to_string())
|
10611 9169 | .bucket("mybucket--test-zone-ab1--x-s3".to_string())
|
10612 9170 | .use_fips(true)
|
10613 9171 | .use_dual_stack(true)
|
10614 9172 | .accelerate(false)
|
10615 9173 | .use_s3_express_control_endpoint(false)
|
10616 9174 | .build()
|
10617 9175 | .expect("invalid params");
|
10618 9176 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10619 9177 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10620 9178 | let endpoint = endpoint
|
10621 9179 | .expect("Expected valid endpoint: https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
10622 9180 | assert_eq!(
|
10623 9181 | endpoint,
|
10624 9182 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10625 9183 | .url("https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10626 - | .property(
|
10627 - | "authSchemes",
|
10628 - | vec![{
|
10629 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10630 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10631 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10632 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10633 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10634 - | out
|
10635 - | }
|
10636 - | .into()]
|
9184 + | .auth_scheme(
|
9185 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9186 + | .put("disableDoubleEncoding", true)
|
9187 + | .put("signingName", "s3express".to_string())
|
9188 + | .put("signingRegion", "us-west-2".to_string())
|
10637 9189 | )
|
10638 9190 | .property("backend", "S3Express".to_string())
|
10639 9191 | .build()
|
10640 9192 | );
|
10641 9193 | }
|
10642 9194 |
|
10643 9195 | /// Data Plane sigv4 auth with 13-char zone and dualstack
|
10644 9196 | #[test]
|
10645 9197 | fn test_358() {
|
10646 9198 | let params = crate::config::endpoint::Params::builder()
|
10647 9199 | .region("us-west-2".to_string())
|
10648 9200 | .bucket("mybucket--test-zone-ab1--x-s3".to_string())
|
10649 9201 | .use_fips(false)
|
10650 9202 | .use_dual_stack(true)
|
10651 9203 | .accelerate(false)
|
10652 9204 | .disable_s3_express_session_auth(true)
|
10653 9205 | .build()
|
10654 9206 | .expect("invalid params");
|
10655 9207 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10656 9208 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10657 9209 | let endpoint = endpoint
|
10658 9210 | .expect("Expected valid endpoint: https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
10659 9211 | assert_eq!(
|
10660 9212 | endpoint,
|
10661 9213 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10662 9214 | .url("https://mybucket--test-zone-ab1--x-s3.s3express-test-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10663 - | .property(
|
10664 - | "authSchemes",
|
10665 - | vec![{
|
10666 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10667 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10668 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10669 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10670 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10671 - | out
|
10672 - | }
|
10673 - | .into()]
|
9215 + | .auth_scheme(
|
9216 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9217 + | .put("disableDoubleEncoding", true)
|
9218 + | .put("signingName", "s3express".to_string())
|
9219 + | .put("signingRegion", "us-west-2".to_string())
|
10674 9220 | )
|
10675 9221 | .property("backend", "S3Express".to_string())
|
10676 9222 | .build()
|
10677 9223 | );
|
10678 9224 | }
|
10679 9225 |
|
10680 9226 | /// Data Plane sigv4 auth with 13-char zone and FIPS with dualstack
|
10681 9227 | #[test]
|
10682 9228 | fn test_359() {
|
10683 9229 | let params = crate::config::endpoint::Params::builder()
|
10684 9230 | .region("us-west-2".to_string())
|
10685 9231 | .bucket("mybucket--test-zone-ab1--x-s3".to_string())
|
10686 9232 | .use_fips(true)
|
10687 9233 | .use_dual_stack(true)
|
10688 9234 | .accelerate(false)
|
10689 9235 | .disable_s3_express_session_auth(true)
|
10690 9236 | .build()
|
10691 9237 | .expect("invalid params");
|
10692 9238 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10693 9239 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10694 9240 | let endpoint = endpoint
|
10695 9241 | .expect("Expected valid endpoint: https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
10696 9242 | assert_eq!(
|
10697 9243 | endpoint,
|
10698 9244 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10699 9245 | .url("https://mybucket--test-zone-ab1--x-s3.s3express-fips-test-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10700 - | .property(
|
10701 - | "authSchemes",
|
10702 - | vec![{
|
10703 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10704 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10705 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10706 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10707 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10708 - | out
|
10709 - | }
|
10710 - | .into()]
|
9246 + | .auth_scheme(
|
9247 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9248 + | .put("disableDoubleEncoding", true)
|
9249 + | .put("signingName", "s3express".to_string())
|
9250 + | .put("signingRegion", "us-west-2".to_string())
|
10711 9251 | )
|
10712 9252 | .property("backend", "S3Express".to_string())
|
10713 9253 | .build()
|
10714 9254 | );
|
10715 9255 | }
|
10716 9256 |
|
10717 9257 | /// Data Plane with 14-char zone and dualstack
|
10718 9258 | #[test]
|
10719 9259 | fn test_360() {
|
10720 9260 | let params = crate::config::endpoint::Params::builder()
|
10721 9261 | .region("us-west-2".to_string())
|
10722 9262 | .bucket("mybucket--test1-zone-ab1--x-s3".to_string())
|
10723 9263 | .use_fips(false)
|
10724 9264 | .use_dual_stack(true)
|
10725 9265 | .accelerate(false)
|
10726 9266 | .use_s3_express_control_endpoint(false)
|
10727 9267 | .build()
|
10728 9268 | .expect("invalid params");
|
10729 9269 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10730 9270 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10731 9271 | let endpoint = endpoint
|
10732 9272 | .expect("Expected valid endpoint: https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
10733 9273 | assert_eq!(
|
10734 9274 | endpoint,
|
10735 9275 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10736 9276 | .url("https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10737 - | .property(
|
10738 - | "authSchemes",
|
10739 - | vec![{
|
10740 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10741 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10742 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10743 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10744 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10745 - | out
|
10746 - | }
|
10747 - | .into()]
|
9277 + | .auth_scheme(
|
9278 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9279 + | .put("disableDoubleEncoding", true)
|
9280 + | .put("signingName", "s3express".to_string())
|
9281 + | .put("signingRegion", "us-west-2".to_string())
|
10748 9282 | )
|
10749 9283 | .property("backend", "S3Express".to_string())
|
10750 9284 | .build()
|
10751 9285 | );
|
10752 9286 | }
|
10753 9287 |
|
10754 9288 | /// Data Plane with 14-char zone and FIPS with dualstack
|
10755 9289 | #[test]
|
10756 9290 | fn test_361() {
|
10757 9291 | let params = crate::config::endpoint::Params::builder()
|
10758 9292 | .region("us-west-2".to_string())
|
10759 9293 | .bucket("mybucket--test1-zone-ab1--x-s3".to_string())
|
10760 9294 | .use_fips(true)
|
10761 9295 | .use_dual_stack(true)
|
10762 9296 | .accelerate(false)
|
10763 9297 | .use_s3_express_control_endpoint(false)
|
10764 9298 | .build()
|
10765 9299 | .expect("invalid params");
|
10766 9300 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10767 9301 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10768 9302 | let endpoint = endpoint.expect(
|
10769 9303 | "Expected valid endpoint: https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
10770 9304 | );
|
10771 9305 | assert_eq!(
|
10772 9306 | endpoint,
|
10773 9307 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10774 9308 | .url("https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10775 - | .property(
|
10776 - | "authSchemes",
|
10777 - | vec![{
|
10778 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10779 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10780 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10781 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10782 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10783 - | out
|
10784 - | }
|
10785 - | .into()]
|
9309 + | .auth_scheme(
|
9310 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9311 + | .put("disableDoubleEncoding", true)
|
9312 + | .put("signingName", "s3express".to_string())
|
9313 + | .put("signingRegion", "us-west-2".to_string())
|
10786 9314 | )
|
10787 9315 | .property("backend", "S3Express".to_string())
|
10788 9316 | .build()
|
10789 9317 | );
|
10790 9318 | }
|
10791 9319 |
|
10792 9320 | /// Data Plane sigv4 auth with 14-char zone and dualstack
|
10793 9321 | #[test]
|
10794 9322 | fn test_362() {
|
10795 9323 | let params = crate::config::endpoint::Params::builder()
|
10796 9324 | .region("us-west-2".to_string())
|
10797 9325 | .bucket("mybucket--test1-zone-ab1--x-s3".to_string())
|
10798 9326 | .use_fips(false)
|
10799 9327 | .use_dual_stack(true)
|
10800 9328 | .accelerate(false)
|
10801 9329 | .disable_s3_express_session_auth(true)
|
10802 9330 | .build()
|
10803 9331 | .expect("invalid params");
|
10804 9332 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10805 9333 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10806 9334 | let endpoint = endpoint
|
10807 9335 | .expect("Expected valid endpoint: https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
10808 9336 | assert_eq!(
|
10809 9337 | endpoint,
|
10810 9338 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10811 9339 | .url("https://mybucket--test1-zone-ab1--x-s3.s3express-test1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10812 - | .property(
|
10813 - | "authSchemes",
|
10814 - | vec![{
|
10815 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10816 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10817 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10818 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10819 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10820 - | out
|
10821 - | }
|
10822 - | .into()]
|
9340 + | .auth_scheme(
|
9341 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9342 + | .put("disableDoubleEncoding", true)
|
9343 + | .put("signingName", "s3express".to_string())
|
9344 + | .put("signingRegion", "us-west-2".to_string())
|
10823 9345 | )
|
10824 9346 | .property("backend", "S3Express".to_string())
|
10825 9347 | .build()
|
10826 9348 | );
|
10827 9349 | }
|
10828 9350 |
|
10829 9351 | /// Data Plane sigv4 auth with 14-char zone and FIPS with dualstack
|
10830 9352 | #[test]
|
10831 9353 | fn test_363() {
|
10832 9354 | let params = crate::config::endpoint::Params::builder()
|
10833 9355 | .region("us-west-2".to_string())
|
10834 9356 | .bucket("mybucket--test1-zone-ab1--x-s3".to_string())
|
10835 9357 | .use_fips(true)
|
10836 9358 | .use_dual_stack(true)
|
10837 9359 | .accelerate(false)
|
10838 9360 | .disable_s3_express_session_auth(true)
|
10839 9361 | .build()
|
10840 9362 | .expect("invalid params");
|
10841 9363 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10842 9364 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10843 9365 | let endpoint = endpoint.expect(
|
10844 9366 | "Expected valid endpoint: https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
10845 9367 | );
|
10846 9368 | assert_eq!(
|
10847 9369 | endpoint,
|
10848 9370 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10849 9371 | .url("https://mybucket--test1-zone-ab1--x-s3.s3express-fips-test1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10850 - | .property(
|
10851 - | "authSchemes",
|
10852 - | vec![{
|
10853 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10854 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10855 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10856 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10857 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10858 - | out
|
10859 - | }
|
10860 - | .into()]
|
9372 + | .auth_scheme(
|
9373 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9374 + | .put("disableDoubleEncoding", true)
|
9375 + | .put("signingName", "s3express".to_string())
|
9376 + | .put("signingRegion", "us-west-2".to_string())
|
10861 9377 | )
|
10862 9378 | .property("backend", "S3Express".to_string())
|
10863 9379 | .build()
|
10864 9380 | );
|
10865 9381 | }
|
10866 9382 |
|
10867 9383 | /// Data Plane with long zone (20 cha) and dualstack
|
10868 9384 | #[test]
|
10869 9385 | fn test_364() {
|
10870 9386 | let params = crate::config::endpoint::Params::builder()
|
10871 9387 | .region("us-west-2".to_string())
|
10872 9388 | .bucket("mybucket--test1-long1-zone-ab1--x-s3".to_string())
|
10873 9389 | .use_fips(false)
|
10874 9390 | .use_dual_stack(true)
|
10875 9391 | .accelerate(false)
|
10876 9392 | .use_s3_express_control_endpoint(false)
|
10877 9393 | .build()
|
10878 9394 | .expect("invalid params");
|
10879 9395 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10880 9396 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10881 9397 | let endpoint = endpoint.expect(
|
10882 9398 | "Expected valid endpoint: https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
10883 9399 | );
|
10884 9400 | assert_eq!(
|
10885 9401 | endpoint,
|
10886 9402 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10887 9403 | .url("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10888 - | .property(
|
10889 - | "authSchemes",
|
10890 - | vec![{
|
10891 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10892 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10893 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10894 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10895 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10896 - | out
|
10897 - | }
|
10898 - | .into()]
|
9404 + | .auth_scheme(
|
9405 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9406 + | .put("disableDoubleEncoding", true)
|
9407 + | .put("signingName", "s3express".to_string())
|
9408 + | .put("signingRegion", "us-west-2".to_string())
|
10899 9409 | )
|
10900 9410 | .property("backend", "S3Express".to_string())
|
10901 9411 | .build()
|
10902 9412 | );
|
10903 9413 | }
|
10904 9414 |
|
10905 9415 | /// Data Plane with long zone (20 char) and FIPS with dualstack
|
10906 9416 | #[test]
|
10907 9417 | fn test_365() {
|
10908 9418 | let params = crate::config::endpoint::Params::builder()
|
10909 9419 | .region("us-west-2".to_string())
|
10910 9420 | .bucket("mybucket--test1-long1-zone-ab1--x-s3".to_string())
|
10911 9421 | .use_fips(true)
|
10912 9422 | .use_dual_stack(true)
|
10913 9423 | .accelerate(false)
|
10914 9424 | .use_s3_express_control_endpoint(false)
|
10915 9425 | .build()
|
10916 9426 | .expect("invalid params");
|
10917 9427 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10918 9428 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10919 9429 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
10920 9430 | assert_eq!(
|
10921 9431 | endpoint,
|
10922 9432 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10923 9433 | .url("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10924 - | .property(
|
10925 - | "authSchemes",
|
10926 - | vec![{
|
10927 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10928 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
10929 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10930 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10931 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10932 - | out
|
10933 - | }
|
10934 - | .into()]
|
9434 + | .auth_scheme(
|
9435 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9436 + | .put("disableDoubleEncoding", true)
|
9437 + | .put("signingName", "s3express".to_string())
|
9438 + | .put("signingRegion", "us-west-2".to_string())
|
10935 9439 | )
|
10936 9440 | .property("backend", "S3Express".to_string())
|
10937 9441 | .build()
|
10938 9442 | );
|
10939 9443 | }
|
10940 9444 |
|
10941 9445 | /// Data Plane sigv4 auth with long zone (20 char) and dualstack
|
10942 9446 | #[test]
|
10943 9447 | fn test_366() {
|
10944 9448 | let params = crate::config::endpoint::Params::builder()
|
10945 9449 | .region("us-west-2".to_string())
|
10946 9450 | .bucket("mybucket--test1-long1-zone-ab1--x-s3".to_string())
|
10947 9451 | .use_fips(false)
|
10948 9452 | .use_dual_stack(true)
|
10949 9453 | .accelerate(false)
|
10950 9454 | .disable_s3_express_session_auth(true)
|
10951 9455 | .build()
|
10952 9456 | .expect("invalid params");
|
10953 9457 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10954 9458 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10955 9459 | let endpoint = endpoint.expect(
|
10956 9460 | "Expected valid endpoint: https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
10957 9461 | );
|
10958 9462 | assert_eq!(
|
10959 9463 | endpoint,
|
10960 9464 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10961 9465 | .url("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10962 - | .property(
|
10963 - | "authSchemes",
|
10964 - | vec![{
|
10965 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
10966 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
10967 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
10968 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
10969 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
10970 - | out
|
10971 - | }
|
10972 - | .into()]
|
9466 + | .auth_scheme(
|
9467 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9468 + | .put("disableDoubleEncoding", true)
|
9469 + | .put("signingName", "s3express".to_string())
|
9470 + | .put("signingRegion", "us-west-2".to_string())
|
10973 9471 | )
|
10974 9472 | .property("backend", "S3Express".to_string())
|
10975 9473 | .build()
|
10976 9474 | );
|
10977 9475 | }
|
10978 9476 |
|
10979 9477 | /// Data Plane sigv4 auth with long zone (20 char) and FIPS with dualstack
|
10980 9478 | #[test]
|
10981 9479 | fn test_367() {
|
10982 9480 | let params = crate::config::endpoint::Params::builder()
|
10983 9481 | .region("us-west-2".to_string())
|
10984 9482 | .bucket("mybucket--test1-long1-zone-ab1--x-s3".to_string())
|
10985 9483 | .use_fips(true)
|
10986 9484 | .use_dual_stack(true)
|
10987 9485 | .accelerate(false)
|
10988 9486 | .disable_s3_express_session_auth(true)
|
10989 9487 | .build()
|
10990 9488 | .expect("invalid params");
|
10991 9489 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
10992 9490 | let endpoint = resolver.resolve_endpoint(¶ms);
|
10993 9491 | let endpoint = endpoint.expect("Expected valid endpoint: https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
10994 9492 | assert_eq!(
|
10995 9493 | endpoint,
|
10996 9494 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10997 9495 | .url("https://mybucket--test1-long1-zone-ab1--x-s3.s3express-fips-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
10998 - | .property(
|
10999 - | "authSchemes",
|
11000 - | vec![{
|
11001 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11002 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11003 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11004 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11005 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11006 - | out
|
11007 - | }
|
11008 - | .into()]
|
9496 + | .auth_scheme(
|
9497 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9498 + | .put("disableDoubleEncoding", true)
|
9499 + | .put("signingName", "s3express".to_string())
|
9500 + | .put("signingRegion", "us-west-2".to_string())
|
11009 9501 | )
|
11010 9502 | .property("backend", "S3Express".to_string())
|
11011 9503 | .build()
|
11012 9504 | );
|
11013 9505 | }
|
11014 9506 |
|
11015 9507 | /// Control plane and FIPS with dualstack
|
11016 9508 | #[test]
|
11017 9509 | fn test_368() {
|
11018 9510 | let params = crate::config::endpoint::Params::builder()
|
11019 9511 | .region("us-east-1".to_string())
|
11020 9512 | .bucket("mybucket--test-ab1--x-s3".to_string())
|
11021 9513 | .use_fips(true)
|
11022 9514 | .use_dual_stack(true)
|
11023 9515 | .accelerate(false)
|
11024 9516 | .use_s3_express_control_endpoint(true)
|
11025 9517 | .build()
|
11026 9518 | .expect("invalid params");
|
11027 9519 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11028 9520 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11029 9521 | let endpoint =
|
11030 9522 | endpoint.expect("Expected valid endpoint: https://s3express-control-fips.dualstack.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3");
|
11031 9523 | assert_eq!(
|
11032 9524 | endpoint,
|
11033 9525 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11034 9526 | .url("https://s3express-control-fips.dualstack.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3")
|
11035 - | .property(
|
11036 - | "authSchemes",
|
11037 - | vec![{
|
11038 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11039 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11040 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11041 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
11042 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11043 - | out
|
11044 - | }
|
11045 - | .into()]
|
9527 + | .auth_scheme(
|
9528 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9529 + | .put("disableDoubleEncoding", true)
|
9530 + | .put("signingName", "s3express".to_string())
|
9531 + | .put("signingRegion", "us-east-1".to_string())
|
11046 9532 | )
|
11047 9533 | .property("backend", "S3Express".to_string())
|
11048 9534 | .build()
|
11049 9535 | );
|
11050 9536 | }
|
11051 9537 |
|
11052 9538 | /// Data plane with zone and dualstack and AP
|
11053 9539 | #[test]
|
11054 9540 | fn test_369() {
|
11055 9541 | let params = crate::config::endpoint::Params::builder()
|
11056 9542 | .region("us-west-2".to_string())
|
11057 9543 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
11058 9544 | .use_fips(false)
|
11059 9545 | .use_dual_stack(true)
|
11060 9546 | .accelerate(false)
|
11061 9547 | .use_s3_express_control_endpoint(false)
|
11062 9548 | .build()
|
11063 9549 | .expect("invalid params");
|
11064 9550 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11065 9551 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11066 9552 | let endpoint =
|
11067 9553 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--usw2-az1--xa-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com");
|
11068 9554 | assert_eq!(
|
11069 9555 | endpoint,
|
11070 9556 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11071 9557 | .url("https://myaccesspoint--usw2-az1--xa-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com")
|
11072 - | .property(
|
11073 - | "authSchemes",
|
11074 - | vec![{
|
11075 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11076 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11077 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11078 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11079 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11080 - | out
|
11081 - | }
|
11082 - | .into()]
|
9558 + | .auth_scheme(
|
9559 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9560 + | .put("disableDoubleEncoding", true)
|
9561 + | .put("signingName", "s3express".to_string())
|
9562 + | .put("signingRegion", "us-west-2".to_string())
|
11083 9563 | )
|
11084 9564 | .property("backend", "S3Express".to_string())
|
11085 9565 | .build()
|
11086 9566 | );
|
11087 9567 | }
|
11088 9568 |
|
11089 9569 | /// Data plane with zone and FIPS with dualstack and AP
|
11090 9570 | #[test]
|
11091 9571 | fn test_370() {
|
11092 9572 | let params = crate::config::endpoint::Params::builder()
|
11093 9573 | .region("us-west-2".to_string())
|
11094 9574 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
11095 9575 | .use_fips(true)
|
11096 9576 | .use_dual_stack(true)
|
11097 9577 | .accelerate(false)
|
11098 9578 | .use_s3_express_control_endpoint(false)
|
11099 9579 | .build()
|
11100 9580 | .expect("invalid params");
|
11101 9581 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11102 9582 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11103 9583 | let endpoint = endpoint
|
11104 9584 | .expect("Expected valid endpoint: https://myaccesspoint--usw2-az1--xa-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com");
|
11105 9585 | assert_eq!(
|
11106 9586 | endpoint,
|
11107 9587 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11108 9588 | .url("https://myaccesspoint--usw2-az1--xa-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com")
|
11109 - | .property(
|
11110 - | "authSchemes",
|
11111 - | vec![{
|
11112 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11113 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11114 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11115 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11116 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11117 - | out
|
11118 - | }
|
11119 - | .into()]
|
9589 + | .auth_scheme(
|
9590 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9591 + | .put("disableDoubleEncoding", true)
|
9592 + | .put("signingName", "s3express".to_string())
|
9593 + | .put("signingRegion", "us-west-2".to_string())
|
11120 9594 | )
|
11121 9595 | .property("backend", "S3Express".to_string())
|
11122 9596 | .build()
|
11123 9597 | );
|
11124 9598 | }
|
11125 9599 |
|
11126 9600 | /// Data Plane sigv4 auth with zone and dualstack and AP
|
11127 9601 | #[test]
|
11128 9602 | fn test_371() {
|
11129 9603 | let params = crate::config::endpoint::Params::builder()
|
11130 9604 | .region("us-west-2".to_string())
|
11131 9605 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
11132 9606 | .use_fips(false)
|
11133 9607 | .use_dual_stack(true)
|
11134 9608 | .accelerate(false)
|
11135 9609 | .disable_s3_express_session_auth(true)
|
11136 9610 | .build()
|
11137 9611 | .expect("invalid params");
|
11138 9612 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11139 9613 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11140 9614 | let endpoint =
|
11141 9615 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--usw2-az1--xa-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com");
|
11142 9616 | assert_eq!(
|
11143 9617 | endpoint,
|
11144 9618 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11145 9619 | .url("https://myaccesspoint--usw2-az1--xa-s3.s3express-usw2-az1.dualstack.us-west-2.amazonaws.com")
|
11146 - | .property(
|
11147 - | "authSchemes",
|
11148 - | vec![{
|
11149 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11150 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11151 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11152 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11153 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11154 - | out
|
11155 - | }
|
11156 - | .into()]
|
9620 + | .auth_scheme(
|
9621 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9622 + | .put("disableDoubleEncoding", true)
|
9623 + | .put("signingName", "s3express".to_string())
|
9624 + | .put("signingRegion", "us-west-2".to_string())
|
11157 9625 | )
|
11158 9626 | .property("backend", "S3Express".to_string())
|
11159 9627 | .build()
|
11160 9628 | );
|
11161 9629 | }
|
11162 9630 |
|
11163 9631 | /// Data Plane AP sigv4 auth with zone and FIPS with dualstack
|
11164 9632 | #[test]
|
11165 9633 | fn test_372() {
|
11166 9634 | let params = crate::config::endpoint::Params::builder()
|
11167 9635 | .region("us-west-2".to_string())
|
11168 9636 | .bucket("myaccesspoint--usw2-az1--xa-s3".to_string())
|
11169 9637 | .use_fips(true)
|
11170 9638 | .use_dual_stack(true)
|
11171 9639 | .accelerate(false)
|
11172 9640 | .disable_s3_express_session_auth(true)
|
11173 9641 | .build()
|
11174 9642 | .expect("invalid params");
|
11175 9643 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11176 9644 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11177 9645 | let endpoint = endpoint
|
11178 9646 | .expect("Expected valid endpoint: https://myaccesspoint--usw2-az1--xa-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com");
|
11179 9647 | assert_eq!(
|
11180 9648 | endpoint,
|
11181 9649 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11182 9650 | .url("https://myaccesspoint--usw2-az1--xa-s3.s3express-fips-usw2-az1.dualstack.us-west-2.amazonaws.com")
|
11183 - | .property(
|
11184 - | "authSchemes",
|
11185 - | vec![{
|
11186 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11187 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11188 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11189 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11190 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11191 - | out
|
11192 - | }
|
11193 - | .into()]
|
9651 + | .auth_scheme(
|
9652 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9653 + | .put("disableDoubleEncoding", true)
|
9654 + | .put("signingName", "s3express".to_string())
|
9655 + | .put("signingRegion", "us-west-2".to_string())
|
11194 9656 | )
|
11195 9657 | .property("backend", "S3Express".to_string())
|
11196 9658 | .build()
|
11197 9659 | );
|
11198 9660 | }
|
11199 9661 |
|
11200 9662 | /// Data Plane with zone (9 char) and AP with dualstack
|
11201 9663 | #[test]
|
11202 9664 | fn test_373() {
|
11203 9665 | let params = crate::config::endpoint::Params::builder()
|
11204 9666 | .region("us-west-2".to_string())
|
11205 9667 | .bucket("myaccesspoint--usw2-az12--xa-s3".to_string())
|
11206 9668 | .use_fips(false)
|
11207 9669 | .use_dual_stack(true)
|
11208 9670 | .accelerate(false)
|
11209 9671 | .use_s3_express_control_endpoint(false)
|
11210 9672 | .build()
|
11211 9673 | .expect("invalid params");
|
11212 9674 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11213 9675 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11214 9676 | let endpoint =
|
11215 9677 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--usw2-az12--xa-s3.s3express-usw2-az12.dualstack.us-west-2.amazonaws.com");
|
11216 9678 | assert_eq!(
|
11217 9679 | endpoint,
|
11218 9680 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11219 9681 | .url("https://myaccesspoint--usw2-az12--xa-s3.s3express-usw2-az12.dualstack.us-west-2.amazonaws.com")
|
11220 - | .property(
|
11221 - | "authSchemes",
|
11222 - | vec![{
|
11223 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11224 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11225 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11226 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11227 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11228 - | out
|
11229 - | }
|
11230 - | .into()]
|
9682 + | .auth_scheme(
|
9683 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9684 + | .put("disableDoubleEncoding", true)
|
9685 + | .put("signingName", "s3express".to_string())
|
9686 + | .put("signingRegion", "us-west-2".to_string())
|
11231 9687 | )
|
11232 9688 | .property("backend", "S3Express".to_string())
|
11233 9689 | .build()
|
11234 9690 | );
|
11235 9691 | }
|
11236 9692 |
|
11237 9693 | /// Data Plane with zone (9 char) and FIPS with AP and dualstack
|
11238 9694 | #[test]
|
11239 9695 | fn test_374() {
|
11240 9696 | let params = crate::config::endpoint::Params::builder()
|
11241 9697 | .region("us-west-2".to_string())
|
11242 9698 | .bucket("myaccesspoint--usw2-az12--xa-s3".to_string())
|
11243 9699 | .use_fips(true)
|
11244 9700 | .use_dual_stack(true)
|
11245 9701 | .accelerate(false)
|
11246 9702 | .use_s3_express_control_endpoint(false)
|
11247 9703 | .build()
|
11248 9704 | .expect("invalid params");
|
11249 9705 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11250 9706 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11251 9707 | let endpoint = endpoint
|
11252 9708 | .expect("Expected valid endpoint: https://myaccesspoint--usw2-az12--xa-s3.s3express-fips-usw2-az12.dualstack.us-west-2.amazonaws.com");
|
11253 9709 | assert_eq!(
|
11254 9710 | endpoint,
|
11255 9711 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11256 9712 | .url("https://myaccesspoint--usw2-az12--xa-s3.s3express-fips-usw2-az12.dualstack.us-west-2.amazonaws.com")
|
11257 - | .property(
|
11258 - | "authSchemes",
|
11259 - | vec![{
|
11260 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11261 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11262 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11263 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11264 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11265 - | out
|
11266 - | }
|
11267 - | .into()]
|
9713 + | .auth_scheme(
|
9714 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9715 + | .put("disableDoubleEncoding", true)
|
9716 + | .put("signingName", "s3express".to_string())
|
9717 + | .put("signingRegion", "us-west-2".to_string())
|
11268 9718 | )
|
11269 9719 | .property("backend", "S3Express".to_string())
|
11270 9720 | .build()
|
11271 9721 | );
|
11272 9722 | }
|
11273 9723 |
|
11274 9724 | /// Data Plane sigv4 auth with (9 char) zone and dualstack with AP
|
11275 9725 | #[test]
|
11276 9726 | fn test_375() {
|
11277 9727 | let params = crate::config::endpoint::Params::builder()
|
11278 9728 | .region("us-west-2".to_string())
|
11279 9729 | .bucket("myaccesspoint--usw2-az12--xa-s3".to_string())
|
11280 9730 | .use_fips(false)
|
11281 9731 | .use_dual_stack(true)
|
11282 9732 | .accelerate(false)
|
11283 9733 | .disable_s3_express_session_auth(true)
|
11284 9734 | .build()
|
11285 9735 | .expect("invalid params");
|
11286 9736 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11287 9737 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11288 9738 | let endpoint =
|
11289 9739 | endpoint.expect("Expected valid endpoint: https://myaccesspoint--usw2-az12--xa-s3.s3express-usw2-az12.dualstack.us-west-2.amazonaws.com");
|
11290 9740 | assert_eq!(
|
11291 9741 | endpoint,
|
11292 9742 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11293 9743 | .url("https://myaccesspoint--usw2-az12--xa-s3.s3express-usw2-az12.dualstack.us-west-2.amazonaws.com")
|
11294 - | .property(
|
11295 - | "authSchemes",
|
11296 - | vec![{
|
11297 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11298 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11299 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11300 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11301 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11302 - | out
|
11303 - | }
|
11304 - | .into()]
|
9744 + | .auth_scheme(
|
9745 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9746 + | .put("disableDoubleEncoding", true)
|
9747 + | .put("signingName", "s3express".to_string())
|
9748 + | .put("signingRegion", "us-west-2".to_string())
|
11305 9749 | )
|
11306 9750 | .property("backend", "S3Express".to_string())
|
11307 9751 | .build()
|
11308 9752 | );
|
11309 9753 | }
|
11310 9754 |
|
11311 9755 | /// Access Point sigv4 auth with (9 char) zone and FIPS with dualstack
|
11312 9756 | #[test]
|
11313 9757 | fn test_376() {
|
11314 9758 | let params = crate::config::endpoint::Params::builder()
|
11315 9759 | .region("us-west-2".to_string())
|
11316 9760 | .bucket("myaccesspoint--usw2-az12--xa-s3".to_string())
|
11317 9761 | .use_fips(true)
|
11318 9762 | .use_dual_stack(true)
|
11319 9763 | .accelerate(false)
|
11320 9764 | .disable_s3_express_session_auth(true)
|
11321 9765 | .build()
|
11322 9766 | .expect("invalid params");
|
11323 9767 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11324 9768 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11325 9769 | let endpoint = endpoint
|
11326 9770 | .expect("Expected valid endpoint: https://myaccesspoint--usw2-az12--xa-s3.s3express-fips-usw2-az12.dualstack.us-west-2.amazonaws.com");
|
11327 9771 | assert_eq!(
|
11328 9772 | endpoint,
|
11329 9773 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11330 9774 | .url("https://myaccesspoint--usw2-az12--xa-s3.s3express-fips-usw2-az12.dualstack.us-west-2.amazonaws.com")
|
11331 - | .property(
|
11332 - | "authSchemes",
|
11333 - | vec![{
|
11334 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11335 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11336 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11337 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11338 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11339 - | out
|
11340 - | }
|
11341 - | .into()]
|
9775 + | .auth_scheme(
|
9776 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9777 + | .put("disableDoubleEncoding", true)
|
9778 + | .put("signingName", "s3express".to_string())
|
9779 + | .put("signingRegion", "us-west-2".to_string())
|
11342 9780 | )
|
11343 9781 | .property("backend", "S3Express".to_string())
|
11344 9782 | .build()
|
11345 9783 | );
|
11346 9784 | }
|
11347 9785 |
|
11348 9786 | /// Data Plane with zone (13 char) and AP with dualstack
|
11349 9787 | #[test]
|
11350 9788 | fn test_377() {
|
11351 9789 | let params = crate::config::endpoint::Params::builder()
|
11352 9790 | .region("us-west-2".to_string())
|
11353 9791 | .bucket("myaccesspoint--test-zone-ab1--xa-s3".to_string())
|
11354 9792 | .use_fips(false)
|
11355 9793 | .use_dual_stack(true)
|
11356 9794 | .accelerate(false)
|
11357 9795 | .use_s3_express_control_endpoint(false)
|
11358 9796 | .build()
|
11359 9797 | .expect("invalid params");
|
11360 9798 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11361 9799 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11362 9800 | let endpoint = endpoint
|
11363 9801 | .expect("Expected valid endpoint: https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
11364 9802 | assert_eq!(
|
11365 9803 | endpoint,
|
11366 9804 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11367 9805 | .url("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11368 - | .property(
|
11369 - | "authSchemes",
|
11370 - | vec![{
|
11371 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11372 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11373 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11374 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11375 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11376 - | out
|
11377 - | }
|
11378 - | .into()]
|
9806 + | .auth_scheme(
|
9807 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9808 + | .put("disableDoubleEncoding", true)
|
9809 + | .put("signingName", "s3express".to_string())
|
9810 + | .put("signingRegion", "us-west-2".to_string())
|
11379 9811 | )
|
11380 9812 | .property("backend", "S3Express".to_string())
|
11381 9813 | .build()
|
11382 9814 | );
|
11383 9815 | }
|
11384 9816 |
|
11385 9817 | /// Data Plane with zone (13 char) and AP with FIPS and dualstack
|
11386 9818 | #[test]
|
11387 9819 | fn test_378() {
|
11388 9820 | let params = crate::config::endpoint::Params::builder()
|
11389 9821 | .region("us-west-2".to_string())
|
11390 9822 | .bucket("myaccesspoint--test-zone-ab1--xa-s3".to_string())
|
11391 9823 | .use_fips(true)
|
11392 9824 | .use_dual_stack(true)
|
11393 9825 | .accelerate(false)
|
11394 9826 | .use_s3_express_control_endpoint(false)
|
11395 9827 | .build()
|
11396 9828 | .expect("invalid params");
|
11397 9829 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11398 9830 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11399 9831 | let endpoint = endpoint.expect(
|
11400 9832 | "Expected valid endpoint: https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
11401 9833 | );
|
11402 9834 | assert_eq!(
|
11403 9835 | endpoint,
|
11404 9836 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11405 9837 | .url("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11406 - | .property(
|
11407 - | "authSchemes",
|
11408 - | vec![{
|
11409 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11410 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11411 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11412 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11413 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11414 - | out
|
11415 - | }
|
11416 - | .into()]
|
9838 + | .auth_scheme(
|
9839 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9840 + | .put("disableDoubleEncoding", true)
|
9841 + | .put("signingName", "s3express".to_string())
|
9842 + | .put("signingRegion", "us-west-2".to_string())
|
11417 9843 | )
|
11418 9844 | .property("backend", "S3Express".to_string())
|
11419 9845 | .build()
|
11420 9846 | );
|
11421 9847 | }
|
11422 9848 |
|
11423 9849 | /// Data Plane sigv4 auth with (13 char) zone with AP and dualstack
|
11424 9850 | #[test]
|
11425 9851 | fn test_379() {
|
11426 9852 | let params = crate::config::endpoint::Params::builder()
|
11427 9853 | .region("us-west-2".to_string())
|
11428 9854 | .bucket("myaccesspoint--test-zone-ab1--xa-s3".to_string())
|
11429 9855 | .use_fips(false)
|
11430 9856 | .use_dual_stack(true)
|
11431 9857 | .accelerate(false)
|
11432 9858 | .disable_s3_express_session_auth(true)
|
11433 9859 | .build()
|
11434 9860 | .expect("invalid params");
|
11435 9861 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11436 9862 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11437 9863 | let endpoint = endpoint
|
11438 9864 | .expect("Expected valid endpoint: https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
11439 9865 | assert_eq!(
|
11440 9866 | endpoint,
|
11441 9867 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11442 9868 | .url("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-test-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11443 - | .property(
|
11444 - | "authSchemes",
|
11445 - | vec![{
|
11446 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11447 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11448 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11449 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11450 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11451 - | out
|
11452 - | }
|
11453 - | .into()]
|
9869 + | .auth_scheme(
|
9870 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9871 + | .put("disableDoubleEncoding", true)
|
9872 + | .put("signingName", "s3express".to_string())
|
9873 + | .put("signingRegion", "us-west-2".to_string())
|
11454 9874 | )
|
11455 9875 | .property("backend", "S3Express".to_string())
|
11456 9876 | .build()
|
11457 9877 | );
|
11458 9878 | }
|
11459 9879 |
|
11460 9880 | /// Data Plane sigv4 auth with (13 char) zone with AP and FIPS and dualstack
|
11461 9881 | #[test]
|
11462 9882 | fn test_380() {
|
11463 9883 | let params = crate::config::endpoint::Params::builder()
|
11464 9884 | .region("us-west-2".to_string())
|
11465 9885 | .bucket("myaccesspoint--test-zone-ab1--xa-s3".to_string())
|
11466 9886 | .use_fips(true)
|
11467 9887 | .use_dual_stack(true)
|
11468 9888 | .accelerate(false)
|
11469 9889 | .disable_s3_express_session_auth(true)
|
11470 9890 | .build()
|
11471 9891 | .expect("invalid params");
|
11472 9892 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11473 9893 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11474 9894 | let endpoint = endpoint.expect(
|
11475 9895 | "Expected valid endpoint: https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
11476 9896 | );
|
11477 9897 | assert_eq!(
|
11478 9898 | endpoint,
|
11479 9899 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11480 9900 | .url("https://myaccesspoint--test-zone-ab1--xa-s3.s3express-fips-test-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11481 - | .property(
|
11482 - | "authSchemes",
|
11483 - | vec![{
|
11484 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11485 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11486 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11487 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11488 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11489 - | out
|
11490 - | }
|
11491 - | .into()]
|
9901 + | .auth_scheme(
|
9902 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9903 + | .put("disableDoubleEncoding", true)
|
9904 + | .put("signingName", "s3express".to_string())
|
9905 + | .put("signingRegion", "us-west-2".to_string())
|
11492 9906 | )
|
11493 9907 | .property("backend", "S3Express".to_string())
|
11494 9908 | .build()
|
11495 9909 | );
|
11496 9910 | }
|
11497 9911 |
|
11498 9912 | /// Data Plane with (14 char) zone and AP with dualstack
|
11499 9913 | #[test]
|
11500 9914 | fn test_381() {
|
11501 9915 | let params = crate::config::endpoint::Params::builder()
|
11502 9916 | .region("us-west-2".to_string())
|
11503 9917 | .bucket("myaccesspoint--test1-zone-ab1--xa-s3".to_string())
|
11504 9918 | .use_fips(false)
|
11505 9919 | .use_dual_stack(true)
|
11506 9920 | .accelerate(false)
|
11507 9921 | .use_s3_express_control_endpoint(false)
|
11508 9922 | .build()
|
11509 9923 | .expect("invalid params");
|
11510 9924 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11511 9925 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11512 9926 | let endpoint = endpoint.expect(
|
11513 9927 | "Expected valid endpoint: https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
11514 9928 | );
|
11515 9929 | assert_eq!(
|
11516 9930 | endpoint,
|
11517 9931 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11518 9932 | .url("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11519 - | .property(
|
11520 - | "authSchemes",
|
11521 - | vec![{
|
11522 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11523 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11524 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11525 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11526 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11527 - | out
|
11528 - | }
|
11529 - | .into()]
|
9933 + | .auth_scheme(
|
9934 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9935 + | .put("disableDoubleEncoding", true)
|
9936 + | .put("signingName", "s3express".to_string())
|
9937 + | .put("signingRegion", "us-west-2".to_string())
|
11530 9938 | )
|
11531 9939 | .property("backend", "S3Express".to_string())
|
11532 9940 | .build()
|
11533 9941 | );
|
11534 9942 | }
|
11535 9943 |
|
11536 9944 | /// Data Plane with (14 char) zone and AP with FIPS and dualstack
|
11537 9945 | #[test]
|
11538 9946 | fn test_382() {
|
11539 9947 | let params = crate::config::endpoint::Params::builder()
|
11540 9948 | .region("us-west-2".to_string())
|
11541 9949 | .bucket("myaccesspoint--test1-zone-ab1--xa-s3".to_string())
|
11542 9950 | .use_fips(true)
|
11543 9951 | .use_dual_stack(true)
|
11544 9952 | .accelerate(false)
|
11545 9953 | .use_s3_express_control_endpoint(false)
|
11546 9954 | .build()
|
11547 9955 | .expect("invalid params");
|
11548 9956 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11549 9957 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11550 9958 | let endpoint = endpoint.expect(
|
11551 9959 | "Expected valid endpoint: https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
11552 9960 | );
|
11553 9961 | assert_eq!(
|
11554 9962 | endpoint,
|
11555 9963 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11556 9964 | .url("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11557 - | .property(
|
11558 - | "authSchemes",
|
11559 - | vec![{
|
11560 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11561 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11562 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11563 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11564 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11565 - | out
|
11566 - | }
|
11567 - | .into()]
|
9965 + | .auth_scheme(
|
9966 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
9967 + | .put("disableDoubleEncoding", true)
|
9968 + | .put("signingName", "s3express".to_string())
|
9969 + | .put("signingRegion", "us-west-2".to_string())
|
11568 9970 | )
|
11569 9971 | .property("backend", "S3Express".to_string())
|
11570 9972 | .build()
|
11571 9973 | );
|
11572 9974 | }
|
11573 9975 |
|
11574 9976 | /// Data Plane sigv4 auth with (14 char) zone and AP with dualstack
|
11575 9977 | #[test]
|
11576 9978 | fn test_383() {
|
11577 9979 | let params = crate::config::endpoint::Params::builder()
|
11578 9980 | .region("us-west-2".to_string())
|
11579 9981 | .bucket("myaccesspoint--test1-zone-ab1--xa-s3".to_string())
|
11580 9982 | .use_fips(false)
|
11581 9983 | .use_dual_stack(true)
|
11582 9984 | .accelerate(false)
|
11583 9985 | .disable_s3_express_session_auth(true)
|
11584 9986 | .build()
|
11585 9987 | .expect("invalid params");
|
11586 9988 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11587 9989 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11588 9990 | let endpoint = endpoint.expect(
|
11589 9991 | "Expected valid endpoint: https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
11590 9992 | );
|
11591 9993 | assert_eq!(
|
11592 9994 | endpoint,
|
11593 9995 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11594 9996 | .url("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-test1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11595 - | .property(
|
11596 - | "authSchemes",
|
11597 - | vec![{
|
11598 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11599 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11600 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11601 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11602 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11603 - | out
|
11604 - | }
|
11605 - | .into()]
|
9997 + | .auth_scheme(
|
9998 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
9999 + | .put("disableDoubleEncoding", true)
|
10000 + | .put("signingName", "s3express".to_string())
|
10001 + | .put("signingRegion", "us-west-2".to_string())
|
11606 10002 | )
|
11607 10003 | .property("backend", "S3Express".to_string())
|
11608 10004 | .build()
|
11609 10005 | );
|
11610 10006 | }
|
11611 10007 |
|
11612 10008 | /// Data Plane with (14 char) zone and AP with FIPS and dualstack
|
11613 10009 | #[test]
|
11614 10010 | fn test_384() {
|
11615 10011 | let params = crate::config::endpoint::Params::builder()
|
11616 10012 | .region("us-west-2".to_string())
|
11617 10013 | .bucket("myaccesspoint--test1-zone-ab1--xa-s3".to_string())
|
11618 10014 | .use_fips(true)
|
11619 10015 | .use_dual_stack(true)
|
11620 10016 | .accelerate(false)
|
11621 10017 | .disable_s3_express_session_auth(true)
|
11622 10018 | .build()
|
11623 10019 | .expect("invalid params");
|
11624 10020 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11625 10021 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11626 10022 | let endpoint = endpoint.expect(
|
11627 10023 | "Expected valid endpoint: https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.dualstack.us-west-2.amazonaws.com",
|
11628 10024 | );
|
11629 10025 | assert_eq!(
|
11630 10026 | endpoint,
|
11631 10027 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11632 10028 | .url("https://myaccesspoint--test1-zone-ab1--xa-s3.s3express-fips-test1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11633 - | .property(
|
11634 - | "authSchemes",
|
11635 - | vec![{
|
11636 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11637 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11638 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11639 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11640 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11641 - | out
|
11642 - | }
|
11643 - | .into()]
|
10029 + | .auth_scheme(
|
10030 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
10031 + | .put("disableDoubleEncoding", true)
|
10032 + | .put("signingName", "s3express".to_string())
|
10033 + | .put("signingRegion", "us-west-2".to_string())
|
11644 10034 | )
|
11645 10035 | .property("backend", "S3Express".to_string())
|
11646 10036 | .build()
|
11647 10037 | );
|
11648 10038 | }
|
11649 10039 |
|
11650 10040 | /// Data Plane with (20 char) zone and AP with dualstack
|
11651 10041 | #[test]
|
11652 10042 | fn test_385() {
|
11653 10043 | let params = crate::config::endpoint::Params::builder()
|
11654 10044 | .region("us-west-2".to_string())
|
11655 10045 | .bucket("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_string())
|
11656 10046 | .use_fips(false)
|
11657 10047 | .use_dual_stack(true)
|
11658 10048 | .accelerate(false)
|
11659 10049 | .use_s3_express_control_endpoint(false)
|
11660 10050 | .build()
|
11661 10051 | .expect("invalid params");
|
11662 10052 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11663 10053 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11664 10054 | let endpoint = endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
11665 10055 | assert_eq!(
|
11666 10056 | endpoint,
|
11667 10057 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11668 10058 | .url("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11669 - | .property(
|
11670 - | "authSchemes",
|
11671 - | vec![{
|
11672 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11673 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11674 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11675 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11676 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11677 - | out
|
11678 - | }
|
11679 - | .into()]
|
10059 + | .auth_scheme(
|
10060 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
10061 + | .put("disableDoubleEncoding", true)
|
10062 + | .put("signingName", "s3express".to_string())
|
10063 + | .put("signingRegion", "us-west-2".to_string())
|
11680 10064 | )
|
11681 10065 | .property("backend", "S3Express".to_string())
|
11682 10066 | .build()
|
11683 10067 | );
|
11684 10068 | }
|
11685 10069 |
|
11686 10070 | /// Data Plane with (20 char) zone and AP with FIPS and dualstack
|
11687 10071 | #[test]
|
11688 10072 | fn test_386() {
|
11689 10073 | let params = crate::config::endpoint::Params::builder()
|
11690 10074 | .region("us-west-2".to_string())
|
11691 10075 | .bucket("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_string())
|
11692 10076 | .use_fips(true)
|
11693 10077 | .use_dual_stack(true)
|
11694 10078 | .accelerate(false)
|
11695 10079 | .use_s3_express_control_endpoint(false)
|
11696 10080 | .build()
|
11697 10081 | .expect("invalid params");
|
11698 10082 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11699 10083 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11700 10084 | let endpoint = endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
11701 10085 | assert_eq!(
|
11702 10086 | endpoint,
|
11703 10087 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11704 10088 | .url("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11705 - | .property(
|
11706 - | "authSchemes",
|
11707 - | vec![{
|
11708 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11709 - | out.insert("name".to_string(), "sigv4-s3express".to_string().into());
|
11710 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11711 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11712 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11713 - | out
|
11714 - | }
|
11715 - | .into()]
|
10089 + | .auth_scheme(
|
10090 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4-s3express", 3)
|
10091 + | .put("disableDoubleEncoding", true)
|
10092 + | .put("signingName", "s3express".to_string())
|
10093 + | .put("signingRegion", "us-west-2".to_string())
|
11716 10094 | )
|
11717 10095 | .property("backend", "S3Express".to_string())
|
11718 10096 | .build()
|
11719 10097 | );
|
11720 10098 | }
|
11721 10099 |
|
11722 10100 | /// Data plane AP with sigv4 and dualstack
|
11723 10101 | #[test]
|
11724 10102 | fn test_387() {
|
11725 10103 | let params = crate::config::endpoint::Params::builder()
|
11726 10104 | .region("us-west-2".to_string())
|
11727 10105 | .bucket("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_string())
|
11728 10106 | .use_fips(false)
|
11729 10107 | .use_dual_stack(true)
|
11730 10108 | .accelerate(false)
|
11731 10109 | .disable_s3_express_session_auth(true)
|
11732 10110 | .build()
|
11733 10111 | .expect("invalid params");
|
11734 10112 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11735 10113 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11736 10114 | let endpoint = endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
11737 10115 | assert_eq!(
|
11738 10116 | endpoint,
|
11739 10117 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11740 10118 | .url("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11741 - | .property(
|
11742 - | "authSchemes",
|
11743 - | vec![{
|
11744 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11745 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11746 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11747 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11748 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11749 - | out
|
11750 - | }
|
11751 - | .into()]
|
10119 + | .auth_scheme(
|
10120 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
10121 + | .put("disableDoubleEncoding", true)
|
10122 + | .put("signingName", "s3express".to_string())
|
10123 + | .put("signingRegion", "us-west-2".to_string())
|
11752 10124 | )
|
11753 10125 | .property("backend", "S3Express".to_string())
|
11754 10126 | .build()
|
11755 10127 | );
|
11756 10128 | }
|
11757 10129 |
|
11758 10130 | /// Data plane AP sigv4 with fips and dualstack
|
11759 10131 | #[test]
|
11760 10132 | fn test_388() {
|
11761 10133 | let params = crate::config::endpoint::Params::builder()
|
11762 10134 | .region("us-west-2".to_string())
|
11763 10135 | .bucket("myaccesspoint--test1-long1-zone-ab1--xa-s3".to_string())
|
11764 10136 | .use_fips(true)
|
11765 10137 | .use_dual_stack(true)
|
11766 10138 | .accelerate(false)
|
11767 10139 | .disable_s3_express_session_auth(true)
|
11768 10140 | .build()
|
11769 10141 | .expect("invalid params");
|
11770 10142 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11771 10143 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11772 10144 | let endpoint = endpoint.expect("Expected valid endpoint: https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com");
|
11773 10145 | assert_eq!(
|
11774 10146 | endpoint,
|
11775 10147 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11776 10148 | .url("https://myaccesspoint--test1-long1-zone-ab1--xa-s3.s3express-fips-test1-long1-zone-ab1.dualstack.us-west-2.amazonaws.com")
|
11777 - | .property(
|
11778 - | "authSchemes",
|
11779 - | vec![{
|
11780 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11781 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11782 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11783 - | out.insert("signingRegion".to_string(), "us-west-2".to_string().into());
|
11784 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11785 - | out
|
11786 - | }
|
11787 - | .into()]
|
10149 + | .auth_scheme(
|
10150 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
10151 + | .put("disableDoubleEncoding", true)
|
10152 + | .put("signingName", "s3express".to_string())
|
10153 + | .put("signingRegion", "us-west-2".to_string())
|
11788 10154 | )
|
11789 10155 | .property("backend", "S3Express".to_string())
|
11790 10156 | .build()
|
11791 10157 | );
|
11792 10158 | }
|
11793 10159 |
|
11794 10160 | /// Control plane with dualstack and bucket
|
11795 10161 | #[test]
|
11796 10162 | fn test_389() {
|
11797 10163 | let params = crate::config::endpoint::Params::builder()
|
11798 10164 | .region("us-east-1".to_string())
|
11799 10165 | .bucket("mybucket--test-ab1--x-s3".to_string())
|
11800 10166 | .use_fips(false)
|
11801 10167 | .use_dual_stack(true)
|
11802 10168 | .accelerate(false)
|
11803 10169 | .use_s3_express_control_endpoint(true)
|
11804 10170 | .build()
|
11805 10171 | .expect("invalid params");
|
11806 10172 | let resolver = crate::config::endpoint::DefaultResolver::new();
|
11807 10173 | let endpoint = resolver.resolve_endpoint(¶ms);
|
11808 10174 | let endpoint =
|
11809 10175 | endpoint.expect("Expected valid endpoint: https://s3express-control.dualstack.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3");
|
11810 10176 | assert_eq!(
|
11811 10177 | endpoint,
|
11812 10178 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11813 10179 | .url("https://s3express-control.dualstack.us-east-1.amazonaws.com/mybucket--test-ab1--x-s3")
|
11814 - | .property(
|
11815 - | "authSchemes",
|
11816 - | vec![{
|
11817 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
11818 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
11819 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
11820 - | out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
|
11821 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
11822 - | out
|
11823 - | }
|
11824 - | .into()]
|
10180 + | .auth_scheme(
|
10181 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4", 3)
|
10182 + | .put("disableDoubleEncoding", true)
|
10183 + | .put("signingName", "s3express".to_string())
|
10184 + | .put("signingRegion", "us-east-1".to_string())
|
11825 10185 | )
|
11826 10186 | .property("backend", "S3Express".to_string())
|
11827 10187 | .build()
|
11828 10188 | );
|
11829 10189 | }
|
11830 10190 | }
|
11831 10191 |
|
11832 10192 | /// Endpoint resolver trait specific to Amazon Simple Storage Service
|
11833 10193 | pub trait ResolveEndpoint: ::std::marker::Send + ::std::marker::Sync + ::std::fmt::Debug {
|
11834 10194 | /// Resolve an endpoint with the given parameters
|
11835 10195 | fn resolve_endpoint<'a>(&'a self, params: &'a crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a>;
|
11836 10196 |
|
11837 10197 | /// Convert this service-specific resolver into a `SharedEndpointResolver`
|
11838 10198 | ///
|
11839 10199 | /// The resulting resolver will downcast `EndpointResolverParams` into `crate::config::endpoint::Params`.
|
11840 10200 | fn into_shared_resolver(self) -> ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver
|
11841 10201 | where
|
11842 10202 | Self: Sized + 'static,
|
11843 10203 | {
|
11844 10204 | ::aws_smithy_runtime_api::client::endpoint::SharedEndpointResolver::new(DowncastParams(self))
|
11845 10205 | }
|
11846 10206 | }
|
11847 10207 |
|
11848 10208 | #[derive(Debug)]
|
11849 10209 | struct DowncastParams<T>(T);
|
11850 10210 | impl<T> ::aws_smithy_runtime_api::client::endpoint::ResolveEndpoint for DowncastParams<T>
|
11851 10211 | where
|
11852 10212 | T: ResolveEndpoint,
|
11853 10213 | {
|
11854 10214 | fn resolve_endpoint<'a>(
|
11855 10215 | &'a self,
|
11856 10216 | params: &'a ::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams,
|
11857 10217 | ) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a> {
|
11858 10218 | let ep = match params.get::<crate::config::endpoint::Params>() {
|
11859 10219 | Some(params) => self.0.resolve_endpoint(params),
|
11860 10220 | None => ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(Err("params of expected type was not present".into())),
|
11861 10221 | };
|
11862 10222 | ep
|
11863 10223 | }
|
11864 10224 | }
|
11865 10225 |
|
11866 10226 | #[derive(Debug)]
|
11867 10227 | /// The default endpoint resolver.
|
11868 10228 | pub struct DefaultResolver {
|
11869 10229 | partition_resolver: &'static crate::endpoint_lib::partition::PartitionResolver,
|
10230 + | endpoint_cache: ::std::sync::Mutex<::std::option::Option<(Params, ::aws_smithy_types::endpoint::Endpoint)>>,
|
11870 10231 | }
|
11871 10232 |
|
11872 10233 | impl Default for DefaultResolver {
|
11873 10234 | fn default() -> Self {
|
11874 10235 | Self::new()
|
11875 10236 | }
|
11876 10237 | }
|
11877 10238 |
|
11878 10239 | impl DefaultResolver {
|
11879 10240 | /// Create a new DefaultResolver
|
11880 10241 | pub fn new() -> Self {
|
11881 10242 | Self {
|
11882 10243 | partition_resolver: &crate::endpoint_lib::DEFAULT_PARTITION_RESOLVER,
|
10244 + | endpoint_cache: ::std::sync::Mutex::new(None),
|
11883 10245 | }
|
11884 10246 | }
|
11885 10247 |
|
11886 - | #[allow(clippy::needless_borrow)]
|
11887 - | pub(crate) fn evaluate_fn(
|
11888 - | &self,
|
11889 - | ) -> impl for<'a> FnMut(&ConditionFn, &'a Params, &mut ConditionContext<'a>, &mut crate::endpoint_lib::diagnostic::DiagnosticCollector) -> bool + '_
|
11890 - | {
|
11891 - | move |cond, params, context, _diagnostic_collector| cond.evaluate(params, context, &self.partition_resolver, _diagnostic_collector)
|
11892 - | }
|
11893 - |
|
11894 - | fn resolve_endpoint<'a>(
|
11895 - | &'a self,
|
11896 - | params: &'a crate::config::endpoint::Params,
|
11897 - | ) -> ::std::result::Result<::aws_smithy_types::endpoint::Endpoint, ::aws_smithy_runtime_api::box_error::BoxError> {
|
11898 - | let mut diagnostic_collector = crate::endpoint_lib::diagnostic::DiagnosticCollector::new();
|
11899 - | let mut condition_context = ConditionContext::default();
|
11900 - | let result = crate::endpoint_lib::bdd_interpreter::evaluate_bdd(
|
11901 - | &NODES,
|
11902 - | &CONDITIONS,
|
11903 - | &RESULTS,
|
11904 - | 521,
|
11905 - | params,
|
11906 - | &mut condition_context,
|
11907 - | &mut diagnostic_collector,
|
11908 - | self.evaluate_fn(),
|
11909 - | );
|
11910 - |
|
11911 - | match result {
|
11912 - | ::std::option::Option::Some(endpoint) => match endpoint.to_endpoint(params, &condition_context) {
|
11913 - | Ok(ep) => Ok(ep),
|
11914 - | Err(err) => Err(Box::new(err)),
|
11915 - | },
|
11916 - | ::std::option::Option::None => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11917 - | "No endpoint rule matched",
|
11918 - | ))),
|
11919 - | }
|
11920 - | }
|
11921 - | }
|
11922 - |
|
11923 - | impl crate::config::endpoint::ResolveEndpoint for DefaultResolver {
|
11924 - | fn resolve_endpoint<'a>(&'a self, params: &'a crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a> {
|
11925 - | let result = self.resolve_endpoint(params);
|
11926 - |
|
11927 - | ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(result)
|
11928 - | }
|
11929 - | }
|
11930 - | #[derive(Debug)]
|
11931 - | pub(crate) enum ConditionFn {
|
11932 - | Cond0,
|
11933 - | Cond1,
|
11934 - | Cond2,
|
11935 - | Cond3,
|
11936 - | Cond4,
|
11937 - | Cond5,
|
11938 - | Cond6,
|
11939 - | Cond7,
|
11940 - | Cond8,
|
11941 - | Cond9,
|
11942 - | Cond10,
|
11943 - | Cond11,
|
11944 - | Cond12,
|
11945 - | Cond13,
|
11946 - | Cond14,
|
11947 - | Cond15,
|
11948 - | Cond16,
|
11949 - | Cond17,
|
11950 - | Cond18,
|
11951 - | Cond19,
|
11952 - | Cond20,
|
11953 - | Cond21,
|
11954 - | Cond22,
|
11955 - | Cond23,
|
11956 - | Cond24,
|
11957 - | Cond25,
|
11958 - | Cond26,
|
11959 - | Cond27,
|
11960 - | Cond28,
|
11961 - | Cond29,
|
11962 - | Cond30,
|
11963 - | Cond31,
|
11964 - | Cond32,
|
11965 - | Cond33,
|
11966 - | Cond34,
|
11967 - | Cond35,
|
11968 - | Cond36,
|
11969 - | Cond37,
|
11970 - | Cond38,
|
11971 - | Cond39,
|
11972 - | Cond40,
|
11973 - | Cond41,
|
11974 - | Cond42,
|
11975 - | Cond43,
|
11976 - | Cond44,
|
11977 - | Cond45,
|
11978 - | Cond46,
|
11979 - | Cond47,
|
11980 - | Cond48,
|
11981 - | Cond49,
|
11982 - | Cond50,
|
11983 - | Cond51,
|
11984 - | Cond52,
|
11985 - | Cond53,
|
11986 - | Cond54,
|
11987 - | Cond55,
|
11988 - | Cond56,
|
11989 - | Cond57,
|
11990 - | Cond58,
|
11991 - | Cond59,
|
11992 - | Cond60,
|
11993 - | Cond61,
|
11994 - | Cond62,
|
11995 - | Cond63,
|
11996 - | Cond64,
|
11997 - | Cond65,
|
11998 - | Cond66,
|
11999 - | Cond67,
|
12000 - | Cond68,
|
12001 - | Cond69,
|
12002 - | Cond70,
|
12003 - | Cond71,
|
12004 - | Cond72,
|
12005 - | Cond73,
|
12006 - | Cond74,
|
12007 - | Cond75,
|
12008 - | }
|
12009 - |
|
12010 - | impl ConditionFn {
|
12011 10248 | #[allow(
|
12012 10249 | unused_variables,
|
12013 10250 | unused_parens,
|
12014 10251 | clippy::double_parens,
|
12015 10252 | clippy::useless_conversion,
|
12016 10253 | clippy::bool_comparison,
|
12017 10254 | clippy::comparison_to_empty,
|
12018 10255 | clippy::needless_borrow,
|
12019 10256 | clippy::useless_asref
|
12020 10257 | )]
|
12021 - | fn evaluate<'a>(
|
12022 - | &self,
|
12023 - | params: &'a Params,
|
12024 - | context: &mut ConditionContext<'a>,
|
12025 - | partition_resolver: &'a crate::endpoint_lib::partition::PartitionResolver,
|
12026 - | _diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector,
|
12027 - | ) -> bool {
|
10258 + | fn resolve_endpoint<'a>(
|
10259 + | &'a self,
|
10260 + | params: &'a crate::config::endpoint::Params,
|
10261 + | ) -> ::std::result::Result<::aws_smithy_types::endpoint::Endpoint, ::aws_smithy_runtime_api::box_error::BoxError> {
|
10262 + | let mut _diagnostic_collector = crate::endpoint_lib::diagnostic::DiagnosticCollector::new();
|
10263 + | let mut context = ConditionContext::default();
|
10264 + |
|
12028 10265 | // Param bindings
|
12029 10266 | let bucket = ¶ms.bucket;
|
12030 10267 | let region = ¶ms.region;
|
12031 10268 | let use_fips = ¶ms.use_fips;
|
12032 10269 | let use_dual_stack = ¶ms.use_dual_stack;
|
12033 10270 | let endpoint = ¶ms.endpoint;
|
12034 10271 | let force_path_style = ¶ms.force_path_style;
|
12035 10272 | let accelerate = ¶ms.accelerate;
|
12036 10273 | let use_global_endpoint = ¶ms.use_global_endpoint;
|
12037 10274 | let use_object_lambda_endpoint = ¶ms.use_object_lambda_endpoint;
|
12038 10275 | let key = ¶ms.key;
|
12039 10276 | let prefix = ¶ms.prefix;
|
12040 10277 | let copy_source = ¶ms.copy_source;
|
12041 10278 | let disable_access_points = ¶ms.disable_access_points;
|
12042 10279 | let disable_multi_region_access_points = ¶ms.disable_multi_region_access_points;
|
12043 10280 | let use_arn_region = ¶ms.use_arn_region;
|
12044 10281 | let use_s3_express_control_endpoint = ¶ms.use_s3_express_control_endpoint;
|
12045 10282 | let disable_s3_express_session_auth = ¶ms.disable_s3_express_session_auth;
|
12046 10283 |
|
12047 - | // Non-Param references
|
12048 - | let effective_std_region = &mut context.effective_std_region;
|
12049 - | let partition_result = &mut context.partition_result;
|
12050 - | let url = &mut context.url;
|
12051 - | let access_point_suffix = &mut context.access_point_suffix;
|
12052 - | let region_prefix = &mut context.region_prefix;
|
12053 - | let hardware_type = &mut context.hardware_type;
|
12054 - | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12055 - | let s3_e_ds = &mut context.s3_e_ds;
|
12056 - | let s3_e_fips = &mut context.s3_e_fips;
|
12057 - | let s3_e_auth = &mut context.s3_e_auth;
|
12058 - | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12059 - | let bucket_arn = &mut context.bucket_arn;
|
12060 - | let effective_arn_region = &mut context.effective_arn_region;
|
12061 - | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12062 - | let arn_type = &mut context.arn_type;
|
12063 - | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12064 - | let bucket_partition = &mut context.bucket_partition;
|
12065 - | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12066 - | let outpost_type = &mut context.outpost_type;
|
12067 - | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12068 - | match self {
|
12069 - | Self::Cond0 => region.is_some(),
|
12070 - | Self::Cond1 => {
|
12071 - | *effective_std_region = Some(
|
12072 - | crate::endpoint_lib::ite::ite!(
|
12073 - | (region) == &mut Some(("aws-global".into())),
|
12074 - | "us-east-1".to_string(),
|
12075 - | region.clone().expect("Reference already confirmed Some")
|
10284 + | let mut current_ref: i32 = 521;
|
10285 + | loop {
|
10286 + | match current_ref {
|
10287 + | ref_val if ref_val >= 100_000_000 => {
|
10288 + | return match (ref_val - 100_000_000) as usize {
|
10289 + | 0 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10290 + | "No endpoint rule matched",
|
10291 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10292 + | 1 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10293 + | "Accelerate cannot be used with FIPS".to_string(),
|
10294 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10295 + | 2 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10296 + | "Cannot set dual-stack in combination with a custom endpoint.".to_string(),
|
10297 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10298 + | 3 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10299 + | "A custom endpoint cannot be combined with FIPS".to_string(),
|
10300 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10301 + | 4 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10302 + | "A custom endpoint cannot be combined with S3 Accelerate".to_string(),
|
10303 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10304 + | 5 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10305 + | "Partition does not support FIPS".to_string(),
|
10306 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10307 + | 6 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10308 + | "S3Express does not support S3 Accelerate.".to_string(),
|
10309 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10310 + | 7 => {
|
10311 + | let effective_std_region = context
|
10312 + | .effective_std_region
|
10313 + | .as_ref()
|
10314 + | .expect("Guaranteed to have a value by earlier checks.");
|
10315 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10316 + | let s3_e_auth = context.s3_e_auth.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10317 + | let uri_encoded_bucket = context
|
10318 + | .uri_encoded_bucket
|
10319 + | .as_ref()
|
10320 + | .expect("Guaranteed to have a value by earlier checks.");
|
10321 + | ::std::result::Result::Ok(
|
10322 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10323 + | .url({
|
10324 + | let mut out = String::new();
|
10325 + | #[allow(clippy::needless_borrow)]
|
10326 + | out.push_str(&url.scheme());
|
10327 + | out.push_str("://");
|
10328 + | #[allow(clippy::needless_borrow)]
|
10329 + | out.push_str(&url.authority());
|
10330 + | out.push('/');
|
10331 + | #[allow(clippy::needless_borrow)]
|
10332 + | out.push_str(&uri_encoded_bucket.as_ref());
|
10333 + | #[allow(clippy::needless_borrow)]
|
10334 + | out.push_str(&url.path());
|
10335 + | out
|
10336 + | })
|
10337 + | .property("backend", "S3Express".to_string())
|
10338 + | .auth_scheme(
|
10339 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity(s3_e_auth.to_owned(), 3)
|
10340 + | .put("disableDoubleEncoding", true)
|
10341 + | .put("signingName", "s3express")
|
10342 + | .put("signingRegion", effective_std_region.as_ref()),
|
12076 10343 | )
|
12077 - | .into(),
|
12078 - | );
|
12079 - | true
|
12080 - | }
|
12081 - | Self::Cond2 => (accelerate) == (&true),
|
12082 - | Self::Cond3 => (use_fips) == (&true),
|
12083 - | Self::Cond4 => endpoint.is_some(),
|
12084 - | Self::Cond5 => (use_dual_stack) == (&true),
|
12085 - | Self::Cond6 => bucket.is_some(),
|
12086 - | Self::Cond7 => {
|
12087 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12088 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12089 - | if let Some(param) = bucket { param } else { return false },
|
12090 - | 0,
|
12091 - | 6,
|
12092 - | true,
|
12093 - | _diagnostic_collector
|
12094 - | ) {
|
12095 - | inner
|
12096 - | } else {
|
12097 - | return false;
|
12098 - | },
|
12099 - | ""
|
12100 - | )) == ("--x-s3")
|
12101 - | }
|
12102 - | Self::Cond8 => {
|
12103 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12104 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12105 - | if let Some(param) = bucket { param } else { return false },
|
12106 - | 0,
|
12107 - | 7,
|
12108 - | true,
|
12109 - | _diagnostic_collector
|
12110 - | ) {
|
12111 - | inner
|
12112 - | } else {
|
12113 - | return false;
|
12114 - | },
|
12115 - | ""
|
12116 - | )) == ("--xa-s3")
|
12117 - | }
|
12118 - | Self::Cond9 => {
|
12119 - | *partition_result = partition_resolver
|
12120 - | .resolve_partition(if let Some(param) = region { param } else { return false }, _diagnostic_collector)
|
12121 - | .map(|inner| inner.into());
|
12122 - | partition_result.is_some()
|
12123 - | }
|
12124 - | Self::Cond10 => {
|
12125 - | *url =
|
12126 - | crate::endpoint_lib::parse_url::parse_url(if let Some(param) = endpoint { param } else { return false }, _diagnostic_collector)
|
12127 - | .map(|inner| inner.into());
|
12128 - | url.is_some()
|
12129 - | }
|
12130 - | Self::Cond11 => {
|
12131 - | *access_point_suffix = crate::endpoint_lib::substring::substring(
|
12132 - | if let Some(param) = bucket { param } else { return false },
|
12133 - | 0,
|
12134 - | 7,
|
12135 - | true,
|
12136 - | _diagnostic_collector,
|
10344 + | .build(),
|
12137 10345 | )
|
12138 - | .map(|inner| inner.into());
|
12139 - | access_point_suffix.is_some()
|
12140 10346 | }
|
12141 - | Self::Cond12 => (access_point_suffix) == &mut Some(("--op-s3".into())),
|
12142 - | Self::Cond13 => {
|
12143 - | *region_prefix = crate::endpoint_lib::substring::substring(
|
12144 - | if let Some(param) = bucket { param } else { return false },
|
12145 - | 8,
|
12146 - | 12,
|
12147 - | true,
|
12148 - | _diagnostic_collector,
|
10347 + | 8 => {
|
10348 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
10349 + | let effective_std_region = context
|
10350 + | .effective_std_region
|
10351 + | .as_ref()
|
10352 + | .expect("Guaranteed to have a value by earlier checks.");
|
10353 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10354 + | let s3_e_auth = context.s3_e_auth.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10355 + | ::std::result::Result::Ok(
|
10356 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10357 + | .url({
|
10358 + | let mut out = String::new();
|
10359 + | #[allow(clippy::needless_borrow)]
|
10360 + | out.push_str(&url.scheme());
|
10361 + | out.push_str("://");
|
10362 + | #[allow(clippy::needless_borrow)]
|
10363 + | out.push_str(&bucket.as_ref());
|
10364 + | out.push('.');
|
10365 + | #[allow(clippy::needless_borrow)]
|
10366 + | out.push_str(&url.authority());
|
10367 + | #[allow(clippy::needless_borrow)]
|
10368 + | out.push_str(&url.path());
|
10369 + | out
|
10370 + | })
|
10371 + | .property("backend", "S3Express".to_string())
|
10372 + | .auth_scheme(
|
10373 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity(s3_e_auth.to_owned(), 3)
|
10374 + | .put("disableDoubleEncoding", true)
|
10375 + | .put("signingName", "s3express")
|
10376 + | .put("signingRegion", effective_std_region.as_ref()),
|
10377 + | )
|
10378 + | .build(),
|
12149 10379 | )
|
12150 - | .map(|inner| inner.into());
|
12151 - | region_prefix.is_some()
|
12152 10380 | }
|
12153 - | Self::Cond14 => {
|
12154 - | *hardware_type = crate::endpoint_lib::substring::substring(
|
12155 - | if let Some(param) = bucket { param } else { return false },
|
12156 - | 49,
|
12157 - | 50,
|
12158 - | true,
|
12159 - | _diagnostic_collector,
|
10381 + | 9 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10382 + | "S3Express bucket name is not a valid virtual hostable name.".to_string(),
|
10383 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10384 + | 10 => {
|
10385 + | let effective_std_region = context
|
10386 + | .effective_std_region
|
10387 + | .as_ref()
|
10388 + | .expect("Guaranteed to have a value by earlier checks.");
|
10389 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10390 + | let s3_e_ds = context.s3_e_ds.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10391 + | let s3_e_fips = context.s3_e_fips.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10392 + | let uri_encoded_bucket = context
|
10393 + | .uri_encoded_bucket
|
10394 + | .as_ref()
|
10395 + | .expect("Guaranteed to have a value by earlier checks.");
|
10396 + | ::std::result::Result::Ok(
|
10397 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10398 + | .url({
|
10399 + | let mut out = String::new();
|
10400 + | out.push_str("https://s3express-control");
|
10401 + | #[allow(clippy::needless_borrow)]
|
10402 + | out.push_str(&s3_e_fips.as_ref());
|
10403 + | #[allow(clippy::needless_borrow)]
|
10404 + | out.push_str(&s3_e_ds.as_ref());
|
10405 + | out.push('.');
|
10406 + | #[allow(clippy::needless_borrow)]
|
10407 + | out.push_str(&effective_std_region.as_ref());
|
10408 + | out.push('.');
|
10409 + | #[allow(clippy::needless_borrow)]
|
10410 + | out.push_str(&partition_result.dns_suffix());
|
10411 + | out.push('/');
|
10412 + | #[allow(clippy::needless_borrow)]
|
10413 + | out.push_str(&uri_encoded_bucket.as_ref());
|
10414 + | out
|
10415 + | })
|
10416 + | .property("backend", "S3Express".to_string())
|
10417 + | .auth_scheme(
|
10418 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10419 + | .put("disableDoubleEncoding", true)
|
10420 + | .put("signingName", "s3express")
|
10421 + | .put("signingRegion", effective_std_region.as_ref()),
|
12160 10422 | )
|
12161 - | .map(|inner| inner.into());
|
12162 - | hardware_type.is_some()
|
12163 - | }
|
12164 - | Self::Cond15 => {
|
12165 - | *outpost_id_ssa_2 = crate::endpoint_lib::substring::substring(
|
12166 - | if let Some(param) = bucket { param } else { return false },
|
12167 - | 32,
|
12168 - | 49,
|
12169 - | true,
|
12170 - | _diagnostic_collector,
|
10423 + | .build(),
|
12171 10424 | )
|
12172 - | .map(|inner| inner.into());
|
12173 - | outpost_id_ssa_2.is_some()
|
12174 - | }
|
12175 - | Self::Cond16 => {
|
12176 - | (if let Some(inner) = partition_result {
|
12177 - | inner.name()
|
12178 - | } else {
|
12179 - | return false;
|
12180 - | }) == ("aws-cn")
|
12181 10425 | }
|
12182 - | Self::Cond17 => {
|
12183 - | *s3_e_ds = Some(crate::endpoint_lib::ite::ite!(use_dual_stack, ".dualstack".to_string(), "".to_string()).into());
|
12184 - | true
|
10426 + | 11 => {
|
10427 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
10428 + | let effective_std_region = context
|
10429 + | .effective_std_region
|
10430 + | .as_ref()
|
10431 + | .expect("Guaranteed to have a value by earlier checks.");
|
10432 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10433 + | let s3_e_ds = context.s3_e_ds.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10434 + | let s3_e_fips = context.s3_e_fips.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10435 + | let s3_e_auth = context.s3_e_auth.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10436 + | let s3express_availability_zone_id = context
|
10437 + | .s3express_availability_zone_id
|
10438 + | .as_ref()
|
10439 + | .expect("Guaranteed to have a value by earlier checks.");
|
10440 + | ::std::result::Result::Ok(
|
10441 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10442 + | .url({
|
10443 + | let mut out = String::new();
|
10444 + | out.push_str("https://");
|
10445 + | #[allow(clippy::needless_borrow)]
|
10446 + | out.push_str(&bucket.as_ref());
|
10447 + | out.push_str(".s3express");
|
10448 + | #[allow(clippy::needless_borrow)]
|
10449 + | out.push_str(&s3_e_fips.as_ref());
|
10450 + | out.push('-');
|
10451 + | #[allow(clippy::needless_borrow)]
|
10452 + | out.push_str(&s3express_availability_zone_id.as_ref());
|
10453 + | #[allow(clippy::needless_borrow)]
|
10454 + | out.push_str(&s3_e_ds.as_ref());
|
10455 + | out.push('.');
|
10456 + | #[allow(clippy::needless_borrow)]
|
10457 + | out.push_str(&effective_std_region.as_ref());
|
10458 + | out.push('.');
|
10459 + | #[allow(clippy::needless_borrow)]
|
10460 + | out.push_str(&partition_result.dns_suffix());
|
10461 + | out
|
10462 + | })
|
10463 + | .property("backend", "S3Express".to_string())
|
10464 + | .auth_scheme(
|
10465 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity(s3_e_auth.to_owned(), 3)
|
10466 + | .put("disableDoubleEncoding", true)
|
10467 + | .put("signingName", "s3express")
|
10468 + | .put("signingRegion", effective_std_region.as_ref()),
|
10469 + | )
|
10470 + | .build(),
|
10471 + | )
|
12185 10472 | }
|
12186 - | Self::Cond18 => {
|
12187 - | *s3_e_fips = Some(crate::endpoint_lib::ite::ite!(use_fips, "-fips".to_string(), "".to_string()).into());
|
12188 - | true
|
10473 + | 12 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10474 + | "Unrecognized S3Express bucket name format.".to_string(),
|
10475 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10476 + | 13 => {
|
10477 + | let effective_std_region = context
|
10478 + | .effective_std_region
|
10479 + | .as_ref()
|
10480 + | .expect("Guaranteed to have a value by earlier checks.");
|
10481 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10482 + | let s3_e_auth = context.s3_e_auth.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10483 + | ::std::result::Result::Ok(
|
10484 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10485 + | .url({
|
10486 + | let mut out = String::new();
|
10487 + | #[allow(clippy::needless_borrow)]
|
10488 + | out.push_str(&url.scheme());
|
10489 + | out.push_str("://");
|
10490 + | #[allow(clippy::needless_borrow)]
|
10491 + | out.push_str(&url.authority());
|
10492 + | #[allow(clippy::needless_borrow)]
|
10493 + | out.push_str(&url.path());
|
10494 + | out
|
10495 + | })
|
10496 + | .property("backend", "S3Express".to_string())
|
10497 + | .auth_scheme(
|
10498 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity(s3_e_auth.to_owned(), 3)
|
10499 + | .put("disableDoubleEncoding", true)
|
10500 + | .put("signingName", "s3express")
|
10501 + | .put("signingRegion", effective_std_region.as_ref()),
|
10502 + | )
|
10503 + | .build(),
|
10504 + | )
|
12189 10505 | }
|
12190 - | Self::Cond19 => (force_path_style) == (&true),
|
12191 - | Self::Cond20 => {
|
12192 - | *s3_e_auth = Some(
|
12193 - | crate::endpoint_lib::ite::ite!(
|
12194 - | crate::endpoint_lib::coalesce::coalesce!(*disable_s3_express_session_auth, false),
|
12195 - | "sigv4".to_string(),
|
12196 - | "sigv4-s3express".to_string()
|
10506 + | 14 => {
|
10507 + | let effective_std_region = context
|
10508 + | .effective_std_region
|
10509 + | .as_ref()
|
10510 + | .expect("Guaranteed to have a value by earlier checks.");
|
10511 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10512 + | let s3_e_ds = context.s3_e_ds.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10513 + | let s3_e_fips = context.s3_e_fips.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10514 + | ::std::result::Result::Ok(
|
10515 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10516 + | .url({
|
10517 + | let mut out = String::new();
|
10518 + | out.push_str("https://s3express-control");
|
10519 + | #[allow(clippy::needless_borrow)]
|
10520 + | out.push_str(&s3_e_fips.as_ref());
|
10521 + | #[allow(clippy::needless_borrow)]
|
10522 + | out.push_str(&s3_e_ds.as_ref());
|
10523 + | out.push('.');
|
10524 + | #[allow(clippy::needless_borrow)]
|
10525 + | out.push_str(&effective_std_region.as_ref());
|
10526 + | out.push('.');
|
10527 + | #[allow(clippy::needless_borrow)]
|
10528 + | out.push_str(&partition_result.dns_suffix());
|
10529 + | out
|
10530 + | })
|
10531 + | .property("backend", "S3Express".to_string())
|
10532 + | .auth_scheme(
|
10533 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10534 + | .put("disableDoubleEncoding", true)
|
10535 + | .put("signingName", "s3express")
|
10536 + | .put("signingRegion", effective_std_region.as_ref()),
|
10537 + | )
|
10538 + | .build(),
|
12197 10539 | )
|
12198 - | .into(),
|
12199 - | );
|
12200 - | true
|
12201 10540 | }
|
12202 - | Self::Cond21 => crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(
|
12203 - | if let Some(param) = bucket { param } else { return false },
|
12204 - | false,
|
12205 - | _diagnostic_collector,
|
12206 - | ),
|
12207 - | Self::Cond22 => {
|
12208 - | *s3express_availability_zone_id = crate::endpoint_lib::split::split(
|
12209 - | if let Some(param) = bucket { param } else { return false },
|
12210 - | "--",
|
12211 - | 0,
|
12212 - | _diagnostic_collector,
|
10541 + | 15 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10542 + | "Expected a endpoint to be specified but no endpoint was found".to_string(),
|
10543 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10544 + | 16 => {
|
10545 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
10546 + | let effective_std_region = context
|
10547 + | .effective_std_region
|
10548 + | .as_ref()
|
10549 + | .expect("Guaranteed to have a value by earlier checks.");
|
10550 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10551 + | ::std::result::Result::Ok(
|
10552 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10553 + | .url({
|
10554 + | let mut out = String::new();
|
10555 + | out.push_str("https://");
|
10556 + | #[allow(clippy::needless_borrow)]
|
10557 + | out.push_str(&bucket.as_ref());
|
10558 + | out.push_str(".ec2.");
|
10559 + | #[allow(clippy::needless_borrow)]
|
10560 + | out.push_str(&url.authority());
|
10561 + | out
|
10562 + | })
|
10563 + | .auth_scheme(
|
10564 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4a".to_string(), 3)
|
10565 + | .put("disableDoubleEncoding", true)
|
10566 + | .put("signingName", "s3-outposts")
|
10567 + | .put("signingRegionSet", vec![::aws_smithy_types::Document::from("*".to_string())]),
|
10568 + | )
|
10569 + | .auth_scheme(
|
10570 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10571 + | .put("disableDoubleEncoding", true)
|
10572 + | .put("signingName", "s3-outposts")
|
10573 + | .put("signingRegion", effective_std_region.as_ref()),
|
10574 + | )
|
10575 + | .build(),
|
12213 10576 | )
|
12214 - | .get(1)
|
12215 - | .cloned()
|
12216 - | .map(|inner| inner.into());
|
12217 - | s3express_availability_zone_id.is_some()
|
12218 10577 | }
|
12219 - | Self::Cond23 => crate::endpoint_lib::host::is_valid_host_label(
|
12220 - | if let Some(param) = outpost_id_ssa_2 { param } else { return false },
|
12221 - | false,
|
12222 - | _diagnostic_collector,
|
12223 - | ),
|
12224 - | Self::Cond24 => (crate::endpoint_lib::coalesce::coalesce!(*use_s3_express_control_endpoint, false)) == (true),
|
12225 - | Self::Cond25 => (region_prefix) == &mut Some(("beta".into())),
|
12226 - | Self::Cond26 => crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(
|
12227 - | if let Some(param) = bucket { param } else { return false },
|
12228 - | true,
|
12229 - | _diagnostic_collector,
|
12230 - | ),
|
12231 - | Self::Cond27 => {
|
12232 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12233 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12234 - | if let Some(param) = bucket { param } else { return false },
|
12235 - | 16,
|
12236 - | 18,
|
12237 - | true,
|
12238 - | _diagnostic_collector
|
12239 - | ) {
|
12240 - | inner
|
12241 - | } else {
|
12242 - | return false;
|
12243 - | },
|
12244 - | ""
|
12245 - | )) == ("--")
|
10578 + | 17 => {
|
10579 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
10580 + | let effective_std_region = context
|
10581 + | .effective_std_region
|
10582 + | .as_ref()
|
10583 + | .expect("Guaranteed to have a value by earlier checks.");
|
10584 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10585 + | ::std::result::Result::Ok(
|
10586 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10587 + | .url({
|
10588 + | let mut out = String::new();
|
10589 + | out.push_str("https://");
|
10590 + | #[allow(clippy::needless_borrow)]
|
10591 + | out.push_str(&bucket.as_ref());
|
10592 + | out.push_str(".ec2.s3-outposts.");
|
10593 + | #[allow(clippy::needless_borrow)]
|
10594 + | out.push_str(&effective_std_region.as_ref());
|
10595 + | out.push('.');
|
10596 + | #[allow(clippy::needless_borrow)]
|
10597 + | out.push_str(&partition_result.dns_suffix());
|
10598 + | out
|
10599 + | })
|
10600 + | .auth_scheme(
|
10601 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4a".to_string(), 3)
|
10602 + | .put("disableDoubleEncoding", true)
|
10603 + | .put("signingName", "s3-outposts")
|
10604 + | .put("signingRegionSet", vec![::aws_smithy_types::Document::from("*".to_string())]),
|
10605 + | )
|
10606 + | .auth_scheme(
|
10607 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10608 + | .put("disableDoubleEncoding", true)
|
10609 + | .put("signingName", "s3-outposts")
|
10610 + | .put("signingRegion", effective_std_region.as_ref()),
|
10611 + | )
|
10612 + | .build(),
|
10613 + | )
|
12246 10614 | }
|
12247 - | Self::Cond28 => {
|
12248 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12249 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12250 - | if let Some(param) = bucket { param } else { return false },
|
12251 - | 21,
|
12252 - | 23,
|
12253 - | true,
|
12254 - | _diagnostic_collector
|
12255 - | ) {
|
12256 - | inner
|
12257 - | } else {
|
12258 - | return false;
|
12259 - | },
|
12260 - | ""
|
12261 - | )) == ("--")
|
10615 + | 18 => {
|
10616 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
10617 + | let effective_std_region = context
|
10618 + | .effective_std_region
|
10619 + | .as_ref()
|
10620 + | .expect("Guaranteed to have a value by earlier checks.");
|
10621 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10622 + | let outpost_id_ssa_2 = context.outpost_id_ssa_2.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10623 + | ::std::result::Result::Ok(
|
10624 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
10625 + | .url({
|
10626 + | let mut out = String::new();
|
10627 + | out.push_str("https://");
|
10628 + | #[allow(clippy::needless_borrow)]
|
10629 + | out.push_str(&bucket.as_ref());
|
10630 + | out.push_str(".op-");
|
10631 + | #[allow(clippy::needless_borrow)]
|
10632 + | out.push_str(&outpost_id_ssa_2.as_ref());
|
10633 + | out.push('.');
|
10634 + | #[allow(clippy::needless_borrow)]
|
10635 + | out.push_str(&url.authority());
|
10636 + | out
|
10637 + | })
|
10638 + | .auth_scheme(
|
10639 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4a".to_string(), 3)
|
10640 + | .put("disableDoubleEncoding", true)
|
10641 + | .put("signingName", "s3-outposts")
|
10642 + | .put("signingRegionSet", vec![::aws_smithy_types::Document::from("*".to_string())]),
|
10643 + | )
|
10644 + | .auth_scheme(
|
10645 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10646 + | .put("disableDoubleEncoding", true)
|
10647 + | .put("signingName", "s3-outposts")
|
10648 + | .put("signingRegion", effective_std_region.as_ref()),
|
10649 + | )
|
10650 + | .build(),
|
10651 + | )
|
12262 10652 | }
|
12263 - | Self::Cond29 => (if let Some(inner) = url { inner.scheme() } else { return false }) == ("http"),
|
12264 - | Self::Cond30 => crate::endpoint_lib::host::is_valid_host_label(
|
12265 - | if let Some(param) = region { param } else { return false },
|
12266 - | false,
|
12267 - | _diagnostic_collector,
|
12268 - | ),
|
12269 - | Self::Cond31 => {
|
12270 - | *bucket_arn = crate::endpoint_lib::arn::parse_arn(if let Some(param) = bucket { param } else { return false }, _diagnostic_collector)
|
12271 - | .map(|inner| inner.into());
|
12272 - | bucket_arn.is_some()
|
12273 - | }
|
12274 - | Self::Cond32 => {
|
12275 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12276 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12277 - | if let Some(param) = bucket { param } else { return false },
|
12278 - | 27,
|
12279 - | 29,
|
12280 - | true,
|
12281 - | _diagnostic_collector
|
12282 - | ) {
|
12283 - | inner
|
12284 - | } else {
|
12285 - | return false;
|
12286 - | },
|
12287 - | ""
|
12288 - | )) == ("--")
|
12289 - | }
|
12290 - | Self::Cond33 => {
|
12291 - | *effective_arn_region = Some(
|
12292 - | crate::endpoint_lib::ite::ite!(
|
12293 - | crate::endpoint_lib::coalesce::coalesce!(*use_arn_region, true),
|
12294 - | if let Some(inner) = bucket_arn { inner.region() } else { return false }.to_string(),
|
12295 - | region.clone().expect("Reference already confirmed Some")
|
12296 - | )
|
12297 - | .into(),
|
12298 - | );
|
12299 - | true
|
12300 - | }
|
12301 - | Self::Cond34 => (if let Some(inner) = url { inner.is_ip() } else { return false }) == (true),
|
12302 - | Self::Cond35 => {
|
12303 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12304 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12305 - | if let Some(param) = bucket { param } else { return false },
|
12306 - | 0,
|
12307 - | 4,
|
12308 - | false,
|
12309 - | _diagnostic_collector
|
12310 - | ) {
|
12311 - | inner
|
12312 - | } else {
|
12313 - | return false;
|
12314 - | },
|
12315 - | ""
|
12316 - | )) == ("arn:")
|
12317 - | }
|
12318 - | Self::Cond36 => {
|
12319 - | *uri_encoded_bucket = Some(
|
12320 - | crate::endpoint_lib::uri_encode::uri_encode(if let Some(param) = bucket { param } else { return false }, _diagnostic_collector)
|
12321 - | .into(),
|
12322 - | );
|
12323 - | true
|
12324 - | }
|
12325 - | Self::Cond37 => (crate::endpoint_lib::coalesce::coalesce!(*use_object_lambda_endpoint, false)) == (true),
|
12326 - | Self::Cond38 => {
|
12327 - | *arn_type = if let Some(inner) = bucket_arn {
|
12328 - | inner.resource_id().first().cloned()
|
12329 - | } else {
|
12330 - | return false;
|
12331 - | }
|
12332 - | .map(|inner| inner.into());
|
12333 - | arn_type.is_some()
|
12334 - | }
|
12335 - | Self::Cond39 => (arn_type) == &mut Some(("".into())),
|
12336 - | Self::Cond40 => (arn_type) == &mut Some(("accesspoint".into())),
|
12337 - | Self::Cond41 => {
|
12338 - | *access_point_name_ssa_1 = if let Some(inner) = bucket_arn {
|
12339 - | inner.resource_id().get(1).cloned()
|
12340 - | } else {
|
12341 - | return false;
|
12342 - | }
|
12343 - | .map(|inner| inner.into());
|
12344 - | access_point_name_ssa_1.is_some()
|
12345 - | }
|
12346 - | Self::Cond42 => (access_point_name_ssa_1) == &mut Some(("".into())),
|
12347 - | Self::Cond43 => (if let Some(inner) = bucket_arn { inner.service() } else { return false }) == ("s3-object-lambda"),
|
12348 - | Self::Cond44 => crate::endpoint_lib::host::is_valid_host_label(
|
12349 - | if let Some(param) = region { param } else { return false },
|
12350 - | true,
|
12351 - | _diagnostic_collector,
|
12352 - | ),
|
12353 - | Self::Cond45 => (if let Some(inner) = bucket_arn { inner.region() } else { return false }) == (""),
|
12354 - | Self::Cond46 => (hardware_type) == &mut Some(("e".into())),
|
12355 - | Self::Cond47 => {
|
12356 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12357 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12358 - | if let Some(param) = bucket { param } else { return false },
|
12359 - | 26,
|
12360 - | 28,
|
12361 - | true,
|
12362 - | _diagnostic_collector
|
12363 - | ) {
|
12364 - | inner
|
12365 - | } else {
|
12366 - | return false;
|
12367 - | },
|
12368 - | ""
|
12369 - | )) == ("--")
|
12370 - | }
|
12371 - | Self::Cond48 => {
|
12372 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12373 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12374 - | if let Some(param) = bucket { param } else { return false },
|
12375 - | 19,
|
12376 - | 21,
|
12377 - | true,
|
12378 - | _diagnostic_collector
|
12379 - | ) {
|
12380 - | inner
|
12381 - | } else {
|
12382 - | return false;
|
12383 - | },
|
12384 - | ""
|
12385 - | )) == ("--")
|
12386 - | }
|
12387 - | Self::Cond49 => {
|
12388 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12389 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12390 - | if let Some(param) = bucket { param } else { return false },
|
12391 - | 14,
|
12392 - | 16,
|
12393 - | true,
|
12394 - | _diagnostic_collector
|
12395 - | ) {
|
12396 - | inner
|
12397 - | } else {
|
12398 - | return false;
|
12399 - | },
|
12400 - | ""
|
12401 - | )) == ("--")
|
12402 - | }
|
12403 - | Self::Cond50 => {
|
12404 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12405 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12406 - | if let Some(param) = bucket { param } else { return false },
|
12407 - | 20,
|
12408 - | 22,
|
12409 - | true,
|
12410 - | _diagnostic_collector
|
12411 - | ) {
|
12412 - | inner
|
12413 - | } else {
|
12414 - | return false;
|
12415 - | },
|
12416 - | ""
|
12417 - | )) == ("--")
|
12418 - | }
|
12419 - | Self::Cond51 => {
|
12420 - | (crate::endpoint_lib::coalesce::coalesce!(
|
12421 - | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12422 - | if let Some(param) = bucket { param } else { return false },
|
12423 - | 15,
|
12424 - | 17,
|
12425 - | true,
|
12426 - | _diagnostic_collector
|
12427 - | ) {
|
12428 - | inner
|
12429 - | } else {
|
12430 - | return false;
|
12431 - | },
|
12432 - | ""
|
12433 - | )) == ("--")
|
12434 - | }
|
12435 - | Self::Cond52 => (if let Some(inner) = bucket_arn { inner.service() } else { return false }) == ("s3-outposts"),
|
12436 - | Self::Cond53 => (crate::endpoint_lib::coalesce::coalesce!(*disable_access_points, false)) == (true),
|
12437 - | Self::Cond54 => {
|
12438 - | *bucket_partition = partition_resolver
|
12439 - | .resolve_partition(
|
12440 - | if let Some(param) = effective_arn_region { param } else { return false },
|
12441 - | _diagnostic_collector,
|
12442 - | )
|
12443 - | .map(|inner| inner.into());
|
12444 - | bucket_partition.is_some()
|
12445 - | }
|
12446 - | Self::Cond55 => (hardware_type) == &mut Some(("o".into())),
|
12447 - | Self::Cond56 => if let Some(inner) = bucket_arn {
|
12448 - | inner.resource_id().get(4).cloned()
|
12449 - | } else {
|
12450 - | return false;
|
12451 - | }
|
12452 - | .is_some(),
|
12453 - | Self::Cond57 => {
|
12454 - | *outpost_id_ssa_1 = if let Some(inner) = bucket_arn {
|
12455 - | inner.resource_id().get(1).cloned()
|
12456 - | } else {
|
12457 - | return false;
|
12458 - | }
|
12459 - | .map(|inner| inner.into());
|
12460 - | outpost_id_ssa_1.is_some()
|
12461 - | }
|
12462 - | Self::Cond58 => (crate::endpoint_lib::coalesce::coalesce!(*use_arn_region, true)) == (true),
|
12463 - | Self::Cond59 => (effective_arn_region) == &mut Some((if let Some(inner) = bucket_arn { inner.region() } else { return false }.into())),
|
12464 - | Self::Cond60 => (region) == &mut Some(("aws-global".into())),
|
12465 - | Self::Cond61 => (use_global_endpoint) == (&true),
|
12466 - | Self::Cond62 => (disable_multi_region_access_points) == (&true),
|
12467 - | Self::Cond63 => (region) == &mut Some(("us-east-1".into())),
|
12468 - | Self::Cond64 => crate::endpoint_lib::host::is_valid_host_label(
|
12469 - | if let Some(param) = outpost_id_ssa_1 { param } else { return false },
|
12470 - | false,
|
12471 - | _diagnostic_collector,
|
12472 - | ),
|
12473 - | Self::Cond65 => {
|
12474 - | *outpost_type = if let Some(inner) = bucket_arn {
|
12475 - | inner.resource_id().get(2).cloned()
|
12476 - | } else {
|
12477 - | return false;
|
12478 - | }
|
12479 - | .map(|inner| inner.into());
|
12480 - | outpost_type.is_some()
|
12481 - | }
|
12482 - | Self::Cond66 => {
|
12483 - | (if let Some(inner) = bucket_partition {
|
12484 - | inner.name()
|
12485 - | } else {
|
12486 - | return false;
|
12487 - | }) == (if let Some(inner) = partition_result {
|
12488 - | inner.name()
|
12489 - | } else {
|
12490 - | return false;
|
12491 - | })
|
12492 - | }
|
12493 - | Self::Cond67 => crate::endpoint_lib::host::is_valid_host_label(
|
12494 - | if let Some(param) = effective_arn_region { param } else { return false },
|
12495 - | true,
|
12496 - | _diagnostic_collector,
|
12497 - | ),
|
12498 - | Self::Cond68 => (if let Some(inner) = bucket_arn { inner.service() } else { return false }) == ("s3"),
|
12499 - | Self::Cond69 => {
|
12500 - | (if let Some(inner) = bucket_arn {
|
12501 - | inner.account_id()
|
12502 - | } else {
|
12503 - | return false;
|
12504 - | }) == ("")
|
12505 - | }
|
12506 - | Self::Cond70 => crate::endpoint_lib::host::is_valid_host_label(
|
12507 - | if let Some(inner) = bucket_arn {
|
12508 - | inner.account_id()
|
12509 - | } else {
|
12510 - | return false;
|
12511 - | },
|
12512 - | false,
|
12513 - | _diagnostic_collector,
|
12514 - | ),
|
12515 - | Self::Cond71 => crate::endpoint_lib::host::is_valid_host_label(
|
12516 - | if let Some(param) = access_point_name_ssa_1 {
|
12517 - | param
|
12518 - | } else {
|
12519 - | return false;
|
12520 - | },
|
12521 - | false,
|
12522 - | _diagnostic_collector,
|
12523 - | ),
|
12524 - | Self::Cond72 => {
|
12525 - | *access_point_name_ssa_2 = if let Some(inner) = bucket_arn {
|
12526 - | inner.resource_id().get(3).cloned()
|
12527 - | } else {
|
12528 - | return false;
|
12529 - | }
|
12530 - | .map(|inner| inner.into());
|
12531 - | access_point_name_ssa_2.is_some()
|
12532 - | }
|
12533 - | Self::Cond73 => crate::endpoint_lib::host::is_valid_host_label(
|
12534 - | if let Some(param) = access_point_name_ssa_1 {
|
12535 - | param
|
12536 - | } else {
|
12537 - | return false;
|
12538 - | },
|
12539 - | true,
|
12540 - | _diagnostic_collector,
|
12541 - | ),
|
12542 - | Self::Cond74 => {
|
12543 - | (if let Some(inner) = bucket_arn { inner.partition() } else { return false })
|
12544 - | == (if let Some(inner) = partition_result {
|
12545 - | inner.name()
|
12546 - | } else {
|
12547 - | return false;
|
12548 - | })
|
12549 - | }
|
12550 - | Self::Cond75 => (outpost_type) == &mut Some(("accesspoint".into())),
|
12551 - | }
|
12552 - | }
|
12553 - | }
|
12554 - |
|
12555 - | const CONDITIONS: [ConditionFn; 76] = [
|
12556 - | ConditionFn::Cond0,
|
12557 - | ConditionFn::Cond1,
|
12558 - | ConditionFn::Cond2,
|
12559 - | ConditionFn::Cond3,
|
12560 - | ConditionFn::Cond4,
|
12561 - | ConditionFn::Cond5,
|
12562 - | ConditionFn::Cond6,
|
12563 - | ConditionFn::Cond7,
|
12564 - | ConditionFn::Cond8,
|
12565 - | ConditionFn::Cond9,
|
12566 - | ConditionFn::Cond10,
|
12567 - | ConditionFn::Cond11,
|
12568 - | ConditionFn::Cond12,
|
12569 - | ConditionFn::Cond13,
|
12570 - | ConditionFn::Cond14,
|
12571 - | ConditionFn::Cond15,
|
12572 - | ConditionFn::Cond16,
|
12573 - | ConditionFn::Cond17,
|
12574 - | ConditionFn::Cond18,
|
12575 - | ConditionFn::Cond19,
|
12576 - | ConditionFn::Cond20,
|
12577 - | ConditionFn::Cond21,
|
12578 - | ConditionFn::Cond22,
|
12579 - | ConditionFn::Cond23,
|
12580 - | ConditionFn::Cond24,
|
12581 - | ConditionFn::Cond25,
|
12582 - | ConditionFn::Cond26,
|
12583 - | ConditionFn::Cond27,
|
12584 - | ConditionFn::Cond28,
|
12585 - | ConditionFn::Cond29,
|
12586 - | ConditionFn::Cond30,
|
12587 - | ConditionFn::Cond31,
|
12588 - | ConditionFn::Cond32,
|
12589 - | ConditionFn::Cond33,
|
12590 - | ConditionFn::Cond34,
|
12591 - | ConditionFn::Cond35,
|
12592 - | ConditionFn::Cond36,
|
12593 - | ConditionFn::Cond37,
|
12594 - | ConditionFn::Cond38,
|
12595 - | ConditionFn::Cond39,
|
12596 - | ConditionFn::Cond40,
|
12597 - | ConditionFn::Cond41,
|
12598 - | ConditionFn::Cond42,
|
12599 - | ConditionFn::Cond43,
|
12600 - | ConditionFn::Cond44,
|
12601 - | ConditionFn::Cond45,
|
12602 - | ConditionFn::Cond46,
|
12603 - | ConditionFn::Cond47,
|
12604 - | ConditionFn::Cond48,
|
12605 - | ConditionFn::Cond49,
|
12606 - | ConditionFn::Cond50,
|
12607 - | ConditionFn::Cond51,
|
12608 - | ConditionFn::Cond52,
|
12609 - | ConditionFn::Cond53,
|
12610 - | ConditionFn::Cond54,
|
12611 - | ConditionFn::Cond55,
|
12612 - | ConditionFn::Cond56,
|
12613 - | ConditionFn::Cond57,
|
12614 - | ConditionFn::Cond58,
|
12615 - | ConditionFn::Cond59,
|
12616 - | ConditionFn::Cond60,
|
12617 - | ConditionFn::Cond61,
|
12618 - | ConditionFn::Cond62,
|
12619 - | ConditionFn::Cond63,
|
12620 - | ConditionFn::Cond64,
|
12621 - | ConditionFn::Cond65,
|
12622 - | ConditionFn::Cond66,
|
12623 - | ConditionFn::Cond67,
|
12624 - | ConditionFn::Cond68,
|
12625 - | ConditionFn::Cond69,
|
12626 - | ConditionFn::Cond70,
|
12627 - | ConditionFn::Cond71,
|
12628 - | ConditionFn::Cond72,
|
12629 - | ConditionFn::Cond73,
|
12630 - | ConditionFn::Cond74,
|
12631 - | ConditionFn::Cond75,
|
12632 - | ];
|
12633 - | #[derive(Debug, Clone)]
|
12634 - | enum ResultEndpoint {
|
12635 - | Result0,
|
12636 - | Result1,
|
12637 - | Result2,
|
12638 - | Result3,
|
12639 - | Result4,
|
12640 - | Result5,
|
12641 - | Result6,
|
12642 - | Result7,
|
12643 - | Result8,
|
12644 - | Result9,
|
12645 - | Result10,
|
12646 - | Result11,
|
12647 - | Result12,
|
12648 - | Result13,
|
12649 - | Result14,
|
12650 - | Result15,
|
12651 - | Result16,
|
12652 - | Result17,
|
12653 - | Result18,
|
12654 - | Result19,
|
12655 - | Result20,
|
12656 - | Result21,
|
12657 - | Result22,
|
12658 - | Result23,
|
12659 - | Result24,
|
12660 - | Result25,
|
12661 - | Result26,
|
12662 - | Result27,
|
12663 - | Result28,
|
12664 - | Result29,
|
12665 - | Result30,
|
12666 - | Result31,
|
12667 - | Result32,
|
12668 - | Result33,
|
12669 - | Result34,
|
12670 - | Result35,
|
12671 - | Result36,
|
12672 - | Result37,
|
12673 - | Result38,
|
12674 - | Result39,
|
12675 - | Result40,
|
12676 - | Result41,
|
12677 - | Result42,
|
12678 - | Result43,
|
12679 - | Result44,
|
12680 - | Result45,
|
12681 - | Result46,
|
12682 - | Result47,
|
12683 - | Result48,
|
12684 - | Result49,
|
12685 - | Result50,
|
12686 - | Result51,
|
12687 - | Result52,
|
12688 - | Result53,
|
12689 - | Result54,
|
12690 - | Result55,
|
12691 - | Result56,
|
12692 - | Result57,
|
12693 - | Result58,
|
12694 - | Result59,
|
12695 - | Result60,
|
12696 - | Result61,
|
12697 - | Result62,
|
12698 - | Result63,
|
12699 - | Result64,
|
12700 - | Result65,
|
12701 - | Result66,
|
12702 - | Result67,
|
12703 - | Result68,
|
12704 - | Result69,
|
12705 - | Result70,
|
12706 - | Result71,
|
12707 - | Result72,
|
12708 - | Result73,
|
12709 - | Result74,
|
12710 - | Result75,
|
12711 - | Result76,
|
12712 - | Result77,
|
12713 - | Result78,
|
12714 - | Result79,
|
12715 - | Result80,
|
12716 - | Result81,
|
12717 - | Result82,
|
12718 - | Result83,
|
12719 - | Result84,
|
12720 - | Result85,
|
12721 - | Result86,
|
12722 - | Result87,
|
12723 - | Result88,
|
12724 - | Result89,
|
12725 - | Result90,
|
12726 - | Result91,
|
12727 - | Result92,
|
12728 - | Result93,
|
12729 - | Result94,
|
12730 - | Result95,
|
12731 - | Result96,
|
12732 - | }
|
12733 - |
|
12734 - | impl<'a> ResultEndpoint {
|
12735 - | #[allow(unused_variables, clippy::useless_asref)]
|
12736 - | fn to_endpoint(
|
12737 - | &self,
|
12738 - | params: &'a Params,
|
12739 - | context: &ConditionContext<'a>,
|
12740 - | ) -> ::std::result::Result<::aws_smithy_types::endpoint::Endpoint, ::aws_smithy_http::endpoint::ResolveEndpointError> {
|
12741 - | match self {
|
12742 - | Self::Result0 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message("No endpoint rule matched")),
|
12743 - | Self::Result1 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12744 - | "Accelerate cannot be used with FIPS".to_string(),
|
12745 - | )),
|
12746 - | Self::Result2 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12747 - | "Cannot set dual-stack in combination with a custom endpoint.".to_string(),
|
12748 - | )),
|
12749 - | Self::Result3 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12750 - | "A custom endpoint cannot be combined with FIPS".to_string(),
|
12751 - | )),
|
12752 - | Self::Result4 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12753 - | "A custom endpoint cannot be combined with S3 Accelerate".to_string(),
|
12754 - | )),
|
12755 - | Self::Result5 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12756 - | "Partition does not support FIPS".to_string(),
|
12757 - | )),
|
12758 - | Self::Result6 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12759 - | "S3Express does not support S3 Accelerate.".to_string(),
|
12760 - | )),
|
12761 - | Self::Result7 => {
|
10653 + | 19 => {
|
10654 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
12762 10655 | let effective_std_region = context
|
12763 10656 | .effective_std_region
|
12764 10657 | .as_ref()
|
12765 - | .map(|s| s.clone())
|
12766 - | .expect("Guaranteed to have a value by earlier checks.");
|
12767 - | let url = context
|
12768 - | .url
|
12769 - | .as_ref()
|
12770 - | .map(|s| s.clone())
|
12771 - | .expect("Guaranteed to have a value by earlier checks.");
|
12772 - | let s3_e_auth = context
|
12773 - | .s3_e_auth
|
12774 - | .as_ref()
|
12775 - | .map(|s| s.clone())
|
12776 - | .expect("Guaranteed to have a value by earlier checks.");
|
12777 - | let uri_encoded_bucket = context
|
12778 - | .uri_encoded_bucket
|
12779 - | .as_ref()
|
12780 - | .map(|s| s.clone())
|
12781 10658 | .expect("Guaranteed to have a value by earlier checks.");
|
10659 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10660 + | let outpost_id_ssa_2 = context.outpost_id_ssa_2.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
12782 10661 | ::std::result::Result::Ok(
|
12783 10662 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
12784 10663 | .url({
|
12785 10664 | let mut out = String::new();
|
10665 + | out.push_str("https://");
|
12786 10666 | #[allow(clippy::needless_borrow)]
|
12787 - | out.push_str(&url.scheme());
|
12788 - | out.push_str("://");
|
12789 - | #[allow(clippy::needless_borrow)]
|
12790 - | out.push_str(&url.authority());
|
12791 - | out.push('/');
|
10667 + | out.push_str(&bucket.as_ref());
|
10668 + | out.push_str(".op-");
|
12792 10669 | #[allow(clippy::needless_borrow)]
|
12793 - | out.push_str(&uri_encoded_bucket.as_ref());
|
10670 + | out.push_str(&outpost_id_ssa_2.as_ref());
|
10671 + | out.push_str(".s3-outposts.");
|
12794 10672 | #[allow(clippy::needless_borrow)]
|
12795 - | out.push_str(&url.path());
|
10673 + | out.push_str(&effective_std_region.as_ref());
|
10674 + | out.push('.');
|
10675 + | #[allow(clippy::needless_borrow)]
|
10676 + | out.push_str(&partition_result.dns_suffix());
|
12796 10677 | out
|
12797 10678 | })
|
12798 - | .property("backend", "S3Express".to_string())
|
12799 - | .property(
|
12800 - | "authSchemes",
|
12801 - | vec![::aws_smithy_types::Document::from({
|
12802 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
12803 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
12804 - | out.insert("name".to_string(), s3_e_auth.to_owned().into());
|
12805 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
12806 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
12807 - | out
|
12808 - | })],
|
10679 + | .auth_scheme(
|
10680 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4a".to_string(), 3)
|
10681 + | .put("disableDoubleEncoding", true)
|
10682 + | .put("signingName", "s3-outposts")
|
10683 + | .put("signingRegionSet", vec![::aws_smithy_types::Document::from("*".to_string())]),
|
10684 + | )
|
10685 + | .auth_scheme(
|
10686 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10687 + | .put("disableDoubleEncoding", true)
|
10688 + | .put("signingName", "s3-outposts")
|
10689 + | .put("signingRegion", effective_std_region.as_ref()),
|
12809 10690 | )
|
12810 10691 | .build(),
|
12811 10692 | )
|
12812 10693 | }
|
12813 - | Self::Result8 => {
|
12814 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
10694 + | 20 => {
|
10695 + | let hardware_type = context.hardware_type.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
10696 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
10697 + | let mut out = String::new();
|
10698 + | out.push_str("Unrecognized hardware type: \"Expected hardware type o or e but got ");
|
10699 + | #[allow(clippy::needless_borrow)]
|
10700 + | out.push_str(&hardware_type.as_ref());
|
10701 + | out.push('"');
|
10702 + | out
|
10703 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
10704 + | }
|
10705 + | 21 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10706 + | "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.".to_string(),
|
10707 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10708 + | 22 => {
|
10709 + | let endpoint = params.endpoint.as_deref().unwrap_or_default();
|
10710 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
10711 + | let mut out = String::new();
|
10712 + | out.push_str("Custom endpoint `");
|
10713 + | #[allow(clippy::needless_borrow)]
|
10714 + | out.push_str(&endpoint.as_ref());
|
10715 + | out.push_str("` was not a valid URI");
|
10716 + | out
|
10717 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
10718 + | }
|
10719 + | 23 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
10720 + | "S3 Accelerate cannot be used in this region".to_string(),
|
10721 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
10722 + | 24 => {
|
10723 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
12815 10724 | let effective_std_region = context
|
12816 10725 | .effective_std_region
|
12817 10726 | .as_ref()
|
12818 - | .map(|s| s.clone())
|
12819 - | .expect("Guaranteed to have a value by earlier checks.");
|
12820 - | let url = context
|
12821 - | .url
|
12822 - | .as_ref()
|
12823 - | .map(|s| s.clone())
|
12824 - | .expect("Guaranteed to have a value by earlier checks.");
|
12825 - | let s3_e_auth = context
|
12826 - | .s3_e_auth
|
12827 - | .as_ref()
|
12828 - | .map(|s| s.clone())
|
12829 10727 | .expect("Guaranteed to have a value by earlier checks.");
|
10728 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
12830 10729 | ::std::result::Result::Ok(
|
12831 10730 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
12832 10731 | .url({
|
12833 10732 | let mut out = String::new();
|
12834 - | #[allow(clippy::needless_borrow)]
|
12835 - | out.push_str(&url.scheme());
|
12836 - | out.push_str("://");
|
10733 + | out.push_str("https://");
|
12837 10734 | #[allow(clippy::needless_borrow)]
|
12838 10735 | out.push_str(&bucket.as_ref());
|
12839 - | out.push('.');
|
10736 + | out.push_str(".s3-fips.dualstack.");
|
12840 10737 | #[allow(clippy::needless_borrow)]
|
12841 - | out.push_str(&url.authority());
|
10738 + | out.push_str(&effective_std_region.as_ref());
|
10739 + | out.push('.');
|
12842 10740 | #[allow(clippy::needless_borrow)]
|
12843 - | out.push_str(&url.path());
|
10741 + | out.push_str(&partition_result.dns_suffix());
|
12844 10742 | out
|
12845 10743 | })
|
12846 - | .property("backend", "S3Express".to_string())
|
12847 - | .property(
|
12848 - | "authSchemes",
|
12849 - | vec![::aws_smithy_types::Document::from({
|
12850 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
12851 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
12852 - | out.insert("name".to_string(), s3_e_auth.to_owned().into());
|
12853 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
12854 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
12855 - | out
|
12856 - | })],
|
10744 + | .auth_scheme(
|
10745 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10746 + | .put("disableDoubleEncoding", true)
|
10747 + | .put("signingName", "s3")
|
10748 + | .put("signingRegion", effective_std_region.as_ref()),
|
12857 10749 | )
|
12858 10750 | .build(),
|
12859 10751 | )
|
12860 10752 | }
|
12861 - | Self::Result9 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12862 - | "S3Express bucket name is not a valid virtual hostable name.".to_string(),
|
12863 - | )),
|
12864 - | Self::Result10 => {
|
10753 + | 25 => {
|
10754 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
12865 10755 | let effective_std_region = context
|
12866 10756 | .effective_std_region
|
12867 10757 | .as_ref()
|
12868 - | .map(|s| s.clone())
|
12869 - | .expect("Guaranteed to have a value by earlier checks.");
|
12870 - | let partition_result = context
|
12871 - | .partition_result
|
12872 - | .as_ref()
|
12873 - | .map(|s| s.clone())
|
12874 - | .expect("Guaranteed to have a value by earlier checks.");
|
12875 - | let s3_e_ds = context
|
12876 - | .s3_e_ds
|
12877 - | .as_ref()
|
12878 - | .map(|s| s.clone())
|
12879 - | .expect("Guaranteed to have a value by earlier checks.");
|
12880 - | let s3_e_fips = context
|
12881 - | .s3_e_fips
|
12882 - | .as_ref()
|
12883 - | .map(|s| s.clone())
|
12884 - | .expect("Guaranteed to have a value by earlier checks.");
|
12885 - | let uri_encoded_bucket = context
|
12886 - | .uri_encoded_bucket
|
12887 - | .as_ref()
|
12888 - | .map(|s| s.clone())
|
12889 10758 | .expect("Guaranteed to have a value by earlier checks.");
|
10759 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
12890 10760 | ::std::result::Result::Ok(
|
12891 10761 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
12892 10762 | .url({
|
12893 10763 | let mut out = String::new();
|
12894 - | out.push_str("https://s3express-control");
|
12895 - | #[allow(clippy::needless_borrow)]
|
12896 - | out.push_str(&s3_e_fips.as_ref());
|
10764 + | out.push_str("https://");
|
12897 10765 | #[allow(clippy::needless_borrow)]
|
12898 - | out.push_str(&s3_e_ds.as_ref());
|
12899 - | out.push('.');
|
10766 + | out.push_str(&bucket.as_ref());
|
10767 + | out.push_str(".s3-fips.");
|
12900 10768 | #[allow(clippy::needless_borrow)]
|
12901 10769 | out.push_str(&effective_std_region.as_ref());
|
12902 10770 | out.push('.');
|
12903 10771 | #[allow(clippy::needless_borrow)]
|
12904 10772 | out.push_str(&partition_result.dns_suffix());
|
12905 - | out.push('/');
|
12906 - | #[allow(clippy::needless_borrow)]
|
12907 - | out.push_str(&uri_encoded_bucket.as_ref());
|
12908 10773 | out
|
12909 10774 | })
|
12910 - | .property("backend", "S3Express".to_string())
|
12911 - | .property(
|
12912 - | "authSchemes",
|
12913 - | vec![::aws_smithy_types::Document::from({
|
12914 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
12915 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
12916 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
12917 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
12918 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
12919 - | out
|
12920 - | })],
|
10775 + | .auth_scheme(
|
10776 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10777 + | .put("disableDoubleEncoding", true)
|
10778 + | .put("signingName", "s3")
|
10779 + | .put("signingRegion", effective_std_region.as_ref()),
|
12921 10780 | )
|
12922 10781 | .build(),
|
12923 10782 | )
|
12924 10783 | }
|
12925 - | Self::Result11 => {
|
12926 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
10784 + | 26 => {
|
10785 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
12927 10786 | let effective_std_region = context
|
12928 10787 | .effective_std_region
|
12929 10788 | .as_ref()
|
12930 - | .map(|s| s.clone())
|
12931 - | .expect("Guaranteed to have a value by earlier checks.");
|
12932 - | let partition_result = context
|
12933 - | .partition_result
|
12934 - | .as_ref()
|
12935 - | .map(|s| s.clone())
|
12936 - | .expect("Guaranteed to have a value by earlier checks.");
|
12937 - | let s3_e_ds = context
|
12938 - | .s3_e_ds
|
12939 - | .as_ref()
|
12940 - | .map(|s| s.clone())
|
12941 - | .expect("Guaranteed to have a value by earlier checks.");
|
12942 - | let s3_e_fips = context
|
12943 - | .s3_e_fips
|
12944 - | .as_ref()
|
12945 - | .map(|s| s.clone())
|
12946 - | .expect("Guaranteed to have a value by earlier checks.");
|
12947 - | let s3_e_auth = context
|
12948 - | .s3_e_auth
|
12949 - | .as_ref()
|
12950 - | .map(|s| s.clone())
|
12951 - | .expect("Guaranteed to have a value by earlier checks.");
|
12952 - | let s3express_availability_zone_id = context
|
12953 - | .s3express_availability_zone_id
|
12954 - | .as_ref()
|
12955 - | .map(|s| s.clone())
|
12956 10789 | .expect("Guaranteed to have a value by earlier checks.");
|
10790 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
12957 10791 | ::std::result::Result::Ok(
|
12958 10792 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
12959 10793 | .url({
|
12960 10794 | let mut out = String::new();
|
12961 10795 | out.push_str("https://");
|
12962 10796 | #[allow(clippy::needless_borrow)]
|
12963 10797 | out.push_str(&bucket.as_ref());
|
12964 - | out.push_str(".s3express");
|
12965 - | #[allow(clippy::needless_borrow)]
|
12966 - | out.push_str(&s3_e_fips.as_ref());
|
12967 - | out.push('-');
|
12968 - | #[allow(clippy::needless_borrow)]
|
12969 - | out.push_str(&s3express_availability_zone_id.as_ref());
|
12970 - | #[allow(clippy::needless_borrow)]
|
12971 - | out.push_str(&s3_e_ds.as_ref());
|
12972 - | out.push('.');
|
10798 + | out.push_str(".s3-accelerate.dualstack.");
|
12973 10799 | #[allow(clippy::needless_borrow)]
|
12974 10800 | out.push_str(&effective_std_region.as_ref());
|
12975 10801 | out.push('.');
|
12976 10802 | #[allow(clippy::needless_borrow)]
|
12977 10803 | out.push_str(&partition_result.dns_suffix());
|
12978 10804 | out
|
12979 10805 | })
|
12980 - | .property("backend", "S3Express".to_string())
|
12981 - | .property(
|
12982 - | "authSchemes",
|
12983 - | vec![::aws_smithy_types::Document::from({
|
12984 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
12985 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
12986 - | out.insert("name".to_string(), s3_e_auth.to_owned().into());
|
12987 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
12988 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
12989 - | out
|
12990 - | })],
|
10806 + | .auth_scheme(
|
10807 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10808 + | .put("disableDoubleEncoding", true)
|
10809 + | .put("signingName", "s3")
|
10810 + | .put("signingRegion", effective_std_region.as_ref()),
|
12991 10811 | )
|
12992 10812 | .build(),
|
12993 10813 | )
|
12994 10814 | }
|
12995 - | Self::Result12 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12996 - | "Unrecognized S3Express bucket name format.".to_string(),
|
12997 - | )),
|
12998 - | Self::Result13 => {
|
10815 + | 27 => {
|
10816 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
12999 10817 | let effective_std_region = context
|
13000 10818 | .effective_std_region
|
13001 10819 | .as_ref()
|
13002 - | .map(|s| s.clone())
|
13003 - | .expect("Guaranteed to have a value by earlier checks.");
|
13004 - | let url = context
|
13005 - | .url
|
13006 - | .as_ref()
|
13007 - | .map(|s| s.clone())
|
13008 - | .expect("Guaranteed to have a value by earlier checks.");
|
13009 - | let s3_e_auth = context
|
13010 - | .s3_e_auth
|
13011 - | .as_ref()
|
13012 - | .map(|s| s.clone())
|
13013 10820 | .expect("Guaranteed to have a value by earlier checks.");
|
10821 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13014 10822 | ::std::result::Result::Ok(
|
13015 10823 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13016 10824 | .url({
|
13017 10825 | let mut out = String::new();
|
10826 + | out.push_str("https://");
|
13018 10827 | #[allow(clippy::needless_borrow)]
|
13019 - | out.push_str(&url.scheme());
|
13020 - | out.push_str("://");
|
13021 - | #[allow(clippy::needless_borrow)]
|
13022 - | out.push_str(&url.authority());
|
10828 + | out.push_str(&bucket.as_ref());
|
10829 + | out.push_str(".s3-accelerate.dualstack.");
|
13023 10830 | #[allow(clippy::needless_borrow)]
|
13024 - | out.push_str(&url.path());
|
10831 + | out.push_str(&partition_result.dns_suffix());
|
13025 10832 | out
|
13026 10833 | })
|
13027 - | .property("backend", "S3Express".to_string())
|
13028 - | .property(
|
13029 - | "authSchemes",
|
13030 - | vec![::aws_smithy_types::Document::from({
|
13031 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13032 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13033 - | out.insert("name".to_string(), s3_e_auth.to_owned().into());
|
13034 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
13035 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13036 - | out
|
13037 - | })],
|
10834 + | .auth_scheme(
|
10835 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10836 + | .put("disableDoubleEncoding", true)
|
10837 + | .put("signingName", "s3")
|
10838 + | .put("signingRegion", effective_std_region.as_ref()),
|
13038 10839 | )
|
13039 10840 | .build(),
|
13040 10841 | )
|
13041 10842 | }
|
13042 - | Self::Result14 => {
|
10843 + | 28 => {
|
10844 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
13043 10845 | let effective_std_region = context
|
13044 10846 | .effective_std_region
|
13045 10847 | .as_ref()
|
13046 - | .map(|s| s.clone())
|
13047 - | .expect("Guaranteed to have a value by earlier checks.");
|
13048 - | let partition_result = context
|
13049 - | .partition_result
|
13050 - | .as_ref()
|
13051 - | .map(|s| s.clone())
|
13052 - | .expect("Guaranteed to have a value by earlier checks.");
|
13053 - | let s3_e_ds = context
|
13054 - | .s3_e_ds
|
13055 - | .as_ref()
|
13056 - | .map(|s| s.clone())
|
13057 - | .expect("Guaranteed to have a value by earlier checks.");
|
13058 - | let s3_e_fips = context
|
13059 - | .s3_e_fips
|
13060 - | .as_ref()
|
13061 - | .map(|s| s.clone())
|
13062 10848 | .expect("Guaranteed to have a value by earlier checks.");
|
10849 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13063 10850 | ::std::result::Result::Ok(
|
13064 10851 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13065 10852 | .url({
|
13066 10853 | let mut out = String::new();
|
13067 - | out.push_str("https://s3express-control");
|
13068 - | #[allow(clippy::needless_borrow)]
|
13069 - | out.push_str(&s3_e_fips.as_ref());
|
10854 + | out.push_str("https://");
|
13070 10855 | #[allow(clippy::needless_borrow)]
|
13071 - | out.push_str(&s3_e_ds.as_ref());
|
13072 - | out.push('.');
|
10856 + | out.push_str(&bucket.as_ref());
|
10857 + | out.push_str(".s3.dualstack.");
|
13073 10858 | #[allow(clippy::needless_borrow)]
|
13074 10859 | out.push_str(&effective_std_region.as_ref());
|
13075 10860 | out.push('.');
|
13076 10861 | #[allow(clippy::needless_borrow)]
|
13077 10862 | out.push_str(&partition_result.dns_suffix());
|
13078 10863 | out
|
13079 10864 | })
|
13080 - | .property("backend", "S3Express".to_string())
|
13081 - | .property(
|
13082 - | "authSchemes",
|
13083 - | vec![::aws_smithy_types::Document::from({
|
13084 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13085 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13086 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13087 - | out.insert("signingName".to_string(), "s3express".to_string().into());
|
13088 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13089 - | out
|
13090 - | })],
|
10865 + | .auth_scheme(
|
10866 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10867 + | .put("disableDoubleEncoding", true)
|
10868 + | .put("signingName", "s3")
|
10869 + | .put("signingRegion", effective_std_region.as_ref()),
|
13091 10870 | )
|
13092 10871 | .build(),
|
13093 10872 | )
|
13094 10873 | }
|
13095 - | Self::Result15 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
13096 - | "Expected a endpoint to be specified but no endpoint was found".to_string(),
|
13097 - | )),
|
13098 - | Self::Result16 => {
|
13099 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
10874 + | 29 => {
|
10875 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
13100 10876 | let effective_std_region = context
|
13101 10877 | .effective_std_region
|
13102 10878 | .as_ref()
|
13103 - | .map(|s| s.clone())
|
13104 - | .expect("Guaranteed to have a value by earlier checks.");
|
13105 - | let url = context
|
13106 - | .url
|
13107 - | .as_ref()
|
13108 - | .map(|s| s.clone())
|
13109 10879 | .expect("Guaranteed to have a value by earlier checks.");
|
10880 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13110 10881 | ::std::result::Result::Ok(
|
13111 10882 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13112 10883 | .url({
|
13113 10884 | let mut out = String::new();
|
13114 - | out.push_str("https://");
|
13115 10885 | #[allow(clippy::needless_borrow)]
|
13116 - | out.push_str(&bucket.as_ref());
|
13117 - | out.push_str(".ec2.");
|
10886 + | out.push_str(&url.scheme());
|
10887 + | out.push_str("://");
|
13118 10888 | #[allow(clippy::needless_borrow)]
|
13119 10889 | out.push_str(&url.authority());
|
10890 + | #[allow(clippy::needless_borrow)]
|
10891 + | out.push_str(&url.normalized_path());
|
10892 + | #[allow(clippy::needless_borrow)]
|
10893 + | out.push_str(&bucket.as_ref());
|
13120 10894 | out
|
13121 10895 | })
|
13122 - | .property(
|
13123 - | "authSchemes",
|
13124 - | vec![
|
13125 - | ::aws_smithy_types::Document::from({
|
13126 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13127 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13128 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
13129 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
13130 - | out.insert(
|
13131 - | "signingRegionSet".to_string(),
|
13132 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
13133 - | );
|
13134 - | out
|
13135 - | }),
|
13136 - | ::aws_smithy_types::Document::from({
|
13137 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13138 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13139 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13140 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
13141 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13142 - | out
|
13143 - | }),
|
13144 - | ],
|
10896 + | .auth_scheme(
|
10897 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10898 + | .put("disableDoubleEncoding", true)
|
10899 + | .put("signingName", "s3")
|
10900 + | .put("signingRegion", effective_std_region.as_ref()),
|
13145 10901 | )
|
13146 10902 | .build(),
|
13147 10903 | )
|
13148 10904 | }
|
13149 - | Self::Result17 => {
|
13150 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
10905 + | 30 => {
|
10906 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
13151 10907 | let effective_std_region = context
|
13152 10908 | .effective_std_region
|
13153 10909 | .as_ref()
|
13154 - | .map(|s| s.clone())
|
13155 - | .expect("Guaranteed to have a value by earlier checks.");
|
13156 - | let partition_result = context
|
13157 - | .partition_result
|
13158 - | .as_ref()
|
13159 - | .map(|s| s.clone())
|
13160 10910 | .expect("Guaranteed to have a value by earlier checks.");
|
10911 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13161 10912 | ::std::result::Result::Ok(
|
13162 10913 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13163 10914 | .url({
|
13164 10915 | let mut out = String::new();
|
13165 - | out.push_str("https://");
|
13166 10916 | #[allow(clippy::needless_borrow)]
|
13167 - | out.push_str(&bucket.as_ref());
|
13168 - | out.push_str(".ec2.s3-outposts.");
|
10917 + | out.push_str(&url.scheme());
|
10918 + | out.push_str("://");
|
13169 10919 | #[allow(clippy::needless_borrow)]
|
13170 - | out.push_str(&effective_std_region.as_ref());
|
10920 + | out.push_str(&bucket.as_ref());
|
13171 10921 | out.push('.');
|
13172 10922 | #[allow(clippy::needless_borrow)]
|
13173 - | out.push_str(&partition_result.dns_suffix());
|
10923 + | out.push_str(&url.authority());
|
10924 + | #[allow(clippy::needless_borrow)]
|
10925 + | out.push_str(&url.path());
|
13174 10926 | out
|
13175 10927 | })
|
13176 - | .property(
|
13177 - | "authSchemes",
|
13178 - | vec![
|
13179 - | ::aws_smithy_types::Document::from({
|
13180 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13181 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13182 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
13183 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
13184 - | out.insert(
|
13185 - | "signingRegionSet".to_string(),
|
13186 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
13187 - | );
|
13188 - | out
|
13189 - | }),
|
13190 - | ::aws_smithy_types::Document::from({
|
13191 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13192 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13193 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13194 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
13195 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13196 - | out
|
13197 - | }),
|
13198 - | ],
|
10928 + | .auth_scheme(
|
10929 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10930 + | .put("disableDoubleEncoding", true)
|
10931 + | .put("signingName", "s3")
|
10932 + | .put("signingRegion", effective_std_region.as_ref()),
|
13199 10933 | )
|
13200 10934 | .build(),
|
13201 10935 | )
|
13202 10936 | }
|
13203 - | Self::Result18 => {
|
13204 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
10937 + | 31 => {
|
10938 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
13205 10939 | let effective_std_region = context
|
13206 10940 | .effective_std_region
|
13207 10941 | .as_ref()
|
13208 - | .map(|s| s.clone())
|
13209 - | .expect("Guaranteed to have a value by earlier checks.");
|
13210 - | let url = context
|
13211 - | .url
|
13212 - | .as_ref()
|
13213 - | .map(|s| s.clone())
|
13214 - | .expect("Guaranteed to have a value by earlier checks.");
|
13215 - | let outpost_id_ssa_2 = context
|
13216 - | .outpost_id_ssa_2
|
13217 - | .as_ref()
|
13218 - | .map(|s| s.clone())
|
13219 10942 | .expect("Guaranteed to have a value by earlier checks.");
|
10943 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13220 10944 | ::std::result::Result::Ok(
|
13221 10945 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13222 10946 | .url({
|
13223 10947 | let mut out = String::new();
|
13224 10948 | out.push_str("https://");
|
13225 10949 | #[allow(clippy::needless_borrow)]
|
13226 10950 | out.push_str(&bucket.as_ref());
|
13227 - | out.push_str(".op-");
|
13228 - | #[allow(clippy::needless_borrow)]
|
13229 - | out.push_str(&outpost_id_ssa_2.as_ref());
|
13230 - | out.push('.');
|
10951 + | out.push_str(".s3-accelerate.");
|
13231 10952 | #[allow(clippy::needless_borrow)]
|
13232 - | out.push_str(&url.authority());
|
10953 + | out.push_str(&partition_result.dns_suffix());
|
13233 10954 | out
|
13234 10955 | })
|
13235 - | .property(
|
13236 - | "authSchemes",
|
13237 - | vec![
|
13238 - | ::aws_smithy_types::Document::from({
|
13239 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13240 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13241 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
13242 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
13243 - | out.insert(
|
13244 - | "signingRegionSet".to_string(),
|
13245 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
13246 - | );
|
13247 - | out
|
13248 - | }),
|
13249 - | ::aws_smithy_types::Document::from({
|
13250 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13251 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13252 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13253 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
13254 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13255 - | out
|
13256 - | }),
|
13257 - | ],
|
10956 + | .auth_scheme(
|
10957 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10958 + | .put("disableDoubleEncoding", true)
|
10959 + | .put("signingName", "s3")
|
10960 + | .put("signingRegion", effective_std_region.as_ref()),
|
13258 10961 | )
|
13259 10962 | .build(),
|
13260 10963 | )
|
13261 10964 | }
|
13262 - | Self::Result19 => {
|
13263 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
10965 + | 32 => {
|
10966 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
13264 10967 | let effective_std_region = context
|
13265 10968 | .effective_std_region
|
13266 10969 | .as_ref()
|
13267 - | .map(|s| s.clone())
|
13268 - | .expect("Guaranteed to have a value by earlier checks.");
|
13269 - | let partition_result = context
|
13270 - | .partition_result
|
13271 - | .as_ref()
|
13272 - | .map(|s| s.clone())
|
13273 - | .expect("Guaranteed to have a value by earlier checks.");
|
13274 - | let outpost_id_ssa_2 = context
|
13275 - | .outpost_id_ssa_2
|
13276 - | .as_ref()
|
13277 - | .map(|s| s.clone())
|
13278 10970 | .expect("Guaranteed to have a value by earlier checks.");
|
10971 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13279 10972 | ::std::result::Result::Ok(
|
13280 10973 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13281 10974 | .url({
|
13282 10975 | let mut out = String::new();
|
13283 10976 | out.push_str("https://");
|
13284 10977 | #[allow(clippy::needless_borrow)]
|
13285 10978 | out.push_str(&bucket.as_ref());
|
13286 - | out.push_str(".op-");
|
13287 - | #[allow(clippy::needless_borrow)]
|
13288 - | out.push_str(&outpost_id_ssa_2.as_ref());
|
13289 - | out.push_str(".s3-outposts.");
|
13290 - | #[allow(clippy::needless_borrow)]
|
13291 - | out.push_str(&effective_std_region.as_ref());
|
13292 - | out.push('.');
|
10979 + | out.push_str(".s3.");
|
13293 10980 | #[allow(clippy::needless_borrow)]
|
13294 10981 | out.push_str(&partition_result.dns_suffix());
|
13295 10982 | out
|
13296 10983 | })
|
13297 - | .property(
|
13298 - | "authSchemes",
|
13299 - | vec![
|
13300 - | ::aws_smithy_types::Document::from({
|
13301 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13302 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13303 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
13304 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
13305 - | out.insert(
|
13306 - | "signingRegionSet".to_string(),
|
13307 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
13308 - | );
|
13309 - | out
|
13310 - | }),
|
13311 - | ::aws_smithy_types::Document::from({
|
13312 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13313 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13314 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13315 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
13316 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13317 - | out
|
13318 - | }),
|
13319 - | ],
|
10984 + | .auth_scheme(
|
10985 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
10986 + | .put("disableDoubleEncoding", true)
|
10987 + | .put("signingName", "s3")
|
10988 + | .put("signingRegion", effective_std_region.as_ref()),
|
13320 10989 | )
|
13321 10990 | .build(),
|
13322 10991 | )
|
13323 10992 | }
|
13324 - | Self::Result20 => {
|
13325 - | let hardware_type = context
|
13326 - | .hardware_type
|
13327 - | .as_ref()
|
13328 - | .map(|s| s.clone())
|
13329 - | .expect("Guaranteed to have a value by earlier checks.");
|
13330 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
13331 - | let mut out = String::new();
|
13332 - | out.push_str("Unrecognized hardware type: \"Expected hardware type o or e but got ");
|
13333 - | #[allow(clippy::needless_borrow)]
|
13334 - | out.push_str(&hardware_type.as_ref());
|
13335 - | out.push('"');
|
13336 - | out
|
13337 - | }))
|
13338 - | }
|
13339 - | Self::Result21 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
13340 - | "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.".to_string(),
|
13341 - | )),
|
13342 - | Self::Result22 => {
|
13343 - | let endpoint = params.endpoint.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13344 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
13345 - | let mut out = String::new();
|
13346 - | out.push_str("Custom endpoint `");
|
13347 - | #[allow(clippy::needless_borrow)]
|
13348 - | out.push_str(&endpoint.as_ref());
|
13349 - | out.push_str("` was not a valid URI");
|
13350 - | out
|
13351 - | }))
|
13352 - | }
|
13353 - | Self::Result23 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
13354 - | "S3 Accelerate cannot be used in this region".to_string(),
|
13355 - | )),
|
13356 - | Self::Result24 => {
|
13357 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
10993 + | 33 => {
|
10994 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
13358 10995 | let effective_std_region = context
|
13359 10996 | .effective_std_region
|
13360 10997 | .as_ref()
|
13361 - | .map(|s| s.clone())
|
13362 - | .expect("Guaranteed to have a value by earlier checks.");
|
13363 - | let partition_result = context
|
13364 - | .partition_result
|
13365 - | .as_ref()
|
13366 - | .map(|s| s.clone())
|
13367 10998 | .expect("Guaranteed to have a value by earlier checks.");
|
10999 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13368 11000 | ::std::result::Result::Ok(
|
13369 11001 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13370 11002 | .url({
|
13371 11003 | let mut out = String::new();
|
13372 11004 | out.push_str("https://");
|
13373 11005 | #[allow(clippy::needless_borrow)]
|
13374 11006 | out.push_str(&bucket.as_ref());
|
13375 - | out.push_str(".s3-fips.dualstack.");
|
11007 + | out.push_str(".s3.");
|
13376 11008 | #[allow(clippy::needless_borrow)]
|
13377 11009 | out.push_str(&effective_std_region.as_ref());
|
13378 11010 | out.push('.');
|
13379 11011 | #[allow(clippy::needless_borrow)]
|
13380 11012 | out.push_str(&partition_result.dns_suffix());
|
13381 11013 | out
|
13382 11014 | })
|
13383 - | .property(
|
13384 - | "authSchemes",
|
13385 - | vec![::aws_smithy_types::Document::from({
|
13386 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13387 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13388 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13389 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13390 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13391 - | out
|
13392 - | })],
|
11015 + | .auth_scheme(
|
11016 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11017 + | .put("disableDoubleEncoding", true)
|
11018 + | .put("signingName", "s3")
|
11019 + | .put("signingRegion", effective_std_region.as_ref()),
|
13393 11020 | )
|
13394 11021 | .build(),
|
13395 11022 | )
|
13396 11023 | }
|
13397 - | Self::Result25 => {
|
13398 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13399 - | let effective_std_region = context
|
13400 - | .effective_std_region
|
11024 + | 34 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11025 + | "Invalid region: region was not a valid DNS name.".to_string(),
|
11026 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11027 + | 35 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11028 + | "S3 Object Lambda does not support Dual-stack".to_string(),
|
11029 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11030 + | 36 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11031 + | "S3 Object Lambda does not support S3 Accelerate".to_string(),
|
11032 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11033 + | 37 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11034 + | "Access points are not supported for this operation".to_string(),
|
11035 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11036 + | 38 => {
|
11037 + | let region = params.region.as_deref().unwrap_or_default();
|
11038 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11039 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11040 + | let mut out = String::new();
|
11041 + | out.push_str("Invalid configuration: region from ARN `");
|
11042 + | #[allow(clippy::needless_borrow)]
|
11043 + | out.push_str(&bucket_arn.region());
|
11044 + | out.push_str("` does not match client region `");
|
11045 + | #[allow(clippy::needless_borrow)]
|
11046 + | out.push_str(®ion.as_ref());
|
11047 + | out.push_str("` and UseArnRegion is `false`");
|
11048 + | out
|
11049 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
11050 + | }
|
11051 + | 39 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11052 + | "Invalid ARN: Missing account id".to_string(),
|
11053 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11054 + | 40 => {
|
11055 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11056 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11057 + | let effective_arn_region = context
|
11058 + | .effective_arn_region
|
13401 11059 | .as_ref()
|
13402 - | .map(|s| s.clone())
|
13403 11060 | .expect("Guaranteed to have a value by earlier checks.");
|
13404 - | let partition_result = context
|
13405 - | .partition_result
|
11061 + | let access_point_name_ssa_1 = context
|
11062 + | .access_point_name_ssa_1
|
13406 11063 | .as_ref()
|
13407 - | .map(|s| s.clone())
|
13408 11064 | .expect("Guaranteed to have a value by earlier checks.");
|
13409 11065 | ::std::result::Result::Ok(
|
13410 11066 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13411 11067 | .url({
|
13412 11068 | let mut out = String::new();
|
13413 - | out.push_str("https://");
|
13414 11069 | #[allow(clippy::needless_borrow)]
|
13415 - | out.push_str(&bucket.as_ref());
|
13416 - | out.push_str(".s3-fips.");
|
11070 + | out.push_str(&url.scheme());
|
11071 + | out.push_str("://");
|
13417 11072 | #[allow(clippy::needless_borrow)]
|
13418 - | out.push_str(&effective_std_region.as_ref());
|
11073 + | out.push_str(&access_point_name_ssa_1.as_ref());
|
11074 + | out.push('-');
|
11075 + | #[allow(clippy::needless_borrow)]
|
11076 + | out.push_str(&bucket_arn.account_id());
|
13419 11077 | out.push('.');
|
13420 11078 | #[allow(clippy::needless_borrow)]
|
13421 - | out.push_str(&partition_result.dns_suffix());
|
11079 + | out.push_str(&url.authority());
|
11080 + | #[allow(clippy::needless_borrow)]
|
11081 + | out.push_str(&url.path());
|
13422 11082 | out
|
13423 11083 | })
|
13424 - | .property(
|
13425 - | "authSchemes",
|
13426 - | vec![::aws_smithy_types::Document::from({
|
13427 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13428 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13429 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13430 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13431 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13432 - | out
|
13433 - | })],
|
11084 + | .auth_scheme(
|
11085 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11086 + | .put("disableDoubleEncoding", true)
|
11087 + | .put("signingName", "s3-object-lambda")
|
11088 + | .put("signingRegion", effective_arn_region.as_ref()),
|
13434 11089 | )
|
13435 11090 | .build(),
|
13436 11091 | )
|
13437 11092 | }
|
13438 - | Self::Result26 => {
|
13439 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13440 - | let effective_std_region = context
|
13441 - | .effective_std_region
|
11093 + | 41 => {
|
11094 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11095 + | let effective_arn_region = context
|
11096 + | .effective_arn_region
|
13442 11097 | .as_ref()
|
13443 - | .map(|s| s.clone())
|
13444 11098 | .expect("Guaranteed to have a value by earlier checks.");
|
13445 - | let partition_result = context
|
13446 - | .partition_result
|
11099 + | let access_point_name_ssa_1 = context
|
11100 + | .access_point_name_ssa_1
|
13447 11101 | .as_ref()
|
13448 - | .map(|s| s.clone())
|
13449 11102 | .expect("Guaranteed to have a value by earlier checks.");
|
11103 + | let bucket_partition = context.bucket_partition.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13450 11104 | ::std::result::Result::Ok(
|
13451 11105 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13452 11106 | .url({
|
13453 11107 | let mut out = String::new();
|
13454 11108 | out.push_str("https://");
|
13455 11109 | #[allow(clippy::needless_borrow)]
|
13456 - | out.push_str(&bucket.as_ref());
|
13457 - | out.push_str(".s3-accelerate.dualstack.");
|
11110 + | out.push_str(&access_point_name_ssa_1.as_ref());
|
11111 + | out.push('-');
|
13458 11112 | #[allow(clippy::needless_borrow)]
|
13459 - | out.push_str(&effective_std_region.as_ref());
|
13460 - | out.push('.');
|
11113 + | out.push_str(&bucket_arn.account_id());
|
11114 + | out.push_str(".s3-object-lambda-fips.");
|
13461 11115 | #[allow(clippy::needless_borrow)]
|
13462 - | out.push_str(&partition_result.dns_suffix());
|
13463 - | out
|
13464 - | })
|
13465 - | .property(
|
13466 - | "authSchemes",
|
13467 - | vec![::aws_smithy_types::Document::from({
|
13468 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13469 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13470 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13471 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13472 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13473 - | out
|
13474 - | })],
|
13475 - | )
|
13476 - | .build(),
|
13477 - | )
|
13478 - | }
|
13479 - | Self::Result27 => {
|
13480 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13481 - | let effective_std_region = context
|
13482 - | .effective_std_region
|
13483 - | .as_ref()
|
13484 - | .map(|s| s.clone())
|
13485 - | .expect("Guaranteed to have a value by earlier checks.");
|
13486 - | let partition_result = context
|
13487 - | .partition_result
|
13488 - | .as_ref()
|
13489 - | .map(|s| s.clone())
|
13490 - | .expect("Guaranteed to have a value by earlier checks.");
|
13491 - | ::std::result::Result::Ok(
|
13492 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13493 - | .url({
|
13494 - | let mut out = String::new();
|
13495 - | out.push_str("https://");
|
13496 - | #[allow(clippy::needless_borrow)]
|
13497 - | out.push_str(&bucket.as_ref());
|
13498 - | out.push_str(".s3-accelerate.dualstack.");
|
11116 + | out.push_str(&effective_arn_region.as_ref());
|
11117 + | out.push('.');
|
13499 11118 | #[allow(clippy::needless_borrow)]
|
13500 - | out.push_str(&partition_result.dns_suffix());
|
11119 + | out.push_str(&bucket_partition.dns_suffix());
|
13501 11120 | out
|
13502 11121 | })
|
13503 - | .property(
|
13504 - | "authSchemes",
|
13505 - | vec![::aws_smithy_types::Document::from({
|
13506 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13507 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13508 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13509 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13510 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13511 - | out
|
13512 - | })],
|
11122 + | .auth_scheme(
|
11123 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11124 + | .put("disableDoubleEncoding", true)
|
11125 + | .put("signingName", "s3-object-lambda")
|
11126 + | .put("signingRegion", effective_arn_region.as_ref()),
|
13513 11127 | )
|
13514 11128 | .build(),
|
13515 11129 | )
|
13516 11130 | }
|
13517 - | Self::Result28 => {
|
13518 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13519 - | let effective_std_region = context
|
13520 - | .effective_std_region
|
11131 + | 42 => {
|
11132 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11133 + | let effective_arn_region = context
|
11134 + | .effective_arn_region
|
13521 11135 | .as_ref()
|
13522 - | .map(|s| s.clone())
|
13523 11136 | .expect("Guaranteed to have a value by earlier checks.");
|
13524 - | let partition_result = context
|
13525 - | .partition_result
|
11137 + | let access_point_name_ssa_1 = context
|
11138 + | .access_point_name_ssa_1
|
13526 11139 | .as_ref()
|
13527 - | .map(|s| s.clone())
|
13528 11140 | .expect("Guaranteed to have a value by earlier checks.");
|
11141 + | let bucket_partition = context.bucket_partition.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13529 11142 | ::std::result::Result::Ok(
|
13530 11143 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13531 11144 | .url({
|
13532 11145 | let mut out = String::new();
|
13533 11146 | out.push_str("https://");
|
13534 11147 | #[allow(clippy::needless_borrow)]
|
13535 - | out.push_str(&bucket.as_ref());
|
13536 - | out.push_str(".s3.dualstack.");
|
11148 + | out.push_str(&access_point_name_ssa_1.as_ref());
|
11149 + | out.push('-');
|
13537 11150 | #[allow(clippy::needless_borrow)]
|
13538 - | out.push_str(&effective_std_region.as_ref());
|
11151 + | out.push_str(&bucket_arn.account_id());
|
11152 + | out.push_str(".s3-object-lambda.");
|
11153 + | #[allow(clippy::needless_borrow)]
|
11154 + | out.push_str(&effective_arn_region.as_ref());
|
13539 11155 | out.push('.');
|
13540 11156 | #[allow(clippy::needless_borrow)]
|
13541 - | out.push_str(&partition_result.dns_suffix());
|
11157 + | out.push_str(&bucket_partition.dns_suffix());
|
13542 11158 | out
|
13543 11159 | })
|
13544 - | .property(
|
13545 - | "authSchemes",
|
13546 - | vec![::aws_smithy_types::Document::from({
|
13547 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13548 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13549 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13550 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13551 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13552 - | out
|
13553 - | })],
|
11160 + | .auth_scheme(
|
11161 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11162 + | .put("disableDoubleEncoding", true)
|
11163 + | .put("signingName", "s3-object-lambda")
|
11164 + | .put("signingRegion", effective_arn_region.as_ref()),
|
13554 11165 | )
|
13555 11166 | .build(),
|
13556 11167 | )
|
13557 11168 | }
|
13558 - | Self::Result29 => {
|
13559 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13560 - | let effective_std_region = context
|
13561 - | .effective_std_region
|
13562 - | .as_ref()
|
13563 - | .map(|s| s.clone())
|
13564 - | .expect("Guaranteed to have a value by earlier checks.");
|
13565 - | let url = context
|
13566 - | .url
|
11169 + | 43 => {
|
11170 + | let access_point_name_ssa_1 = context
|
11171 + | .access_point_name_ssa_1
|
13567 11172 | .as_ref()
|
13568 - | .map(|s| s.clone())
|
13569 11173 | .expect("Guaranteed to have a value by earlier checks.");
|
13570 - | ::std::result::Result::Ok(
|
13571 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13572 - | .url({
|
11174 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
13573 11175 | let mut out = String::new();
|
11176 + | out.push_str("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
13574 11177 | #[allow(clippy::needless_borrow)]
|
13575 - | out.push_str(&url.scheme());
|
13576 - | out.push_str("://");
|
13577 - | #[allow(clippy::needless_borrow)]
|
13578 - | out.push_str(&url.authority());
|
13579 - | #[allow(clippy::needless_borrow)]
|
13580 - | out.push_str(&url.normalized_path());
|
11178 + | out.push_str(&access_point_name_ssa_1.as_ref());
|
11179 + | out.push('`');
|
11180 + | out
|
11181 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
11182 + | }
|
11183 + | 44 => {
|
11184 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11185 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11186 + | let mut out = String::new();
|
11187 + | out.push_str("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
13581 11188 | #[allow(clippy::needless_borrow)]
|
13582 - | out.push_str(&bucket.as_ref());
|
11189 + | out.push_str(&bucket_arn.account_id());
|
11190 + | out.push('`');
|
13583 11191 | out
|
13584 - | })
|
13585 - | .property(
|
13586 - | "authSchemes",
|
13587 - | vec![::aws_smithy_types::Document::from({
|
13588 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13589 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13590 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13591 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13592 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
11192 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
11193 + | }
|
11194 + | 45 => {
|
11195 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11196 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11197 + | let mut out = String::new();
|
11198 + | out.push_str("Invalid region in ARN: `");
|
11199 + | #[allow(clippy::needless_borrow)]
|
11200 + | out.push_str(&bucket_arn.region());
|
11201 + | out.push_str("` (invalid DNS name)");
|
13593 11202 | out
|
13594 - | })],
|
13595 - | )
|
13596 - | .build(),
|
13597 - | )
|
11203 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
13598 11204 | }
|
13599 - | Self::Result30 => {
|
13600 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13601 - | let effective_std_region = context
|
13602 - | .effective_std_region
|
13603 - | .as_ref()
|
13604 - | .map(|s| s.clone())
|
13605 - | .expect("Guaranteed to have a value by earlier checks.");
|
13606 - | let url = context
|
13607 - | .url
|
13608 - | .as_ref()
|
13609 - | .map(|s| s.clone())
|
13610 - | .expect("Guaranteed to have a value by earlier checks.");
|
13611 - | ::std::result::Result::Ok(
|
13612 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13613 - | .url({
|
11205 + | 46 => {
|
11206 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
11207 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11208 + | let bucket_partition = context.bucket_partition.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11209 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
13614 11210 | let mut out = String::new();
|
11211 + | out.push_str("Client was configured for partition `");
|
13615 11212 | #[allow(clippy::needless_borrow)]
|
13616 - | out.push_str(&url.scheme());
|
13617 - | out.push_str("://");
|
11213 + | out.push_str(&partition_result.name());
|
11214 + | out.push_str("` but ARN (`");
|
13618 11215 | #[allow(clippy::needless_borrow)]
|
13619 11216 | out.push_str(&bucket.as_ref());
|
13620 - | out.push('.');
|
13621 - | #[allow(clippy::needless_borrow)]
|
13622 - | out.push_str(&url.authority());
|
11217 + | out.push_str("`) has `");
|
13623 11218 | #[allow(clippy::needless_borrow)]
|
13624 - | out.push_str(&url.path());
|
11219 + | out.push_str(&bucket_partition.name());
|
11220 + | out.push('`');
|
13625 11221 | out
|
13626 - | })
|
13627 - | .property(
|
13628 - | "authSchemes",
|
13629 - | vec![::aws_smithy_types::Document::from({
|
13630 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13631 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13632 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13633 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13634 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
11222 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
11223 + | }
|
11224 + | 47 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11225 + | "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.".to_string(),
|
11226 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11227 + | 48 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11228 + | "Invalid ARN: bucket ARN is missing a region".to_string(),
|
11229 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11230 + | 49 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11231 + | "Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided".to_string(),
|
11232 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11233 + | 50 => {
|
11234 + | let arn_type = context.arn_type.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11235 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11236 + | let mut out = String::new();
|
11237 + | out.push_str("Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `");
|
11238 + | #[allow(clippy::needless_borrow)]
|
11239 + | out.push_str(&arn_type.as_ref());
|
11240 + | out.push('`');
|
13635 11241 | out
|
13636 - | })],
|
13637 - | )
|
13638 - | .build(),
|
13639 - | )
|
11242 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
13640 11243 | }
|
13641 - | Self::Result31 => {
|
13642 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13643 - | let effective_std_region = context
|
13644 - | .effective_std_region
|
11244 + | 51 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11245 + | "Access Points do not support S3 Accelerate".to_string(),
|
11246 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11247 + | 52 => {
|
11248 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11249 + | let effective_arn_region = context
|
11250 + | .effective_arn_region
|
13645 11251 | .as_ref()
|
13646 - | .map(|s| s.clone())
|
13647 11252 | .expect("Guaranteed to have a value by earlier checks.");
|
13648 - | let partition_result = context
|
13649 - | .partition_result
|
11253 + | let access_point_name_ssa_1 = context
|
11254 + | .access_point_name_ssa_1
|
13650 11255 | .as_ref()
|
13651 - | .map(|s| s.clone())
|
13652 11256 | .expect("Guaranteed to have a value by earlier checks.");
|
11257 + | let bucket_partition = context.bucket_partition.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13653 11258 | ::std::result::Result::Ok(
|
13654 11259 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13655 11260 | .url({
|
13656 11261 | let mut out = String::new();
|
13657 11262 | out.push_str("https://");
|
13658 11263 | #[allow(clippy::needless_borrow)]
|
13659 - | out.push_str(&bucket.as_ref());
|
13660 - | out.push_str(".s3-accelerate.");
|
11264 + | out.push_str(&access_point_name_ssa_1.as_ref());
|
11265 + | out.push('-');
|
13661 11266 | #[allow(clippy::needless_borrow)]
|
13662 - | out.push_str(&partition_result.dns_suffix());
|
11267 + | out.push_str(&bucket_arn.account_id());
|
11268 + | out.push_str(".s3-accesspoint-fips.dualstack.");
|
11269 + | #[allow(clippy::needless_borrow)]
|
11270 + | out.push_str(&effective_arn_region.as_ref());
|
11271 + | out.push('.');
|
11272 + | #[allow(clippy::needless_borrow)]
|
11273 + | out.push_str(&bucket_partition.dns_suffix());
|
13663 11274 | out
|
13664 11275 | })
|
13665 - | .property(
|
13666 - | "authSchemes",
|
13667 - | vec![::aws_smithy_types::Document::from({
|
13668 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13669 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13670 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13671 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13672 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13673 - | out
|
13674 - | })],
|
11276 + | .auth_scheme(
|
11277 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11278 + | .put("disableDoubleEncoding", true)
|
11279 + | .put("signingName", "s3")
|
11280 + | .put("signingRegion", effective_arn_region.as_ref()),
|
13675 11281 | )
|
13676 11282 | .build(),
|
13677 11283 | )
|
13678 11284 | }
|
13679 - | Self::Result32 => {
|
13680 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13681 - | let effective_std_region = context
|
13682 - | .effective_std_region
|
11285 + | 53 => {
|
11286 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11287 + | let effective_arn_region = context
|
11288 + | .effective_arn_region
|
13683 11289 | .as_ref()
|
13684 - | .map(|s| s.clone())
|
13685 11290 | .expect("Guaranteed to have a value by earlier checks.");
|
13686 - | let partition_result = context
|
13687 - | .partition_result
|
11291 + | let access_point_name_ssa_1 = context
|
11292 + | .access_point_name_ssa_1
|
13688 11293 | .as_ref()
|
13689 - | .map(|s| s.clone())
|
13690 11294 | .expect("Guaranteed to have a value by earlier checks.");
|
11295 + | let bucket_partition = context.bucket_partition.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13691 11296 | ::std::result::Result::Ok(
|
13692 11297 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13693 11298 | .url({
|
13694 11299 | let mut out = String::new();
|
13695 11300 | out.push_str("https://");
|
13696 11301 | #[allow(clippy::needless_borrow)]
|
13697 - | out.push_str(&bucket.as_ref());
|
13698 - | out.push_str(".s3.");
|
11302 + | out.push_str(&access_point_name_ssa_1.as_ref());
|
11303 + | out.push('-');
|
13699 11304 | #[allow(clippy::needless_borrow)]
|
13700 - | out.push_str(&partition_result.dns_suffix());
|
11305 + | out.push_str(&bucket_arn.account_id());
|
11306 + | out.push_str(".s3-accesspoint-fips.");
|
11307 + | #[allow(clippy::needless_borrow)]
|
11308 + | out.push_str(&effective_arn_region.as_ref());
|
11309 + | out.push('.');
|
11310 + | #[allow(clippy::needless_borrow)]
|
11311 + | out.push_str(&bucket_partition.dns_suffix());
|
13701 11312 | out
|
13702 11313 | })
|
13703 - | .property(
|
13704 - | "authSchemes",
|
13705 - | vec![::aws_smithy_types::Document::from({
|
13706 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13707 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13708 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13709 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13710 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13711 - | out
|
13712 - | })],
|
11314 + | .auth_scheme(
|
11315 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11316 + | .put("disableDoubleEncoding", true)
|
11317 + | .put("signingName", "s3")
|
11318 + | .put("signingRegion", effective_arn_region.as_ref()),
|
13713 11319 | )
|
13714 11320 | .build(),
|
13715 11321 | )
|
13716 11322 | }
|
13717 - | Self::Result33 => {
|
13718 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13719 - | let effective_std_region = context
|
13720 - | .effective_std_region
|
11323 + | 54 => {
|
11324 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11325 + | let effective_arn_region = context
|
11326 + | .effective_arn_region
|
13721 11327 | .as_ref()
|
13722 - | .map(|s| s.clone())
|
13723 11328 | .expect("Guaranteed to have a value by earlier checks.");
|
13724 - | let partition_result = context
|
13725 - | .partition_result
|
11329 + | let access_point_name_ssa_1 = context
|
11330 + | .access_point_name_ssa_1
|
13726 11331 | .as_ref()
|
13727 - | .map(|s| s.clone())
|
13728 11332 | .expect("Guaranteed to have a value by earlier checks.");
|
11333 + | let bucket_partition = context.bucket_partition.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13729 11334 | ::std::result::Result::Ok(
|
13730 11335 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13731 11336 | .url({
|
13732 11337 | let mut out = String::new();
|
13733 11338 | out.push_str("https://");
|
13734 11339 | #[allow(clippy::needless_borrow)]
|
13735 - | out.push_str(&bucket.as_ref());
|
13736 - | out.push_str(".s3.");
|
11340 + | out.push_str(&access_point_name_ssa_1.as_ref());
|
11341 + | out.push('-');
|
13737 11342 | #[allow(clippy::needless_borrow)]
|
13738 - | out.push_str(&effective_std_region.as_ref());
|
11343 + | out.push_str(&bucket_arn.account_id());
|
11344 + | out.push_str(".s3-accesspoint.dualstack.");
|
11345 + | #[allow(clippy::needless_borrow)]
|
11346 + | out.push_str(&effective_arn_region.as_ref());
|
13739 11347 | out.push('.');
|
13740 11348 | #[allow(clippy::needless_borrow)]
|
13741 - | out.push_str(&partition_result.dns_suffix());
|
11349 + | out.push_str(&bucket_partition.dns_suffix());
|
13742 11350 | out
|
13743 11351 | })
|
13744 - | .property(
|
13745 - | "authSchemes",
|
13746 - | vec![::aws_smithy_types::Document::from({
|
13747 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13748 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13749 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13750 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
13751 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
13752 - | out
|
13753 - | })],
|
11352 + | .auth_scheme(
|
11353 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11354 + | .put("disableDoubleEncoding", true)
|
11355 + | .put("signingName", "s3")
|
11356 + | .put("signingRegion", effective_arn_region.as_ref()),
|
13754 11357 | )
|
13755 11358 | .build(),
|
13756 11359 | )
|
13757 11360 | }
|
13758 - | Self::Result34 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
13759 - | "Invalid region: region was not a valid DNS name.".to_string(),
|
13760 - | )),
|
13761 - | Self::Result35 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
13762 - | "S3 Object Lambda does not support Dual-stack".to_string(),
|
13763 - | )),
|
13764 - | Self::Result36 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
13765 - | "S3 Object Lambda does not support S3 Accelerate".to_string(),
|
13766 - | )),
|
13767 - | Self::Result37 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
13768 - | "Access points are not supported for this operation".to_string(),
|
13769 - | )),
|
13770 - | Self::Result38 => {
|
13771 - | let region = params.region.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13772 - | let bucket_arn = context
|
13773 - | .bucket_arn
|
13774 - | .as_ref()
|
13775 - | .map(|s| s.clone())
|
13776 - | .expect("Guaranteed to have a value by earlier checks.");
|
13777 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
13778 - | let mut out = String::new();
|
13779 - | out.push_str("Invalid configuration: region from ARN `");
|
13780 - | #[allow(clippy::needless_borrow)]
|
13781 - | out.push_str(&bucket_arn.region());
|
13782 - | out.push_str("` does not match client region `");
|
13783 - | #[allow(clippy::needless_borrow)]
|
13784 - | out.push_str(®ion.as_ref());
|
13785 - | out.push_str("` and UseArnRegion is `false`");
|
13786 - | out
|
13787 - | }))
|
13788 - | }
|
13789 - | Self::Result39 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
13790 - | "Invalid ARN: Missing account id".to_string(),
|
13791 - | )),
|
13792 - | Self::Result40 => {
|
13793 - | let url = context
|
13794 - | .url
|
13795 - | .as_ref()
|
13796 - | .map(|s| s.clone())
|
13797 - | .expect("Guaranteed to have a value by earlier checks.");
|
13798 - | let bucket_arn = context
|
13799 - | .bucket_arn
|
13800 - | .as_ref()
|
13801 - | .map(|s| s.clone())
|
13802 - | .expect("Guaranteed to have a value by earlier checks.");
|
11361 + | 55 => {
|
11362 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11363 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13803 11364 | let effective_arn_region = context
|
13804 11365 | .effective_arn_region
|
13805 11366 | .as_ref()
|
13806 - | .map(|s| s.clone())
|
13807 11367 | .expect("Guaranteed to have a value by earlier checks.");
|
13808 11368 | let access_point_name_ssa_1 = context
|
13809 11369 | .access_point_name_ssa_1
|
13810 11370 | .as_ref()
|
13811 - | .map(|s| s.clone())
|
13812 11371 | .expect("Guaranteed to have a value by earlier checks.");
|
13813 11372 | ::std::result::Result::Ok(
|
13814 11373 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13815 11374 | .url({
|
13816 11375 | let mut out = String::new();
|
13817 11376 | #[allow(clippy::needless_borrow)]
|
13818 11377 | out.push_str(&url.scheme());
|
13819 11378 | out.push_str("://");
|
13820 11379 | #[allow(clippy::needless_borrow)]
|
13821 11380 | out.push_str(&access_point_name_ssa_1.as_ref());
|
13822 11381 | out.push('-');
|
13823 11382 | #[allow(clippy::needless_borrow)]
|
13824 11383 | out.push_str(&bucket_arn.account_id());
|
13825 11384 | out.push('.');
|
13826 11385 | #[allow(clippy::needless_borrow)]
|
13827 11386 | out.push_str(&url.authority());
|
13828 11387 | #[allow(clippy::needless_borrow)]
|
13829 11388 | out.push_str(&url.path());
|
13830 11389 | out
|
13831 11390 | })
|
13832 - | .property(
|
13833 - | "authSchemes",
|
13834 - | vec![::aws_smithy_types::Document::from({
|
13835 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13836 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13837 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13838 - | out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
|
13839 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
13840 - | out
|
13841 - | })],
|
11391 + | .auth_scheme(
|
11392 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11393 + | .put("disableDoubleEncoding", true)
|
11394 + | .put("signingName", "s3")
|
11395 + | .put("signingRegion", effective_arn_region.as_ref()),
|
13842 11396 | )
|
13843 11397 | .build(),
|
13844 11398 | )
|
13845 11399 | }
|
13846 - | Self::Result41 => {
|
13847 - | let bucket_arn = context
|
13848 - | .bucket_arn
|
13849 - | .as_ref()
|
13850 - | .map(|s| s.clone())
|
13851 - | .expect("Guaranteed to have a value by earlier checks.");
|
11400 + | 56 => {
|
11401 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13852 11402 | let effective_arn_region = context
|
13853 11403 | .effective_arn_region
|
13854 11404 | .as_ref()
|
13855 - | .map(|s| s.clone())
|
13856 11405 | .expect("Guaranteed to have a value by earlier checks.");
|
13857 11406 | let access_point_name_ssa_1 = context
|
13858 11407 | .access_point_name_ssa_1
|
13859 11408 | .as_ref()
|
13860 - | .map(|s| s.clone())
|
13861 - | .expect("Guaranteed to have a value by earlier checks.");
|
13862 - | let bucket_partition = context
|
13863 - | .bucket_partition
|
13864 - | .as_ref()
|
13865 - | .map(|s| s.clone())
|
13866 11409 | .expect("Guaranteed to have a value by earlier checks.");
|
11410 + | let bucket_partition = context.bucket_partition.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13867 11411 | ::std::result::Result::Ok(
|
13868 11412 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13869 11413 | .url({
|
13870 11414 | let mut out = String::new();
|
13871 11415 | out.push_str("https://");
|
13872 11416 | #[allow(clippy::needless_borrow)]
|
13873 11417 | out.push_str(&access_point_name_ssa_1.as_ref());
|
13874 11418 | out.push('-');
|
13875 11419 | #[allow(clippy::needless_borrow)]
|
13876 11420 | out.push_str(&bucket_arn.account_id());
|
13877 - | out.push_str(".s3-object-lambda-fips.");
|
11421 + | out.push_str(".s3-accesspoint.");
|
13878 11422 | #[allow(clippy::needless_borrow)]
|
13879 11423 | out.push_str(&effective_arn_region.as_ref());
|
13880 11424 | out.push('.');
|
13881 11425 | #[allow(clippy::needless_borrow)]
|
13882 11426 | out.push_str(&bucket_partition.dns_suffix());
|
13883 11427 | out
|
13884 11428 | })
|
13885 - | .property(
|
13886 - | "authSchemes",
|
13887 - | vec![::aws_smithy_types::Document::from({
|
13888 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13889 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13890 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13891 - | out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
|
13892 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
13893 - | out
|
13894 - | })],
|
11429 + | .auth_scheme(
|
11430 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11431 + | .put("disableDoubleEncoding", true)
|
11432 + | .put("signingName", "s3")
|
11433 + | .put("signingRegion", effective_arn_region.as_ref()),
|
13895 11434 | )
|
13896 11435 | .build(),
|
13897 11436 | )
|
13898 11437 | }
|
13899 - | Self::Result42 => {
|
13900 - | let bucket_arn = context
|
13901 - | .bucket_arn
|
13902 - | .as_ref()
|
13903 - | .map(|s| s.clone())
|
13904 - | .expect("Guaranteed to have a value by earlier checks.");
|
13905 - | let effective_arn_region = context
|
13906 - | .effective_arn_region
|
13907 - | .as_ref()
|
13908 - | .map(|s| s.clone())
|
13909 - | .expect("Guaranteed to have a value by earlier checks.");
|
11438 + | 57 => {
|
11439 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11440 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11441 + | let mut out = String::new();
|
11442 + | out.push_str("Invalid ARN: The ARN was not for the S3 service, found: ");
|
11443 + | #[allow(clippy::needless_borrow)]
|
11444 + | out.push_str(&bucket_arn.service());
|
11445 + | out
|
11446 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
11447 + | }
|
11448 + | 58 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11449 + | "S3 MRAP does not support dual-stack".to_string(),
|
11450 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11451 + | 59 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11452 + | "S3 MRAP does not support FIPS".to_string(),
|
11453 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11454 + | 60 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11455 + | "S3 MRAP does not support S3 Accelerate".to_string(),
|
11456 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11457 + | 61 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11458 + | "Invalid configuration: Multi-Region Access Point ARNs are disabled.".to_string(),
|
11459 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11460 + | 62 => {
|
11461 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
13910 11462 | let access_point_name_ssa_1 = context
|
13911 11463 | .access_point_name_ssa_1
|
13912 11464 | .as_ref()
|
13913 - | .map(|s| s.clone())
|
13914 - | .expect("Guaranteed to have a value by earlier checks.");
|
13915 - | let bucket_partition = context
|
13916 - | .bucket_partition
|
13917 - | .as_ref()
|
13918 - | .map(|s| s.clone())
|
13919 11465 | .expect("Guaranteed to have a value by earlier checks.");
|
13920 11466 | ::std::result::Result::Ok(
|
13921 11467 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
13922 11468 | .url({
|
13923 11469 | let mut out = String::new();
|
13924 11470 | out.push_str("https://");
|
13925 11471 | #[allow(clippy::needless_borrow)]
|
13926 11472 | out.push_str(&access_point_name_ssa_1.as_ref());
|
13927 - | out.push('-');
|
13928 - | #[allow(clippy::needless_borrow)]
|
13929 - | out.push_str(&bucket_arn.account_id());
|
13930 - | out.push_str(".s3-object-lambda.");
|
13931 - | #[allow(clippy::needless_borrow)]
|
13932 - | out.push_str(&effective_arn_region.as_ref());
|
13933 - | out.push('.');
|
11473 + | out.push_str(".accesspoint.s3-global.");
|
13934 11474 | #[allow(clippy::needless_borrow)]
|
13935 - | out.push_str(&bucket_partition.dns_suffix());
|
11475 + | out.push_str(&partition_result.dns_suffix());
|
13936 11476 | out
|
13937 11477 | })
|
13938 - | .property(
|
13939 - | "authSchemes",
|
13940 - | vec![::aws_smithy_types::Document::from({
|
13941 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
13942 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
13943 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
13944 - | out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
|
13945 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
13946 - | out
|
13947 - | })],
|
11478 + | .auth_scheme(
|
11479 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4a".to_string(), 3)
|
11480 + | .put("disableDoubleEncoding", true)
|
11481 + | .put("signingName", "s3")
|
11482 + | .put("signingRegionSet", vec![::aws_smithy_types::Document::from("*".to_string())]),
|
13948 11483 | )
|
13949 11484 | .build(),
|
13950 11485 | )
|
13951 11486 | }
|
13952 - | Self::Result43 => {
|
13953 - | let access_point_name_ssa_1 = context
|
13954 - | .access_point_name_ssa_1
|
13955 - | .as_ref()
|
13956 - | .map(|s| s.clone())
|
13957 - | .expect("Guaranteed to have a value by earlier checks.");
|
13958 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11487 + | 63 => {
|
11488 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11489 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11490 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
13959 11491 | let mut out = String::new();
|
13960 - | out.push_str("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
11492 + | out.push_str("Client was configured for partition `");
|
13961 11493 | #[allow(clippy::needless_borrow)]
|
13962 - | out.push_str(&access_point_name_ssa_1.as_ref());
|
11494 + | out.push_str(&partition_result.name());
|
11495 + | out.push_str("` but bucket referred to partition `");
|
11496 + | #[allow(clippy::needless_borrow)]
|
11497 + | out.push_str(&bucket_arn.partition());
|
13963 11498 | out.push('`');
|
13964 11499 | out
|
13965 - | }))
|
11500 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
13966 11501 | }
|
13967 - | Self::Result44 => {
|
13968 - | let bucket_arn = context
|
13969 - | .bucket_arn
|
11502 + | 64 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11503 + | "Invalid Access Point Name".to_string(),
|
11504 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11505 + | 65 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11506 + | "S3 Outposts does not support Dual-stack".to_string(),
|
11507 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11508 + | 66 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11509 + | "S3 Outposts does not support FIPS".to_string(),
|
11510 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11511 + | 67 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11512 + | "S3 Outposts does not support S3 Accelerate".to_string(),
|
11513 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11514 + | 68 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11515 + | "Invalid Arn: Outpost Access Point ARN contains sub resources".to_string(),
|
11516 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11517 + | 69 => {
|
11518 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11519 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11520 + | let effective_arn_region = context
|
11521 + | .effective_arn_region
|
13970 11522 | .as_ref()
|
13971 - | .map(|s| s.clone())
|
13972 11523 | .expect("Guaranteed to have a value by earlier checks.");
|
13973 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
13974 - | let mut out = String::new();
|
13975 - | out.push_str("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
13976 - | #[allow(clippy::needless_borrow)]
|
13977 - | out.push_str(&bucket_arn.account_id());
|
13978 - | out.push('`');
|
13979 - | out
|
13980 - | }))
|
13981 - | }
|
13982 - | Self::Result45 => {
|
13983 - | let bucket_arn = context
|
13984 - | .bucket_arn
|
11524 + | let outpost_id_ssa_1 = context.outpost_id_ssa_1.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11525 + | let access_point_name_ssa_2 = context
|
11526 + | .access_point_name_ssa_2
|
13985 11527 | .as_ref()
|
13986 - | .map(|s| s.clone())
|
13987 11528 | .expect("Guaranteed to have a value by earlier checks.");
|
13988 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
13989 - | let mut out = String::new();
|
13990 - | out.push_str("Invalid region in ARN: `");
|
13991 - | #[allow(clippy::needless_borrow)]
|
13992 - | out.push_str(&bucket_arn.region());
|
13993 - | out.push_str("` (invalid DNS name)");
|
13994 - | out
|
13995 - | }))
|
13996 - | }
|
13997 - | Self::Result46 => {
|
13998 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
13999 - | let partition_result = context
|
14000 - | .partition_result
|
14001 - | .as_ref()
|
14002 - | .map(|s| s.clone())
|
14003 - | .expect("Guaranteed to have a value by earlier checks.");
|
14004 - | let bucket_partition = context
|
14005 - | .bucket_partition
|
14006 - | .as_ref()
|
14007 - | .map(|s| s.clone())
|
14008 - | .expect("Guaranteed to have a value by earlier checks.");
|
14009 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11529 + | ::std::result::Result::Ok(
|
11530 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11531 + | .url({
|
14010 11532 | let mut out = String::new();
|
14011 - | out.push_str("Client was configured for partition `");
|
11533 + | out.push_str("https://");
|
14012 11534 | #[allow(clippy::needless_borrow)]
|
14013 - | out.push_str(&partition_result.name());
|
14014 - | out.push_str("` but ARN (`");
|
11535 + | out.push_str(&access_point_name_ssa_2.as_ref());
|
11536 + | out.push('-');
|
14015 11537 | #[allow(clippy::needless_borrow)]
|
14016 - | out.push_str(&bucket.as_ref());
|
14017 - | out.push_str("`) has `");
|
11538 + | out.push_str(&bucket_arn.account_id());
|
11539 + | out.push('.');
|
14018 11540 | #[allow(clippy::needless_borrow)]
|
14019 - | out.push_str(&bucket_partition.name());
|
14020 - | out.push('`');
|
14021 - | out
|
14022 - | }))
|
14023 - | }
|
14024 - | Self::Result47 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14025 - | "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.".to_string(),
|
14026 - | )),
|
14027 - | Self::Result48 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14028 - | "Invalid ARN: bucket ARN is missing a region".to_string(),
|
14029 - | )),
|
14030 - | Self::Result49 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14031 - | "Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided".to_string(),
|
14032 - | )),
|
14033 - | Self::Result50 => {
|
14034 - | let arn_type = context
|
14035 - | .arn_type
|
14036 - | .as_ref()
|
14037 - | .map(|s| s.clone())
|
14038 - | .expect("Guaranteed to have a value by earlier checks.");
|
14039 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
14040 - | let mut out = String::new();
|
14041 - | out.push_str("Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `");
|
11541 + | out.push_str(&outpost_id_ssa_1.as_ref());
|
11542 + | out.push('.');
|
14042 11543 | #[allow(clippy::needless_borrow)]
|
14043 - | out.push_str(&arn_type.as_ref());
|
14044 - | out.push('`');
|
11544 + | out.push_str(&url.authority());
|
14045 11545 | out
|
14046 - | }))
|
11546 + | })
|
11547 + | .auth_scheme(
|
11548 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4a".to_string(), 3)
|
11549 + | .put("disableDoubleEncoding", true)
|
11550 + | .put("signingName", "s3-outposts")
|
11551 + | .put("signingRegionSet", vec![::aws_smithy_types::Document::from("*".to_string())]),
|
11552 + | )
|
11553 + | .auth_scheme(
|
11554 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11555 + | .put("disableDoubleEncoding", true)
|
11556 + | .put("signingName", "s3-outposts")
|
11557 + | .put("signingRegion", effective_arn_region.as_ref()),
|
11558 + | )
|
11559 + | .build(),
|
11560 + | )
|
14047 11561 | }
|
14048 - | Self::Result51 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14049 - | "Access Points do not support S3 Accelerate".to_string(),
|
14050 - | )),
|
14051 - | Self::Result52 => {
|
14052 - | let bucket_arn = context
|
14053 - | .bucket_arn
|
14054 - | .as_ref()
|
14055 - | .map(|s| s.clone())
|
14056 - | .expect("Guaranteed to have a value by earlier checks.");
|
11562 + | 70 => {
|
11563 + | let bucket_arn = context.bucket_arn.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
14057 11564 | let effective_arn_region = context
|
14058 11565 | .effective_arn_region
|
14059 11566 | .as_ref()
|
14060 - | .map(|s| s.clone())
|
14061 - | .expect("Guaranteed to have a value by earlier checks.");
|
14062 - | let access_point_name_ssa_1 = context
|
14063 - | .access_point_name_ssa_1
|
14064 - | .as_ref()
|
14065 - | .map(|s| s.clone())
|
14066 11567 | .expect("Guaranteed to have a value by earlier checks.");
|
14067 - | let bucket_partition = context
|
14068 - | .bucket_partition
|
11568 + | let bucket_partition = context.bucket_partition.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11569 + | let outpost_id_ssa_1 = context.outpost_id_ssa_1.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11570 + | let access_point_name_ssa_2 = context
|
11571 + | .access_point_name_ssa_2
|
14069 11572 | .as_ref()
|
14070 - | .map(|s| s.clone())
|
14071 11573 | .expect("Guaranteed to have a value by earlier checks.");
|
14072 11574 | ::std::result::Result::Ok(
|
14073 11575 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14074 11576 | .url({
|
14075 11577 | let mut out = String::new();
|
14076 11578 | out.push_str("https://");
|
14077 11579 | #[allow(clippy::needless_borrow)]
|
14078 - | out.push_str(&access_point_name_ssa_1.as_ref());
|
11580 + | out.push_str(&access_point_name_ssa_2.as_ref());
|
14079 11581 | out.push('-');
|
14080 11582 | #[allow(clippy::needless_borrow)]
|
14081 11583 | out.push_str(&bucket_arn.account_id());
|
14082 - | out.push_str(".s3-accesspoint-fips.dualstack.");
|
11584 + | out.push('.');
|
11585 + | #[allow(clippy::needless_borrow)]
|
11586 + | out.push_str(&outpost_id_ssa_1.as_ref());
|
11587 + | out.push_str(".s3-outposts.");
|
14083 11588 | #[allow(clippy::needless_borrow)]
|
14084 11589 | out.push_str(&effective_arn_region.as_ref());
|
14085 11590 | out.push('.');
|
14086 11591 | #[allow(clippy::needless_borrow)]
|
14087 11592 | out.push_str(&bucket_partition.dns_suffix());
|
14088 11593 | out
|
14089 11594 | })
|
14090 - | .property(
|
14091 - | "authSchemes",
|
14092 - | vec![::aws_smithy_types::Document::from({
|
14093 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14094 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14095 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14096 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14097 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
14098 - | out
|
14099 - | })],
|
11595 + | .auth_scheme(
|
11596 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4a".to_string(), 3)
|
11597 + | .put("disableDoubleEncoding", true)
|
11598 + | .put("signingName", "s3-outposts")
|
11599 + | .put("signingRegionSet", vec![::aws_smithy_types::Document::from("*".to_string())]),
|
11600 + | )
|
11601 + | .auth_scheme(
|
11602 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11603 + | .put("disableDoubleEncoding", true)
|
11604 + | .put("signingName", "s3-outposts")
|
11605 + | .put("signingRegion", effective_arn_region.as_ref()),
|
14100 11606 | )
|
14101 11607 | .build(),
|
14102 11608 | )
|
14103 11609 | }
|
14104 - | Self::Result53 => {
|
14105 - | let bucket_arn = context
|
14106 - | .bucket_arn
|
14107 - | .as_ref()
|
14108 - | .map(|s| s.clone())
|
14109 - | .expect("Guaranteed to have a value by earlier checks.");
|
14110 - | let effective_arn_region = context
|
14111 - | .effective_arn_region
|
14112 - | .as_ref()
|
14113 - | .map(|s| s.clone())
|
14114 - | .expect("Guaranteed to have a value by earlier checks.");
|
14115 - | let access_point_name_ssa_1 = context
|
14116 - | .access_point_name_ssa_1
|
11610 + | 71 => {
|
11611 + | let outpost_type = context.outpost_type.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11612 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11613 + | let mut out = String::new();
|
11614 + | out.push_str("Expected an outpost type `accesspoint`, found ");
|
11615 + | #[allow(clippy::needless_borrow)]
|
11616 + | out.push_str(&outpost_type.as_ref());
|
11617 + | out
|
11618 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
11619 + | }
|
11620 + | 72 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11621 + | "Invalid ARN: expected an access point name".to_string(),
|
11622 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11623 + | 73 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11624 + | "Invalid ARN: Expected a 4-component resource".to_string(),
|
11625 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11626 + | 74 => {
|
11627 + | let outpost_id_ssa_1 = context.outpost_id_ssa_1.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11628 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11629 + | let mut out = String::new();
|
11630 + | out.push_str("Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
11631 + | #[allow(clippy::needless_borrow)]
|
11632 + | out.push_str(&outpost_id_ssa_1.as_ref());
|
11633 + | out.push('`');
|
11634 + | out
|
11635 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
11636 + | }
|
11637 + | 75 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11638 + | "Invalid ARN: The Outpost Id was not set".to_string(),
|
11639 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11640 + | 76 => {
|
11641 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
11642 + | let arn_type = context.arn_type.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11643 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11644 + | let mut out = String::new();
|
11645 + | out.push_str("Invalid ARN: Unrecognized format: ");
|
11646 + | #[allow(clippy::needless_borrow)]
|
11647 + | out.push_str(&bucket.as_ref());
|
11648 + | out.push_str(" (type: ");
|
11649 + | #[allow(clippy::needless_borrow)]
|
11650 + | out.push_str(&arn_type.as_ref());
|
11651 + | out.push(')');
|
11652 + | out
|
11653 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
11654 + | }
|
11655 + | 77 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11656 + | "Invalid ARN: No ARN type specified".to_string(),
|
11657 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11658 + | 78 => {
|
11659 + | let bucket = params.bucket.as_deref().unwrap_or_default();
|
11660 + | ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11661 + | let mut out = String::new();
|
11662 + | out.push_str("Invalid ARN: `");
|
11663 + | #[allow(clippy::needless_borrow)]
|
11664 + | out.push_str(&bucket.as_ref());
|
11665 + | out.push_str("` was not a valid ARN");
|
11666 + | out
|
11667 + | })) as ::aws_smithy_runtime_api::box_error::BoxError)
|
11668 + | }
|
11669 + | 79 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11670 + | "Path-style addressing cannot be used with ARN buckets".to_string(),
|
11671 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11672 + | 80 => {
|
11673 + | let effective_std_region = context
|
11674 + | .effective_std_region
|
14117 11675 | .as_ref()
|
14118 - | .map(|s| s.clone())
|
14119 11676 | .expect("Guaranteed to have a value by earlier checks.");
|
14120 - | let bucket_partition = context
|
14121 - | .bucket_partition
|
11677 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11678 + | let uri_encoded_bucket = context
|
11679 + | .uri_encoded_bucket
|
14122 11680 | .as_ref()
|
14123 - | .map(|s| s.clone())
|
14124 11681 | .expect("Guaranteed to have a value by earlier checks.");
|
14125 11682 | ::std::result::Result::Ok(
|
14126 11683 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14127 11684 | .url({
|
14128 11685 | let mut out = String::new();
|
14129 - | out.push_str("https://");
|
14130 - | #[allow(clippy::needless_borrow)]
|
14131 - | out.push_str(&access_point_name_ssa_1.as_ref());
|
14132 - | out.push('-');
|
14133 - | #[allow(clippy::needless_borrow)]
|
14134 - | out.push_str(&bucket_arn.account_id());
|
14135 - | out.push_str(".s3-accesspoint-fips.");
|
11686 + | out.push_str("https://s3-fips.dualstack.");
|
14136 11687 | #[allow(clippy::needless_borrow)]
|
14137 - | out.push_str(&effective_arn_region.as_ref());
|
11688 + | out.push_str(&effective_std_region.as_ref());
|
14138 11689 | out.push('.');
|
14139 11690 | #[allow(clippy::needless_borrow)]
|
14140 - | out.push_str(&bucket_partition.dns_suffix());
|
11691 + | out.push_str(&partition_result.dns_suffix());
|
11692 + | out.push('/');
|
11693 + | #[allow(clippy::needless_borrow)]
|
11694 + | out.push_str(&uri_encoded_bucket.as_ref());
|
14141 11695 | out
|
14142 11696 | })
|
14143 - | .property(
|
14144 - | "authSchemes",
|
14145 - | vec![::aws_smithy_types::Document::from({
|
14146 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14147 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14148 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14149 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14150 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
14151 - | out
|
14152 - | })],
|
11697 + | .auth_scheme(
|
11698 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11699 + | .put("disableDoubleEncoding", true)
|
11700 + | .put("signingName", "s3")
|
11701 + | .put("signingRegion", effective_std_region.as_ref()),
|
14153 11702 | )
|
14154 11703 | .build(),
|
14155 11704 | )
|
14156 11705 | }
|
14157 - | Self::Result54 => {
|
14158 - | let bucket_arn = context
|
14159 - | .bucket_arn
|
14160 - | .as_ref()
|
14161 - | .map(|s| s.clone())
|
14162 - | .expect("Guaranteed to have a value by earlier checks.");
|
14163 - | let effective_arn_region = context
|
14164 - | .effective_arn_region
|
14165 - | .as_ref()
|
14166 - | .map(|s| s.clone())
|
14167 - | .expect("Guaranteed to have a value by earlier checks.");
|
14168 - | let access_point_name_ssa_1 = context
|
14169 - | .access_point_name_ssa_1
|
11706 + | 81 => {
|
11707 + | let effective_std_region = context
|
11708 + | .effective_std_region
|
14170 11709 | .as_ref()
|
14171 - | .map(|s| s.clone())
|
14172 11710 | .expect("Guaranteed to have a value by earlier checks.");
|
14173 - | let bucket_partition = context
|
14174 - | .bucket_partition
|
11711 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11712 + | let uri_encoded_bucket = context
|
11713 + | .uri_encoded_bucket
|
14175 11714 | .as_ref()
|
14176 - | .map(|s| s.clone())
|
14177 11715 | .expect("Guaranteed to have a value by earlier checks.");
|
14178 11716 | ::std::result::Result::Ok(
|
14179 11717 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14180 11718 | .url({
|
14181 11719 | let mut out = String::new();
|
14182 - | out.push_str("https://");
|
14183 - | #[allow(clippy::needless_borrow)]
|
14184 - | out.push_str(&access_point_name_ssa_1.as_ref());
|
14185 - | out.push('-');
|
14186 - | #[allow(clippy::needless_borrow)]
|
14187 - | out.push_str(&bucket_arn.account_id());
|
14188 - | out.push_str(".s3-accesspoint.dualstack.");
|
11720 + | out.push_str("https://s3-fips.");
|
14189 11721 | #[allow(clippy::needless_borrow)]
|
14190 - | out.push_str(&effective_arn_region.as_ref());
|
11722 + | out.push_str(&effective_std_region.as_ref());
|
14191 11723 | out.push('.');
|
14192 11724 | #[allow(clippy::needless_borrow)]
|
14193 - | out.push_str(&bucket_partition.dns_suffix());
|
11725 + | out.push_str(&partition_result.dns_suffix());
|
11726 + | out.push('/');
|
11727 + | #[allow(clippy::needless_borrow)]
|
11728 + | out.push_str(&uri_encoded_bucket.as_ref());
|
14194 11729 | out
|
14195 11730 | })
|
14196 - | .property(
|
14197 - | "authSchemes",
|
14198 - | vec![::aws_smithy_types::Document::from({
|
14199 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14200 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14201 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14202 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14203 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
14204 - | out
|
14205 - | })],
|
11731 + | .auth_scheme(
|
11732 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11733 + | .put("disableDoubleEncoding", true)
|
11734 + | .put("signingName", "s3")
|
11735 + | .put("signingRegion", effective_std_region.as_ref()),
|
14206 11736 | )
|
14207 11737 | .build(),
|
14208 11738 | )
|
14209 11739 | }
|
14210 - | Self::Result55 => {
|
14211 - | let url = context
|
14212 - | .url
|
14213 - | .as_ref()
|
14214 - | .map(|s| s.clone())
|
14215 - | .expect("Guaranteed to have a value by earlier checks.");
|
14216 - | let bucket_arn = context
|
14217 - | .bucket_arn
|
14218 - | .as_ref()
|
14219 - | .map(|s| s.clone())
|
14220 - | .expect("Guaranteed to have a value by earlier checks.");
|
14221 - | let effective_arn_region = context
|
14222 - | .effective_arn_region
|
11740 + | 82 => {
|
11741 + | let effective_std_region = context
|
11742 + | .effective_std_region
|
14223 11743 | .as_ref()
|
14224 - | .map(|s| s.clone())
|
14225 11744 | .expect("Guaranteed to have a value by earlier checks.");
|
14226 - | let access_point_name_ssa_1 = context
|
14227 - | .access_point_name_ssa_1
|
11745 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11746 + | let uri_encoded_bucket = context
|
11747 + | .uri_encoded_bucket
|
14228 11748 | .as_ref()
|
14229 - | .map(|s| s.clone())
|
14230 11749 | .expect("Guaranteed to have a value by earlier checks.");
|
14231 11750 | ::std::result::Result::Ok(
|
14232 11751 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14233 11752 | .url({
|
14234 11753 | let mut out = String::new();
|
11754 + | out.push_str("https://s3.dualstack.");
|
14235 11755 | #[allow(clippy::needless_borrow)]
|
14236 - | out.push_str(&url.scheme());
|
14237 - | out.push_str("://");
|
14238 - | #[allow(clippy::needless_borrow)]
|
14239 - | out.push_str(&access_point_name_ssa_1.as_ref());
|
14240 - | out.push('-');
|
14241 - | #[allow(clippy::needless_borrow)]
|
14242 - | out.push_str(&bucket_arn.account_id());
|
11756 + | out.push_str(&effective_std_region.as_ref());
|
14243 11757 | out.push('.');
|
14244 11758 | #[allow(clippy::needless_borrow)]
|
14245 - | out.push_str(&url.authority());
|
11759 + | out.push_str(&partition_result.dns_suffix());
|
11760 + | out.push('/');
|
14246 11761 | #[allow(clippy::needless_borrow)]
|
14247 - | out.push_str(&url.path());
|
11762 + | out.push_str(&uri_encoded_bucket.as_ref());
|
14248 11763 | out
|
14249 11764 | })
|
14250 - | .property(
|
14251 - | "authSchemes",
|
14252 - | vec![::aws_smithy_types::Document::from({
|
14253 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14254 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14255 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14256 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14257 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
14258 - | out
|
14259 - | })],
|
11765 + | .auth_scheme(
|
11766 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11767 + | .put("disableDoubleEncoding", true)
|
11768 + | .put("signingName", "s3")
|
11769 + | .put("signingRegion", effective_std_region.as_ref()),
|
14260 11770 | )
|
14261 11771 | .build(),
|
14262 11772 | )
|
14263 11773 | }
|
14264 - | Self::Result56 => {
|
14265 - | let bucket_arn = context
|
14266 - | .bucket_arn
|
14267 - | .as_ref()
|
14268 - | .map(|s| s.clone())
|
14269 - | .expect("Guaranteed to have a value by earlier checks.");
|
14270 - | let effective_arn_region = context
|
14271 - | .effective_arn_region
|
14272 - | .as_ref()
|
14273 - | .map(|s| s.clone())
|
14274 - | .expect("Guaranteed to have a value by earlier checks.");
|
14275 - | let access_point_name_ssa_1 = context
|
14276 - | .access_point_name_ssa_1
|
11774 + | 83 => {
|
11775 + | let effective_std_region = context
|
11776 + | .effective_std_region
|
14277 11777 | .as_ref()
|
14278 - | .map(|s| s.clone())
|
14279 11778 | .expect("Guaranteed to have a value by earlier checks.");
|
14280 - | let bucket_partition = context
|
14281 - | .bucket_partition
|
11779 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11780 + | let uri_encoded_bucket = context
|
11781 + | .uri_encoded_bucket
|
14282 11782 | .as_ref()
|
14283 - | .map(|s| s.clone())
|
14284 11783 | .expect("Guaranteed to have a value by earlier checks.");
|
14285 11784 | ::std::result::Result::Ok(
|
14286 11785 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14287 11786 | .url({
|
14288 11787 | let mut out = String::new();
|
14289 - | out.push_str("https://");
|
14290 11788 | #[allow(clippy::needless_borrow)]
|
14291 - | out.push_str(&access_point_name_ssa_1.as_ref());
|
14292 - | out.push('-');
|
11789 + | out.push_str(&url.scheme());
|
11790 + | out.push_str("://");
|
14293 11791 | #[allow(clippy::needless_borrow)]
|
14294 - | out.push_str(&bucket_arn.account_id());
|
14295 - | out.push_str(".s3-accesspoint.");
|
11792 + | out.push_str(&url.authority());
|
14296 11793 | #[allow(clippy::needless_borrow)]
|
14297 - | out.push_str(&effective_arn_region.as_ref());
|
14298 - | out.push('.');
|
11794 + | out.push_str(&url.normalized_path());
|
14299 11795 | #[allow(clippy::needless_borrow)]
|
14300 - | out.push_str(&bucket_partition.dns_suffix());
|
11796 + | out.push_str(&uri_encoded_bucket.as_ref());
|
14301 11797 | out
|
14302 11798 | })
|
14303 - | .property(
|
14304 - | "authSchemes",
|
14305 - | vec![::aws_smithy_types::Document::from({
|
14306 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14307 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14308 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14309 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14310 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
14311 - | out
|
14312 - | })],
|
11799 + | .auth_scheme(
|
11800 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11801 + | .put("disableDoubleEncoding", true)
|
11802 + | .put("signingName", "s3")
|
11803 + | .put("signingRegion", effective_std_region.as_ref()),
|
14313 11804 | )
|
14314 11805 | .build(),
|
14315 11806 | )
|
14316 11807 | }
|
14317 - | Self::Result57 => {
|
14318 - | let bucket_arn = context
|
14319 - | .bucket_arn
|
11808 + | 84 => {
|
11809 + | let effective_std_region = context
|
11810 + | .effective_std_region
|
11811 + | .as_ref()
|
11812 + | .expect("Guaranteed to have a value by earlier checks.");
|
11813 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11814 + | let uri_encoded_bucket = context
|
11815 + | .uri_encoded_bucket
|
14320 11816 | .as_ref()
|
14321 - | .map(|s| s.clone())
|
14322 11817 | .expect("Guaranteed to have a value by earlier checks.");
|
14323 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11818 + | ::std::result::Result::Ok(
|
11819 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11820 + | .url({
|
14324 11821 | let mut out = String::new();
|
14325 - | out.push_str("Invalid ARN: The ARN was not for the S3 service, found: ");
|
11822 + | out.push_str("https://s3.");
|
14326 11823 | #[allow(clippy::needless_borrow)]
|
14327 - | out.push_str(&bucket_arn.service());
|
11824 + | out.push_str(&partition_result.dns_suffix());
|
11825 + | out.push('/');
|
11826 + | #[allow(clippy::needless_borrow)]
|
11827 + | out.push_str(&uri_encoded_bucket.as_ref());
|
14328 11828 | out
|
14329 - | }))
|
11829 + | })
|
11830 + | .auth_scheme(
|
11831 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11832 + | .put("disableDoubleEncoding", true)
|
11833 + | .put("signingName", "s3")
|
11834 + | .put("signingRegion", effective_std_region.as_ref()),
|
11835 + | )
|
11836 + | .build(),
|
11837 + | )
|
14330 11838 | }
|
14331 - | Self::Result58 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14332 - | "S3 MRAP does not support dual-stack".to_string(),
|
14333 - | )),
|
14334 - | Self::Result59 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14335 - | "S3 MRAP does not support FIPS".to_string(),
|
14336 - | )),
|
14337 - | Self::Result60 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14338 - | "S3 MRAP does not support S3 Accelerate".to_string(),
|
14339 - | )),
|
14340 - | Self::Result61 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14341 - | "Invalid configuration: Multi-Region Access Point ARNs are disabled.".to_string(),
|
14342 - | )),
|
14343 - | Self::Result62 => {
|
14344 - | let partition_result = context
|
14345 - | .partition_result
|
11839 + | 85 => {
|
11840 + | let effective_std_region = context
|
11841 + | .effective_std_region
|
14346 11842 | .as_ref()
|
14347 - | .map(|s| s.clone())
|
14348 11843 | .expect("Guaranteed to have a value by earlier checks.");
|
14349 - | let access_point_name_ssa_1 = context
|
14350 - | .access_point_name_ssa_1
|
11844 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11845 + | let uri_encoded_bucket = context
|
11846 + | .uri_encoded_bucket
|
14351 11847 | .as_ref()
|
14352 - | .map(|s| s.clone())
|
14353 11848 | .expect("Guaranteed to have a value by earlier checks.");
|
14354 11849 | ::std::result::Result::Ok(
|
14355 11850 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14356 11851 | .url({
|
14357 11852 | let mut out = String::new();
|
14358 - | out.push_str("https://");
|
11853 + | out.push_str("https://s3.");
|
14359 11854 | #[allow(clippy::needless_borrow)]
|
14360 - | out.push_str(&access_point_name_ssa_1.as_ref());
|
14361 - | out.push_str(".accesspoint.s3-global.");
|
11855 + | out.push_str(&effective_std_region.as_ref());
|
11856 + | out.push('.');
|
14362 11857 | #[allow(clippy::needless_borrow)]
|
14363 11858 | out.push_str(&partition_result.dns_suffix());
|
11859 + | out.push('/');
|
11860 + | #[allow(clippy::needless_borrow)]
|
11861 + | out.push_str(&uri_encoded_bucket.as_ref());
|
14364 11862 | out
|
14365 11863 | })
|
14366 - | .property(
|
14367 - | "authSchemes",
|
14368 - | vec![::aws_smithy_types::Document::from({
|
14369 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14370 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14371 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
14372 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14373 - | out.insert(
|
14374 - | "signingRegionSet".to_string(),
|
14375 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
14376 - | );
|
14377 - | out
|
14378 - | })],
|
11864 + | .auth_scheme(
|
11865 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11866 + | .put("disableDoubleEncoding", true)
|
11867 + | .put("signingName", "s3")
|
11868 + | .put("signingRegion", effective_std_region.as_ref()),
|
14379 11869 | )
|
14380 11870 | .build(),
|
14381 11871 | )
|
14382 11872 | }
|
14383 - | Self::Result63 => {
|
14384 - | let partition_result = context
|
14385 - | .partition_result
|
14386 - | .as_ref()
|
14387 - | .map(|s| s.clone())
|
14388 - | .expect("Guaranteed to have a value by earlier checks.");
|
14389 - | let bucket_arn = context
|
14390 - | .bucket_arn
|
11873 + | 86 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
11874 + | "Path-style addressing cannot be used with S3 Accelerate".to_string(),
|
11875 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
11876 + | 87 => {
|
11877 + | let effective_std_region = context
|
11878 + | .effective_std_region
|
14391 11879 | .as_ref()
|
14392 - | .map(|s| s.clone())
|
14393 11880 | .expect("Guaranteed to have a value by earlier checks.");
|
14394 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
11881 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
11882 + | ::std::result::Result::Ok(
|
11883 + | ::aws_smithy_types::endpoint::Endpoint::builder()
|
11884 + | .url({
|
14395 11885 | let mut out = String::new();
|
14396 - | out.push_str("Client was configured for partition `");
|
14397 11886 | #[allow(clippy::needless_borrow)]
|
14398 - | out.push_str(&partition_result.name());
|
14399 - | out.push_str("` but bucket referred to partition `");
|
14400 - | #[allow(clippy::needless_borrow)]
|
14401 - | out.push_str(&bucket_arn.partition());
|
14402 - | out.push('`');
|
14403 - | out
|
14404 - | }))
|
14405 - | }
|
14406 - | Self::Result64 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14407 - | "Invalid Access Point Name".to_string(),
|
14408 - | )),
|
14409 - | Self::Result65 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14410 - | "S3 Outposts does not support Dual-stack".to_string(),
|
14411 - | )),
|
14412 - | Self::Result66 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14413 - | "S3 Outposts does not support FIPS".to_string(),
|
14414 - | )),
|
14415 - | Self::Result67 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14416 - | "S3 Outposts does not support S3 Accelerate".to_string(),
|
14417 - | )),
|
14418 - | Self::Result68 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14419 - | "Invalid Arn: Outpost Access Point ARN contains sub resources".to_string(),
|
14420 - | )),
|
14421 - | Self::Result69 => {
|
14422 - | let url = context
|
14423 - | .url
|
14424 - | .as_ref()
|
14425 - | .map(|s| s.clone())
|
14426 - | .expect("Guaranteed to have a value by earlier checks.");
|
14427 - | let bucket_arn = context
|
14428 - | .bucket_arn
|
14429 - | .as_ref()
|
14430 - | .map(|s| s.clone())
|
14431 - | .expect("Guaranteed to have a value by earlier checks.");
|
14432 - | let effective_arn_region = context
|
14433 - | .effective_arn_region
|
14434 - | .as_ref()
|
14435 - | .map(|s| s.clone())
|
14436 - | .expect("Guaranteed to have a value by earlier checks.");
|
14437 - | let outpost_id_ssa_1 = context
|
14438 - | .outpost_id_ssa_1
|
14439 - | .as_ref()
|
14440 - | .map(|s| s.clone())
|
14441 - | .expect("Guaranteed to have a value by earlier checks.");
|
14442 - | let access_point_name_ssa_2 = context
|
14443 - | .access_point_name_ssa_2
|
14444 - | .as_ref()
|
14445 - | .map(|s| s.clone())
|
14446 - | .expect("Guaranteed to have a value by earlier checks.");
|
14447 - | ::std::result::Result::Ok(
|
14448 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14449 - | .url({
|
14450 - | let mut out = String::new();
|
14451 - | out.push_str("https://");
|
14452 - | #[allow(clippy::needless_borrow)]
|
14453 - | out.push_str(&access_point_name_ssa_2.as_ref());
|
14454 - | out.push('-');
|
14455 - | #[allow(clippy::needless_borrow)]
|
14456 - | out.push_str(&bucket_arn.account_id());
|
14457 - | out.push('.');
|
14458 - | #[allow(clippy::needless_borrow)]
|
14459 - | out.push_str(&outpost_id_ssa_1.as_ref());
|
14460 - | out.push('.');
|
11887 + | out.push_str(&url.scheme());
|
11888 + | out.push_str("://");
|
14461 11889 | #[allow(clippy::needless_borrow)]
|
14462 11890 | out.push_str(&url.authority());
|
14463 - | out
|
14464 - | })
|
14465 - | .property(
|
14466 - | "authSchemes",
|
14467 - | vec![
|
14468 - | ::aws_smithy_types::Document::from({
|
14469 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14470 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14471 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
14472 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
14473 - | out.insert(
|
14474 - | "signingRegionSet".to_string(),
|
14475 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
14476 - | );
|
14477 - | out
|
14478 - | }),
|
14479 - | ::aws_smithy_types::Document::from({
|
14480 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14481 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14482 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14483 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
14484 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
14485 - | out
|
14486 - | }),
|
14487 - | ],
|
14488 - | )
|
14489 - | .build(),
|
14490 - | )
|
14491 - | }
|
14492 - | Self::Result70 => {
|
14493 - | let bucket_arn = context
|
14494 - | .bucket_arn
|
14495 - | .as_ref()
|
14496 - | .map(|s| s.clone())
|
14497 - | .expect("Guaranteed to have a value by earlier checks.");
|
14498 - | let effective_arn_region = context
|
14499 - | .effective_arn_region
|
14500 - | .as_ref()
|
14501 - | .map(|s| s.clone())
|
14502 - | .expect("Guaranteed to have a value by earlier checks.");
|
14503 - | let bucket_partition = context
|
14504 - | .bucket_partition
|
14505 - | .as_ref()
|
14506 - | .map(|s| s.clone())
|
14507 - | .expect("Guaranteed to have a value by earlier checks.");
|
14508 - | let outpost_id_ssa_1 = context
|
14509 - | .outpost_id_ssa_1
|
14510 - | .as_ref()
|
14511 - | .map(|s| s.clone())
|
14512 - | .expect("Guaranteed to have a value by earlier checks.");
|
14513 - | let access_point_name_ssa_2 = context
|
14514 - | .access_point_name_ssa_2
|
14515 - | .as_ref()
|
14516 - | .map(|s| s.clone())
|
14517 - | .expect("Guaranteed to have a value by earlier checks.");
|
14518 - | ::std::result::Result::Ok(
|
14519 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14520 - | .url({
|
14521 - | let mut out = String::new();
|
14522 - | out.push_str("https://");
|
14523 - | #[allow(clippy::needless_borrow)]
|
14524 - | out.push_str(&access_point_name_ssa_2.as_ref());
|
14525 - | out.push('-');
|
14526 - | #[allow(clippy::needless_borrow)]
|
14527 - | out.push_str(&bucket_arn.account_id());
|
14528 - | out.push('.');
|
14529 - | #[allow(clippy::needless_borrow)]
|
14530 - | out.push_str(&outpost_id_ssa_1.as_ref());
|
14531 - | out.push_str(".s3-outposts.");
|
14532 - | #[allow(clippy::needless_borrow)]
|
14533 - | out.push_str(&effective_arn_region.as_ref());
|
14534 - | out.push('.');
|
14535 11891 | #[allow(clippy::needless_borrow)]
|
14536 - | out.push_str(&bucket_partition.dns_suffix());
|
11892 + | out.push_str(&url.path());
|
14537 11893 | out
|
14538 11894 | })
|
14539 - | .property(
|
14540 - | "authSchemes",
|
14541 - | vec![
|
14542 - | ::aws_smithy_types::Document::from({
|
14543 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14544 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14545 - | out.insert("name".to_string(), "sigv4a".to_string().into());
|
14546 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
14547 - | out.insert(
|
14548 - | "signingRegionSet".to_string(),
|
14549 - | vec![::aws_smithy_types::Document::from("*".to_string())].into(),
|
14550 - | );
|
14551 - | out
|
14552 - | }),
|
14553 - | ::aws_smithy_types::Document::from({
|
14554 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14555 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14556 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14557 - | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
14558 - | out.insert("signingRegion".to_string(), effective_arn_region.to_owned().into());
|
14559 - | out
|
14560 - | }),
|
14561 - | ],
|
11895 + | .auth_scheme(
|
11896 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11897 + | .put("disableDoubleEncoding", true)
|
11898 + | .put("signingName", "s3-object-lambda")
|
11899 + | .put("signingRegion", effective_std_region.as_ref()),
|
14562 11900 | )
|
14563 11901 | .build(),
|
14564 11902 | )
|
14565 11903 | }
|
14566 - | Self::Result71 => {
|
14567 - | let outpost_type = context
|
14568 - | .outpost_type
|
14569 - | .as_ref()
|
14570 - | .map(|s| s.clone())
|
14571 - | .expect("Guaranteed to have a value by earlier checks.");
|
14572 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
14573 - | let mut out = String::new();
|
14574 - | out.push_str("Expected an outpost type `accesspoint`, found ");
|
14575 - | #[allow(clippy::needless_borrow)]
|
14576 - | out.push_str(&outpost_type.as_ref());
|
14577 - | out
|
14578 - | }))
|
14579 - | }
|
14580 - | Self::Result72 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14581 - | "Invalid ARN: expected an access point name".to_string(),
|
14582 - | )),
|
14583 - | Self::Result73 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14584 - | "Invalid ARN: Expected a 4-component resource".to_string(),
|
14585 - | )),
|
14586 - | Self::Result74 => {
|
14587 - | let outpost_id_ssa_1 = context
|
14588 - | .outpost_id_ssa_1
|
14589 - | .as_ref()
|
14590 - | .map(|s| s.clone())
|
14591 - | .expect("Guaranteed to have a value by earlier checks.");
|
14592 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
14593 - | let mut out = String::new();
|
14594 - | out.push_str("Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
|
14595 - | #[allow(clippy::needless_borrow)]
|
14596 - | out.push_str(&outpost_id_ssa_1.as_ref());
|
14597 - | out.push('`');
|
14598 - | out
|
14599 - | }))
|
14600 - | }
|
14601 - | Self::Result75 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14602 - | "Invalid ARN: The Outpost Id was not set".to_string(),
|
14603 - | )),
|
14604 - | Self::Result76 => {
|
14605 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
14606 - | let arn_type = context
|
14607 - | .arn_type
|
14608 - | .as_ref()
|
14609 - | .map(|s| s.clone())
|
14610 - | .expect("Guaranteed to have a value by earlier checks.");
|
14611 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
14612 - | let mut out = String::new();
|
14613 - | out.push_str("Invalid ARN: Unrecognized format: ");
|
14614 - | #[allow(clippy::needless_borrow)]
|
14615 - | out.push_str(&bucket.as_ref());
|
14616 - | out.push_str(" (type: ");
|
14617 - | #[allow(clippy::needless_borrow)]
|
14618 - | out.push_str(&arn_type.as_ref());
|
14619 - | out.push(')');
|
14620 - | out
|
14621 - | }))
|
14622 - | }
|
14623 - | Self::Result77 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14624 - | "Invalid ARN: No ARN type specified".to_string(),
|
14625 - | )),
|
14626 - | Self::Result78 => {
|
14627 - | let bucket = params.bucket.as_ref().map(|s| s.clone()).unwrap_or_default();
|
14628 - | ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
|
14629 - | let mut out = String::new();
|
14630 - | out.push_str("Invalid ARN: `");
|
14631 - | #[allow(clippy::needless_borrow)]
|
14632 - | out.push_str(&bucket.as_ref());
|
14633 - | out.push_str("` was not a valid ARN");
|
14634 - | out
|
14635 - | }))
|
14636 - | }
|
14637 - | Self::Result79 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14638 - | "Path-style addressing cannot be used with ARN buckets".to_string(),
|
14639 - | )),
|
14640 - | Self::Result80 => {
|
11904 + | 88 => {
|
14641 11905 | let effective_std_region = context
|
14642 11906 | .effective_std_region
|
14643 11907 | .as_ref()
|
14644 - | .map(|s| s.clone())
|
14645 - | .expect("Guaranteed to have a value by earlier checks.");
|
14646 - | let partition_result = context
|
14647 - | .partition_result
|
14648 - | .as_ref()
|
14649 - | .map(|s| s.clone())
|
14650 - | .expect("Guaranteed to have a value by earlier checks.");
|
14651 - | let uri_encoded_bucket = context
|
14652 - | .uri_encoded_bucket
|
14653 - | .as_ref()
|
14654 - | .map(|s| s.clone())
|
14655 11908 | .expect("Guaranteed to have a value by earlier checks.");
|
11909 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
14656 11910 | ::std::result::Result::Ok(
|
14657 11911 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14658 11912 | .url({
|
14659 11913 | let mut out = String::new();
|
14660 - | out.push_str("https://s3-fips.dualstack.");
|
11914 + | out.push_str("https://s3-object-lambda-fips.");
|
14661 11915 | #[allow(clippy::needless_borrow)]
|
14662 11916 | out.push_str(&effective_std_region.as_ref());
|
14663 11917 | out.push('.');
|
14664 11918 | #[allow(clippy::needless_borrow)]
|
14665 11919 | out.push_str(&partition_result.dns_suffix());
|
14666 - | out.push('/');
|
14667 - | #[allow(clippy::needless_borrow)]
|
14668 - | out.push_str(&uri_encoded_bucket.as_ref());
|
14669 11920 | out
|
14670 11921 | })
|
14671 - | .property(
|
14672 - | "authSchemes",
|
14673 - | vec![::aws_smithy_types::Document::from({
|
14674 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14675 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14676 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14677 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14678 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
14679 - | out
|
14680 - | })],
|
11922 + | .auth_scheme(
|
11923 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11924 + | .put("disableDoubleEncoding", true)
|
11925 + | .put("signingName", "s3-object-lambda")
|
11926 + | .put("signingRegion", effective_std_region.as_ref()),
|
14681 11927 | )
|
14682 11928 | .build(),
|
14683 11929 | )
|
14684 11930 | }
|
14685 - | Self::Result81 => {
|
11931 + | 89 => {
|
14686 11932 | let effective_std_region = context
|
14687 11933 | .effective_std_region
|
14688 11934 | .as_ref()
|
14689 - | .map(|s| s.clone())
|
14690 - | .expect("Guaranteed to have a value by earlier checks.");
|
14691 - | let partition_result = context
|
14692 - | .partition_result
|
14693 - | .as_ref()
|
14694 - | .map(|s| s.clone())
|
14695 - | .expect("Guaranteed to have a value by earlier checks.");
|
14696 - | let uri_encoded_bucket = context
|
14697 - | .uri_encoded_bucket
|
14698 - | .as_ref()
|
14699 - | .map(|s| s.clone())
|
14700 11935 | .expect("Guaranteed to have a value by earlier checks.");
|
11936 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
14701 11937 | ::std::result::Result::Ok(
|
14702 11938 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14703 11939 | .url({
|
14704 11940 | let mut out = String::new();
|
14705 - | out.push_str("https://s3-fips.");
|
11941 + | out.push_str("https://s3-object-lambda.");
|
14706 11942 | #[allow(clippy::needless_borrow)]
|
14707 11943 | out.push_str(&effective_std_region.as_ref());
|
14708 11944 | out.push('.');
|
14709 11945 | #[allow(clippy::needless_borrow)]
|
14710 11946 | out.push_str(&partition_result.dns_suffix());
|
14711 - | out.push('/');
|
14712 - | #[allow(clippy::needless_borrow)]
|
14713 - | out.push_str(&uri_encoded_bucket.as_ref());
|
14714 11947 | out
|
14715 11948 | })
|
14716 - | .property(
|
14717 - | "authSchemes",
|
14718 - | vec![::aws_smithy_types::Document::from({
|
14719 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14720 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14721 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14722 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14723 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
14724 - | out
|
14725 - | })],
|
11949 + | .auth_scheme(
|
11950 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11951 + | .put("disableDoubleEncoding", true)
|
11952 + | .put("signingName", "s3-object-lambda")
|
11953 + | .put("signingRegion", effective_std_region.as_ref()),
|
14726 11954 | )
|
14727 11955 | .build(),
|
14728 11956 | )
|
14729 11957 | }
|
14730 - | Self::Result82 => {
|
11958 + | 90 => {
|
14731 11959 | let effective_std_region = context
|
14732 11960 | .effective_std_region
|
14733 11961 | .as_ref()
|
14734 - | .map(|s| s.clone())
|
14735 - | .expect("Guaranteed to have a value by earlier checks.");
|
14736 - | let partition_result = context
|
14737 - | .partition_result
|
14738 - | .as_ref()
|
14739 - | .map(|s| s.clone())
|
14740 - | .expect("Guaranteed to have a value by earlier checks.");
|
14741 - | let uri_encoded_bucket = context
|
14742 - | .uri_encoded_bucket
|
14743 - | .as_ref()
|
14744 - | .map(|s| s.clone())
|
14745 11962 | .expect("Guaranteed to have a value by earlier checks.");
|
11963 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
14746 11964 | ::std::result::Result::Ok(
|
14747 11965 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14748 11966 | .url({
|
14749 11967 | let mut out = String::new();
|
14750 - | out.push_str("https://s3.dualstack.");
|
11968 + | out.push_str("https://s3-fips.dualstack.");
|
14751 11969 | #[allow(clippy::needless_borrow)]
|
14752 11970 | out.push_str(&effective_std_region.as_ref());
|
14753 11971 | out.push('.');
|
14754 11972 | #[allow(clippy::needless_borrow)]
|
14755 11973 | out.push_str(&partition_result.dns_suffix());
|
14756 - | out.push('/');
|
14757 - | #[allow(clippy::needless_borrow)]
|
14758 - | out.push_str(&uri_encoded_bucket.as_ref());
|
14759 11974 | out
|
14760 11975 | })
|
14761 - | .property(
|
14762 - | "authSchemes",
|
14763 - | vec![::aws_smithy_types::Document::from({
|
14764 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14765 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14766 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14767 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14768 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
14769 - | out
|
14770 - | })],
|
11976 + | .auth_scheme(
|
11977 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
11978 + | .put("disableDoubleEncoding", true)
|
11979 + | .put("signingName", "s3")
|
11980 + | .put("signingRegion", effective_std_region.as_ref()),
|
14771 11981 | )
|
14772 11982 | .build(),
|
14773 11983 | )
|
14774 11984 | }
|
14775 - | Self::Result83 => {
|
11985 + | 91 => {
|
14776 11986 | let effective_std_region = context
|
14777 11987 | .effective_std_region
|
14778 11988 | .as_ref()
|
14779 - | .map(|s| s.clone())
|
14780 - | .expect("Guaranteed to have a value by earlier checks.");
|
14781 - | let url = context
|
14782 - | .url
|
14783 - | .as_ref()
|
14784 - | .map(|s| s.clone())
|
14785 - | .expect("Guaranteed to have a value by earlier checks.");
|
14786 - | let uri_encoded_bucket = context
|
14787 - | .uri_encoded_bucket
|
14788 - | .as_ref()
|
14789 - | .map(|s| s.clone())
|
14790 11989 | .expect("Guaranteed to have a value by earlier checks.");
|
11990 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
14791 11991 | ::std::result::Result::Ok(
|
14792 11992 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14793 11993 | .url({
|
14794 11994 | let mut out = String::new();
|
11995 + | out.push_str("https://s3-fips.");
|
14795 11996 | #[allow(clippy::needless_borrow)]
|
14796 - | out.push_str(&url.scheme());
|
14797 - | out.push_str("://");
|
14798 - | #[allow(clippy::needless_borrow)]
|
14799 - | out.push_str(&url.authority());
|
14800 - | #[allow(clippy::needless_borrow)]
|
14801 - | out.push_str(&url.normalized_path());
|
14802 - | #[allow(clippy::needless_borrow)]
|
14803 - | out.push_str(&uri_encoded_bucket.as_ref());
|
14804 - | out
|
14805 - | })
|
14806 - | .property(
|
14807 - | "authSchemes",
|
14808 - | vec![::aws_smithy_types::Document::from({
|
14809 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14810 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14811 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14812 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14813 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
14814 - | out
|
14815 - | })],
|
14816 - | )
|
14817 - | .build(),
|
14818 - | )
|
14819 - | }
|
14820 - | Self::Result84 => {
|
14821 - | let effective_std_region = context
|
14822 - | .effective_std_region
|
14823 - | .as_ref()
|
14824 - | .map(|s| s.clone())
|
14825 - | .expect("Guaranteed to have a value by earlier checks.");
|
14826 - | let partition_result = context
|
14827 - | .partition_result
|
14828 - | .as_ref()
|
14829 - | .map(|s| s.clone())
|
14830 - | .expect("Guaranteed to have a value by earlier checks.");
|
14831 - | let uri_encoded_bucket = context
|
14832 - | .uri_encoded_bucket
|
14833 - | .as_ref()
|
14834 - | .map(|s| s.clone())
|
14835 - | .expect("Guaranteed to have a value by earlier checks.");
|
14836 - | ::std::result::Result::Ok(
|
14837 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14838 - | .url({
|
14839 - | let mut out = String::new();
|
14840 - | out.push_str("https://s3.");
|
11997 + | out.push_str(&effective_std_region.as_ref());
|
11998 + | out.push('.');
|
14841 11999 | #[allow(clippy::needless_borrow)]
|
14842 12000 | out.push_str(&partition_result.dns_suffix());
|
14843 - | out.push('/');
|
14844 - | #[allow(clippy::needless_borrow)]
|
14845 - | out.push_str(&uri_encoded_bucket.as_ref());
|
14846 12001 | out
|
14847 12002 | })
|
14848 - | .property(
|
14849 - | "authSchemes",
|
14850 - | vec![::aws_smithy_types::Document::from({
|
14851 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14852 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14853 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14854 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14855 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
14856 - | out
|
14857 - | })],
|
12003 + | .auth_scheme(
|
12004 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
12005 + | .put("disableDoubleEncoding", true)
|
12006 + | .put("signingName", "s3")
|
12007 + | .put("signingRegion", effective_std_region.as_ref()),
|
14858 12008 | )
|
14859 12009 | .build(),
|
14860 12010 | )
|
14861 12011 | }
|
14862 - | Self::Result85 => {
|
12012 + | 92 => {
|
14863 12013 | let effective_std_region = context
|
14864 12014 | .effective_std_region
|
14865 12015 | .as_ref()
|
14866 - | .map(|s| s.clone())
|
14867 - | .expect("Guaranteed to have a value by earlier checks.");
|
14868 - | let partition_result = context
|
14869 - | .partition_result
|
14870 - | .as_ref()
|
14871 - | .map(|s| s.clone())
|
14872 - | .expect("Guaranteed to have a value by earlier checks.");
|
14873 - | let uri_encoded_bucket = context
|
14874 - | .uri_encoded_bucket
|
14875 - | .as_ref()
|
14876 - | .map(|s| s.clone())
|
14877 12016 | .expect("Guaranteed to have a value by earlier checks.");
|
12017 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
14878 12018 | ::std::result::Result::Ok(
|
14879 12019 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14880 12020 | .url({
|
14881 12021 | let mut out = String::new();
|
14882 - | out.push_str("https://s3.");
|
12022 + | out.push_str("https://s3.dualstack.");
|
14883 12023 | #[allow(clippy::needless_borrow)]
|
14884 12024 | out.push_str(&effective_std_region.as_ref());
|
14885 12025 | out.push('.');
|
14886 12026 | #[allow(clippy::needless_borrow)]
|
14887 12027 | out.push_str(&partition_result.dns_suffix());
|
14888 - | out.push('/');
|
14889 - | #[allow(clippy::needless_borrow)]
|
14890 - | out.push_str(&uri_encoded_bucket.as_ref());
|
14891 12028 | out
|
14892 12029 | })
|
14893 - | .property(
|
14894 - | "authSchemes",
|
14895 - | vec![::aws_smithy_types::Document::from({
|
14896 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14897 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14898 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14899 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
14900 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
14901 - | out
|
14902 - | })],
|
12030 + | .auth_scheme(
|
12031 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
12032 + | .put("disableDoubleEncoding", true)
|
12033 + | .put("signingName", "s3")
|
12034 + | .put("signingRegion", effective_std_region.as_ref()),
|
14903 12035 | )
|
14904 12036 | .build(),
|
14905 12037 | )
|
14906 12038 | }
|
14907 - | Self::Result86 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
14908 - | "Path-style addressing cannot be used with S3 Accelerate".to_string(),
|
14909 - | )),
|
14910 - | Self::Result87 => {
|
12039 + | 93 => {
|
14911 12040 | let effective_std_region = context
|
14912 12041 | .effective_std_region
|
14913 12042 | .as_ref()
|
14914 - | .map(|s| s.clone())
|
14915 - | .expect("Guaranteed to have a value by earlier checks.");
|
14916 - | let url = context
|
14917 - | .url
|
14918 - | .as_ref()
|
14919 - | .map(|s| s.clone())
|
14920 12043 | .expect("Guaranteed to have a value by earlier checks.");
|
12044 + | let url = context.url.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
14921 12045 | ::std::result::Result::Ok(
|
14922 12046 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14923 12047 | .url({
|
14924 12048 | let mut out = String::new();
|
14925 12049 | #[allow(clippy::needless_borrow)]
|
14926 12050 | out.push_str(&url.scheme());
|
14927 12051 | out.push_str("://");
|
14928 12052 | #[allow(clippy::needless_borrow)]
|
14929 12053 | out.push_str(&url.authority());
|
14930 12054 | #[allow(clippy::needless_borrow)]
|
14931 12055 | out.push_str(&url.path());
|
14932 12056 | out
|
14933 12057 | })
|
14934 - | .property(
|
14935 - | "authSchemes",
|
14936 - | vec![::aws_smithy_types::Document::from({
|
14937 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14938 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14939 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14940 - | out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
|
14941 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
14942 - | out
|
14943 - | })],
|
12058 + | .auth_scheme(
|
12059 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
12060 + | .put("disableDoubleEncoding", true)
|
12061 + | .put("signingName", "s3")
|
12062 + | .put("signingRegion", effective_std_region.as_ref()),
|
14944 12063 | )
|
14945 12064 | .build(),
|
14946 12065 | )
|
14947 12066 | }
|
14948 - | Self::Result88 => {
|
12067 + | 94 => {
|
14949 12068 | let effective_std_region = context
|
14950 12069 | .effective_std_region
|
14951 12070 | .as_ref()
|
14952 - | .map(|s| s.clone())
|
14953 - | .expect("Guaranteed to have a value by earlier checks.");
|
14954 - | let partition_result = context
|
14955 - | .partition_result
|
14956 - | .as_ref()
|
14957 - | .map(|s| s.clone())
|
14958 12071 | .expect("Guaranteed to have a value by earlier checks.");
|
12072 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
14959 12073 | ::std::result::Result::Ok(
|
14960 12074 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14961 12075 | .url({
|
14962 12076 | let mut out = String::new();
|
14963 - | out.push_str("https://s3-object-lambda-fips.");
|
14964 - | #[allow(clippy::needless_borrow)]
|
14965 - | out.push_str(&effective_std_region.as_ref());
|
14966 - | out.push('.');
|
12077 + | out.push_str("https://s3.");
|
14967 12078 | #[allow(clippy::needless_borrow)]
|
14968 12079 | out.push_str(&partition_result.dns_suffix());
|
14969 12080 | out
|
14970 12081 | })
|
14971 - | .property(
|
14972 - | "authSchemes",
|
14973 - | vec![::aws_smithy_types::Document::from({
|
14974 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
14975 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
14976 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
14977 - | out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
|
14978 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
14979 - | out
|
14980 - | })],
|
12082 + | .auth_scheme(
|
12083 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
12084 + | .put("disableDoubleEncoding", true)
|
12085 + | .put("signingName", "s3")
|
12086 + | .put("signingRegion", effective_std_region.as_ref()),
|
14981 12087 | )
|
14982 12088 | .build(),
|
14983 12089 | )
|
14984 12090 | }
|
14985 - | Self::Result89 => {
|
12091 + | 95 => {
|
14986 12092 | let effective_std_region = context
|
14987 12093 | .effective_std_region
|
14988 12094 | .as_ref()
|
14989 - | .map(|s| s.clone())
|
14990 - | .expect("Guaranteed to have a value by earlier checks.");
|
14991 - | let partition_result = context
|
14992 - | .partition_result
|
14993 - | .as_ref()
|
14994 - | .map(|s| s.clone())
|
14995 12095 | .expect("Guaranteed to have a value by earlier checks.");
|
12096 + | let partition_result = context.partition_result.as_ref().expect("Guaranteed to have a value by earlier checks.");
|
14996 12097 | ::std::result::Result::Ok(
|
14997 12098 | ::aws_smithy_types::endpoint::Endpoint::builder()
|
14998 12099 | .url({
|
14999 12100 | let mut out = String::new();
|
15000 - | out.push_str("https://s3-object-lambda.");
|
12101 + | out.push_str("https://s3.");
|
15001 12102 | #[allow(clippy::needless_borrow)]
|
15002 12103 | out.push_str(&effective_std_region.as_ref());
|
15003 12104 | out.push('.');
|
15004 12105 | #[allow(clippy::needless_borrow)]
|
15005 12106 | out.push_str(&partition_result.dns_suffix());
|
15006 12107 | out
|
15007 12108 | })
|
15008 - | .property(
|
15009 - | "authSchemes",
|
15010 - | vec![::aws_smithy_types::Document::from({
|
15011 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
15012 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
15013 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
15014 - | out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
|
15015 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
15016 - | out
|
15017 - | })],
|
12109 + | .auth_scheme(
|
12110 + | ::aws_smithy_types::endpoint::EndpointAuthScheme::with_capacity("sigv4".to_string(), 3)
|
12111 + | .put("disableDoubleEncoding", true)
|
12112 + | .put("signingName", "s3")
|
12113 + | .put("signingRegion", effective_std_region.as_ref()),
|
15018 12114 | )
|
15019 12115 | .build(),
|
15020 12116 | )
|
15021 12117 | }
|
15022 - | Self::Result90 => {
|
15023 - | let effective_std_region = context
|
15024 - | .effective_std_region
|
15025 - | .as_ref()
|
15026 - | .map(|s| s.clone())
|
15027 - | .expect("Guaranteed to have a value by earlier checks.");
|
15028 - | let partition_result = context
|
15029 - | .partition_result
|
15030 - | .as_ref()
|
15031 - | .map(|s| s.clone())
|
15032 - | .expect("Guaranteed to have a value by earlier checks.");
|
15033 - | ::std::result::Result::Ok(
|
15034 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
15035 - | .url({
|
15036 - | let mut out = String::new();
|
15037 - | out.push_str("https://s3-fips.dualstack.");
|
15038 - | #[allow(clippy::needless_borrow)]
|
15039 - | out.push_str(&effective_std_region.as_ref());
|
15040 - | out.push('.');
|
15041 - | #[allow(clippy::needless_borrow)]
|
15042 - | out.push_str(&partition_result.dns_suffix());
|
15043 - | out
|
15044 - | })
|
15045 - | .property(
|
15046 - | "authSchemes",
|
15047 - | vec![::aws_smithy_types::Document::from({
|
15048 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
15049 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
15050 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
15051 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
15052 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
15053 - | out
|
15054 - | })],
|
15055 - | )
|
15056 - | .build(),
|
12118 + | 96 => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12119 + | "A region must be set when sending requests to S3.".to_string(),
|
12120 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
12121 + | _ => ::std::result::Result::Err(Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
12122 + | "No endpoint rule matched",
|
12123 + | )) as ::aws_smithy_runtime_api::box_error::BoxError),
|
12124 + | };
|
12125 + | }
|
12126 + | 1 | -1 => {
|
12127 + | return ::std::result::Result::Err(
|
12128 + | Box::new(::aws_smithy_http::endpoint::ResolveEndpointError::message("No endpoint rule matched"))
|
12129 + | as ::aws_smithy_runtime_api::box_error::BoxError,
|
12130 + | )
|
12131 + | }
|
12132 + | ref_val => {
|
12133 + | let is_complement = ref_val < 0;
|
12134 + | let node = &NODES[(ref_val.unsigned_abs() as usize) - 1];
|
12135 + | let condition_result = match node.condition_index {
|
12136 + | 0 => region.is_some(),
|
12137 + | 1 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12138 + | let effective_std_region = &mut context.effective_std_region;
|
12139 + | let partition_result = &mut context.partition_result;
|
12140 + | let url = &mut context.url;
|
12141 + | let access_point_suffix = &mut context.access_point_suffix;
|
12142 + | let region_prefix = &mut context.region_prefix;
|
12143 + | let hardware_type = &mut context.hardware_type;
|
12144 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12145 + | let s3_e_ds = &mut context.s3_e_ds;
|
12146 + | let s3_e_fips = &mut context.s3_e_fips;
|
12147 + | let s3_e_auth = &mut context.s3_e_auth;
|
12148 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12149 + | let bucket_arn = &mut context.bucket_arn;
|
12150 + | let effective_arn_region = &mut context.effective_arn_region;
|
12151 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12152 + | let arn_type = &mut context.arn_type;
|
12153 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12154 + | let bucket_partition = &mut context.bucket_partition;
|
12155 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12156 + | let outpost_type = &mut context.outpost_type;
|
12157 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12158 + | let partition_resolver = &self.partition_resolver;
|
12159 + | {
|
12160 + | *effective_std_region = Some(
|
12161 + | crate::endpoint_lib::ite::ite!(
|
12162 + | (region) == &mut Some(("aws-global".into())),
|
12163 + | "us-east-1".to_string(),
|
12164 + | region.clone().expect("Reference already confirmed Some")
|
12165 + | )
|
12166 + | .into(),
|
12167 + | );
|
12168 + | true
|
12169 + | }
|
12170 + | })(&mut _diagnostic_collector),
|
12171 + | 2 => (accelerate) == (&true),
|
12172 + | 3 => (use_fips) == (&true),
|
12173 + | 4 => endpoint.is_some(),
|
12174 + | 5 => (use_dual_stack) == (&true),
|
12175 + | 6 => bucket.is_some(),
|
12176 + | 7 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12177 + | let effective_std_region = &mut context.effective_std_region;
|
12178 + | let partition_result = &mut context.partition_result;
|
12179 + | let url = &mut context.url;
|
12180 + | let access_point_suffix = &mut context.access_point_suffix;
|
12181 + | let region_prefix = &mut context.region_prefix;
|
12182 + | let hardware_type = &mut context.hardware_type;
|
12183 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12184 + | let s3_e_ds = &mut context.s3_e_ds;
|
12185 + | let s3_e_fips = &mut context.s3_e_fips;
|
12186 + | let s3_e_auth = &mut context.s3_e_auth;
|
12187 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12188 + | let bucket_arn = &mut context.bucket_arn;
|
12189 + | let effective_arn_region = &mut context.effective_arn_region;
|
12190 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12191 + | let arn_type = &mut context.arn_type;
|
12192 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12193 + | let bucket_partition = &mut context.bucket_partition;
|
12194 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12195 + | let outpost_type = &mut context.outpost_type;
|
12196 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12197 + | let partition_resolver = &self.partition_resolver;
|
12198 + | (crate::endpoint_lib::coalesce::coalesce!(
|
12199 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12200 + | if let Some(param) = bucket { param } else { return false },
|
12201 + | 0,
|
12202 + | 6,
|
12203 + | true,
|
12204 + | _diagnostic_collector
|
12205 + | ) {
|
12206 + | inner
|
12207 + | } else {
|
12208 + | return false;
|
12209 + | },
|
12210 + | ""
|
12211 + | )) == ("--x-s3")
|
12212 + | })(&mut _diagnostic_collector),
|
12213 + | 8 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12214 + | let effective_std_region = &mut context.effective_std_region;
|
12215 + | let partition_result = &mut context.partition_result;
|
12216 + | let url = &mut context.url;
|
12217 + | let access_point_suffix = &mut context.access_point_suffix;
|
12218 + | let region_prefix = &mut context.region_prefix;
|
12219 + | let hardware_type = &mut context.hardware_type;
|
12220 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12221 + | let s3_e_ds = &mut context.s3_e_ds;
|
12222 + | let s3_e_fips = &mut context.s3_e_fips;
|
12223 + | let s3_e_auth = &mut context.s3_e_auth;
|
12224 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12225 + | let bucket_arn = &mut context.bucket_arn;
|
12226 + | let effective_arn_region = &mut context.effective_arn_region;
|
12227 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12228 + | let arn_type = &mut context.arn_type;
|
12229 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12230 + | let bucket_partition = &mut context.bucket_partition;
|
12231 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12232 + | let outpost_type = &mut context.outpost_type;
|
12233 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12234 + | let partition_resolver = &self.partition_resolver;
|
12235 + | (crate::endpoint_lib::coalesce::coalesce!(
|
12236 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12237 + | if let Some(param) = bucket { param } else { return false },
|
12238 + | 0,
|
12239 + | 7,
|
12240 + | true,
|
12241 + | _diagnostic_collector
|
12242 + | ) {
|
12243 + | inner
|
12244 + | } else {
|
12245 + | return false;
|
12246 + | },
|
12247 + | ""
|
12248 + | )) == ("--xa-s3")
|
12249 + | })(&mut _diagnostic_collector),
|
12250 + | 9 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12251 + | let effective_std_region = &mut context.effective_std_region;
|
12252 + | let partition_result = &mut context.partition_result;
|
12253 + | let url = &mut context.url;
|
12254 + | let access_point_suffix = &mut context.access_point_suffix;
|
12255 + | let region_prefix = &mut context.region_prefix;
|
12256 + | let hardware_type = &mut context.hardware_type;
|
12257 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12258 + | let s3_e_ds = &mut context.s3_e_ds;
|
12259 + | let s3_e_fips = &mut context.s3_e_fips;
|
12260 + | let s3_e_auth = &mut context.s3_e_auth;
|
12261 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12262 + | let bucket_arn = &mut context.bucket_arn;
|
12263 + | let effective_arn_region = &mut context.effective_arn_region;
|
12264 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12265 + | let arn_type = &mut context.arn_type;
|
12266 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12267 + | let bucket_partition = &mut context.bucket_partition;
|
12268 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12269 + | let outpost_type = &mut context.outpost_type;
|
12270 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12271 + | let partition_resolver = &self.partition_resolver;
|
12272 + | {
|
12273 + | *partition_result = partition_resolver
|
12274 + | .resolve_partition(if let Some(param) = region { param } else { return false }, _diagnostic_collector)
|
12275 + | .map(|inner| inner.into());
|
12276 + | partition_result.is_some()
|
12277 + | }
|
12278 + | })(&mut _diagnostic_collector),
|
12279 + | 10 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12280 + | let effective_std_region = &mut context.effective_std_region;
|
12281 + | let partition_result = &mut context.partition_result;
|
12282 + | let url = &mut context.url;
|
12283 + | let access_point_suffix = &mut context.access_point_suffix;
|
12284 + | let region_prefix = &mut context.region_prefix;
|
12285 + | let hardware_type = &mut context.hardware_type;
|
12286 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12287 + | let s3_e_ds = &mut context.s3_e_ds;
|
12288 + | let s3_e_fips = &mut context.s3_e_fips;
|
12289 + | let s3_e_auth = &mut context.s3_e_auth;
|
12290 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12291 + | let bucket_arn = &mut context.bucket_arn;
|
12292 + | let effective_arn_region = &mut context.effective_arn_region;
|
12293 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12294 + | let arn_type = &mut context.arn_type;
|
12295 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12296 + | let bucket_partition = &mut context.bucket_partition;
|
12297 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12298 + | let outpost_type = &mut context.outpost_type;
|
12299 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12300 + | let partition_resolver = &self.partition_resolver;
|
12301 + | {
|
12302 + | *url = crate::endpoint_lib::parse_url::parse_url(
|
12303 + | if let Some(param) = endpoint { param } else { return false },
|
12304 + | _diagnostic_collector,
|
12305 + | )
|
12306 + | .map(|inner| inner.into());
|
12307 + | url.is_some()
|
12308 + | }
|
12309 + | })(&mut _diagnostic_collector),
|
12310 + | 11 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12311 + | let effective_std_region = &mut context.effective_std_region;
|
12312 + | let partition_result = &mut context.partition_result;
|
12313 + | let url = &mut context.url;
|
12314 + | let access_point_suffix = &mut context.access_point_suffix;
|
12315 + | let region_prefix = &mut context.region_prefix;
|
12316 + | let hardware_type = &mut context.hardware_type;
|
12317 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12318 + | let s3_e_ds = &mut context.s3_e_ds;
|
12319 + | let s3_e_fips = &mut context.s3_e_fips;
|
12320 + | let s3_e_auth = &mut context.s3_e_auth;
|
12321 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12322 + | let bucket_arn = &mut context.bucket_arn;
|
12323 + | let effective_arn_region = &mut context.effective_arn_region;
|
12324 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12325 + | let arn_type = &mut context.arn_type;
|
12326 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12327 + | let bucket_partition = &mut context.bucket_partition;
|
12328 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12329 + | let outpost_type = &mut context.outpost_type;
|
12330 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12331 + | let partition_resolver = &self.partition_resolver;
|
12332 + | {
|
12333 + | *access_point_suffix = crate::endpoint_lib::substring::substring(
|
12334 + | if let Some(param) = bucket { param } else { return false },
|
12335 + | 0,
|
12336 + | 7,
|
12337 + | true,
|
12338 + | _diagnostic_collector,
|
12339 + | )
|
12340 + | .map(|inner| inner.into());
|
12341 + | access_point_suffix.is_some()
|
12342 + | }
|
12343 + | })(&mut _diagnostic_collector),
|
12344 + | 12 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12345 + | let effective_std_region = &mut context.effective_std_region;
|
12346 + | let partition_result = &mut context.partition_result;
|
12347 + | let url = &mut context.url;
|
12348 + | let access_point_suffix = &mut context.access_point_suffix;
|
12349 + | let region_prefix = &mut context.region_prefix;
|
12350 + | let hardware_type = &mut context.hardware_type;
|
12351 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12352 + | let s3_e_ds = &mut context.s3_e_ds;
|
12353 + | let s3_e_fips = &mut context.s3_e_fips;
|
12354 + | let s3_e_auth = &mut context.s3_e_auth;
|
12355 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12356 + | let bucket_arn = &mut context.bucket_arn;
|
12357 + | let effective_arn_region = &mut context.effective_arn_region;
|
12358 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12359 + | let arn_type = &mut context.arn_type;
|
12360 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12361 + | let bucket_partition = &mut context.bucket_partition;
|
12362 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12363 + | let outpost_type = &mut context.outpost_type;
|
12364 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12365 + | let partition_resolver = &self.partition_resolver;
|
12366 + | (access_point_suffix) == &mut Some(("--op-s3".into()))
|
12367 + | })(&mut _diagnostic_collector),
|
12368 + | 13 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12369 + | let effective_std_region = &mut context.effective_std_region;
|
12370 + | let partition_result = &mut context.partition_result;
|
12371 + | let url = &mut context.url;
|
12372 + | let access_point_suffix = &mut context.access_point_suffix;
|
12373 + | let region_prefix = &mut context.region_prefix;
|
12374 + | let hardware_type = &mut context.hardware_type;
|
12375 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12376 + | let s3_e_ds = &mut context.s3_e_ds;
|
12377 + | let s3_e_fips = &mut context.s3_e_fips;
|
12378 + | let s3_e_auth = &mut context.s3_e_auth;
|
12379 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12380 + | let bucket_arn = &mut context.bucket_arn;
|
12381 + | let effective_arn_region = &mut context.effective_arn_region;
|
12382 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12383 + | let arn_type = &mut context.arn_type;
|
12384 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12385 + | let bucket_partition = &mut context.bucket_partition;
|
12386 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12387 + | let outpost_type = &mut context.outpost_type;
|
12388 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12389 + | let partition_resolver = &self.partition_resolver;
|
12390 + | {
|
12391 + | *region_prefix = crate::endpoint_lib::substring::substring(
|
12392 + | if let Some(param) = bucket { param } else { return false },
|
12393 + | 8,
|
12394 + | 12,
|
12395 + | true,
|
12396 + | _diagnostic_collector,
|
12397 + | )
|
12398 + | .map(|inner| inner.into());
|
12399 + | region_prefix.is_some()
|
12400 + | }
|
12401 + | })(&mut _diagnostic_collector),
|
12402 + | 14 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12403 + | let effective_std_region = &mut context.effective_std_region;
|
12404 + | let partition_result = &mut context.partition_result;
|
12405 + | let url = &mut context.url;
|
12406 + | let access_point_suffix = &mut context.access_point_suffix;
|
12407 + | let region_prefix = &mut context.region_prefix;
|
12408 + | let hardware_type = &mut context.hardware_type;
|
12409 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12410 + | let s3_e_ds = &mut context.s3_e_ds;
|
12411 + | let s3_e_fips = &mut context.s3_e_fips;
|
12412 + | let s3_e_auth = &mut context.s3_e_auth;
|
12413 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12414 + | let bucket_arn = &mut context.bucket_arn;
|
12415 + | let effective_arn_region = &mut context.effective_arn_region;
|
12416 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12417 + | let arn_type = &mut context.arn_type;
|
12418 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12419 + | let bucket_partition = &mut context.bucket_partition;
|
12420 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12421 + | let outpost_type = &mut context.outpost_type;
|
12422 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12423 + | let partition_resolver = &self.partition_resolver;
|
12424 + | {
|
12425 + | *hardware_type = crate::endpoint_lib::substring::substring(
|
12426 + | if let Some(param) = bucket { param } else { return false },
|
12427 + | 49,
|
12428 + | 50,
|
12429 + | true,
|
12430 + | _diagnostic_collector,
|
12431 + | )
|
12432 + | .map(|inner| inner.into());
|
12433 + | hardware_type.is_some()
|
12434 + | }
|
12435 + | })(&mut _diagnostic_collector),
|
12436 + | 15 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12437 + | let effective_std_region = &mut context.effective_std_region;
|
12438 + | let partition_result = &mut context.partition_result;
|
12439 + | let url = &mut context.url;
|
12440 + | let access_point_suffix = &mut context.access_point_suffix;
|
12441 + | let region_prefix = &mut context.region_prefix;
|
12442 + | let hardware_type = &mut context.hardware_type;
|
12443 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12444 + | let s3_e_ds = &mut context.s3_e_ds;
|
12445 + | let s3_e_fips = &mut context.s3_e_fips;
|
12446 + | let s3_e_auth = &mut context.s3_e_auth;
|
12447 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12448 + | let bucket_arn = &mut context.bucket_arn;
|
12449 + | let effective_arn_region = &mut context.effective_arn_region;
|
12450 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12451 + | let arn_type = &mut context.arn_type;
|
12452 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12453 + | let bucket_partition = &mut context.bucket_partition;
|
12454 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12455 + | let outpost_type = &mut context.outpost_type;
|
12456 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12457 + | let partition_resolver = &self.partition_resolver;
|
12458 + | {
|
12459 + | *outpost_id_ssa_2 = crate::endpoint_lib::substring::substring(
|
12460 + | if let Some(param) = bucket { param } else { return false },
|
12461 + | 32,
|
12462 + | 49,
|
12463 + | true,
|
12464 + | _diagnostic_collector,
|
12465 + | )
|
12466 + | .map(|inner| inner.into());
|
12467 + | outpost_id_ssa_2.is_some()
|
12468 + | }
|
12469 + | })(&mut _diagnostic_collector),
|
12470 + | 16 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12471 + | let effective_std_region = &mut context.effective_std_region;
|
12472 + | let partition_result = &mut context.partition_result;
|
12473 + | let url = &mut context.url;
|
12474 + | let access_point_suffix = &mut context.access_point_suffix;
|
12475 + | let region_prefix = &mut context.region_prefix;
|
12476 + | let hardware_type = &mut context.hardware_type;
|
12477 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12478 + | let s3_e_ds = &mut context.s3_e_ds;
|
12479 + | let s3_e_fips = &mut context.s3_e_fips;
|
12480 + | let s3_e_auth = &mut context.s3_e_auth;
|
12481 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12482 + | let bucket_arn = &mut context.bucket_arn;
|
12483 + | let effective_arn_region = &mut context.effective_arn_region;
|
12484 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12485 + | let arn_type = &mut context.arn_type;
|
12486 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12487 + | let bucket_partition = &mut context.bucket_partition;
|
12488 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12489 + | let outpost_type = &mut context.outpost_type;
|
12490 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12491 + | let partition_resolver = &self.partition_resolver;
|
12492 + | (if let Some(inner) = partition_result {
|
12493 + | inner.name()
|
12494 + | } else {
|
12495 + | return false;
|
12496 + | }) == ("aws-cn")
|
12497 + | })(&mut _diagnostic_collector),
|
12498 + | 17 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12499 + | let effective_std_region = &mut context.effective_std_region;
|
12500 + | let partition_result = &mut context.partition_result;
|
12501 + | let url = &mut context.url;
|
12502 + | let access_point_suffix = &mut context.access_point_suffix;
|
12503 + | let region_prefix = &mut context.region_prefix;
|
12504 + | let hardware_type = &mut context.hardware_type;
|
12505 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12506 + | let s3_e_ds = &mut context.s3_e_ds;
|
12507 + | let s3_e_fips = &mut context.s3_e_fips;
|
12508 + | let s3_e_auth = &mut context.s3_e_auth;
|
12509 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12510 + | let bucket_arn = &mut context.bucket_arn;
|
12511 + | let effective_arn_region = &mut context.effective_arn_region;
|
12512 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12513 + | let arn_type = &mut context.arn_type;
|
12514 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12515 + | let bucket_partition = &mut context.bucket_partition;
|
12516 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12517 + | let outpost_type = &mut context.outpost_type;
|
12518 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12519 + | let partition_resolver = &self.partition_resolver;
|
12520 + | {
|
12521 + | *s3_e_ds = Some(crate::endpoint_lib::ite::ite!(use_dual_stack, ".dualstack".to_string(), "".to_string()).into());
|
12522 + | true
|
12523 + | }
|
12524 + | })(&mut _diagnostic_collector),
|
12525 + | 18 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12526 + | let effective_std_region = &mut context.effective_std_region;
|
12527 + | let partition_result = &mut context.partition_result;
|
12528 + | let url = &mut context.url;
|
12529 + | let access_point_suffix = &mut context.access_point_suffix;
|
12530 + | let region_prefix = &mut context.region_prefix;
|
12531 + | let hardware_type = &mut context.hardware_type;
|
12532 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12533 + | let s3_e_ds = &mut context.s3_e_ds;
|
12534 + | let s3_e_fips = &mut context.s3_e_fips;
|
12535 + | let s3_e_auth = &mut context.s3_e_auth;
|
12536 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12537 + | let bucket_arn = &mut context.bucket_arn;
|
12538 + | let effective_arn_region = &mut context.effective_arn_region;
|
12539 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12540 + | let arn_type = &mut context.arn_type;
|
12541 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12542 + | let bucket_partition = &mut context.bucket_partition;
|
12543 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12544 + | let outpost_type = &mut context.outpost_type;
|
12545 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12546 + | let partition_resolver = &self.partition_resolver;
|
12547 + | {
|
12548 + | *s3_e_fips = Some(crate::endpoint_lib::ite::ite!(use_fips, "-fips".to_string(), "".to_string()).into());
|
12549 + | true
|
12550 + | }
|
12551 + | })(&mut _diagnostic_collector),
|
12552 + | 19 => (force_path_style) == (&true),
|
12553 + | 20 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12554 + | let effective_std_region = &mut context.effective_std_region;
|
12555 + | let partition_result = &mut context.partition_result;
|
12556 + | let url = &mut context.url;
|
12557 + | let access_point_suffix = &mut context.access_point_suffix;
|
12558 + | let region_prefix = &mut context.region_prefix;
|
12559 + | let hardware_type = &mut context.hardware_type;
|
12560 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12561 + | let s3_e_ds = &mut context.s3_e_ds;
|
12562 + | let s3_e_fips = &mut context.s3_e_fips;
|
12563 + | let s3_e_auth = &mut context.s3_e_auth;
|
12564 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12565 + | let bucket_arn = &mut context.bucket_arn;
|
12566 + | let effective_arn_region = &mut context.effective_arn_region;
|
12567 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12568 + | let arn_type = &mut context.arn_type;
|
12569 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12570 + | let bucket_partition = &mut context.bucket_partition;
|
12571 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12572 + | let outpost_type = &mut context.outpost_type;
|
12573 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12574 + | let partition_resolver = &self.partition_resolver;
|
12575 + | {
|
12576 + | *s3_e_auth = Some(
|
12577 + | crate::endpoint_lib::ite::ite!(
|
12578 + | crate::endpoint_lib::coalesce::coalesce!(*disable_s3_express_session_auth, false),
|
12579 + | "sigv4".to_string(),
|
12580 + | "sigv4-s3express".to_string()
|
12581 + | )
|
12582 + | .into(),
|
12583 + | );
|
12584 + | true
|
12585 + | }
|
12586 + | })(&mut _diagnostic_collector),
|
12587 + | 21 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12588 + | let effective_std_region = &mut context.effective_std_region;
|
12589 + | let partition_result = &mut context.partition_result;
|
12590 + | let url = &mut context.url;
|
12591 + | let access_point_suffix = &mut context.access_point_suffix;
|
12592 + | let region_prefix = &mut context.region_prefix;
|
12593 + | let hardware_type = &mut context.hardware_type;
|
12594 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12595 + | let s3_e_ds = &mut context.s3_e_ds;
|
12596 + | let s3_e_fips = &mut context.s3_e_fips;
|
12597 + | let s3_e_auth = &mut context.s3_e_auth;
|
12598 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12599 + | let bucket_arn = &mut context.bucket_arn;
|
12600 + | let effective_arn_region = &mut context.effective_arn_region;
|
12601 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12602 + | let arn_type = &mut context.arn_type;
|
12603 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12604 + | let bucket_partition = &mut context.bucket_partition;
|
12605 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12606 + | let outpost_type = &mut context.outpost_type;
|
12607 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12608 + | let partition_resolver = &self.partition_resolver;
|
12609 + | crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(
|
12610 + | if let Some(param) = bucket { param } else { return false },
|
12611 + | false,
|
12612 + | _diagnostic_collector,
|
12613 + | )
|
12614 + | })(&mut _diagnostic_collector),
|
12615 + | 22 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12616 + | let effective_std_region = &mut context.effective_std_region;
|
12617 + | let partition_result = &mut context.partition_result;
|
12618 + | let url = &mut context.url;
|
12619 + | let access_point_suffix = &mut context.access_point_suffix;
|
12620 + | let region_prefix = &mut context.region_prefix;
|
12621 + | let hardware_type = &mut context.hardware_type;
|
12622 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12623 + | let s3_e_ds = &mut context.s3_e_ds;
|
12624 + | let s3_e_fips = &mut context.s3_e_fips;
|
12625 + | let s3_e_auth = &mut context.s3_e_auth;
|
12626 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12627 + | let bucket_arn = &mut context.bucket_arn;
|
12628 + | let effective_arn_region = &mut context.effective_arn_region;
|
12629 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12630 + | let arn_type = &mut context.arn_type;
|
12631 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12632 + | let bucket_partition = &mut context.bucket_partition;
|
12633 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12634 + | let outpost_type = &mut context.outpost_type;
|
12635 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12636 + | let partition_resolver = &self.partition_resolver;
|
12637 + | {
|
12638 + | *s3express_availability_zone_id = crate::endpoint_lib::split::split(
|
12639 + | if let Some(param) = bucket { param } else { return false },
|
12640 + | "--",
|
12641 + | 0,
|
12642 + | _diagnostic_collector,
|
12643 + | )
|
12644 + | .get(1)
|
12645 + | .cloned()
|
12646 + | .map(|inner| inner.into());
|
12647 + | s3express_availability_zone_id.is_some()
|
12648 + | }
|
12649 + | })(&mut _diagnostic_collector),
|
12650 + | 23 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12651 + | let effective_std_region = &mut context.effective_std_region;
|
12652 + | let partition_result = &mut context.partition_result;
|
12653 + | let url = &mut context.url;
|
12654 + | let access_point_suffix = &mut context.access_point_suffix;
|
12655 + | let region_prefix = &mut context.region_prefix;
|
12656 + | let hardware_type = &mut context.hardware_type;
|
12657 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12658 + | let s3_e_ds = &mut context.s3_e_ds;
|
12659 + | let s3_e_fips = &mut context.s3_e_fips;
|
12660 + | let s3_e_auth = &mut context.s3_e_auth;
|
12661 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12662 + | let bucket_arn = &mut context.bucket_arn;
|
12663 + | let effective_arn_region = &mut context.effective_arn_region;
|
12664 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12665 + | let arn_type = &mut context.arn_type;
|
12666 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12667 + | let bucket_partition = &mut context.bucket_partition;
|
12668 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12669 + | let outpost_type = &mut context.outpost_type;
|
12670 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12671 + | let partition_resolver = &self.partition_resolver;
|
12672 + | crate::endpoint_lib::host::is_valid_host_label(
|
12673 + | if let Some(param) = outpost_id_ssa_2 { param } else { return false },
|
12674 + | false,
|
12675 + | _diagnostic_collector,
|
12676 + | )
|
12677 + | })(&mut _diagnostic_collector),
|
12678 + | 24 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12679 + | let effective_std_region = &mut context.effective_std_region;
|
12680 + | let partition_result = &mut context.partition_result;
|
12681 + | let url = &mut context.url;
|
12682 + | let access_point_suffix = &mut context.access_point_suffix;
|
12683 + | let region_prefix = &mut context.region_prefix;
|
12684 + | let hardware_type = &mut context.hardware_type;
|
12685 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12686 + | let s3_e_ds = &mut context.s3_e_ds;
|
12687 + | let s3_e_fips = &mut context.s3_e_fips;
|
12688 + | let s3_e_auth = &mut context.s3_e_auth;
|
12689 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12690 + | let bucket_arn = &mut context.bucket_arn;
|
12691 + | let effective_arn_region = &mut context.effective_arn_region;
|
12692 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12693 + | let arn_type = &mut context.arn_type;
|
12694 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12695 + | let bucket_partition = &mut context.bucket_partition;
|
12696 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12697 + | let outpost_type = &mut context.outpost_type;
|
12698 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12699 + | let partition_resolver = &self.partition_resolver;
|
12700 + | (crate::endpoint_lib::coalesce::coalesce!(*use_s3_express_control_endpoint, false)) == (true)
|
12701 + | })(&mut _diagnostic_collector),
|
12702 + | 25 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12703 + | let effective_std_region = &mut context.effective_std_region;
|
12704 + | let partition_result = &mut context.partition_result;
|
12705 + | let url = &mut context.url;
|
12706 + | let access_point_suffix = &mut context.access_point_suffix;
|
12707 + | let region_prefix = &mut context.region_prefix;
|
12708 + | let hardware_type = &mut context.hardware_type;
|
12709 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12710 + | let s3_e_ds = &mut context.s3_e_ds;
|
12711 + | let s3_e_fips = &mut context.s3_e_fips;
|
12712 + | let s3_e_auth = &mut context.s3_e_auth;
|
12713 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12714 + | let bucket_arn = &mut context.bucket_arn;
|
12715 + | let effective_arn_region = &mut context.effective_arn_region;
|
12716 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12717 + | let arn_type = &mut context.arn_type;
|
12718 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12719 + | let bucket_partition = &mut context.bucket_partition;
|
12720 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12721 + | let outpost_type = &mut context.outpost_type;
|
12722 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12723 + | let partition_resolver = &self.partition_resolver;
|
12724 + | (region_prefix) == &mut Some(("beta".into()))
|
12725 + | })(&mut _diagnostic_collector),
|
12726 + | 26 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12727 + | let effective_std_region = &mut context.effective_std_region;
|
12728 + | let partition_result = &mut context.partition_result;
|
12729 + | let url = &mut context.url;
|
12730 + | let access_point_suffix = &mut context.access_point_suffix;
|
12731 + | let region_prefix = &mut context.region_prefix;
|
12732 + | let hardware_type = &mut context.hardware_type;
|
12733 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12734 + | let s3_e_ds = &mut context.s3_e_ds;
|
12735 + | let s3_e_fips = &mut context.s3_e_fips;
|
12736 + | let s3_e_auth = &mut context.s3_e_auth;
|
12737 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12738 + | let bucket_arn = &mut context.bucket_arn;
|
12739 + | let effective_arn_region = &mut context.effective_arn_region;
|
12740 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12741 + | let arn_type = &mut context.arn_type;
|
12742 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12743 + | let bucket_partition = &mut context.bucket_partition;
|
12744 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12745 + | let outpost_type = &mut context.outpost_type;
|
12746 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12747 + | let partition_resolver = &self.partition_resolver;
|
12748 + | crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(
|
12749 + | if let Some(param) = bucket { param } else { return false },
|
12750 + | true,
|
12751 + | _diagnostic_collector,
|
12752 + | )
|
12753 + | })(&mut _diagnostic_collector),
|
12754 + | 27 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12755 + | let effective_std_region = &mut context.effective_std_region;
|
12756 + | let partition_result = &mut context.partition_result;
|
12757 + | let url = &mut context.url;
|
12758 + | let access_point_suffix = &mut context.access_point_suffix;
|
12759 + | let region_prefix = &mut context.region_prefix;
|
12760 + | let hardware_type = &mut context.hardware_type;
|
12761 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12762 + | let s3_e_ds = &mut context.s3_e_ds;
|
12763 + | let s3_e_fips = &mut context.s3_e_fips;
|
12764 + | let s3_e_auth = &mut context.s3_e_auth;
|
12765 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12766 + | let bucket_arn = &mut context.bucket_arn;
|
12767 + | let effective_arn_region = &mut context.effective_arn_region;
|
12768 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12769 + | let arn_type = &mut context.arn_type;
|
12770 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12771 + | let bucket_partition = &mut context.bucket_partition;
|
12772 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12773 + | let outpost_type = &mut context.outpost_type;
|
12774 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12775 + | let partition_resolver = &self.partition_resolver;
|
12776 + | (crate::endpoint_lib::coalesce::coalesce!(
|
12777 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12778 + | if let Some(param) = bucket { param } else { return false },
|
12779 + | 16,
|
12780 + | 18,
|
12781 + | true,
|
12782 + | _diagnostic_collector
|
12783 + | ) {
|
12784 + | inner
|
12785 + | } else {
|
12786 + | return false;
|
12787 + | },
|
12788 + | ""
|
12789 + | )) == ("--")
|
12790 + | })(&mut _diagnostic_collector),
|
12791 + | 28 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12792 + | let effective_std_region = &mut context.effective_std_region;
|
12793 + | let partition_result = &mut context.partition_result;
|
12794 + | let url = &mut context.url;
|
12795 + | let access_point_suffix = &mut context.access_point_suffix;
|
12796 + | let region_prefix = &mut context.region_prefix;
|
12797 + | let hardware_type = &mut context.hardware_type;
|
12798 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12799 + | let s3_e_ds = &mut context.s3_e_ds;
|
12800 + | let s3_e_fips = &mut context.s3_e_fips;
|
12801 + | let s3_e_auth = &mut context.s3_e_auth;
|
12802 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12803 + | let bucket_arn = &mut context.bucket_arn;
|
12804 + | let effective_arn_region = &mut context.effective_arn_region;
|
12805 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12806 + | let arn_type = &mut context.arn_type;
|
12807 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12808 + | let bucket_partition = &mut context.bucket_partition;
|
12809 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12810 + | let outpost_type = &mut context.outpost_type;
|
12811 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12812 + | let partition_resolver = &self.partition_resolver;
|
12813 + | (crate::endpoint_lib::coalesce::coalesce!(
|
12814 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12815 + | if let Some(param) = bucket { param } else { return false },
|
12816 + | 21,
|
12817 + | 23,
|
12818 + | true,
|
12819 + | _diagnostic_collector
|
12820 + | ) {
|
12821 + | inner
|
12822 + | } else {
|
12823 + | return false;
|
12824 + | },
|
12825 + | ""
|
12826 + | )) == ("--")
|
12827 + | })(&mut _diagnostic_collector),
|
12828 + | 29 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12829 + | let effective_std_region = &mut context.effective_std_region;
|
12830 + | let partition_result = &mut context.partition_result;
|
12831 + | let url = &mut context.url;
|
12832 + | let access_point_suffix = &mut context.access_point_suffix;
|
12833 + | let region_prefix = &mut context.region_prefix;
|
12834 + | let hardware_type = &mut context.hardware_type;
|
12835 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12836 + | let s3_e_ds = &mut context.s3_e_ds;
|
12837 + | let s3_e_fips = &mut context.s3_e_fips;
|
12838 + | let s3_e_auth = &mut context.s3_e_auth;
|
12839 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12840 + | let bucket_arn = &mut context.bucket_arn;
|
12841 + | let effective_arn_region = &mut context.effective_arn_region;
|
12842 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12843 + | let arn_type = &mut context.arn_type;
|
12844 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12845 + | let bucket_partition = &mut context.bucket_partition;
|
12846 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12847 + | let outpost_type = &mut context.outpost_type;
|
12848 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12849 + | let partition_resolver = &self.partition_resolver;
|
12850 + | (if let Some(inner) = url { inner.scheme() } else { return false }) == ("http")
|
12851 + | })(&mut _diagnostic_collector),
|
12852 + | 30 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12853 + | let effective_std_region = &mut context.effective_std_region;
|
12854 + | let partition_result = &mut context.partition_result;
|
12855 + | let url = &mut context.url;
|
12856 + | let access_point_suffix = &mut context.access_point_suffix;
|
12857 + | let region_prefix = &mut context.region_prefix;
|
12858 + | let hardware_type = &mut context.hardware_type;
|
12859 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12860 + | let s3_e_ds = &mut context.s3_e_ds;
|
12861 + | let s3_e_fips = &mut context.s3_e_fips;
|
12862 + | let s3_e_auth = &mut context.s3_e_auth;
|
12863 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12864 + | let bucket_arn = &mut context.bucket_arn;
|
12865 + | let effective_arn_region = &mut context.effective_arn_region;
|
12866 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12867 + | let arn_type = &mut context.arn_type;
|
12868 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12869 + | let bucket_partition = &mut context.bucket_partition;
|
12870 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12871 + | let outpost_type = &mut context.outpost_type;
|
12872 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12873 + | let partition_resolver = &self.partition_resolver;
|
12874 + | crate::endpoint_lib::host::is_valid_host_label(
|
12875 + | if let Some(param) = region { param } else { return false },
|
12876 + | false,
|
12877 + | _diagnostic_collector,
|
12878 + | )
|
12879 + | })(&mut _diagnostic_collector),
|
12880 + | 31 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12881 + | let effective_std_region = &mut context.effective_std_region;
|
12882 + | let partition_result = &mut context.partition_result;
|
12883 + | let url = &mut context.url;
|
12884 + | let access_point_suffix = &mut context.access_point_suffix;
|
12885 + | let region_prefix = &mut context.region_prefix;
|
12886 + | let hardware_type = &mut context.hardware_type;
|
12887 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12888 + | let s3_e_ds = &mut context.s3_e_ds;
|
12889 + | let s3_e_fips = &mut context.s3_e_fips;
|
12890 + | let s3_e_auth = &mut context.s3_e_auth;
|
12891 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12892 + | let bucket_arn = &mut context.bucket_arn;
|
12893 + | let effective_arn_region = &mut context.effective_arn_region;
|
12894 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12895 + | let arn_type = &mut context.arn_type;
|
12896 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12897 + | let bucket_partition = &mut context.bucket_partition;
|
12898 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12899 + | let outpost_type = &mut context.outpost_type;
|
12900 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12901 + | let partition_resolver = &self.partition_resolver;
|
12902 + | {
|
12903 + | *bucket_arn = crate::endpoint_lib::arn::parse_arn(
|
12904 + | if let Some(param) = bucket { param } else { return false },
|
12905 + | _diagnostic_collector,
|
12906 + | )
|
12907 + | .map(|inner| inner.into());
|
12908 + | bucket_arn.is_some()
|
12909 + | }
|
12910 + | })(&mut _diagnostic_collector),
|
12911 + | 32 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12912 + | let effective_std_region = &mut context.effective_std_region;
|
12913 + | let partition_result = &mut context.partition_result;
|
12914 + | let url = &mut context.url;
|
12915 + | let access_point_suffix = &mut context.access_point_suffix;
|
12916 + | let region_prefix = &mut context.region_prefix;
|
12917 + | let hardware_type = &mut context.hardware_type;
|
12918 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12919 + | let s3_e_ds = &mut context.s3_e_ds;
|
12920 + | let s3_e_fips = &mut context.s3_e_fips;
|
12921 + | let s3_e_auth = &mut context.s3_e_auth;
|
12922 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12923 + | let bucket_arn = &mut context.bucket_arn;
|
12924 + | let effective_arn_region = &mut context.effective_arn_region;
|
12925 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12926 + | let arn_type = &mut context.arn_type;
|
12927 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12928 + | let bucket_partition = &mut context.bucket_partition;
|
12929 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12930 + | let outpost_type = &mut context.outpost_type;
|
12931 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12932 + | let partition_resolver = &self.partition_resolver;
|
12933 + | (crate::endpoint_lib::coalesce::coalesce!(
|
12934 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
12935 + | if let Some(param) = bucket { param } else { return false },
|
12936 + | 27,
|
12937 + | 29,
|
12938 + | true,
|
12939 + | _diagnostic_collector
|
12940 + | ) {
|
12941 + | inner
|
12942 + | } else {
|
12943 + | return false;
|
12944 + | },
|
12945 + | ""
|
12946 + | )) == ("--")
|
12947 + | })(&mut _diagnostic_collector),
|
12948 + | 33 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12949 + | let effective_std_region = &mut context.effective_std_region;
|
12950 + | let partition_result = &mut context.partition_result;
|
12951 + | let url = &mut context.url;
|
12952 + | let access_point_suffix = &mut context.access_point_suffix;
|
12953 + | let region_prefix = &mut context.region_prefix;
|
12954 + | let hardware_type = &mut context.hardware_type;
|
12955 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12956 + | let s3_e_ds = &mut context.s3_e_ds;
|
12957 + | let s3_e_fips = &mut context.s3_e_fips;
|
12958 + | let s3_e_auth = &mut context.s3_e_auth;
|
12959 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12960 + | let bucket_arn = &mut context.bucket_arn;
|
12961 + | let effective_arn_region = &mut context.effective_arn_region;
|
12962 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12963 + | let arn_type = &mut context.arn_type;
|
12964 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12965 + | let bucket_partition = &mut context.bucket_partition;
|
12966 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
12967 + | let outpost_type = &mut context.outpost_type;
|
12968 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
12969 + | let partition_resolver = &self.partition_resolver;
|
12970 + | {
|
12971 + | *effective_arn_region = Some(
|
12972 + | crate::endpoint_lib::ite::ite!(
|
12973 + | crate::endpoint_lib::coalesce::coalesce!(*use_arn_region, true),
|
12974 + | if let Some(inner) = bucket_arn { inner.region() } else { return false }.to_string(),
|
12975 + | region.clone().expect("Reference already confirmed Some")
|
12976 + | )
|
12977 + | .into(),
|
12978 + | );
|
12979 + | true
|
12980 + | }
|
12981 + | })(&mut _diagnostic_collector),
|
12982 + | 34 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
12983 + | let effective_std_region = &mut context.effective_std_region;
|
12984 + | let partition_result = &mut context.partition_result;
|
12985 + | let url = &mut context.url;
|
12986 + | let access_point_suffix = &mut context.access_point_suffix;
|
12987 + | let region_prefix = &mut context.region_prefix;
|
12988 + | let hardware_type = &mut context.hardware_type;
|
12989 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
12990 + | let s3_e_ds = &mut context.s3_e_ds;
|
12991 + | let s3_e_fips = &mut context.s3_e_fips;
|
12992 + | let s3_e_auth = &mut context.s3_e_auth;
|
12993 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
12994 + | let bucket_arn = &mut context.bucket_arn;
|
12995 + | let effective_arn_region = &mut context.effective_arn_region;
|
12996 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
12997 + | let arn_type = &mut context.arn_type;
|
12998 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
12999 + | let bucket_partition = &mut context.bucket_partition;
|
13000 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13001 + | let outpost_type = &mut context.outpost_type;
|
13002 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13003 + | let partition_resolver = &self.partition_resolver;
|
13004 + | (if let Some(inner) = url { inner.is_ip() } else { return false }) == (true)
|
13005 + | })(&mut _diagnostic_collector),
|
13006 + | 35 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13007 + | let effective_std_region = &mut context.effective_std_region;
|
13008 + | let partition_result = &mut context.partition_result;
|
13009 + | let url = &mut context.url;
|
13010 + | let access_point_suffix = &mut context.access_point_suffix;
|
13011 + | let region_prefix = &mut context.region_prefix;
|
13012 + | let hardware_type = &mut context.hardware_type;
|
13013 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13014 + | let s3_e_ds = &mut context.s3_e_ds;
|
13015 + | let s3_e_fips = &mut context.s3_e_fips;
|
13016 + | let s3_e_auth = &mut context.s3_e_auth;
|
13017 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13018 + | let bucket_arn = &mut context.bucket_arn;
|
13019 + | let effective_arn_region = &mut context.effective_arn_region;
|
13020 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13021 + | let arn_type = &mut context.arn_type;
|
13022 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13023 + | let bucket_partition = &mut context.bucket_partition;
|
13024 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13025 + | let outpost_type = &mut context.outpost_type;
|
13026 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13027 + | let partition_resolver = &self.partition_resolver;
|
13028 + | (crate::endpoint_lib::coalesce::coalesce!(
|
13029 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
13030 + | if let Some(param) = bucket { param } else { return false },
|
13031 + | 0,
|
13032 + | 4,
|
13033 + | false,
|
13034 + | _diagnostic_collector
|
13035 + | ) {
|
13036 + | inner
|
13037 + | } else {
|
13038 + | return false;
|
13039 + | },
|
13040 + | ""
|
13041 + | )) == ("arn:")
|
13042 + | })(&mut _diagnostic_collector),
|
13043 + | 36 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13044 + | let effective_std_region = &mut context.effective_std_region;
|
13045 + | let partition_result = &mut context.partition_result;
|
13046 + | let url = &mut context.url;
|
13047 + | let access_point_suffix = &mut context.access_point_suffix;
|
13048 + | let region_prefix = &mut context.region_prefix;
|
13049 + | let hardware_type = &mut context.hardware_type;
|
13050 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13051 + | let s3_e_ds = &mut context.s3_e_ds;
|
13052 + | let s3_e_fips = &mut context.s3_e_fips;
|
13053 + | let s3_e_auth = &mut context.s3_e_auth;
|
13054 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13055 + | let bucket_arn = &mut context.bucket_arn;
|
13056 + | let effective_arn_region = &mut context.effective_arn_region;
|
13057 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13058 + | let arn_type = &mut context.arn_type;
|
13059 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13060 + | let bucket_partition = &mut context.bucket_partition;
|
13061 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13062 + | let outpost_type = &mut context.outpost_type;
|
13063 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13064 + | let partition_resolver = &self.partition_resolver;
|
13065 + | {
|
13066 + | *uri_encoded_bucket = Some(
|
13067 + | crate::endpoint_lib::uri_encode::uri_encode(
|
13068 + | if let Some(param) = bucket { param } else { return false },
|
13069 + | _diagnostic_collector,
|
13070 + | )
|
13071 + | .into(),
|
13072 + | );
|
13073 + | true
|
13074 + | }
|
13075 + | })(&mut _diagnostic_collector),
|
13076 + | 37 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13077 + | let effective_std_region = &mut context.effective_std_region;
|
13078 + | let partition_result = &mut context.partition_result;
|
13079 + | let url = &mut context.url;
|
13080 + | let access_point_suffix = &mut context.access_point_suffix;
|
13081 + | let region_prefix = &mut context.region_prefix;
|
13082 + | let hardware_type = &mut context.hardware_type;
|
13083 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13084 + | let s3_e_ds = &mut context.s3_e_ds;
|
13085 + | let s3_e_fips = &mut context.s3_e_fips;
|
13086 + | let s3_e_auth = &mut context.s3_e_auth;
|
13087 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13088 + | let bucket_arn = &mut context.bucket_arn;
|
13089 + | let effective_arn_region = &mut context.effective_arn_region;
|
13090 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13091 + | let arn_type = &mut context.arn_type;
|
13092 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13093 + | let bucket_partition = &mut context.bucket_partition;
|
13094 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13095 + | let outpost_type = &mut context.outpost_type;
|
13096 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13097 + | let partition_resolver = &self.partition_resolver;
|
13098 + | (crate::endpoint_lib::coalesce::coalesce!(*use_object_lambda_endpoint, false)) == (true)
|
13099 + | })(&mut _diagnostic_collector),
|
13100 + | 38 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13101 + | let effective_std_region = &mut context.effective_std_region;
|
13102 + | let partition_result = &mut context.partition_result;
|
13103 + | let url = &mut context.url;
|
13104 + | let access_point_suffix = &mut context.access_point_suffix;
|
13105 + | let region_prefix = &mut context.region_prefix;
|
13106 + | let hardware_type = &mut context.hardware_type;
|
13107 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13108 + | let s3_e_ds = &mut context.s3_e_ds;
|
13109 + | let s3_e_fips = &mut context.s3_e_fips;
|
13110 + | let s3_e_auth = &mut context.s3_e_auth;
|
13111 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13112 + | let bucket_arn = &mut context.bucket_arn;
|
13113 + | let effective_arn_region = &mut context.effective_arn_region;
|
13114 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13115 + | let arn_type = &mut context.arn_type;
|
13116 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13117 + | let bucket_partition = &mut context.bucket_partition;
|
13118 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13119 + | let outpost_type = &mut context.outpost_type;
|
13120 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13121 + | let partition_resolver = &self.partition_resolver;
|
13122 + | {
|
13123 + | *arn_type = if let Some(inner) = bucket_arn {
|
13124 + | inner.resource_id().first().cloned()
|
13125 + | } else {
|
13126 + | return false;
|
13127 + | }
|
13128 + | .map(|inner| inner.into());
|
13129 + | arn_type.is_some()
|
13130 + | }
|
13131 + | })(&mut _diagnostic_collector),
|
13132 + | 39 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13133 + | let effective_std_region = &mut context.effective_std_region;
|
13134 + | let partition_result = &mut context.partition_result;
|
13135 + | let url = &mut context.url;
|
13136 + | let access_point_suffix = &mut context.access_point_suffix;
|
13137 + | let region_prefix = &mut context.region_prefix;
|
13138 + | let hardware_type = &mut context.hardware_type;
|
13139 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13140 + | let s3_e_ds = &mut context.s3_e_ds;
|
13141 + | let s3_e_fips = &mut context.s3_e_fips;
|
13142 + | let s3_e_auth = &mut context.s3_e_auth;
|
13143 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13144 + | let bucket_arn = &mut context.bucket_arn;
|
13145 + | let effective_arn_region = &mut context.effective_arn_region;
|
13146 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13147 + | let arn_type = &mut context.arn_type;
|
13148 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13149 + | let bucket_partition = &mut context.bucket_partition;
|
13150 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13151 + | let outpost_type = &mut context.outpost_type;
|
13152 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13153 + | let partition_resolver = &self.partition_resolver;
|
13154 + | (arn_type) == &mut Some(("".into()))
|
13155 + | })(&mut _diagnostic_collector),
|
13156 + | 40 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13157 + | let effective_std_region = &mut context.effective_std_region;
|
13158 + | let partition_result = &mut context.partition_result;
|
13159 + | let url = &mut context.url;
|
13160 + | let access_point_suffix = &mut context.access_point_suffix;
|
13161 + | let region_prefix = &mut context.region_prefix;
|
13162 + | let hardware_type = &mut context.hardware_type;
|
13163 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13164 + | let s3_e_ds = &mut context.s3_e_ds;
|
13165 + | let s3_e_fips = &mut context.s3_e_fips;
|
13166 + | let s3_e_auth = &mut context.s3_e_auth;
|
13167 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13168 + | let bucket_arn = &mut context.bucket_arn;
|
13169 + | let effective_arn_region = &mut context.effective_arn_region;
|
13170 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13171 + | let arn_type = &mut context.arn_type;
|
13172 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13173 + | let bucket_partition = &mut context.bucket_partition;
|
13174 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13175 + | let outpost_type = &mut context.outpost_type;
|
13176 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13177 + | let partition_resolver = &self.partition_resolver;
|
13178 + | (arn_type) == &mut Some(("accesspoint".into()))
|
13179 + | })(&mut _diagnostic_collector),
|
13180 + | 41 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13181 + | let effective_std_region = &mut context.effective_std_region;
|
13182 + | let partition_result = &mut context.partition_result;
|
13183 + | let url = &mut context.url;
|
13184 + | let access_point_suffix = &mut context.access_point_suffix;
|
13185 + | let region_prefix = &mut context.region_prefix;
|
13186 + | let hardware_type = &mut context.hardware_type;
|
13187 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13188 + | let s3_e_ds = &mut context.s3_e_ds;
|
13189 + | let s3_e_fips = &mut context.s3_e_fips;
|
13190 + | let s3_e_auth = &mut context.s3_e_auth;
|
13191 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13192 + | let bucket_arn = &mut context.bucket_arn;
|
13193 + | let effective_arn_region = &mut context.effective_arn_region;
|
13194 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13195 + | let arn_type = &mut context.arn_type;
|
13196 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13197 + | let bucket_partition = &mut context.bucket_partition;
|
13198 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13199 + | let outpost_type = &mut context.outpost_type;
|
13200 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13201 + | let partition_resolver = &self.partition_resolver;
|
13202 + | {
|
13203 + | *access_point_name_ssa_1 = if let Some(inner) = bucket_arn {
|
13204 + | inner.resource_id().get(1).cloned()
|
13205 + | } else {
|
13206 + | return false;
|
13207 + | }
|
13208 + | .map(|inner| inner.into());
|
13209 + | access_point_name_ssa_1.is_some()
|
13210 + | }
|
13211 + | })(&mut _diagnostic_collector),
|
13212 + | 42 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13213 + | let effective_std_region = &mut context.effective_std_region;
|
13214 + | let partition_result = &mut context.partition_result;
|
13215 + | let url = &mut context.url;
|
13216 + | let access_point_suffix = &mut context.access_point_suffix;
|
13217 + | let region_prefix = &mut context.region_prefix;
|
13218 + | let hardware_type = &mut context.hardware_type;
|
13219 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13220 + | let s3_e_ds = &mut context.s3_e_ds;
|
13221 + | let s3_e_fips = &mut context.s3_e_fips;
|
13222 + | let s3_e_auth = &mut context.s3_e_auth;
|
13223 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13224 + | let bucket_arn = &mut context.bucket_arn;
|
13225 + | let effective_arn_region = &mut context.effective_arn_region;
|
13226 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13227 + | let arn_type = &mut context.arn_type;
|
13228 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13229 + | let bucket_partition = &mut context.bucket_partition;
|
13230 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13231 + | let outpost_type = &mut context.outpost_type;
|
13232 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13233 + | let partition_resolver = &self.partition_resolver;
|
13234 + | (access_point_name_ssa_1) == &mut Some(("".into()))
|
13235 + | })(&mut _diagnostic_collector),
|
13236 + | 43 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13237 + | let effective_std_region = &mut context.effective_std_region;
|
13238 + | let partition_result = &mut context.partition_result;
|
13239 + | let url = &mut context.url;
|
13240 + | let access_point_suffix = &mut context.access_point_suffix;
|
13241 + | let region_prefix = &mut context.region_prefix;
|
13242 + | let hardware_type = &mut context.hardware_type;
|
13243 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13244 + | let s3_e_ds = &mut context.s3_e_ds;
|
13245 + | let s3_e_fips = &mut context.s3_e_fips;
|
13246 + | let s3_e_auth = &mut context.s3_e_auth;
|
13247 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13248 + | let bucket_arn = &mut context.bucket_arn;
|
13249 + | let effective_arn_region = &mut context.effective_arn_region;
|
13250 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13251 + | let arn_type = &mut context.arn_type;
|
13252 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13253 + | let bucket_partition = &mut context.bucket_partition;
|
13254 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13255 + | let outpost_type = &mut context.outpost_type;
|
13256 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13257 + | let partition_resolver = &self.partition_resolver;
|
13258 + | (if let Some(inner) = bucket_arn { inner.service() } else { return false }) == ("s3-object-lambda")
|
13259 + | })(&mut _diagnostic_collector),
|
13260 + | 44 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13261 + | let effective_std_region = &mut context.effective_std_region;
|
13262 + | let partition_result = &mut context.partition_result;
|
13263 + | let url = &mut context.url;
|
13264 + | let access_point_suffix = &mut context.access_point_suffix;
|
13265 + | let region_prefix = &mut context.region_prefix;
|
13266 + | let hardware_type = &mut context.hardware_type;
|
13267 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13268 + | let s3_e_ds = &mut context.s3_e_ds;
|
13269 + | let s3_e_fips = &mut context.s3_e_fips;
|
13270 + | let s3_e_auth = &mut context.s3_e_auth;
|
13271 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13272 + | let bucket_arn = &mut context.bucket_arn;
|
13273 + | let effective_arn_region = &mut context.effective_arn_region;
|
13274 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13275 + | let arn_type = &mut context.arn_type;
|
13276 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13277 + | let bucket_partition = &mut context.bucket_partition;
|
13278 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13279 + | let outpost_type = &mut context.outpost_type;
|
13280 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13281 + | let partition_resolver = &self.partition_resolver;
|
13282 + | crate::endpoint_lib::host::is_valid_host_label(
|
13283 + | if let Some(param) = region { param } else { return false },
|
13284 + | true,
|
13285 + | _diagnostic_collector,
|
13286 + | )
|
13287 + | })(&mut _diagnostic_collector),
|
13288 + | 45 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13289 + | let effective_std_region = &mut context.effective_std_region;
|
13290 + | let partition_result = &mut context.partition_result;
|
13291 + | let url = &mut context.url;
|
13292 + | let access_point_suffix = &mut context.access_point_suffix;
|
13293 + | let region_prefix = &mut context.region_prefix;
|
13294 + | let hardware_type = &mut context.hardware_type;
|
13295 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13296 + | let s3_e_ds = &mut context.s3_e_ds;
|
13297 + | let s3_e_fips = &mut context.s3_e_fips;
|
13298 + | let s3_e_auth = &mut context.s3_e_auth;
|
13299 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13300 + | let bucket_arn = &mut context.bucket_arn;
|
13301 + | let effective_arn_region = &mut context.effective_arn_region;
|
13302 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13303 + | let arn_type = &mut context.arn_type;
|
13304 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13305 + | let bucket_partition = &mut context.bucket_partition;
|
13306 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13307 + | let outpost_type = &mut context.outpost_type;
|
13308 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13309 + | let partition_resolver = &self.partition_resolver;
|
13310 + | (if let Some(inner) = bucket_arn { inner.region() } else { return false }) == ("")
|
13311 + | })(&mut _diagnostic_collector),
|
13312 + | 46 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13313 + | let effective_std_region = &mut context.effective_std_region;
|
13314 + | let partition_result = &mut context.partition_result;
|
13315 + | let url = &mut context.url;
|
13316 + | let access_point_suffix = &mut context.access_point_suffix;
|
13317 + | let region_prefix = &mut context.region_prefix;
|
13318 + | let hardware_type = &mut context.hardware_type;
|
13319 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13320 + | let s3_e_ds = &mut context.s3_e_ds;
|
13321 + | let s3_e_fips = &mut context.s3_e_fips;
|
13322 + | let s3_e_auth = &mut context.s3_e_auth;
|
13323 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13324 + | let bucket_arn = &mut context.bucket_arn;
|
13325 + | let effective_arn_region = &mut context.effective_arn_region;
|
13326 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13327 + | let arn_type = &mut context.arn_type;
|
13328 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13329 + | let bucket_partition = &mut context.bucket_partition;
|
13330 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13331 + | let outpost_type = &mut context.outpost_type;
|
13332 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13333 + | let partition_resolver = &self.partition_resolver;
|
13334 + | (hardware_type) == &mut Some(("e".into()))
|
13335 + | })(&mut _diagnostic_collector),
|
13336 + | 47 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13337 + | let effective_std_region = &mut context.effective_std_region;
|
13338 + | let partition_result = &mut context.partition_result;
|
13339 + | let url = &mut context.url;
|
13340 + | let access_point_suffix = &mut context.access_point_suffix;
|
13341 + | let region_prefix = &mut context.region_prefix;
|
13342 + | let hardware_type = &mut context.hardware_type;
|
13343 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13344 + | let s3_e_ds = &mut context.s3_e_ds;
|
13345 + | let s3_e_fips = &mut context.s3_e_fips;
|
13346 + | let s3_e_auth = &mut context.s3_e_auth;
|
13347 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13348 + | let bucket_arn = &mut context.bucket_arn;
|
13349 + | let effective_arn_region = &mut context.effective_arn_region;
|
13350 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13351 + | let arn_type = &mut context.arn_type;
|
13352 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13353 + | let bucket_partition = &mut context.bucket_partition;
|
13354 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13355 + | let outpost_type = &mut context.outpost_type;
|
13356 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13357 + | let partition_resolver = &self.partition_resolver;
|
13358 + | (crate::endpoint_lib::coalesce::coalesce!(
|
13359 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
13360 + | if let Some(param) = bucket { param } else { return false },
|
13361 + | 26,
|
13362 + | 28,
|
13363 + | true,
|
13364 + | _diagnostic_collector
|
13365 + | ) {
|
13366 + | inner
|
13367 + | } else {
|
13368 + | return false;
|
13369 + | },
|
13370 + | ""
|
13371 + | )) == ("--")
|
13372 + | })(&mut _diagnostic_collector),
|
13373 + | 48 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13374 + | let effective_std_region = &mut context.effective_std_region;
|
13375 + | let partition_result = &mut context.partition_result;
|
13376 + | let url = &mut context.url;
|
13377 + | let access_point_suffix = &mut context.access_point_suffix;
|
13378 + | let region_prefix = &mut context.region_prefix;
|
13379 + | let hardware_type = &mut context.hardware_type;
|
13380 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13381 + | let s3_e_ds = &mut context.s3_e_ds;
|
13382 + | let s3_e_fips = &mut context.s3_e_fips;
|
13383 + | let s3_e_auth = &mut context.s3_e_auth;
|
13384 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13385 + | let bucket_arn = &mut context.bucket_arn;
|
13386 + | let effective_arn_region = &mut context.effective_arn_region;
|
13387 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13388 + | let arn_type = &mut context.arn_type;
|
13389 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13390 + | let bucket_partition = &mut context.bucket_partition;
|
13391 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13392 + | let outpost_type = &mut context.outpost_type;
|
13393 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13394 + | let partition_resolver = &self.partition_resolver;
|
13395 + | (crate::endpoint_lib::coalesce::coalesce!(
|
13396 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
13397 + | if let Some(param) = bucket { param } else { return false },
|
13398 + | 19,
|
13399 + | 21,
|
13400 + | true,
|
13401 + | _diagnostic_collector
|
13402 + | ) {
|
13403 + | inner
|
13404 + | } else {
|
13405 + | return false;
|
13406 + | },
|
13407 + | ""
|
13408 + | )) == ("--")
|
13409 + | })(&mut _diagnostic_collector),
|
13410 + | 49 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13411 + | let effective_std_region = &mut context.effective_std_region;
|
13412 + | let partition_result = &mut context.partition_result;
|
13413 + | let url = &mut context.url;
|
13414 + | let access_point_suffix = &mut context.access_point_suffix;
|
13415 + | let region_prefix = &mut context.region_prefix;
|
13416 + | let hardware_type = &mut context.hardware_type;
|
13417 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13418 + | let s3_e_ds = &mut context.s3_e_ds;
|
13419 + | let s3_e_fips = &mut context.s3_e_fips;
|
13420 + | let s3_e_auth = &mut context.s3_e_auth;
|
13421 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13422 + | let bucket_arn = &mut context.bucket_arn;
|
13423 + | let effective_arn_region = &mut context.effective_arn_region;
|
13424 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13425 + | let arn_type = &mut context.arn_type;
|
13426 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13427 + | let bucket_partition = &mut context.bucket_partition;
|
13428 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13429 + | let outpost_type = &mut context.outpost_type;
|
13430 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13431 + | let partition_resolver = &self.partition_resolver;
|
13432 + | (crate::endpoint_lib::coalesce::coalesce!(
|
13433 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
13434 + | if let Some(param) = bucket { param } else { return false },
|
13435 + | 14,
|
13436 + | 16,
|
13437 + | true,
|
13438 + | _diagnostic_collector
|
13439 + | ) {
|
13440 + | inner
|
13441 + | } else {
|
13442 + | return false;
|
13443 + | },
|
13444 + | ""
|
13445 + | )) == ("--")
|
13446 + | })(&mut _diagnostic_collector),
|
13447 + | 50 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13448 + | let effective_std_region = &mut context.effective_std_region;
|
13449 + | let partition_result = &mut context.partition_result;
|
13450 + | let url = &mut context.url;
|
13451 + | let access_point_suffix = &mut context.access_point_suffix;
|
13452 + | let region_prefix = &mut context.region_prefix;
|
13453 + | let hardware_type = &mut context.hardware_type;
|
13454 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13455 + | let s3_e_ds = &mut context.s3_e_ds;
|
13456 + | let s3_e_fips = &mut context.s3_e_fips;
|
13457 + | let s3_e_auth = &mut context.s3_e_auth;
|
13458 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13459 + | let bucket_arn = &mut context.bucket_arn;
|
13460 + | let effective_arn_region = &mut context.effective_arn_region;
|
13461 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13462 + | let arn_type = &mut context.arn_type;
|
13463 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13464 + | let bucket_partition = &mut context.bucket_partition;
|
13465 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13466 + | let outpost_type = &mut context.outpost_type;
|
13467 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13468 + | let partition_resolver = &self.partition_resolver;
|
13469 + | (crate::endpoint_lib::coalesce::coalesce!(
|
13470 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
13471 + | if let Some(param) = bucket { param } else { return false },
|
13472 + | 20,
|
13473 + | 22,
|
13474 + | true,
|
13475 + | _diagnostic_collector
|
13476 + | ) {
|
13477 + | inner
|
13478 + | } else {
|
13479 + | return false;
|
13480 + | },
|
13481 + | ""
|
13482 + | )) == ("--")
|
13483 + | })(&mut _diagnostic_collector),
|
13484 + | 51 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13485 + | let effective_std_region = &mut context.effective_std_region;
|
13486 + | let partition_result = &mut context.partition_result;
|
13487 + | let url = &mut context.url;
|
13488 + | let access_point_suffix = &mut context.access_point_suffix;
|
13489 + | let region_prefix = &mut context.region_prefix;
|
13490 + | let hardware_type = &mut context.hardware_type;
|
13491 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13492 + | let s3_e_ds = &mut context.s3_e_ds;
|
13493 + | let s3_e_fips = &mut context.s3_e_fips;
|
13494 + | let s3_e_auth = &mut context.s3_e_auth;
|
13495 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13496 + | let bucket_arn = &mut context.bucket_arn;
|
13497 + | let effective_arn_region = &mut context.effective_arn_region;
|
13498 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13499 + | let arn_type = &mut context.arn_type;
|
13500 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13501 + | let bucket_partition = &mut context.bucket_partition;
|
13502 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13503 + | let outpost_type = &mut context.outpost_type;
|
13504 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13505 + | let partition_resolver = &self.partition_resolver;
|
13506 + | (crate::endpoint_lib::coalesce::coalesce!(
|
13507 + | if let Some(inner) = crate::endpoint_lib::substring::substring(
|
13508 + | if let Some(param) = bucket { param } else { return false },
|
13509 + | 15,
|
13510 + | 17,
|
13511 + | true,
|
13512 + | _diagnostic_collector
|
13513 + | ) {
|
13514 + | inner
|
13515 + | } else {
|
13516 + | return false;
|
13517 + | },
|
13518 + | ""
|
13519 + | )) == ("--")
|
13520 + | })(&mut _diagnostic_collector),
|
13521 + | 52 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13522 + | let effective_std_region = &mut context.effective_std_region;
|
13523 + | let partition_result = &mut context.partition_result;
|
13524 + | let url = &mut context.url;
|
13525 + | let access_point_suffix = &mut context.access_point_suffix;
|
13526 + | let region_prefix = &mut context.region_prefix;
|
13527 + | let hardware_type = &mut context.hardware_type;
|
13528 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13529 + | let s3_e_ds = &mut context.s3_e_ds;
|
13530 + | let s3_e_fips = &mut context.s3_e_fips;
|
13531 + | let s3_e_auth = &mut context.s3_e_auth;
|
13532 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13533 + | let bucket_arn = &mut context.bucket_arn;
|
13534 + | let effective_arn_region = &mut context.effective_arn_region;
|
13535 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13536 + | let arn_type = &mut context.arn_type;
|
13537 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13538 + | let bucket_partition = &mut context.bucket_partition;
|
13539 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13540 + | let outpost_type = &mut context.outpost_type;
|
13541 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13542 + | let partition_resolver = &self.partition_resolver;
|
13543 + | (if let Some(inner) = bucket_arn { inner.service() } else { return false }) == ("s3-outposts")
|
13544 + | })(&mut _diagnostic_collector),
|
13545 + | 53 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13546 + | let effective_std_region = &mut context.effective_std_region;
|
13547 + | let partition_result = &mut context.partition_result;
|
13548 + | let url = &mut context.url;
|
13549 + | let access_point_suffix = &mut context.access_point_suffix;
|
13550 + | let region_prefix = &mut context.region_prefix;
|
13551 + | let hardware_type = &mut context.hardware_type;
|
13552 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13553 + | let s3_e_ds = &mut context.s3_e_ds;
|
13554 + | let s3_e_fips = &mut context.s3_e_fips;
|
13555 + | let s3_e_auth = &mut context.s3_e_auth;
|
13556 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13557 + | let bucket_arn = &mut context.bucket_arn;
|
13558 + | let effective_arn_region = &mut context.effective_arn_region;
|
13559 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13560 + | let arn_type = &mut context.arn_type;
|
13561 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13562 + | let bucket_partition = &mut context.bucket_partition;
|
13563 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13564 + | let outpost_type = &mut context.outpost_type;
|
13565 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13566 + | let partition_resolver = &self.partition_resolver;
|
13567 + | (crate::endpoint_lib::coalesce::coalesce!(*disable_access_points, false)) == (true)
|
13568 + | })(&mut _diagnostic_collector),
|
13569 + | 54 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13570 + | let effective_std_region = &mut context.effective_std_region;
|
13571 + | let partition_result = &mut context.partition_result;
|
13572 + | let url = &mut context.url;
|
13573 + | let access_point_suffix = &mut context.access_point_suffix;
|
13574 + | let region_prefix = &mut context.region_prefix;
|
13575 + | let hardware_type = &mut context.hardware_type;
|
13576 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13577 + | let s3_e_ds = &mut context.s3_e_ds;
|
13578 + | let s3_e_fips = &mut context.s3_e_fips;
|
13579 + | let s3_e_auth = &mut context.s3_e_auth;
|
13580 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13581 + | let bucket_arn = &mut context.bucket_arn;
|
13582 + | let effective_arn_region = &mut context.effective_arn_region;
|
13583 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13584 + | let arn_type = &mut context.arn_type;
|
13585 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13586 + | let bucket_partition = &mut context.bucket_partition;
|
13587 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13588 + | let outpost_type = &mut context.outpost_type;
|
13589 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13590 + | let partition_resolver = &self.partition_resolver;
|
13591 + | {
|
13592 + | *bucket_partition = partition_resolver
|
13593 + | .resolve_partition(
|
13594 + | if let Some(param) = effective_arn_region { param } else { return false },
|
13595 + | _diagnostic_collector,
|
13596 + | )
|
13597 + | .map(|inner| inner.into());
|
13598 + | bucket_partition.is_some()
|
13599 + | }
|
13600 + | })(&mut _diagnostic_collector),
|
13601 + | 55 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13602 + | let effective_std_region = &mut context.effective_std_region;
|
13603 + | let partition_result = &mut context.partition_result;
|
13604 + | let url = &mut context.url;
|
13605 + | let access_point_suffix = &mut context.access_point_suffix;
|
13606 + | let region_prefix = &mut context.region_prefix;
|
13607 + | let hardware_type = &mut context.hardware_type;
|
13608 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13609 + | let s3_e_ds = &mut context.s3_e_ds;
|
13610 + | let s3_e_fips = &mut context.s3_e_fips;
|
13611 + | let s3_e_auth = &mut context.s3_e_auth;
|
13612 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13613 + | let bucket_arn = &mut context.bucket_arn;
|
13614 + | let effective_arn_region = &mut context.effective_arn_region;
|
13615 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13616 + | let arn_type = &mut context.arn_type;
|
13617 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13618 + | let bucket_partition = &mut context.bucket_partition;
|
13619 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13620 + | let outpost_type = &mut context.outpost_type;
|
13621 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13622 + | let partition_resolver = &self.partition_resolver;
|
13623 + | (hardware_type) == &mut Some(("o".into()))
|
13624 + | })(&mut _diagnostic_collector),
|
13625 + | 56 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13626 + | let effective_std_region = &mut context.effective_std_region;
|
13627 + | let partition_result = &mut context.partition_result;
|
13628 + | let url = &mut context.url;
|
13629 + | let access_point_suffix = &mut context.access_point_suffix;
|
13630 + | let region_prefix = &mut context.region_prefix;
|
13631 + | let hardware_type = &mut context.hardware_type;
|
13632 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13633 + | let s3_e_ds = &mut context.s3_e_ds;
|
13634 + | let s3_e_fips = &mut context.s3_e_fips;
|
13635 + | let s3_e_auth = &mut context.s3_e_auth;
|
13636 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13637 + | let bucket_arn = &mut context.bucket_arn;
|
13638 + | let effective_arn_region = &mut context.effective_arn_region;
|
13639 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13640 + | let arn_type = &mut context.arn_type;
|
13641 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13642 + | let bucket_partition = &mut context.bucket_partition;
|
13643 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13644 + | let outpost_type = &mut context.outpost_type;
|
13645 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13646 + | let partition_resolver = &self.partition_resolver;
|
13647 + | if let Some(inner) = bucket_arn {
|
13648 + | inner.resource_id().get(4).cloned()
|
13649 + | } else {
|
13650 + | return false;
|
13651 + | }
|
13652 + | .is_some()
|
13653 + | })(&mut _diagnostic_collector),
|
13654 + | 57 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13655 + | let effective_std_region = &mut context.effective_std_region;
|
13656 + | let partition_result = &mut context.partition_result;
|
13657 + | let url = &mut context.url;
|
13658 + | let access_point_suffix = &mut context.access_point_suffix;
|
13659 + | let region_prefix = &mut context.region_prefix;
|
13660 + | let hardware_type = &mut context.hardware_type;
|
13661 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13662 + | let s3_e_ds = &mut context.s3_e_ds;
|
13663 + | let s3_e_fips = &mut context.s3_e_fips;
|
13664 + | let s3_e_auth = &mut context.s3_e_auth;
|
13665 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13666 + | let bucket_arn = &mut context.bucket_arn;
|
13667 + | let effective_arn_region = &mut context.effective_arn_region;
|
13668 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13669 + | let arn_type = &mut context.arn_type;
|
13670 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13671 + | let bucket_partition = &mut context.bucket_partition;
|
13672 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13673 + | let outpost_type = &mut context.outpost_type;
|
13674 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13675 + | let partition_resolver = &self.partition_resolver;
|
13676 + | {
|
13677 + | *outpost_id_ssa_1 = if let Some(inner) = bucket_arn {
|
13678 + | inner.resource_id().get(1).cloned()
|
13679 + | } else {
|
13680 + | return false;
|
13681 + | }
|
13682 + | .map(|inner| inner.into());
|
13683 + | outpost_id_ssa_1.is_some()
|
13684 + | }
|
13685 + | })(&mut _diagnostic_collector),
|
13686 + | 58 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13687 + | let effective_std_region = &mut context.effective_std_region;
|
13688 + | let partition_result = &mut context.partition_result;
|
13689 + | let url = &mut context.url;
|
13690 + | let access_point_suffix = &mut context.access_point_suffix;
|
13691 + | let region_prefix = &mut context.region_prefix;
|
13692 + | let hardware_type = &mut context.hardware_type;
|
13693 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13694 + | let s3_e_ds = &mut context.s3_e_ds;
|
13695 + | let s3_e_fips = &mut context.s3_e_fips;
|
13696 + | let s3_e_auth = &mut context.s3_e_auth;
|
13697 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13698 + | let bucket_arn = &mut context.bucket_arn;
|
13699 + | let effective_arn_region = &mut context.effective_arn_region;
|
13700 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13701 + | let arn_type = &mut context.arn_type;
|
13702 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13703 + | let bucket_partition = &mut context.bucket_partition;
|
13704 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13705 + | let outpost_type = &mut context.outpost_type;
|
13706 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13707 + | let partition_resolver = &self.partition_resolver;
|
13708 + | (crate::endpoint_lib::coalesce::coalesce!(*use_arn_region, true)) == (true)
|
13709 + | })(&mut _diagnostic_collector),
|
13710 + | 59 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13711 + | let effective_std_region = &mut context.effective_std_region;
|
13712 + | let partition_result = &mut context.partition_result;
|
13713 + | let url = &mut context.url;
|
13714 + | let access_point_suffix = &mut context.access_point_suffix;
|
13715 + | let region_prefix = &mut context.region_prefix;
|
13716 + | let hardware_type = &mut context.hardware_type;
|
13717 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13718 + | let s3_e_ds = &mut context.s3_e_ds;
|
13719 + | let s3_e_fips = &mut context.s3_e_fips;
|
13720 + | let s3_e_auth = &mut context.s3_e_auth;
|
13721 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13722 + | let bucket_arn = &mut context.bucket_arn;
|
13723 + | let effective_arn_region = &mut context.effective_arn_region;
|
13724 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13725 + | let arn_type = &mut context.arn_type;
|
13726 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13727 + | let bucket_partition = &mut context.bucket_partition;
|
13728 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13729 + | let outpost_type = &mut context.outpost_type;
|
13730 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13731 + | let partition_resolver = &self.partition_resolver;
|
13732 + | (effective_arn_region) == &mut Some((if let Some(inner) = bucket_arn { inner.region() } else { return false }.into()))
|
13733 + | })(&mut _diagnostic_collector),
|
13734 + | 60 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13735 + | let effective_std_region = &mut context.effective_std_region;
|
13736 + | let partition_result = &mut context.partition_result;
|
13737 + | let url = &mut context.url;
|
13738 + | let access_point_suffix = &mut context.access_point_suffix;
|
13739 + | let region_prefix = &mut context.region_prefix;
|
13740 + | let hardware_type = &mut context.hardware_type;
|
13741 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13742 + | let s3_e_ds = &mut context.s3_e_ds;
|
13743 + | let s3_e_fips = &mut context.s3_e_fips;
|
13744 + | let s3_e_auth = &mut context.s3_e_auth;
|
13745 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13746 + | let bucket_arn = &mut context.bucket_arn;
|
13747 + | let effective_arn_region = &mut context.effective_arn_region;
|
13748 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13749 + | let arn_type = &mut context.arn_type;
|
13750 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13751 + | let bucket_partition = &mut context.bucket_partition;
|
13752 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13753 + | let outpost_type = &mut context.outpost_type;
|
13754 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13755 + | let partition_resolver = &self.partition_resolver;
|
13756 + | (region) == &mut Some(("aws-global".into()))
|
13757 + | })(&mut _diagnostic_collector),
|
13758 + | 61 => (use_global_endpoint) == (&true),
|
13759 + | 62 => (disable_multi_region_access_points) == (&true),
|
13760 + | 63 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13761 + | let effective_std_region = &mut context.effective_std_region;
|
13762 + | let partition_result = &mut context.partition_result;
|
13763 + | let url = &mut context.url;
|
13764 + | let access_point_suffix = &mut context.access_point_suffix;
|
13765 + | let region_prefix = &mut context.region_prefix;
|
13766 + | let hardware_type = &mut context.hardware_type;
|
13767 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13768 + | let s3_e_ds = &mut context.s3_e_ds;
|
13769 + | let s3_e_fips = &mut context.s3_e_fips;
|
13770 + | let s3_e_auth = &mut context.s3_e_auth;
|
13771 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13772 + | let bucket_arn = &mut context.bucket_arn;
|
13773 + | let effective_arn_region = &mut context.effective_arn_region;
|
13774 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13775 + | let arn_type = &mut context.arn_type;
|
13776 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13777 + | let bucket_partition = &mut context.bucket_partition;
|
13778 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13779 + | let outpost_type = &mut context.outpost_type;
|
13780 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13781 + | let partition_resolver = &self.partition_resolver;
|
13782 + | (region) == &mut Some(("us-east-1".into()))
|
13783 + | })(&mut _diagnostic_collector),
|
13784 + | 64 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13785 + | let effective_std_region = &mut context.effective_std_region;
|
13786 + | let partition_result = &mut context.partition_result;
|
13787 + | let url = &mut context.url;
|
13788 + | let access_point_suffix = &mut context.access_point_suffix;
|
13789 + | let region_prefix = &mut context.region_prefix;
|
13790 + | let hardware_type = &mut context.hardware_type;
|
13791 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13792 + | let s3_e_ds = &mut context.s3_e_ds;
|
13793 + | let s3_e_fips = &mut context.s3_e_fips;
|
13794 + | let s3_e_auth = &mut context.s3_e_auth;
|
13795 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13796 + | let bucket_arn = &mut context.bucket_arn;
|
13797 + | let effective_arn_region = &mut context.effective_arn_region;
|
13798 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13799 + | let arn_type = &mut context.arn_type;
|
13800 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13801 + | let bucket_partition = &mut context.bucket_partition;
|
13802 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13803 + | let outpost_type = &mut context.outpost_type;
|
13804 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13805 + | let partition_resolver = &self.partition_resolver;
|
13806 + | crate::endpoint_lib::host::is_valid_host_label(
|
13807 + | if let Some(param) = outpost_id_ssa_1 { param } else { return false },
|
13808 + | false,
|
13809 + | _diagnostic_collector,
|
15057 13810 | )
|
13811 + | })(&mut _diagnostic_collector),
|
13812 + | 65 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13813 + | let effective_std_region = &mut context.effective_std_region;
|
13814 + | let partition_result = &mut context.partition_result;
|
13815 + | let url = &mut context.url;
|
13816 + | let access_point_suffix = &mut context.access_point_suffix;
|
13817 + | let region_prefix = &mut context.region_prefix;
|
13818 + | let hardware_type = &mut context.hardware_type;
|
13819 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13820 + | let s3_e_ds = &mut context.s3_e_ds;
|
13821 + | let s3_e_fips = &mut context.s3_e_fips;
|
13822 + | let s3_e_auth = &mut context.s3_e_auth;
|
13823 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13824 + | let bucket_arn = &mut context.bucket_arn;
|
13825 + | let effective_arn_region = &mut context.effective_arn_region;
|
13826 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13827 + | let arn_type = &mut context.arn_type;
|
13828 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13829 + | let bucket_partition = &mut context.bucket_partition;
|
13830 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13831 + | let outpost_type = &mut context.outpost_type;
|
13832 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13833 + | let partition_resolver = &self.partition_resolver;
|
13834 + | {
|
13835 + | *outpost_type = if let Some(inner) = bucket_arn {
|
13836 + | inner.resource_id().get(2).cloned()
|
13837 + | } else {
|
13838 + | return false;
|
15058 13839 | }
|
15059 - | Self::Result91 => {
|
15060 - | let effective_std_region = context
|
15061 - | .effective_std_region
|
15062 - | .as_ref()
|
15063 - | .map(|s| s.clone())
|
15064 - | .expect("Guaranteed to have a value by earlier checks.");
|
15065 - | let partition_result = context
|
15066 - | .partition_result
|
15067 - | .as_ref()
|
15068 - | .map(|s| s.clone())
|
15069 - | .expect("Guaranteed to have a value by earlier checks.");
|
15070 - | ::std::result::Result::Ok(
|
15071 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
15072 - | .url({
|
15073 - | let mut out = String::new();
|
15074 - | out.push_str("https://s3-fips.");
|
15075 - | #[allow(clippy::needless_borrow)]
|
15076 - | out.push_str(&effective_std_region.as_ref());
|
15077 - | out.push('.');
|
15078 - | #[allow(clippy::needless_borrow)]
|
15079 - | out.push_str(&partition_result.dns_suffix());
|
15080 - | out
|
13840 + | .map(|inner| inner.into());
|
13841 + | outpost_type.is_some()
|
13842 + | }
|
13843 + | })(&mut _diagnostic_collector),
|
13844 + | 66 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13845 + | let effective_std_region = &mut context.effective_std_region;
|
13846 + | let partition_result = &mut context.partition_result;
|
13847 + | let url = &mut context.url;
|
13848 + | let access_point_suffix = &mut context.access_point_suffix;
|
13849 + | let region_prefix = &mut context.region_prefix;
|
13850 + | let hardware_type = &mut context.hardware_type;
|
13851 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13852 + | let s3_e_ds = &mut context.s3_e_ds;
|
13853 + | let s3_e_fips = &mut context.s3_e_fips;
|
13854 + | let s3_e_auth = &mut context.s3_e_auth;
|
13855 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13856 + | let bucket_arn = &mut context.bucket_arn;
|
13857 + | let effective_arn_region = &mut context.effective_arn_region;
|
13858 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13859 + | let arn_type = &mut context.arn_type;
|
13860 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13861 + | let bucket_partition = &mut context.bucket_partition;
|
13862 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13863 + | let outpost_type = &mut context.outpost_type;
|
13864 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13865 + | let partition_resolver = &self.partition_resolver;
|
13866 + | (if let Some(inner) = bucket_partition {
|
13867 + | inner.name()
|
13868 + | } else {
|
13869 + | return false;
|
13870 + | }) == (if let Some(inner) = partition_result {
|
13871 + | inner.name()
|
13872 + | } else {
|
13873 + | return false;
|
15081 13874 | })
|
15082 - | .property(
|
15083 - | "authSchemes",
|
15084 - | vec![::aws_smithy_types::Document::from({
|
15085 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
15086 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
15087 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
15088 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
15089 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
15090 - | out
|
15091 - | })],
|
13875 + | })(&mut _diagnostic_collector),
|
13876 + | 67 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13877 + | let effective_std_region = &mut context.effective_std_region;
|
13878 + | let partition_result = &mut context.partition_result;
|
13879 + | let url = &mut context.url;
|
13880 + | let access_point_suffix = &mut context.access_point_suffix;
|
13881 + | let region_prefix = &mut context.region_prefix;
|
13882 + | let hardware_type = &mut context.hardware_type;
|
13883 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13884 + | let s3_e_ds = &mut context.s3_e_ds;
|
13885 + | let s3_e_fips = &mut context.s3_e_fips;
|
13886 + | let s3_e_auth = &mut context.s3_e_auth;
|
13887 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13888 + | let bucket_arn = &mut context.bucket_arn;
|
13889 + | let effective_arn_region = &mut context.effective_arn_region;
|
13890 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13891 + | let arn_type = &mut context.arn_type;
|
13892 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13893 + | let bucket_partition = &mut context.bucket_partition;
|
13894 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13895 + | let outpost_type = &mut context.outpost_type;
|
13896 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13897 + | let partition_resolver = &self.partition_resolver;
|
13898 + | crate::endpoint_lib::host::is_valid_host_label(
|
13899 + | if let Some(param) = effective_arn_region { param } else { return false },
|
13900 + | true,
|
13901 + | _diagnostic_collector,
|
13902 + | )
|
13903 + | })(&mut _diagnostic_collector),
|
13904 + | 68 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13905 + | let effective_std_region = &mut context.effective_std_region;
|
13906 + | let partition_result = &mut context.partition_result;
|
13907 + | let url = &mut context.url;
|
13908 + | let access_point_suffix = &mut context.access_point_suffix;
|
13909 + | let region_prefix = &mut context.region_prefix;
|
13910 + | let hardware_type = &mut context.hardware_type;
|
13911 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13912 + | let s3_e_ds = &mut context.s3_e_ds;
|
13913 + | let s3_e_fips = &mut context.s3_e_fips;
|
13914 + | let s3_e_auth = &mut context.s3_e_auth;
|
13915 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13916 + | let bucket_arn = &mut context.bucket_arn;
|
13917 + | let effective_arn_region = &mut context.effective_arn_region;
|
13918 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13919 + | let arn_type = &mut context.arn_type;
|
13920 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13921 + | let bucket_partition = &mut context.bucket_partition;
|
13922 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13923 + | let outpost_type = &mut context.outpost_type;
|
13924 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13925 + | let partition_resolver = &self.partition_resolver;
|
13926 + | (if let Some(inner) = bucket_arn { inner.service() } else { return false }) == ("s3")
|
13927 + | })(&mut _diagnostic_collector),
|
13928 + | 69 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13929 + | let effective_std_region = &mut context.effective_std_region;
|
13930 + | let partition_result = &mut context.partition_result;
|
13931 + | let url = &mut context.url;
|
13932 + | let access_point_suffix = &mut context.access_point_suffix;
|
13933 + | let region_prefix = &mut context.region_prefix;
|
13934 + | let hardware_type = &mut context.hardware_type;
|
13935 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13936 + | let s3_e_ds = &mut context.s3_e_ds;
|
13937 + | let s3_e_fips = &mut context.s3_e_fips;
|
13938 + | let s3_e_auth = &mut context.s3_e_auth;
|
13939 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13940 + | let bucket_arn = &mut context.bucket_arn;
|
13941 + | let effective_arn_region = &mut context.effective_arn_region;
|
13942 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13943 + | let arn_type = &mut context.arn_type;
|
13944 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13945 + | let bucket_partition = &mut context.bucket_partition;
|
13946 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13947 + | let outpost_type = &mut context.outpost_type;
|
13948 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13949 + | let partition_resolver = &self.partition_resolver;
|
13950 + | (if let Some(inner) = bucket_arn {
|
13951 + | inner.account_id()
|
13952 + | } else {
|
13953 + | return false;
|
13954 + | }) == ("")
|
13955 + | })(&mut _diagnostic_collector),
|
13956 + | 70 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13957 + | let effective_std_region = &mut context.effective_std_region;
|
13958 + | let partition_result = &mut context.partition_result;
|
13959 + | let url = &mut context.url;
|
13960 + | let access_point_suffix = &mut context.access_point_suffix;
|
13961 + | let region_prefix = &mut context.region_prefix;
|
13962 + | let hardware_type = &mut context.hardware_type;
|
13963 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13964 + | let s3_e_ds = &mut context.s3_e_ds;
|
13965 + | let s3_e_fips = &mut context.s3_e_fips;
|
13966 + | let s3_e_auth = &mut context.s3_e_auth;
|
13967 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
13968 + | let bucket_arn = &mut context.bucket_arn;
|
13969 + | let effective_arn_region = &mut context.effective_arn_region;
|
13970 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
13971 + | let arn_type = &mut context.arn_type;
|
13972 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
13973 + | let bucket_partition = &mut context.bucket_partition;
|
13974 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
13975 + | let outpost_type = &mut context.outpost_type;
|
13976 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
13977 + | let partition_resolver = &self.partition_resolver;
|
13978 + | crate::endpoint_lib::host::is_valid_host_label(
|
13979 + | if let Some(inner) = bucket_arn {
|
13980 + | inner.account_id()
|
13981 + | } else {
|
13982 + | return false;
|
13983 + | },
|
13984 + | false,
|
13985 + | _diagnostic_collector,
|
15092 13986 | )
|
15093 - | .build(),
|
13987 + | })(&mut _diagnostic_collector),
|
13988 + | 71 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
13989 + | let effective_std_region = &mut context.effective_std_region;
|
13990 + | let partition_result = &mut context.partition_result;
|
13991 + | let url = &mut context.url;
|
13992 + | let access_point_suffix = &mut context.access_point_suffix;
|
13993 + | let region_prefix = &mut context.region_prefix;
|
13994 + | let hardware_type = &mut context.hardware_type;
|
13995 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
13996 + | let s3_e_ds = &mut context.s3_e_ds;
|
13997 + | let s3_e_fips = &mut context.s3_e_fips;
|
13998 + | let s3_e_auth = &mut context.s3_e_auth;
|
13999 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
14000 + | let bucket_arn = &mut context.bucket_arn;
|
14001 + | let effective_arn_region = &mut context.effective_arn_region;
|
14002 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
14003 + | let arn_type = &mut context.arn_type;
|
14004 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
14005 + | let bucket_partition = &mut context.bucket_partition;
|
14006 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
14007 + | let outpost_type = &mut context.outpost_type;
|
14008 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
14009 + | let partition_resolver = &self.partition_resolver;
|
14010 + | crate::endpoint_lib::host::is_valid_host_label(
|
14011 + | if let Some(param) = access_point_name_ssa_1 {
|
14012 + | param
|
14013 + | } else {
|
14014 + | return false;
|
14015 + | },
|
14016 + | false,
|
14017 + | _diagnostic_collector,
|
15094 14018 | )
|
14019 + | })(&mut _diagnostic_collector),
|
14020 + | 72 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
14021 + | let effective_std_region = &mut context.effective_std_region;
|
14022 + | let partition_result = &mut context.partition_result;
|
14023 + | let url = &mut context.url;
|
14024 + | let access_point_suffix = &mut context.access_point_suffix;
|
14025 + | let region_prefix = &mut context.region_prefix;
|
14026 + | let hardware_type = &mut context.hardware_type;
|
14027 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
14028 + | let s3_e_ds = &mut context.s3_e_ds;
|
14029 + | let s3_e_fips = &mut context.s3_e_fips;
|
14030 + | let s3_e_auth = &mut context.s3_e_auth;
|
14031 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
14032 + | let bucket_arn = &mut context.bucket_arn;
|
14033 + | let effective_arn_region = &mut context.effective_arn_region;
|
14034 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
14035 + | let arn_type = &mut context.arn_type;
|
14036 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
14037 + | let bucket_partition = &mut context.bucket_partition;
|
14038 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
14039 + | let outpost_type = &mut context.outpost_type;
|
14040 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
14041 + | let partition_resolver = &self.partition_resolver;
|
14042 + | {
|
14043 + | *access_point_name_ssa_2 = if let Some(inner) = bucket_arn {
|
14044 + | inner.resource_id().get(3).cloned()
|
14045 + | } else {
|
14046 + | return false;
|
15095 14047 | }
|
15096 - | Self::Result92 => {
|
15097 - | let effective_std_region = context
|
15098 - | .effective_std_region
|
15099 - | .as_ref()
|
15100 - | .map(|s| s.clone())
|
15101 - | .expect("Guaranteed to have a value by earlier checks.");
|
15102 - | let partition_result = context
|
15103 - | .partition_result
|
15104 - | .as_ref()
|
15105 - | .map(|s| s.clone())
|
15106 - | .expect("Guaranteed to have a value by earlier checks.");
|
15107 - | ::std::result::Result::Ok(
|
15108 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
15109 - | .url({
|
15110 - | let mut out = String::new();
|
15111 - | out.push_str("https://s3.dualstack.");
|
15112 - | #[allow(clippy::needless_borrow)]
|
15113 - | out.push_str(&effective_std_region.as_ref());
|
15114 - | out.push('.');
|
15115 - | #[allow(clippy::needless_borrow)]
|
15116 - | out.push_str(&partition_result.dns_suffix());
|
15117 - | out
|
15118 - | })
|
15119 - | .property(
|
15120 - | "authSchemes",
|
15121 - | vec![::aws_smithy_types::Document::from({
|
15122 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
15123 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
15124 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
15125 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
15126 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
15127 - | out
|
15128 - | })],
|
15129 - | )
|
15130 - | .build(),
|
15131 - | )
|
14048 + | .map(|inner| inner.into());
|
14049 + | access_point_name_ssa_2.is_some()
|
15132 14050 | }
|
15133 - | Self::Result93 => {
|
15134 - | let effective_std_region = context
|
15135 - | .effective_std_region
|
15136 - | .as_ref()
|
15137 - | .map(|s| s.clone())
|
15138 - | .expect("Guaranteed to have a value by earlier checks.");
|
15139 - | let url = context
|
15140 - | .url
|
15141 - | .as_ref()
|
15142 - | .map(|s| s.clone())
|
15143 - | .expect("Guaranteed to have a value by earlier checks.");
|
15144 - | ::std::result::Result::Ok(
|
15145 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
15146 - | .url({
|
15147 - | let mut out = String::new();
|
15148 - | #[allow(clippy::needless_borrow)]
|
15149 - | out.push_str(&url.scheme());
|
15150 - | out.push_str("://");
|
15151 - | #[allow(clippy::needless_borrow)]
|
15152 - | out.push_str(&url.authority());
|
15153 - | #[allow(clippy::needless_borrow)]
|
15154 - | out.push_str(&url.path());
|
15155 - | out
|
15156 - | })
|
15157 - | .property(
|
15158 - | "authSchemes",
|
15159 - | vec![::aws_smithy_types::Document::from({
|
15160 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
15161 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
15162 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
15163 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
15164 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
15165 - | out
|
15166 - | })],
|
15167 - | )
|
15168 - | .build(),
|
14051 + | })(&mut _diagnostic_collector),
|
14052 + | 73 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
14053 + | let effective_std_region = &mut context.effective_std_region;
|
14054 + | let partition_result = &mut context.partition_result;
|
14055 + | let url = &mut context.url;
|
14056 + | let access_point_suffix = &mut context.access_point_suffix;
|
14057 + | let region_prefix = &mut context.region_prefix;
|
14058 + | let hardware_type = &mut context.hardware_type;
|
14059 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
14060 + | let s3_e_ds = &mut context.s3_e_ds;
|
14061 + | let s3_e_fips = &mut context.s3_e_fips;
|
14062 + | let s3_e_auth = &mut context.s3_e_auth;
|
14063 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
14064 + | let bucket_arn = &mut context.bucket_arn;
|
14065 + | let effective_arn_region = &mut context.effective_arn_region;
|
14066 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
14067 + | let arn_type = &mut context.arn_type;
|
14068 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
14069 + | let bucket_partition = &mut context.bucket_partition;
|
14070 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
14071 + | let outpost_type = &mut context.outpost_type;
|
14072 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
14073 + | let partition_resolver = &self.partition_resolver;
|
14074 + | crate::endpoint_lib::host::is_valid_host_label(
|
14075 + | if let Some(param) = access_point_name_ssa_1 {
|
14076 + | param
|
14077 + | } else {
|
14078 + | return false;
|
14079 + | },
|
14080 + | true,
|
14081 + | _diagnostic_collector,
|
15169 14082 | )
|
15170 - | }
|
15171 - | Self::Result94 => {
|
15172 - | let effective_std_region = context
|
15173 - | .effective_std_region
|
15174 - | .as_ref()
|
15175 - | .map(|s| s.clone())
|
15176 - | .expect("Guaranteed to have a value by earlier checks.");
|
15177 - | let partition_result = context
|
15178 - | .partition_result
|
15179 - | .as_ref()
|
15180 - | .map(|s| s.clone())
|
15181 - | .expect("Guaranteed to have a value by earlier checks.");
|
15182 - | ::std::result::Result::Ok(
|
15183 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
15184 - | .url({
|
15185 - | let mut out = String::new();
|
15186 - | out.push_str("https://s3.");
|
15187 - | #[allow(clippy::needless_borrow)]
|
15188 - | out.push_str(&partition_result.dns_suffix());
|
15189 - | out
|
14083 + | })(&mut _diagnostic_collector),
|
14084 + | 74 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
14085 + | let effective_std_region = &mut context.effective_std_region;
|
14086 + | let partition_result = &mut context.partition_result;
|
14087 + | let url = &mut context.url;
|
14088 + | let access_point_suffix = &mut context.access_point_suffix;
|
14089 + | let region_prefix = &mut context.region_prefix;
|
14090 + | let hardware_type = &mut context.hardware_type;
|
14091 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
14092 + | let s3_e_ds = &mut context.s3_e_ds;
|
14093 + | let s3_e_fips = &mut context.s3_e_fips;
|
14094 + | let s3_e_auth = &mut context.s3_e_auth;
|
14095 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
14096 + | let bucket_arn = &mut context.bucket_arn;
|
14097 + | let effective_arn_region = &mut context.effective_arn_region;
|
14098 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
14099 + | let arn_type = &mut context.arn_type;
|
14100 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
14101 + | let bucket_partition = &mut context.bucket_partition;
|
14102 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
14103 + | let outpost_type = &mut context.outpost_type;
|
14104 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
14105 + | let partition_resolver = &self.partition_resolver;
|
14106 + | (if let Some(inner) = bucket_arn { inner.partition() } else { return false })
|
14107 + | == (if let Some(inner) = partition_result {
|
14108 + | inner.name()
|
14109 + | } else {
|
14110 + | return false;
|
15190 14111 | })
|
15191 - | .property(
|
15192 - | "authSchemes",
|
15193 - | vec![::aws_smithy_types::Document::from({
|
15194 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
15195 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
15196 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
15197 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
15198 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
15199 - | out
|
15200 - | })],
|
15201 - | )
|
15202 - | .build(),
|
15203 - | )
|
14112 + | })(&mut _diagnostic_collector),
|
14113 + | 75 => (|_diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector| -> bool {
|
14114 + | let effective_std_region = &mut context.effective_std_region;
|
14115 + | let partition_result = &mut context.partition_result;
|
14116 + | let url = &mut context.url;
|
14117 + | let access_point_suffix = &mut context.access_point_suffix;
|
14118 + | let region_prefix = &mut context.region_prefix;
|
14119 + | let hardware_type = &mut context.hardware_type;
|
14120 + | let outpost_id_ssa_2 = &mut context.outpost_id_ssa_2;
|
14121 + | let s3_e_ds = &mut context.s3_e_ds;
|
14122 + | let s3_e_fips = &mut context.s3_e_fips;
|
14123 + | let s3_e_auth = &mut context.s3_e_auth;
|
14124 + | let s3express_availability_zone_id = &mut context.s3express_availability_zone_id;
|
14125 + | let bucket_arn = &mut context.bucket_arn;
|
14126 + | let effective_arn_region = &mut context.effective_arn_region;
|
14127 + | let uri_encoded_bucket = &mut context.uri_encoded_bucket;
|
14128 + | let arn_type = &mut context.arn_type;
|
14129 + | let access_point_name_ssa_1 = &mut context.access_point_name_ssa_1;
|
14130 + | let bucket_partition = &mut context.bucket_partition;
|
14131 + | let outpost_id_ssa_1 = &mut context.outpost_id_ssa_1;
|
14132 + | let outpost_type = &mut context.outpost_type;
|
14133 + | let access_point_name_ssa_2 = &mut context.access_point_name_ssa_2;
|
14134 + | let partition_resolver = &self.partition_resolver;
|
14135 + | (outpost_type) == &mut Some(("accesspoint".into()))
|
14136 + | })(&mut _diagnostic_collector),
|
14137 + | _ => unreachable!("Invalid condition index"),
|
14138 + | };
|
14139 + | current_ref = if is_complement ^ condition_result { node.high_ref } else { node.low_ref };
|
15204 14140 | }
|
15205 - | Self::Result95 => {
|
15206 - | let effective_std_region = context
|
15207 - | .effective_std_region
|
15208 - | .as_ref()
|
15209 - | .map(|s| s.clone())
|
15210 - | .expect("Guaranteed to have a value by earlier checks.");
|
15211 - | let partition_result = context
|
15212 - | .partition_result
|
15213 - | .as_ref()
|
15214 - | .map(|s| s.clone())
|
15215 - | .expect("Guaranteed to have a value by earlier checks.");
|
15216 - | ::std::result::Result::Ok(
|
15217 - | ::aws_smithy_types::endpoint::Endpoint::builder()
|
15218 - | .url({
|
15219 - | let mut out = String::new();
|
15220 - | out.push_str("https://s3.");
|
15221 - | #[allow(clippy::needless_borrow)]
|
15222 - | out.push_str(&effective_std_region.as_ref());
|
15223 - | out.push('.');
|
15224 - | #[allow(clippy::needless_borrow)]
|
15225 - | out.push_str(&partition_result.dns_suffix());
|
15226 - | out
|
15227 - | })
|
15228 - | .property(
|
15229 - | "authSchemes",
|
15230 - | vec![::aws_smithy_types::Document::from({
|
15231 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
15232 - | out.insert("disableDoubleEncoding".to_string(), true.into());
|
15233 - | out.insert("name".to_string(), "sigv4".to_string().into());
|
15234 - | out.insert("signingName".to_string(), "s3".to_string().into());
|
15235 - | out.insert("signingRegion".to_string(), effective_std_region.to_owned().into());
|
15236 - | out
|
15237 - | })],
|
15238 - | )
|
15239 - | .build(),
|
15240 - | )
|
15241 14141 | }
|
15242 - | Self::Result96 => ::std::result::Result::Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
15243 - | "A region must be set when sending requests to S3.".to_string(),
|
15244 - | )),
|
15245 14142 | }
|
15246 14143 | }
|
15247 14144 | }
|
15248 14145 |
|
15249 - | const RESULTS: [ResultEndpoint; 97] = [
|
15250 - | ResultEndpoint::Result0,
|
15251 - | ResultEndpoint::Result1,
|
15252 - | ResultEndpoint::Result2,
|
15253 - | ResultEndpoint::Result3,
|
15254 - | ResultEndpoint::Result4,
|
15255 - | ResultEndpoint::Result5,
|
15256 - | ResultEndpoint::Result6,
|
15257 - | ResultEndpoint::Result7,
|
15258 - | ResultEndpoint::Result8,
|
15259 - | ResultEndpoint::Result9,
|
15260 - | ResultEndpoint::Result10,
|
15261 - | ResultEndpoint::Result11,
|
15262 - | ResultEndpoint::Result12,
|
15263 - | ResultEndpoint::Result13,
|
15264 - | ResultEndpoint::Result14,
|
15265 - | ResultEndpoint::Result15,
|
15266 - | ResultEndpoint::Result16,
|
15267 - | ResultEndpoint::Result17,
|
15268 - | ResultEndpoint::Result18,
|
15269 - | ResultEndpoint::Result19,
|
15270 - | ResultEndpoint::Result20,
|
15271 - | ResultEndpoint::Result21,
|
15272 - | ResultEndpoint::Result22,
|
15273 - | ResultEndpoint::Result23,
|
15274 - | ResultEndpoint::Result24,
|
15275 - | ResultEndpoint::Result25,
|
15276 - | ResultEndpoint::Result26,
|
15277 - | ResultEndpoint::Result27,
|
15278 - | ResultEndpoint::Result28,
|
15279 - | ResultEndpoint::Result29,
|
15280 - | ResultEndpoint::Result30,
|
15281 - | ResultEndpoint::Result31,
|
15282 - | ResultEndpoint::Result32,
|
15283 - | ResultEndpoint::Result33,
|
15284 - | ResultEndpoint::Result34,
|
15285 - | ResultEndpoint::Result35,
|
15286 - | ResultEndpoint::Result36,
|
15287 - | ResultEndpoint::Result37,
|
15288 - | ResultEndpoint::Result38,
|
15289 - | ResultEndpoint::Result39,
|
15290 - | ResultEndpoint::Result40,
|
15291 - | ResultEndpoint::Result41,
|
15292 - | ResultEndpoint::Result42,
|
15293 - | ResultEndpoint::Result43,
|
15294 - | ResultEndpoint::Result44,
|
15295 - | ResultEndpoint::Result45,
|
15296 - | ResultEndpoint::Result46,
|
15297 - | ResultEndpoint::Result47,
|
15298 - | ResultEndpoint::Result48,
|
15299 - | ResultEndpoint::Result49,
|
15300 - | ResultEndpoint::Result50,
|
15301 - | ResultEndpoint::Result51,
|
15302 - | ResultEndpoint::Result52,
|
15303 - | ResultEndpoint::Result53,
|
15304 - | ResultEndpoint::Result54,
|
15305 - | ResultEndpoint::Result55,
|
15306 - | ResultEndpoint::Result56,
|
15307 - | ResultEndpoint::Result57,
|
15308 - | ResultEndpoint::Result58,
|
15309 - | ResultEndpoint::Result59,
|
15310 - | ResultEndpoint::Result60,
|
15311 - | ResultEndpoint::Result61,
|
15312 - | ResultEndpoint::Result62,
|
15313 - | ResultEndpoint::Result63,
|
15314 - | ResultEndpoint::Result64,
|
15315 - | ResultEndpoint::Result65,
|
15316 - | ResultEndpoint::Result66,
|
15317 - | ResultEndpoint::Result67,
|
15318 - | ResultEndpoint::Result68,
|
15319 - | ResultEndpoint::Result69,
|
15320 - | ResultEndpoint::Result70,
|
15321 - | ResultEndpoint::Result71,
|
15322 - | ResultEndpoint::Result72,
|
15323 - | ResultEndpoint::Result73,
|
15324 - | ResultEndpoint::Result74,
|
15325 - | ResultEndpoint::Result75,
|
15326 - | ResultEndpoint::Result76,
|
15327 - | ResultEndpoint::Result77,
|
15328 - | ResultEndpoint::Result78,
|
15329 - | ResultEndpoint::Result79,
|
15330 - | ResultEndpoint::Result80,
|
15331 - | ResultEndpoint::Result81,
|
15332 - | ResultEndpoint::Result82,
|
15333 - | ResultEndpoint::Result83,
|
15334 - | ResultEndpoint::Result84,
|
15335 - | ResultEndpoint::Result85,
|
15336 - | ResultEndpoint::Result86,
|
15337 - | ResultEndpoint::Result87,
|
15338 - | ResultEndpoint::Result88,
|
15339 - | ResultEndpoint::Result89,
|
15340 - | ResultEndpoint::Result90,
|
15341 - | ResultEndpoint::Result91,
|
15342 - | ResultEndpoint::Result92,
|
15343 - | ResultEndpoint::Result93,
|
15344 - | ResultEndpoint::Result94,
|
15345 - | ResultEndpoint::Result95,
|
15346 - | ResultEndpoint::Result96,
|
15347 - | ];
|
14146 + | impl crate::config::endpoint::ResolveEndpoint for DefaultResolver {
|
14147 + | fn resolve_endpoint<'a>(&'a self, params: &'a crate::config::endpoint::Params) -> ::aws_smithy_runtime_api::client::endpoint::EndpointFuture<'a> {
|
14148 + | // Check single-entry cache
|
14149 + | if let Some((cached_params, cached_endpoint)) = &*self.endpoint_cache.lock().expect("endpoint cache lock poisoned") {
|
14150 + | if cached_params == params {
|
14151 + | return ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(::std::result::Result::Ok(cached_endpoint.clone()));
|
14152 + | }
|
14153 + | }
|
14154 + | let result = self.resolve_endpoint(params);
|
14155 + | if let ::std::result::Result::Ok(ref endpoint) = result {
|
14156 + | *self.endpoint_cache.lock().expect("endpoint cache lock poisoned") = Some((params.clone(), endpoint.clone()));
|
14157 + | }
|
14158 + | ::aws_smithy_runtime_api::client::endpoint::EndpointFuture::ready(result)
|
14159 + | }
|
14160 + | }
|
15348 14161 | const NODES: [crate::endpoint_lib::bdd_interpreter::BddNode; 521] = [
|
15349 14162 | crate::endpoint_lib::bdd_interpreter::BddNode {
|
15350 14163 | condition_index: -1,
|
15351 14164 | high_ref: 1,
|
15352 14165 | low_ref: -1,
|
15353 14166 | },
|
15354 14167 | crate::endpoint_lib::bdd_interpreter::BddNode {
|
15355 14168 | condition_index: 5,
|
15356 14169 | high_ref: 100000002,
|
15357 14170 | low_ref: 100000004,
|