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
// ================================================================= // // * 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; #[allow(warnings)] use futures::future; use futures::Future; use rusoto_core::credential::ProvideAwsCredentials; use rusoto_core::region; use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest}; use rusoto_core::{Client, RusotoError, RusotoFuture}; use rusoto_core::proto; use rusoto_core::signature::SignedRequest; use serde_json; #[derive(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct AddInstanceFleetOutput { /// <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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct AddInstanceGroupsOutput { /// <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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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>Configuration of a bootstrap action.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] pub struct CancelStepsInput { /// <p>The <code>ClusterID</code> for which specified steps will be canceled. Use <a>RunJobFlow</a> and <a>ListClusters</a> to get ClusterIDs. </p> #[serde(rename = "ClusterId")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_id: 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")] #[serde(skip_serializing_if = "Option::is_none")] pub step_ids: Option<Vec<String>>, } /// <p> The output for the <a>CancelSteps</a> operation. </p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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, expressed in seconds using <code>Period</code>, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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>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 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>EMR Management Guide</i>.</p> #[serde(rename = "KerberosAttributes")] #[serde(skip_serializing_if = "Option::is_none")] pub kerberos_attributes: Option<KerberosAttributes>, /// <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 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, for example, <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 versions 4.x 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 blacklists 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>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. If this value is set to <code>true</code>, all IAM users of that AWS account can view and manage the cluster if they have the proper policy permissions set. If this value is <code>false</code>, only the IAM user that created the cluster can view and manage it. This value can be changed using the <a>SetVisibleToAllUsers</a> 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ClusterSummary { /// <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 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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 execute 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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><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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteSecurityConfigurationInput { /// <p>The name of the security configuration.</p> #[serde(rename = "Name")] pub name: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DeleteSecurityConfigurationOutput {} /// <p>This input determines which cluster to describe.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeSecurityConfigurationInput { /// <p>The name of the security configuration.</p> #[serde(rename = "Name")] pub name: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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>, } /// <p>Configuration of requested EBS block device associated with the instance group.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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>To launch the cluster in 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, the cluster is launched in the normal AWS cloud, outside of a VPC.</p> <p>Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus, you cannot specify the cc1.4xlarge instance type for nodes of a cluster launched in a VPC.</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>The details of the step failure. The service attempts to detect the root cause for many common failures.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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 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>, } /// <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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Serialize)] 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 and provisioning timeout behavior.</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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct InstanceFleetProvisioningSpecifications { /// <p>The launch specification for Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior.</p> #[serde(rename = "SpotSpecification")] pub spot_specification: 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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 maximum Spot price your are willing to pay for EC2 instances.</p> <p>An optional, nullable field that applies if the <code>MarketType</code> for the instance group is specified as <code>SPOT</code>. Specify the maximum spot price in USD. If the value is NULL and <code>SPOT</code> is specified, the maximum Spot price is set equal to the On-Demand price.</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(Default, Debug, Clone, PartialEq, Serialize)] 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 maximum Spot price your are willing to pay for EC2 instances.</p> <p>An optional, nullable field that applies if the <code>MarketType</code> for the instance group is specified as <code>SPOT</code>. Specify the maximum spot price in USD. If the value is NULL and <code>SPOT</code> is specified, the maximum Spot price is set equal to the On-Demand price.</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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct InstanceGroupDetail { /// <p>The maximum Spot price your are willing to pay for EC2 instances.</p> <p>An optional, nullable field that applies if the <code>MarketType</code> for the instance group is specified as <code>SPOT</code>. Specified in USD. If the value is NULL and <code>SPOT</code> is specified, the maximum Spot price is set equal to the On-Demand price.</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(Default, Debug, Clone, PartialEq, Serialize)] 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 expand or shrink.</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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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 5 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(Default, Debug, Clone, PartialEq, Serialize)] 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 (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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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 (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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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 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 blacklists 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 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>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>Specifies whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set to <code>true</code>, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the cluster. If it is set to <code>false</code>, only the IAM user that created the cluster can view and manage it. This value can be changed using the <a>SetVisibleToAllUsers</a> 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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, which is the recommended configuration. 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(Default, Debug, Clone, PartialEq, Serialize)] 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 ssh to the master node 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, the cluster launches in the normal Amazon Web Services cloud, outside of an Amazon VPC, if the account launching the cluster supports EC2 Classic networks in the region where the cluster launches.</p> <p>Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for clusters launched in an Amazon VPC.</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" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct JobFlowInstancesDetail { /// <p>The name of an Amazon EC2 key pair that can be used to ssh to the master node.</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 incremented one time for every hour that an m1.small runs. Larger instances are weighted more, so an Amazon 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 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>EMR Management Guide</i>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize)] 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.</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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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>>, } /// <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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Serialize)] 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>The Amazon EC2 Availability Zone configuration of the cluster (job flow).</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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>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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct RemoveAutoScalingPolicyOutput {} /// <p>This input identifies a cluster and a list of tags to remove.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct RemoveTagsOutput {} /// <p> Input to the <a>RunJobFlow</a> operation. </p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] 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 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>EMR Management Guide</i>.</p> #[serde(rename = "KerberosAttributes")] #[serde(skip_serializing_if = "Option::is_none")] pub kerberos_attributes: Option<KerberosAttributes>, /// <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 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 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, for example, <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 versions 4.x 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 blacklists 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>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>Whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set to <code>true</code>, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the cluster. If it is set to <code>false</code>, only the IAM user that created the cluster can view and manage it.</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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct RunJobFlowOutput { /// <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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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> The input argument to the <a>TerminationProtection</a> operation. </p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Serialize)] pub struct SetVisibleToAllUsersInput { /// <p>Identifiers of the job flows to receive the new visibility setting.</p> #[serde(rename = "JobFlowIds")] pub job_flow_ids: Vec<String>, /// <p>Whether the specified clusters are visible to all IAM users of the AWS account associated with the cluster. If this value is set to True, all IAM users of that AWS account can view and, if they have the proper IAM policy permissions set, manage the clusters. If it is set to False, only the IAM user that created a cluster can view and manage it.</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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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 and provisioning timeout behavior.</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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SpotProvisioningSpecification { /// <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, } /// <p>This represents a step in a cluster.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, 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>, } /// <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(Default, Debug, Clone, PartialEq, Serialize)] 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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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(Default, Debug, Clone, PartialEq, Serialize)] pub struct TerminateJobFlowsInput { /// <p>A list of job flows to be shutdown.</p> #[serde(rename = "JobFlowIds")] pub job_flow_ids: Vec<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(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for AddInstanceFleetError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for AddInstanceFleetError { fn description(&self) -> &str { match *self { AddInstanceFleetError::InternalServer(ref cause) => cause, AddInstanceFleetError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for AddInstanceGroupsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for AddInstanceGroupsError { fn description(&self) -> &str { match *self { AddInstanceGroupsError::InternalServerError(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for AddJobFlowStepsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for AddJobFlowStepsError { fn description(&self) -> &str { match *self { AddJobFlowStepsError::InternalServerError(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for AddTagsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for AddTagsError { fn description(&self) -> &str { match *self { AddTagsError::InternalServer(ref cause) => cause, AddTagsError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CancelStepsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CancelStepsError { fn description(&self) -> &str { match *self { CancelStepsError::InternalServerError(ref cause) => cause, CancelStepsError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CreateSecurityConfigurationError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CreateSecurityConfigurationError { fn description(&self) -> &str { match *self { CreateSecurityConfigurationError::InternalServer(ref cause) => cause, CreateSecurityConfigurationError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteSecurityConfigurationError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteSecurityConfigurationError { fn description(&self) -> &str { match *self { DeleteSecurityConfigurationError::InternalServer(ref cause) => cause, DeleteSecurityConfigurationError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeClusterError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeClusterError { fn description(&self) -> &str { match *self { DescribeClusterError::InternalServer(ref cause) => cause, DescribeClusterError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeJobFlowsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeJobFlowsError { fn description(&self) -> &str { match *self { DescribeJobFlowsError::InternalServerError(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeSecurityConfigurationError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeSecurityConfigurationError { fn description(&self) -> &str { match *self { DescribeSecurityConfigurationError::InternalServer(ref cause) => cause, DescribeSecurityConfigurationError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeStepError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeStepError { fn description(&self) -> &str { match *self { DescribeStepError::InternalServer(ref cause) => cause, DescribeStepError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListBootstrapActionsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListBootstrapActionsError { fn description(&self) -> &str { match *self { ListBootstrapActionsError::InternalServer(ref cause) => cause, ListBootstrapActionsError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListClustersError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListClustersError { fn description(&self) -> &str { match *self { ListClustersError::InternalServer(ref cause) => cause, ListClustersError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListInstanceFleetsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListInstanceFleetsError { fn description(&self) -> &str { match *self { ListInstanceFleetsError::InternalServer(ref cause) => cause, ListInstanceFleetsError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListInstanceGroupsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListInstanceGroupsError { fn description(&self) -> &str { match *self { ListInstanceGroupsError::InternalServer(ref cause) => cause, ListInstanceGroupsError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListInstancesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListInstancesError { fn description(&self) -> &str { match *self { ListInstancesError::InternalServer(ref cause) => cause, ListInstancesError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListSecurityConfigurationsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListSecurityConfigurationsError { fn description(&self) -> &str { match *self { ListSecurityConfigurationsError::InternalServer(ref cause) => cause, ListSecurityConfigurationsError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListStepsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListStepsError { fn description(&self) -> &str { match *self { ListStepsError::InternalServer(ref cause) => cause, ListStepsError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ModifyInstanceFleetError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ModifyInstanceFleetError { fn description(&self) -> &str { match *self { ModifyInstanceFleetError::InternalServer(ref cause) => cause, ModifyInstanceFleetError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ModifyInstanceGroupsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ModifyInstanceGroupsError { fn description(&self) -> &str { match *self { ModifyInstanceGroupsError::InternalServerError(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for PutAutoScalingPolicyError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for PutAutoScalingPolicyError { fn description(&self) -> &str { match *self {} } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RemoveAutoScalingPolicyError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RemoveAutoScalingPolicyError { fn description(&self) -> &str { match *self {} } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RemoveTagsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RemoveTagsError { fn description(&self) -> &str { match *self { RemoveTagsError::InternalServer(ref cause) => cause, RemoveTagsError::InvalidRequest(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RunJobFlowError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RunJobFlowError { fn description(&self) -> &str { match *self { RunJobFlowError::InternalServerError(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SetTerminationProtectionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SetTerminationProtectionError { fn description(&self) -> &str { match *self { SetTerminationProtectionError::InternalServerError(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SetVisibleToAllUsersError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SetVisibleToAllUsersError { fn description(&self) -> &str { match *self { SetVisibleToAllUsersError::InternalServerError(ref cause) => cause, } } } /// 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), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for TerminateJobFlowsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for TerminateJobFlowsError { fn description(&self) -> &str { match *self { TerminateJobFlowsError::InternalServerError(ref cause) => cause, } } } /// Trait representing the capabilities of the Amazon EMR API. Amazon EMR clients implement this 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> fn add_instance_fleet( &self, input: AddInstanceFleetInput, ) -> RusotoFuture<AddInstanceFleetOutput, AddInstanceFleetError>; /// <p>Adds one or more instance groups to a running cluster.</p> fn add_instance_groups( &self, input: AddInstanceGroupsInput, ) -> RusotoFuture<AddInstanceGroupsOutput, 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> fn add_job_flow_steps( &self, input: AddJobFlowStepsInput, ) -> RusotoFuture<AddJobFlowStepsOutput, 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> fn add_tags(&self, input: AddTagsInput) -> RusotoFuture<AddTagsOutput, 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 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> fn cancel_steps( &self, input: CancelStepsInput, ) -> RusotoFuture<CancelStepsOutput, CancelStepsError>; /// <p>Creates a security configuration, which is stored in the service and can be specified when a cluster is created.</p> fn create_security_configuration( &self, input: CreateSecurityConfigurationInput, ) -> RusotoFuture<CreateSecurityConfigurationOutput, CreateSecurityConfigurationError>; /// <p>Deletes a security configuration.</p> fn delete_security_configuration( &self, input: DeleteSecurityConfigurationInput, ) -> RusotoFuture<DeleteSecurityConfigurationOutput, DeleteSecurityConfigurationError>; /// <p>Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on. </p> fn describe_cluster( &self, input: DescribeClusterInput, ) -> RusotoFuture<DescribeClusterOutput, DescribeClusterError>; /// <p>This API is deprecated 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> fn describe_job_flows( &self, input: DescribeJobFlowsInput, ) -> RusotoFuture<DescribeJobFlowsOutput, DescribeJobFlowsError>; /// <p>Provides the details of a security configuration by returning the configuration JSON.</p> fn describe_security_configuration( &self, input: DescribeSecurityConfigurationInput, ) -> RusotoFuture<DescribeSecurityConfigurationOutput, DescribeSecurityConfigurationError>; /// <p>Provides more detail about the cluster step.</p> fn describe_step( &self, input: DescribeStepInput, ) -> RusotoFuture<DescribeStepOutput, DescribeStepError>; /// <p>Provides information about the bootstrap actions associated with a cluster.</p> fn list_bootstrap_actions( &self, input: ListBootstrapActionsInput, ) -> RusotoFuture<ListBootstrapActionsOutput, 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> fn list_clusters( &self, input: ListClustersInput, ) -> RusotoFuture<ListClustersOutput, 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> fn list_instance_fleets( &self, input: ListInstanceFleetsInput, ) -> RusotoFuture<ListInstanceFleetsOutput, ListInstanceFleetsError>; /// <p>Provides all available details about the instance groups in a cluster.</p> fn list_instance_groups( &self, input: ListInstanceGroupsInput, ) -> RusotoFuture<ListInstanceGroupsOutput, 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> fn list_instances( &self, input: ListInstancesInput, ) -> RusotoFuture<ListInstancesOutput, ListInstancesError>; /// <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> fn list_security_configurations( &self, input: ListSecurityConfigurationsInput, ) -> RusotoFuture<ListSecurityConfigurationsOutput, ListSecurityConfigurationsError>; /// <p>Provides a list of steps for the cluster in reverse order unless you specify stepIds with the request.</p> fn list_steps(&self, input: ListStepsInput) -> RusotoFuture<ListStepsOutput, ListStepsError>; /// <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> fn modify_instance_fleet( &self, input: ModifyInstanceFleetInput, ) -> RusotoFuture<(), 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> fn modify_instance_groups( &self, input: ModifyInstanceGroupsInput, ) -> RusotoFuture<(), 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> fn put_auto_scaling_policy( &self, input: PutAutoScalingPolicyInput, ) -> RusotoFuture<PutAutoScalingPolicyOutput, PutAutoScalingPolicyError>; /// <p>Removes an automatic scaling policy from a specified instance group within an EMR cluster.</p> fn remove_auto_scaling_policy( &self, input: RemoveAutoScalingPolicyInput, ) -> RusotoFuture<RemoveAutoScalingPolicyOutput, RemoveAutoScalingPolicyError>; /// <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> fn remove_tags( &self, input: RemoveTagsInput, ) -> RusotoFuture<RemoveTagsOutput, 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> fn run_job_flow( &self, input: RunJobFlowInput, ) -> RusotoFuture<RunJobFlowOutput, 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> fn set_termination_protection( &self, input: SetTerminationProtectionInput, ) -> RusotoFuture<(), SetTerminationProtectionError>; /// <p>Sets whether all AWS Identity and Access Management (IAM) users under your account can access the specified clusters (job flows). This action works on running clusters. You can also set the visibility of a cluster when you launch it using the <code>VisibleToAllUsers</code> parameter of <a>RunJobFlow</a>. The SetVisibleToAllUsers action can be called only by an IAM user who created the cluster or the AWS account that owns the cluster.</p> fn set_visible_to_all_users( &self, input: SetVisibleToAllUsersInput, ) -> RusotoFuture<(), SetVisibleToAllUsersError>; /// <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> fn terminate_job_flows( &self, input: TerminateJobFlowsInput, ) -> RusotoFuture<(), TerminateJobFlowsError>; } /// 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, P::Future: Send, D: DispatchSignedRequest + Send + Sync + 'static, D::Future: Send, { EmrClient { client: Client::new_with(credentials_provider, request_dispatcher), region, } } } 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> fn add_instance_fleet( &self, input: AddInstanceFleetInput, ) -> RusotoFuture<AddInstanceFleetOutput, AddInstanceFleetError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.AddInstanceFleet"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<AddInstanceFleetOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(AddInstanceFleetError::from_response(response))), ) } }) } /// <p>Adds one or more instance groups to a running cluster.</p> fn add_instance_groups( &self, input: AddInstanceGroupsInput, ) -> RusotoFuture<AddInstanceGroupsOutput, AddInstanceGroupsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.AddInstanceGroups"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<AddInstanceGroupsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(AddInstanceGroupsError::from_response(response))), ) } }) } /// <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> fn add_job_flow_steps( &self, input: AddJobFlowStepsInput, ) -> RusotoFuture<AddJobFlowStepsOutput, AddJobFlowStepsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.AddJobFlowSteps"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<AddJobFlowStepsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(AddJobFlowStepsError::from_response(response))), ) } }) } /// <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> fn add_tags(&self, input: AddTagsInput) -> RusotoFuture<AddTagsOutput, AddTagsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.AddTags"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response).deserialize::<AddTagsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(AddTagsError::from_response(response))), ) } }) } /// <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 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> fn cancel_steps( &self, input: CancelStepsInput, ) -> RusotoFuture<CancelStepsOutput, CancelStepsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.CancelSteps"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<CancelStepsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(CancelStepsError::from_response(response))), ) } }) } /// <p>Creates a security configuration, which is stored in the service and can be specified when a cluster is created.</p> fn create_security_configuration( &self, input: CreateSecurityConfigurationInput, ) -> RusotoFuture<CreateSecurityConfigurationOutput, CreateSecurityConfigurationError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "ElasticMapReduce.CreateSecurityConfiguration", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<CreateSecurityConfigurationOutput, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(CreateSecurityConfigurationError::from_response(response)) })) } }) } /// <p>Deletes a security configuration.</p> fn delete_security_configuration( &self, input: DeleteSecurityConfigurationInput, ) -> RusotoFuture<DeleteSecurityConfigurationOutput, DeleteSecurityConfigurationError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "ElasticMapReduce.DeleteSecurityConfiguration", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<DeleteSecurityConfigurationOutput, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DeleteSecurityConfigurationError::from_response(response)) })) } }) } /// <p>Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on. </p> fn describe_cluster( &self, input: DescribeClusterInput, ) -> RusotoFuture<DescribeClusterOutput, DescribeClusterError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.DescribeCluster"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<DescribeClusterOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeClusterError::from_response(response))), ) } }) } /// <p>This API is deprecated 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> fn describe_job_flows( &self, input: DescribeJobFlowsInput, ) -> RusotoFuture<DescribeJobFlowsOutput, DescribeJobFlowsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.DescribeJobFlows"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<DescribeJobFlowsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeJobFlowsError::from_response(response))), ) } }) } /// <p>Provides the details of a security configuration by returning the configuration JSON.</p> fn describe_security_configuration( &self, input: DescribeSecurityConfigurationInput, ) -> RusotoFuture<DescribeSecurityConfigurationOutput, DescribeSecurityConfigurationError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "ElasticMapReduce.DescribeSecurityConfiguration", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<DescribeSecurityConfigurationOutput, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DescribeSecurityConfigurationError::from_response(response)) })) } }) } /// <p>Provides more detail about the cluster step.</p> fn describe_step( &self, input: DescribeStepInput, ) -> RusotoFuture<DescribeStepOutput, DescribeStepError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.DescribeStep"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<DescribeStepOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeStepError::from_response(response))), ) } }) } /// <p>Provides information about the bootstrap actions associated with a cluster.</p> fn list_bootstrap_actions( &self, input: ListBootstrapActionsInput, ) -> RusotoFuture<ListBootstrapActionsOutput, ListBootstrapActionsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.ListBootstrapActions"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<ListBootstrapActionsOutput, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(ListBootstrapActionsError::from_response(response)) }), ) } }) } /// <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> fn list_clusters( &self, input: ListClustersInput, ) -> RusotoFuture<ListClustersOutput, ListClustersError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.ListClusters"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<ListClustersOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListClustersError::from_response(response))), ) } }) } /// <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> fn list_instance_fleets( &self, input: ListInstanceFleetsInput, ) -> RusotoFuture<ListInstanceFleetsOutput, ListInstanceFleetsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.ListInstanceFleets"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<ListInstanceFleetsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListInstanceFleetsError::from_response(response))), ) } }) } /// <p>Provides all available details about the instance groups in a cluster.</p> fn list_instance_groups( &self, input: ListInstanceGroupsInput, ) -> RusotoFuture<ListInstanceGroupsOutput, ListInstanceGroupsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.ListInstanceGroups"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<ListInstanceGroupsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListInstanceGroupsError::from_response(response))), ) } }) } /// <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> fn list_instances( &self, input: ListInstancesInput, ) -> RusotoFuture<ListInstancesOutput, ListInstancesError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.ListInstances"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<ListInstancesOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListInstancesError::from_response(response))), ) } }) } /// <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> fn list_security_configurations( &self, input: ListSecurityConfigurationsInput, ) -> RusotoFuture<ListSecurityConfigurationsOutput, ListSecurityConfigurationsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "ElasticMapReduce.ListSecurityConfigurations", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<ListSecurityConfigurationsOutput, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(ListSecurityConfigurationsError::from_response(response)) })) } }) } /// <p>Provides a list of steps for the cluster in reverse order unless you specify stepIds with the request.</p> fn list_steps(&self, input: ListStepsInput) -> RusotoFuture<ListStepsOutput, ListStepsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.ListSteps"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response).deserialize::<ListStepsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListStepsError::from_response(response))), ) } }) } /// <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> fn modify_instance_fleet( &self, input: ModifyInstanceFleetInput, ) -> RusotoFuture<(), ModifyInstanceFleetError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.ModifyInstanceFleet"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(ModifyInstanceFleetError::from_response(response)) }), ) } }) } /// <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> fn modify_instance_groups( &self, input: ModifyInstanceGroupsInput, ) -> RusotoFuture<(), ModifyInstanceGroupsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.ModifyInstanceGroups"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(ModifyInstanceGroupsError::from_response(response)) }), ) } }) } /// <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> fn put_auto_scaling_policy( &self, input: PutAutoScalingPolicyInput, ) -> RusotoFuture<PutAutoScalingPolicyOutput, PutAutoScalingPolicyError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.PutAutoScalingPolicy"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<PutAutoScalingPolicyOutput, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(PutAutoScalingPolicyError::from_response(response)) }), ) } }) } /// <p>Removes an automatic scaling policy from a specified instance group within an EMR cluster.</p> fn remove_auto_scaling_policy( &self, input: RemoveAutoScalingPolicyInput, ) -> RusotoFuture<RemoveAutoScalingPolicyOutput, RemoveAutoScalingPolicyError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.RemoveAutoScalingPolicy"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<RemoveAutoScalingPolicyOutput, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(RemoveAutoScalingPolicyError::from_response(response)) })) } }) } /// <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> fn remove_tags( &self, input: RemoveTagsInput, ) -> RusotoFuture<RemoveTagsOutput, RemoveTagsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.RemoveTags"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<RemoveTagsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(RemoveTagsError::from_response(response))), ) } }) } /// <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> fn run_job_flow( &self, input: RunJobFlowInput, ) -> RusotoFuture<RunJobFlowOutput, RunJobFlowError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.RunJobFlow"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { proto::json::ResponsePayload::new(&response) .deserialize::<RunJobFlowOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(RunJobFlowError::from_response(response))), ) } }) } /// <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> fn set_termination_protection( &self, input: SetTerminationProtectionInput, ) -> RusotoFuture<(), SetTerminationProtectionError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.SetTerminationProtection"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(SetTerminationProtectionError::from_response(response)) })) } }) } /// <p>Sets whether all AWS Identity and Access Management (IAM) users under your account can access the specified clusters (job flows). This action works on running clusters. You can also set the visibility of a cluster when you launch it using the <code>VisibleToAllUsers</code> parameter of <a>RunJobFlow</a>. The SetVisibleToAllUsers action can be called only by an IAM user who created the cluster or the AWS account that owns the cluster.</p> fn set_visible_to_all_users( &self, input: SetVisibleToAllUsersInput, ) -> RusotoFuture<(), SetVisibleToAllUsersError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.SetVisibleToAllUsers"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(SetVisibleToAllUsersError::from_response(response)) }), ) } }) } /// <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> fn terminate_job_flows( &self, input: TerminateJobFlowsInput, ) -> RusotoFuture<(), TerminateJobFlowsError> { let mut request = SignedRequest::new("POST", "elasticmapreduce", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "ElasticMapReduce.TerminateJobFlows"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(TerminateJobFlowsError::from_response(response))), ) } }) } }