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 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144
// ================================================================= // // * 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::proto; use rusoto_core::request::HttpResponse; use rusoto_core::signature::SignedRequest; #[allow(unused_imports)] use serde::{Deserialize, Serialize}; impl EmrClient { fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest { let mut request = SignedRequest::new(http_method, "elasticmapreduce", &self.region, request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request } async fn sign_and_dispatch<E>( &self, request: SignedRequest, from_response: fn(BufferedHttpResponse) -> RusotoError<E>, ) -> Result<HttpResponse, RusotoError<E>> { let mut response = self.client.sign_and_dispatch(request).await?; if !response.status.is_success() { let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; return Err(from_response(response)); } Ok(response) } } use serde_json; #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct AddInstanceFleetInput { /// <p>The unique identifier of the cluster.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>Specifies the configuration of the instance fleet.</p> #[serde(rename = "InstanceFleet")] pub instance_fleet: InstanceFleetConfig, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct AddInstanceFleetOutput { /// <p>The Amazon Resource Name of the cluster.</p> #[serde(rename = "ClusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>The unique identifier of the cluster.</p> #[serde(rename = "ClusterId")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_id: Option<String>, /// <p>The unique identifier of the instance fleet.</p> #[serde(rename = "InstanceFleetId")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_fleet_id: Option<String>, } /// <p>Input to an AddInstanceGroups call.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct AddInstanceGroupsInput { /// <p>Instance groups to add.</p> #[serde(rename = "InstanceGroups")] pub instance_groups: Vec<InstanceGroupConfig>, /// <p>Job flow in which to add the instance groups.</p> #[serde(rename = "JobFlowId")] pub job_flow_id: String, } /// <p>Output from an AddInstanceGroups call.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct AddInstanceGroupsOutput { /// <p>The Amazon Resource Name of the cluster.</p> #[serde(rename = "ClusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>Instance group IDs of the newly created instance groups.</p> #[serde(rename = "InstanceGroupIds")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_group_ids: Option<Vec<String>>, /// <p>The job flow ID in which the instance groups are added.</p> #[serde(rename = "JobFlowId")] #[serde(skip_serializing_if = "Option::is_none")] pub job_flow_id: Option<String>, } /// <p> The input argument to the <a>AddJobFlowSteps</a> operation. </p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct AddJobFlowStepsInput { /// <p>A string that uniquely identifies the job flow. This identifier is returned by <a>RunJobFlow</a> and can also be obtained from <a>ListClusters</a>. </p> #[serde(rename = "JobFlowId")] pub job_flow_id: String, /// <p> A list of <a>StepConfig</a> to be executed by the job flow. </p> #[serde(rename = "Steps")] pub steps: Vec<StepConfig>, } /// <p> The output for the <a>AddJobFlowSteps</a> operation. </p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct AddJobFlowStepsOutput { /// <p>The identifiers of the list of steps added to the job flow.</p> #[serde(rename = "StepIds")] #[serde(skip_serializing_if = "Option::is_none")] pub step_ids: Option<Vec<String>>, } /// <p>This input identifies a cluster and a list of tags to attach.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct AddTagsInput { /// <p>The Amazon EMR resource identifier to which tags will be added. This value must be a cluster identifier.</p> #[serde(rename = "ResourceId")] pub resource_id: String, /// <p>A list of tags to associate with a cluster and propagate to EC2 instances. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.</p> #[serde(rename = "Tags")] pub tags: Vec<Tag>, } /// <p>This output indicates the result of adding tags to a resource.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct AddTagsOutput {} /// <p>With Amazon EMR release version 4.0 and later, the only accepted parameter is the application name. To pass arguments to applications, you use configuration classifications specified using configuration JSON objects. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html">Configuring Applications</a>.</p> <p>With earlier Amazon EMR releases, the application is any Amazon or third-party software that you can add to the cluster. This structure contains a list of strings that indicates the software to use with the cluster and accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action argument.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct Application { /// <p>This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purposes.</p> #[serde(rename = "AdditionalInfo")] #[serde(skip_serializing_if = "Option::is_none")] pub additional_info: Option<::std::collections::HashMap<String, String>>, /// <p>Arguments for Amazon EMR to pass to the application.</p> #[serde(rename = "Args")] #[serde(skip_serializing_if = "Option::is_none")] pub args: Option<Vec<String>>, /// <p>The name of the application.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The version of the application.</p> #[serde(rename = "Version")] #[serde(skip_serializing_if = "Option::is_none")] pub version: Option<String>, } /// <p>An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. An automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. See <a>PutAutoScalingPolicy</a>.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct AutoScalingPolicy { /// <p>The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.</p> #[serde(rename = "Constraints")] pub constraints: ScalingConstraints, /// <p>The scale-in and scale-out rules that comprise the automatic scaling policy.</p> #[serde(rename = "Rules")] pub rules: Vec<ScalingRule>, } /// <p>An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. See <a>PutAutoScalingPolicy</a>.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct AutoScalingPolicyDescription { /// <p>The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.</p> #[serde(rename = "Constraints")] #[serde(skip_serializing_if = "Option::is_none")] pub constraints: Option<ScalingConstraints>, /// <p>The scale-in and scale-out rules that comprise the automatic scaling policy.</p> #[serde(rename = "Rules")] #[serde(skip_serializing_if = "Option::is_none")] pub rules: Option<Vec<ScalingRule>>, /// <p>The status of an automatic scaling policy. </p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<AutoScalingPolicyStatus>, } /// <p>The reason for an <a>AutoScalingPolicyStatus</a> change.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct AutoScalingPolicyStateChangeReason { /// <p>The code indicating the reason for the change in status.<code>USER_REQUEST</code> indicates that the scaling policy status was changed by a user. <code>PROVISION_FAILURE</code> indicates that the status change was because the policy failed to provision. <code>CLEANUP_FAILURE</code> indicates an error.</p> #[serde(rename = "Code")] #[serde(skip_serializing_if = "Option::is_none")] pub code: Option<String>, /// <p>A friendly, more verbose message that accompanies an automatic scaling policy state change.</p> #[serde(rename = "Message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The status of an automatic scaling policy. </p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct AutoScalingPolicyStatus { /// <p>Indicates the status of the automatic scaling policy.</p> #[serde(rename = "State")] #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, /// <p>The reason for a change in status.</p> #[serde(rename = "StateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub state_change_reason: Option<AutoScalingPolicyStateChangeReason>, } /// <p>A configuration for Amazon EMR block public access. When <code>BlockPublicSecurityGroupRules</code> is set to <code>true</code>, Amazon EMR prevents cluster creation if one of the cluster's security groups has a rule that allows inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using <code>PermittedPublicSecurityGroupRuleRanges</code>.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct BlockPublicAccessConfiguration { /// <p>Indicates whether Amazon EMR block public access is enabled (<code>true</code>) or disabled (<code>false</code>). By default, the value is <code>false</code> for accounts that have created EMR clusters before July 2019. For accounts created after this, the default is <code>true</code>.</p> #[serde(rename = "BlockPublicSecurityGroupRules")] pub block_public_security_group_rules: bool, /// <p>Specifies ports and port ranges that are permitted to have security group rules that allow inbound traffic from all public sources. For example, if Port 23 (Telnet) is specified for <code>PermittedPublicSecurityGroupRuleRanges</code>, Amazon EMR allows cluster creation if a security group associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or IPv6 port ::/0 as the source.</p> <p>By default, Port 22, which is used for SSH access to the cluster EC2 instances, is in the list of <code>PermittedPublicSecurityGroupRuleRanges</code>.</p> #[serde(rename = "PermittedPublicSecurityGroupRuleRanges")] #[serde(skip_serializing_if = "Option::is_none")] pub permitted_public_security_group_rule_ranges: Option<Vec<PortRange>>, } /// <p>Properties that describe the AWS principal that created the <code>BlockPublicAccessConfiguration</code> using the <code>PutBlockPublicAccessConfiguration</code> action as well as the date and time that the configuration was created. Each time a configuration for block public access is updated, Amazon EMR updates this metadata.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct BlockPublicAccessConfigurationMetadata { /// <p>The Amazon Resource Name that created or last modified the configuration.</p> #[serde(rename = "CreatedByArn")] pub created_by_arn: String, /// <p>The date and time that the configuration was created.</p> #[serde(rename = "CreationDateTime")] pub creation_date_time: f64, } /// <p>Configuration of a bootstrap action.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct BootstrapActionConfig { /// <p>The name of the bootstrap action.</p> #[serde(rename = "Name")] pub name: String, /// <p>The script run by the bootstrap action.</p> #[serde(rename = "ScriptBootstrapAction")] pub script_bootstrap_action: ScriptBootstrapActionConfig, } /// <p>Reports the configuration of a bootstrap action in a cluster (job flow).</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct BootstrapActionDetail { /// <p>A description of the bootstrap action.</p> #[serde(rename = "BootstrapActionConfig")] #[serde(skip_serializing_if = "Option::is_none")] pub bootstrap_action_config: Option<BootstrapActionConfig>, } /// <p>Specification of the status of a CancelSteps request. Available only in Amazon EMR version 4.8.0 and later, excluding version 5.0.0.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct CancelStepsInfo { /// <p>The reason for the failure if the CancelSteps request fails.</p> #[serde(rename = "Reason")] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<String>, /// <p>The status of a CancelSteps Request. The value may be SUBMITTED or FAILED.</p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The encrypted StepId of a step.</p> #[serde(rename = "StepId")] #[serde(skip_serializing_if = "Option::is_none")] pub step_id: Option<String>, } /// <p>The input argument to the <a>CancelSteps</a> operation.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct CancelStepsInput { /// <p>The <code>ClusterID</code> for the specified steps that will be canceled. Use <a>RunJobFlow</a> and <a>ListClusters</a> to get ClusterIDs. </p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>The option to choose to cancel <code>RUNNING</code> steps. By default, the value is <code>SEND_INTERRUPT</code>.</p> #[serde(rename = "StepCancellationOption")] #[serde(skip_serializing_if = "Option::is_none")] pub step_cancellation_option: Option<String>, /// <p>The list of <code>StepIDs</code> to cancel. Use <a>ListSteps</a> to get steps and their states for the specified cluster.</p> #[serde(rename = "StepIds")] pub step_ids: Vec<String>, } /// <p> The output for the <a>CancelSteps</a> operation. </p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct CancelStepsOutput { /// <p>A list of <a>CancelStepsInfo</a>, which shows the status of specified cancel requests for each <code>StepID</code> specified.</p> #[serde(rename = "CancelStepsInfoList")] #[serde(skip_serializing_if = "Option::is_none")] pub cancel_steps_info_list: Option<Vec<CancelStepsInfo>>, } /// <p>The definition of a CloudWatch metric alarm, which determines when an automatic scaling activity is triggered. When the defined alarm conditions are satisfied, scaling activity begins.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct CloudWatchAlarmDefinition { /// <p>Determines how the metric specified by <code>MetricName</code> is compared to the value specified by <code>Threshold</code>.</p> #[serde(rename = "ComparisonOperator")] pub comparison_operator: String, /// <p>A CloudWatch metric dimension.</p> #[serde(rename = "Dimensions")] #[serde(skip_serializing_if = "Option::is_none")] pub dimensions: Option<Vec<MetricDimension>>, /// <p>The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is <code>1</code>.</p> #[serde(rename = "EvaluationPeriods")] #[serde(skip_serializing_if = "Option::is_none")] pub evaluation_periods: Option<i64>, /// <p>The name of the CloudWatch metric that is watched to determine an alarm condition.</p> #[serde(rename = "MetricName")] pub metric_name: String, /// <p>The namespace for the CloudWatch metric. The default is <code>AWS/ElasticMapReduce</code>.</p> #[serde(rename = "Namespace")] #[serde(skip_serializing_if = "Option::is_none")] pub namespace: Option<String>, /// <p>The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify <code>300</code>.</p> #[serde(rename = "Period")] pub period: i64, /// <p>The statistic to apply to the metric associated with the alarm. The default is <code>AVERAGE</code>.</p> #[serde(rename = "Statistic")] #[serde(skip_serializing_if = "Option::is_none")] pub statistic: Option<String>, /// <p>The value against which the specified statistic is compared.</p> #[serde(rename = "Threshold")] pub threshold: f64, /// <p>The unit of measure associated with the CloudWatch metric being watched. The value specified for <code>Unit</code> must correspond to the units specified in the CloudWatch metric.</p> #[serde(rename = "Unit")] #[serde(skip_serializing_if = "Option::is_none")] pub unit: Option<String>, } /// <p>The detailed description of the cluster.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct Cluster { /// <p>The applications installed on this cluster.</p> #[serde(rename = "Applications")] #[serde(skip_serializing_if = "Option::is_none")] pub applications: Option<Vec<Application>>, /// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.</p> #[serde(rename = "AutoScalingRole")] #[serde(skip_serializing_if = "Option::is_none")] pub auto_scaling_role: Option<String>, /// <p>Specifies whether the cluster should terminate after completing all steps.</p> #[serde(rename = "AutoTerminate")] #[serde(skip_serializing_if = "Option::is_none")] pub auto_terminate: Option<bool>, /// <p>The Amazon Resource Name of the cluster.</p> #[serde(rename = "ClusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>Applies only to Amazon EMR releases 4.x and later. The list of Configurations supplied to the EMR cluster.</p> #[serde(rename = "Configurations")] #[serde(skip_serializing_if = "Option::is_none")] pub configurations: Option<Vec<Configuration>>, /// <p>Available only in Amazon EMR version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.</p> #[serde(rename = "CustomAmiId")] #[serde(skip_serializing_if = "Option::is_none")] pub custom_ami_id: Option<String>, /// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.</p> #[serde(rename = "EbsRootVolumeSize")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_root_volume_size: Option<i64>, /// <p>Provides information about the EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.</p> #[serde(rename = "Ec2InstanceAttributes")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_instance_attributes: Option<Ec2InstanceAttributes>, /// <p>The unique identifier for the cluster.</p> #[serde(rename = "Id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p><note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note> <p>The instance group configuration of the cluster. A value of <code>INSTANCE<em>GROUP</code> indicates a uniform instance group configuration. A value of <code>INSTANCE</em>FLEET</code> indicates an instance fleets configuration.</p></p> #[serde(rename = "InstanceCollectionType")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_collection_type: Option<String>, /// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p> #[serde(rename = "KerberosAttributes")] #[serde(skip_serializing_if = "Option::is_none")] pub kerberos_attributes: Option<KerberosAttributes>, /// <p> The AWS KMS customer master key (CMK) used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0. </p> #[serde(rename = "LogEncryptionKmsKeyId")] #[serde(skip_serializing_if = "Option::is_none")] pub log_encryption_kms_key_id: Option<String>, /// <p>The path to the Amazon S3 location where logs for this cluster are stored.</p> #[serde(rename = "LogUri")] #[serde(skip_serializing_if = "Option::is_none")] pub log_uri: Option<String>, /// <p>The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.</p> #[serde(rename = "MasterPublicDnsName")] #[serde(skip_serializing_if = "Option::is_none")] pub master_public_dns_name: Option<String>, /// <p>The name of the cluster.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.</p> #[serde(rename = "NormalizedInstanceHours")] #[serde(skip_serializing_if = "Option::is_none")] pub normalized_instance_hours: Option<i64>, /// <p> The Amazon Resource Name (ARN) of the Outpost where the cluster is launched. </p> #[serde(rename = "OutpostArn")] #[serde(skip_serializing_if = "Option::is_none")] pub outpost_arn: Option<String>, /// <p>Placement group configured for an Amazon EMR cluster.</p> #[serde(rename = "PlacementGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_groups: Option<Vec<PlacementGroupConfig>>, /// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p> #[serde(rename = "ReleaseLabel")] #[serde(skip_serializing_if = "Option::is_none")] pub release_label: Option<String>, /// <p>Applies only when <code>CustomAmiID</code> is used. Specifies the type of updates that are applied from the Amazon Linux AMI package repositories when an instance boots using the AMI.</p> #[serde(rename = "RepoUpgradeOnBoot")] #[serde(skip_serializing_if = "Option::is_none")] pub repo_upgrade_on_boot: Option<String>, /// <p>The AMI version requested for this cluster.</p> #[serde(rename = "RequestedAmiVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub requested_ami_version: Option<String>, /// <p>The AMI version running on this cluster.</p> #[serde(rename = "RunningAmiVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub running_ami_version: Option<String>, /// <p>The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> is available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.</p> #[serde(rename = "ScaleDownBehavior")] #[serde(skip_serializing_if = "Option::is_none")] pub scale_down_behavior: Option<String>, /// <p>The name of the security configuration applied to the cluster.</p> #[serde(rename = "SecurityConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub security_configuration: Option<String>, /// <p>The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.</p> #[serde(rename = "ServiceRole")] #[serde(skip_serializing_if = "Option::is_none")] pub service_role: Option<String>, /// <p>The current status details about the cluster.</p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<ClusterStatus>, /// <p>Specifies the number of steps that can be executed concurrently.</p> #[serde(rename = "StepConcurrencyLevel")] #[serde(skip_serializing_if = "Option::is_none")] pub step_concurrency_level: Option<i64>, /// <p>A list of tags associated with a cluster.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>Indicates whether Amazon EMR will lock the cluster to prevent the EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.</p> #[serde(rename = "TerminationProtected")] #[serde(skip_serializing_if = "Option::is_none")] pub termination_protected: Option<bool>, /// <p>Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. The default value, <code>true</code>, indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. If this value is <code>false</code>, only the IAM user that created the cluster can perform actions. This value can be changed on a running cluster by using the <a>SetVisibleToAllUsers</a> action. You can override the default value of <code>true</code> when you create a cluster by using the <code>VisibleToAllUsers</code> parameter of the <code>RunJobFlow</code> action.</p> #[serde(rename = "VisibleToAllUsers")] #[serde(skip_serializing_if = "Option::is_none")] pub visible_to_all_users: Option<bool>, } /// <p>The reason that the cluster changed to its current state.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ClusterStateChangeReason { /// <p>The programmatic code for the state change reason.</p> #[serde(rename = "Code")] #[serde(skip_serializing_if = "Option::is_none")] pub code: Option<String>, /// <p>The descriptive message for the state change reason.</p> #[serde(rename = "Message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The detailed status of the cluster.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ClusterStatus { /// <p>The current state of the cluster.</p> #[serde(rename = "State")] #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, /// <p>The reason for the cluster status change.</p> #[serde(rename = "StateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub state_change_reason: Option<ClusterStateChangeReason>, /// <p>A timeline that represents the status of a cluster over the lifetime of the cluster.</p> #[serde(rename = "Timeline")] #[serde(skip_serializing_if = "Option::is_none")] pub timeline: Option<ClusterTimeline>, } /// <p>The summary description of the cluster.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ClusterSummary { /// <p>The Amazon Resource Name of the cluster.</p> #[serde(rename = "ClusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>The unique identifier for the cluster.</p> #[serde(rename = "Id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>The name of the cluster.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.</p> #[serde(rename = "NormalizedInstanceHours")] #[serde(skip_serializing_if = "Option::is_none")] pub normalized_instance_hours: Option<i64>, /// <p> The Amazon Resource Name (ARN) of the Outpost where the cluster is launched. </p> #[serde(rename = "OutpostArn")] #[serde(skip_serializing_if = "Option::is_none")] pub outpost_arn: Option<String>, /// <p>The details about the current status of the cluster.</p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<ClusterStatus>, } /// <p>Represents the timeline of the cluster's lifecycle.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ClusterTimeline { /// <p>The creation date and time of the cluster.</p> #[serde(rename = "CreationDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date_time: Option<f64>, /// <p>The date and time when the cluster was terminated.</p> #[serde(rename = "EndDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date_time: Option<f64>, /// <p>The date and time when the cluster was ready to run steps.</p> #[serde(rename = "ReadyDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub ready_date_time: Option<f64>, } /// <p>An entity describing an executable that runs on a cluster.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct Command { /// <p>Arguments for Amazon EMR to pass to the command for execution.</p> #[serde(rename = "Args")] #[serde(skip_serializing_if = "Option::is_none")] pub args: Option<Vec<String>>, /// <p>The name of the command.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The Amazon S3 location of the command script.</p> #[serde(rename = "ScriptPath")] #[serde(skip_serializing_if = "Option::is_none")] pub script_path: Option<String>, } /// <p> The EC2 unit limits for a managed scaling policy. The managed scaling activity of a cluster can not be above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration. </p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct ComputeLimits { /// <p> The upper boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration. </p> #[serde(rename = "MaximumCapacityUnits")] pub maximum_capacity_units: i64, /// <p> The upper boundary of EC2 units for core node type in a cluster. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The core units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between core and task nodes. </p> #[serde(rename = "MaximumCoreCapacityUnits")] #[serde(skip_serializing_if = "Option::is_none")] pub maximum_core_capacity_units: Option<i64>, /// <p> The upper boundary of On-Demand EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The On-Demand units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between On-Demand and Spot Instances. </p> #[serde(rename = "MaximumOnDemandCapacityUnits")] #[serde(skip_serializing_if = "Option::is_none")] pub maximum_on_demand_capacity_units: Option<i64>, /// <p> The lower boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration. </p> #[serde(rename = "MinimumCapacityUnits")] pub minimum_capacity_units: i64, /// <p> The unit type used for specifying a managed scaling policy. </p> #[serde(rename = "UnitType")] pub unit_type: String, } /// <p><note> <p>Amazon EMR releases 4.x or later.</p> </note> <p>An optional configuration specification to be used when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR. A configuration consists of a classification, properties, and optional nested configurations. A classification refers to an application-specific configuration file. Properties are the settings you want to change in that file. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html">Configuring Applications</a>.</p></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct Configuration { /// <p>The classification within a configuration.</p> #[serde(rename = "Classification")] #[serde(skip_serializing_if = "Option::is_none")] pub classification: Option<String>, /// <p>A list of additional configurations to apply within a configuration object.</p> #[serde(rename = "Configurations")] #[serde(skip_serializing_if = "Option::is_none")] pub configurations: Option<Vec<Configuration>>, /// <p>A set of properties specified within a configuration classification.</p> #[serde(rename = "Properties")] #[serde(skip_serializing_if = "Option::is_none")] pub properties: Option<::std::collections::HashMap<String, String>>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct CreateSecurityConfigurationInput { /// <p>The name of the security configuration.</p> #[serde(rename = "Name")] pub name: String, /// <p>The security configuration details in JSON format. For JSON parameters and examples, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-security-configurations.html">Use Security Configurations to Set Up Cluster Security</a> in the <i>Amazon EMR Management Guide</i>.</p> #[serde(rename = "SecurityConfiguration")] pub security_configuration: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct CreateSecurityConfigurationOutput { /// <p>The date and time the security configuration was created.</p> #[serde(rename = "CreationDateTime")] pub creation_date_time: f64, /// <p>The name of the security configuration.</p> #[serde(rename = "Name")] pub name: String, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct CreateStudioInput { /// <p>Specifies whether the Studio authenticates users using single sign-on (SSO) or IAM. Amazon EMR Studio currently only supports SSO authentication.</p> #[serde(rename = "AuthMode")] pub auth_mode: String, /// <p>The default Amazon S3 location to back up EMR Studio Workspaces and notebook files. A Studio user can select an alternative Amazon S3 location when creating a Workspace.</p> #[serde(rename = "DefaultS3Location")] #[serde(skip_serializing_if = "Option::is_none")] pub default_s3_location: Option<String>, /// <p>A detailed description of the Studio.</p> #[serde(rename = "Description")] #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<String>, /// <p>The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network traffic from the Workspace security group, and it must be in the same VPC specified by <code>VpcId</code>.</p> #[serde(rename = "EngineSecurityGroupId")] pub engine_security_group_id: String, /// <p>A descriptive name for the Amazon EMR Studio.</p> #[serde(rename = "Name")] pub name: String, /// <p>The IAM role that will be assumed by the Amazon EMR Studio. The service role provides a way for Amazon EMR Studio to interoperate with other AWS services.</p> #[serde(rename = "ServiceRole")] pub service_role: String, /// <p>A list of subnet IDs to associate with the Studio. The subnets must belong to the VPC specified by <code>VpcId</code>. Studio users can create a Workspace in any of the specified subnets.</p> #[serde(rename = "SubnetIds")] pub subnet_ids: Vec<String>, /// <p>A list of tags to associate with the Studio. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The IAM user role that will be assumed by users and groups logged in to a Studio. The permissions attached to this IAM role can be scoped down for each user or group using session policies.</p> #[serde(rename = "UserRole")] pub user_role: String, /// <p>The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the Studio.</p> #[serde(rename = "VpcId")] pub vpc_id: String, /// <p>The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound network traffic to resources in the Engine security group, and it must be in the same VPC specified by <code>VpcId</code>.</p> #[serde(rename = "WorkspaceSecurityGroupId")] pub workspace_security_group_id: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct CreateStudioOutput { /// <p>The ID of the Amazon EMR Studio.</p> #[serde(rename = "StudioId")] #[serde(skip_serializing_if = "Option::is_none")] pub studio_id: Option<String>, /// <p>The unique Studio access URL.</p> #[serde(rename = "Url")] #[serde(skip_serializing_if = "Option::is_none")] pub url: Option<String>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct CreateStudioSessionMappingInput { /// <p>The globally unique identifier (GUID) of the user or group from the AWS SSO Identity Store. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserId</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-GroupId">GroupId</a> in the <i>AWS SSO Identity Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p> #[serde(rename = "IdentityId")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_id: Option<String>, /// <p>The name of the user or group. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserName</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName">DisplayName</a> in the <i>AWS SSO Identity Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p> #[serde(rename = "IdentityName")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_name: Option<String>, /// <p>Specifies whether the identity to map to the Studio is a user or a group.</p> #[serde(rename = "IdentityType")] pub identity_type: String, /// <p>The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. Session policies refine Studio user permissions without the need to use multiple IAM user roles.</p> #[serde(rename = "SessionPolicyArn")] pub session_policy_arn: String, /// <p>The ID of the Amazon EMR Studio to which the user or group will be mapped.</p> #[serde(rename = "StudioId")] pub studio_id: String, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct DeleteSecurityConfigurationInput { /// <p>The name of the security configuration.</p> #[serde(rename = "Name")] pub name: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct DeleteSecurityConfigurationOutput {} #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct DeleteStudioInput { /// <p>The ID of the Amazon EMR Studio.</p> #[serde(rename = "StudioId")] pub studio_id: String, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct DeleteStudioSessionMappingInput { /// <p>The globally unique identifier (GUID) of the user or group to remove from the Amazon EMR Studio. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserId</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-GroupId">GroupId</a> in the <i>AWS SSO Identity Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p> #[serde(rename = "IdentityId")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_id: Option<String>, /// <p>The name of the user name or group to remove from the Studio. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserName</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName">DisplayName</a> in the <i>AWS SSO Identity Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p> #[serde(rename = "IdentityName")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_name: Option<String>, /// <p>Specifies whether the identity to delete from the Studio is a user or a group.</p> #[serde(rename = "IdentityType")] pub identity_type: String, /// <p>The ID of the Amazon EMR Studio.</p> #[serde(rename = "StudioId")] pub studio_id: String, } /// <p>This input determines which cluster to describe.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct DescribeClusterInput { /// <p>The identifier of the cluster to describe.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, } /// <p>This output contains the description of the cluster.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct DescribeClusterOutput { /// <p>This output contains the details for the requested cluster.</p> #[serde(rename = "Cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<Cluster>, } /// <p> The input for the <a>DescribeJobFlows</a> operation. </p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct DescribeJobFlowsInput { /// <p>Return only job flows created after this date and time.</p> #[serde(rename = "CreatedAfter")] #[serde(skip_serializing_if = "Option::is_none")] pub created_after: Option<f64>, /// <p>Return only job flows created before this date and time.</p> #[serde(rename = "CreatedBefore")] #[serde(skip_serializing_if = "Option::is_none")] pub created_before: Option<f64>, /// <p>Return only job flows whose job flow ID is contained in this list.</p> #[serde(rename = "JobFlowIds")] #[serde(skip_serializing_if = "Option::is_none")] pub job_flow_ids: Option<Vec<String>>, /// <p>Return only job flows whose state is contained in this list.</p> #[serde(rename = "JobFlowStates")] #[serde(skip_serializing_if = "Option::is_none")] pub job_flow_states: Option<Vec<String>>, } /// <p> The output for the <a>DescribeJobFlows</a> operation. </p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct DescribeJobFlowsOutput { /// <p>A list of job flows matching the parameters supplied.</p> #[serde(rename = "JobFlows")] #[serde(skip_serializing_if = "Option::is_none")] pub job_flows: Option<Vec<JobFlowDetail>>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct DescribeNotebookExecutionInput { /// <p>The unique identifier of the notebook execution.</p> #[serde(rename = "NotebookExecutionId")] pub notebook_execution_id: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct DescribeNotebookExecutionOutput { /// <p>Properties of the notebook execution.</p> #[serde(rename = "NotebookExecution")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_execution: Option<NotebookExecution>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct DescribeSecurityConfigurationInput { /// <p>The name of the security configuration.</p> #[serde(rename = "Name")] pub name: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct DescribeSecurityConfigurationOutput { /// <p>The date and time the security configuration was created</p> #[serde(rename = "CreationDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date_time: Option<f64>, /// <p>The name of the security configuration.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The security configuration details in JSON format.</p> #[serde(rename = "SecurityConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub security_configuration: Option<String>, } /// <p>This input determines which step to describe.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct DescribeStepInput { /// <p>The identifier of the cluster with steps to describe.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>The identifier of the step to describe.</p> #[serde(rename = "StepId")] pub step_id: String, } /// <p>This output contains the description of the cluster step.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct DescribeStepOutput { /// <p>The step details for the requested step identifier.</p> #[serde(rename = "Step")] #[serde(skip_serializing_if = "Option::is_none")] pub step: Option<Step>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct DescribeStudioInput { /// <p>The Amazon EMR Studio ID.</p> #[serde(rename = "StudioId")] pub studio_id: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct DescribeStudioOutput { /// <p>The Amazon EMR Studio details.</p> #[serde(rename = "Studio")] #[serde(skip_serializing_if = "Option::is_none")] pub studio: Option<Studio>, } /// <p>Configuration of requested EBS block device associated with the instance group.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct EbsBlockDevice { /// <p>The device name that is exposed to the instance, such as /dev/sdh.</p> #[serde(rename = "Device")] #[serde(skip_serializing_if = "Option::is_none")] pub device: Option<String>, /// <p>EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster.</p> #[serde(rename = "VolumeSpecification")] #[serde(skip_serializing_if = "Option::is_none")] pub volume_specification: Option<VolumeSpecification>, } /// <p>Configuration of requested EBS block device associated with the instance group with count of volumes that will be associated to every instance.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct EbsBlockDeviceConfig { /// <p>EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster.</p> #[serde(rename = "VolumeSpecification")] pub volume_specification: VolumeSpecification, /// <p>Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group</p> #[serde(rename = "VolumesPerInstance")] #[serde(skip_serializing_if = "Option::is_none")] pub volumes_per_instance: Option<i64>, } /// <p>The Amazon EBS configuration of a cluster instance.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct EbsConfiguration { /// <p>An array of Amazon EBS volume specifications attached to a cluster instance.</p> #[serde(rename = "EbsBlockDeviceConfigs")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_block_device_configs: Option<Vec<EbsBlockDeviceConfig>>, /// <p>Indicates whether an Amazon EBS volume is EBS-optimized.</p> #[serde(rename = "EbsOptimized")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_optimized: Option<bool>, } /// <p>EBS block device that's attached to an EC2 instance.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct EbsVolume { /// <p>The device name that is exposed to the instance, such as /dev/sdh.</p> #[serde(rename = "Device")] #[serde(skip_serializing_if = "Option::is_none")] pub device: Option<String>, /// <p>The volume identifier of the EBS volume.</p> #[serde(rename = "VolumeId")] #[serde(skip_serializing_if = "Option::is_none")] pub volume_id: Option<String>, } /// <p>Provides information about the EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct Ec2InstanceAttributes { /// <p>A list of additional Amazon EC2 security group IDs for the master node.</p> #[serde(rename = "AdditionalMasterSecurityGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub additional_master_security_groups: Option<Vec<String>>, /// <p>A list of additional Amazon EC2 security group IDs for the core and task nodes.</p> #[serde(rename = "AdditionalSlaveSecurityGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub additional_slave_security_groups: Option<Vec<String>>, /// <p>The Availability Zone in which the cluster will run. </p> #[serde(rename = "Ec2AvailabilityZone")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_availability_zone: Option<String>, /// <p>The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".</p> #[serde(rename = "Ec2KeyName")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_key_name: Option<String>, /// <p>Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic.</p> #[serde(rename = "Ec2SubnetId")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_subnet_id: Option<String>, /// <p>The identifier of the Amazon EC2 security group for the master node.</p> #[serde(rename = "EmrManagedMasterSecurityGroup")] #[serde(skip_serializing_if = "Option::is_none")] pub emr_managed_master_security_group: Option<String>, /// <p>The identifier of the Amazon EC2 security group for the core and task nodes.</p> #[serde(rename = "EmrManagedSlaveSecurityGroup")] #[serde(skip_serializing_if = "Option::is_none")] pub emr_managed_slave_security_group: Option<String>, /// <p>The IAM role that was specified when the cluster was launched. The EC2 instances of the cluster assume this role.</p> #[serde(rename = "IamInstanceProfile")] #[serde(skip_serializing_if = "Option::is_none")] pub iam_instance_profile: Option<String>, /// <p>Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which to launch EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR chooses the Availability Zone with the best fit from among the list of <code>RequestedEc2AvailabilityZones</code>, and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you. <code>RequestedEc2SubnetIDs</code> and <code>RequestedEc2AvailabilityZones</code> cannot be specified together.</p> #[serde(rename = "RequestedEc2AvailabilityZones")] #[serde(skip_serializing_if = "Option::is_none")] pub requested_ec_2_availability_zones: Option<Vec<String>>, /// <p>Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more Amazon EC2 subnets in which to launch EC2 cluster instances. Subnets must exist within the same VPC. Amazon EMR chooses the EC2 subnet with the best fit from among the list of <code>RequestedEc2SubnetIds</code>, and then launches all cluster instances within that Subnet. If this value is not specified, and the account and Region support EC2-Classic networks, the cluster launches instances in the EC2-Classic network and uses <code>RequestedEc2AvailabilityZones</code> instead of this setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you. <code>RequestedEc2SubnetIDs</code> and <code>RequestedEc2AvailabilityZones</code> cannot be specified together.</p> #[serde(rename = "RequestedEc2SubnetIds")] #[serde(skip_serializing_if = "Option::is_none")] pub requested_ec_2_subnet_ids: Option<Vec<String>>, /// <p>The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.</p> #[serde(rename = "ServiceAccessSecurityGroup")] #[serde(skip_serializing_if = "Option::is_none")] pub service_access_security_group: Option<String>, } /// <p>Specifies the execution engine (cluster) to run the notebook and perform the notebook execution, for example, an EMR cluster.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct ExecutionEngineConfig { /// <p>The unique identifier of the execution engine. For an EMR cluster, this is the cluster ID.</p> #[serde(rename = "Id")] pub id: String, /// <p>An optional unique ID of an EC2 security group to associate with the master instance of the EMR cluster for this notebook execution. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-managed-notebooks-security-groups.html">Specifying EC2 Security Groups for EMR Notebooks</a> in the <i>EMR Management Guide</i>.</p> #[serde(rename = "MasterInstanceSecurityGroupId")] #[serde(skip_serializing_if = "Option::is_none")] pub master_instance_security_group_id: Option<String>, /// <p>The type of execution engine. A value of <code>EMR</code> specifies an EMR cluster.</p> #[serde(rename = "Type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<String>, } /// <p>The details of the step failure. The service attempts to detect the root cause for many common failures.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct FailureDetails { /// <p>The path to the log file where the step failure root cause was originally recorded.</p> #[serde(rename = "LogFile")] #[serde(skip_serializing_if = "Option::is_none")] pub log_file: Option<String>, /// <p>The descriptive message including the error the Amazon EMR service has identified as the cause of step failure. This is text from an error log that describes the root cause of the failure.</p> #[serde(rename = "Message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, /// <p>The reason for the step failure. In the case where the service cannot successfully determine the root cause of the failure, it returns "Unknown Error" as a reason.</p> #[serde(rename = "Reason")] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<String>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct GetBlockPublicAccessConfigurationInput {} #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct GetBlockPublicAccessConfigurationOutput { /// <p><p>A configuration for Amazon EMR block public access. The configuration applies to all clusters created in your account for the current Region. The configuration specifies whether block public access is enabled. If block public access is enabled, security groups associated with the cluster cannot have rules that allow inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using <code>PermittedPublicSecurityGroupRuleRanges</code> in the <code>BlockPublicAccessConfiguration</code>. By default, Port 22 (SSH) is an exception, and public access is allowed on this port. You can change this by updating the block public access configuration to remove the exception.</p> <note> <p>For accounts that created clusters in a Region before November 25, 2019, block public access is disabled by default in that Region. To use this feature, you must manually enable and configure it. For accounts that did not create an EMR cluster in a Region before this date, block public access is enabled by default in that Region.</p> </note></p> #[serde(rename = "BlockPublicAccessConfiguration")] pub block_public_access_configuration: BlockPublicAccessConfiguration, /// <p>Properties that describe the AWS principal that created the <code>BlockPublicAccessConfiguration</code> using the <code>PutBlockPublicAccessConfiguration</code> action as well as the date and time that the configuration was created. Each time a configuration for block public access is updated, Amazon EMR updates this metadata.</p> #[serde(rename = "BlockPublicAccessConfigurationMetadata")] pub block_public_access_configuration_metadata: BlockPublicAccessConfigurationMetadata, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct GetManagedScalingPolicyInput { /// <p>Specifies the ID of the cluster for which the managed scaling policy will be fetched. </p> #[serde(rename = "ClusterId")] pub cluster_id: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct GetManagedScalingPolicyOutput { /// <p>Specifies the managed scaling policy that is attached to an Amazon EMR cluster. </p> #[serde(rename = "ManagedScalingPolicy")] #[serde(skip_serializing_if = "Option::is_none")] pub managed_scaling_policy: Option<ManagedScalingPolicy>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct GetStudioSessionMappingInput { /// <p>The globally unique identifier (GUID) of the user or group. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserId</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-GroupId">GroupId</a> in the <i>AWS SSO Identity Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p> #[serde(rename = "IdentityId")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_id: Option<String>, /// <p>The name of the user or group to fetch. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserName</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName">DisplayName</a> in the <i>AWS SSO Identity Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p> #[serde(rename = "IdentityName")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_name: Option<String>, /// <p>Specifies whether the identity to fetch is a user or a group.</p> #[serde(rename = "IdentityType")] pub identity_type: String, /// <p>The ID of the Amazon EMR Studio.</p> #[serde(rename = "StudioId")] pub studio_id: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct GetStudioSessionMappingOutput { /// <p>The session mapping details for the specified Amazon EMR Studio and identity, including session policy ARN and creation time.</p> #[serde(rename = "SessionMapping")] #[serde(skip_serializing_if = "Option::is_none")] pub session_mapping: Option<SessionMappingDetail>, } /// <p>A job flow step consisting of a JAR file whose main function will be executed. The main function submits a job for Hadoop to execute and waits for the job to finish or fail.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct HadoopJarStepConfig { /// <p>A list of command line arguments passed to the JAR file's main function when executed.</p> #[serde(rename = "Args")] #[serde(skip_serializing_if = "Option::is_none")] pub args: Option<Vec<String>>, /// <p>A path to a JAR file run during the step.</p> #[serde(rename = "Jar")] pub jar: String, /// <p>The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.</p> #[serde(rename = "MainClass")] #[serde(skip_serializing_if = "Option::is_none")] pub main_class: Option<String>, /// <p>A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.</p> #[serde(rename = "Properties")] #[serde(skip_serializing_if = "Option::is_none")] pub properties: Option<Vec<KeyValue>>, } /// <p>A cluster step consisting of a JAR file whose main function will be executed. The main function submits a job for Hadoop to execute and waits for the job to finish or fail.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct HadoopStepConfig { /// <p>The list of command line arguments to pass to the JAR file's main function for execution.</p> #[serde(rename = "Args")] #[serde(skip_serializing_if = "Option::is_none")] pub args: Option<Vec<String>>, /// <p>The path to the JAR file that runs during the step.</p> #[serde(rename = "Jar")] #[serde(skip_serializing_if = "Option::is_none")] pub jar: Option<String>, /// <p>The name of the main class in the specified Java file. If not specified, the JAR file should specify a main class in its manifest file.</p> #[serde(rename = "MainClass")] #[serde(skip_serializing_if = "Option::is_none")] pub main_class: Option<String>, /// <p>The list of Java properties that are set when the step runs. You can use these properties to pass key-value pairs to your main function.</p> #[serde(rename = "Properties")] #[serde(skip_serializing_if = "Option::is_none")] pub properties: Option<::std::collections::HashMap<String, String>>, } /// <p>Represents an EC2 instance provisioned as part of cluster.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct Instance { /// <p>The list of EBS volumes that are attached to this instance.</p> #[serde(rename = "EbsVolumes")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_volumes: Option<Vec<EbsVolume>>, /// <p>The unique identifier of the instance in Amazon EC2.</p> #[serde(rename = "Ec2InstanceId")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_instance_id: Option<String>, /// <p>The unique identifier for the instance in Amazon EMR.</p> #[serde(rename = "Id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>The unique identifier of the instance fleet to which an EC2 instance belongs.</p> #[serde(rename = "InstanceFleetId")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_fleet_id: Option<String>, /// <p>The identifier of the instance group to which this instance belongs.</p> #[serde(rename = "InstanceGroupId")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_group_id: Option<String>, /// <p>The EC2 instance type, for example <code>m3.xlarge</code>.</p> #[serde(rename = "InstanceType")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_type: Option<String>, /// <p>The instance purchasing option. Valid values are <code>ON_DEMAND</code> or <code>SPOT</code>. </p> #[serde(rename = "Market")] #[serde(skip_serializing_if = "Option::is_none")] pub market: Option<String>, /// <p>The private DNS name of the instance.</p> #[serde(rename = "PrivateDnsName")] #[serde(skip_serializing_if = "Option::is_none")] pub private_dns_name: Option<String>, /// <p>The private IP address of the instance.</p> #[serde(rename = "PrivateIpAddress")] #[serde(skip_serializing_if = "Option::is_none")] pub private_ip_address: Option<String>, /// <p>The public DNS name of the instance.</p> #[serde(rename = "PublicDnsName")] #[serde(skip_serializing_if = "Option::is_none")] pub public_dns_name: Option<String>, /// <p>The public IP address of the instance.</p> #[serde(rename = "PublicIpAddress")] #[serde(skip_serializing_if = "Option::is_none")] pub public_ip_address: Option<String>, /// <p>The current status of the instance.</p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<InstanceStatus>, } /// <p><p>Describes an instance fleet, which is a group of EC2 instances that host a particular node type (master, core, or task) in an Amazon EMR cluster. Instance fleets can consist of a mix of instance types and On-Demand and Spot Instances, which are provisioned to meet a defined target capacity. </p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceFleet { /// <p>The unique identifier of the instance fleet.</p> #[serde(rename = "Id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>The node type that the instance fleet hosts. Valid values are MASTER, CORE, or TASK. </p> #[serde(rename = "InstanceFleetType")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_fleet_type: Option<String>, /// <p>The specification for the instance types that comprise an instance fleet. Up to five unique instance specifications may be defined for each instance fleet. </p> #[serde(rename = "InstanceTypeSpecifications")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_type_specifications: Option<Vec<InstanceTypeSpecification>>, /// <p>Describes the launch specification for an instance fleet. </p> #[serde(rename = "LaunchSpecifications")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_specifications: Option<InstanceFleetProvisioningSpecifications>, /// <p>A friendly name for the instance fleet.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The number of On-Demand units that have been provisioned for the instance fleet to fulfill <code>TargetOnDemandCapacity</code>. This provisioned capacity might be less than or greater than <code>TargetOnDemandCapacity</code>.</p> #[serde(rename = "ProvisionedOnDemandCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub provisioned_on_demand_capacity: Option<i64>, /// <p>The number of Spot units that have been provisioned for this instance fleet to fulfill <code>TargetSpotCapacity</code>. This provisioned capacity might be less than or greater than <code>TargetSpotCapacity</code>.</p> #[serde(rename = "ProvisionedSpotCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub provisioned_spot_capacity: Option<i64>, /// <p>The current status of the instance fleet. </p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<InstanceFleetStatus>, /// <p><p>The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand Instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand Instances as specified by <a>InstanceTypeConfig</a>. Each instance configuration has a specified <code>WeightedCapacity</code>. When an On-Demand Instance is provisioned, the <code>WeightedCapacity</code> units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a <code>WeightedCapacity</code> of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use <a>InstanceFleet$ProvisionedOnDemandCapacity</a> to determine the Spot capacity units that have been provisioned for the instance fleet.</p> <note> <p>If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using <code>TargetSpotCapacity</code>. At least one of <code>TargetSpotCapacity</code> and <code>TargetOnDemandCapacity</code> should be greater than 0. For a master instance fleet, only one of <code>TargetSpotCapacity</code> and <code>TargetOnDemandCapacity</code> can be specified, and its value must be 1.</p> </note></p> #[serde(rename = "TargetOnDemandCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub target_on_demand_capacity: Option<i64>, /// <p><p>The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by <a>InstanceTypeConfig</a>. Each instance configuration has a specified <code>WeightedCapacity</code>. When a Spot instance is provisioned, the <code>WeightedCapacity</code> units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a <code>WeightedCapacity</code> of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use <a>InstanceFleet$ProvisionedSpotCapacity</a> to determine the Spot capacity units that have been provisioned for the instance fleet.</p> <note> <p>If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of <code>TargetSpotCapacity</code> and <code>TargetOnDemandCapacity</code> should be greater than 0. For a master instance fleet, only one of <code>TargetSpotCapacity</code> and <code>TargetOnDemandCapacity</code> can be specified, and its value must be 1.</p> </note></p> #[serde(rename = "TargetSpotCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub target_spot_capacity: Option<i64>, } /// <p><p>The configuration that defines an instance fleet.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct InstanceFleetConfig { /// <p>The node type that the instance fleet hosts. Valid values are MASTER,CORE,and TASK.</p> #[serde(rename = "InstanceFleetType")] pub instance_fleet_type: String, /// <p>The instance type configurations that define the EC2 instances in the instance fleet.</p> #[serde(rename = "InstanceTypeConfigs")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_type_configs: Option<Vec<InstanceTypeConfig>>, /// <p>The launch specification for the instance fleet.</p> #[serde(rename = "LaunchSpecifications")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_specifications: Option<InstanceFleetProvisioningSpecifications>, /// <p>The friendly name of the instance fleet.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p><p>The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand Instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand Instances as specified by <a>InstanceTypeConfig</a>. Each instance configuration has a specified <code>WeightedCapacity</code>. When an On-Demand Instance is provisioned, the <code>WeightedCapacity</code> units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a <code>WeightedCapacity</code> of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.</p> <note> <p>If not specified or set to 0, only Spot Instances are provisioned for the instance fleet using <code>TargetSpotCapacity</code>. At least one of <code>TargetSpotCapacity</code> and <code>TargetOnDemandCapacity</code> should be greater than 0. For a master instance fleet, only one of <code>TargetSpotCapacity</code> and <code>TargetOnDemandCapacity</code> can be specified, and its value must be 1.</p> </note></p> #[serde(rename = "TargetOnDemandCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub target_on_demand_capacity: Option<i64>, /// <p><p>The target capacity of Spot units for the instance fleet, which determines how many Spot Instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot Instances as specified by <a>InstanceTypeConfig</a>. Each instance configuration has a specified <code>WeightedCapacity</code>. When a Spot Instance is provisioned, the <code>WeightedCapacity</code> units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a <code>WeightedCapacity</code> of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.</p> <note> <p>If not specified or set to 0, only On-Demand Instances are provisioned for the instance fleet. At least one of <code>TargetSpotCapacity</code> and <code>TargetOnDemandCapacity</code> should be greater than 0. For a master instance fleet, only one of <code>TargetSpotCapacity</code> and <code>TargetOnDemandCapacity</code> can be specified, and its value must be 1.</p> </note></p> #[serde(rename = "TargetSpotCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub target_spot_capacity: Option<i64>, } /// <p><p>Configuration parameters for an instance fleet modification request.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct InstanceFleetModifyConfig { /// <p>A unique identifier for the instance fleet.</p> #[serde(rename = "InstanceFleetId")] pub instance_fleet_id: String, /// <p>The target capacity of On-Demand units for the instance fleet. For more information see <a>InstanceFleetConfig$TargetOnDemandCapacity</a>.</p> #[serde(rename = "TargetOnDemandCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub target_on_demand_capacity: Option<i64>, /// <p>The target capacity of Spot units for the instance fleet. For more information, see <a>InstanceFleetConfig$TargetSpotCapacity</a>.</p> #[serde(rename = "TargetSpotCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub target_spot_capacity: Option<i64>, } /// <p><p>The launch specification for Spot Instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand and Spot Instance allocation strategies are available in Amazon EMR version 5.12.1 and later.</p> </note></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct InstanceFleetProvisioningSpecifications { /// <p><p> The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy. </p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.</p> </note></p> #[serde(rename = "OnDemandSpecification")] #[serde(skip_serializing_if = "Option::is_none")] pub on_demand_specification: Option<OnDemandProvisioningSpecification>, /// <p>The launch specification for Spot Instances in the fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.</p> #[serde(rename = "SpotSpecification")] #[serde(skip_serializing_if = "Option::is_none")] pub spot_specification: Option<SpotProvisioningSpecification>, } /// <p><p>Provides status change reason details for the instance fleet.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceFleetStateChangeReason { /// <p>A code corresponding to the reason the state change occurred.</p> #[serde(rename = "Code")] #[serde(skip_serializing_if = "Option::is_none")] pub code: Option<String>, /// <p>An explanatory message.</p> #[serde(rename = "Message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p><p>The status of the instance fleet.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceFleetStatus { /// <p><p>A code representing the instance fleet status.</p> <ul> <li> <p> <code>PROVISIONING</code>—The instance fleet is provisioning EC2 resources and is not yet ready to run jobs.</p> </li> <li> <p> <code>BOOTSTRAPPING</code>—EC2 instances and other resources have been provisioned and the bootstrap actions specified for the instances are underway.</p> </li> <li> <p> <code>RUNNING</code>—EC2 instances and other resources are running. They are either executing jobs or waiting to execute jobs.</p> </li> <li> <p> <code>RESIZING</code>—A resize operation is underway. EC2 instances are either being added or removed.</p> </li> <li> <p> <code>SUSPENDED</code>—A resize operation could not complete. Existing EC2 instances are running, but instances can't be added or removed.</p> </li> <li> <p> <code>TERMINATING</code>—The instance fleet is terminating EC2 instances.</p> </li> <li> <p> <code>TERMINATED</code>—The instance fleet is no longer active, and all EC2 instances have been terminated.</p> </li> </ul></p> #[serde(rename = "State")] #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, /// <p>Provides status change reason details for the instance fleet.</p> #[serde(rename = "StateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub state_change_reason: Option<InstanceFleetStateChangeReason>, /// <p>Provides historical timestamps for the instance fleet, including the time of creation, the time it became ready to run jobs, and the time of termination.</p> #[serde(rename = "Timeline")] #[serde(skip_serializing_if = "Option::is_none")] pub timeline: Option<InstanceFleetTimeline>, } /// <p><p>Provides historical timestamps for the instance fleet, including the time of creation, the time it became ready to run jobs, and the time of termination.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceFleetTimeline { /// <p>The time and date the instance fleet was created.</p> #[serde(rename = "CreationDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date_time: Option<f64>, /// <p>The time and date the instance fleet terminated.</p> #[serde(rename = "EndDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date_time: Option<f64>, /// <p>The time and date the instance fleet was ready to run jobs.</p> #[serde(rename = "ReadyDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub ready_date_time: Option<f64>, } /// <p>This entity represents an instance group, which is a group of instances that have common purpose. For example, CORE instance group is used for HDFS.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceGroup { /// <p>An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. See PutAutoScalingPolicy.</p> #[serde(rename = "AutoScalingPolicy")] #[serde(skip_serializing_if = "Option::is_none")] pub auto_scaling_policy: Option<AutoScalingPolicyDescription>, /// <p>The bid price for each EC2 Spot Instance type as defined by <code>InstanceType</code>. Expressed in USD. If neither <code>BidPrice</code> nor <code>BidPriceAsPercentageOfOnDemandPrice</code> is provided, <code>BidPriceAsPercentageOfOnDemandPrice</code> defaults to 100%.</p> #[serde(rename = "BidPrice")] #[serde(skip_serializing_if = "Option::is_none")] pub bid_price: Option<String>, /// <p><note> <p>Amazon EMR releases 4.x or later.</p> </note> <p>The list of configurations supplied for an EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).</p></p> #[serde(rename = "Configurations")] #[serde(skip_serializing_if = "Option::is_none")] pub configurations: Option<Vec<Configuration>>, /// <p>The version number of the requested configuration specification for this instance group.</p> #[serde(rename = "ConfigurationsVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub configurations_version: Option<i64>, /// <p>The EBS block devices that are mapped to this instance group.</p> #[serde(rename = "EbsBlockDevices")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_block_devices: Option<Vec<EbsBlockDevice>>, /// <p>If the instance group is EBS-optimized. An Amazon EBS-optimized instance uses an optimized configuration stack and provides additional, dedicated capacity for Amazon EBS I/O.</p> #[serde(rename = "EbsOptimized")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_optimized: Option<bool>, /// <p>The identifier of the instance group.</p> #[serde(rename = "Id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>The type of the instance group. Valid values are MASTER, CORE or TASK.</p> #[serde(rename = "InstanceGroupType")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_group_type: Option<String>, /// <p>The EC2 instance type for all instances in the instance group.</p> #[serde(rename = "InstanceType")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_type: Option<String>, /// <p>A list of configurations that were successfully applied for an instance group last time.</p> #[serde(rename = "LastSuccessfullyAppliedConfigurations")] #[serde(skip_serializing_if = "Option::is_none")] pub last_successfully_applied_configurations: Option<Vec<Configuration>>, /// <p>The version number of a configuration specification that was successfully applied for an instance group last time. </p> #[serde(rename = "LastSuccessfullyAppliedConfigurationsVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub last_successfully_applied_configurations_version: Option<i64>, /// <p>The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT.</p> #[serde(rename = "Market")] #[serde(skip_serializing_if = "Option::is_none")] pub market: Option<String>, /// <p>The name of the instance group.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The target number of instances for the instance group.</p> #[serde(rename = "RequestedInstanceCount")] #[serde(skip_serializing_if = "Option::is_none")] pub requested_instance_count: Option<i64>, /// <p>The number of instances currently running in this instance group.</p> #[serde(rename = "RunningInstanceCount")] #[serde(skip_serializing_if = "Option::is_none")] pub running_instance_count: Option<i64>, /// <p>Policy for customizing shrink operations.</p> #[serde(rename = "ShrinkPolicy")] #[serde(skip_serializing_if = "Option::is_none")] pub shrink_policy: Option<ShrinkPolicy>, /// <p>The current status of the instance group.</p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<InstanceGroupStatus>, } /// <p>Configuration defining a new instance group.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct InstanceGroupConfig { /// <p>An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. See <a>PutAutoScalingPolicy</a>.</p> #[serde(rename = "AutoScalingPolicy")] #[serde(skip_serializing_if = "Option::is_none")] pub auto_scaling_policy: Option<AutoScalingPolicy>, /// <p>The bid price for each EC2 Spot Instance type as defined by <code>InstanceType</code>. Expressed in USD. If neither <code>BidPrice</code> nor <code>BidPriceAsPercentageOfOnDemandPrice</code> is provided, <code>BidPriceAsPercentageOfOnDemandPrice</code> defaults to 100%.</p> #[serde(rename = "BidPrice")] #[serde(skip_serializing_if = "Option::is_none")] pub bid_price: Option<String>, /// <p><note> <p>Amazon EMR releases 4.x or later.</p> </note> <p>The list of configurations supplied for an EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).</p></p> #[serde(rename = "Configurations")] #[serde(skip_serializing_if = "Option::is_none")] pub configurations: Option<Vec<Configuration>>, /// <p>EBS configurations that will be attached to each EC2 instance in the instance group.</p> #[serde(rename = "EbsConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_configuration: Option<EbsConfiguration>, /// <p>Target number of instances for the instance group.</p> #[serde(rename = "InstanceCount")] pub instance_count: i64, /// <p>The role of the instance group in the cluster.</p> #[serde(rename = "InstanceRole")] pub instance_role: String, /// <p>The EC2 instance type for all instances in the instance group.</p> #[serde(rename = "InstanceType")] pub instance_type: String, /// <p>Market type of the EC2 instances used to create a cluster node.</p> #[serde(rename = "Market")] #[serde(skip_serializing_if = "Option::is_none")] pub market: Option<String>, /// <p>Friendly name given to the instance group.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, } /// <p>Detailed information about an instance group.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceGroupDetail { /// <p>The bid price for each EC2 Spot Instance type as defined by <code>InstanceType</code>. Expressed in USD. If neither <code>BidPrice</code> nor <code>BidPriceAsPercentageOfOnDemandPrice</code> is provided, <code>BidPriceAsPercentageOfOnDemandPrice</code> defaults to 100%.</p> #[serde(rename = "BidPrice")] #[serde(skip_serializing_if = "Option::is_none")] pub bid_price: Option<String>, /// <p>The date/time the instance group was created.</p> #[serde(rename = "CreationDateTime")] pub creation_date_time: f64, /// <p>The date/time the instance group was terminated.</p> #[serde(rename = "EndDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date_time: Option<f64>, /// <p>Unique identifier for the instance group.</p> #[serde(rename = "InstanceGroupId")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_group_id: Option<String>, /// <p>Target number of instances to run in the instance group.</p> #[serde(rename = "InstanceRequestCount")] pub instance_request_count: i64, /// <p>Instance group role in the cluster</p> #[serde(rename = "InstanceRole")] pub instance_role: String, /// <p>Actual count of running instances.</p> #[serde(rename = "InstanceRunningCount")] pub instance_running_count: i64, /// <p>EC2 instance type.</p> #[serde(rename = "InstanceType")] pub instance_type: String, /// <p>Details regarding the state of the instance group.</p> #[serde(rename = "LastStateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub last_state_change_reason: Option<String>, /// <p>Market type of the EC2 instances used to create a cluster node.</p> #[serde(rename = "Market")] pub market: String, /// <p>Friendly name for the instance group.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The date/time the instance group was available to the cluster.</p> #[serde(rename = "ReadyDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub ready_date_time: Option<f64>, /// <p>The date/time the instance group was started.</p> #[serde(rename = "StartDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub start_date_time: Option<f64>, /// <p>State of instance group. The following values are deprecated: STARTING, TERMINATED, and FAILED.</p> #[serde(rename = "State")] pub state: String, } /// <p>Modify the size or configurations of an instance group.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct InstanceGroupModifyConfig { /// <p>A list of new or modified configurations to apply for an instance group.</p> #[serde(rename = "Configurations")] #[serde(skip_serializing_if = "Option::is_none")] pub configurations: Option<Vec<Configuration>>, /// <p>The EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to its original requested size.</p> #[serde(rename = "EC2InstanceIdsToTerminate")] #[serde(skip_serializing_if = "Option::is_none")] pub ec2_instance_ids_to_terminate: Option<Vec<String>>, /// <p>Target size for the instance group.</p> #[serde(rename = "InstanceCount")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_count: Option<i64>, /// <p>Unique ID of the instance group to modify.</p> #[serde(rename = "InstanceGroupId")] pub instance_group_id: String, /// <p>Policy for customizing shrink operations.</p> #[serde(rename = "ShrinkPolicy")] #[serde(skip_serializing_if = "Option::is_none")] pub shrink_policy: Option<ShrinkPolicy>, } /// <p>The status change reason details for the instance group.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceGroupStateChangeReason { /// <p>The programmable code for the state change reason.</p> #[serde(rename = "Code")] #[serde(skip_serializing_if = "Option::is_none")] pub code: Option<String>, /// <p>The status change reason description.</p> #[serde(rename = "Message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The details of the instance group status.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceGroupStatus { /// <p>The current state of the instance group.</p> #[serde(rename = "State")] #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, /// <p>The status change reason details for the instance group.</p> #[serde(rename = "StateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub state_change_reason: Option<InstanceGroupStateChangeReason>, /// <p>The timeline of the instance group status over time.</p> #[serde(rename = "Timeline")] #[serde(skip_serializing_if = "Option::is_none")] pub timeline: Option<InstanceGroupTimeline>, } /// <p>The timeline of the instance group lifecycle.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceGroupTimeline { /// <p>The creation date and time of the instance group.</p> #[serde(rename = "CreationDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date_time: Option<f64>, /// <p>The date and time when the instance group terminated.</p> #[serde(rename = "EndDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date_time: Option<f64>, /// <p>The date and time when the instance group became ready to perform tasks.</p> #[serde(rename = "ReadyDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub ready_date_time: Option<f64>, } /// <p>Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct InstanceResizePolicy { /// <p>Decommissioning timeout override for the specific list of instances to be terminated.</p> #[serde(rename = "InstanceTerminationTimeout")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_termination_timeout: Option<i64>, /// <p>Specific list of instances to be protected when shrinking an instance group.</p> #[serde(rename = "InstancesToProtect")] #[serde(skip_serializing_if = "Option::is_none")] pub instances_to_protect: Option<Vec<String>>, /// <p>Specific list of instances to be terminated when shrinking an instance group.</p> #[serde(rename = "InstancesToTerminate")] #[serde(skip_serializing_if = "Option::is_none")] pub instances_to_terminate: Option<Vec<String>>, } /// <p>The details of the status change reason for the instance.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceStateChangeReason { /// <p>The programmable code for the state change reason.</p> #[serde(rename = "Code")] #[serde(skip_serializing_if = "Option::is_none")] pub code: Option<String>, /// <p>The status change reason description.</p> #[serde(rename = "Message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The instance status details.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceStatus { /// <p>The current state of the instance.</p> #[serde(rename = "State")] #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, /// <p>The details of the status change reason for the instance.</p> #[serde(rename = "StateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub state_change_reason: Option<InstanceStateChangeReason>, /// <p>The timeline of the instance status over time.</p> #[serde(rename = "Timeline")] #[serde(skip_serializing_if = "Option::is_none")] pub timeline: Option<InstanceTimeline>, } /// <p>The timeline of the instance lifecycle.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceTimeline { /// <p>The creation date and time of the instance.</p> #[serde(rename = "CreationDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date_time: Option<f64>, /// <p>The date and time when the instance was terminated.</p> #[serde(rename = "EndDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date_time: Option<f64>, /// <p>The date and time when the instance was ready to perform tasks.</p> #[serde(rename = "ReadyDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub ready_date_time: Option<f64>, } /// <p><p>An instance type configuration for each instance type in an instance fleet, which determines the EC2 instances Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities. There can be a maximum of five instance type configurations in a fleet.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct InstanceTypeConfig { /// <p>The bid price for each EC2 Spot Instance type as defined by <code>InstanceType</code>. Expressed in USD. If neither <code>BidPrice</code> nor <code>BidPriceAsPercentageOfOnDemandPrice</code> is provided, <code>BidPriceAsPercentageOfOnDemandPrice</code> defaults to 100%. </p> #[serde(rename = "BidPrice")] #[serde(skip_serializing_if = "Option::is_none")] pub bid_price: Option<String>, /// <p>The bid price, as a percentage of On-Demand price, for each EC2 Spot Instance as defined by <code>InstanceType</code>. Expressed as a number (for example, 20 specifies 20%). If neither <code>BidPrice</code> nor <code>BidPriceAsPercentageOfOnDemandPrice</code> is provided, <code>BidPriceAsPercentageOfOnDemandPrice</code> defaults to 100%.</p> #[serde(rename = "BidPriceAsPercentageOfOnDemandPrice")] #[serde(skip_serializing_if = "Option::is_none")] pub bid_price_as_percentage_of_on_demand_price: Option<f64>, /// <p>A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.</p> #[serde(rename = "Configurations")] #[serde(skip_serializing_if = "Option::is_none")] pub configurations: Option<Vec<Configuration>>, /// <p>The configuration of Amazon Elastic Block Storage (Amazon EBS) attached to each instance as defined by <code>InstanceType</code>. </p> #[serde(rename = "EbsConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_configuration: Option<EbsConfiguration>, /// <p>An EC2 instance type, such as <code>m3.xlarge</code>. </p> #[serde(rename = "InstanceType")] pub instance_type: String, /// <p>The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in <a>InstanceFleetConfig</a>. This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified. </p> #[serde(rename = "WeightedCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub weighted_capacity: Option<i64>, } /// <p><p>The configuration specification for each instance type in an instance fleet.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct InstanceTypeSpecification { /// <p>The bid price for each EC2 Spot Instance type as defined by <code>InstanceType</code>. Expressed in USD.</p> #[serde(rename = "BidPrice")] #[serde(skip_serializing_if = "Option::is_none")] pub bid_price: Option<String>, /// <p>The bid price, as a percentage of On-Demand price, for each EC2 Spot Instance as defined by <code>InstanceType</code>. Expressed as a number (for example, 20 specifies 20%).</p> #[serde(rename = "BidPriceAsPercentageOfOnDemandPrice")] #[serde(skip_serializing_if = "Option::is_none")] pub bid_price_as_percentage_of_on_demand_price: Option<f64>, /// <p>A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR.</p> #[serde(rename = "Configurations")] #[serde(skip_serializing_if = "Option::is_none")] pub configurations: Option<Vec<Configuration>>, /// <p>The configuration of Amazon Elastic Block Storage (Amazon EBS) attached to each instance as defined by <code>InstanceType</code>.</p> #[serde(rename = "EbsBlockDevices")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_block_devices: Option<Vec<EbsBlockDevice>>, /// <p>Evaluates to <code>TRUE</code> when the specified <code>InstanceType</code> is EBS-optimized.</p> #[serde(rename = "EbsOptimized")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_optimized: Option<bool>, /// <p>The EC2 instance type, for example <code>m3.xlarge</code>.</p> #[serde(rename = "InstanceType")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_type: Option<String>, /// <p>The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in <a>InstanceFleetConfig</a>. Capacity values represent performance characteristics such as vCPUs, memory, or I/O. If not specified, the default value is 1.</p> #[serde(rename = "WeightedCapacity")] #[serde(skip_serializing_if = "Option::is_none")] pub weighted_capacity: Option<i64>, } /// <p>A description of a cluster (job flow).</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct JobFlowDetail { /// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p> #[serde(rename = "AmiVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub ami_version: Option<String>, /// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides a way for the automatic scaling feature to get the required permissions it needs to launch and terminate EC2 instances in an instance group.</p> #[serde(rename = "AutoScalingRole")] #[serde(skip_serializing_if = "Option::is_none")] pub auto_scaling_role: Option<String>, /// <p>A list of the bootstrap actions run by the job flow.</p> #[serde(rename = "BootstrapActions")] #[serde(skip_serializing_if = "Option::is_none")] pub bootstrap_actions: Option<Vec<BootstrapActionDetail>>, /// <p>Describes the execution status of the job flow.</p> #[serde(rename = "ExecutionStatusDetail")] pub execution_status_detail: JobFlowExecutionStatusDetail, /// <p>Describes the Amazon EC2 instances of the job flow.</p> #[serde(rename = "Instances")] pub instances: JobFlowInstancesDetail, /// <p>The job flow identifier.</p> #[serde(rename = "JobFlowId")] pub job_flow_id: String, /// <p>The IAM role that was specified when the job flow was launched. The EC2 instances of the job flow assume this role.</p> #[serde(rename = "JobFlowRole")] #[serde(skip_serializing_if = "Option::is_none")] pub job_flow_role: Option<String>, /// <p>The AWS KMS customer master key (CMK) used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.</p> #[serde(rename = "LogEncryptionKmsKeyId")] #[serde(skip_serializing_if = "Option::is_none")] pub log_encryption_kms_key_id: Option<String>, /// <p>The location in Amazon S3 where log files for the job are stored.</p> #[serde(rename = "LogUri")] #[serde(skip_serializing_if = "Option::is_none")] pub log_uri: Option<String>, /// <p>The name of the job flow.</p> #[serde(rename = "Name")] pub name: String, /// <p>The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.</p> #[serde(rename = "ScaleDownBehavior")] #[serde(skip_serializing_if = "Option::is_none")] pub scale_down_behavior: Option<String>, /// <p>The IAM role that is assumed by the Amazon EMR service to access AWS resources on your behalf.</p> #[serde(rename = "ServiceRole")] #[serde(skip_serializing_if = "Option::is_none")] pub service_role: Option<String>, /// <p>A list of steps run by the job flow.</p> #[serde(rename = "Steps")] #[serde(skip_serializing_if = "Option::is_none")] pub steps: Option<Vec<StepDetail>>, /// <p>A list of strings set by third-party software when the job flow is launched. If you are not using third-party software to manage the job flow, this value is empty.</p> #[serde(rename = "SupportedProducts")] #[serde(skip_serializing_if = "Option::is_none")] pub supported_products: Option<Vec<String>>, /// <p>Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. The default value, <code>true</code>, indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. If this value is <code>false</code>, only the IAM user that created the cluster can perform actions. This value can be changed on a running cluster by using the <a>SetVisibleToAllUsers</a> action. You can override the default value of <code>true</code> when you create a cluster by using the <code>VisibleToAllUsers</code> parameter of the <code>RunJobFlow</code> action.</p> #[serde(rename = "VisibleToAllUsers")] #[serde(skip_serializing_if = "Option::is_none")] pub visible_to_all_users: Option<bool>, } /// <p>Describes the status of the cluster (job flow).</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct JobFlowExecutionStatusDetail { /// <p>The creation date and time of the job flow.</p> #[serde(rename = "CreationDateTime")] pub creation_date_time: f64, /// <p>The completion date and time of the job flow.</p> #[serde(rename = "EndDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date_time: Option<f64>, /// <p>Description of the job flow last changed state.</p> #[serde(rename = "LastStateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub last_state_change_reason: Option<String>, /// <p>The date and time when the job flow was ready to start running bootstrap actions.</p> #[serde(rename = "ReadyDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub ready_date_time: Option<f64>, /// <p>The start date and time of the job flow.</p> #[serde(rename = "StartDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub start_date_time: Option<f64>, /// <p>The state of the job flow.</p> #[serde(rename = "State")] pub state: String, } /// <p>A description of the Amazon EC2 instance on which the cluster (job flow) runs. A valid JobFlowInstancesConfig must contain either InstanceGroups or InstanceFleets. They cannot be used together. You may also have MasterInstanceType, SlaveInstanceType, and InstanceCount (all three must be present), but we don't recommend this configuration.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct JobFlowInstancesConfig { /// <p>A list of additional Amazon EC2 security group IDs for the master node.</p> #[serde(rename = "AdditionalMasterSecurityGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub additional_master_security_groups: Option<Vec<String>>, /// <p>A list of additional Amazon EC2 security group IDs for the core and task nodes.</p> #[serde(rename = "AdditionalSlaveSecurityGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub additional_slave_security_groups: Option<Vec<String>>, /// <p>The name of the EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop."</p> #[serde(rename = "Ec2KeyName")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_key_name: Option<String>, /// <p>Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches in EC2-Classic.</p> #[serde(rename = "Ec2SubnetId")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_subnet_id: Option<String>, /// <p><p>Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[serde(rename = "Ec2SubnetIds")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_subnet_ids: Option<Vec<String>>, /// <p>The identifier of the Amazon EC2 security group for the master node.</p> #[serde(rename = "EmrManagedMasterSecurityGroup")] #[serde(skip_serializing_if = "Option::is_none")] pub emr_managed_master_security_group: Option<String>, /// <p>The identifier of the Amazon EC2 security group for the core and task nodes.</p> #[serde(rename = "EmrManagedSlaveSecurityGroup")] #[serde(skip_serializing_if = "Option::is_none")] pub emr_managed_slave_security_group: Option<String>, /// <p>Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the <code>AmiVersion</code> parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.</p> #[serde(rename = "HadoopVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub hadoop_version: Option<String>, /// <p>The number of EC2 instances in the cluster.</p> #[serde(rename = "InstanceCount")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_count: Option<i64>, /// <p><note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note> <p>Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.</p></p> #[serde(rename = "InstanceFleets")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_fleets: Option<Vec<InstanceFleetConfig>>, /// <p>Configuration for the instance groups in a cluster.</p> #[serde(rename = "InstanceGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_groups: Option<Vec<InstanceGroupConfig>>, /// <p>Specifies whether the cluster should remain available after completing all steps.</p> #[serde(rename = "KeepJobFlowAliveWhenNoSteps")] #[serde(skip_serializing_if = "Option::is_none")] pub keep_job_flow_alive_when_no_steps: Option<bool>, /// <p>The EC2 instance type of the master node.</p> #[serde(rename = "MasterInstanceType")] #[serde(skip_serializing_if = "Option::is_none")] pub master_instance_type: Option<String>, /// <p>The Availability Zone in which the cluster runs.</p> #[serde(rename = "Placement")] #[serde(skip_serializing_if = "Option::is_none")] pub placement: Option<PlacementType>, /// <p>The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.</p> #[serde(rename = "ServiceAccessSecurityGroup")] #[serde(skip_serializing_if = "Option::is_none")] pub service_access_security_group: Option<String>, /// <p>The EC2 instance type of the core and task nodes.</p> #[serde(rename = "SlaveInstanceType")] #[serde(skip_serializing_if = "Option::is_none")] pub slave_instance_type: Option<String>, /// <p>Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.</p> #[serde(rename = "TerminationProtected")] #[serde(skip_serializing_if = "Option::is_none")] pub termination_protected: Option<bool>, } /// <p>Specify the type of Amazon EC2 instances that the cluster (job flow) runs on.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct JobFlowInstancesDetail { /// <p>The name of an Amazon EC2 key pair that can be used to connect to the master node using SSH.</p> #[serde(rename = "Ec2KeyName")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_key_name: Option<String>, /// <p>For clusters launched within Amazon Virtual Private Cloud, this is the identifier of the subnet where the cluster was launched.</p> #[serde(rename = "Ec2SubnetId")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_subnet_id: Option<String>, /// <p>The Hadoop version for the cluster.</p> #[serde(rename = "HadoopVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub hadoop_version: Option<String>, /// <p>The number of Amazon EC2 instances in the cluster. If the value is 1, the same instance serves as both the master and core and task node. If the value is greater than 1, one instance is the master node and all others are core and task nodes.</p> #[serde(rename = "InstanceCount")] pub instance_count: i64, /// <p>Details about the instance groups in a cluster.</p> #[serde(rename = "InstanceGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_groups: Option<Vec<InstanceGroupDetail>>, /// <p>Specifies whether the cluster should remain available after completing all steps.</p> #[serde(rename = "KeepJobFlowAliveWhenNoSteps")] #[serde(skip_serializing_if = "Option::is_none")] pub keep_job_flow_alive_when_no_steps: Option<bool>, /// <p>The Amazon EC2 instance identifier of the master node.</p> #[serde(rename = "MasterInstanceId")] #[serde(skip_serializing_if = "Option::is_none")] pub master_instance_id: Option<String>, /// <p>The Amazon EC2 master node instance type.</p> #[serde(rename = "MasterInstanceType")] pub master_instance_type: String, /// <p>The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.</p> #[serde(rename = "MasterPublicDnsName")] #[serde(skip_serializing_if = "Option::is_none")] pub master_public_dns_name: Option<String>, /// <p>An approximation of the cost of the cluster, represented in m1.small/hours. This value is increased one time for every hour that an m1.small instance runs. Larger instances are weighted more heavily, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being increased incrementally four times. This result is only an approximation and does not reflect the actual billing rate.</p> #[serde(rename = "NormalizedInstanceHours")] #[serde(skip_serializing_if = "Option::is_none")] pub normalized_instance_hours: Option<i64>, /// <p>The Amazon EC2 Availability Zone for the cluster.</p> #[serde(rename = "Placement")] #[serde(skip_serializing_if = "Option::is_none")] pub placement: Option<PlacementType>, /// <p>The Amazon EC2 core and task node instance type.</p> #[serde(rename = "SlaveInstanceType")] pub slave_instance_type: String, /// <p>Specifies whether the Amazon EC2 instances in the cluster are protected from termination by API calls, user intervention, or in the event of a job-flow error.</p> #[serde(rename = "TerminationProtected")] #[serde(skip_serializing_if = "Option::is_none")] pub termination_protected: Option<bool>, } /// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct KerberosAttributes { /// <p>The Active Directory password for <code>ADDomainJoinUser</code>.</p> #[serde(rename = "ADDomainJoinPassword")] #[serde(skip_serializing_if = "Option::is_none")] pub ad_domain_join_password: Option<String>, /// <p>Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain.</p> #[serde(rename = "ADDomainJoinUser")] #[serde(skip_serializing_if = "Option::is_none")] pub ad_domain_join_user: Option<String>, /// <p>Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms.</p> #[serde(rename = "CrossRealmTrustPrincipalPassword")] #[serde(skip_serializing_if = "Option::is_none")] pub cross_realm_trust_principal_password: Option<String>, /// <p>The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster.</p> #[serde(rename = "KdcAdminPassword")] pub kdc_admin_password: String, /// <p>The name of the Kerberos realm to which all nodes in a cluster belong. For example, <code>EC2.INTERNAL</code>. </p> #[serde(rename = "Realm")] pub realm: String, } /// <p>A key-value pair.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct KeyValue { /// <p>The unique identifier of a key-value pair.</p> #[serde(rename = "Key")] #[serde(skip_serializing_if = "Option::is_none")] pub key: Option<String>, /// <p>The value part of the identified key.</p> #[serde(rename = "Value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } /// <p>This input determines which bootstrap actions to retrieve.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListBootstrapActionsInput { /// <p>The cluster identifier for the bootstrap actions to list.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } /// <p>This output contains the bootstrap actions detail.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListBootstrapActionsOutput { /// <p>The bootstrap actions associated with the cluster.</p> #[serde(rename = "BootstrapActions")] #[serde(skip_serializing_if = "Option::is_none")] pub bootstrap_actions: Option<Vec<Command>>, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } /// <p>This input determines how the ListClusters action filters the list of clusters that it returns.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListClustersInput { /// <p>The cluster state filters to apply when listing clusters.</p> #[serde(rename = "ClusterStates")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_states: Option<Vec<String>>, /// <p>The creation date and time beginning value filter for listing clusters.</p> #[serde(rename = "CreatedAfter")] #[serde(skip_serializing_if = "Option::is_none")] pub created_after: Option<f64>, /// <p>The creation date and time end value filter for listing clusters.</p> #[serde(rename = "CreatedBefore")] #[serde(skip_serializing_if = "Option::is_none")] pub created_before: Option<f64>, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } /// <p>This contains a ClusterSummaryList with the cluster details; for example, the cluster IDs, names, and status.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListClustersOutput { /// <p>The list of clusters for the account based on the given filters.</p> #[serde(rename = "Clusters")] #[serde(skip_serializing_if = "Option::is_none")] pub clusters: Option<Vec<ClusterSummary>>, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListInstanceFleetsInput { /// <p>The unique identifier of the cluster.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListInstanceFleetsOutput { /// <p>The list of instance fleets for the cluster and given filters.</p> #[serde(rename = "InstanceFleets")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_fleets: Option<Vec<InstanceFleet>>, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } /// <p>This input determines which instance groups to retrieve.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListInstanceGroupsInput { /// <p>The identifier of the cluster for which to list the instance groups.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } /// <p>This input determines which instance groups to retrieve.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListInstanceGroupsOutput { /// <p>The list of instance groups for the cluster and given filters.</p> #[serde(rename = "InstanceGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_groups: Option<Vec<InstanceGroup>>, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } /// <p>This input determines which instances to list.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListInstancesInput { /// <p>The identifier of the cluster for which to list the instances.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>The unique identifier of the instance fleet.</p> #[serde(rename = "InstanceFleetId")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_fleet_id: Option<String>, /// <p>The node type of the instance fleet. For example MASTER, CORE, or TASK.</p> #[serde(rename = "InstanceFleetType")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_fleet_type: Option<String>, /// <p>The identifier of the instance group for which to list the instances.</p> #[serde(rename = "InstanceGroupId")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_group_id: Option<String>, /// <p>The type of instance group for which to list the instances.</p> #[serde(rename = "InstanceGroupTypes")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_group_types: Option<Vec<String>>, /// <p>A list of instance states that will filter the instances returned with this request.</p> #[serde(rename = "InstanceStates")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_states: Option<Vec<String>>, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } /// <p>This output contains the list of instances.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListInstancesOutput { /// <p>The list of instances for the cluster and given filters.</p> #[serde(rename = "Instances")] #[serde(skip_serializing_if = "Option::is_none")] pub instances: Option<Vec<Instance>>, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListNotebookExecutionsInput { /// <p>The unique ID of the editor associated with the notebook execution.</p> #[serde(rename = "EditorId")] #[serde(skip_serializing_if = "Option::is_none")] pub editor_id: Option<String>, /// <p>The beginning of time range filter for listing notebook executions. The default is the timestamp of 30 days ago.</p> #[serde(rename = "From")] #[serde(skip_serializing_if = "Option::is_none")] pub from: Option<f64>, /// <p>The pagination token, returned by a previous <code>ListNotebookExecutions</code> call, that indicates the start of the list for this <code>ListNotebookExecutions</code> call.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p><p>The status filter for listing notebook executions.</p> <ul> <li> <p> <code>START<em>PENDING</code> indicates that the cluster has received the execution request but execution has not begun.</p> </li> <li> <p> <code>STARTING</code> indicates that the execution is starting on the cluster.</p> </li> <li> <p> <code>RUNNING</code> indicates that the execution is being processed by the cluster.</p> </li> <li> <p> <code>FINISHING</code> indicates that execution processing is in the final stages.</p> </li> <li> <p> <code>FINISHED</code> indicates that the execution has completed without error.</p> </li> <li> <p> <code>FAILING</code> indicates that the execution is failing and will not finish successfully.</p> </li> <li> <p> <code>FAILED</code> indicates that the execution failed.</p> </li> <li> <p> <code>STOP</em>PENDING</code> indicates that the cluster has received a <code>StopNotebookExecution</code> request and the stop is pending.</p> </li> <li> <p> <code>STOPPING</code> indicates that the cluster is in the process of stopping the execution as a result of a <code>StopNotebookExecution</code> request.</p> </li> <li> <p> <code>STOPPED</code> indicates that the execution stopped because of a <code>StopNotebookExecution</code> request.</p> </li> </ul></p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The end of time range filter for listing notebook executions. The default is the current timestamp.</p> #[serde(rename = "To")] #[serde(skip_serializing_if = "Option::is_none")] pub to: Option<f64>, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListNotebookExecutionsOutput { /// <p>A pagination token that a subsequent <code>ListNotebookExecutions</code> can use to determine the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>A list of notebook executions.</p> #[serde(rename = "NotebookExecutions")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_executions: Option<Vec<NotebookExecutionSummary>>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListSecurityConfigurationsInput { /// <p>The pagination token that indicates the set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListSecurityConfigurationsOutput { /// <p>A pagination token that indicates the next set of results to retrieve. Include the marker in the next ListSecurityConfiguration call to retrieve the next page of results, if required.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The creation date and time, and name, of each security configuration.</p> #[serde(rename = "SecurityConfigurations")] #[serde(skip_serializing_if = "Option::is_none")] pub security_configurations: Option<Vec<SecurityConfigurationSummary>>, } /// <p>This input determines which steps to list.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListStepsInput { /// <p>The identifier of the cluster for which to list the steps.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The filter to limit the step list based on the identifier of the steps. You can specify a maximum of ten Step IDs. The character constraint applies to the overall length of the array.</p> #[serde(rename = "StepIds")] #[serde(skip_serializing_if = "Option::is_none")] pub step_ids: Option<Vec<String>>, /// <p>The filter to limit the step list based on certain states.</p> #[serde(rename = "StepStates")] #[serde(skip_serializing_if = "Option::is_none")] pub step_states: Option<Vec<String>>, } /// <p>This output contains the list of steps returned in reverse order. This means that the last step is the first element in the list.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListStepsOutput { /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The filtered list of steps for the cluster.</p> #[serde(rename = "Steps")] #[serde(skip_serializing_if = "Option::is_none")] pub steps: Option<Vec<StepSummary>>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListStudioSessionMappingsInput { /// <p>Specifies whether to return session mappings for users or groups. If not specified, the results include session mapping details for both users and groups.</p> #[serde(rename = "IdentityType")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_type: Option<String>, /// <p>The pagination token that indicates the set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The ID of the Amazon EMR Studio.</p> #[serde(rename = "StudioId")] #[serde(skip_serializing_if = "Option::is_none")] pub studio_id: Option<String>, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListStudioSessionMappingsOutput { /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>A list of session mapping summary objects. Each object includes session mapping details such as creation time, identity type (user or group), and Studio ID.</p> #[serde(rename = "SessionMappings")] #[serde(skip_serializing_if = "Option::is_none")] pub session_mappings: Option<Vec<SessionMappingSummary>>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ListStudiosInput { /// <p>The pagination token that indicates the set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ListStudiosOutput { /// <p>The pagination token that indicates the next set of results to retrieve.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The list of Studio summary objects.</p> #[serde(rename = "Studios")] #[serde(skip_serializing_if = "Option::is_none")] pub studios: Option<Vec<StudioSummary>>, } /// <p> Managed scaling policy for an Amazon EMR cluster. The policy specifies the limits for resources that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration. </p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct ManagedScalingPolicy { /// <p>The EC2 unit limits for a managed scaling policy. The managed scaling activity of a cluster is not allowed to go above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.</p> #[serde(rename = "ComputeLimits")] #[serde(skip_serializing_if = "Option::is_none")] pub compute_limits: Option<ComputeLimits>, } /// <p>A CloudWatch dimension, which is specified using a <code>Key</code> (known as a <code>Name</code> in CloudWatch), <code>Value</code> pair. By default, Amazon EMR uses one dimension whose <code>Key</code> is <code>JobFlowID</code> and <code>Value</code> is a variable representing the cluster ID, which is <code>${emr.clusterId}</code>. This enables the rule to bootstrap when the cluster ID becomes available.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct MetricDimension { /// <p>The dimension name.</p> #[serde(rename = "Key")] #[serde(skip_serializing_if = "Option::is_none")] pub key: Option<String>, /// <p>The dimension value.</p> #[serde(rename = "Value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ModifyClusterInput { /// <p>The unique identifier of the cluster.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>The number of steps that can be executed concurrently. You can specify a maximum of 256 steps. </p> #[serde(rename = "StepConcurrencyLevel")] #[serde(skip_serializing_if = "Option::is_none")] pub step_concurrency_level: Option<i64>, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct ModifyClusterOutput { /// <p>The number of steps that can be executed concurrently.</p> #[serde(rename = "StepConcurrencyLevel")] #[serde(skip_serializing_if = "Option::is_none")] pub step_concurrency_level: Option<i64>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ModifyInstanceFleetInput { /// <p>The unique identifier of the cluster.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>The unique identifier of the instance fleet.</p> #[serde(rename = "InstanceFleet")] pub instance_fleet: InstanceFleetModifyConfig, } /// <p>Change the size of some instance groups.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct ModifyInstanceGroupsInput { /// <p>The ID of the cluster to which the instance group belongs.</p> #[serde(rename = "ClusterId")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_id: Option<String>, /// <p>Instance groups to change.</p> #[serde(rename = "InstanceGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_groups: Option<Vec<InstanceGroupModifyConfig>>, } /// <p>A notebook execution. An execution is a specific instance that an EMR Notebook is run using the <code>StartNotebookExecution</code> action.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct NotebookExecution { /// <p>The Amazon Resource Name (ARN) of the notebook execution.</p> #[serde(rename = "Arn")] #[serde(skip_serializing_if = "Option::is_none")] pub arn: Option<String>, /// <p>The unique identifier of the EMR Notebook that is used for the notebook execution.</p> #[serde(rename = "EditorId")] #[serde(skip_serializing_if = "Option::is_none")] pub editor_id: Option<String>, /// <p>The timestamp when notebook execution ended.</p> #[serde(rename = "EndTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_time: Option<f64>, /// <p>The execution engine, such as an EMR cluster, used to run the EMR notebook and perform the notebook execution.</p> #[serde(rename = "ExecutionEngine")] #[serde(skip_serializing_if = "Option::is_none")] pub execution_engine: Option<ExecutionEngineConfig>, /// <p>The reason for the latest status change of the notebook execution.</p> #[serde(rename = "LastStateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub last_state_change_reason: Option<String>, /// <p>The unique identifier of a notebook execution.</p> #[serde(rename = "NotebookExecutionId")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_execution_id: Option<String>, /// <p>A name for the notebook execution.</p> #[serde(rename = "NotebookExecutionName")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_execution_name: Option<String>, /// <p>The unique identifier of the EC2 security group associated with the EMR Notebook instance. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-managed-notebooks-security-groups.html">Specifying EC2 Security Groups for EMR Notebooks</a> in the <i>EMR Management Guide</i>.</p> #[serde(rename = "NotebookInstanceSecurityGroupId")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_instance_security_group_id: Option<String>, /// <p>Input parameters in JSON format passed to the EMR Notebook at runtime for execution.</p> #[serde(rename = "NotebookParams")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_params: Option<String>, /// <p>The location of the notebook execution's output file in Amazon S3.</p> #[serde(rename = "OutputNotebookURI")] #[serde(skip_serializing_if = "Option::is_none")] pub output_notebook_uri: Option<String>, /// <p>The timestamp when notebook execution started.</p> #[serde(rename = "StartTime")] #[serde(skip_serializing_if = "Option::is_none")] pub start_time: Option<f64>, /// <p><p>The status of the notebook execution.</p> <ul> <li> <p> <code>START<em>PENDING</code> indicates that the cluster has received the execution request but execution has not begun.</p> </li> <li> <p> <code>STARTING</code> indicates that the execution is starting on the cluster.</p> </li> <li> <p> <code>RUNNING</code> indicates that the execution is being processed by the cluster.</p> </li> <li> <p> <code>FINISHING</code> indicates that execution processing is in the final stages.</p> </li> <li> <p> <code>FINISHED</code> indicates that the execution has completed without error.</p> </li> <li> <p> <code>FAILING</code> indicates that the execution is failing and will not finish successfully.</p> </li> <li> <p> <code>FAILED</code> indicates that the execution failed.</p> </li> <li> <p> <code>STOP</em>PENDING</code> indicates that the cluster has received a <code>StopNotebookExecution</code> request and the stop is pending.</p> </li> <li> <p> <code>STOPPING</code> indicates that the cluster is in the process of stopping the execution as a result of a <code>StopNotebookExecution</code> request.</p> </li> <li> <p> <code>STOPPED</code> indicates that the execution stopped because of a <code>StopNotebookExecution</code> request.</p> </li> </ul></p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>A list of tags associated with a notebook execution. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters and an optional value string with a maximum of 256 characters.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, } /// <p><p/></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct NotebookExecutionSummary { /// <p>The unique identifier of the editor associated with the notebook execution.</p> #[serde(rename = "EditorId")] #[serde(skip_serializing_if = "Option::is_none")] pub editor_id: Option<String>, /// <p>The timestamp when notebook execution started.</p> #[serde(rename = "EndTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_time: Option<f64>, /// <p>The unique identifier of the notebook execution.</p> #[serde(rename = "NotebookExecutionId")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_execution_id: Option<String>, /// <p>The name of the notebook execution.</p> #[serde(rename = "NotebookExecutionName")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_execution_name: Option<String>, /// <p>The timestamp when notebook execution started.</p> #[serde(rename = "StartTime")] #[serde(skip_serializing_if = "Option::is_none")] pub start_time: Option<f64>, /// <p><p>The status of the notebook execution.</p> <ul> <li> <p> <code>START<em>PENDING</code> indicates that the cluster has received the execution request but execution has not begun.</p> </li> <li> <p> <code>STARTING</code> indicates that the execution is starting on the cluster.</p> </li> <li> <p> <code>RUNNING</code> indicates that the execution is being processed by the cluster.</p> </li> <li> <p> <code>FINISHING</code> indicates that execution processing is in the final stages.</p> </li> <li> <p> <code>FINISHED</code> indicates that the execution has completed without error.</p> </li> <li> <p> <code>FAILING</code> indicates that the execution is failing and will not finish successfully.</p> </li> <li> <p> <code>FAILED</code> indicates that the execution failed.</p> </li> <li> <p> <code>STOP</em>PENDING</code> indicates that the cluster has received a <code>StopNotebookExecution</code> request and the stop is pending.</p> </li> <li> <p> <code>STOPPING</code> indicates that the cluster is in the process of stopping the execution as a result of a <code>StopNotebookExecution</code> request.</p> </li> <li> <p> <code>STOPPED</code> indicates that the execution stopped because of a <code>StopNotebookExecution</code> request.</p> </li> </ul></p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, } /// <p><p> The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy. </p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.</p> </note></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct OnDemandProvisioningSpecification { /// <p> Specifies the strategy to use in launching On-Demand Instance fleets. Currently, the only option is lowest-price (the default), which launches the lowest price first. </p> #[serde(rename = "AllocationStrategy")] pub allocation_strategy: String, } /// <p>Placement group configuration for an Amazon EMR cluster. The configuration specifies the placement strategy that can be applied to instance roles during cluster creation.</p> <p>To use this configuration, consider attaching managed policy AmazonElasticMapReducePlacementGroupPolicy to the EMR role.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct PlacementGroupConfig { /// <p>Role of the instance in the cluster.</p> <p>Starting with Amazon EMR version 5.23.0, the only supported instance role is <code>MASTER</code>.</p> #[serde(rename = "InstanceRole")] pub instance_role: String, /// <p>EC2 Placement Group strategy associated with instance role.</p> <p>Starting with Amazon EMR version 5.23.0, the only supported placement strategy is <code>SPREAD</code> for the <code>MASTER</code> instance role.</p> #[serde(rename = "PlacementStrategy")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_strategy: Option<String>, } /// <p>The Amazon EC2 Availability Zone configuration of the cluster (job flow).</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct PlacementType { /// <p>The Amazon EC2 Availability Zone for the cluster. <code>AvailabilityZone</code> is used for uniform instance groups, while <code>AvailabilityZones</code> (plural) is used for instance fleets.</p> #[serde(rename = "AvailabilityZone")] #[serde(skip_serializing_if = "Option::is_none")] pub availability_zone: Option<String>, /// <p><p>When multiple Availability Zones are specified, Amazon EMR evaluates them and launches instances in the optimal Availability Zone. <code>AvailabilityZones</code> is used for instance fleets, while <code>AvailabilityZone</code> (singular) is used for uniform instance groups.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> #[serde(rename = "AvailabilityZones")] #[serde(skip_serializing_if = "Option::is_none")] pub availability_zones: Option<Vec<String>>, } /// <p>A list of port ranges that are permitted to allow inbound traffic from all public IP addresses. To specify a single port, use the same value for <code>MinRange</code> and <code>MaxRange</code>.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct PortRange { /// <p>The smallest port number in a specified range of port numbers.</p> #[serde(rename = "MaxRange")] #[serde(skip_serializing_if = "Option::is_none")] pub max_range: Option<i64>, /// <p>The smallest port number in a specified range of port numbers.</p> #[serde(rename = "MinRange")] pub min_range: i64, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct PutAutoScalingPolicyInput { /// <p>Specifies the definition of the automatic scaling policy.</p> #[serde(rename = "AutoScalingPolicy")] pub auto_scaling_policy: AutoScalingPolicy, /// <p>Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>Specifies the ID of the instance group to which the automatic scaling policy is applied.</p> #[serde(rename = "InstanceGroupId")] pub instance_group_id: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct PutAutoScalingPolicyOutput { /// <p>The automatic scaling policy definition.</p> #[serde(rename = "AutoScalingPolicy")] #[serde(skip_serializing_if = "Option::is_none")] pub auto_scaling_policy: Option<AutoScalingPolicyDescription>, /// <p>The Amazon Resource Name of the cluster.</p> #[serde(rename = "ClusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.</p> #[serde(rename = "ClusterId")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_id: Option<String>, /// <p>Specifies the ID of the instance group to which the scaling policy is applied.</p> #[serde(rename = "InstanceGroupId")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_group_id: Option<String>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct PutBlockPublicAccessConfigurationInput { /// <p><p>A configuration for Amazon EMR block public access. The configuration applies to all clusters created in your account for the current Region. The configuration specifies whether block public access is enabled. If block public access is enabled, security groups associated with the cluster cannot have rules that allow inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using <code>PermittedPublicSecurityGroupRuleRanges</code> in the <code>BlockPublicAccessConfiguration</code>. By default, Port 22 (SSH) is an exception, and public access is allowed on this port. You can change this by updating <code>BlockPublicSecurityGroupRules</code> to remove the exception.</p> <note> <p>For accounts that created clusters in a Region before November 25, 2019, block public access is disabled by default in that Region. To use this feature, you must manually enable and configure it. For accounts that did not create an EMR cluster in a Region before this date, block public access is enabled by default in that Region.</p> </note></p> #[serde(rename = "BlockPublicAccessConfiguration")] pub block_public_access_configuration: BlockPublicAccessConfiguration, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct PutBlockPublicAccessConfigurationOutput {} #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct PutManagedScalingPolicyInput { /// <p>Specifies the ID of an EMR cluster where the managed scaling policy is attached. </p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>Specifies the constraints for the managed scaling policy. </p> #[serde(rename = "ManagedScalingPolicy")] pub managed_scaling_policy: ManagedScalingPolicy, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct PutManagedScalingPolicyOutput {} #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct RemoveAutoScalingPolicyInput { /// <p>Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.</p> #[serde(rename = "ClusterId")] pub cluster_id: String, /// <p>Specifies the ID of the instance group to which the scaling policy is applied.</p> #[serde(rename = "InstanceGroupId")] pub instance_group_id: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct RemoveAutoScalingPolicyOutput {} #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct RemoveManagedScalingPolicyInput { /// <p> Specifies the ID of the cluster from which the managed scaling policy will be removed. </p> #[serde(rename = "ClusterId")] pub cluster_id: String, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct RemoveManagedScalingPolicyOutput {} /// <p>This input identifies a cluster and a list of tags to remove.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct RemoveTagsInput { /// <p>The Amazon EMR resource identifier from which tags will be removed. This value must be a cluster identifier.</p> #[serde(rename = "ResourceId")] pub resource_id: String, /// <p>A list of tag keys to remove from a resource.</p> #[serde(rename = "TagKeys")] pub tag_keys: Vec<String>, } /// <p>This output indicates the result of removing tags from a resource.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct RemoveTagsOutput {} /// <p> Input to the <a>RunJobFlow</a> operation. </p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct RunJobFlowInput { /// <p>A JSON string for selecting additional features.</p> #[serde(rename = "AdditionalInfo")] #[serde(skip_serializing_if = "Option::is_none")] pub additional_info: Option<String>, /// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p> #[serde(rename = "AmiVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub ami_version: Option<String>, /// <p>Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMR Release Guide</a>.</p> #[serde(rename = "Applications")] #[serde(skip_serializing_if = "Option::is_none")] pub applications: Option<Vec<Application>>, /// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.</p> #[serde(rename = "AutoScalingRole")] #[serde(skip_serializing_if = "Option::is_none")] pub auto_scaling_role: Option<String>, /// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p> #[serde(rename = "BootstrapActions")] #[serde(skip_serializing_if = "Option::is_none")] pub bootstrap_actions: Option<Vec<BootstrapActionConfig>>, /// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the EMR cluster you are creating.</p> #[serde(rename = "Configurations")] #[serde(skip_serializing_if = "Option::is_none")] pub configurations: Option<Vec<Configuration>>, /// <p>Available only in Amazon EMR version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR versions 2.x and 3.x, use <code>AmiVersion</code> instead.</p> <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>. </p> #[serde(rename = "CustomAmiId")] #[serde(skip_serializing_if = "Option::is_none")] pub custom_ami_id: Option<String>, /// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.</p> #[serde(rename = "EbsRootVolumeSize")] #[serde(skip_serializing_if = "Option::is_none")] pub ebs_root_volume_size: Option<i64>, /// <p>A specification of the number and type of Amazon EC2 instances.</p> #[serde(rename = "Instances")] pub instances: JobFlowInstancesConfig, /// <p>Also called instance profile and EC2 role. An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p> #[serde(rename = "JobFlowRole")] #[serde(skip_serializing_if = "Option::is_none")] pub job_flow_role: Option<String>, /// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p> #[serde(rename = "KerberosAttributes")] #[serde(skip_serializing_if = "Option::is_none")] pub kerberos_attributes: Option<KerberosAttributes>, /// <p>The AWS KMS customer master key (CMK) used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR version 5.30.0 and later, excluding Amazon EMR 6.0.0.</p> #[serde(rename = "LogEncryptionKmsKeyId")] #[serde(skip_serializing_if = "Option::is_none")] pub log_encryption_kms_key_id: Option<String>, /// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p> #[serde(rename = "LogUri")] #[serde(skip_serializing_if = "Option::is_none")] pub log_uri: Option<String>, /// <p> The specified managed scaling policy for an Amazon EMR cluster. </p> #[serde(rename = "ManagedScalingPolicy")] #[serde(skip_serializing_if = "Option::is_none")] pub managed_scaling_policy: Option<ManagedScalingPolicy>, /// <p>The name of the job flow.</p> #[serde(rename = "Name")] pub name: String, /// <p><note> <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p> </note> <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p> <ul> <li> <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p> </li> <li> <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p> </li> <li> <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p> </li> <li> <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p> </li> <li> <p>"hunk" - launch the cluster with the Hunk Big Data Analtics Platform.</p> </li> <li> <p>"hue"- launch the cluster with Hue installed.</p> </li> <li> <p>"spark" - launch the cluster with Apache Spark installed.</p> </li> <li> <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p> </li> </ul></p> #[serde(rename = "NewSupportedProducts")] #[serde(skip_serializing_if = "Option::is_none")] pub new_supported_products: Option<Vec<SupportedProductConfig>>, /// <p>The specified placement group configuration for an Amazon EMR cluster.</p> #[serde(rename = "PlacementGroupConfigs")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_group_configs: Option<Vec<PlacementGroupConfig>>, /// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p> #[serde(rename = "ReleaseLabel")] #[serde(skip_serializing_if = "Option::is_none")] pub release_label: Option<String>, /// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p> #[serde(rename = "RepoUpgradeOnBoot")] #[serde(skip_serializing_if = "Option::is_none")] pub repo_upgrade_on_boot: Option<String>, /// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.</p> #[serde(rename = "ScaleDownBehavior")] #[serde(skip_serializing_if = "Option::is_none")] pub scale_down_behavior: Option<String>, /// <p>The name of a security configuration to apply to the cluster.</p> #[serde(rename = "SecurityConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub security_configuration: Option<String>, /// <p>The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.</p> #[serde(rename = "ServiceRole")] #[serde(skip_serializing_if = "Option::is_none")] pub service_role: Option<String>, /// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p> #[serde(rename = "StepConcurrencyLevel")] #[serde(skip_serializing_if = "Option::is_none")] pub step_concurrency_level: Option<i64>, /// <p>A list of steps to run.</p> #[serde(rename = "Steps")] #[serde(skip_serializing_if = "Option::is_none")] pub steps: Option<Vec<StepConfig>>, /// <p><note> <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p> </note> <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p> <ul> <li> <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p> </li> <li> <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p> </li> </ul></p> #[serde(rename = "SupportedProducts")] #[serde(skip_serializing_if = "Option::is_none")] pub supported_products: Option<Vec<String>>, /// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>A value of <code>true</code> indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. This is the default. A value of <code>false</code> indicates that only the IAM user who created the cluster can perform actions.</p> #[serde(rename = "VisibleToAllUsers")] #[serde(skip_serializing_if = "Option::is_none")] pub visible_to_all_users: Option<bool>, } /// <p> The result of the <a>RunJobFlow</a> operation. </p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct RunJobFlowOutput { /// <p>The Amazon Resource Name of the cluster.</p> #[serde(rename = "ClusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>An unique identifier for the job flow.</p> #[serde(rename = "JobFlowId")] #[serde(skip_serializing_if = "Option::is_none")] pub job_flow_id: Option<String>, } /// <p>The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct ScalingAction { /// <p>Not available for instance groups. Instance groups use the market type specified for the group.</p> #[serde(rename = "Market")] #[serde(skip_serializing_if = "Option::is_none")] pub market: Option<String>, /// <p>The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.</p> #[serde(rename = "SimpleScalingPolicyConfiguration")] pub simple_scaling_policy_configuration: SimpleScalingPolicyConfiguration, } /// <p>The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activities triggered by automatic scaling rules will not cause an instance group to grow above or below these limits.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct ScalingConstraints { /// <p>The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary.</p> #[serde(rename = "MaxCapacity")] pub max_capacity: i64, /// <p>The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.</p> #[serde(rename = "MinCapacity")] pub min_capacity: i64, } /// <p>A scale-in or scale-out rule that defines scaling activity, including the CloudWatch metric alarm that triggers activity, how EC2 instances are added or removed, and the periodicity of adjustments. The automatic scaling policy for an instance group can comprise one or more automatic scaling rules.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct ScalingRule { /// <p>The conditions that trigger an automatic scaling activity.</p> #[serde(rename = "Action")] pub action: ScalingAction, /// <p>A friendly, more verbose description of the automatic scaling rule.</p> #[serde(rename = "Description")] #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<String>, /// <p>The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy.</p> #[serde(rename = "Name")] pub name: String, /// <p>The CloudWatch alarm definition that determines when automatic scaling activity is triggered.</p> #[serde(rename = "Trigger")] pub trigger: ScalingTrigger, } /// <p>The conditions that trigger an automatic scaling activity.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct ScalingTrigger { /// <p>The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.</p> #[serde(rename = "CloudWatchAlarmDefinition")] pub cloud_watch_alarm_definition: CloudWatchAlarmDefinition, } /// <p>Configuration of the script to run during a bootstrap action.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct ScriptBootstrapActionConfig { /// <p>A list of command line arguments to pass to the bootstrap action script.</p> #[serde(rename = "Args")] #[serde(skip_serializing_if = "Option::is_none")] pub args: Option<Vec<String>>, /// <p>Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.</p> #[serde(rename = "Path")] pub path: String, } /// <p>The creation date and time, and name, of a security configuration.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct SecurityConfigurationSummary { /// <p>The date and time the security configuration was created.</p> #[serde(rename = "CreationDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date_time: Option<f64>, /// <p>The name of the security configuration.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, } /// <p>Details for an Amazon EMR Studio session mapping including creation time, user or group ID, Studio ID, and so on.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct SessionMappingDetail { /// <p>The time the session mapping was created.</p> #[serde(rename = "CreationTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_time: Option<f64>, /// <p>The globally unique identifier (GUID) of the user or group.</p> #[serde(rename = "IdentityId")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_id: Option<String>, /// <p>The name of the user or group. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserName</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName">DisplayName</a> in the <i>AWS SSO Identity Store API Reference</i>.</p> #[serde(rename = "IdentityName")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_name: Option<String>, /// <p>Specifies whether the identity mapped to the Studio is a user or a group.</p> #[serde(rename = "IdentityType")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_type: Option<String>, /// <p>The time the session mapping was last modified.</p> #[serde(rename = "LastModifiedTime")] #[serde(skip_serializing_if = "Option::is_none")] pub last_modified_time: Option<f64>, /// <p>The Amazon Resource Name (ARN) of the session policy associated with the user or group.</p> #[serde(rename = "SessionPolicyArn")] #[serde(skip_serializing_if = "Option::is_none")] pub session_policy_arn: Option<String>, /// <p>The ID of the Amazon EMR Studio.</p> #[serde(rename = "StudioId")] #[serde(skip_serializing_if = "Option::is_none")] pub studio_id: Option<String>, } /// <p>Details for an Amazon EMR Studio session mapping. The details do not include the time the session mapping was last modified.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct SessionMappingSummary { /// <p>The time the session mapping was created.</p> #[serde(rename = "CreationTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_time: Option<f64>, /// <p>The globally unique identifier (GUID) of the user or group from the AWS SSO Identity Store.</p> #[serde(rename = "IdentityId")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_id: Option<String>, /// <p>The name of the user or group. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserName</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName">DisplayName</a> in the <i>AWS SSO Identity Store API Reference</i>.</p> #[serde(rename = "IdentityName")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_name: Option<String>, /// <p>Specifies whether the identity mapped to the Studio is a user or a group.</p> #[serde(rename = "IdentityType")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_type: Option<String>, /// <p>The Amazon Resource Name (ARN) of the session policy associated with the user or group.</p> #[serde(rename = "SessionPolicyArn")] #[serde(skip_serializing_if = "Option::is_none")] pub session_policy_arn: Option<String>, /// <p>The ID of the Amazon EMR Studio.</p> #[serde(rename = "StudioId")] #[serde(skip_serializing_if = "Option::is_none")] pub studio_id: Option<String>, } /// <p> The input argument to the <a>TerminationProtection</a> operation. </p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct SetTerminationProtectionInput { /// <p> A list of strings that uniquely identify the clusters to protect. This identifier is returned by <a>RunJobFlow</a> and can also be obtained from <a>DescribeJobFlows</a> . </p> #[serde(rename = "JobFlowIds")] pub job_flow_ids: Vec<String>, /// <p>A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.</p> #[serde(rename = "TerminationProtected")] pub termination_protected: bool, } /// <p>The input to the SetVisibleToAllUsers action.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct SetVisibleToAllUsersInput { /// <p>The unique identifier of the job flow (cluster).</p> #[serde(rename = "JobFlowIds")] pub job_flow_ids: Vec<String>, /// <p>A value of <code>true</code> indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. This is the default. A value of <code>false</code> indicates that only the IAM user who created the cluster can perform actions.</p> #[serde(rename = "VisibleToAllUsers")] pub visible_to_all_users: bool, } /// <p>Policy for customizing shrink operations. Allows configuration of decommissioning timeout and targeted instance shrinking.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct ShrinkPolicy { /// <p>The desired timeout for decommissioning an instance. Overrides the default YARN decommissioning timeout.</p> #[serde(rename = "DecommissionTimeout")] #[serde(skip_serializing_if = "Option::is_none")] pub decommission_timeout: Option<i64>, /// <p>Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.</p> #[serde(rename = "InstanceResizePolicy")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_resize_policy: Option<InstanceResizePolicy>, } /// <p>An automatic scaling configuration, which describes how the policy adds or removes instances, the cooldown period, and the number of EC2 instances that will be added each time the CloudWatch metric alarm condition is satisfied.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct SimpleScalingPolicyConfiguration { /// <p>The way in which EC2 instances are added (if <code>ScalingAdjustment</code> is a positive number) or terminated (if <code>ScalingAdjustment</code> is a negative number) each time the scaling activity is triggered. <code>CHANGE_IN_CAPACITY</code> is the default. <code>CHANGE_IN_CAPACITY</code> indicates that the EC2 instance count increments or decrements by <code>ScalingAdjustment</code>, which should be expressed as an integer. <code>PERCENT_CHANGE_IN_CAPACITY</code> indicates the instance count increments or decrements by the percentage specified by <code>ScalingAdjustment</code>, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. <code>EXACT_CAPACITY</code> indicates the scaling activity results in an instance group with the number of EC2 instances specified by <code>ScalingAdjustment</code>, which should be expressed as a positive integer.</p> #[serde(rename = "AdjustmentType")] #[serde(skip_serializing_if = "Option::is_none")] pub adjustment_type: Option<String>, /// <p>The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.</p> #[serde(rename = "CoolDown")] #[serde(skip_serializing_if = "Option::is_none")] pub cool_down: Option<i64>, /// <p>The amount by which to scale in or scale out, based on the specified <code>AdjustmentType</code>. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If <code>AdjustmentType</code> is set to <code>EXACT_CAPACITY</code>, the number should only be a positive integer. If <code>AdjustmentType</code> is set to <code>PERCENT_CHANGE_IN_CAPACITY</code>, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.</p> #[serde(rename = "ScalingAdjustment")] pub scaling_adjustment: i64, } /// <p><p>The launch specification for Spot Instances in the instance fleet, which determines the defined duration, provisioning timeout behavior, and allocation strategy.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. Spot Instance allocation strategy is available in Amazon EMR version 5.12.1 and later.</p> </note></p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct SpotProvisioningSpecification { /// <p> Specifies the strategy to use in launching Spot Instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. </p> #[serde(rename = "AllocationStrategy")] #[serde(skip_serializing_if = "Option::is_none")] pub allocation_strategy: Option<String>, /// <p>The defined duration for Spot Instances (also known as Spot blocks) in minutes. When specified, the Spot Instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot Instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates. </p> #[serde(rename = "BlockDurationMinutes")] #[serde(skip_serializing_if = "Option::is_none")] pub block_duration_minutes: Option<i64>, /// <p>The action to take when <code>TargetSpotCapacity</code> has not been fulfilled when the <code>TimeoutDurationMinutes</code> has expired; that is, when all Spot Instances could not be provisioned within the Spot provisioning timeout. Valid values are <code>TERMINATE_CLUSTER</code> and <code>SWITCH_TO_ON_DEMAND</code>. SWITCH_TO_ON_DEMAND specifies that if no Spot Instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.</p> #[serde(rename = "TimeoutAction")] pub timeout_action: String, /// <p>The spot provisioning timeout period in minutes. If Spot Instances are not provisioned within this time period, the <code>TimeOutAction</code> is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.</p> #[serde(rename = "TimeoutDurationMinutes")] pub timeout_duration_minutes: i64, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct StartNotebookExecutionInput { /// <p>The unique identifier of the EMR Notebook to use for notebook execution.</p> #[serde(rename = "EditorId")] pub editor_id: String, /// <p>Specifies the execution engine (cluster) that runs the notebook execution.</p> #[serde(rename = "ExecutionEngine")] pub execution_engine: ExecutionEngineConfig, /// <p>An optional name for the notebook execution.</p> #[serde(rename = "NotebookExecutionName")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_execution_name: Option<String>, /// <p>The unique identifier of the Amazon EC2 security group to associate with the EMR Notebook for this notebook execution.</p> #[serde(rename = "NotebookInstanceSecurityGroupId")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_instance_security_group_id: Option<String>, /// <p>Input parameters in JSON format passed to the EMR Notebook at runtime for execution.</p> #[serde(rename = "NotebookParams")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_params: Option<String>, /// <p>The path and file name of the notebook file for this execution, relative to the path specified for the EMR Notebook. For example, if you specify a path of <code>s3://MyBucket/MyNotebooks</code> when you create an EMR Notebook for a notebook with an ID of <code>e-ABCDEFGHIJK1234567890ABCD</code> (the <code>EditorID</code> of this request), and you specify a <code>RelativePath</code> of <code>my_notebook_executions/notebook_execution.ipynb</code>, the location of the file for the notebook execution is <code>s3://MyBucket/MyNotebooks/e-ABCDEFGHIJK1234567890ABCD/my_notebook_executions/notebook_execution.ipynb</code>.</p> #[serde(rename = "RelativePath")] pub relative_path: String, /// <p>The name or ARN of the IAM role that is used as the service role for Amazon EMR (the EMR role) for the notebook execution.</p> #[serde(rename = "ServiceRole")] pub service_role: String, /// <p>A list of tags associated with a notebook execution. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters and an optional value string with a maximum of 256 characters.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, } #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct StartNotebookExecutionOutput { /// <p>The unique identifier of the notebook execution.</p> #[serde(rename = "NotebookExecutionId")] #[serde(skip_serializing_if = "Option::is_none")] pub notebook_execution_id: Option<String>, } /// <p>This represents a step in a cluster.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct Step { /// <p>The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.</p> #[serde(rename = "ActionOnFailure")] #[serde(skip_serializing_if = "Option::is_none")] pub action_on_failure: Option<String>, /// <p>The Hadoop job configuration of the cluster step.</p> #[serde(rename = "Config")] #[serde(skip_serializing_if = "Option::is_none")] pub config: Option<HadoopStepConfig>, /// <p>The identifier of the cluster step.</p> #[serde(rename = "Id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>The name of the cluster step.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The current execution status details of the cluster step.</p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<StepStatus>, } /// <p>Specification of a cluster (job flow) step.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct StepConfig { /// <p>The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.</p> #[serde(rename = "ActionOnFailure")] #[serde(skip_serializing_if = "Option::is_none")] pub action_on_failure: Option<String>, /// <p>The JAR file used for the step.</p> #[serde(rename = "HadoopJarStep")] pub hadoop_jar_step: HadoopJarStepConfig, /// <p>The name of the step.</p> #[serde(rename = "Name")] pub name: String, } /// <p>Combines the execution state and configuration of a step.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct StepDetail { /// <p>The description of the step status.</p> #[serde(rename = "ExecutionStatusDetail")] pub execution_status_detail: StepExecutionStatusDetail, /// <p>The step configuration.</p> #[serde(rename = "StepConfig")] pub step_config: StepConfig, } /// <p>The execution state of a step.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct StepExecutionStatusDetail { /// <p>The creation date and time of the step.</p> #[serde(rename = "CreationDateTime")] pub creation_date_time: f64, /// <p>The completion date and time of the step.</p> #[serde(rename = "EndDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date_time: Option<f64>, /// <p>A description of the step's current state.</p> #[serde(rename = "LastStateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub last_state_change_reason: Option<String>, /// <p>The start date and time of the step.</p> #[serde(rename = "StartDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub start_date_time: Option<f64>, /// <p>The state of the step.</p> #[serde(rename = "State")] pub state: String, } /// <p>The details of the step state change reason.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct StepStateChangeReason { /// <p>The programmable code for the state change reason. Note: Currently, the service provides no code for the state change.</p> #[serde(rename = "Code")] #[serde(skip_serializing_if = "Option::is_none")] pub code: Option<String>, /// <p>The descriptive message for the state change reason.</p> #[serde(rename = "Message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The execution status details of the cluster step.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct StepStatus { /// <p>The details for the step failure including reason, message, and log file path where the root cause was identified.</p> #[serde(rename = "FailureDetails")] #[serde(skip_serializing_if = "Option::is_none")] pub failure_details: Option<FailureDetails>, /// <p>The execution state of the cluster step.</p> #[serde(rename = "State")] #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, /// <p>The reason for the step execution status change.</p> #[serde(rename = "StateChangeReason")] #[serde(skip_serializing_if = "Option::is_none")] pub state_change_reason: Option<StepStateChangeReason>, /// <p>The timeline of the cluster step status over time.</p> #[serde(rename = "Timeline")] #[serde(skip_serializing_if = "Option::is_none")] pub timeline: Option<StepTimeline>, } /// <p>The summary of the cluster step.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct StepSummary { /// <p>The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is available for backward compatibility. We recommend using TERMINATE_CLUSTER instead.</p> #[serde(rename = "ActionOnFailure")] #[serde(skip_serializing_if = "Option::is_none")] pub action_on_failure: Option<String>, /// <p>The Hadoop job configuration of the cluster step.</p> #[serde(rename = "Config")] #[serde(skip_serializing_if = "Option::is_none")] pub config: Option<HadoopStepConfig>, /// <p>The identifier of the cluster step.</p> #[serde(rename = "Id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>The name of the cluster step.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The current execution status details of the cluster step.</p> #[serde(rename = "Status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<StepStatus>, } /// <p>The timeline of the cluster step lifecycle.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct StepTimeline { /// <p>The date and time when the cluster step was created.</p> #[serde(rename = "CreationDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date_time: Option<f64>, /// <p>The date and time when the cluster step execution completed or failed.</p> #[serde(rename = "EndDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date_time: Option<f64>, /// <p>The date and time when the cluster step execution started.</p> #[serde(rename = "StartDateTime")] #[serde(skip_serializing_if = "Option::is_none")] pub start_date_time: Option<f64>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct StopNotebookExecutionInput { /// <p>The unique identifier of the notebook execution.</p> #[serde(rename = "NotebookExecutionId")] pub notebook_execution_id: String, } /// <p>Details for an Amazon EMR Studio including ID, creation time, name, and so on.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct Studio { /// <p>Specifies whether the Studio authenticates users using single sign-on (SSO) or IAM.</p> #[serde(rename = "AuthMode")] #[serde(skip_serializing_if = "Option::is_none")] pub auth_mode: Option<String>, /// <p>The time the Amazon EMR Studio was created.</p> #[serde(rename = "CreationTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_time: Option<f64>, /// <p>The default Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.</p> #[serde(rename = "DefaultS3Location")] #[serde(skip_serializing_if = "Option::is_none")] pub default_s3_location: Option<String>, /// <p>The detailed description of the EMR Studio.</p> #[serde(rename = "Description")] #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<String>, /// <p>The ID of the Engine security group associated with the Amazon EMR Studio. The Engine security group allows inbound network traffic from resources in the Workspace security group.</p> #[serde(rename = "EngineSecurityGroupId")] #[serde(skip_serializing_if = "Option::is_none")] pub engine_security_group_id: Option<String>, /// <p>The name of the EMR Studio.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The name of the IAM role assumed by the Amazon EMR Studio.</p> #[serde(rename = "ServiceRole")] #[serde(skip_serializing_if = "Option::is_none")] pub service_role: Option<String>, /// <p>The Amazon Resource Name (ARN) of the EMR Studio.</p> #[serde(rename = "StudioArn")] #[serde(skip_serializing_if = "Option::is_none")] pub studio_arn: Option<String>, /// <p>The ID of the EMR Studio.</p> #[serde(rename = "StudioId")] #[serde(skip_serializing_if = "Option::is_none")] pub studio_id: Option<String>, /// <p>The list of IDs of the subnets associated with the Amazon EMR Studio.</p> #[serde(rename = "SubnetIds")] #[serde(skip_serializing_if = "Option::is_none")] pub subnet_ids: Option<Vec<String>>, /// <p>A list of tags associated with the Amazon EMR Studio.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The unique access URL of the Amazon EMR Studio.</p> #[serde(rename = "Url")] #[serde(skip_serializing_if = "Option::is_none")] pub url: Option<String>, /// <p>The name of the IAM role assumed by users logged in to the Amazon EMR Studio.</p> #[serde(rename = "UserRole")] #[serde(skip_serializing_if = "Option::is_none")] pub user_role: Option<String>, /// <p>The ID of the VPC associated with the EMR Studio.</p> #[serde(rename = "VpcId")] #[serde(skip_serializing_if = "Option::is_none")] pub vpc_id: Option<String>, /// <p>The ID of the Workspace security group associated with the Amazon EMR Studio. The Workspace security group allows outbound network traffic to resources in the Engine security group and to the internet.</p> #[serde(rename = "WorkspaceSecurityGroupId")] #[serde(skip_serializing_if = "Option::is_none")] pub workspace_security_group_id: Option<String>, } /// <p>Details for an Amazon EMR Studio, including ID, Name, VPC, and Description. The details do not include subnets, IAM roles, security groups, or tags associated with the Studio.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq)] #[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))] pub struct StudioSummary { /// <p>The time when the Amazon EMR Studio was created.</p> #[serde(rename = "CreationTime")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_time: Option<f64>, /// <p>The detailed description of the EMR Studio.</p> #[serde(rename = "Description")] #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<String>, /// <p>The name of the Amazon EMR Studio.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The ID of the Amazon EMR Studio.</p> #[serde(rename = "StudioId")] #[serde(skip_serializing_if = "Option::is_none")] pub studio_id: Option<String>, /// <p>The unique access URL of the Amazon EMR Studio.</p> #[serde(rename = "Url")] #[serde(skip_serializing_if = "Option::is_none")] pub url: Option<String>, /// <p>The ID of the Virtual Private Cloud (Amazon VPC) associated with the Amazon EMR Studio.</p> #[serde(rename = "VpcId")] #[serde(skip_serializing_if = "Option::is_none")] pub vpc_id: Option<String>, } /// <p>The list of supported product configurations which allow user-supplied arguments. EMR accepts these arguments and forwards them to the corresponding installation script as bootstrap action arguments.</p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct SupportedProductConfig { /// <p>The list of user-supplied arguments.</p> #[serde(rename = "Args")] #[serde(skip_serializing_if = "Option::is_none")] pub args: Option<Vec<String>>, /// <p>The name of the product configuration.</p> #[serde(rename = "Name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, } /// <p>A key-value pair containing user-defined metadata that you can associate with an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag Clusters</a>. </p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct Tag { /// <p>A user-defined key, which is the minimum required information for a valid tag. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag </a>. </p> #[serde(rename = "Key")] #[serde(skip_serializing_if = "Option::is_none")] pub key: Option<String>, /// <p>A user-defined value, which is optional in a tag. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag Clusters</a>. </p> #[serde(rename = "Value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } /// <p> Input to the <a>TerminateJobFlows</a> operation. </p> #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct TerminateJobFlowsInput { /// <p>A list of job flows to be shut down.</p> #[serde(rename = "JobFlowIds")] pub job_flow_ids: Vec<String>, } #[derive(Clone, Debug, Default, PartialEq, Serialize)] #[cfg_attr(feature = "deserialize_structs", derive(Deserialize))] pub struct UpdateStudioSessionMappingInput { /// <p>The globally unique identifier (GUID) of the user or group. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserId</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-GroupId">GroupId</a> in the <i>AWS SSO Identity Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p> #[serde(rename = "IdentityId")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_id: Option<String>, /// <p>The name of the user or group to update. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_User.html#singlesignon-Type-User-UserId">UserName</a> and <a href="https://docs.aws.amazon.com/singlesignon/latest/IdentityStoreAPIReference/API_Group.html#singlesignon-Type-Group-DisplayName">DisplayName</a> in the <i>AWS SSO Identity Store API Reference</i>. Either <code>IdentityName</code> or <code>IdentityId</code> must be specified.</p> #[serde(rename = "IdentityName")] #[serde(skip_serializing_if = "Option::is_none")] pub identity_name: Option<String>, /// <p>Specifies whether the identity to update is a user or a group.</p> #[serde(rename = "IdentityType")] pub identity_type: String, /// <p>The Amazon Resource Name (ARN) of the session policy to associate with the specified user or group.</p> #[serde(rename = "SessionPolicyArn")] pub session_policy_arn: String, /// <p>The ID of the EMR Studio.</p> #[serde(rename = "StudioId")] pub studio_id: String, } /// <p>EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster.</p> #[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)] pub struct VolumeSpecification { /// <p>The number of I/O operations per second (IOPS) that the volume supports.</p> #[serde(rename = "Iops")] #[serde(skip_serializing_if = "Option::is_none")] pub iops: Option<i64>, /// <p>The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.</p> #[serde(rename = "SizeInGB")] pub size_in_gb: i64, /// <p>The volume type. Volume types supported are gp2, io1, standard.</p> #[serde(rename = "VolumeType")] pub volume_type: String, } /// Errors returned by AddInstanceFleet #[derive(Debug, PartialEq)] pub enum AddInstanceFleetError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl AddInstanceFleetError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddInstanceFleetError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(AddInstanceFleetError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(AddInstanceFleetError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for AddInstanceFleetError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { AddInstanceFleetError::InternalServer(ref cause) => write!(f, "{}", cause), AddInstanceFleetError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for AddInstanceFleetError {} /// Errors returned by AddInstanceGroups #[derive(Debug, PartialEq)] pub enum AddInstanceGroupsError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), } impl AddInstanceGroupsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddInstanceGroupsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(AddInstanceGroupsError::InternalServerError( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for AddInstanceGroupsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { AddInstanceGroupsError::InternalServerError(ref cause) => write!(f, "{}", cause), } } } impl Error for AddInstanceGroupsError {} /// Errors returned by AddJobFlowSteps #[derive(Debug, PartialEq)] pub enum AddJobFlowStepsError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), } impl AddJobFlowStepsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddJobFlowStepsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(AddJobFlowStepsError::InternalServerError(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for AddJobFlowStepsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { AddJobFlowStepsError::InternalServerError(ref cause) => write!(f, "{}", cause), } } } impl Error for AddJobFlowStepsError {} /// Errors returned by AddTags #[derive(Debug, PartialEq)] pub enum AddTagsError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl AddTagsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(AddTagsError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(AddTagsError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for AddTagsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { AddTagsError::InternalServer(ref cause) => write!(f, "{}", cause), AddTagsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for AddTagsError {} /// Errors returned by CancelSteps #[derive(Debug, PartialEq)] pub enum CancelStepsError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl CancelStepsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelStepsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(CancelStepsError::InternalServerError(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(CancelStepsError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for CancelStepsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { CancelStepsError::InternalServerError(ref cause) => write!(f, "{}", cause), CancelStepsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for CancelStepsError {} /// Errors returned by CreateSecurityConfiguration #[derive(Debug, PartialEq)] pub enum CreateSecurityConfigurationError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl CreateSecurityConfigurationError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<CreateSecurityConfigurationError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(CreateSecurityConfigurationError::InternalServer( err.msg, )) } "InvalidRequestException" => { return RusotoError::Service(CreateSecurityConfigurationError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for CreateSecurityConfigurationError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { CreateSecurityConfigurationError::InternalServer(ref cause) => write!(f, "{}", cause), CreateSecurityConfigurationError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for CreateSecurityConfigurationError {} /// Errors returned by CreateStudio #[derive(Debug, PartialEq)] pub enum CreateStudioError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl CreateStudioError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStudioError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(CreateStudioError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(CreateStudioError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for CreateStudioError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { CreateStudioError::InternalServer(ref cause) => write!(f, "{}", cause), CreateStudioError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for CreateStudioError {} /// Errors returned by CreateStudioSessionMapping #[derive(Debug, PartialEq)] pub enum CreateStudioSessionMappingError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl CreateStudioSessionMappingError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<CreateStudioSessionMappingError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service( CreateStudioSessionMappingError::InternalServerError(err.msg), ) } "InvalidRequestException" => { return RusotoError::Service(CreateStudioSessionMappingError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for CreateStudioSessionMappingError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { CreateStudioSessionMappingError::InternalServerError(ref cause) => { write!(f, "{}", cause) } CreateStudioSessionMappingError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for CreateStudioSessionMappingError {} /// Errors returned by DeleteSecurityConfiguration #[derive(Debug, PartialEq)] pub enum DeleteSecurityConfigurationError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl DeleteSecurityConfigurationError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteSecurityConfigurationError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(DeleteSecurityConfigurationError::InternalServer( err.msg, )) } "InvalidRequestException" => { return RusotoError::Service(DeleteSecurityConfigurationError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for DeleteSecurityConfigurationError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { DeleteSecurityConfigurationError::InternalServer(ref cause) => write!(f, "{}", cause), DeleteSecurityConfigurationError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for DeleteSecurityConfigurationError {} /// Errors returned by DeleteStudio #[derive(Debug, PartialEq)] pub enum DeleteStudioError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl DeleteStudioError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStudioError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(DeleteStudioError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(DeleteStudioError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for DeleteStudioError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { DeleteStudioError::InternalServer(ref cause) => write!(f, "{}", cause), DeleteStudioError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for DeleteStudioError {} /// Errors returned by DeleteStudioSessionMapping #[derive(Debug, PartialEq)] pub enum DeleteStudioSessionMappingError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl DeleteStudioSessionMappingError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<DeleteStudioSessionMappingError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service( DeleteStudioSessionMappingError::InternalServerError(err.msg), ) } "InvalidRequestException" => { return RusotoError::Service(DeleteStudioSessionMappingError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for DeleteStudioSessionMappingError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { DeleteStudioSessionMappingError::InternalServerError(ref cause) => { write!(f, "{}", cause) } DeleteStudioSessionMappingError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for DeleteStudioSessionMappingError {} /// Errors returned by DescribeCluster #[derive(Debug, PartialEq)] pub enum DescribeClusterError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl DescribeClusterError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeClusterError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(DescribeClusterError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(DescribeClusterError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for DescribeClusterError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { DescribeClusterError::InternalServer(ref cause) => write!(f, "{}", cause), DescribeClusterError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for DescribeClusterError {} /// Errors returned by DescribeJobFlows #[derive(Debug, PartialEq)] pub enum DescribeJobFlowsError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), } impl DescribeJobFlowsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeJobFlowsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(DescribeJobFlowsError::InternalServerError( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for DescribeJobFlowsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { DescribeJobFlowsError::InternalServerError(ref cause) => write!(f, "{}", cause), } } } impl Error for DescribeJobFlowsError {} /// Errors returned by DescribeNotebookExecution #[derive(Debug, PartialEq)] pub enum DescribeNotebookExecutionError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl DescribeNotebookExecutionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeNotebookExecutionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service( DescribeNotebookExecutionError::InternalServerError(err.msg), ) } "InvalidRequestException" => { return RusotoError::Service(DescribeNotebookExecutionError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for DescribeNotebookExecutionError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { DescribeNotebookExecutionError::InternalServerError(ref cause) => { write!(f, "{}", cause) } DescribeNotebookExecutionError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for DescribeNotebookExecutionError {} /// Errors returned by DescribeSecurityConfiguration #[derive(Debug, PartialEq)] pub enum DescribeSecurityConfigurationError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl DescribeSecurityConfigurationError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<DescribeSecurityConfigurationError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service( DescribeSecurityConfigurationError::InternalServer(err.msg), ) } "InvalidRequestException" => { return RusotoError::Service( DescribeSecurityConfigurationError::InvalidRequest(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for DescribeSecurityConfigurationError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { DescribeSecurityConfigurationError::InternalServer(ref cause) => write!(f, "{}", cause), DescribeSecurityConfigurationError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for DescribeSecurityConfigurationError {} /// Errors returned by DescribeStep #[derive(Debug, PartialEq)] pub enum DescribeStepError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl DescribeStepError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStepError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(DescribeStepError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(DescribeStepError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for DescribeStepError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { DescribeStepError::InternalServer(ref cause) => write!(f, "{}", cause), DescribeStepError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for DescribeStepError {} /// Errors returned by DescribeStudio #[derive(Debug, PartialEq)] pub enum DescribeStudioError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl DescribeStudioError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStudioError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(DescribeStudioError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(DescribeStudioError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for DescribeStudioError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { DescribeStudioError::InternalServer(ref cause) => write!(f, "{}", cause), DescribeStudioError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for DescribeStudioError {} /// Errors returned by GetBlockPublicAccessConfiguration #[derive(Debug, PartialEq)] pub enum GetBlockPublicAccessConfigurationError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl GetBlockPublicAccessConfigurationError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<GetBlockPublicAccessConfigurationError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service( GetBlockPublicAccessConfigurationError::InternalServer(err.msg), ) } "InvalidRequestException" => { return RusotoError::Service( GetBlockPublicAccessConfigurationError::InvalidRequest(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for GetBlockPublicAccessConfigurationError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { GetBlockPublicAccessConfigurationError::InternalServer(ref cause) => { write!(f, "{}", cause) } GetBlockPublicAccessConfigurationError::InvalidRequest(ref cause) => { write!(f, "{}", cause) } } } } impl Error for GetBlockPublicAccessConfigurationError {} /// Errors returned by GetManagedScalingPolicy #[derive(Debug, PartialEq)] pub enum GetManagedScalingPolicyError {} impl GetManagedScalingPolicyError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetManagedScalingPolicyError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for GetManagedScalingPolicyError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self {} } } impl Error for GetManagedScalingPolicyError {} /// Errors returned by GetStudioSessionMapping #[derive(Debug, PartialEq)] pub enum GetStudioSessionMappingError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl GetStudioSessionMappingError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetStudioSessionMappingError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(GetStudioSessionMappingError::InternalServerError( err.msg, )) } "InvalidRequestException" => { return RusotoError::Service(GetStudioSessionMappingError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for GetStudioSessionMappingError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { GetStudioSessionMappingError::InternalServerError(ref cause) => write!(f, "{}", cause), GetStudioSessionMappingError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for GetStudioSessionMappingError {} /// Errors returned by ListBootstrapActions #[derive(Debug, PartialEq)] pub enum ListBootstrapActionsError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListBootstrapActionsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBootstrapActionsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(ListBootstrapActionsError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(ListBootstrapActionsError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListBootstrapActionsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListBootstrapActionsError::InternalServer(ref cause) => write!(f, "{}", cause), ListBootstrapActionsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListBootstrapActionsError {} /// Errors returned by ListClusters #[derive(Debug, PartialEq)] pub enum ListClustersError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListClustersError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListClustersError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(ListClustersError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(ListClustersError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListClustersError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListClustersError::InternalServer(ref cause) => write!(f, "{}", cause), ListClustersError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListClustersError {} /// Errors returned by ListInstanceFleets #[derive(Debug, PartialEq)] pub enum ListInstanceFleetsError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListInstanceFleetsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListInstanceFleetsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(ListInstanceFleetsError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(ListInstanceFleetsError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListInstanceFleetsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListInstanceFleetsError::InternalServer(ref cause) => write!(f, "{}", cause), ListInstanceFleetsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListInstanceFleetsError {} /// Errors returned by ListInstanceGroups #[derive(Debug, PartialEq)] pub enum ListInstanceGroupsError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListInstanceGroupsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListInstanceGroupsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(ListInstanceGroupsError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(ListInstanceGroupsError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListInstanceGroupsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListInstanceGroupsError::InternalServer(ref cause) => write!(f, "{}", cause), ListInstanceGroupsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListInstanceGroupsError {} /// Errors returned by ListInstances #[derive(Debug, PartialEq)] pub enum ListInstancesError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListInstancesError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListInstancesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(ListInstancesError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(ListInstancesError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListInstancesError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListInstancesError::InternalServer(ref cause) => write!(f, "{}", cause), ListInstancesError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListInstancesError {} /// Errors returned by ListNotebookExecutions #[derive(Debug, PartialEq)] pub enum ListNotebookExecutionsError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListNotebookExecutionsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListNotebookExecutionsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(ListNotebookExecutionsError::InternalServerError( err.msg, )) } "InvalidRequestException" => { return RusotoError::Service(ListNotebookExecutionsError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListNotebookExecutionsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListNotebookExecutionsError::InternalServerError(ref cause) => write!(f, "{}", cause), ListNotebookExecutionsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListNotebookExecutionsError {} /// Errors returned by ListSecurityConfigurations #[derive(Debug, PartialEq)] pub enum ListSecurityConfigurationsError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListSecurityConfigurationsError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<ListSecurityConfigurationsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(ListSecurityConfigurationsError::InternalServer( err.msg, )) } "InvalidRequestException" => { return RusotoError::Service(ListSecurityConfigurationsError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListSecurityConfigurationsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListSecurityConfigurationsError::InternalServer(ref cause) => write!(f, "{}", cause), ListSecurityConfigurationsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListSecurityConfigurationsError {} /// Errors returned by ListSteps #[derive(Debug, PartialEq)] pub enum ListStepsError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListStepsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStepsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(ListStepsError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(ListStepsError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListStepsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListStepsError::InternalServer(ref cause) => write!(f, "{}", cause), ListStepsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListStepsError {} /// Errors returned by ListStudioSessionMappings #[derive(Debug, PartialEq)] pub enum ListStudioSessionMappingsError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListStudioSessionMappingsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStudioSessionMappingsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service( ListStudioSessionMappingsError::InternalServerError(err.msg), ) } "InvalidRequestException" => { return RusotoError::Service(ListStudioSessionMappingsError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListStudioSessionMappingsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListStudioSessionMappingsError::InternalServerError(ref cause) => { write!(f, "{}", cause) } ListStudioSessionMappingsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListStudioSessionMappingsError {} /// Errors returned by ListStudios #[derive(Debug, PartialEq)] pub enum ListStudiosError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ListStudiosError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStudiosError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(ListStudiosError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(ListStudiosError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ListStudiosError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ListStudiosError::InternalServer(ref cause) => write!(f, "{}", cause), ListStudiosError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ListStudiosError {} /// Errors returned by ModifyCluster #[derive(Debug, PartialEq)] pub enum ModifyClusterError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ModifyClusterError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyClusterError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(ModifyClusterError::InternalServerError(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(ModifyClusterError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ModifyClusterError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ModifyClusterError::InternalServerError(ref cause) => write!(f, "{}", cause), ModifyClusterError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ModifyClusterError {} /// Errors returned by ModifyInstanceFleet #[derive(Debug, PartialEq)] pub enum ModifyInstanceFleetError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl ModifyInstanceFleetError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyInstanceFleetError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(ModifyInstanceFleetError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(ModifyInstanceFleetError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ModifyInstanceFleetError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ModifyInstanceFleetError::InternalServer(ref cause) => write!(f, "{}", cause), ModifyInstanceFleetError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for ModifyInstanceFleetError {} /// Errors returned by ModifyInstanceGroups #[derive(Debug, PartialEq)] pub enum ModifyInstanceGroupsError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), } impl ModifyInstanceGroupsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyInstanceGroupsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(ModifyInstanceGroupsError::InternalServerError( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for ModifyInstanceGroupsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ModifyInstanceGroupsError::InternalServerError(ref cause) => write!(f, "{}", cause), } } } impl Error for ModifyInstanceGroupsError {} /// Errors returned by PutAutoScalingPolicy #[derive(Debug, PartialEq)] pub enum PutAutoScalingPolicyError {} impl PutAutoScalingPolicyError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutAutoScalingPolicyError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for PutAutoScalingPolicyError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self {} } } impl Error for PutAutoScalingPolicyError {} /// Errors returned by PutBlockPublicAccessConfiguration #[derive(Debug, PartialEq)] pub enum PutBlockPublicAccessConfigurationError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl PutBlockPublicAccessConfigurationError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<PutBlockPublicAccessConfigurationError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service( PutBlockPublicAccessConfigurationError::InternalServer(err.msg), ) } "InvalidRequestException" => { return RusotoError::Service( PutBlockPublicAccessConfigurationError::InvalidRequest(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for PutBlockPublicAccessConfigurationError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { PutBlockPublicAccessConfigurationError::InternalServer(ref cause) => { write!(f, "{}", cause) } PutBlockPublicAccessConfigurationError::InvalidRequest(ref cause) => { write!(f, "{}", cause) } } } } impl Error for PutBlockPublicAccessConfigurationError {} /// Errors returned by PutManagedScalingPolicy #[derive(Debug, PartialEq)] pub enum PutManagedScalingPolicyError {} impl PutManagedScalingPolicyError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutManagedScalingPolicyError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for PutManagedScalingPolicyError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self {} } } impl Error for PutManagedScalingPolicyError {} /// Errors returned by RemoveAutoScalingPolicy #[derive(Debug, PartialEq)] pub enum RemoveAutoScalingPolicyError {} impl RemoveAutoScalingPolicyError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveAutoScalingPolicyError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for RemoveAutoScalingPolicyError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self {} } } impl Error for RemoveAutoScalingPolicyError {} /// Errors returned by RemoveManagedScalingPolicy #[derive(Debug, PartialEq)] pub enum RemoveManagedScalingPolicyError {} impl RemoveManagedScalingPolicyError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<RemoveManagedScalingPolicyError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for RemoveManagedScalingPolicyError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self {} } } impl Error for RemoveManagedScalingPolicyError {} /// Errors returned by RemoveTags #[derive(Debug, PartialEq)] pub enum RemoveTagsError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl RemoveTagsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(RemoveTagsError::InternalServer(err.msg)) } "InvalidRequestException" => { return RusotoError::Service(RemoveTagsError::InvalidRequest(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for RemoveTagsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { RemoveTagsError::InternalServer(ref cause) => write!(f, "{}", cause), RemoveTagsError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for RemoveTagsError {} /// Errors returned by RunJobFlow #[derive(Debug, PartialEq)] pub enum RunJobFlowError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), } impl RunJobFlowError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RunJobFlowError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(RunJobFlowError::InternalServerError(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for RunJobFlowError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { RunJobFlowError::InternalServerError(ref cause) => write!(f, "{}", cause), } } } impl Error for RunJobFlowError {} /// Errors returned by SetTerminationProtection #[derive(Debug, PartialEq)] pub enum SetTerminationProtectionError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), } impl SetTerminationProtectionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetTerminationProtectionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service( SetTerminationProtectionError::InternalServerError(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for SetTerminationProtectionError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { SetTerminationProtectionError::InternalServerError(ref cause) => write!(f, "{}", cause), } } } impl Error for SetTerminationProtectionError {} /// Errors returned by SetVisibleToAllUsers #[derive(Debug, PartialEq)] pub enum SetVisibleToAllUsersError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), } impl SetVisibleToAllUsersError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetVisibleToAllUsersError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(SetVisibleToAllUsersError::InternalServerError( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for SetVisibleToAllUsersError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { SetVisibleToAllUsersError::InternalServerError(ref cause) => write!(f, "{}", cause), } } } impl Error for SetVisibleToAllUsersError {} /// Errors returned by StartNotebookExecution #[derive(Debug, PartialEq)] pub enum StartNotebookExecutionError { /// <p>This exception occurs when there is an internal failure in the EMR service.</p> InternalServer(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl StartNotebookExecutionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartNotebookExecutionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerException" => { return RusotoError::Service(StartNotebookExecutionError::InternalServer( err.msg, )) } "InvalidRequestException" => { return RusotoError::Service(StartNotebookExecutionError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for StartNotebookExecutionError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { StartNotebookExecutionError::InternalServer(ref cause) => write!(f, "{}", cause), StartNotebookExecutionError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for StartNotebookExecutionError {} /// Errors returned by StopNotebookExecution #[derive(Debug, PartialEq)] pub enum StopNotebookExecutionError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl StopNotebookExecutionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopNotebookExecutionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(StopNotebookExecutionError::InternalServerError( err.msg, )) } "InvalidRequestException" => { return RusotoError::Service(StopNotebookExecutionError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for StopNotebookExecutionError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { StopNotebookExecutionError::InternalServerError(ref cause) => write!(f, "{}", cause), StopNotebookExecutionError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for StopNotebookExecutionError {} /// Errors returned by TerminateJobFlows #[derive(Debug, PartialEq)] pub enum TerminateJobFlowsError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), } impl TerminateJobFlowsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TerminateJobFlowsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service(TerminateJobFlowsError::InternalServerError( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for TerminateJobFlowsError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { TerminateJobFlowsError::InternalServerError(ref cause) => write!(f, "{}", cause), } } } impl Error for TerminateJobFlowsError {} /// Errors returned by UpdateStudioSessionMapping #[derive(Debug, PartialEq)] pub enum UpdateStudioSessionMappingError { /// <p>Indicates that an error occurred while processing the request and that the request was not completed.</p> InternalServerError(String), /// <p>This exception occurs when there is something wrong with user input.</p> InvalidRequest(String), } impl UpdateStudioSessionMappingError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<UpdateStudioSessionMappingError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InternalServerError" => { return RusotoError::Service( UpdateStudioSessionMappingError::InternalServerError(err.msg), ) } "InvalidRequestException" => { return RusotoError::Service(UpdateStudioSessionMappingError::InvalidRequest( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } RusotoError::Unknown(res) } } impl fmt::Display for UpdateStudioSessionMappingError { #[allow(unused_variables)] fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { UpdateStudioSessionMappingError::InternalServerError(ref cause) => { write!(f, "{}", cause) } UpdateStudioSessionMappingError::InvalidRequest(ref cause) => write!(f, "{}", cause), } } } impl Error for UpdateStudioSessionMappingError {} /// Trait representing the capabilities of the Amazon EMR API. Amazon EMR clients implement this trait. #[async_trait] pub trait Emr { /// <p><p>Adds an instance fleet to a running cluster.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x.</p> </note></p> async fn add_instance_fleet( &self, input: AddInstanceFleetInput, ) -> Result<AddInstanceFleetOutput, RusotoError<AddInstanceFleetError>>; /// <p>Adds one or more instance groups to a running cluster.</p> async fn add_instance_groups( &self, input: AddInstanceGroupsInput, ) -> Result<AddInstanceGroupsOutput, RusotoError<AddInstanceGroupsError>>; /// <p>AddJobFlowSteps adds new steps to a running cluster. A maximum of 256 steps are allowed in each job flow.</p> <p>If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using SSH to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>.</p> <p>A step specifies the location of a JAR file stored either on the master node of the cluster or in Amazon S3. Each step is performed by the main function of the main class of the JAR file. The main class can be specified either in the manifest of the JAR or by using the MainFunction parameter of the step.</p> <p>Amazon EMR executes each step in the order listed. For a step to be considered complete, the main function must exit with a zero exit code and all Hadoop jobs started while the step was running must have completed and run successfully.</p> <p>You can only add steps to a cluster that is in one of the following states: STARTING, BOOTSTRAPPING, RUNNING, or WAITING.</p> async fn add_job_flow_steps( &self, input: AddJobFlowStepsInput, ) -> Result<AddJobFlowStepsOutput, RusotoError<AddJobFlowStepsError>>; /// <p>Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag Clusters</a>. </p> async fn add_tags( &self, input: AddTagsInput, ) -> Result<AddTagsOutput, RusotoError<AddTagsError>>; /// <p>Cancels a pending step or steps in a running cluster. Available only in Amazon EMR versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed in each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not guarantee that a step will be canceled, even if the request is successfully submitted. You can only cancel steps that are in a <code>PENDING</code> state.</p> async fn cancel_steps( &self, input: CancelStepsInput, ) -> Result<CancelStepsOutput, RusotoError<CancelStepsError>>; /// <p>Creates a security configuration, which is stored in the service and can be specified when a cluster is created.</p> async fn create_security_configuration( &self, input: CreateSecurityConfigurationInput, ) -> Result<CreateSecurityConfigurationOutput, RusotoError<CreateSecurityConfigurationError>>; /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Creates a new Amazon EMR Studio.</p></p> async fn create_studio( &self, input: CreateStudioInput, ) -> Result<CreateStudioOutput, RusotoError<CreateStudioError>>; /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Maps a user or group to the Amazon EMR Studio specified by <code>StudioId</code>, and applies a session policy to refine Studio permissions for that user or group.</p></p> async fn create_studio_session_mapping( &self, input: CreateStudioSessionMappingInput, ) -> Result<(), RusotoError<CreateStudioSessionMappingError>>; /// <p>Deletes a security configuration.</p> async fn delete_security_configuration( &self, input: DeleteSecurityConfigurationInput, ) -> Result<DeleteSecurityConfigurationOutput, RusotoError<DeleteSecurityConfigurationError>>; /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Removes an Amazon EMR Studio from the Studio metadata store.</p></p> async fn delete_studio( &self, input: DeleteStudioInput, ) -> Result<(), RusotoError<DeleteStudioError>>; /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Removes a user or group from an Amazon EMR Studio.</p></p> async fn delete_studio_session_mapping( &self, input: DeleteStudioSessionMappingInput, ) -> Result<(), RusotoError<DeleteStudioSessionMappingError>>; /// <p>Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on. </p> async fn describe_cluster( &self, input: DescribeClusterInput, ) -> Result<DescribeClusterOutput, RusotoError<DescribeClusterError>>; /// <p>This API is no longer supported and will eventually be removed. We recommend you use <a>ListClusters</a>, <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a> and <a>ListBootstrapActions</a> instead.</p> <p>DescribeJobFlows returns a list of job flows that match all of the supplied parameters. The parameters can include a list of job flow IDs, job flow states, and restrictions on job flow creation date and time.</p> <p>Regardless of supplied parameters, only job flows created within the last two months are returned.</p> <p>If no parameters are supplied, then job flows matching either of the following criteria are returned:</p> <ul> <li> <p>Job flows created and completed in the last two weeks</p> </li> <li> <p> Job flows created within the last two months that are in one of the following states: <code>RUNNING</code>, <code>WAITING</code>, <code>SHUTTING_DOWN</code>, <code>STARTING</code> </p> </li> </ul> <p>Amazon EMR can return a maximum of 512 job flow descriptions.</p> async fn describe_job_flows( &self, input: DescribeJobFlowsInput, ) -> Result<DescribeJobFlowsOutput, RusotoError<DescribeJobFlowsError>>; /// <p>Provides details of a notebook execution.</p> async fn describe_notebook_execution( &self, input: DescribeNotebookExecutionInput, ) -> Result<DescribeNotebookExecutionOutput, RusotoError<DescribeNotebookExecutionError>>; /// <p>Provides the details of a security configuration by returning the configuration JSON.</p> async fn describe_security_configuration( &self, input: DescribeSecurityConfigurationInput, ) -> Result<DescribeSecurityConfigurationOutput, RusotoError<DescribeSecurityConfigurationError>>; /// <p>Provides more detail about the cluster step.</p> async fn describe_step( &self, input: DescribeStepInput, ) -> Result<DescribeStepOutput, RusotoError<DescribeStepError>>; /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Returns details for the specified Amazon EMR Studio including ID, Name, VPC, Studio access URL, and so on.</p></p> async fn describe_studio( &self, input: DescribeStudioInput, ) -> Result<DescribeStudioOutput, RusotoError<DescribeStudioError>>; /// <p>Returns the Amazon EMR block public access configuration for your AWS account in the current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>.</p> async fn get_block_public_access_configuration( &self, ) -> Result< GetBlockPublicAccessConfigurationOutput, RusotoError<GetBlockPublicAccessConfigurationError>, >; /// <p>Fetches the attached managed scaling policy for an Amazon EMR cluster. </p> async fn get_managed_scaling_policy( &self, input: GetManagedScalingPolicyInput, ) -> Result<GetManagedScalingPolicyOutput, RusotoError<GetManagedScalingPolicyError>>; /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Fetches mapping details for the specified Amazon EMR Studio and identity (user or group).</p></p> async fn get_studio_session_mapping( &self, input: GetStudioSessionMappingInput, ) -> Result<GetStudioSessionMappingOutput, RusotoError<GetStudioSessionMappingError>>; /// <p>Provides information about the bootstrap actions associated with a cluster.</p> async fn list_bootstrap_actions( &self, input: ListBootstrapActionsInput, ) -> Result<ListBootstrapActionsOutput, RusotoError<ListBootstrapActionsError>>; /// <p>Provides the status of all clusters visible to this AWS account. Allows you to filter the list of clusters based on certain criteria; for example, filtering by cluster creation date and time or by status. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListClusters calls.</p> async fn list_clusters( &self, input: ListClustersInput, ) -> Result<ListClustersOutput, RusotoError<ListClustersError>>; /// <p><p>Lists all available details about the instance fleets in a cluster.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> async fn list_instance_fleets( &self, input: ListInstanceFleetsInput, ) -> Result<ListInstanceFleetsOutput, RusotoError<ListInstanceFleetsError>>; /// <p>Provides all available details about the instance groups in a cluster.</p> async fn list_instance_groups( &self, input: ListInstanceGroupsInput, ) -> Result<ListInstanceGroupsOutput, RusotoError<ListInstanceGroupsError>>; /// <p>Provides information for all active EC2 instances and EC2 instances terminated in the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.</p> async fn list_instances( &self, input: ListInstancesInput, ) -> Result<ListInstancesOutput, RusotoError<ListInstancesError>>; /// <p>Provides summaries of all notebook executions. You can filter the list based on multiple criteria such as status, time range, and editor id. Returns a maximum of 50 notebook executions and a marker to track the paging of a longer notebook execution list across multiple <code>ListNotebookExecution</code> calls.</p> async fn list_notebook_executions( &self, input: ListNotebookExecutionsInput, ) -> Result<ListNotebookExecutionsOutput, RusotoError<ListNotebookExecutionsError>>; /// <p>Lists all the security configurations visible to this account, providing their creation dates and times, and their names. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListSecurityConfigurations calls.</p> async fn list_security_configurations( &self, input: ListSecurityConfigurationsInput, ) -> Result<ListSecurityConfigurationsOutput, RusotoError<ListSecurityConfigurationsError>>; /// <p>Provides a list of steps for the cluster in reverse order unless you specify <code>stepIds</code> with the request of filter by <code>StepStates</code>. You can specify a maximum of ten <code>stepIDs</code>.</p> async fn list_steps( &self, input: ListStepsInput, ) -> Result<ListStepsOutput, RusotoError<ListStepsError>>; /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Returns a list of all user or group session mappings for the EMR Studio specified by <code>StudioId</code>.</p></p> async fn list_studio_session_mappings( &self, input: ListStudioSessionMappingsInput, ) -> Result<ListStudioSessionMappingsOutput, RusotoError<ListStudioSessionMappingsError>>; /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Returns a list of all Amazon EMR Studios associated with the AWS account. The list includes details such as ID, Studio Access URL, and creation time for each Studio.</p></p> async fn list_studios( &self, input: ListStudiosInput, ) -> Result<ListStudiosOutput, RusotoError<ListStudiosError>>; /// <p>Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.</p> async fn modify_cluster( &self, input: ModifyClusterInput, ) -> Result<ModifyClusterOutput, RusotoError<ModifyClusterError>>; /// <p><p>Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> async fn modify_instance_fleet( &self, input: ModifyInstanceFleetInput, ) -> Result<(), RusotoError<ModifyInstanceFleetError>>; /// <p>ModifyInstanceGroups modifies the number of nodes and configuration settings of an instance group. The input parameters include the new target instance count for the group and the instance group ID. The call will either succeed or fail atomically.</p> async fn modify_instance_groups( &self, input: ModifyInstanceGroupsInput, ) -> Result<(), RusotoError<ModifyInstanceGroupsError>>; /// <p>Creates or updates an automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.</p> async fn put_auto_scaling_policy( &self, input: PutAutoScalingPolicyInput, ) -> Result<PutAutoScalingPolicyOutput, RusotoError<PutAutoScalingPolicyError>>; /// <p>Creates or updates an Amazon EMR block public access configuration for your AWS account in the current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>.</p> async fn put_block_public_access_configuration( &self, input: PutBlockPublicAccessConfigurationInput, ) -> Result< PutBlockPublicAccessConfigurationOutput, RusotoError<PutBlockPublicAccessConfigurationError>, >; /// <p>Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration. </p> async fn put_managed_scaling_policy( &self, input: PutManagedScalingPolicyInput, ) -> Result<PutManagedScalingPolicyOutput, RusotoError<PutManagedScalingPolicyError>>; /// <p>Removes an automatic scaling policy from a specified instance group within an EMR cluster.</p> async fn remove_auto_scaling_policy( &self, input: RemoveAutoScalingPolicyInput, ) -> Result<RemoveAutoScalingPolicyOutput, RusotoError<RemoveAutoScalingPolicyError>>; /// <p> Removes a managed scaling policy from a specified EMR cluster. </p> async fn remove_managed_scaling_policy( &self, input: RemoveManagedScalingPolicyInput, ) -> Result<RemoveManagedScalingPolicyOutput, RusotoError<RemoveManagedScalingPolicyError>>; /// <p>Removes tags from an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag Clusters</a>. </p> <p>The following example removes the stack tag with value Prod from a cluster:</p> async fn remove_tags( &self, input: RemoveTagsInput, ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>>; /// <p><p>RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the steps specified. After the steps complete, the cluster stops and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3. If the <a>JobFlowInstancesConfig</a> <code>KeepJobFlowAliveWhenNoSteps</code> parameter is set to <code>TRUE</code>, the cluster transitions to the WAITING state rather than shutting down after the steps have completed. </p> <p>For additional protection, you can set the <a>JobFlowInstancesConfig</a> <code>TerminationProtected</code> parameter to <code>TRUE</code> to lock the cluster and prevent it from being terminated by API call, user intervention, or in the event of a job flow error.</p> <p>A maximum of 256 steps are allowed in each job flow.</p> <p>If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>.</p> <p>For long running clusters, we recommend that you periodically store your results.</p> <note> <p>The instance fleets configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. The RunJobFlow request can contain InstanceFleets parameters or InstanceGroups parameters, but not both.</p> </note></p> async fn run_job_flow( &self, input: RunJobFlowInput, ) -> Result<RunJobFlowOutput, RusotoError<RunJobFlowError>>; /// <p>SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling <code>SetTerminationProtection</code> on a cluster is similar to calling the Amazon EC2 <code>DisableAPITermination</code> API on all EC2 instances in a cluster.</p> <p> <code>SetTerminationProtection</code> is used to prevent accidental termination of a cluster and to ensure that in the event of an error, the instances persist so that you can recover any data stored in their ephemeral instance storage.</p> <p> To terminate a cluster that has been locked by setting <code>SetTerminationProtection</code> to <code>true</code>, you must first unlock the job flow by a subsequent call to <code>SetTerminationProtection</code> in which you set the value to <code>false</code>. </p> <p> For more information, see<a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html">Managing Cluster Termination</a> in the <i>Amazon EMR Management Guide</i>. </p> async fn set_termination_protection( &self, input: SetTerminationProtectionInput, ) -> Result<(), RusotoError<SetTerminationProtectionError>>; /// <p>Sets the <a>Cluster$VisibleToAllUsers</a> value, which determines whether the cluster is visible to all IAM users of the AWS account associated with the cluster. Only the IAM user who created the cluster or the AWS account root user can call this action. The default value, <code>true</code>, indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. If set to <code>false</code>, only the IAM user that created the cluster can perform actions. This action works on running clusters. You can override the default <code>true</code> setting when you create a cluster by using the <code>VisibleToAllUsers</code> parameter with <code>RunJobFlow</code>.</p> async fn set_visible_to_all_users( &self, input: SetVisibleToAllUsersInput, ) -> Result<(), RusotoError<SetVisibleToAllUsersError>>; /// <p>Starts a notebook execution.</p> async fn start_notebook_execution( &self, input: StartNotebookExecutionInput, ) -> Result<StartNotebookExecutionOutput, RusotoError<StartNotebookExecutionError>>; /// <p>Stops a notebook execution.</p> async fn stop_notebook_execution( &self, input: StopNotebookExecutionInput, ) -> Result<(), RusotoError<StopNotebookExecutionError>>; /// <p>TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut down, any step not yet completed is canceled and the EC2 instances on which the cluster is running are stopped. Any log files not already saved are uploaded to Amazon S3 if a LogUri was specified when the cluster was created.</p> <p>The maximum number of clusters allowed is 10. The call to <code>TerminateJobFlows</code> is asynchronous. Depending on the configuration of the cluster, it may take up to 1-5 minutes for the cluster to completely terminate and release allocated resources, such as Amazon EC2 instances.</p> async fn terminate_job_flows( &self, input: TerminateJobFlowsInput, ) -> Result<(), RusotoError<TerminateJobFlowsError>>; /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Updates the session policy attached to the user or group for the specified Amazon EMR Studio.</p></p> async fn update_studio_session_mapping( &self, input: UpdateStudioSessionMappingInput, ) -> Result<(), RusotoError<UpdateStudioSessionMappingError>>; } /// A client for the Amazon EMR API. #[derive(Clone)] pub struct EmrClient { client: Client, region: region::Region, } impl EmrClient { /// 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) -> EmrClient { EmrClient { client: Client::shared(), region, } } pub fn new_with<P, D>( request_dispatcher: D, credentials_provider: P, region: region::Region, ) -> EmrClient where P: ProvideAwsCredentials + Send + Sync + 'static, D: DispatchSignedRequest + Send + Sync + 'static, { EmrClient { client: Client::new_with(credentials_provider, request_dispatcher), region, } } pub fn new_with_client(client: Client, region: region::Region) -> EmrClient { EmrClient { client, region } } } #[async_trait] impl Emr for EmrClient { /// <p><p>Adds an instance fleet to a running cluster.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x.</p> </note></p> async fn add_instance_fleet( &self, input: AddInstanceFleetInput, ) -> Result<AddInstanceFleetOutput, RusotoError<AddInstanceFleetError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.AddInstanceFleet"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, AddInstanceFleetError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<AddInstanceFleetOutput, _>() } /// <p>Adds one or more instance groups to a running cluster.</p> async fn add_instance_groups( &self, input: AddInstanceGroupsInput, ) -> Result<AddInstanceGroupsOutput, RusotoError<AddInstanceGroupsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.AddInstanceGroups"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, AddInstanceGroupsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<AddInstanceGroupsOutput, _>() } /// <p>AddJobFlowSteps adds new steps to a running cluster. A maximum of 256 steps are allowed in each job flow.</p> <p>If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using SSH to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>.</p> <p>A step specifies the location of a JAR file stored either on the master node of the cluster or in Amazon S3. Each step is performed by the main function of the main class of the JAR file. The main class can be specified either in the manifest of the JAR or by using the MainFunction parameter of the step.</p> <p>Amazon EMR executes each step in the order listed. For a step to be considered complete, the main function must exit with a zero exit code and all Hadoop jobs started while the step was running must have completed and run successfully.</p> <p>You can only add steps to a cluster that is in one of the following states: STARTING, BOOTSTRAPPING, RUNNING, or WAITING.</p> async fn add_job_flow_steps( &self, input: AddJobFlowStepsInput, ) -> Result<AddJobFlowStepsOutput, RusotoError<AddJobFlowStepsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.AddJobFlowSteps"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, AddJobFlowStepsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<AddJobFlowStepsOutput, _>() } /// <p>Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag Clusters</a>. </p> async fn add_tags( &self, input: AddTagsInput, ) -> Result<AddTagsOutput, RusotoError<AddTagsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.AddTags"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, AddTagsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<AddTagsOutput, _>() } /// <p>Cancels a pending step or steps in a running cluster. Available only in Amazon EMR versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed in each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not guarantee that a step will be canceled, even if the request is successfully submitted. You can only cancel steps that are in a <code>PENDING</code> state.</p> async fn cancel_steps( &self, input: CancelStepsInput, ) -> Result<CancelStepsOutput, RusotoError<CancelStepsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.CancelSteps"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, CancelStepsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<CancelStepsOutput, _>() } /// <p>Creates a security configuration, which is stored in the service and can be specified when a cluster is created.</p> async fn create_security_configuration( &self, input: CreateSecurityConfigurationInput, ) -> Result<CreateSecurityConfigurationOutput, RusotoError<CreateSecurityConfigurationError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.CreateSecurityConfiguration", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, CreateSecurityConfigurationError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<CreateSecurityConfigurationOutput, _>() } /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Creates a new Amazon EMR Studio.</p></p> async fn create_studio( &self, input: CreateStudioInput, ) -> Result<CreateStudioOutput, RusotoError<CreateStudioError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.CreateStudio"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, CreateStudioError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<CreateStudioOutput, _>() } /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Maps a user or group to the Amazon EMR Studio specified by <code>StudioId</code>, and applies a session policy to refine Studio permissions for that user or group.</p></p> async fn create_studio_session_mapping( &self, input: CreateStudioSessionMappingInput, ) -> Result<(), RusotoError<CreateStudioSessionMappingError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.CreateStudioSessionMapping", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, CreateStudioSessionMappingError::from_response) .await?; std::mem::drop(response); Ok(()) } /// <p>Deletes a security configuration.</p> async fn delete_security_configuration( &self, input: DeleteSecurityConfigurationInput, ) -> Result<DeleteSecurityConfigurationOutput, RusotoError<DeleteSecurityConfigurationError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.DeleteSecurityConfiguration", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, DeleteSecurityConfigurationError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<DeleteSecurityConfigurationOutput, _>() } /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Removes an Amazon EMR Studio from the Studio metadata store.</p></p> async fn delete_studio( &self, input: DeleteStudioInput, ) -> Result<(), RusotoError<DeleteStudioError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.DeleteStudio"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, DeleteStudioError::from_response) .await?; std::mem::drop(response); Ok(()) } /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Removes a user or group from an Amazon EMR Studio.</p></p> async fn delete_studio_session_mapping( &self, input: DeleteStudioSessionMappingInput, ) -> Result<(), RusotoError<DeleteStudioSessionMappingError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.DeleteStudioSessionMapping", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, DeleteStudioSessionMappingError::from_response) .await?; std::mem::drop(response); Ok(()) } /// <p>Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on. </p> async fn describe_cluster( &self, input: DescribeClusterInput, ) -> Result<DescribeClusterOutput, RusotoError<DescribeClusterError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.DescribeCluster"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, DescribeClusterError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<DescribeClusterOutput, _>() } /// <p>This API is no longer supported and will eventually be removed. We recommend you use <a>ListClusters</a>, <a>DescribeCluster</a>, <a>ListSteps</a>, <a>ListInstanceGroups</a> and <a>ListBootstrapActions</a> instead.</p> <p>DescribeJobFlows returns a list of job flows that match all of the supplied parameters. The parameters can include a list of job flow IDs, job flow states, and restrictions on job flow creation date and time.</p> <p>Regardless of supplied parameters, only job flows created within the last two months are returned.</p> <p>If no parameters are supplied, then job flows matching either of the following criteria are returned:</p> <ul> <li> <p>Job flows created and completed in the last two weeks</p> </li> <li> <p> Job flows created within the last two months that are in one of the following states: <code>RUNNING</code>, <code>WAITING</code>, <code>SHUTTING_DOWN</code>, <code>STARTING</code> </p> </li> </ul> <p>Amazon EMR can return a maximum of 512 job flow descriptions.</p> async fn describe_job_flows( &self, input: DescribeJobFlowsInput, ) -> Result<DescribeJobFlowsOutput, RusotoError<DescribeJobFlowsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.DescribeJobFlows"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, DescribeJobFlowsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<DescribeJobFlowsOutput, _>() } /// <p>Provides details of a notebook execution.</p> async fn describe_notebook_execution( &self, input: DescribeNotebookExecutionInput, ) -> Result<DescribeNotebookExecutionOutput, RusotoError<DescribeNotebookExecutionError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.DescribeNotebookExecution"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, DescribeNotebookExecutionError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<DescribeNotebookExecutionOutput, _>() } /// <p>Provides the details of a security configuration by returning the configuration JSON.</p> async fn describe_security_configuration( &self, input: DescribeSecurityConfigurationInput, ) -> Result<DescribeSecurityConfigurationOutput, RusotoError<DescribeSecurityConfigurationError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.DescribeSecurityConfiguration", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, DescribeSecurityConfigurationError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<DescribeSecurityConfigurationOutput, _>() } /// <p>Provides more detail about the cluster step.</p> async fn describe_step( &self, input: DescribeStepInput, ) -> Result<DescribeStepOutput, RusotoError<DescribeStepError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.DescribeStep"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, DescribeStepError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<DescribeStepOutput, _>() } /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Returns details for the specified Amazon EMR Studio including ID, Name, VPC, Studio access URL, and so on.</p></p> async fn describe_studio( &self, input: DescribeStudioInput, ) -> Result<DescribeStudioOutput, RusotoError<DescribeStudioError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.DescribeStudio"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, DescribeStudioError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<DescribeStudioOutput, _>() } /// <p>Returns the Amazon EMR block public access configuration for your AWS account in the current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>.</p> async fn get_block_public_access_configuration( &self, ) -> Result< GetBlockPublicAccessConfigurationOutput, RusotoError<GetBlockPublicAccessConfigurationError>, > { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.GetBlockPublicAccessConfiguration", ); request.set_payload(Some(bytes::Bytes::from_static(b"{}"))); let response = self .sign_and_dispatch( request, GetBlockPublicAccessConfigurationError::from_response, ) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<GetBlockPublicAccessConfigurationOutput, _>() } /// <p>Fetches the attached managed scaling policy for an Amazon EMR cluster. </p> async fn get_managed_scaling_policy( &self, input: GetManagedScalingPolicyInput, ) -> Result<GetManagedScalingPolicyOutput, RusotoError<GetManagedScalingPolicyError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.GetManagedScalingPolicy"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, GetManagedScalingPolicyError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<GetManagedScalingPolicyOutput, _>() } /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Fetches mapping details for the specified Amazon EMR Studio and identity (user or group).</p></p> async fn get_studio_session_mapping( &self, input: GetStudioSessionMappingInput, ) -> Result<GetStudioSessionMappingOutput, RusotoError<GetStudioSessionMappingError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.GetStudioSessionMapping"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, GetStudioSessionMappingError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<GetStudioSessionMappingOutput, _>() } /// <p>Provides information about the bootstrap actions associated with a cluster.</p> async fn list_bootstrap_actions( &self, input: ListBootstrapActionsInput, ) -> Result<ListBootstrapActionsOutput, RusotoError<ListBootstrapActionsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ListBootstrapActions"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListBootstrapActionsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<ListBootstrapActionsOutput, _>() } /// <p>Provides the status of all clusters visible to this AWS account. Allows you to filter the list of clusters based on certain criteria; for example, filtering by cluster creation date and time or by status. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListClusters calls.</p> async fn list_clusters( &self, input: ListClustersInput, ) -> Result<ListClustersOutput, RusotoError<ListClustersError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ListClusters"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListClustersError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<ListClustersOutput, _>() } /// <p><p>Lists all available details about the instance fleets in a cluster.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> async fn list_instance_fleets( &self, input: ListInstanceFleetsInput, ) -> Result<ListInstanceFleetsOutput, RusotoError<ListInstanceFleetsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ListInstanceFleets"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListInstanceFleetsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<ListInstanceFleetsOutput, _>() } /// <p>Provides all available details about the instance groups in a cluster.</p> async fn list_instance_groups( &self, input: ListInstanceGroupsInput, ) -> Result<ListInstanceGroupsOutput, RusotoError<ListInstanceGroupsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ListInstanceGroups"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListInstanceGroupsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<ListInstanceGroupsOutput, _>() } /// <p>Provides information for all active EC2 instances and EC2 instances terminated in the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.</p> async fn list_instances( &self, input: ListInstancesInput, ) -> Result<ListInstancesOutput, RusotoError<ListInstancesError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ListInstances"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListInstancesError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<ListInstancesOutput, _>() } /// <p>Provides summaries of all notebook executions. You can filter the list based on multiple criteria such as status, time range, and editor id. Returns a maximum of 50 notebook executions and a marker to track the paging of a longer notebook execution list across multiple <code>ListNotebookExecution</code> calls.</p> async fn list_notebook_executions( &self, input: ListNotebookExecutionsInput, ) -> Result<ListNotebookExecutionsOutput, RusotoError<ListNotebookExecutionsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ListNotebookExecutions"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListNotebookExecutionsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<ListNotebookExecutionsOutput, _>() } /// <p>Lists all the security configurations visible to this account, providing their creation dates and times, and their names. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListSecurityConfigurations calls.</p> async fn list_security_configurations( &self, input: ListSecurityConfigurationsInput, ) -> Result<ListSecurityConfigurationsOutput, RusotoError<ListSecurityConfigurationsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.ListSecurityConfigurations", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListSecurityConfigurationsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<ListSecurityConfigurationsOutput, _>() } /// <p>Provides a list of steps for the cluster in reverse order unless you specify <code>stepIds</code> with the request of filter by <code>StepStates</code>. You can specify a maximum of ten <code>stepIDs</code>.</p> async fn list_steps( &self, input: ListStepsInput, ) -> Result<ListStepsOutput, RusotoError<ListStepsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ListSteps"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListStepsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<ListStepsOutput, _>() } /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Returns a list of all user or group session mappings for the EMR Studio specified by <code>StudioId</code>.</p></p> async fn list_studio_session_mappings( &self, input: ListStudioSessionMappingsInput, ) -> Result<ListStudioSessionMappingsOutput, RusotoError<ListStudioSessionMappingsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ListStudioSessionMappings"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListStudioSessionMappingsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<ListStudioSessionMappingsOutput, _>() } /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Returns a list of all Amazon EMR Studios associated with the AWS account. The list includes details such as ID, Studio Access URL, and creation time for each Studio.</p></p> async fn list_studios( &self, input: ListStudiosInput, ) -> Result<ListStudiosOutput, RusotoError<ListStudiosError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ListStudios"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ListStudiosError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<ListStudiosOutput, _>() } /// <p>Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.</p> async fn modify_cluster( &self, input: ModifyClusterInput, ) -> Result<ModifyClusterOutput, RusotoError<ModifyClusterError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ModifyCluster"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ModifyClusterError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<ModifyClusterOutput, _>() } /// <p><p>Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically.</p> <note> <p>The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.</p> </note></p> async fn modify_instance_fleet( &self, input: ModifyInstanceFleetInput, ) -> Result<(), RusotoError<ModifyInstanceFleetError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ModifyInstanceFleet"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ModifyInstanceFleetError::from_response) .await?; std::mem::drop(response); Ok(()) } /// <p>ModifyInstanceGroups modifies the number of nodes and configuration settings of an instance group. The input parameters include the new target instance count for the group and the instance group ID. The call will either succeed or fail atomically.</p> async fn modify_instance_groups( &self, input: ModifyInstanceGroupsInput, ) -> Result<(), RusotoError<ModifyInstanceGroupsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.ModifyInstanceGroups"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, ModifyInstanceGroupsError::from_response) .await?; std::mem::drop(response); Ok(()) } /// <p>Creates or updates an automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.</p> async fn put_auto_scaling_policy( &self, input: PutAutoScalingPolicyInput, ) -> Result<PutAutoScalingPolicyOutput, RusotoError<PutAutoScalingPolicyError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.PutAutoScalingPolicy"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, PutAutoScalingPolicyError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<PutAutoScalingPolicyOutput, _>() } /// <p>Creates or updates an Amazon EMR block public access configuration for your AWS account in the current Region. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html">Configure Block Public Access for Amazon EMR</a> in the <i>Amazon EMR Management Guide</i>.</p> async fn put_block_public_access_configuration( &self, input: PutBlockPublicAccessConfigurationInput, ) -> Result< PutBlockPublicAccessConfigurationOutput, RusotoError<PutBlockPublicAccessConfigurationError>, > { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.PutBlockPublicAccessConfiguration", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch( request, PutBlockPublicAccessConfigurationError::from_response, ) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<PutBlockPublicAccessConfigurationOutput, _>() } /// <p>Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration. </p> async fn put_managed_scaling_policy( &self, input: PutManagedScalingPolicyInput, ) -> Result<PutManagedScalingPolicyOutput, RusotoError<PutManagedScalingPolicyError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.PutManagedScalingPolicy"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, PutManagedScalingPolicyError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<PutManagedScalingPolicyOutput, _>() } /// <p>Removes an automatic scaling policy from a specified instance group within an EMR cluster.</p> async fn remove_auto_scaling_policy( &self, input: RemoveAutoScalingPolicyInput, ) -> Result<RemoveAutoScalingPolicyOutput, RusotoError<RemoveAutoScalingPolicyError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.RemoveAutoScalingPolicy"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, RemoveAutoScalingPolicyError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<RemoveAutoScalingPolicyOutput, _>() } /// <p> Removes a managed scaling policy from a specified EMR cluster. </p> async fn remove_managed_scaling_policy( &self, input: RemoveManagedScalingPolicyInput, ) -> Result<RemoveManagedScalingPolicyOutput, RusotoError<RemoveManagedScalingPolicyError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.RemoveManagedScalingPolicy", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, RemoveManagedScalingPolicyError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<RemoveManagedScalingPolicyOutput, _>() } /// <p>Removes tags from an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html">Tag Clusters</a>. </p> <p>The following example removes the stack tag with value Prod from a cluster:</p> async fn remove_tags( &self, input: RemoveTagsInput, ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.RemoveTags"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, RemoveTagsError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<RemoveTagsOutput, _>() } /// <p><p>RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the steps specified. After the steps complete, the cluster stops and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3. If the <a>JobFlowInstancesConfig</a> <code>KeepJobFlowAliveWhenNoSteps</code> parameter is set to <code>TRUE</code>, the cluster transitions to the WAITING state rather than shutting down after the steps have completed. </p> <p>For additional protection, you can set the <a>JobFlowInstancesConfig</a> <code>TerminationProtected</code> parameter to <code>TRUE</code> to lock the cluster and prevent it from being terminated by API call, user intervention, or in the event of a job flow error.</p> <p>A maximum of 256 steps are allowed in each job flow.</p> <p>If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/AddMoreThan256Steps.html">Add More than 256 Steps to a Cluster</a> in the <i>Amazon EMR Management Guide</i>.</p> <p>For long running clusters, we recommend that you periodically store your results.</p> <note> <p>The instance fleets configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. The RunJobFlow request can contain InstanceFleets parameters or InstanceGroups parameters, but not both.</p> </note></p> async fn run_job_flow( &self, input: RunJobFlowInput, ) -> Result<RunJobFlowOutput, RusotoError<RunJobFlowError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.RunJobFlow"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, RunJobFlowError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response).deserialize::<RunJobFlowOutput, _>() } /// <p>SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling <code>SetTerminationProtection</code> on a cluster is similar to calling the Amazon EC2 <code>DisableAPITermination</code> API on all EC2 instances in a cluster.</p> <p> <code>SetTerminationProtection</code> is used to prevent accidental termination of a cluster and to ensure that in the event of an error, the instances persist so that you can recover any data stored in their ephemeral instance storage.</p> <p> To terminate a cluster that has been locked by setting <code>SetTerminationProtection</code> to <code>true</code>, you must first unlock the job flow by a subsequent call to <code>SetTerminationProtection</code> in which you set the value to <code>false</code>. </p> <p> For more information, see<a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_TerminationProtection.html">Managing Cluster Termination</a> in the <i>Amazon EMR Management Guide</i>. </p> async fn set_termination_protection( &self, input: SetTerminationProtectionInput, ) -> Result<(), RusotoError<SetTerminationProtectionError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.SetTerminationProtection"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, SetTerminationProtectionError::from_response) .await?; std::mem::drop(response); Ok(()) } /// <p>Sets the <a>Cluster$VisibleToAllUsers</a> value, which determines whether the cluster is visible to all IAM users of the AWS account associated with the cluster. Only the IAM user who created the cluster or the AWS account root user can call this action. The default value, <code>true</code>, indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. If set to <code>false</code>, only the IAM user that created the cluster can perform actions. This action works on running clusters. You can override the default <code>true</code> setting when you create a cluster by using the <code>VisibleToAllUsers</code> parameter with <code>RunJobFlow</code>.</p> async fn set_visible_to_all_users( &self, input: SetVisibleToAllUsersInput, ) -> Result<(), RusotoError<SetVisibleToAllUsersError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.SetVisibleToAllUsers"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, SetVisibleToAllUsersError::from_response) .await?; std::mem::drop(response); Ok(()) } /// <p>Starts a notebook execution.</p> async fn start_notebook_execution( &self, input: StartNotebookExecutionInput, ) -> Result<StartNotebookExecutionOutput, RusotoError<StartNotebookExecutionError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.StartNotebookExecution"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, StartNotebookExecutionError::from_response) .await?; let mut response = response; let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?; proto::json::ResponsePayload::new(&response) .deserialize::<StartNotebookExecutionOutput, _>() } /// <p>Stops a notebook execution.</p> async fn stop_notebook_execution( &self, input: StopNotebookExecutionInput, ) -> Result<(), RusotoError<StopNotebookExecutionError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.StopNotebookExecution"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, StopNotebookExecutionError::from_response) .await?; std::mem::drop(response); Ok(()) } /// <p>TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut down, any step not yet completed is canceled and the EC2 instances on which the cluster is running are stopped. Any log files not already saved are uploaded to Amazon S3 if a LogUri was specified when the cluster was created.</p> <p>The maximum number of clusters allowed is 10. The call to <code>TerminateJobFlows</code> is asynchronous. Depending on the configuration of the cluster, it may take up to 1-5 minutes for the cluster to completely terminate and release allocated resources, such as Amazon EC2 instances.</p> async fn terminate_job_flows( &self, input: TerminateJobFlowsInput, ) -> Result<(), RusotoError<TerminateJobFlowsError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header("x-amz-target", "ElasticMapReduce.TerminateJobFlows"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, TerminateJobFlowsError::from_response) .await?; std::mem::drop(response); Ok(()) } /// <p><note> <p>The Amazon EMR Studio APIs are in preview release for Amazon EMR and are subject to change.</p> </note> <p>Updates the session policy attached to the user or group for the specified Amazon EMR Studio.</p></p> async fn update_studio_session_mapping( &self, input: UpdateStudioSessionMappingInput, ) -> Result<(), RusotoError<UpdateStudioSessionMappingError>> { let mut request = self.new_signed_request("POST", "/"); request.add_header( "x-amz-target", "ElasticMapReduce.UpdateStudioSessionMapping", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); let response = self .sign_and_dispatch(request, UpdateStudioSessionMappingError::from_response) .await?; std::mem::drop(response); Ok(()) } }