1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482
// =================================================================
//
// * WARNING *
//
// This file is generated!
//
// Changes made to this file will be overwritten. If changes are
// required to the generated code, the service_crategen project
// must be updated to generate the changes.
//
// =================================================================
use std::error::Error;
use std::fmt;
use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};
use serde_json;
/// <p>Provides a description of an EFS file system access point.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct AccessPointDescription {
/// <p>The unique Amazon Resource Name (ARN) associated with the access point.</p>
#[serde(rename = "AccessPointArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_point_arn: Option<String>,
/// <p>The ID of the access point, assigned by Amazon EFS.</p>
#[serde(rename = "AccessPointId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_point_id: Option<String>,
/// <p>The opaque string specified in the request to ensure idempotent creation.</p>
#[serde(rename = "ClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
/// <p>The ID of the EFS file system that the access point applies to.</p>
#[serde(rename = "FileSystemId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_system_id: Option<String>,
/// <p>Identifies the lifecycle phase of the access point.</p>
#[serde(rename = "LifeCycleState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub life_cycle_state: Option<String>,
/// <p>The name of the access point. This is the value of the <code>Name</code> tag.</p>
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// <p>Identified the AWS account that owns the access point resource.</p>
#[serde(rename = "OwnerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
/// <p>The full POSIX identity, including the user ID, group ID, and secondary group IDs on the access point that is used for all file operations by NFS clients using the access point.</p>
#[serde(rename = "PosixUser")]
#[serde(skip_serializing_if = "Option::is_none")]
pub posix_user: Option<PosixUser>,
/// <p>The directory on the Amazon EFS file system that the access point exposes as the root directory to NFS clients using the access point.</p>
#[serde(rename = "RootDirectory")]
#[serde(skip_serializing_if = "Option::is_none")]
pub root_directory: Option<RootDirectory>,
/// <p>The tags associated with the access point, presented as an array of Tag objects.</p>
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
/// <p>The backup policy for the file system used to create automatic daily backups. If status has a value of <code>ENABLED</code>, the file system is being automatically backed up. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups">Automatic backups</a>.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct BackupPolicy {
/// <p><p>Describes the status of the file system's backup policy.</p> <ul> <li> <p> <b> <code>ENABLED</code> </b> - EFS is automatically backing up the file system.</p> </li> <li> <p> <b> <code>ENABLING</code> </b> - EFS is turning on automatic backups for the file system.</p> </li> <li> <p> <b> <code>DISABLED</code> </b> - automatic back ups are turned off for the file system.</p> </li> <li> <p> <b> <code>DISABLING</code> </b> - EFS is turning off automatic backups for the file system.</p> </li> </ul></p>
#[serde(rename = "Status")]
pub status: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BackupPolicyDescription {
/// <p>Describes the file system's backup policy, indicating whether automatic backups are turned on or off..</p>
#[serde(rename = "BackupPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub backup_policy: Option<BackupPolicy>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateAccessPointRequest {
/// <p>A string of up to 64 ASCII characters that Amazon EFS uses to ensure idempotent creation.</p>
#[serde(rename = "ClientToken")]
pub client_token: String,
/// <p>The ID of the EFS file system that the access point provides access to.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>The operating system user and group applied to all file system requests made using the access point.</p>
#[serde(rename = "PosixUser")]
#[serde(skip_serializing_if = "Option::is_none")]
pub posix_user: Option<PosixUser>,
/// <p>Specifies the directory on the Amazon EFS file system that the access point exposes as the root directory of your file system to NFS clients using the access point. The clients using the access point can only access the root directory and below. If the <code>RootDirectory</code> > <code>Path</code> specified does not exist, EFS creates it and applies the <code>CreationInfo</code> settings when a client connects to an access point. When specifying a <code>RootDirectory</code>, you need to provide the <code>Path</code>, and the <code>CreationInfo</code>.</p> <p>Amazon EFS creates a root directory only if you have provided the CreationInfo: OwnUid, OwnGID, and permissions for the directory. If you do not provide this information, Amazon EFS does not create the root directory. If the root directory does not exist, attempts to mount using the access point will fail.</p>
#[serde(rename = "RootDirectory")]
#[serde(skip_serializing_if = "Option::is_none")]
pub root_directory: Option<RootDirectory>,
/// <p>Creates tags associated with the access point. Each tag is a key-value pair.</p>
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateFileSystemRequest {
/// <p><p>Used to create a file system that uses One Zone storage classes. It specifies the AWS Availability Zone in which to create the file system. Use the format <code>us-east-1a</code> to specify the Availability Zone. For more information about One Zone storage classes, see <a href="https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html">Using EFS storage classes</a> in the <i>Amazon EFS User Guide</i>.</p> <note> <p>One Zone storage classes are not available in all Availability Zones in AWS Regions where Amazon EFS is available.</p> </note></p>
#[serde(rename = "AvailabilityZoneName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone_name: Option<String>,
/// <p><p>Specifies whether automatic backups are enabled on the file system that you are creating. Set the value to <code>true</code> to enable automatic backups. If you are creating a file system that uses One Zone storage classes, automatic backups are enabled by default. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups">Automatic backups</a> in the <i>Amazon EFS User Guide</i>.</p> <p>Default is <code>false</code>. However, if you specify an <code>AvailabilityZoneName</code>, the default is <code>true</code>.</p> <note> <p>AWS Backup is not available in all AWS Regions where Amazon EFS is available.</p> </note></p>
#[serde(rename = "Backup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub backup: Option<bool>,
/// <p>A string of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent creation.</p>
#[serde(rename = "CreationToken")]
pub creation_token: String,
/// <p>A Boolean value that, if true, creates an encrypted file system. When creating an encrypted file system, you have the option of specifying <a>CreateFileSystemRequest$KmsKeyId</a> for an existing AWS Key Management Service (AWS KMS) customer master key (CMK). If you don't specify a CMK, then the default CMK for Amazon EFS, <code>/aws/elasticfilesystem</code>, is used to protect the encrypted file system. </p>
#[serde(rename = "Encrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
/// <p><p>The ID of the AWS KMS CMK that you want to use to protect the encrypted file system. This parameter is only required if you want to use a non-default KMS key. If this parameter is not specified, the default CMK for Amazon EFS is used. This ID can be in one of the following formats:</p> <ul> <li> <p>Key ID - A unique identifier of the key, for example <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p> </li> <li> <p>ARN - An Amazon Resource Name (ARN) for the key, for example <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p> </li> <li> <p>Key alias - A previously created display name for a key, for example <code>alias/projectKey1</code>.</p> </li> <li> <p>Key alias ARN - An ARN for a key alias, for example <code>arn:aws:kms:us-west-2:444455556666:alias/projectKey1</code>.</p> </li> </ul> <p>If <code>KmsKeyId</code> is specified, the <a>CreateFileSystemRequest$Encrypted</a> parameter must be set to true.</p> <important> <p>EFS accepts only symmetric KMS keys. You cannot use asymmetric KMS keys with EFS file systems.</p> </important></p>
#[serde(rename = "KmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
/// <p><p>The performance mode of the file system. We recommend <code>generalPurpose</code> performance mode for most file systems. File systems using the <code>maxIO</code> performance mode can scale to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for most file operations. The performance mode can't be changed after the file system has been created.</p> <note> <p>The <code>maxIO</code> mode is not supported on file systems using One Zone storage classes.</p> </note></p>
#[serde(rename = "PerformanceMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub performance_mode: Option<String>,
/// <p>The throughput, measured in MiB/s, that you want to provision for a file system that you're creating. Valid values are 1-1024. Required if <code>ThroughputMode</code> is set to <code>provisioned</code>. The upper limit for throughput is 1024 MiB/s. To increase this limit, contact AWS Support. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits">Amazon EFS quotas that you can increase</a> in the <i>Amazon EFS User Guide</i>.</p>
#[serde(rename = "ProvisionedThroughputInMibps")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provisioned_throughput_in_mibps: Option<f64>,
/// <p>A value that specifies to create one or more tags associated with the file system. Each tag is a user-defined key-value pair. Name your file system on creation by including a <code>"Key":"Name","Value":"{value}"</code> key-value pair.</p>
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
/// <p>Specifies the throughput mode for the file system, either <code>bursting</code> or <code>provisioned</code>. If you set <code>ThroughputMode</code> to <code>provisioned</code>, you must also set a value for <code>ProvisionedThroughputInMibps</code>. After you create the file system, you can decrease your file system's throughput in Provisioned Throughput mode or change between the throughput modes, as long as it’s been more than 24 hours since the last decrease or throughput mode change. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#provisioned-throughput">Specifying throughput with provisioned mode</a> in the <i>Amazon EFS User Guide</i>. </p> <p>Default is <code>bursting</code>.</p>
#[serde(rename = "ThroughputMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throughput_mode: Option<String>,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateMountTargetRequest {
/// <p>The ID of the file system for which to create the mount target.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>Valid IPv4 address within the address range of the specified subnet.</p>
#[serde(rename = "IpAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_address: Option<String>,
/// <p>Up to five VPC security group IDs, of the form <code>sg-xxxxxxxx</code>. These must be for the same VPC as subnet specified.</p>
#[serde(rename = "SecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_groups: Option<Vec<String>>,
/// <p>The ID of the subnet to add the mount target in. For file systems that use One Zone storage classes, use the subnet that is associated with the file system's Availability Zone.</p>
#[serde(rename = "SubnetId")]
pub subnet_id: String,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateTagsRequest {
/// <p>The ID of the file system whose tags you want to modify (String). This operation modifies the tags only, not the file system.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>An array of <code>Tag</code> objects to add. Each <code>Tag</code> object is a key-value pair. </p>
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
/// <p><p>Required if the <code>RootDirectory</code> > <code>Path</code> specified does not exist. Specifies the POSIX IDs and permissions to apply to the access point's <code>RootDirectory</code> > <code>Path</code>. If the access point root directory does not exist, EFS creates it with these settings when a client connects to the access point. When specifying <code>CreationInfo</code>, you must include values for all properties. </p> <p>Amazon EFS creates a root directory only if you have provided the CreationInfo: OwnUid, OwnGID, and permissions for the directory. If you do not provide this information, Amazon EFS does not create the root directory. If the root directory does not exist, attempts to mount using the access point will fail.</p> <important> <p>If you do not provide <code>CreationInfo</code> and the specified <code>RootDirectory</code> does not exist, attempts to mount the file system using the access point will fail.</p> </important></p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct CreationInfo {
/// <p>Specifies the POSIX group ID to apply to the <code>RootDirectory</code>. Accepts values from 0 to 2^32 (4294967295).</p>
#[serde(rename = "OwnerGid")]
pub owner_gid: i64,
/// <p>Specifies the POSIX user ID to apply to the <code>RootDirectory</code>. Accepts values from 0 to 2^32 (4294967295).</p>
#[serde(rename = "OwnerUid")]
pub owner_uid: i64,
/// <p>Specifies the POSIX permissions to apply to the <code>RootDirectory</code>, in the format of an octal number representing the file's mode bits.</p>
#[serde(rename = "Permissions")]
pub permissions: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteAccessPointRequest {
/// <p>The ID of the access point that you want to delete.</p>
#[serde(rename = "AccessPointId")]
pub access_point_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteFileSystemPolicyRequest {
/// <p>Specifies the EFS file system for which to delete the <code>FileSystemPolicy</code>.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteFileSystemRequest {
/// <p>The ID of the file system you want to delete.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteMountTargetRequest {
/// <p>The ID of the mount target to delete (String).</p>
#[serde(rename = "MountTargetId")]
pub mount_target_id: String,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteTagsRequest {
/// <p>The ID of the file system whose tags you want to delete (String).</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>A list of tag keys to delete.</p>
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeAccessPointsRequest {
/// <p>(Optional) Specifies an EFS access point to describe in the response; mutually exclusive with <code>FileSystemId</code>.</p>
#[serde(rename = "AccessPointId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_point_id: Option<String>,
/// <p>(Optional) If you provide a <code>FileSystemId</code>, EFS returns all access points for that file system; mutually exclusive with <code>AccessPointId</code>.</p>
#[serde(rename = "FileSystemId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_system_id: Option<String>,
/// <p>(Optional) When retrieving all access points for a file system, you can optionally specify the <code>MaxItems</code> parameter to limit the number of objects returned in a response. The default value is 100. </p>
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
/// <p> <code>NextToken</code> is present if the response is paginated. You can use <code>NextMarker</code> in the subsequent request to fetch the next page of access point descriptions.</p>
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeAccessPointsResponse {
/// <p>An array of access point descriptions.</p>
#[serde(rename = "AccessPoints")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_points: Option<Vec<AccessPointDescription>>,
/// <p>Present if there are more access points than returned in the response. You can use the NextMarker in the subsequent request to fetch the additional descriptions.</p>
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeAccountPreferencesRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeAccountPreferencesResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ResourceIdPreference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id_preference: Option<ResourceIdPreference>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeBackupPolicyRequest {
/// <p>Specifies which EFS file system to retrieve the <code>BackupPolicy</code> for.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeFileSystemPolicyRequest {
/// <p>Specifies which EFS file system to retrieve the <code>FileSystemPolicy</code> for.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeFileSystemsRequest {
/// <p>(Optional) Restricts the list to the file system with this creation token (String). You specify a creation token when you create an Amazon EFS file system.</p>
#[serde(rename = "CreationToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_token: Option<String>,
/// <p>(Optional) ID of the file system whose description you want to retrieve (String).</p>
#[serde(rename = "FileSystemId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_system_id: Option<String>,
/// <p>(Optional) Opaque pagination token returned from a previous <code>DescribeFileSystems</code> operation (String). If present, specifies to continue the list from where the returning call had left off. </p>
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
/// <p>(Optional) Specifies the maximum number of file systems to return in the response (integer). This number is automatically set to 100. The response is paginated at 100 per page if you have more than 100 file systems. </p>
#[serde(rename = "MaxItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_items: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeFileSystemsResponse {
/// <p>An array of file system descriptions.</p>
#[serde(rename = "FileSystems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_systems: Option<Vec<FileSystemDescription>>,
/// <p>Present if provided by caller in the request (String).</p>
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
/// <p>Present if there are more file systems than returned in the response (String). You can use the <code>NextMarker</code> in the subsequent request to fetch the descriptions.</p>
#[serde(rename = "NextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeLifecycleConfigurationRequest {
/// <p>The ID of the file system whose <code>LifecycleConfiguration</code> object you want to retrieve (String).</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeMountTargetSecurityGroupsRequest {
/// <p>The ID of the mount target whose security groups you want to retrieve.</p>
#[serde(rename = "MountTargetId")]
pub mount_target_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeMountTargetSecurityGroupsResponse {
/// <p>An array of security groups.</p>
#[serde(rename = "SecurityGroups")]
pub security_groups: Vec<String>,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeMountTargetsRequest {
/// <p>(Optional) The ID of the access point whose mount targets that you want to list. It must be included in your request if a <code>FileSystemId</code> or <code>MountTargetId</code> is not included in your request. Accepts either an access point ID or ARN as input.</p>
#[serde(rename = "AccessPointId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_point_id: Option<String>,
/// <p>(Optional) ID of the file system whose mount targets you want to list (String). It must be included in your request if an <code>AccessPointId</code> or <code>MountTargetId</code> is not included. Accepts either a file system ID or ARN as input.</p>
#[serde(rename = "FileSystemId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_system_id: Option<String>,
/// <p>(Optional) Opaque pagination token returned from a previous <code>DescribeMountTargets</code> operation (String). If present, it specifies to continue the list from where the previous returning call left off.</p>
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
/// <p>(Optional) Maximum number of mount targets to return in the response. Currently, this number is automatically set to 10, and other values are ignored. The response is paginated at 100 per page if you have more than 100 mount targets.</p>
#[serde(rename = "MaxItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_items: Option<i64>,
/// <p>(Optional) ID of the mount target that you want to have described (String). It must be included in your request if <code>FileSystemId</code> is not included. Accepts either a mount target ID or ARN as input.</p>
#[serde(rename = "MountTargetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mount_target_id: Option<String>,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeMountTargetsResponse {
/// <p>If the request included the <code>Marker</code>, the response returns that value in this field.</p>
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
/// <p>Returns the file system's mount targets as an array of <code>MountTargetDescription</code> objects.</p>
#[serde(rename = "MountTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mount_targets: Option<Vec<MountTargetDescription>>,
/// <p>If a value is present, there are more mount targets to return. In a subsequent request, you can provide <code>Marker</code> in your request with this value to retrieve the next set of mount targets.</p>
#[serde(rename = "NextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeTagsRequest {
/// <p>The ID of the file system whose tag set you want to retrieve.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>(Optional) An opaque pagination token returned from a previous <code>DescribeTags</code> operation (String). If present, it specifies to continue the list from where the previous call left off.</p>
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
/// <p>(Optional) The maximum number of file system tags to return in the response. Currently, this number is automatically set to 100, and other values are ignored. The response is paginated at 100 per page if you have more than 100 tags.</p>
#[serde(rename = "MaxItems")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_items: Option<i64>,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeTagsResponse {
/// <p>If the request included a <code>Marker</code>, the response returns that value in this field.</p>
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
/// <p>If a value is present, there are more tags to return. In a subsequent request, you can provide the value of <code>NextMarker</code> as the value of the <code>Marker</code> parameter in your next request to retrieve the next set of tags.</p>
#[serde(rename = "NextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
/// <p>Returns tags associated with the file system as an array of <code>Tag</code> objects. </p>
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
/// <p>A description of the file system.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct FileSystemDescription {
/// <p>The unique and consistent identifier of the Availability Zone in which the file system's One Zone storage classes exist. For example, <code>use1-az1</code> is an Availability Zone ID for the us-east-1 AWS Region, and it has the same location in every AWS account.</p>
#[serde(rename = "AvailabilityZoneId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone_id: Option<String>,
/// <p>Describes the AWS Availability Zone in which the file system is located, and is valid only for file systems using One Zone storage classes. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html">Using EFS storage classes</a> in the <i>Amazon EFS User Guide</i>.</p>
#[serde(rename = "AvailabilityZoneName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone_name: Option<String>,
/// <p>The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z).</p>
#[serde(rename = "CreationTime")]
pub creation_time: f64,
/// <p>The opaque string specified in the request.</p>
#[serde(rename = "CreationToken")]
pub creation_token: String,
/// <p>A Boolean value that, if true, indicates that the file system is encrypted.</p>
#[serde(rename = "Encrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
/// <p>The Amazon Resource Name (ARN) for the EFS file system, in the format <code>arn:aws:elasticfilesystem:<i>region</i>:<i>account-id</i>:file-system/<i>file-system-id</i> </code>. Example with sample data: <code>arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567</code> </p>
#[serde(rename = "FileSystemArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_system_arn: Option<String>,
/// <p>The ID of the file system, assigned by Amazon EFS.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>The ID of an AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the encrypted file system.</p>
#[serde(rename = "KmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
/// <p>The lifecycle phase of the file system.</p>
#[serde(rename = "LifeCycleState")]
pub life_cycle_state: String,
/// <p>You can add tags to a file system, including a <code>Name</code> tag. For more information, see <a>CreateFileSystem</a>. If the file system has a <code>Name</code> tag, Amazon EFS returns the value in this field. </p>
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// <p>The current number of mount targets that the file system has. For more information, see <a>CreateMountTarget</a>.</p>
#[serde(rename = "NumberOfMountTargets")]
pub number_of_mount_targets: i64,
/// <p>The AWS account that created the file system. If the file system was created by an IAM user, the parent account to which the user belongs is the owner.</p>
#[serde(rename = "OwnerId")]
pub owner_id: String,
/// <p>The performance mode of the file system.</p>
#[serde(rename = "PerformanceMode")]
pub performance_mode: String,
/// <p>The amount of provisioned throughput, measured in MiB/s, for the file system. Valid for file systems using <code>ThroughputMode</code> set to <code>provisioned</code>.</p>
#[serde(rename = "ProvisionedThroughputInMibps")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provisioned_throughput_in_mibps: Option<f64>,
/// <p>The latest known metered size (in bytes) of data stored in the file system, in its <code>Value</code> field, and the time at which that size was determined in its <code>Timestamp</code> field. The <code>Timestamp</code> value is the integer number of seconds since 1970-01-01T00:00:00Z. The <code>SizeInBytes</code> value doesn't represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, <code>SizeInBytes</code> represents actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not the exact size that the file system was at any point in time. </p>
#[serde(rename = "SizeInBytes")]
pub size_in_bytes: FileSystemSize,
/// <p>The tags associated with the file system, presented as an array of <code>Tag</code> objects.</p>
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
/// <p>Displays the file system's throughput mode. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes">Throughput modes</a> in the <i>Amazon EFS User Guide</i>. </p>
#[serde(rename = "ThroughputMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throughput_mode: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct FileSystemPolicyDescription {
/// <p>Specifies the EFS file system to which the <code>FileSystemPolicy</code> applies.</p>
#[serde(rename = "FileSystemId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_system_id: Option<String>,
/// <p>The JSON formatted <code>FileSystemPolicy</code> for the EFS file system.</p>
#[serde(rename = "Policy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy: Option<String>,
}
/// <p>The latest known metered size (in bytes) of data stored in the file system, in its <code>Value</code> field, and the time at which that size was determined in its <code>Timestamp</code> field. The value doesn't represent the size of a consistent snapshot of the file system, but it is eventually consistent when there are no writes to the file system. That is, the value represents the actual size only if the file system is not modified for a period longer than a couple of hours. Otherwise, the value is not necessarily the exact size the file system was at any instant in time.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct FileSystemSize {
/// <p>The time at which the size of data, returned in the <code>Value</code> field, was determined. The value is the integer number of seconds since 1970-01-01T00:00:00Z.</p>
#[serde(rename = "Timestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp: Option<f64>,
/// <p>The latest known metered size (in bytes) of data stored in the file system.</p>
#[serde(rename = "Value")]
pub value: i64,
/// <p>The latest known metered size (in bytes) of data stored in the Infrequent Access storage class.</p>
#[serde(rename = "ValueInIA")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value_in_ia: Option<i64>,
/// <p>The latest known metered size (in bytes) of data stored in the Standard storage class.</p>
#[serde(rename = "ValueInStandard")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value_in_standard: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct LifecycleConfigurationDescription {
/// <p>An array of lifecycle management policies. Currently, EFS supports a maximum of one policy per file system.</p>
#[serde(rename = "LifecyclePolicies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lifecycle_policies: Option<Vec<LifecyclePolicy>>,
}
/// <p>Describes a policy used by EFS lifecycle management to transition files to the Infrequent Access (IA) storage class.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct LifecyclePolicy {
/// <p> A value that describes the period of time that a file is not accessed, after which it transitions to the IA storage class. Metadata operations such as listing the contents of a directory don't count as file access events.</p>
#[serde(rename = "TransitionToIA")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transition_to_ia: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListTagsForResourceRequest {
/// <p>(Optional) Specifies the maximum number of tag objects to return in the response. The default value is 100.</p>
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
/// <p>(Optional) You can use <code>NextToken</code> in a subsequent request to fetch the next page of access point descriptions if the response payload was paginated.</p>
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
/// <p>Specifies the EFS resource you want to retrieve tags for. You can retrieve tags for EFS file systems and access points using this API endpoint.</p>
#[serde(rename = "ResourceId")]
pub resource_id: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListTagsForResourceResponse {
/// <p> <code>NextToken</code> is present if the response payload is paginated. You can use <code>NextToken</code> in a subsequent request to fetch the next page of access point descriptions.</p>
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
/// <p>An array of the tags for the specified EFS resource.</p>
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
/// <p><p/></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ModifyMountTargetSecurityGroupsRequest {
/// <p>The ID of the mount target whose security groups you want to modify.</p>
#[serde(rename = "MountTargetId")]
pub mount_target_id: String,
/// <p>An array of up to five VPC security group IDs.</p>
#[serde(rename = "SecurityGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_groups: Option<Vec<String>>,
}
/// <p>Provides a description of a mount target.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MountTargetDescription {
/// <p>The unique and consistent identifier of the Availability Zone that the mount target resides in. For example, <code>use1-az1</code> is an AZ ID for the us-east-1 Region and it has the same location in every AWS account.</p>
#[serde(rename = "AvailabilityZoneId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone_id: Option<String>,
/// <p>The name of the Availability Zone in which the mount target is located. Availability Zones are independently mapped to names for each AWS account. For example, the Availability Zone <code>us-east-1a</code> for your AWS account might not be the same location as <code>us-east-1a</code> for another AWS account.</p>
#[serde(rename = "AvailabilityZoneName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone_name: Option<String>,
/// <p>The ID of the file system for which the mount target is intended.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>Address at which the file system can be mounted by using the mount target.</p>
#[serde(rename = "IpAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_address: Option<String>,
/// <p>Lifecycle state of the mount target.</p>
#[serde(rename = "LifeCycleState")]
pub life_cycle_state: String,
/// <p>System-assigned mount target ID.</p>
#[serde(rename = "MountTargetId")]
pub mount_target_id: String,
/// <p>The ID of the network interface that Amazon EFS created when it created the mount target.</p>
#[serde(rename = "NetworkInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_id: Option<String>,
/// <p>AWS account ID that owns the resource.</p>
#[serde(rename = "OwnerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
/// <p>The ID of the mount target's subnet.</p>
#[serde(rename = "SubnetId")]
pub subnet_id: String,
/// <p>The virtual private cloud (VPC) ID that the mount target is configured in.</p>
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
/// <p>The full POSIX identity, including the user ID, group ID, and any secondary group IDs, on the access point that is used for all file system operations performed by NFS clients using the access point.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct PosixUser {
/// <p>The POSIX group ID used for all file system operations using this access point.</p>
#[serde(rename = "Gid")]
pub gid: i64,
/// <p>Secondary POSIX group IDs used for all file system operations using this access point.</p>
#[serde(rename = "SecondaryGids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secondary_gids: Option<Vec<i64>>,
/// <p>The POSIX user ID used for all file system operations using this access point.</p>
#[serde(rename = "Uid")]
pub uid: i64,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutAccountPreferencesRequest {
#[serde(rename = "ResourceIdType")]
pub resource_id_type: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutAccountPreferencesResponse {
#[serde(rename = "ResourceIdPreference")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id_preference: Option<ResourceIdPreference>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutBackupPolicyRequest {
/// <p>The backup policy included in the <code>PutBackupPolicy</code> request.</p>
#[serde(rename = "BackupPolicy")]
pub backup_policy: BackupPolicy,
/// <p>Specifies which EFS file system to update the backup policy for.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutFileSystemPolicyRequest {
/// <p>(Optional) A flag to indicate whether to bypass the <code>FileSystemPolicy</code> lockout safety check. The policy lockout safety check determines whether the policy in the request will prevent the principal making the request will be locked out from making future <code>PutFileSystemPolicy</code> requests on the file system. Set <code>BypassPolicyLockoutSafetyCheck</code> to <code>True</code> only when you intend to prevent the principal that is making the request from making a subsequent <code>PutFileSystemPolicy</code> request on the file system. The default value is False. </p>
#[serde(rename = "BypassPolicyLockoutSafetyCheck")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bypass_policy_lockout_safety_check: Option<bool>,
/// <p>The ID of the EFS file system that you want to create or update the <code>FileSystemPolicy</code> for.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>The <code>FileSystemPolicy</code> that you're creating. Accepts a JSON formatted policy definition. EFS file system policies have a 20,000 character limit. To find out more about the elements that make up a file system policy, see <a href="https://docs.aws.amazon.com/efs/latest/ug/access-control-overview.html#access-control-manage-access-intro-resource-policies">EFS Resource-based Policies</a>. </p>
#[serde(rename = "Policy")]
pub policy: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutLifecycleConfigurationRequest {
/// <p>The ID of the file system for which you are creating the <code>LifecycleConfiguration</code> object (String).</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>An array of <code>LifecyclePolicy</code> objects that define the file system's <code>LifecycleConfiguration</code> object. A <code>LifecycleConfiguration</code> object tells lifecycle management when to transition files from the Standard storage class to the Infrequent Access storage class.</p>
#[serde(rename = "LifecyclePolicies")]
pub lifecycle_policies: Vec<LifecyclePolicy>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ResourceIdPreference {
#[serde(rename = "ResourceIdType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id_type: Option<String>,
#[serde(rename = "Resources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resources: Option<Vec<String>>,
}
/// <p>Specifies the directory on the Amazon EFS file system that the access point provides access to. The access point exposes the specified file system path as the root directory of your file system to applications using the access point. NFS clients using the access point can only access data in the access point's <code>RootDirectory</code> and it's subdirectories.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct RootDirectory {
/// <p><p>(Optional) Specifies the POSIX IDs and permissions to apply to the access point's <code>RootDirectory</code>. If the <code>RootDirectory</code> > <code>Path</code> specified does not exist, EFS creates the root directory using the <code>CreationInfo</code> settings when a client connects to an access point. When specifying the <code>CreationInfo</code>, you must provide values for all properties. </p> <important> <p>If you do not provide <code>CreationInfo</code> and the specified <code>RootDirectory</code> > <code>Path</code> does not exist, attempts to mount the file system using the access point will fail.</p> </important></p>
#[serde(rename = "CreationInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_info: Option<CreationInfo>,
/// <p>Specifies the path on the EFS file system to expose as the root directory to NFS clients using the access point to access the EFS file system. A path can have up to four subdirectories. If the specified path does not exist, you are required to provide the <code>CreationInfo</code>.</p>
#[serde(rename = "Path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
}
/// <p>A tag is a key-value pair. Allowed characters are letters, white space, and numbers that can be represented in UTF-8, and the following characters:<code> + - = . _ : /</code>.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Tag {
/// <p>The tag key (String). The key can't start with <code>aws:</code>.</p>
#[serde(rename = "Key")]
pub key: String,
/// <p>The value of the tag key.</p>
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TagResourceRequest {
/// <p>The ID specifying the EFS resource that you want to create a tag for.</p>
#[serde(rename = "ResourceId")]
pub resource_id: String,
/// <p>An array of <code>Tag</code> objects to add. Each <code>Tag</code> object is a key-value pair.</p>
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UntagResourceRequest {
/// <p>Specifies the EFS resource that you want to remove tags from.</p>
#[serde(rename = "ResourceId")]
pub resource_id: String,
/// <p>The keys of the key-value tag pairs that you want to remove from the specified EFS resource.</p>
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateFileSystemRequest {
/// <p>The ID of the file system that you want to update.</p>
#[serde(rename = "FileSystemId")]
pub file_system_id: String,
/// <p>(Optional) Sets the amount of provisioned throughput, in MiB/s, for the file system. Valid values are 1-1024. If you are changing the throughput mode to provisioned, you must also provide the amount of provisioned throughput. Required if <code>ThroughputMode</code> is changed to <code>provisioned</code> on update.</p>
#[serde(rename = "ProvisionedThroughputInMibps")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provisioned_throughput_in_mibps: Option<f64>,
/// <p>(Optional) Updates the file system's throughput mode. If you're not updating your throughput mode, you don't need to provide this value in your request. If you are changing the <code>ThroughputMode</code> to <code>provisioned</code>, you must also set a value for <code>ProvisionedThroughputInMibps</code>.</p>
#[serde(rename = "ThroughputMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throughput_mode: Option<String>,
}
/// Errors returned by CreateAccessPoint
#[derive(Debug, PartialEq)]
pub enum CreateAccessPointError {
/// <p>Returned if the access point you are trying to create already exists, with the creation token you provided in the request.</p>
AccessPointAlreadyExists(String),
/// <p>Returned if the AWS account has already created the maximum number of access points allowed per file system.</p>
AccessPointLimitExceeded(String),
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if the file system's lifecycle state is not "available".</p>
IncorrectFileSystemLifeCycleState(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl CreateAccessPointError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAccessPointError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessPointAlreadyExists" => {
return RusotoError::Service(CreateAccessPointError::AccessPointAlreadyExists(
err.msg,
))
}
"AccessPointLimitExceeded" => {
return RusotoError::Service(CreateAccessPointError::AccessPointLimitExceeded(
err.msg,
))
}
"BadRequest" => {
return RusotoError::Service(CreateAccessPointError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(CreateAccessPointError::FileSystemNotFound(
err.msg,
))
}
"IncorrectFileSystemLifeCycleState" => {
return RusotoError::Service(
CreateAccessPointError::IncorrectFileSystemLifeCycleState(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(CreateAccessPointError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateAccessPointError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateAccessPointError::AccessPointAlreadyExists(ref cause) => write!(f, "{}", cause),
CreateAccessPointError::AccessPointLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateAccessPointError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateAccessPointError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
CreateAccessPointError::IncorrectFileSystemLifeCycleState(ref cause) => {
write!(f, "{}", cause)
}
CreateAccessPointError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateAccessPointError {}
/// Errors returned by CreateFileSystem
#[derive(Debug, PartialEq)]
pub enum CreateFileSystemError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the file system you are trying to create already exists, with the creation token you provided.</p>
FileSystemAlreadyExists(String),
/// <p>Returned if the AWS account has already created the maximum number of file systems allowed per account.</p>
FileSystemLimitExceeded(String),
/// <p>Returned if there's not enough capacity to provision additional throughput. This value might be returned when you try to create a file system in provisioned throughput mode, when you attempt to increase the provisioned throughput of an existing file system, or when you attempt to change an existing file system from bursting to provisioned throughput mode. Try again later.</p>
InsufficientThroughputCapacity(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if the throughput mode or amount of provisioned throughput can't be changed because the throughput limit of 1024 MiB/s has been reached.</p>
ThroughputLimitExceeded(String),
/// <p>Returned if the requested Amazon EFS functionality is not available in the specified Availability Zone.</p>
UnsupportedAvailabilityZone(String),
}
impl CreateFileSystemError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFileSystemError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(CreateFileSystemError::BadRequest(err.msg))
}
"FileSystemAlreadyExists" => {
return RusotoError::Service(CreateFileSystemError::FileSystemAlreadyExists(
err.msg,
))
}
"FileSystemLimitExceeded" => {
return RusotoError::Service(CreateFileSystemError::FileSystemLimitExceeded(
err.msg,
))
}
"InsufficientThroughputCapacity" => {
return RusotoError::Service(
CreateFileSystemError::InsufficientThroughputCapacity(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(CreateFileSystemError::InternalServerError(
err.msg,
))
}
"ThroughputLimitExceeded" => {
return RusotoError::Service(CreateFileSystemError::ThroughputLimitExceeded(
err.msg,
))
}
"UnsupportedAvailabilityZone" => {
return RusotoError::Service(
CreateFileSystemError::UnsupportedAvailabilityZone(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateFileSystemError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateFileSystemError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateFileSystemError::FileSystemAlreadyExists(ref cause) => write!(f, "{}", cause),
CreateFileSystemError::FileSystemLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateFileSystemError::InsufficientThroughputCapacity(ref cause) => {
write!(f, "{}", cause)
}
CreateFileSystemError::InternalServerError(ref cause) => write!(f, "{}", cause),
CreateFileSystemError::ThroughputLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateFileSystemError::UnsupportedAvailabilityZone(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateFileSystemError {}
/// Errors returned by CreateMountTarget
#[derive(Debug, PartialEq)]
pub enum CreateMountTargetError {
/// <p>Returned if the Availability Zone that was specified for a mount target is different from the Availability Zone that was specified for One Zone storage classes. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html">Regional and One Zone storage redundancy</a>.</p>
AvailabilityZonesMismatch(String),
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if the file system's lifecycle state is not "available".</p>
IncorrectFileSystemLifeCycleState(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if the request specified an <code>IpAddress</code> that is already in use in the subnet.</p>
IpAddressInUse(String),
/// <p>Returned if the mount target would violate one of the specified restrictions based on the file system's existing mount targets.</p>
MountTargetConflict(String),
/// <p>The calling account has reached the limit for elastic network interfaces for the specific AWS Region. The client should try to delete some elastic network interfaces or get the account limit raised. For more information, see <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html">Amazon VPC Limits</a> in the <i>Amazon VPC User Guide </i> (see the Network interfaces per VPC entry in the table). </p>
NetworkInterfaceLimitExceeded(String),
/// <p>Returned if <code>IpAddress</code> was not specified in the request and there are no free IP addresses in the subnet.</p>
NoFreeAddressesInSubnet(String),
/// <p>Returned if the size of <code>SecurityGroups</code> specified in the request is greater than five.</p>
SecurityGroupLimitExceeded(String),
/// <p>Returned if one of the specified security groups doesn't exist in the subnet's VPC.</p>
SecurityGroupNotFound(String),
/// <p>Returned if there is no subnet with ID <code>SubnetId</code> provided in the request.</p>
SubnetNotFound(String),
/// <p>Returned if the requested Amazon EFS functionality is not available in the specified Availability Zone.</p>
UnsupportedAvailabilityZone(String),
}
impl CreateMountTargetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateMountTargetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AvailabilityZonesMismatch" => {
return RusotoError::Service(CreateMountTargetError::AvailabilityZonesMismatch(
err.msg,
))
}
"BadRequest" => {
return RusotoError::Service(CreateMountTargetError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(CreateMountTargetError::FileSystemNotFound(
err.msg,
))
}
"IncorrectFileSystemLifeCycleState" => {
return RusotoError::Service(
CreateMountTargetError::IncorrectFileSystemLifeCycleState(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(CreateMountTargetError::InternalServerError(
err.msg,
))
}
"IpAddressInUse" => {
return RusotoError::Service(CreateMountTargetError::IpAddressInUse(err.msg))
}
"MountTargetConflict" => {
return RusotoError::Service(CreateMountTargetError::MountTargetConflict(
err.msg,
))
}
"NetworkInterfaceLimitExceeded" => {
return RusotoError::Service(
CreateMountTargetError::NetworkInterfaceLimitExceeded(err.msg),
)
}
"NoFreeAddressesInSubnet" => {
return RusotoError::Service(CreateMountTargetError::NoFreeAddressesInSubnet(
err.msg,
))
}
"SecurityGroupLimitExceeded" => {
return RusotoError::Service(
CreateMountTargetError::SecurityGroupLimitExceeded(err.msg),
)
}
"SecurityGroupNotFound" => {
return RusotoError::Service(CreateMountTargetError::SecurityGroupNotFound(
err.msg,
))
}
"SubnetNotFound" => {
return RusotoError::Service(CreateMountTargetError::SubnetNotFound(err.msg))
}
"UnsupportedAvailabilityZone" => {
return RusotoError::Service(
CreateMountTargetError::UnsupportedAvailabilityZone(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateMountTargetError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateMountTargetError::AvailabilityZonesMismatch(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::IncorrectFileSystemLifeCycleState(ref cause) => {
write!(f, "{}", cause)
}
CreateMountTargetError::InternalServerError(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::IpAddressInUse(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::MountTargetConflict(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::NetworkInterfaceLimitExceeded(ref cause) => {
write!(f, "{}", cause)
}
CreateMountTargetError::NoFreeAddressesInSubnet(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::SecurityGroupLimitExceeded(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::SecurityGroupNotFound(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::SubnetNotFound(ref cause) => write!(f, "{}", cause),
CreateMountTargetError::UnsupportedAvailabilityZone(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for CreateMountTargetError {}
/// Errors returned by CreateTags
#[derive(Debug, PartialEq)]
pub enum CreateTagsError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl CreateTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTagsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => return RusotoError::Service(CreateTagsError::BadRequest(err.msg)),
"FileSystemNotFound" => {
return RusotoError::Service(CreateTagsError::FileSystemNotFound(err.msg))
}
"InternalServerError" => {
return RusotoError::Service(CreateTagsError::InternalServerError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateTagsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateTagsError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateTagsError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
CreateTagsError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateTagsError {}
/// Errors returned by DeleteAccessPoint
#[derive(Debug, PartialEq)]
pub enum DeleteAccessPointError {
/// <p>Returned if the specified <code>AccessPointId</code> value doesn't exist in the requester's AWS account.</p>
AccessPointNotFound(String),
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl DeleteAccessPointError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAccessPointError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessPointNotFound" => {
return RusotoError::Service(DeleteAccessPointError::AccessPointNotFound(
err.msg,
))
}
"BadRequest" => {
return RusotoError::Service(DeleteAccessPointError::BadRequest(err.msg))
}
"InternalServerError" => {
return RusotoError::Service(DeleteAccessPointError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteAccessPointError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteAccessPointError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
DeleteAccessPointError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteAccessPointError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteAccessPointError {}
/// Errors returned by DeleteFileSystem
#[derive(Debug, PartialEq)]
pub enum DeleteFileSystemError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if a file system has mount targets.</p>
FileSystemInUse(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl DeleteFileSystemError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFileSystemError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(DeleteFileSystemError::BadRequest(err.msg))
}
"FileSystemInUse" => {
return RusotoError::Service(DeleteFileSystemError::FileSystemInUse(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(DeleteFileSystemError::FileSystemNotFound(err.msg))
}
"InternalServerError" => {
return RusotoError::Service(DeleteFileSystemError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteFileSystemError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteFileSystemError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteFileSystemError::FileSystemInUse(ref cause) => write!(f, "{}", cause),
DeleteFileSystemError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
DeleteFileSystemError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteFileSystemError {}
/// Errors returned by DeleteFileSystemPolicy
#[derive(Debug, PartialEq)]
pub enum DeleteFileSystemPolicyError {
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if the file system's lifecycle state is not "available".</p>
IncorrectFileSystemLifeCycleState(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl DeleteFileSystemPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFileSystemPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"FileSystemNotFound" => {
return RusotoError::Service(DeleteFileSystemPolicyError::FileSystemNotFound(
err.msg,
))
}
"IncorrectFileSystemLifeCycleState" => {
return RusotoError::Service(
DeleteFileSystemPolicyError::IncorrectFileSystemLifeCycleState(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(DeleteFileSystemPolicyError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteFileSystemPolicyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteFileSystemPolicyError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
DeleteFileSystemPolicyError::IncorrectFileSystemLifeCycleState(ref cause) => {
write!(f, "{}", cause)
}
DeleteFileSystemPolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteFileSystemPolicyError {}
/// Errors returned by DeleteMountTarget
#[derive(Debug, PartialEq)]
pub enum DeleteMountTargetError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>The service timed out trying to fulfill the request, and the client should try the call again.</p>
DependencyTimeout(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if there is no mount target with the specified ID found in the caller's account.</p>
MountTargetNotFound(String),
}
impl DeleteMountTargetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteMountTargetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(DeleteMountTargetError::BadRequest(err.msg))
}
"DependencyTimeout" => {
return RusotoError::Service(DeleteMountTargetError::DependencyTimeout(err.msg))
}
"InternalServerError" => {
return RusotoError::Service(DeleteMountTargetError::InternalServerError(
err.msg,
))
}
"MountTargetNotFound" => {
return RusotoError::Service(DeleteMountTargetError::MountTargetNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteMountTargetError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteMountTargetError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteMountTargetError::DependencyTimeout(ref cause) => write!(f, "{}", cause),
DeleteMountTargetError::InternalServerError(ref cause) => write!(f, "{}", cause),
DeleteMountTargetError::MountTargetNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteMountTargetError {}
/// Errors returned by DeleteTags
#[derive(Debug, PartialEq)]
pub enum DeleteTagsError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl DeleteTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTagsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => return RusotoError::Service(DeleteTagsError::BadRequest(err.msg)),
"FileSystemNotFound" => {
return RusotoError::Service(DeleteTagsError::FileSystemNotFound(err.msg))
}
"InternalServerError" => {
return RusotoError::Service(DeleteTagsError::InternalServerError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteTagsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteTagsError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteTagsError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
DeleteTagsError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteTagsError {}
/// Errors returned by DescribeAccessPoints
#[derive(Debug, PartialEq)]
pub enum DescribeAccessPointsError {
/// <p>Returned if the specified <code>AccessPointId</code> value doesn't exist in the requester's AWS account.</p>
AccessPointNotFound(String),
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl DescribeAccessPointsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAccessPointsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessPointNotFound" => {
return RusotoError::Service(DescribeAccessPointsError::AccessPointNotFound(
err.msg,
))
}
"BadRequest" => {
return RusotoError::Service(DescribeAccessPointsError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(DescribeAccessPointsError::FileSystemNotFound(
err.msg,
))
}
"InternalServerError" => {
return RusotoError::Service(DescribeAccessPointsError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeAccessPointsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeAccessPointsError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
DescribeAccessPointsError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeAccessPointsError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
DescribeAccessPointsError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeAccessPointsError {}
/// Errors returned by DescribeAccountPreferences
#[derive(Debug, PartialEq)]
pub enum DescribeAccountPreferencesError {
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl DescribeAccountPreferencesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeAccountPreferencesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
DescribeAccountPreferencesError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeAccountPreferencesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeAccountPreferencesError::InternalServerError(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DescribeAccountPreferencesError {}
/// Errors returned by DescribeBackupPolicy
#[derive(Debug, PartialEq)]
pub enum DescribeBackupPolicyError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if the default file system policy is in effect for the EFS file system specified.</p>
PolicyNotFound(String),
}
impl DescribeBackupPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeBackupPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(DescribeBackupPolicyError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(DescribeBackupPolicyError::FileSystemNotFound(
err.msg,
))
}
"InternalServerError" => {
return RusotoError::Service(DescribeBackupPolicyError::InternalServerError(
err.msg,
))
}
"PolicyNotFound" => {
return RusotoError::Service(DescribeBackupPolicyError::PolicyNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeBackupPolicyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeBackupPolicyError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeBackupPolicyError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
DescribeBackupPolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeBackupPolicyError::PolicyNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeBackupPolicyError {}
/// Errors returned by DescribeFileSystemPolicy
#[derive(Debug, PartialEq)]
pub enum DescribeFileSystemPolicyError {
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if the default file system policy is in effect for the EFS file system specified.</p>
PolicyNotFound(String),
}
impl DescribeFileSystemPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeFileSystemPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"FileSystemNotFound" => {
return RusotoError::Service(DescribeFileSystemPolicyError::FileSystemNotFound(
err.msg,
))
}
"InternalServerError" => {
return RusotoError::Service(
DescribeFileSystemPolicyError::InternalServerError(err.msg),
)
}
"PolicyNotFound" => {
return RusotoError::Service(DescribeFileSystemPolicyError::PolicyNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeFileSystemPolicyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeFileSystemPolicyError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
DescribeFileSystemPolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeFileSystemPolicyError::PolicyNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeFileSystemPolicyError {}
/// Errors returned by DescribeFileSystems
#[derive(Debug, PartialEq)]
pub enum DescribeFileSystemsError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl DescribeFileSystemsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeFileSystemsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(DescribeFileSystemsError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(DescribeFileSystemsError::FileSystemNotFound(
err.msg,
))
}
"InternalServerError" => {
return RusotoError::Service(DescribeFileSystemsError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeFileSystemsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeFileSystemsError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeFileSystemsError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
DescribeFileSystemsError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeFileSystemsError {}
/// Errors returned by DescribeLifecycleConfiguration
#[derive(Debug, PartialEq)]
pub enum DescribeLifecycleConfigurationError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl DescribeLifecycleConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeLifecycleConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(DescribeLifecycleConfigurationError::BadRequest(
err.msg,
))
}
"FileSystemNotFound" => {
return RusotoError::Service(
DescribeLifecycleConfigurationError::FileSystemNotFound(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(
DescribeLifecycleConfigurationError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeLifecycleConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeLifecycleConfigurationError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeLifecycleConfigurationError::FileSystemNotFound(ref cause) => {
write!(f, "{}", cause)
}
DescribeLifecycleConfigurationError::InternalServerError(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DescribeLifecycleConfigurationError {}
/// Errors returned by DescribeMountTargetSecurityGroups
#[derive(Debug, PartialEq)]
pub enum DescribeMountTargetSecurityGroupsError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the mount target is not in the correct state for the operation.</p>
IncorrectMountTargetState(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if there is no mount target with the specified ID found in the caller's account.</p>
MountTargetNotFound(String),
}
impl DescribeMountTargetSecurityGroupsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeMountTargetSecurityGroupsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(
DescribeMountTargetSecurityGroupsError::BadRequest(err.msg),
)
}
"IncorrectMountTargetState" => {
return RusotoError::Service(
DescribeMountTargetSecurityGroupsError::IncorrectMountTargetState(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(
DescribeMountTargetSecurityGroupsError::InternalServerError(err.msg),
)
}
"MountTargetNotFound" => {
return RusotoError::Service(
DescribeMountTargetSecurityGroupsError::MountTargetNotFound(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeMountTargetSecurityGroupsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeMountTargetSecurityGroupsError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeMountTargetSecurityGroupsError::IncorrectMountTargetState(ref cause) => {
write!(f, "{}", cause)
}
DescribeMountTargetSecurityGroupsError::InternalServerError(ref cause) => {
write!(f, "{}", cause)
}
DescribeMountTargetSecurityGroupsError::MountTargetNotFound(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for DescribeMountTargetSecurityGroupsError {}
/// Errors returned by DescribeMountTargets
#[derive(Debug, PartialEq)]
pub enum DescribeMountTargetsError {
/// <p>Returned if the specified <code>AccessPointId</code> value doesn't exist in the requester's AWS account.</p>
AccessPointNotFound(String),
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if there is no mount target with the specified ID found in the caller's account.</p>
MountTargetNotFound(String),
}
impl DescribeMountTargetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeMountTargetsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessPointNotFound" => {
return RusotoError::Service(DescribeMountTargetsError::AccessPointNotFound(
err.msg,
))
}
"BadRequest" => {
return RusotoError::Service(DescribeMountTargetsError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(DescribeMountTargetsError::FileSystemNotFound(
err.msg,
))
}
"InternalServerError" => {
return RusotoError::Service(DescribeMountTargetsError::InternalServerError(
err.msg,
))
}
"MountTargetNotFound" => {
return RusotoError::Service(DescribeMountTargetsError::MountTargetNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeMountTargetsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeMountTargetsError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
DescribeMountTargetsError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeMountTargetsError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
DescribeMountTargetsError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeMountTargetsError::MountTargetNotFound(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeMountTargetsError {}
/// Errors returned by DescribeTags
#[derive(Debug, PartialEq)]
pub enum DescribeTagsError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl DescribeTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTagsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(DescribeTagsError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(DescribeTagsError::FileSystemNotFound(err.msg))
}
"InternalServerError" => {
return RusotoError::Service(DescribeTagsError::InternalServerError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeTagsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeTagsError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeTagsError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
DescribeTagsError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeTagsError {}
/// Errors returned by ListTagsForResource
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
/// <p>Returned if the specified <code>AccessPointId</code> value doesn't exist in the requester's AWS account.</p>
AccessPointNotFound(String),
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessPointNotFound" => {
return RusotoError::Service(ListTagsForResourceError::AccessPointNotFound(
err.msg,
))
}
"BadRequest" => {
return RusotoError::Service(ListTagsForResourceError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(ListTagsForResourceError::FileSystemNotFound(
err.msg,
))
}
"InternalServerError" => {
return RusotoError::Service(ListTagsForResourceError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListTagsForResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListTagsForResourceError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListTagsForResourceError {}
/// Errors returned by ModifyMountTargetSecurityGroups
#[derive(Debug, PartialEq)]
pub enum ModifyMountTargetSecurityGroupsError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the mount target is not in the correct state for the operation.</p>
IncorrectMountTargetState(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if there is no mount target with the specified ID found in the caller's account.</p>
MountTargetNotFound(String),
/// <p>Returned if the size of <code>SecurityGroups</code> specified in the request is greater than five.</p>
SecurityGroupLimitExceeded(String),
/// <p>Returned if one of the specified security groups doesn't exist in the subnet's VPC.</p>
SecurityGroupNotFound(String),
}
impl ModifyMountTargetSecurityGroupsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ModifyMountTargetSecurityGroupsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(ModifyMountTargetSecurityGroupsError::BadRequest(
err.msg,
))
}
"IncorrectMountTargetState" => {
return RusotoError::Service(
ModifyMountTargetSecurityGroupsError::IncorrectMountTargetState(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(
ModifyMountTargetSecurityGroupsError::InternalServerError(err.msg),
)
}
"MountTargetNotFound" => {
return RusotoError::Service(
ModifyMountTargetSecurityGroupsError::MountTargetNotFound(err.msg),
)
}
"SecurityGroupLimitExceeded" => {
return RusotoError::Service(
ModifyMountTargetSecurityGroupsError::SecurityGroupLimitExceeded(err.msg),
)
}
"SecurityGroupNotFound" => {
return RusotoError::Service(
ModifyMountTargetSecurityGroupsError::SecurityGroupNotFound(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ModifyMountTargetSecurityGroupsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ModifyMountTargetSecurityGroupsError::BadRequest(ref cause) => write!(f, "{}", cause),
ModifyMountTargetSecurityGroupsError::IncorrectMountTargetState(ref cause) => {
write!(f, "{}", cause)
}
ModifyMountTargetSecurityGroupsError::InternalServerError(ref cause) => {
write!(f, "{}", cause)
}
ModifyMountTargetSecurityGroupsError::MountTargetNotFound(ref cause) => {
write!(f, "{}", cause)
}
ModifyMountTargetSecurityGroupsError::SecurityGroupLimitExceeded(ref cause) => {
write!(f, "{}", cause)
}
ModifyMountTargetSecurityGroupsError::SecurityGroupNotFound(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for ModifyMountTargetSecurityGroupsError {}
/// Errors returned by PutAccountPreferences
#[derive(Debug, PartialEq)]
pub enum PutAccountPreferencesError {
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl PutAccountPreferencesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutAccountPreferencesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(PutAccountPreferencesError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutAccountPreferencesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutAccountPreferencesError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutAccountPreferencesError {}
/// Errors returned by PutBackupPolicy
#[derive(Debug, PartialEq)]
pub enum PutBackupPolicyError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if the file system's lifecycle state is not "available".</p>
IncorrectFileSystemLifeCycleState(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl PutBackupPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutBackupPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(PutBackupPolicyError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(PutBackupPolicyError::FileSystemNotFound(err.msg))
}
"IncorrectFileSystemLifeCycleState" => {
return RusotoError::Service(
PutBackupPolicyError::IncorrectFileSystemLifeCycleState(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(PutBackupPolicyError::InternalServerError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutBackupPolicyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutBackupPolicyError::BadRequest(ref cause) => write!(f, "{}", cause),
PutBackupPolicyError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
PutBackupPolicyError::IncorrectFileSystemLifeCycleState(ref cause) => {
write!(f, "{}", cause)
}
PutBackupPolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutBackupPolicyError {}
/// Errors returned by PutFileSystemPolicy
#[derive(Debug, PartialEq)]
pub enum PutFileSystemPolicyError {
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if the file system's lifecycle state is not "available".</p>
IncorrectFileSystemLifeCycleState(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if the <code>FileSystemPolicy</code> is is malformed or contains an error such as an invalid parameter value or a missing required parameter. Returned in the case of a policy lockout safety check error.</p>
InvalidPolicy(String),
}
impl PutFileSystemPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutFileSystemPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"FileSystemNotFound" => {
return RusotoError::Service(PutFileSystemPolicyError::FileSystemNotFound(
err.msg,
))
}
"IncorrectFileSystemLifeCycleState" => {
return RusotoError::Service(
PutFileSystemPolicyError::IncorrectFileSystemLifeCycleState(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(PutFileSystemPolicyError::InternalServerError(
err.msg,
))
}
"InvalidPolicyException" => {
return RusotoError::Service(PutFileSystemPolicyError::InvalidPolicy(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutFileSystemPolicyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutFileSystemPolicyError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
PutFileSystemPolicyError::IncorrectFileSystemLifeCycleState(ref cause) => {
write!(f, "{}", cause)
}
PutFileSystemPolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
PutFileSystemPolicyError::InvalidPolicy(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutFileSystemPolicyError {}
/// Errors returned by PutLifecycleConfiguration
#[derive(Debug, PartialEq)]
pub enum PutLifecycleConfigurationError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if the file system's lifecycle state is not "available".</p>
IncorrectFileSystemLifeCycleState(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl PutLifecycleConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutLifecycleConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(PutLifecycleConfigurationError::BadRequest(
err.msg,
))
}
"FileSystemNotFound" => {
return RusotoError::Service(
PutLifecycleConfigurationError::FileSystemNotFound(err.msg),
)
}
"IncorrectFileSystemLifeCycleState" => {
return RusotoError::Service(
PutLifecycleConfigurationError::IncorrectFileSystemLifeCycleState(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(
PutLifecycleConfigurationError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutLifecycleConfigurationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutLifecycleConfigurationError::BadRequest(ref cause) => write!(f, "{}", cause),
PutLifecycleConfigurationError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
PutLifecycleConfigurationError::IncorrectFileSystemLifeCycleState(ref cause) => {
write!(f, "{}", cause)
}
PutLifecycleConfigurationError::InternalServerError(ref cause) => {
write!(f, "{}", cause)
}
}
}
}
impl Error for PutLifecycleConfigurationError {}
/// Errors returned by TagResource
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
/// <p>Returned if the specified <code>AccessPointId</code> value doesn't exist in the requester's AWS account.</p>
AccessPointNotFound(String),
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessPointNotFound" => {
return RusotoError::Service(TagResourceError::AccessPointNotFound(err.msg))
}
"BadRequest" => return RusotoError::Service(TagResourceError::BadRequest(err.msg)),
"FileSystemNotFound" => {
return RusotoError::Service(TagResourceError::FileSystemNotFound(err.msg))
}
"InternalServerError" => {
return RusotoError::Service(TagResourceError::InternalServerError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for TagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
TagResourceError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
TagResourceError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
TagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for TagResourceError {}
/// Errors returned by UntagResource
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
/// <p>Returned if the specified <code>AccessPointId</code> value doesn't exist in the requester's AWS account.</p>
AccessPointNotFound(String),
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"AccessPointNotFound" => {
return RusotoError::Service(UntagResourceError::AccessPointNotFound(err.msg))
}
"BadRequest" => {
return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(UntagResourceError::FileSystemNotFound(err.msg))
}
"InternalServerError" => {
return RusotoError::Service(UntagResourceError::InternalServerError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UntagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UntagResourceError::AccessPointNotFound(ref cause) => write!(f, "{}", cause),
UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
UntagResourceError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
UntagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UntagResourceError {}
/// Errors returned by UpdateFileSystem
#[derive(Debug, PartialEq)]
pub enum UpdateFileSystemError {
/// <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
BadRequest(String),
/// <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's AWS account.</p>
FileSystemNotFound(String),
/// <p>Returned if the file system's lifecycle state is not "available".</p>
IncorrectFileSystemLifeCycleState(String),
/// <p>Returned if there's not enough capacity to provision additional throughput. This value might be returned when you try to create a file system in provisioned throughput mode, when you attempt to increase the provisioned throughput of an existing file system, or when you attempt to change an existing file system from bursting to provisioned throughput mode. Try again later.</p>
InsufficientThroughputCapacity(String),
/// <p>Returned if an error occurred on the server side.</p>
InternalServerError(String),
/// <p>Returned if the throughput mode or amount of provisioned throughput can't be changed because the throughput limit of 1024 MiB/s has been reached.</p>
ThroughputLimitExceeded(String),
/// <p>Returned if you don’t wait at least 24 hours before changing the throughput mode, or decreasing the Provisioned Throughput value.</p>
TooManyRequests(String),
}
impl UpdateFileSystemError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFileSystemError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequest" => {
return RusotoError::Service(UpdateFileSystemError::BadRequest(err.msg))
}
"FileSystemNotFound" => {
return RusotoError::Service(UpdateFileSystemError::FileSystemNotFound(err.msg))
}
"IncorrectFileSystemLifeCycleState" => {
return RusotoError::Service(
UpdateFileSystemError::IncorrectFileSystemLifeCycleState(err.msg),
)
}
"InsufficientThroughputCapacity" => {
return RusotoError::Service(
UpdateFileSystemError::InsufficientThroughputCapacity(err.msg),
)
}
"InternalServerError" => {
return RusotoError::Service(UpdateFileSystemError::InternalServerError(
err.msg,
))
}
"ThroughputLimitExceeded" => {
return RusotoError::Service(UpdateFileSystemError::ThroughputLimitExceeded(
err.msg,
))
}
"TooManyRequests" => {
return RusotoError::Service(UpdateFileSystemError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateFileSystemError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateFileSystemError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateFileSystemError::FileSystemNotFound(ref cause) => write!(f, "{}", cause),
UpdateFileSystemError::IncorrectFileSystemLifeCycleState(ref cause) => {
write!(f, "{}", cause)
}
UpdateFileSystemError::InsufficientThroughputCapacity(ref cause) => {
write!(f, "{}", cause)
}
UpdateFileSystemError::InternalServerError(ref cause) => write!(f, "{}", cause),
UpdateFileSystemError::ThroughputLimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateFileSystemError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateFileSystemError {}
/// Trait representing the capabilities of the EFS API. EFS clients implement this trait.
#[async_trait]
pub trait Efs {
/// <p>Creates an EFS access point. An access point is an application-specific view into an EFS file system that applies an operating system user and group, and a file system path, to any file system request made through the access point. The operating system user and group override any identity information provided by the NFS client. The file system path is exposed as the access point's root directory. Applications using the access point can only access data in its own directory and below. To learn more, see <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">Mounting a file system using EFS access points</a>.</p> <p>This operation requires permissions for the <code>elasticfilesystem:CreateAccessPoint</code> action.</p>
async fn create_access_point(
&self,
input: CreateAccessPointRequest,
) -> Result<AccessPointDescription, RusotoError<CreateAccessPointError>>;
/// <p>Creates a new, empty file system. The operation requires a creation token in the request that Amazon EFS uses to ensure idempotent creation (calling the operation with same creation token has no effect). If a file system does not currently exist that is owned by the caller's AWS account with the specified creation token, this operation does the following:</p> <ul> <li> <p>Creates a new, empty file system. The file system will have an Amazon EFS assigned ID, and an initial lifecycle state <code>creating</code>.</p> </li> <li> <p>Returns with the description of the created file system.</p> </li> </ul> <p>Otherwise, this operation returns a <code>FileSystemAlreadyExists</code> error with the ID of the existing file system.</p> <note> <p>For basic use cases, you can use a randomly generated UUID for the creation token.</p> </note> <p> The idempotent operation allows you to retry a <code>CreateFileSystem</code> call without risk of creating an extra file system. This can happen when an initial call fails in a way that leaves it uncertain whether or not a file system was actually created. An example might be that a transport level timeout occurred or your connection was reset. As long as you use the same creation token, if the initial call had succeeded in creating a file system, the client can learn of its existence from the <code>FileSystemAlreadyExists</code> error.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html#creating-using-create-fs-part1">Creating a file system</a> in the <i>Amazon EFS User Guide</i>.</p> <note> <p>The <code>CreateFileSystem</code> call returns while the file system's lifecycle state is still <code>creating</code>. You can check the file system creation status by calling the <a>DescribeFileSystems</a> operation, which among other things returns the file system state.</p> </note> <p>This operation accepts an optional <code>PerformanceMode</code> parameter that you choose for your file system. We recommend <code>generalPurpose</code> performance mode for most file systems. File systems using the <code>maxIO</code> performance mode can scale to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for most file operations. The performance mode can't be changed after the file system has been created. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#performancemodes.html">Amazon EFS performance modes</a>.</p> <p>You can set the throughput mode for the file system using the <code>ThroughputMode</code> parameter.</p> <p>After the file system is fully created, Amazon EFS sets its lifecycle state to <code>available</code>, at which point you can create one or more mount targets for the file system in your VPC. For more information, see <a>CreateMountTarget</a>. You mount your Amazon EFS file system on an EC2 instances in your VPC by using the mount target. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html">Amazon EFS: How it Works</a>. </p> <p> This operation requires permissions for the <code>elasticfilesystem:CreateFileSystem</code> action. </p>
async fn create_file_system(
&self,
input: CreateFileSystemRequest,
) -> Result<FileSystemDescription, RusotoError<CreateFileSystemError>>;
/// <p><p>Creates a mount target for a file system. You can then mount the file system on EC2 instances by using the mount target.</p> <p>You can create one mount target in each Availability Zone in your VPC. All EC2 instances in a VPC within a given Availability Zone share a single mount target for a given file system. If you have multiple subnets in an Availability Zone, you create a mount target in one of the subnets. EC2 instances do not need to be in the same subnet as the mount target in order to access their file system.</p> <p>You can create only one mount target for an EFS file system using One Zone storage classes. You must create that mount target in the same Availability Zone in which the file system is located. Use the <code>AvailabilityZoneName</code> and <code>AvailabiltyZoneId</code> properties in the <a>DescribeFileSystems</a> response object to get this information. Use the <code>subnetId</code> associated with the file system's Availability Zone when creating the mount target.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html">Amazon EFS: How it Works</a>. </p> <p>To create a mount target for a file system, the file system's lifecycle state must be <code>available</code>. For more information, see <a>DescribeFileSystems</a>.</p> <p>In the request, provide the following:</p> <ul> <li> <p>The file system ID for which you are creating the mount target.</p> </li> <li> <p>A subnet ID, which determines the following:</p> <ul> <li> <p>The VPC in which Amazon EFS creates the mount target</p> </li> <li> <p>The Availability Zone in which Amazon EFS creates the mount target</p> </li> <li> <p>The IP address range from which Amazon EFS selects the IP address of the mount target (if you don't specify an IP address in the request)</p> </li> </ul> </li> </ul> <p>After creating the mount target, Amazon EFS returns a response that includes, a <code>MountTargetId</code> and an <code>IpAddress</code>. You use this IP address when mounting the file system in an EC2 instance. You can also use the mount target's DNS name when mounting the file system. The EC2 instance on which you mount the file system by using the mount target can resolve the mount target's DNS name to its IP address. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation">How it Works: Implementation Overview</a>. </p> <p>Note that you can create mount targets for a file system in only one VPC, and there can be only one mount target per Availability Zone. That is, if the file system already has one or more mount targets created for it, the subnet specified in the request to add another mount target must meet the following requirements:</p> <ul> <li> <p>Must belong to the same VPC as the subnets of the existing mount targets</p> </li> <li> <p>Must not be in the same Availability Zone as any of the subnets of the existing mount targets</p> </li> </ul> <p>If the request satisfies the requirements, Amazon EFS does the following:</p> <ul> <li> <p>Creates a new mount target in the specified subnet.</p> </li> <li> <p>Also creates a new network interface in the subnet as follows:</p> <ul> <li> <p>If the request provides an <code>IpAddress</code>, Amazon EFS assigns that IP address to the network interface. Otherwise, Amazon EFS assigns a free address in the subnet (in the same way that the Amazon EC2 <code>CreateNetworkInterface</code> call does when a request does not specify a primary private IP address).</p> </li> <li> <p>If the request provides <code>SecurityGroups</code>, this network interface is associated with those security groups. Otherwise, it belongs to the default security group for the subnet's VPC.</p> </li> <li> <p>Assigns the description <code>Mount target <i>fsmt-id</i> for file system <i>fs-id</i> </code> where <code> <i>fsmt-id</i> </code> is the mount target ID, and <code> <i>fs-id</i> </code> is the <code>FileSystemId</code>.</p> </li> <li> <p>Sets the <code>requesterManaged</code> property of the network interface to <code>true</code>, and the <code>requesterId</code> value to <code>EFS</code>.</p> </li> </ul> <p>Each Amazon EFS mount target has one corresponding requester-managed EC2 network interface. After the network interface is created, Amazon EFS sets the <code>NetworkInterfaceId</code> field in the mount target's description to the network interface ID, and the <code>IpAddress</code> field to its address. If network interface creation fails, the entire <code>CreateMountTarget</code> operation fails.</p> </li> </ul> <note> <p>The <code>CreateMountTarget</code> call returns only after creating the network interface, but while the mount target state is still <code>creating</code>, you can check the mount target creation status by calling the <a>DescribeMountTargets</a> operation, which among other things returns the mount target state.</p> </note> <p>We recommend that you create a mount target in each of the Availability Zones. There are cost considerations for using a file system in an Availability Zone through a mount target created in another Availability Zone. For more information, see <a href="http://aws.amazon.com/efs/">Amazon EFS</a>. In addition, by always using a mount target local to the instance's Availability Zone, you eliminate a partial failure scenario. If the Availability Zone in which your mount target is created goes down, then you can't access your file system through that mount target. </p> <p>This operation requires permissions for the following action on the file system:</p> <ul> <li> <p> <code>elasticfilesystem:CreateMountTarget</code> </p> </li> </ul> <p>This operation also requires permissions for the following Amazon EC2 actions:</p> <ul> <li> <p> <code>ec2:DescribeSubnets</code> </p> </li> <li> <p> <code>ec2:DescribeNetworkInterfaces</code> </p> </li> <li> <p> <code>ec2:CreateNetworkInterface</code> </p> </li> </ul></p>
async fn create_mount_target(
&self,
input: CreateMountTargetRequest,
) -> Result<MountTargetDescription, RusotoError<CreateMountTargetError>>;
/// <p><note> <p>DEPRECATED - CreateTags is deprecated and not maintained. Please use the API action to create tags for EFS resources.</p> </note> <p>Creates or overwrites tags associated with a file system. Each tag is a key-value pair. If a tag key specified in the request already exists on the file system, this operation overwrites its value with the value provided in the request. If you add the <code>Name</code> tag to your file system, Amazon EFS returns it in the response to the <a>DescribeFileSystems</a> operation. </p> <p>This operation requires permission for the <code>elasticfilesystem:CreateTags</code> action.</p></p>
async fn create_tags(
&self,
input: CreateTagsRequest,
) -> Result<(), RusotoError<CreateTagsError>>;
/// <p>Deletes the specified access point. After deletion is complete, new clients can no longer connect to the access points. Clients connected to the access point at the time of deletion will continue to function until they terminate their connection.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DeleteAccessPoint</code> action.</p>
async fn delete_access_point(
&self,
input: DeleteAccessPointRequest,
) -> Result<(), RusotoError<DeleteAccessPointError>>;
/// <p>Deletes a file system, permanently severing access to its contents. Upon return, the file system no longer exists and you can't access any contents of the deleted file system.</p> <p> You can't delete a file system that is in use. That is, if the file system has any mount targets, you must first delete them. For more information, see <a>DescribeMountTargets</a> and <a>DeleteMountTarget</a>. </p> <note> <p>The <code>DeleteFileSystem</code> call returns while the file system state is still <code>deleting</code>. You can check the file system deletion status by calling the <a>DescribeFileSystems</a> operation, which returns a list of file systems in your account. If you pass file system ID or creation token for the deleted file system, the <a>DescribeFileSystems</a> returns a <code>404 FileSystemNotFound</code> error.</p> </note> <p>This operation requires permissions for the <code>elasticfilesystem:DeleteFileSystem</code> action.</p>
async fn delete_file_system(
&self,
input: DeleteFileSystemRequest,
) -> Result<(), RusotoError<DeleteFileSystemError>>;
/// <p>Deletes the <code>FileSystemPolicy</code> for the specified file system. The default <code>FileSystemPolicy</code> goes into effect once the existing policy is deleted. For more information about the default file system policy, see <a href="https://docs.aws.amazon.com/efs/latest/ug/res-based-policies-efs.html">Using Resource-based Policies with EFS</a>.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DeleteFileSystemPolicy</code> action.</p>
async fn delete_file_system_policy(
&self,
input: DeleteFileSystemPolicyRequest,
) -> Result<(), RusotoError<DeleteFileSystemPolicyError>>;
/// <p><p>Deletes the specified mount target.</p> <p>This operation forcibly breaks any mounts of the file system by using the mount target that is being deleted, which might disrupt instances or applications using those mounts. To avoid applications getting cut off abruptly, you might consider unmounting any mounts of the mount target, if feasible. The operation also deletes the associated network interface. Uncommitted writes might be lost, but breaking a mount target using this operation does not corrupt the file system itself. The file system you created remains. You can mount an EC2 instance in your VPC by using another mount target.</p> <p>This operation requires permissions for the following action on the file system:</p> <ul> <li> <p> <code>elasticfilesystem:DeleteMountTarget</code> </p> </li> </ul> <note> <p>The <code>DeleteMountTarget</code> call returns while the mount target state is still <code>deleting</code>. You can check the mount target deletion by calling the <a>DescribeMountTargets</a> operation, which returns a list of mount target descriptions for the given file system. </p> </note> <p>The operation also requires permissions for the following Amazon EC2 action on the mount target's network interface:</p> <ul> <li> <p> <code>ec2:DeleteNetworkInterface</code> </p> </li> </ul></p>
async fn delete_mount_target(
&self,
input: DeleteMountTargetRequest,
) -> Result<(), RusotoError<DeleteMountTargetError>>;
/// <p><note> <p>DEPRECATED - DeleteTags is deprecated and not maintained. Please use the API action to remove tags from EFS resources.</p> </note> <p>Deletes the specified tags from a file system. If the <code>DeleteTags</code> request includes a tag key that doesn't exist, Amazon EFS ignores it and doesn't cause an error. For more information about tags and related restrictions, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Tag Restrictions</a> in the <i>AWS Billing and Cost Management User Guide</i>.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DeleteTags</code> action.</p></p>
async fn delete_tags(
&self,
input: DeleteTagsRequest,
) -> Result<(), RusotoError<DeleteTagsError>>;
/// <p>Returns the description of a specific Amazon EFS access point if the <code>AccessPointId</code> is provided. If you provide an EFS <code>FileSystemId</code>, it returns descriptions of all access points for that file system. You can provide either an <code>AccessPointId</code> or a <code>FileSystemId</code> in the request, but not both. </p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeAccessPoints</code> action.</p>
async fn describe_access_points(
&self,
input: DescribeAccessPointsRequest,
) -> Result<DescribeAccessPointsResponse, RusotoError<DescribeAccessPointsError>>;
async fn describe_account_preferences(
&self,
input: DescribeAccountPreferencesRequest,
) -> Result<DescribeAccountPreferencesResponse, RusotoError<DescribeAccountPreferencesError>>;
/// <p>Returns the backup policy for the specified EFS file system.</p>
async fn describe_backup_policy(
&self,
input: DescribeBackupPolicyRequest,
) -> Result<BackupPolicyDescription, RusotoError<DescribeBackupPolicyError>>;
/// <p>Returns the <code>FileSystemPolicy</code> for the specified EFS file system.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeFileSystemPolicy</code> action.</p>
async fn describe_file_system_policy(
&self,
input: DescribeFileSystemPolicyRequest,
) -> Result<FileSystemPolicyDescription, RusotoError<DescribeFileSystemPolicyError>>;
/// <p>Returns the description of a specific Amazon EFS file system if either the file system <code>CreationToken</code> or the <code>FileSystemId</code> is provided. Otherwise, it returns descriptions of all file systems owned by the caller's AWS account in the AWS Region of the endpoint that you're calling.</p> <p>When retrieving all file system descriptions, you can optionally specify the <code>MaxItems</code> parameter to limit the number of descriptions in a response. Currently, this number is automatically set to 10. If more file system descriptions remain, Amazon EFS returns a <code>NextMarker</code>, an opaque token, in the response. In this case, you should send a subsequent request with the <code>Marker</code> request parameter set to the value of <code>NextMarker</code>. </p> <p>To retrieve a list of your file system descriptions, this operation is used in an iterative process, where <code>DescribeFileSystems</code> is called first without the <code>Marker</code> and then the operation continues to call it with the <code>Marker</code> parameter set to the value of the <code>NextMarker</code> from the previous response until the response has no <code>NextMarker</code>. </p> <p> The order of file systems returned in the response of one <code>DescribeFileSystems</code> call and the order of file systems returned across the responses of a multi-call iteration is unspecified. </p> <p> This operation requires permissions for the <code>elasticfilesystem:DescribeFileSystems</code> action. </p>
async fn describe_file_systems(
&self,
input: DescribeFileSystemsRequest,
) -> Result<DescribeFileSystemsResponse, RusotoError<DescribeFileSystemsError>>;
/// <p>Returns the current <code>LifecycleConfiguration</code> object for the specified Amazon EFS file system. EFS lifecycle management uses the <code>LifecycleConfiguration</code> object to identify which files to move to the EFS Infrequent Access (IA) storage class. For a file system without a <code>LifecycleConfiguration</code> object, the call returns an empty array in the response.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeLifecycleConfiguration</code> operation.</p>
async fn describe_lifecycle_configuration(
&self,
input: DescribeLifecycleConfigurationRequest,
) -> Result<LifecycleConfigurationDescription, RusotoError<DescribeLifecycleConfigurationError>>;
/// <p><p>Returns the security groups currently in effect for a mount target. This operation requires that the network interface of the mount target has been created and the lifecycle state of the mount target is not <code>deleted</code>.</p> <p>This operation requires permissions for the following actions:</p> <ul> <li> <p> <code>elasticfilesystem:DescribeMountTargetSecurityGroups</code> action on the mount target's file system. </p> </li> <li> <p> <code>ec2:DescribeNetworkInterfaceAttribute</code> action on the mount target's network interface. </p> </li> </ul></p>
async fn describe_mount_target_security_groups(
&self,
input: DescribeMountTargetSecurityGroupsRequest,
) -> Result<
DescribeMountTargetSecurityGroupsResponse,
RusotoError<DescribeMountTargetSecurityGroupsError>,
>;
/// <p>Returns the descriptions of all the current mount targets, or a specific mount target, for a file system. When requesting all of the current mount targets, the order of mount targets returned in the response is unspecified.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeMountTargets</code> action, on either the file system ID that you specify in <code>FileSystemId</code>, or on the file system of the mount target that you specify in <code>MountTargetId</code>.</p>
async fn describe_mount_targets(
&self,
input: DescribeMountTargetsRequest,
) -> Result<DescribeMountTargetsResponse, RusotoError<DescribeMountTargetsError>>;
/// <p><note> <p>DEPRECATED - The DeleteTags action is deprecated and not maintained. Please use the API action to remove tags from EFS resources.</p> </note> <p>Returns the tags associated with a file system. The order of tags returned in the response of one <code>DescribeTags</code> call and the order of tags returned across the responses of a multiple-call iteration (when using pagination) is unspecified. </p> <p> This operation requires permissions for the <code>elasticfilesystem:DescribeTags</code> action. </p></p>
async fn describe_tags(
&self,
input: DescribeTagsRequest,
) -> Result<DescribeTagsResponse, RusotoError<DescribeTagsError>>;
/// <p>Lists all tags for a top-level EFS resource. You must provide the ID of the resource that you want to retrieve the tags for.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeAccessPoints</code> action.</p>
async fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
/// <p><p>Modifies the set of security groups in effect for a mount target.</p> <p>When you create a mount target, Amazon EFS also creates a new network interface. For more information, see <a>CreateMountTarget</a>. This operation replaces the security groups in effect for the network interface associated with a mount target, with the <code>SecurityGroups</code> provided in the request. This operation requires that the network interface of the mount target has been created and the lifecycle state of the mount target is not <code>deleted</code>. </p> <p>The operation requires permissions for the following actions:</p> <ul> <li> <p> <code>elasticfilesystem:ModifyMountTargetSecurityGroups</code> action on the mount target's file system. </p> </li> <li> <p> <code>ec2:ModifyNetworkInterfaceAttribute</code> action on the mount target's network interface. </p> </li> </ul></p>
async fn modify_mount_target_security_groups(
&self,
input: ModifyMountTargetSecurityGroupsRequest,
) -> Result<(), RusotoError<ModifyMountTargetSecurityGroupsError>>;
async fn put_account_preferences(
&self,
input: PutAccountPreferencesRequest,
) -> Result<PutAccountPreferencesResponse, RusotoError<PutAccountPreferencesError>>;
/// <p>Updates the file system's backup policy. Use this action to start or stop automatic backups of the file system. </p>
async fn put_backup_policy(
&self,
input: PutBackupPolicyRequest,
) -> Result<BackupPolicyDescription, RusotoError<PutBackupPolicyError>>;
/// <p>Applies an Amazon EFS <code>FileSystemPolicy</code> to an Amazon EFS file system. A file system policy is an IAM resource-based policy and can contain multiple policy statements. A file system always has exactly one file system policy, which can be the default policy or an explicit policy set or updated using this API operation. EFS file system policies have a 20,000 character limit. When an explicit policy is set, it overrides the default policy. For more information about the default file system policy, see <a href="https://docs.aws.amazon.com/efs/latest/ug/iam-access-control-nfs-efs.html#default-filesystempolicy">Default EFS File System Policy</a>. </p> <p>EFS file system policies have a 20,000 character limit.</p> <p>This operation requires permissions for the <code>elasticfilesystem:PutFileSystemPolicy</code> action.</p>
async fn put_file_system_policy(
&self,
input: PutFileSystemPolicyRequest,
) -> Result<FileSystemPolicyDescription, RusotoError<PutFileSystemPolicyError>>;
/// <p>Enables lifecycle management by creating a new <code>LifecycleConfiguration</code> object. A <code>LifecycleConfiguration</code> object defines when files in an Amazon EFS file system are automatically transitioned to the lower-cost EFS Infrequent Access (IA) storage class. A <code>LifecycleConfiguration</code> applies to all files in a file system.</p> <p>Each Amazon EFS file system supports one lifecycle configuration, which applies to all files in the file system. If a <code>LifecycleConfiguration</code> object already exists for the specified file system, a <code>PutLifecycleConfiguration</code> call modifies the existing configuration. A <code>PutLifecycleConfiguration</code> call with an empty <code>LifecyclePolicies</code> array in the request body deletes any existing <code>LifecycleConfiguration</code> and disables lifecycle management.</p> <p>In the request, specify the following: </p> <ul> <li> <p>The ID for the file system for which you are enabling, disabling, or modifying lifecycle management.</p> </li> <li> <p>A <code>LifecyclePolicies</code> array of <code>LifecyclePolicy</code> objects that define when files are moved to the IA storage class. The array can contain only one <code>LifecyclePolicy</code> item.</p> </li> </ul> <p>This operation requires permissions for the <code>elasticfilesystem:PutLifecycleConfiguration</code> operation.</p> <p>To apply a <code>LifecycleConfiguration</code> object to an encrypted file system, you need the same AWS Key Management Service (AWS KMS) permissions as when you created the encrypted file system. </p>
async fn put_lifecycle_configuration(
&self,
input: PutLifecycleConfigurationRequest,
) -> Result<LifecycleConfigurationDescription, RusotoError<PutLifecycleConfigurationError>>;
/// <p>Creates a tag for an EFS resource. You can create tags for EFS file systems and access points using this API operation.</p> <p>This operation requires permissions for the <code>elasticfilesystem:TagResource</code> action.</p>
async fn tag_resource(
&self,
input: TagResourceRequest,
) -> Result<(), RusotoError<TagResourceError>>;
/// <p>Removes tags from an EFS resource. You can remove tags from EFS file systems and access points using this API operation.</p> <p>This operation requires permissions for the <code>elasticfilesystem:UntagResource</code> action.</p>
async fn untag_resource(
&self,
input: UntagResourceRequest,
) -> Result<(), RusotoError<UntagResourceError>>;
/// <p>Updates the throughput mode or the amount of provisioned throughput of an existing file system.</p>
async fn update_file_system(
&self,
input: UpdateFileSystemRequest,
) -> Result<FileSystemDescription, RusotoError<UpdateFileSystemError>>;
}
/// A client for the EFS API.
#[derive(Clone)]
pub struct EfsClient {
client: Client,
region: region::Region,
}
impl EfsClient {
/// Creates a client backed by the default tokio event loop.
///
/// The client will use the default credentials provider and tls client.
pub fn new(region: region::Region) -> EfsClient {
EfsClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> EfsClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
D: DispatchSignedRequest + Send + Sync + 'static,
{
EfsClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
pub fn new_with_client(client: Client, region: region::Region) -> EfsClient {
EfsClient { client, region }
}
}
#[async_trait]
impl Efs for EfsClient {
/// <p>Creates an EFS access point. An access point is an application-specific view into an EFS file system that applies an operating system user and group, and a file system path, to any file system request made through the access point. The operating system user and group override any identity information provided by the NFS client. The file system path is exposed as the access point's root directory. Applications using the access point can only access data in its own directory and below. To learn more, see <a href="https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html">Mounting a file system using EFS access points</a>.</p> <p>This operation requires permissions for the <code>elasticfilesystem:CreateAccessPoint</code> action.</p>
#[allow(unused_mut)]
async fn create_access_point(
&self,
input: CreateAccessPointRequest,
) -> Result<AccessPointDescription, RusotoError<CreateAccessPointError>> {
let request_uri = "/2015-02-01/access-points";
let mut request =
SignedRequest::new("POST", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AccessPointDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateAccessPointError::from_response(response))
}
}
/// <p>Creates a new, empty file system. The operation requires a creation token in the request that Amazon EFS uses to ensure idempotent creation (calling the operation with same creation token has no effect). If a file system does not currently exist that is owned by the caller's AWS account with the specified creation token, this operation does the following:</p> <ul> <li> <p>Creates a new, empty file system. The file system will have an Amazon EFS assigned ID, and an initial lifecycle state <code>creating</code>.</p> </li> <li> <p>Returns with the description of the created file system.</p> </li> </ul> <p>Otherwise, this operation returns a <code>FileSystemAlreadyExists</code> error with the ID of the existing file system.</p> <note> <p>For basic use cases, you can use a randomly generated UUID for the creation token.</p> </note> <p> The idempotent operation allows you to retry a <code>CreateFileSystem</code> call without risk of creating an extra file system. This can happen when an initial call fails in a way that leaves it uncertain whether or not a file system was actually created. An example might be that a transport level timeout occurred or your connection was reset. As long as you use the same creation token, if the initial call had succeeded in creating a file system, the client can learn of its existence from the <code>FileSystemAlreadyExists</code> error.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html#creating-using-create-fs-part1">Creating a file system</a> in the <i>Amazon EFS User Guide</i>.</p> <note> <p>The <code>CreateFileSystem</code> call returns while the file system's lifecycle state is still <code>creating</code>. You can check the file system creation status by calling the <a>DescribeFileSystems</a> operation, which among other things returns the file system state.</p> </note> <p>This operation accepts an optional <code>PerformanceMode</code> parameter that you choose for your file system. We recommend <code>generalPurpose</code> performance mode for most file systems. File systems using the <code>maxIO</code> performance mode can scale to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for most file operations. The performance mode can't be changed after the file system has been created. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/performance.html#performancemodes.html">Amazon EFS performance modes</a>.</p> <p>You can set the throughput mode for the file system using the <code>ThroughputMode</code> parameter.</p> <p>After the file system is fully created, Amazon EFS sets its lifecycle state to <code>available</code>, at which point you can create one or more mount targets for the file system in your VPC. For more information, see <a>CreateMountTarget</a>. You mount your Amazon EFS file system on an EC2 instances in your VPC by using the mount target. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html">Amazon EFS: How it Works</a>. </p> <p> This operation requires permissions for the <code>elasticfilesystem:CreateFileSystem</code> action. </p>
#[allow(unused_mut)]
async fn create_file_system(
&self,
input: CreateFileSystemRequest,
) -> Result<FileSystemDescription, RusotoError<CreateFileSystemError>> {
let request_uri = "/2015-02-01/file-systems";
let mut request =
SignedRequest::new("POST", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<FileSystemDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateFileSystemError::from_response(response))
}
}
/// <p><p>Creates a mount target for a file system. You can then mount the file system on EC2 instances by using the mount target.</p> <p>You can create one mount target in each Availability Zone in your VPC. All EC2 instances in a VPC within a given Availability Zone share a single mount target for a given file system. If you have multiple subnets in an Availability Zone, you create a mount target in one of the subnets. EC2 instances do not need to be in the same subnet as the mount target in order to access their file system.</p> <p>You can create only one mount target for an EFS file system using One Zone storage classes. You must create that mount target in the same Availability Zone in which the file system is located. Use the <code>AvailabilityZoneName</code> and <code>AvailabiltyZoneId</code> properties in the <a>DescribeFileSystems</a> response object to get this information. Use the <code>subnetId</code> associated with the file system's Availability Zone when creating the mount target.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html">Amazon EFS: How it Works</a>. </p> <p>To create a mount target for a file system, the file system's lifecycle state must be <code>available</code>. For more information, see <a>DescribeFileSystems</a>.</p> <p>In the request, provide the following:</p> <ul> <li> <p>The file system ID for which you are creating the mount target.</p> </li> <li> <p>A subnet ID, which determines the following:</p> <ul> <li> <p>The VPC in which Amazon EFS creates the mount target</p> </li> <li> <p>The Availability Zone in which Amazon EFS creates the mount target</p> </li> <li> <p>The IP address range from which Amazon EFS selects the IP address of the mount target (if you don't specify an IP address in the request)</p> </li> </ul> </li> </ul> <p>After creating the mount target, Amazon EFS returns a response that includes, a <code>MountTargetId</code> and an <code>IpAddress</code>. You use this IP address when mounting the file system in an EC2 instance. You can also use the mount target's DNS name when mounting the file system. The EC2 instance on which you mount the file system by using the mount target can resolve the mount target's DNS name to its IP address. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation">How it Works: Implementation Overview</a>. </p> <p>Note that you can create mount targets for a file system in only one VPC, and there can be only one mount target per Availability Zone. That is, if the file system already has one or more mount targets created for it, the subnet specified in the request to add another mount target must meet the following requirements:</p> <ul> <li> <p>Must belong to the same VPC as the subnets of the existing mount targets</p> </li> <li> <p>Must not be in the same Availability Zone as any of the subnets of the existing mount targets</p> </li> </ul> <p>If the request satisfies the requirements, Amazon EFS does the following:</p> <ul> <li> <p>Creates a new mount target in the specified subnet.</p> </li> <li> <p>Also creates a new network interface in the subnet as follows:</p> <ul> <li> <p>If the request provides an <code>IpAddress</code>, Amazon EFS assigns that IP address to the network interface. Otherwise, Amazon EFS assigns a free address in the subnet (in the same way that the Amazon EC2 <code>CreateNetworkInterface</code> call does when a request does not specify a primary private IP address).</p> </li> <li> <p>If the request provides <code>SecurityGroups</code>, this network interface is associated with those security groups. Otherwise, it belongs to the default security group for the subnet's VPC.</p> </li> <li> <p>Assigns the description <code>Mount target <i>fsmt-id</i> for file system <i>fs-id</i> </code> where <code> <i>fsmt-id</i> </code> is the mount target ID, and <code> <i>fs-id</i> </code> is the <code>FileSystemId</code>.</p> </li> <li> <p>Sets the <code>requesterManaged</code> property of the network interface to <code>true</code>, and the <code>requesterId</code> value to <code>EFS</code>.</p> </li> </ul> <p>Each Amazon EFS mount target has one corresponding requester-managed EC2 network interface. After the network interface is created, Amazon EFS sets the <code>NetworkInterfaceId</code> field in the mount target's description to the network interface ID, and the <code>IpAddress</code> field to its address. If network interface creation fails, the entire <code>CreateMountTarget</code> operation fails.</p> </li> </ul> <note> <p>The <code>CreateMountTarget</code> call returns only after creating the network interface, but while the mount target state is still <code>creating</code>, you can check the mount target creation status by calling the <a>DescribeMountTargets</a> operation, which among other things returns the mount target state.</p> </note> <p>We recommend that you create a mount target in each of the Availability Zones. There are cost considerations for using a file system in an Availability Zone through a mount target created in another Availability Zone. For more information, see <a href="http://aws.amazon.com/efs/">Amazon EFS</a>. In addition, by always using a mount target local to the instance's Availability Zone, you eliminate a partial failure scenario. If the Availability Zone in which your mount target is created goes down, then you can't access your file system through that mount target. </p> <p>This operation requires permissions for the following action on the file system:</p> <ul> <li> <p> <code>elasticfilesystem:CreateMountTarget</code> </p> </li> </ul> <p>This operation also requires permissions for the following Amazon EC2 actions:</p> <ul> <li> <p> <code>ec2:DescribeSubnets</code> </p> </li> <li> <p> <code>ec2:DescribeNetworkInterfaces</code> </p> </li> <li> <p> <code>ec2:CreateNetworkInterface</code> </p> </li> </ul></p>
#[allow(unused_mut)]
async fn create_mount_target(
&self,
input: CreateMountTargetRequest,
) -> Result<MountTargetDescription, RusotoError<CreateMountTargetError>> {
let request_uri = "/2015-02-01/mount-targets";
let mut request =
SignedRequest::new("POST", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<MountTargetDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateMountTargetError::from_response(response))
}
}
/// <p><note> <p>DEPRECATED - CreateTags is deprecated and not maintained. Please use the API action to create tags for EFS resources.</p> </note> <p>Creates or overwrites tags associated with a file system. Each tag is a key-value pair. If a tag key specified in the request already exists on the file system, this operation overwrites its value with the value provided in the request. If you add the <code>Name</code> tag to your file system, Amazon EFS returns it in the response to the <a>DescribeFileSystems</a> operation. </p> <p>This operation requires permission for the <code>elasticfilesystem:CreateTags</code> action.</p></p>
#[allow(unused_mut)]
async fn create_tags(
&self,
input: CreateTagsRequest,
) -> Result<(), RusotoError<CreateTagsError>> {
let request_uri = format!(
"/2015-02-01/create-tags/{file_system_id}",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("POST", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateTagsError::from_response(response))
}
}
/// <p>Deletes the specified access point. After deletion is complete, new clients can no longer connect to the access points. Clients connected to the access point at the time of deletion will continue to function until they terminate their connection.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DeleteAccessPoint</code> action.</p>
#[allow(unused_mut)]
async fn delete_access_point(
&self,
input: DeleteAccessPointRequest,
) -> Result<(), RusotoError<DeleteAccessPointError>> {
let request_uri = format!(
"/2015-02-01/access-points/{access_point_id}",
access_point_id = input.access_point_id
);
let mut request =
SignedRequest::new("DELETE", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteAccessPointError::from_response(response))
}
}
/// <p>Deletes a file system, permanently severing access to its contents. Upon return, the file system no longer exists and you can't access any contents of the deleted file system.</p> <p> You can't delete a file system that is in use. That is, if the file system has any mount targets, you must first delete them. For more information, see <a>DescribeMountTargets</a> and <a>DeleteMountTarget</a>. </p> <note> <p>The <code>DeleteFileSystem</code> call returns while the file system state is still <code>deleting</code>. You can check the file system deletion status by calling the <a>DescribeFileSystems</a> operation, which returns a list of file systems in your account. If you pass file system ID or creation token for the deleted file system, the <a>DescribeFileSystems</a> returns a <code>404 FileSystemNotFound</code> error.</p> </note> <p>This operation requires permissions for the <code>elasticfilesystem:DeleteFileSystem</code> action.</p>
#[allow(unused_mut)]
async fn delete_file_system(
&self,
input: DeleteFileSystemRequest,
) -> Result<(), RusotoError<DeleteFileSystemError>> {
let request_uri = format!(
"/2015-02-01/file-systems/{file_system_id}",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("DELETE", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteFileSystemError::from_response(response))
}
}
/// <p>Deletes the <code>FileSystemPolicy</code> for the specified file system. The default <code>FileSystemPolicy</code> goes into effect once the existing policy is deleted. For more information about the default file system policy, see <a href="https://docs.aws.amazon.com/efs/latest/ug/res-based-policies-efs.html">Using Resource-based Policies with EFS</a>.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DeleteFileSystemPolicy</code> action.</p>
#[allow(unused_mut)]
async fn delete_file_system_policy(
&self,
input: DeleteFileSystemPolicyRequest,
) -> Result<(), RusotoError<DeleteFileSystemPolicyError>> {
let request_uri = format!(
"/2015-02-01/file-systems/{file_system_id}/policy",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("DELETE", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteFileSystemPolicyError::from_response(response))
}
}
/// <p><p>Deletes the specified mount target.</p> <p>This operation forcibly breaks any mounts of the file system by using the mount target that is being deleted, which might disrupt instances or applications using those mounts. To avoid applications getting cut off abruptly, you might consider unmounting any mounts of the mount target, if feasible. The operation also deletes the associated network interface. Uncommitted writes might be lost, but breaking a mount target using this operation does not corrupt the file system itself. The file system you created remains. You can mount an EC2 instance in your VPC by using another mount target.</p> <p>This operation requires permissions for the following action on the file system:</p> <ul> <li> <p> <code>elasticfilesystem:DeleteMountTarget</code> </p> </li> </ul> <note> <p>The <code>DeleteMountTarget</code> call returns while the mount target state is still <code>deleting</code>. You can check the mount target deletion by calling the <a>DescribeMountTargets</a> operation, which returns a list of mount target descriptions for the given file system. </p> </note> <p>The operation also requires permissions for the following Amazon EC2 action on the mount target's network interface:</p> <ul> <li> <p> <code>ec2:DeleteNetworkInterface</code> </p> </li> </ul></p>
#[allow(unused_mut)]
async fn delete_mount_target(
&self,
input: DeleteMountTargetRequest,
) -> Result<(), RusotoError<DeleteMountTargetError>> {
let request_uri = format!(
"/2015-02-01/mount-targets/{mount_target_id}",
mount_target_id = input.mount_target_id
);
let mut request =
SignedRequest::new("DELETE", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteMountTargetError::from_response(response))
}
}
/// <p><note> <p>DEPRECATED - DeleteTags is deprecated and not maintained. Please use the API action to remove tags from EFS resources.</p> </note> <p>Deletes the specified tags from a file system. If the <code>DeleteTags</code> request includes a tag key that doesn't exist, Amazon EFS ignores it and doesn't cause an error. For more information about tags and related restrictions, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Tag Restrictions</a> in the <i>AWS Billing and Cost Management User Guide</i>.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DeleteTags</code> action.</p></p>
#[allow(unused_mut)]
async fn delete_tags(
&self,
input: DeleteTagsRequest,
) -> Result<(), RusotoError<DeleteTagsError>> {
let request_uri = format!(
"/2015-02-01/delete-tags/{file_system_id}",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("POST", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteTagsError::from_response(response))
}
}
/// <p>Returns the description of a specific Amazon EFS access point if the <code>AccessPointId</code> is provided. If you provide an EFS <code>FileSystemId</code>, it returns descriptions of all access points for that file system. You can provide either an <code>AccessPointId</code> or a <code>FileSystemId</code> in the request, but not both. </p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeAccessPoints</code> action.</p>
#[allow(unused_mut)]
async fn describe_access_points(
&self,
input: DescribeAccessPointsRequest,
) -> Result<DescribeAccessPointsResponse, RusotoError<DescribeAccessPointsError>> {
let request_uri = "/2015-02-01/access-points";
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.access_point_id {
params.put("AccessPointId", x);
}
if let Some(ref x) = input.file_system_id {
params.put("FileSystemId", x);
}
if let Some(ref x) = input.max_results {
params.put("MaxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("NextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeAccessPointsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeAccessPointsError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_account_preferences(
&self,
input: DescribeAccountPreferencesRequest,
) -> Result<DescribeAccountPreferencesResponse, RusotoError<DescribeAccountPreferencesError>>
{
let request_uri = "/2015-02-01/account-preferences";
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeAccountPreferencesResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeAccountPreferencesError::from_response(response))
}
}
/// <p>Returns the backup policy for the specified EFS file system.</p>
#[allow(unused_mut)]
async fn describe_backup_policy(
&self,
input: DescribeBackupPolicyRequest,
) -> Result<BackupPolicyDescription, RusotoError<DescribeBackupPolicyError>> {
let request_uri = format!(
"/2015-02-01/file-systems/{file_system_id}/backup-policy",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BackupPolicyDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeBackupPolicyError::from_response(response))
}
}
/// <p>Returns the <code>FileSystemPolicy</code> for the specified EFS file system.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeFileSystemPolicy</code> action.</p>
#[allow(unused_mut)]
async fn describe_file_system_policy(
&self,
input: DescribeFileSystemPolicyRequest,
) -> Result<FileSystemPolicyDescription, RusotoError<DescribeFileSystemPolicyError>> {
let request_uri = format!(
"/2015-02-01/file-systems/{file_system_id}/policy",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<FileSystemPolicyDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeFileSystemPolicyError::from_response(response))
}
}
/// <p>Returns the description of a specific Amazon EFS file system if either the file system <code>CreationToken</code> or the <code>FileSystemId</code> is provided. Otherwise, it returns descriptions of all file systems owned by the caller's AWS account in the AWS Region of the endpoint that you're calling.</p> <p>When retrieving all file system descriptions, you can optionally specify the <code>MaxItems</code> parameter to limit the number of descriptions in a response. Currently, this number is automatically set to 10. If more file system descriptions remain, Amazon EFS returns a <code>NextMarker</code>, an opaque token, in the response. In this case, you should send a subsequent request with the <code>Marker</code> request parameter set to the value of <code>NextMarker</code>. </p> <p>To retrieve a list of your file system descriptions, this operation is used in an iterative process, where <code>DescribeFileSystems</code> is called first without the <code>Marker</code> and then the operation continues to call it with the <code>Marker</code> parameter set to the value of the <code>NextMarker</code> from the previous response until the response has no <code>NextMarker</code>. </p> <p> The order of file systems returned in the response of one <code>DescribeFileSystems</code> call and the order of file systems returned across the responses of a multi-call iteration is unspecified. </p> <p> This operation requires permissions for the <code>elasticfilesystem:DescribeFileSystems</code> action. </p>
#[allow(unused_mut)]
async fn describe_file_systems(
&self,
input: DescribeFileSystemsRequest,
) -> Result<DescribeFileSystemsResponse, RusotoError<DescribeFileSystemsError>> {
let request_uri = "/2015-02-01/file-systems";
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.creation_token {
params.put("CreationToken", x);
}
if let Some(ref x) = input.file_system_id {
params.put("FileSystemId", x);
}
if let Some(ref x) = input.marker {
params.put("Marker", x);
}
if let Some(ref x) = input.max_items {
params.put("MaxItems", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeFileSystemsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeFileSystemsError::from_response(response))
}
}
/// <p>Returns the current <code>LifecycleConfiguration</code> object for the specified Amazon EFS file system. EFS lifecycle management uses the <code>LifecycleConfiguration</code> object to identify which files to move to the EFS Infrequent Access (IA) storage class. For a file system without a <code>LifecycleConfiguration</code> object, the call returns an empty array in the response.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeLifecycleConfiguration</code> operation.</p>
#[allow(unused_mut)]
async fn describe_lifecycle_configuration(
&self,
input: DescribeLifecycleConfigurationRequest,
) -> Result<LifecycleConfigurationDescription, RusotoError<DescribeLifecycleConfigurationError>>
{
let request_uri = format!(
"/2015-02-01/file-systems/{file_system_id}/lifecycle-configuration",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<LifecycleConfigurationDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeLifecycleConfigurationError::from_response(response))
}
}
/// <p><p>Returns the security groups currently in effect for a mount target. This operation requires that the network interface of the mount target has been created and the lifecycle state of the mount target is not <code>deleted</code>.</p> <p>This operation requires permissions for the following actions:</p> <ul> <li> <p> <code>elasticfilesystem:DescribeMountTargetSecurityGroups</code> action on the mount target's file system. </p> </li> <li> <p> <code>ec2:DescribeNetworkInterfaceAttribute</code> action on the mount target's network interface. </p> </li> </ul></p>
#[allow(unused_mut)]
async fn describe_mount_target_security_groups(
&self,
input: DescribeMountTargetSecurityGroupsRequest,
) -> Result<
DescribeMountTargetSecurityGroupsResponse,
RusotoError<DescribeMountTargetSecurityGroupsError>,
> {
let request_uri = format!(
"/2015-02-01/mount-targets/{mount_target_id}/security-groups",
mount_target_id = input.mount_target_id
);
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeMountTargetSecurityGroupsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeMountTargetSecurityGroupsError::from_response(
response,
))
}
}
/// <p>Returns the descriptions of all the current mount targets, or a specific mount target, for a file system. When requesting all of the current mount targets, the order of mount targets returned in the response is unspecified.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeMountTargets</code> action, on either the file system ID that you specify in <code>FileSystemId</code>, or on the file system of the mount target that you specify in <code>MountTargetId</code>.</p>
#[allow(unused_mut)]
async fn describe_mount_targets(
&self,
input: DescribeMountTargetsRequest,
) -> Result<DescribeMountTargetsResponse, RusotoError<DescribeMountTargetsError>> {
let request_uri = "/2015-02-01/mount-targets";
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.access_point_id {
params.put("AccessPointId", x);
}
if let Some(ref x) = input.file_system_id {
params.put("FileSystemId", x);
}
if let Some(ref x) = input.marker {
params.put("Marker", x);
}
if let Some(ref x) = input.max_items {
params.put("MaxItems", x);
}
if let Some(ref x) = input.mount_target_id {
params.put("MountTargetId", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeMountTargetsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeMountTargetsError::from_response(response))
}
}
/// <p><note> <p>DEPRECATED - The DeleteTags action is deprecated and not maintained. Please use the API action to remove tags from EFS resources.</p> </note> <p>Returns the tags associated with a file system. The order of tags returned in the response of one <code>DescribeTags</code> call and the order of tags returned across the responses of a multiple-call iteration (when using pagination) is unspecified. </p> <p> This operation requires permissions for the <code>elasticfilesystem:DescribeTags</code> action. </p></p>
#[allow(unused_mut)]
async fn describe_tags(
&self,
input: DescribeTagsRequest,
) -> Result<DescribeTagsResponse, RusotoError<DescribeTagsError>> {
let request_uri = format!(
"/2015-02-01/tags/{file_system_id}/",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.marker {
params.put("Marker", x);
}
if let Some(ref x) = input.max_items {
params.put("MaxItems", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeTagsResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeTagsError::from_response(response))
}
}
/// <p>Lists all tags for a top-level EFS resource. You must provide the ID of the resource that you want to retrieve the tags for.</p> <p>This operation requires permissions for the <code>elasticfilesystem:DescribeAccessPoints</code> action.</p>
#[allow(unused_mut)]
async fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
let request_uri = format!(
"/2015-02-01/resource-tags/{resource_id}",
resource_id = input.resource_id
);
let mut request =
SignedRequest::new("GET", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("MaxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("NextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListTagsForResourceError::from_response(response))
}
}
/// <p><p>Modifies the set of security groups in effect for a mount target.</p> <p>When you create a mount target, Amazon EFS also creates a new network interface. For more information, see <a>CreateMountTarget</a>. This operation replaces the security groups in effect for the network interface associated with a mount target, with the <code>SecurityGroups</code> provided in the request. This operation requires that the network interface of the mount target has been created and the lifecycle state of the mount target is not <code>deleted</code>. </p> <p>The operation requires permissions for the following actions:</p> <ul> <li> <p> <code>elasticfilesystem:ModifyMountTargetSecurityGroups</code> action on the mount target's file system. </p> </li> <li> <p> <code>ec2:ModifyNetworkInterfaceAttribute</code> action on the mount target's network interface. </p> </li> </ul></p>
#[allow(unused_mut)]
async fn modify_mount_target_security_groups(
&self,
input: ModifyMountTargetSecurityGroupsRequest,
) -> Result<(), RusotoError<ModifyMountTargetSecurityGroupsError>> {
let request_uri = format!(
"/2015-02-01/mount-targets/{mount_target_id}/security-groups",
mount_target_id = input.mount_target_id
);
let mut request =
SignedRequest::new("PUT", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ModifyMountTargetSecurityGroupsError::from_response(
response,
))
}
}
#[allow(unused_mut)]
async fn put_account_preferences(
&self,
input: PutAccountPreferencesRequest,
) -> Result<PutAccountPreferencesResponse, RusotoError<PutAccountPreferencesError>> {
let request_uri = "/2015-02-01/account-preferences";
let mut request =
SignedRequest::new("PUT", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<PutAccountPreferencesResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutAccountPreferencesError::from_response(response))
}
}
/// <p>Updates the file system's backup policy. Use this action to start or stop automatic backups of the file system. </p>
#[allow(unused_mut)]
async fn put_backup_policy(
&self,
input: PutBackupPolicyRequest,
) -> Result<BackupPolicyDescription, RusotoError<PutBackupPolicyError>> {
let request_uri = format!(
"/2015-02-01/file-systems/{file_system_id}/backup-policy",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("PUT", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BackupPolicyDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutBackupPolicyError::from_response(response))
}
}
/// <p>Applies an Amazon EFS <code>FileSystemPolicy</code> to an Amazon EFS file system. A file system policy is an IAM resource-based policy and can contain multiple policy statements. A file system always has exactly one file system policy, which can be the default policy or an explicit policy set or updated using this API operation. EFS file system policies have a 20,000 character limit. When an explicit policy is set, it overrides the default policy. For more information about the default file system policy, see <a href="https://docs.aws.amazon.com/efs/latest/ug/iam-access-control-nfs-efs.html#default-filesystempolicy">Default EFS File System Policy</a>. </p> <p>EFS file system policies have a 20,000 character limit.</p> <p>This operation requires permissions for the <code>elasticfilesystem:PutFileSystemPolicy</code> action.</p>
#[allow(unused_mut)]
async fn put_file_system_policy(
&self,
input: PutFileSystemPolicyRequest,
) -> Result<FileSystemPolicyDescription, RusotoError<PutFileSystemPolicyError>> {
let request_uri = format!(
"/2015-02-01/file-systems/{file_system_id}/policy",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("PUT", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<FileSystemPolicyDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutFileSystemPolicyError::from_response(response))
}
}
/// <p>Enables lifecycle management by creating a new <code>LifecycleConfiguration</code> object. A <code>LifecycleConfiguration</code> object defines when files in an Amazon EFS file system are automatically transitioned to the lower-cost EFS Infrequent Access (IA) storage class. A <code>LifecycleConfiguration</code> applies to all files in a file system.</p> <p>Each Amazon EFS file system supports one lifecycle configuration, which applies to all files in the file system. If a <code>LifecycleConfiguration</code> object already exists for the specified file system, a <code>PutLifecycleConfiguration</code> call modifies the existing configuration. A <code>PutLifecycleConfiguration</code> call with an empty <code>LifecyclePolicies</code> array in the request body deletes any existing <code>LifecycleConfiguration</code> and disables lifecycle management.</p> <p>In the request, specify the following: </p> <ul> <li> <p>The ID for the file system for which you are enabling, disabling, or modifying lifecycle management.</p> </li> <li> <p>A <code>LifecyclePolicies</code> array of <code>LifecyclePolicy</code> objects that define when files are moved to the IA storage class. The array can contain only one <code>LifecyclePolicy</code> item.</p> </li> </ul> <p>This operation requires permissions for the <code>elasticfilesystem:PutLifecycleConfiguration</code> operation.</p> <p>To apply a <code>LifecycleConfiguration</code> object to an encrypted file system, you need the same AWS Key Management Service (AWS KMS) permissions as when you created the encrypted file system. </p>
#[allow(unused_mut)]
async fn put_lifecycle_configuration(
&self,
input: PutLifecycleConfigurationRequest,
) -> Result<LifecycleConfigurationDescription, RusotoError<PutLifecycleConfigurationError>>
{
let request_uri = format!(
"/2015-02-01/file-systems/{file_system_id}/lifecycle-configuration",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("PUT", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<LifecycleConfigurationDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutLifecycleConfigurationError::from_response(response))
}
}
/// <p>Creates a tag for an EFS resource. You can create tags for EFS file systems and access points using this API operation.</p> <p>This operation requires permissions for the <code>elasticfilesystem:TagResource</code> action.</p>
#[allow(unused_mut)]
async fn tag_resource(
&self,
input: TagResourceRequest,
) -> Result<(), RusotoError<TagResourceError>> {
let request_uri = format!(
"/2015-02-01/resource-tags/{resource_id}",
resource_id = input.resource_id
);
let mut request =
SignedRequest::new("POST", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(TagResourceError::from_response(response))
}
}
/// <p>Removes tags from an EFS resource. You can remove tags from EFS file systems and access points using this API operation.</p> <p>This operation requires permissions for the <code>elasticfilesystem:UntagResource</code> action.</p>
#[allow(unused_mut)]
async fn untag_resource(
&self,
input: UntagResourceRequest,
) -> Result<(), RusotoError<UntagResourceError>> {
let request_uri = format!(
"/2015-02-01/resource-tags/{resource_id}",
resource_id = input.resource_id
);
let mut request =
SignedRequest::new("DELETE", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
for item in input.tag_keys.iter() {
params.put("tagKeys", item);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UntagResourceError::from_response(response))
}
}
/// <p>Updates the throughput mode or the amount of provisioned throughput of an existing file system.</p>
#[allow(unused_mut)]
async fn update_file_system(
&self,
input: UpdateFileSystemRequest,
) -> Result<FileSystemDescription, RusotoError<UpdateFileSystemError>> {
let request_uri = format!(
"/2015-02-01/file-systems/{file_system_id}",
file_system_id = input.file_system_id
);
let mut request =
SignedRequest::new("PUT", "elasticfilesystem", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<FileSystemDescription, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateFileSystemError::from_response(response))
}
}
}