1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122
// ================================================================= // // * 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; /// <p>An object representing a container instance or task attachment.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Attachment { /// <p>Details of the attachment. For elastic network interfaces, this includes the network interface ID, the MAC address, the subnet ID, and the private IPv4 address.</p> #[serde(rename = "details")] #[serde(skip_serializing_if = "Option::is_none")] pub details: Option<Vec<KeyValuePair>>, /// <p>The unique identifier for the attachment.</p> #[serde(rename = "id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p> The status of the attachment. Valid values are <code>PRECREATED</code>, <code>CREATED</code>, <code>ATTACHING</code>, <code>ATTACHED</code>, <code>DETACHING</code>, <code>DETACHED</code>, and <code>DELETED</code>.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The type of the attachment, such as <code>ElasticNetworkInterface</code>.</p> #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<String>, } /// <p>An object representing a change in state for a task attachment.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct AttachmentStateChange { /// <p>The Amazon Resource Name (ARN) of the attachment.</p> #[serde(rename = "attachmentArn")] pub attachment_arn: String, /// <p>The status of the attachment.</p> #[serde(rename = "status")] pub status: String, } /// <p>An attribute is a name-value pair associated with an Amazon ECS object. Attributes enable you to extend the Amazon ECS data model by adding custom metadata to your resources. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes">Attributes</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Attribute { /// <p>The name of the attribute. Up to 128 letters (uppercase and lowercase), numbers, hyphens, underscores, and periods are allowed.</p> #[serde(rename = "name")] pub name: String, /// <p>The ID of the target. You can specify the short form ID for a resource or the full Amazon Resource Name (ARN).</p> #[serde(rename = "targetId")] #[serde(skip_serializing_if = "Option::is_none")] pub target_id: Option<String>, /// <p>The type of the target with which to attach the attribute. This parameter is required if you use the short form ID for a resource instead of the full ARN.</p> #[serde(rename = "targetType")] #[serde(skip_serializing_if = "Option::is_none")] pub target_type: Option<String>, /// <p>The value of the attribute. Up to 128 letters (uppercase and lowercase), numbers, hyphens, underscores, periods, at signs (@), forward slashes, colons, and spaces are allowed.</p> #[serde(rename = "value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } /// <p>An object representing the networking details for a task or service.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct AwsVpcConfiguration { /// <p>Whether the task's elastic network interface receives a public IP address. The default value is <code>DISABLED</code>.</p> #[serde(rename = "assignPublicIp")] #[serde(skip_serializing_if = "Option::is_none")] pub assign_public_ip: Option<String>, /// <p><p>The security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used. There is a limit of 5 security groups that can be specified per <code>AwsVpcConfiguration</code>.</p> <note> <p>All specified security groups must be from the same VPC.</p> </note></p> #[serde(rename = "securityGroups")] #[serde(skip_serializing_if = "Option::is_none")] pub security_groups: Option<Vec<String>>, /// <p><p>The subnets associated with the task or service. There is a limit of 16 subnets that can be specified per <code>AwsVpcConfiguration</code>.</p> <note> <p>All specified subnets must be from the same VPC.</p> </note></p> #[serde(rename = "subnets")] pub subnets: Vec<String>, } /// <p>A regional grouping of one or more container instances on which you can run task requests. Each account receives a default cluster the first time you use the Amazon ECS service, but you may also create other clusters. Clusters may contain more than one instance type simultaneously.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Cluster { /// <p>The number of services that are running on the cluster in an <code>ACTIVE</code> state. You can view these services with <a>ListServices</a>.</p> #[serde(rename = "activeServicesCount")] #[serde(skip_serializing_if = "Option::is_none")] pub active_services_count: Option<i64>, /// <p>The Amazon Resource Name (ARN) that identifies the cluster. The ARN contains the <code>arn:aws:ecs</code> namespace, followed by the Region of the cluster, the AWS account ID of the cluster owner, the <code>cluster</code> namespace, and then the cluster name. For example, <code>arn:aws:ecs:region:012345678910:cluster/test</code>.</p> #[serde(rename = "clusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>A user-generated string that you use to identify your cluster.</p> #[serde(rename = "clusterName")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_name: Option<String>, /// <p>The number of tasks in the cluster that are in the <code>PENDING</code> state.</p> #[serde(rename = "pendingTasksCount")] #[serde(skip_serializing_if = "Option::is_none")] pub pending_tasks_count: Option<i64>, /// <p>The number of container instances registered into the cluster. This includes container instances in both <code>ACTIVE</code> and <code>DRAINING</code> status.</p> #[serde(rename = "registeredContainerInstancesCount")] #[serde(skip_serializing_if = "Option::is_none")] pub registered_container_instances_count: Option<i64>, /// <p>The number of tasks in the cluster that are in the <code>RUNNING</code> state.</p> #[serde(rename = "runningTasksCount")] #[serde(skip_serializing_if = "Option::is_none")] pub running_tasks_count: Option<i64>, /// <p><p>Additional information about your clusters that are separated by launch type, including:</p> <ul> <li> <p>runningEC2TasksCount</p> </li> <li> <p>RunningFargateTasksCount</p> </li> <li> <p>pendingEC2TasksCount</p> </li> <li> <p>pendingFargateTasksCount</p> </li> <li> <p>activeEC2ServiceCount</p> </li> <li> <p>activeFargateServiceCount</p> </li> <li> <p>drainingEC2ServiceCount</p> </li> <li> <p>drainingFargateServiceCount</p> </li> </ul></p> #[serde(rename = "statistics")] #[serde(skip_serializing_if = "Option::is_none")] pub statistics: Option<Vec<KeyValuePair>>, /// <p>The status of the cluster. The valid values are <code>ACTIVE</code> or <code>INACTIVE</code>. <code>ACTIVE</code> indicates that you can register container instances with the cluster and the associated instances can accept tasks.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, } /// <p>A Docker container that is part of a task.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Container { /// <p>The Amazon Resource Name (ARN) of the container.</p> #[serde(rename = "containerArn")] #[serde(skip_serializing_if = "Option::is_none")] pub container_arn: Option<String>, /// <p>The number of CPU units set for the container. The value will be <code>0</code> if no value was specified in the container definition when the task definition was registered.</p> #[serde(rename = "cpu")] #[serde(skip_serializing_if = "Option::is_none")] pub cpu: Option<String>, /// <p>The exit code returned from the container.</p> #[serde(rename = "exitCode")] #[serde(skip_serializing_if = "Option::is_none")] pub exit_code: Option<i64>, /// <p>The IDs of each GPU assigned to the container.</p> #[serde(rename = "gpuIds")] #[serde(skip_serializing_if = "Option::is_none")] pub gpu_ids: Option<Vec<String>>, /// <p>The health status of the container. If health checks are not configured for this container in its task definition, then it reports the health status as <code>UNKNOWN</code>.</p> #[serde(rename = "healthStatus")] #[serde(skip_serializing_if = "Option::is_none")] pub health_status: Option<String>, /// <p>The last known status of the container.</p> #[serde(rename = "lastStatus")] #[serde(skip_serializing_if = "Option::is_none")] pub last_status: Option<String>, /// <p>The hard limit (in MiB) of memory set for the container.</p> #[serde(rename = "memory")] #[serde(skip_serializing_if = "Option::is_none")] pub memory: Option<String>, /// <p>The soft limit (in MiB) of memory set for the container.</p> #[serde(rename = "memoryReservation")] #[serde(skip_serializing_if = "Option::is_none")] pub memory_reservation: Option<String>, /// <p>The name of the container.</p> #[serde(rename = "name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The network bindings associated with the container.</p> #[serde(rename = "networkBindings")] #[serde(skip_serializing_if = "Option::is_none")] pub network_bindings: Option<Vec<NetworkBinding>>, /// <p>The network interfaces associated with the container.</p> #[serde(rename = "networkInterfaces")] #[serde(skip_serializing_if = "Option::is_none")] pub network_interfaces: Option<Vec<NetworkInterface>>, /// <p>A short (255 max characters) human-readable string to provide additional details about a running or stopped container.</p> #[serde(rename = "reason")] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<String>, /// <p>The ARN of the task.</p> #[serde(rename = "taskArn")] #[serde(skip_serializing_if = "Option::is_none")] pub task_arn: Option<String>, } /// <p>Container definitions are used in task definitions to describe the different containers that are launched as part of a task.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ContainerDefinition { /// <p>The command that is passed to the container. This parameter maps to <code>Cmd</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>COMMAND</code> parameter to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>. For more information, see <a href="https://docs.docker.com/engine/reference/builder/#cmd">https://docs.docker.com/engine/reference/builder/#cmd</a>. If there are multiple arguments, each argument should be a separated string in the array.</p> #[serde(rename = "command")] #[serde(skip_serializing_if = "Option::is_none")] pub command: Option<Vec<String>>, /// <p>The number of <code>cpu</code> units reserved for the container. This parameter maps to <code>CpuShares</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--cpu-shares</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <p>This field is optional for tasks using the Fargate launch type, and the only requirement is that the total amount of CPU reserved for all containers within a task be lower than the task-level <code>cpu</code> value.</p> <note> <p>You can determine the number of CPU units that are available per EC2 instance type by multiplying the vCPUs listed for that instance type on the <a href="http://aws.amazon.com/ec2/instance-types/">Amazon EC2 Instances</a> detail page by 1,024.</p> </note> <p>For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that is the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units.</p> <p>Linux containers share unallocated CPU units with other containers on the container instance with the same ratio as their allocated amount. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that is the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units.</p> <p>On Linux container instances, the Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. For more information, see <a href="https://docs.docker.com/engine/reference/run/#cpu-share-constraint">CPU share constraint</a> in the Docker documentation. The minimum valid CPU share value that the Linux kernel allows is 2. However, the CPU parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS container agent version:</p> <ul> <li> <p> <b>Agent versions less than or equal to 1.1.0:</b> Null and zero CPU values are passed to Docker as 0, which Docker then converts to 1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which the Linux kernel converts to two CPU shares.</p> </li> <li> <p> <b>Agent versions greater than or equal to 1.2.0:</b> Null, zero, and CPU values of 1 are passed to Docker as 2.</p> </li> </ul> <p>On Windows container instances, the CPU limit is enforced as an absolute limit, or a quota. Windows containers only have access to the specified amount of CPU that is described in the task definition.</p> #[serde(rename = "cpu")] #[serde(skip_serializing_if = "Option::is_none")] pub cpu: Option<i64>, /// <p>The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.</p> <p>For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent to enable container dependencies. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html">Updating the Amazon ECS Container Agent</a> in the <i>Amazon Elastic Container Service Developer Guide</i>. If you are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the <code>ecs-init</code> package. If your container instances are launched from version <code>20190301</code> or later, then they contain the required versions of the container agent and <code>ecs-init</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html">Amazon ECS-optimized Linux AMI</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and the task or service requires platform version 1.3.0 or later.</p> #[serde(rename = "dependsOn")] #[serde(skip_serializing_if = "Option::is_none")] pub depends_on: Option<Vec<ContainerDependency>>, /// <p><p>When this parameter is true, networking is disabled within the container. This parameter maps to <code>NetworkDisabled</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a>.</p> <note> <p>This parameter is not supported for Windows containers.</p> </note></p> #[serde(rename = "disableNetworking")] #[serde(skip_serializing_if = "Option::is_none")] pub disable_networking: Option<bool>, /// <p><p>A list of DNS search domains that are presented to the container. This parameter maps to <code>DnsSearch</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--dns-search</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>This parameter is not supported for Windows containers.</p> </note></p> #[serde(rename = "dnsSearchDomains")] #[serde(skip_serializing_if = "Option::is_none")] pub dns_search_domains: Option<Vec<String>>, /// <p><p>A list of DNS servers that are presented to the container. This parameter maps to <code>Dns</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--dns</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>This parameter is not supported for Windows containers.</p> </note></p> #[serde(rename = "dnsServers")] #[serde(skip_serializing_if = "Option::is_none")] pub dns_servers: Option<Vec<String>>, /// <p>A key/value map of labels to add to the container. This parameter maps to <code>Labels</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--label</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: <code>sudo docker version --format '{{.Server.APIVersion}}'</code> </p> #[serde(rename = "dockerLabels")] #[serde(skip_serializing_if = "Option::is_none")] pub docker_labels: Option<::std::collections::HashMap<String, String>>, /// <p><p>A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. This field is not valid for containers in tasks using the Fargate launch type.</p> <p>This parameter maps to <code>SecurityOpt</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--security-opt</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>The Amazon ECS container agent running on a container instance must register with the <code>ECS<em>SELINUX</em>CAPABLE=true</code> or <code>ECS<em>APPARMOR</em>CAPABLE=true</code> environment variables before containers placed on that instance can use these security options. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html">Amazon ECS Container Agent Configuration</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </note> <note> <p>This parameter is not supported for Windows containers.</p> </note></p> #[serde(rename = "dockerSecurityOptions")] #[serde(skip_serializing_if = "Option::is_none")] pub docker_security_options: Option<Vec<String>>, /// <p><important> <p>Early versions of the Amazon ECS container agent do not properly handle <code>entryPoint</code> parameters. If you have problems using <code>entryPoint</code>, update your container agent or enter your commands and arguments as <code>command</code> array items instead.</p> </important> <p>The entry point that is passed to the container. This parameter maps to <code>Entrypoint</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--entrypoint</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>. For more information, see <a href="https://docs.docker.com/engine/reference/builder/#entrypoint">https://docs.docker.com/engine/reference/builder/#entrypoint</a>.</p></p> #[serde(rename = "entryPoint")] #[serde(skip_serializing_if = "Option::is_none")] pub entry_point: Option<Vec<String>>, /// <p><p>The environment variables to pass to a container. This parameter maps to <code>Env</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--env</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <important> <p>We do not recommend using plaintext environment variables for sensitive information, such as credential data.</p> </important></p> #[serde(rename = "environment")] #[serde(skip_serializing_if = "Option::is_none")] pub environment: Option<Vec<KeyValuePair>>, /// <p>If the <code>essential</code> parameter of a container is marked as <code>true</code>, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If the <code>essential</code> parameter of a container is marked as <code>false</code>, then its failure does not affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.</p> <p>All tasks must have at least one essential container. If you have an application that is composed of multiple containers, you should group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html">Application Architecture</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "essential")] #[serde(skip_serializing_if = "Option::is_none")] pub essential: Option<bool>, /// <p><p>A list of hostnames and IP address mappings to append to the <code>/etc/hosts</code> file on the container. This parameter maps to <code>ExtraHosts</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--add-host</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>This parameter is not supported for Windows containers or tasks that use the <code>awsvpc</code> network mode.</p> </note></p> #[serde(rename = "extraHosts")] #[serde(skip_serializing_if = "Option::is_none")] pub extra_hosts: Option<Vec<HostEntry>>, /// <p>The health check command and associated configuration parameters for the container. This parameter maps to <code>HealthCheck</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>HEALTHCHECK</code> parameter of <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> #[serde(rename = "healthCheck")] #[serde(skip_serializing_if = "Option::is_none")] pub health_check: Option<HealthCheck>, /// <p><p>The hostname to use for your container. This parameter maps to <code>Hostname</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--hostname</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>The <code>hostname</code> parameter is not supported if you are using the <code>awsvpc</code> network mode.</p> </note></p> #[serde(rename = "hostname")] #[serde(skip_serializing_if = "Option::is_none")] pub hostname: Option<String>, /// <p><p>The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with either <code> <i>repository-url</i>/<i>image</i>:<i>tag</i> </code> or <code> <i>repository-url</i>/<i>image</i>@<i>digest</i> </code>. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to <code>Image</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>IMAGE</code> parameter of <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <ul> <li> <p>When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image and tag for the container to use. However, subsequent updates to a repository image are not propagated to already running tasks.</p> </li> <li> <p>Images in Amazon ECR repositories can be specified by either using the full <code>registry/repository:tag</code> or <code>registry/repository@digest</code>. For example, <code>012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest</code> or <code>012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE</code>. </p> </li> <li> <p>Images in official repositories on Docker Hub use a single name (for example, <code>ubuntu</code> or <code>mongo</code>).</p> </li> <li> <p>Images in other repositories on Docker Hub are qualified with an organization name (for example, <code>amazon/amazon-ecs-agent</code>).</p> </li> <li> <p>Images in other online repositories are qualified further by a domain name (for example, <code>quay.io/assemblyline/ubuntu</code>).</p> </li> </ul></p> #[serde(rename = "image")] #[serde(skip_serializing_if = "Option::is_none")] pub image: Option<String>, /// <p>When this parameter is <code>true</code>, this allows you to deploy containerized applications that require <code>stdin</code> or a <code>tty</code> to be allocated. This parameter maps to <code>OpenStdin</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--interactive</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> #[serde(rename = "interactive")] #[serde(skip_serializing_if = "Option::is_none")] pub interactive: Option<bool>, /// <p><p>The <code>links</code> parameter allows containers to communicate with each other without the need for port mappings. This parameter is only supported if the network mode of a task definition is <code>bridge</code>. The <code>name:internalName</code> construct is analogous to <code>name:alias</code> in Docker links. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. For more information about linking Docker containers, go to <a href="https://docs.docker.com/network/links/">Legacy container links</a> in the Docker documentation. This parameter maps to <code>Links</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--link</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>This parameter is not supported for Windows containers.</p> </note> <important> <p>Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.</p> </important></p> #[serde(rename = "links")] #[serde(skip_serializing_if = "Option::is_none")] pub links: Option<Vec<String>>, /// <p><p>Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information see <a>KernelCapabilities</a>.</p> <note> <p>This parameter is not supported for Windows containers.</p> </note></p> #[serde(rename = "linuxParameters")] #[serde(skip_serializing_if = "Option::is_none")] pub linux_parameters: Option<LinuxParameters>, /// <p><p>The log configuration specification for the container.</p> <p>For tasks using the Fargate launch type, the supported log drivers are <code>awslogs</code> and <code>splunk</code>.</p> <p>For tasks using the EC2 launch type, the supported log drivers are <code>awslogs</code>, <code>syslog</code>, <code>gelf</code>, <code>fluentd</code>, <code>splunk</code>, <code>journald</code>, and <code>json-file</code>.</p> <p>This parameter maps to <code>LogConfig</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--log-driver</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>. By default, containers use the same logging driver that the Docker daemon uses. However the container may use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information on the options for different supported log drivers, see <a href="https://docs.docker.com/engine/admin/logging/overview/">Configure logging drivers</a> in the Docker documentation.</p> <note> <p>Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the <a>LogConfiguration</a> data type). Additional log drivers may be available in future releases of the Amazon ECS container agent.</p> </note> <p>This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: <code>sudo docker version --format '{{.Server.APIVersion}}'</code> </p> <note> <p>The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the <code>ECS<em>AVAILABLE</em>LOGGING_DRIVERS</code> environment variable before containers placed on that instance can use these log configuration options. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html">Amazon ECS Container Agent Configuration</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </note></p> #[serde(rename = "logConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub log_configuration: Option<LogConfiguration>, /// <p>The amount (in MiB) of memory to present to the container. If your container attempts to exceed the memory specified here, the container is killed. The total amount of memory reserved for all containers within a task must be lower than the task <code>memory</code> value, if one is specified. This parameter maps to <code>Memory</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--memory</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <p>If your containers are part of a task using the Fargate launch type, this field is optional.</p> <p>For containers that are part of a task using the EC2 launch type, you must specify a non-zero integer for one or both of <code>memory</code> or <code>memoryReservation</code> in container definitions. If you specify both, <code>memory</code> must be greater than <code>memoryReservation</code>. If you specify <code>memoryReservation</code>, then that value is subtracted from the available memory resources for the container instance on which the container is placed. Otherwise, the value of <code>memory</code> is used.</p> <p>The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 MiB of memory for your containers.</p> #[serde(rename = "memory")] #[serde(skip_serializing_if = "Option::is_none")] pub memory: Option<i64>, /// <p>The soft limit (in MiB) of memory to reserve for the container. When system memory is under heavy contention, Docker attempts to keep the container memory to this soft limit. However, your container can consume more memory when it needs to, up to either the hard limit specified with the <code>memory</code> parameter (if applicable), or all of the available memory on the container instance, whichever comes first. This parameter maps to <code>MemoryReservation</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--memory-reservation</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <p>You must specify a non-zero integer for one or both of <code>memory</code> or <code>memoryReservation</code> in container definitions. If you specify both, <code>memory</code> must be greater than <code>memoryReservation</code>. If you specify <code>memoryReservation</code>, then that value is subtracted from the available memory resources for the container instance on which the container is placed. Otherwise, the value of <code>memory</code> is used.</p> <p>For example, if your container normally uses 128 MiB of memory, but occasionally bursts to 256 MiB of memory for short periods of time, you can set a <code>memoryReservation</code> of 128 MiB, and a <code>memory</code> hard limit of 300 MiB. This configuration would allow the container to only reserve 128 MiB of memory from the remaining resources on the container instance, but also allow the container to consume more memory resources when needed.</p> <p>The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 MiB of memory for your containers. </p> #[serde(rename = "memoryReservation")] #[serde(skip_serializing_if = "Option::is_none")] pub memory_reservation: Option<i64>, /// <p>The mount points for data volumes in your container.</p> <p>This parameter maps to <code>Volumes</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--volume</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <p>Windows containers can mount whole directories on the same drive as <code>$env:ProgramData</code>. Windows containers cannot mount directories on a different drive, and mount point cannot be across drives.</p> #[serde(rename = "mountPoints")] #[serde(skip_serializing_if = "Option::is_none")] pub mount_points: Option<Vec<MountPoint>>, /// <p>The name of a container. If you are linking multiple containers together in a task definition, the <code>name</code> of one container can be entered in the <code>links</code> of another container to connect the containers. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. This parameter maps to <code>name</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--name</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>. </p> #[serde(rename = "name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p><p>The list of port mappings for the container. Port mappings allow containers to access ports on the host container instance to send or receive traffic.</p> <p>For task definitions that use the <code>awsvpc</code> network mode, you should only specify the <code>containerPort</code>. The <code>hostPort</code> can be left blank or it must be the same value as the <code>containerPort</code>.</p> <p>Port mappings on Windows use the <code>NetNAT</code> gateway address rather than <code>localhost</code>. There is no loopback for port mappings on Windows, so you cannot access a container's mapped port from the host itself. </p> <p>This parameter maps to <code>PortBindings</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--publish</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>. If the network mode of a task definition is set to <code>none</code>, then you can't specify port mappings. If the network mode of a task definition is set to <code>host</code>, then host ports must either be undefined or they must match the container port in the port mapping.</p> <note> <p>After a task reaches the <code>RUNNING</code> status, manual and automatic host and container port assignments are visible in the <b>Network Bindings</b> section of a container description for a selected task in the Amazon ECS console. The assignments are also visible in the <code>networkBindings</code> section <a>DescribeTasks</a> responses.</p> </note></p> #[serde(rename = "portMappings")] #[serde(skip_serializing_if = "Option::is_none")] pub port_mappings: Option<Vec<PortMapping>>, /// <p><p>When this parameter is true, the container is given elevated privileges on the host container instance (similar to the <code>root</code> user). This parameter maps to <code>Privileged</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--privileged</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>This parameter is not supported for Windows containers or tasks using the Fargate launch type.</p> </note></p> #[serde(rename = "privileged")] #[serde(skip_serializing_if = "Option::is_none")] pub privileged: Option<bool>, /// <p>When this parameter is <code>true</code>, a TTY is allocated. This parameter maps to <code>Tty</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--tty</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> #[serde(rename = "pseudoTerminal")] #[serde(skip_serializing_if = "Option::is_none")] pub pseudo_terminal: Option<bool>, /// <p><p>When this parameter is true, the container is given read-only access to its root file system. This parameter maps to <code>ReadonlyRootfs</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--read-only</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>This parameter is not supported for Windows containers.</p> </note></p> #[serde(rename = "readonlyRootFilesystem")] #[serde(skip_serializing_if = "Option::is_none")] pub readonly_root_filesystem: Option<bool>, /// <p>The private repository authentication credentials to use.</p> #[serde(rename = "repositoryCredentials")] #[serde(skip_serializing_if = "Option::is_none")] pub repository_credentials: Option<RepositoryCredentials>, /// <p>The type and amount of a resource to assign to a container. The only supported resource is a GPU.</p> #[serde(rename = "resourceRequirements")] #[serde(skip_serializing_if = "Option::is_none")] pub resource_requirements: Option<Vec<ResourceRequirement>>, /// <p>The secrets to pass to the container. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html">Specifying Sensitive Data</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "secrets")] #[serde(skip_serializing_if = "Option::is_none")] pub secrets: Option<Vec<Secret>>, /// <p>Time duration to wait before giving up on resolving dependencies for a container. For example, you specify two containers in a task definition with containerA having a dependency on containerB reaching a <code>COMPLETE</code>, <code>SUCCESS</code>, or <code>HEALTHY</code> status. If a <code>startTimeout</code> value is specified for containerB and it does not reach the desired status within that time then containerA will give up and not start. This results in the task transitioning to a <code>STOPPED</code> state.</p> <p>For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent to enable a container start timeout value. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html">Updating the Amazon ECS Container Agent</a> in the <i>Amazon Elastic Container Service Developer Guide</i>. If you are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the <code>ecs-init</code> package. If your container instances are launched from version <code>20190301</code> or later, then they contain the required versions of the container agent and <code>ecs-init</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html">Amazon ECS-optimized Linux AMI</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and the task or service requires platform version 1.3.0 or later.</p> #[serde(rename = "startTimeout")] #[serde(skip_serializing_if = "Option::is_none")] pub start_timeout: Option<i64>, /// <p>Time duration to wait before the container is forcefully killed if it doesn't exit normally on its own. For tasks using the Fargate launch type, the max <code>stopTimeout</code> value is 2 minutes. This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and the task or service requires platform version 1.3.0 or later.</p> <p>For tasks using the EC2 launch type, the stop timeout value for the container takes precedence over the <code>ECS_CONTAINER_STOP_TIMEOUT</code> container agent configuration parameter, if used. Container instances require at least version 1.26.0 of the container agent to enable a container stop timeout value. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html">Updating the Amazon ECS Container Agent</a> in the <i>Amazon Elastic Container Service Developer Guide</i>. If you are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the <code>ecs-init</code> package. If your container instances are launched from version <code>20190301</code> or later, then they contain the required versions of the container agent and <code>ecs-init</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html">Amazon ECS-optimized Linux AMI</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "stopTimeout")] #[serde(skip_serializing_if = "Option::is_none")] pub stop_timeout: Option<i64>, /// <p><p>A list of namespaced kernel parameters to set in the container. This parameter maps to <code>Sysctls</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--sysctl</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>It is not recommended that you specify network-related <code>systemControls</code> parameters for multiple containers in a single task that also uses either the <code>awsvpc</code> or <code>host</code> network modes. For tasks that use the <code>awsvpc</code> network mode, the container that is started last determines which <code>systemControls</code> parameters take effect. For tasks that use the <code>host</code> network mode, it changes the container instance's namespaced kernel parameters as well as the containers.</p> </note></p> #[serde(rename = "systemControls")] #[serde(skip_serializing_if = "Option::is_none")] pub system_controls: Option<Vec<SystemControl>>, /// <p><p>A list of <code>ulimits</code> to set in the container. This parameter maps to <code>Ulimits</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--ulimit</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>. Valid naming values are displayed in the <a>Ulimit</a> data type. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: <code>sudo docker version --format '{{.Server.APIVersion}}'</code> </p> <note> <p>This parameter is not supported for Windows containers.</p> </note></p> #[serde(rename = "ulimits")] #[serde(skip_serializing_if = "Option::is_none")] pub ulimits: Option<Vec<Ulimit>>, /// <p><p>The user name to use inside the container. This parameter maps to <code>User</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--user</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <p>You can use the following formats. If specifying a UID or GID, you must specify it as a positive integer.</p> <ul> <li> <p> <code>user</code> </p> </li> <li> <p> <code>user:group</code> </p> </li> <li> <p> <code>uid</code> </p> </li> <li> <p> <code>uid:gid</code> </p> </li> <li> <p> <code>user:gid</code> </p> </li> <li> <p> <code>uid:group</code> </p> </li> </ul> <note> <p>This parameter is not supported for Windows containers.</p> </note></p> #[serde(rename = "user")] #[serde(skip_serializing_if = "Option::is_none")] pub user: Option<String>, /// <p>Data volumes to mount from another container. This parameter maps to <code>VolumesFrom</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--volumes-from</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> #[serde(rename = "volumesFrom")] #[serde(skip_serializing_if = "Option::is_none")] pub volumes_from: Option<Vec<VolumeFrom>>, /// <p>The working directory in which to run commands inside the container. This parameter maps to <code>WorkingDir</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--workdir</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> #[serde(rename = "workingDirectory")] #[serde(skip_serializing_if = "Option::is_none")] pub working_directory: Option<String>, } /// <p><p>The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.</p> <p>Your Amazon ECS container instances require at least version 1.26.0 of the container agent to enable container dependencies. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html">Updating the Amazon ECS Container Agent</a> in the <i>Amazon Elastic Container Service Developer Guide</i>. If you are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the <code>ecs-init</code> package. If your container instances are launched from version <code>20190301</code> or later, then they contain the required versions of the container agent and <code>ecs-init</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html">Amazon ECS-optimized Linux AMI</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <note> <p>If you are using tasks that use the Fargate launch type, container dependency parameters are not supported.</p> </note></p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ContainerDependency { /// <p><p>The dependency condition of the container. The following are the available conditions and their behavior:</p> <ul> <li> <p> <code>START</code> - This condition emulates the behavior of links and volumes today. It validates that a dependent container is started before permitting other containers to start.</p> </li> <li> <p> <code>COMPLETE</code> - This condition validates that a dependent container runs to completion (exits) before permitting other containers to start. This can be useful for nonessential containers that run a script and then exit.</p> </li> <li> <p> <code>SUCCESS</code> - This condition is the same as <code>COMPLETE</code>, but it also requires that the container exits with a <code>zero</code> status.</p> </li> <li> <p> <code>HEALTHY</code> - This condition validates that the dependent container passes its Docker health check before permitting other containers to start. This requires that the dependent container has health checks configured. This condition is confirmed only at task startup.</p> </li> </ul></p> #[serde(rename = "condition")] pub condition: String, /// <p>The name of a container.</p> #[serde(rename = "containerName")] pub container_name: String, } /// <p>An EC2 instance that is running the Amazon ECS agent and has been registered with a cluster.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ContainerInstance { /// <p>This parameter returns <code>true</code> if the agent is connected to Amazon ECS. Registered instances with an agent that may be unhealthy or stopped return <code>false</code>. Only instances connected to an agent can accept placement requests.</p> #[serde(rename = "agentConnected")] #[serde(skip_serializing_if = "Option::is_none")] pub agent_connected: Option<bool>, /// <p>The status of the most recent agent update. If an update has never been requested, this value is <code>NULL</code>.</p> #[serde(rename = "agentUpdateStatus")] #[serde(skip_serializing_if = "Option::is_none")] pub agent_update_status: Option<String>, /// <p>The resources attached to a container instance, such as elastic network interfaces.</p> #[serde(rename = "attachments")] #[serde(skip_serializing_if = "Option::is_none")] pub attachments: Option<Vec<Attachment>>, /// <p>The attributes set for the container instance, either by the Amazon ECS container agent at instance registration or manually with the <a>PutAttributes</a> operation.</p> #[serde(rename = "attributes")] #[serde(skip_serializing_if = "Option::is_none")] pub attributes: Option<Vec<Attribute>>, /// <p>The Amazon Resource Name (ARN) of the container instance. The ARN contains the <code>arn:aws:ecs</code> namespace, followed by the Region of the container instance, the AWS account ID of the container instance owner, the <code>container-instance</code> namespace, and then the container instance ID. For example, <code>arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID</code>.</p> #[serde(rename = "containerInstanceArn")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instance_arn: Option<String>, /// <p>The EC2 instance ID of the container instance.</p> #[serde(rename = "ec2InstanceId")] #[serde(skip_serializing_if = "Option::is_none")] pub ec_2_instance_id: Option<String>, /// <p>The number of tasks on the container instance that are in the <code>PENDING</code> status.</p> #[serde(rename = "pendingTasksCount")] #[serde(skip_serializing_if = "Option::is_none")] pub pending_tasks_count: Option<i64>, /// <p>The Unix timestamp for when the container instance was registered.</p> #[serde(rename = "registeredAt")] #[serde(skip_serializing_if = "Option::is_none")] pub registered_at: Option<f64>, /// <p>For CPU and memory resource types, this parameter describes the amount of each resource that was available on the container instance when the container agent registered it with Amazon ECS. This value represents the total amount of CPU and memory that can be allocated on this container instance to tasks. For port resource types, this parameter describes the ports that were reserved by the Amazon ECS container agent when it registered the container instance with Amazon ECS.</p> #[serde(rename = "registeredResources")] #[serde(skip_serializing_if = "Option::is_none")] pub registered_resources: Option<Vec<Resource>>, /// <p>For CPU and memory resource types, this parameter describes the remaining CPU and memory that has not already been allocated to tasks and is therefore available for new tasks. For port resource types, this parameter describes the ports that were reserved by the Amazon ECS container agent (at instance registration time) and any task containers that have reserved port mappings on the host (with the <code>host</code> or <code>bridge</code> network mode). Any port that is not specified here is available for new tasks.</p> #[serde(rename = "remainingResources")] #[serde(skip_serializing_if = "Option::is_none")] pub remaining_resources: Option<Vec<Resource>>, /// <p>The number of tasks on the container instance that are in the <code>RUNNING</code> status.</p> #[serde(rename = "runningTasksCount")] #[serde(skip_serializing_if = "Option::is_none")] pub running_tasks_count: Option<i64>, /// <p>The status of the container instance. The valid values are <code>REGISTERING</code>, <code>REGISTRATION_FAILED</code>, <code>ACTIVE</code>, <code>INACTIVE</code>, <code>DEREGISTERING</code>, or <code>DRAINING</code>.</p> <p>If your account has opted in to the <code>awsvpcTrunking</code> account setting, then any newly registered container instance will transition to a <code>REGISTERING</code> status while the trunk elastic network interface is provisioned for the instance. If the registration fails, the instance will transition to a <code>REGISTRATION_FAILED</code> status. You can describe the container instance and see the reason for failure in the <code>statusReason</code> parameter. Once the container instance is terminated, the instance transitions to a <code>DEREGISTERING</code> status while the trunk elastic network interface is deprovisioned. The instance then transitions to an <code>INACTIVE</code> status.</p> <p>The <code>ACTIVE</code> status indicates that the container instance can accept tasks. The <code>DRAINING</code> indicates that new tasks are not placed on the container instance and any service tasks running on the container instance are removed if possible. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-draining.html">Container Instance Draining</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The reason that the container instance reached its current status.</p> #[serde(rename = "statusReason")] #[serde(skip_serializing_if = "Option::is_none")] pub status_reason: Option<String>, /// <p>The metadata that you apply to the container instance to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The version counter for the container instance. Every time a container instance experiences a change that triggers a CloudWatch event, the version counter is incremented. If you are replicating your Amazon ECS container instance state with CloudWatch Events, you can compare the version of a container instance reported by the Amazon ECS APIs with the version reported in CloudWatch Events for the container instance (inside the <code>detail</code> object) to verify that the version in your event stream is current.</p> #[serde(rename = "version")] #[serde(skip_serializing_if = "Option::is_none")] pub version: Option<i64>, /// <p>The version information for the Amazon ECS container agent and Docker daemon running on the container instance.</p> #[serde(rename = "versionInfo")] #[serde(skip_serializing_if = "Option::is_none")] pub version_info: Option<VersionInfo>, } /// <p>The overrides that should be sent to a container. An empty container override can be passed in. An example of an empty container override would be <code>{"containerOverrides": [ ] }</code>. If a non-empty container override is specified, the <code>name</code> parameter must be included.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ContainerOverride { /// <p>The command to send to the container that overrides the default command from the Docker image or the task definition. You must also specify a container name.</p> #[serde(rename = "command")] #[serde(skip_serializing_if = "Option::is_none")] pub command: Option<Vec<String>>, /// <p>The number of <code>cpu</code> units reserved for the container, instead of the default value from the task definition. You must also specify a container name.</p> #[serde(rename = "cpu")] #[serde(skip_serializing_if = "Option::is_none")] pub cpu: Option<i64>, /// <p>The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. You must also specify a container name.</p> #[serde(rename = "environment")] #[serde(skip_serializing_if = "Option::is_none")] pub environment: Option<Vec<KeyValuePair>>, /// <p>The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition. If your container attempts to exceed the memory specified here, the container is killed. You must also specify a container name.</p> #[serde(rename = "memory")] #[serde(skip_serializing_if = "Option::is_none")] pub memory: Option<i64>, /// <p>The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition. You must also specify a container name.</p> #[serde(rename = "memoryReservation")] #[serde(skip_serializing_if = "Option::is_none")] pub memory_reservation: Option<i64>, /// <p>The name of the container that receives the override. This parameter is required if any override is specified.</p> #[serde(rename = "name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The type and amount of a resource to assign to a container, instead of the default value from the task definition. The only supported resource is a GPU.</p> #[serde(rename = "resourceRequirements")] #[serde(skip_serializing_if = "Option::is_none")] pub resource_requirements: Option<Vec<ResourceRequirement>>, } /// <p>An object representing a change in state for a container.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ContainerStateChange { /// <p>The name of the container.</p> #[serde(rename = "containerName")] #[serde(skip_serializing_if = "Option::is_none")] pub container_name: Option<String>, /// <p>The exit code for the container, if the state change is a result of the container exiting.</p> #[serde(rename = "exitCode")] #[serde(skip_serializing_if = "Option::is_none")] pub exit_code: Option<i64>, /// <p>Any network bindings associated with the container.</p> #[serde(rename = "networkBindings")] #[serde(skip_serializing_if = "Option::is_none")] pub network_bindings: Option<Vec<NetworkBinding>>, /// <p>The reason for the state change.</p> #[serde(rename = "reason")] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<String>, /// <p>The status of the container.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CreateClusterRequest { /// <p>The name of your cluster. If you do not specify a name for your cluster, you create a cluster named <code>default</code>. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. </p> #[serde(rename = "clusterName")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_name: Option<String>, /// <p>The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct CreateClusterResponse { /// <p>The full description of your new cluster.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<Cluster>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CreateServiceRequest { /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.</p> #[serde(rename = "clientToken")] #[serde(skip_serializing_if = "Option::is_none")] pub client_token: Option<String>, /// <p>The short name or full Amazon Resource Name (ARN) of the cluster on which to run your service. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p> #[serde(rename = "deploymentConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub deployment_configuration: Option<DeploymentConfiguration>, /// <p>The deployment controller to use for the service.</p> #[serde(rename = "deploymentController")] #[serde(skip_serializing_if = "Option::is_none")] pub deployment_controller: Option<DeploymentController>, /// <p>The number of instantiations of the specified task definition to place and keep running on your cluster.</p> #[serde(rename = "desiredCount")] #[serde(skip_serializing_if = "Option::is_none")] pub desired_count: Option<i64>, /// <p>Specifies whether to enable Amazon ECS managed tags for the tasks within the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "enableECSManagedTags")] #[serde(skip_serializing_if = "Option::is_none")] pub enable_ecs_managed_tags: Option<bool>, /// <p>The period of time, in seconds, that the Amazon ECS service scheduler should ignore unhealthy Elastic Load Balancing target health checks after a task has first started. This is only valid if your service is configured to use a load balancer. If your service's tasks take a while to start and respond to Elastic Load Balancing health checks, you can specify a health check grace period of up to 2,147,483,647 seconds. During that time, the ECS service scheduler ignores health check status. This grace period can prevent the ECS service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.</p> #[serde(rename = "healthCheckGracePeriodSeconds")] #[serde(skip_serializing_if = "Option::is_none")] pub health_check_grace_period_seconds: Option<i64>, /// <p>The launch type on which to run your service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS Launch Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "launchType")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_type: Option<String>, /// <p>A load balancer object representing the load balancer to use with your service.</p> <p>If the service is using the <code>ECS</code> deployment controller, you are limited to one load balancer or target group.</p> <p>If the service is using the <code>CODE_DEPLOY</code> deployment controller, the service is required to use either an Application Load Balancer or Network Load Balancer. When creating an AWS CodeDeploy deployment group, you specify two target groups (referred to as a <code>targetGroupPair</code>). During a deployment, AWS CodeDeploy determines which task set in your service has the status <code>PRIMARY</code> and associates one target group with it, and then associates the other target group with the replacement task set. The load balancer can also have up to two listeners: a required listener for production traffic and an optional listener that allows you perform validation tests with Lambda functions before routing production traffic to it.</p> <p>After you create a service using the <code>ECS</code> deployment controller, the load balancer name or target group ARN, container name, and container port specified in the service definition are immutable. If you are using the <code>CODE_DEPLOY</code> deployment controller, these values can be changed when updating the service.</p> <p>For Classic Load Balancers, this object must contain the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer. When a task from this service is placed on a container instance, the container instance is registered with the load balancer specified here.</p> <p>For Application Load Balancers and Network Load Balancers, this object must contain the load balancer target group ARN, the container name (as it appears in a container definition), and the container port to access from the load balancer. When a task from this service is placed on a container instance, the container instance and port combination is registered as a target in the target group specified here.</p> <p>Services with tasks that use the <code>awsvpc</code> network mode (for example, those with the Fargate launch type) only support Application Load Balancers and Network Load Balancers. Classic Load Balancers are not supported. Also, when you create any target groups for these services, you must choose <code>ip</code> as the target type, not <code>instance</code>, because tasks that use the <code>awsvpc</code> network mode are associated with an elastic network interface, not an Amazon EC2 instance.</p> #[serde(rename = "loadBalancers")] #[serde(skip_serializing_if = "Option::is_none")] pub load_balancers: Option<Vec<LoadBalancer>>, /// <p>The network configuration for the service. This parameter is required for task definitions that use the <code>awsvpc</code> network mode to receive their own elastic network interface, and it is not supported for other network modes. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "networkConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub network_configuration: Option<NetworkConfiguration>, /// <p>An array of placement constraint objects to use for tasks in your service. You can specify a maximum of 10 constraints per task (this limit includes constraints in the task definition and those specified at runtime). </p> #[serde(rename = "placementConstraints")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_constraints: Option<Vec<PlacementConstraint>>, /// <p>The placement strategy objects to use for tasks in your service. You can specify a maximum of five strategy rules per service.</p> #[serde(rename = "placementStrategy")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_strategy: Option<Vec<PlacementStrategy>>, /// <p>The platform version that your tasks in the service are running on. A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the <code>LATEST</code> platform version is used by default. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">AWS Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "platformVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub platform_version: Option<String>, /// <p>Specifies whether to propagate the tags from the task definition or the service to the tasks in the service. If no value is specified, the tags are not propagated. Tags can only be propagated to the tasks within the service during service creation. To add tags to a task after service creation, use the <a>TagResource</a> API action.</p> #[serde(rename = "propagateTags")] #[serde(skip_serializing_if = "Option::is_none")] pub propagate_tags: Option<String>, /// <p>The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is only permitted if you are using a load balancer with your service and your task definition does not use the <code>awsvpc</code> network mode. If you specify the <code>role</code> parameter, you must also specify a load balancer object with the <code>loadBalancers</code> parameter.</p> <important> <p>If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here. The service-linked role is required if your task definition uses the <code>awsvpc</code> network mode, in which case you should not specify a role here. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html">Using Service-Linked Roles for Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </important> <p>If your specified role has a path other than <code>/</code>, then you must either specify the full role ARN (this is recommended) or prefix the role name with the path. For example, if a role with the name <code>bar</code> has a path of <code>/foo/</code> then you would specify <code>/foo/bar</code> as the role name. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names">Friendly Names and Paths</a> in the <i>IAM User Guide</i>.</p> #[serde(rename = "role")] #[serde(skip_serializing_if = "Option::is_none")] pub role: Option<String>, /// <p><p>The scheduling strategy to use for the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html">Services</a>.</p> <p>There are two service scheduler strategies available:</p> <ul> <li> <p> <code>REPLICA</code>-The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. This scheduler strategy is required if the service is using the <code>CODE<em>DEPLOY</code> or <code>EXTERNAL</code> deployment controller types.</p> </li> <li> <p> <code>DAEMON</code>-The daemon scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that you specify in your cluster. When you're using this strategy, you don't need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies.</p> <note> <p>Tasks using the Fargate launch type or the <code>CODE</em>DEPLOY</code> or <code>EXTERNAL</code> deployment controller types don't support the <code>DAEMON</code> scheduling strategy.</p> </note> </li> </ul></p> #[serde(rename = "schedulingStrategy")] #[serde(skip_serializing_if = "Option::is_none")] pub scheduling_strategy: Option<String>, /// <p>The name of your service. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a Region or across multiple Regions.</p> #[serde(rename = "serviceName")] pub service_name: String, /// <p><p>The details of the service discovery registries to assign to this service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.</p> <note> <p>Service discovery is supported for Fargate tasks if you are using platform version v1.1.0 or later. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">AWS Fargate Platform Versions</a>.</p> </note></p> #[serde(rename = "serviceRegistries")] #[serde(skip_serializing_if = "Option::is_none")] pub service_registries: Option<Vec<ServiceRegistry>>, /// <p>The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. When a service is deleted, the tags are deleted as well. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run in your service. If a <code>revision</code> is not specified, the latest <code>ACTIVE</code> revision is used.</p> <p>A task definition must be specified if the service is using the <code>ECS</code> deployment controller.</p> #[serde(rename = "taskDefinition")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct CreateServiceResponse { /// <p>The full description of your service following the create call.</p> <p>If a service is using the <code>ECS</code> deployment controller, the <code>deploymentController</code> and <code>taskSets</code> parameters will not be returned.</p> <p>If the service is using the <code>CODE_DEPLOY</code> deployment controller, the <code>deploymentController</code>, <code>taskSets</code> and <code>deployments</code> parameters will be returned, however the <code>deployments</code> parameter will be an empty list.</p> #[serde(rename = "service")] #[serde(skip_serializing_if = "Option::is_none")] pub service: Option<Service>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CreateTaskSetRequest { /// <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Up to 32 ASCII characters are allowed.</p> #[serde(rename = "clientToken")] #[serde(skip_serializing_if = "Option::is_none")] pub client_token: Option<String>, /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.</p> #[serde(rename = "cluster")] pub cluster: String, /// <p>An optional non-unique tag that identifies this task set in external systems. If the task set is associated with a service discovery registry, the tasks in this task set will have the <code>ECS_TASK_SET_EXTERNAL_ID</code> AWS Cloud Map attribute set to the provided value.</p> #[serde(rename = "externalId")] #[serde(skip_serializing_if = "Option::is_none")] pub external_id: Option<String>, /// <p>The launch type that new tasks in the task set will use. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS Launch Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "launchType")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_type: Option<String>, /// <p>A load balancer object representing the load balancer to use with the task set. The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.</p> #[serde(rename = "loadBalancers")] #[serde(skip_serializing_if = "Option::is_none")] pub load_balancers: Option<Vec<LoadBalancer>>, #[serde(rename = "networkConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub network_configuration: Option<NetworkConfiguration>, /// <p>The platform version that the tasks in the task set should use. A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the <code>LATEST</code> platform version is used by default.</p> #[serde(rename = "platformVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub platform_version: Option<String>, #[serde(rename = "scale")] #[serde(skip_serializing_if = "Option::is_none")] pub scale: Option<Scale>, /// <p>The short name or full Amazon Resource Name (ARN) of the service to create the task set in.</p> #[serde(rename = "service")] pub service: String, /// <p>The details of the service discovery registries to assign to this task set. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.</p> #[serde(rename = "serviceRegistries")] #[serde(skip_serializing_if = "Option::is_none")] pub service_registries: Option<Vec<ServiceRegistry>>, /// <p>The task definition for the tasks in the task set to use.</p> #[serde(rename = "taskDefinition")] pub task_definition: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct CreateTaskSetResponse { #[serde(rename = "taskSet")] #[serde(skip_serializing_if = "Option::is_none")] pub task_set: Option<TaskSet>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteAccountSettingRequest { /// <p>The resource name for which to disable the account setting. If <code>serviceLongArnFormat</code> is specified, the ARN for your Amazon ECS services is affected. If <code>taskLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If <code>containerInstanceLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If <code>awsvpcTrunking</code> is specified, the ENI limit for your Amazon ECS container instances is affected.</p> #[serde(rename = "name")] pub name: String, /// <p>The ARN of the principal, which can be an IAM user, IAM role, or the root user. If you specify the root user, it disables the account setting for all IAM users, IAM roles, and the root user of the account unless an IAM user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.</p> #[serde(rename = "principalArn")] #[serde(skip_serializing_if = "Option::is_none")] pub principal_arn: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DeleteAccountSettingResponse { /// <p>The account setting for the specified principal ARN.</p> #[serde(rename = "setting")] #[serde(skip_serializing_if = "Option::is_none")] pub setting: Option<Setting>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteAttributesRequest { /// <p>The attributes to delete from your resource. You can specify up to 10 attributes per request. For custom attributes, specify the attribute name and target ID, but do not specify the value. If you specify the target ID using the short form, you must also specify the target type.</p> #[serde(rename = "attributes")] pub attributes: Vec<Attribute>, /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that contains the resource to delete attributes. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DeleteAttributesResponse { /// <p>A list of attribute objects that were successfully deleted from your resource.</p> #[serde(rename = "attributes")] #[serde(skip_serializing_if = "Option::is_none")] pub attributes: Option<Vec<Attribute>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteClusterRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster to delete.</p> #[serde(rename = "cluster")] pub cluster: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DeleteClusterResponse { /// <p>The full description of the deleted cluster.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<Cluster>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteServiceRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to delete. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>If <code>true</code>, allows you to delete a service even if it has not been scaled down to zero tasks. It is only necessary to use this if the service is using the <code>REPLICA</code> scheduling strategy.</p> #[serde(rename = "force")] #[serde(skip_serializing_if = "Option::is_none")] pub force: Option<bool>, /// <p>The name of the service to delete.</p> #[serde(rename = "service")] pub service: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DeleteServiceResponse { /// <p>The full description of the deleted service.</p> #[serde(rename = "service")] #[serde(skip_serializing_if = "Option::is_none")] pub service: Option<Service>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteTaskSetRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in to delete.</p> #[serde(rename = "cluster")] pub cluster: String, /// <p>If <code>true</code>, this allows you to delete a task set even if it hasn't been scaled down to zero.</p> #[serde(rename = "force")] #[serde(skip_serializing_if = "Option::is_none")] pub force: Option<bool>, /// <p>The short name or full Amazon Resource Name (ARN) of the service that hosts the task set to delete.</p> #[serde(rename = "service")] pub service: String, /// <p>The task set ID or full Amazon Resource Name (ARN) of the task set to delete.</p> #[serde(rename = "taskSet")] pub task_set: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DeleteTaskSetResponse { #[serde(rename = "taskSet")] #[serde(skip_serializing_if = "Option::is_none")] pub task_set: Option<TaskSet>, } /// <p>The details of an Amazon ECS service deployment. This is used only when a service uses the <code>ECS</code> deployment controller type.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Deployment { /// <p>The Unix timestamp for when the service deployment was created.</p> #[serde(rename = "createdAt")] #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option<f64>, /// <p>The most recent desired count of tasks that was specified for the service to deploy or maintain.</p> #[serde(rename = "desiredCount")] #[serde(skip_serializing_if = "Option::is_none")] pub desired_count: Option<i64>, /// <p>The ID of the deployment.</p> #[serde(rename = "id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>The launch type the tasks in the service are using. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS Launch Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "launchType")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_type: Option<String>, /// <p>The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the <code>awsvpc</code> networking mode.</p> #[serde(rename = "networkConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub network_configuration: Option<NetworkConfiguration>, /// <p>The number of tasks in the deployment that are in the <code>PENDING</code> status.</p> #[serde(rename = "pendingCount")] #[serde(skip_serializing_if = "Option::is_none")] pub pending_count: Option<i64>, /// <p>The platform version on which your tasks in the service are running. A platform version is only specified for tasks using the Fargate launch type. If one is not specified, the <code>LATEST</code> platform version is used by default. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">AWS Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "platformVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub platform_version: Option<String>, /// <p>The number of tasks in the deployment that are in the <code>RUNNING</code> status.</p> #[serde(rename = "runningCount")] #[serde(skip_serializing_if = "Option::is_none")] pub running_count: Option<i64>, /// <p><p>The status of the deployment. The following describes each state:</p> <dl> <dt>PRIMARY</dt> <dd> <p>The most recent deployment of a service.</p> </dd> <dt>ACTIVE</dt> <dd> <p>A service deployment that still has running tasks, but are in the process of being replaced with a new <code>PRIMARY</code> deployment.</p> </dd> <dt>INACTIVE</dt> <dd> <p>A deployment that has been completely replaced.</p> </dd> </dl></p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The most recent task definition that was specified for the tasks in the service to use.</p> #[serde(rename = "taskDefinition")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition: Option<String>, /// <p>The Unix timestamp for when the service deployment was last updated.</p> #[serde(rename = "updatedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub updated_at: Option<f64>, } /// <p>Optional deployment parameters that control how many tasks run during a deployment and the ordering of stopping and starting tasks.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct DeploymentConfiguration { /// <p>If a service is using the rolling update (<code>ECS</code>) deployment type, the <b>maximum percent</b> parameter represents an upper limit on the number of tasks in a service that are allowed in the <code>RUNNING</code> or <code>PENDING</code> state during a deployment, as a percentage of the desired number of tasks (rounded down to the nearest integer), and while any container instances are in the <code>DRAINING</code> state if the service contains tasks using the EC2 launch type. This parameter enables you to define the deployment batch size. For example, if your service has a desired number of four tasks and a maximum percent value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default value for maximum percent is 200%.</p> <p>If a service is using the blue/green (<code>CODE_DEPLOY</code>) or <code>EXTERNAL</code> deployment types and tasks that use the EC2 launch type, the <b>maximum percent</b> value is set to the default value and is used to define the upper limit on the number of the tasks in the service that remain in the <code>RUNNING</code> state while the container instances are in the <code>DRAINING</code> state. If the tasks in the service use the Fargate launch type, the maximum percent value is not used, although it is returned when describing your service.</p> #[serde(rename = "maximumPercent")] #[serde(skip_serializing_if = "Option::is_none")] pub maximum_percent: Option<i64>, /// <p>If a service is using the rolling update (<code>ECS</code>) deployment type, the <b>minimum healthy percent</b> represents a lower limit on the number of tasks in a service that must remain in the <code>RUNNING</code> state during a deployment, as a percentage of the desired number of tasks (rounded up to the nearest integer), and while any container instances are in the <code>DRAINING</code> state if the service contains tasks using the EC2 launch type. This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a desired number of four tasks and a minimum healthy percent of 50%, the scheduler may stop two existing tasks to free up cluster capacity before starting two new tasks. Tasks for services that <i>do not</i> use a load balancer are considered healthy if they are in the <code>RUNNING</code> state; tasks for services that <i>do</i> use a load balancer are considered healthy if they are in the <code>RUNNING</code> state and they are reported as healthy by the load balancer. The default value for minimum healthy percent is 100%.</p> <p>If a service is using the blue/green (<code>CODE_DEPLOY</code>) or <code>EXTERNAL</code> deployment types and tasks that use the EC2 launch type, the <b>minimum healthy percent</b> value is set to the default value and is used to define the lower limit on the number of the tasks in the service that remain in the <code>RUNNING</code> state while the container instances are in the <code>DRAINING</code> state. If the tasks in the service use the Fargate launch type, the minimum healthy percent value is not used, although it is returned when describing your service.</p> #[serde(rename = "minimumHealthyPercent")] #[serde(skip_serializing_if = "Option::is_none")] pub minimum_healthy_percent: Option<i64>, } /// <p>The deployment controller to use for the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct DeploymentController { /// <p><p>The deployment controller type to use.</p> <p>There are three deployment controller types available:</p> <dl> <dt>ECS</dt> <dd> <p>The rolling update (<code>ECS</code>) deployment type involves replacing the current running version of the container with the latest version. The number of containers Amazon ECS adds or removes from the service during a rolling update is controlled by adjusting the minimum and maximum number of healthy tasks allowed during a service deployment, as specified in the <a>DeploymentConfiguration</a>.</p> </dd> <dt>CODE<em>DEPLOY</dt> <dd> <p>The blue/green (<code>CODE</em>DEPLOY</code>) deployment type uses the blue/green deployment model powered by AWS CodeDeploy, which allows you to verify a new deployment of a service before sending production traffic to it.</p> </dd> <dt>EXTERNAL</dt> <dd> <p>The external (<code>EXTERNAL</code>) deployment type enables you to use any third-party deployment controller for full control over the deployment process for an Amazon ECS service.</p> </dd> </dl></p> #[serde(rename = "type")] pub type_: String, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeregisterContainerInstanceRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to deregister. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The container instance ID or full ARN of the container instance to deregister. The ARN contains the <code>arn:aws:ecs</code> namespace, followed by the Region of the container instance, the AWS account ID of the container instance owner, the <code>container-instance</code> namespace, and then the container instance ID. For example, <code>arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID</code>.</p> #[serde(rename = "containerInstance")] pub container_instance: String, /// <p>Forces the deregistration of the container instance. If you have tasks running on the container instance when you deregister it with the <code>force</code> option, these tasks remain running until you terminate the instance or the tasks stop through some other means, but they are orphaned (no longer monitored or accounted for by Amazon ECS). If an orphaned task on your container instance is part of an Amazon ECS service, then the service scheduler starts another copy of that task, on a different container instance if possible. </p> <p>Any containers in orphaned service tasks that are registered with a Classic Load Balancer or an Application Load Balancer target group are deregistered. They begin connection draining according to the settings on the load balancer or target group.</p> #[serde(rename = "force")] #[serde(skip_serializing_if = "Option::is_none")] pub force: Option<bool>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DeregisterContainerInstanceResponse { /// <p>The container instance that was deregistered.</p> #[serde(rename = "containerInstance")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instance: Option<ContainerInstance>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeregisterTaskDefinitionRequest { /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full Amazon Resource Name (ARN) of the task definition to deregister. You must specify a <code>revision</code>.</p> #[serde(rename = "taskDefinition")] pub task_definition: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DeregisterTaskDefinitionResponse { /// <p>The full description of the deregistered task.</p> #[serde(rename = "taskDefinition")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition: Option<TaskDefinition>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeClustersRequest { /// <p>A list of up to 100 cluster names or full cluster Amazon Resource Name (ARN) entries. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "clusters")] #[serde(skip_serializing_if = "Option::is_none")] pub clusters: Option<Vec<String>>, /// <p><p>Additional information about your clusters to be separated by launch type, including:</p> <ul> <li> <p>runningEC2TasksCount</p> </li> <li> <p>runningFargateTasksCount</p> </li> <li> <p>pendingEC2TasksCount</p> </li> <li> <p>pendingFargateTasksCount</p> </li> <li> <p>activeEC2ServiceCount</p> </li> <li> <p>activeFargateServiceCount</p> </li> <li> <p>drainingEC2ServiceCount</p> </li> <li> <p>drainingFargateServiceCount</p> </li> </ul></p> #[serde(rename = "include")] #[serde(skip_serializing_if = "Option::is_none")] pub include: Option<Vec<String>>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeClustersResponse { /// <p>The list of clusters.</p> #[serde(rename = "clusters")] #[serde(skip_serializing_if = "Option::is_none")] pub clusters: Option<Vec<Cluster>>, /// <p>Any failures associated with the call.</p> #[serde(rename = "failures")] #[serde(skip_serializing_if = "Option::is_none")] pub failures: Option<Vec<Failure>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeContainerInstancesRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the container instance or container instances you are describing were launched in any cluster other than the default cluster.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>A list of up to 100 container instance IDs or full Amazon Resource Name (ARN) entries.</p> #[serde(rename = "containerInstances")] pub container_instances: Vec<String>, /// <p>Specifies whether you want to see the resource tags for the container instance. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags are not included in the response.</p> #[serde(rename = "include")] #[serde(skip_serializing_if = "Option::is_none")] pub include: Option<Vec<String>>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeContainerInstancesResponse { /// <p>The list of container instances.</p> #[serde(rename = "containerInstances")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instances: Option<Vec<ContainerInstance>>, /// <p>Any failures associated with the call.</p> #[serde(rename = "failures")] #[serde(skip_serializing_if = "Option::is_none")] pub failures: Option<Vec<Failure>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeServicesRequest { /// <p>The short name or full Amazon Resource Name (ARN)the cluster that hosts the service to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the service or services you are describing were launched in any cluster other than the default cluster.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>Specifies whether you want to see the resource tags for the service. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags are not included in the response.</p> #[serde(rename = "include")] #[serde(skip_serializing_if = "Option::is_none")] pub include: Option<Vec<String>>, /// <p>A list of services to describe. You may specify up to 10 services to describe in a single operation.</p> #[serde(rename = "services")] pub services: Vec<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeServicesResponse { /// <p>Any failures associated with the call.</p> #[serde(rename = "failures")] #[serde(skip_serializing_if = "Option::is_none")] pub failures: Option<Vec<Failure>>, /// <p>The list of services described.</p> #[serde(rename = "services")] #[serde(skip_serializing_if = "Option::is_none")] pub services: Option<Vec<Service>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeTaskDefinitionRequest { /// <p>Specifies whether to see the resource tags for the task definition. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags are not included in the response.</p> #[serde(rename = "include")] #[serde(skip_serializing_if = "Option::is_none")] pub include: Option<Vec<String>>, /// <p>The <code>family</code> for the latest <code>ACTIVE</code> revision, <code>family</code> and <code>revision</code> (<code>family:revision</code>) for a specific revision in the family, or full Amazon Resource Name (ARN) of the task definition to describe.</p> #[serde(rename = "taskDefinition")] pub task_definition: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeTaskDefinitionResponse { /// <p>The metadata that is applied to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The full task definition description.</p> #[serde(rename = "taskDefinition")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition: Option<TaskDefinition>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeTaskSetsRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.</p> #[serde(rename = "cluster")] pub cluster: String, /// <p>The short name or full Amazon Resource Name (ARN) of the service that the task sets exist in.</p> #[serde(rename = "service")] pub service: String, /// <p>The ID or full Amazon Resource Name (ARN) of task sets to describe.</p> #[serde(rename = "taskSets")] #[serde(skip_serializing_if = "Option::is_none")] pub task_sets: Option<Vec<String>>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeTaskSetsResponse { /// <p>Any failures associated with the call.</p> #[serde(rename = "failures")] #[serde(skip_serializing_if = "Option::is_none")] pub failures: Option<Vec<Failure>>, /// <p>The list of task sets described.</p> #[serde(rename = "taskSets")] #[serde(skip_serializing_if = "Option::is_none")] pub task_sets: Option<Vec<TaskSet>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeTasksRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task or tasks to describe. If you do not specify a cluster, the default cluster is assumed. This parameter is required if the task or tasks you are describing were launched in any cluster other than the default cluster.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>Specifies whether you want to see the resource tags for the task. If <code>TAGS</code> is specified, the tags are included in the response. If this field is omitted, tags are not included in the response.</p> #[serde(rename = "include")] #[serde(skip_serializing_if = "Option::is_none")] pub include: Option<Vec<String>>, /// <p>A list of up to 100 task IDs or full ARN entries.</p> #[serde(rename = "tasks")] pub tasks: Vec<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeTasksResponse { /// <p>Any failures associated with the call.</p> #[serde(rename = "failures")] #[serde(skip_serializing_if = "Option::is_none")] pub failures: Option<Vec<Failure>>, /// <p>The list of tasks.</p> #[serde(rename = "tasks")] #[serde(skip_serializing_if = "Option::is_none")] pub tasks: Option<Vec<Task>>, } /// <p>An object representing a container instance host device.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Device { /// <p>The path inside the container at which to expose the host device.</p> #[serde(rename = "containerPath")] #[serde(skip_serializing_if = "Option::is_none")] pub container_path: Option<String>, /// <p>The path for the device on the host container instance.</p> #[serde(rename = "hostPath")] pub host_path: String, /// <p>The explicit permissions to provide to the container for the device. By default, the container has permissions for <code>read</code>, <code>write</code>, and <code>mknod</code> for the device.</p> #[serde(rename = "permissions")] #[serde(skip_serializing_if = "Option::is_none")] pub permissions: Option<Vec<String>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DiscoverPollEndpointRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster to which the container instance belongs.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The container instance ID or full ARN of the container instance. The ARN contains the <code>arn:aws:ecs</code> namespace, followed by the Region of the container instance, the AWS account ID of the container instance owner, the <code>container-instance</code> namespace, and then the container instance ID. For example, <code>arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID</code>.</p> #[serde(rename = "containerInstance")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instance: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DiscoverPollEndpointResponse { /// <p>The endpoint for the Amazon ECS agent to poll.</p> #[serde(rename = "endpoint")] #[serde(skip_serializing_if = "Option::is_none")] pub endpoint: Option<String>, /// <p>The telemetry endpoint for the Amazon ECS agent.</p> #[serde(rename = "telemetryEndpoint")] #[serde(skip_serializing_if = "Option::is_none")] pub telemetry_endpoint: Option<String>, } /// <p>This parameter is specified when you are using Docker volumes. Docker volumes are only supported when you are using the EC2 launch type. Windows containers only support the use of the <code>local</code> driver. To use bind mounts, specify a <code>host</code> instead.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct DockerVolumeConfiguration { /// <p><p>If this value is <code>true</code>, the Docker volume is created if it does not already exist.</p> <note> <p>This field is only used if the <code>scope</code> is <code>shared</code>.</p> </note></p> #[serde(rename = "autoprovision")] #[serde(skip_serializing_if = "Option::is_none")] pub autoprovision: Option<bool>, /// <p>The Docker volume driver to use. The driver value must match the driver name provided by Docker because it is used for task placement. If the driver was installed using the Docker plugin CLI, use <code>docker plugin ls</code> to retrieve the driver name from your container instance. If the driver was installed using another method, use Docker plugin discovery to retrieve the driver name. For more information, see <a href="https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery">Docker plugin discovery</a>. This parameter maps to <code>Driver</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate">Create a volume</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>xxdriver</code> option to <a href="https://docs.docker.com/engine/reference/commandline/volume_create/">docker volume create</a>.</p> #[serde(rename = "driver")] #[serde(skip_serializing_if = "Option::is_none")] pub driver: Option<String>, /// <p>A map of Docker driver-specific options passed through. This parameter maps to <code>DriverOpts</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate">Create a volume</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>xxopt</code> option to <a href="https://docs.docker.com/engine/reference/commandline/volume_create/">docker volume create</a>.</p> #[serde(rename = "driverOpts")] #[serde(skip_serializing_if = "Option::is_none")] pub driver_opts: Option<::std::collections::HashMap<String, String>>, /// <p>Custom metadata to add to your Docker volume. This parameter maps to <code>Labels</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate">Create a volume</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>xxlabel</code> option to <a href="https://docs.docker.com/engine/reference/commandline/volume_create/">docker volume create</a>.</p> #[serde(rename = "labels")] #[serde(skip_serializing_if = "Option::is_none")] pub labels: Option<::std::collections::HashMap<String, String>>, /// <p>The scope for the Docker volume that determines its lifecycle. Docker volumes that are scoped to a <code>task</code> are automatically provisioned when the task starts and destroyed when the task stops. Docker volumes that are scoped as <code>shared</code> persist after the task stops.</p> #[serde(rename = "scope")] #[serde(skip_serializing_if = "Option::is_none")] pub scope: Option<String>, } /// <p>A failed resource.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Failure { /// <p>The Amazon Resource Name (ARN) of the failed resource.</p> #[serde(rename = "arn")] #[serde(skip_serializing_if = "Option::is_none")] pub arn: Option<String>, /// <p>The reason for the failure.</p> #[serde(rename = "reason")] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<String>, } /// <p><p>An object representing a container health check. Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image (such as those specified in a parent image or from the image's Dockerfile).</p> <p>The following are notes about container health check support:</p> <ul> <li> <p>Container health checks require version 1.17.0 or greater of the Amazon ECS container agent. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html">Updating the Amazon ECS Container Agent</a>.</p> </li> <li> <p>Container health checks are supported for Fargate tasks if you are using platform version 1.1.0 or greater. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">AWS Fargate Platform Versions</a>.</p> </li> <li> <p>Container health checks are not supported for tasks that are part of a service that is configured to use a Classic Load Balancer.</p> </li> </ul></p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct HealthCheck { /// <p>A string array representing the command that the container runs to determine if it is healthy. The string array must start with <code>CMD</code> to execute the command arguments directly, or <code>CMD-SHELL</code> to run the command with the container's default shell. For example:</p> <p> <code>[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]</code> </p> <p>An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see <code>HealthCheck</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a>.</p> #[serde(rename = "command")] pub command: Vec<String>, /// <p>The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds.</p> #[serde(rename = "interval")] #[serde(skip_serializing_if = "Option::is_none")] pub interval: Option<i64>, /// <p>The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3.</p> #[serde(rename = "retries")] #[serde(skip_serializing_if = "Option::is_none")] pub retries: Option<i64>, /// <p><p>The optional grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You may specify between 0 and 300 seconds. The <code>startPeriod</code> is disabled by default.</p> <note> <p>If a health check succeeds within the <code>startPeriod</code>, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.</p> </note></p> #[serde(rename = "startPeriod")] #[serde(skip_serializing_if = "Option::is_none")] pub start_period: Option<i64>, /// <p>The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5.</p> #[serde(rename = "timeout")] #[serde(skip_serializing_if = "Option::is_none")] pub timeout: Option<i64>, } /// <p>Hostnames and IP address entries that are added to the <code>/etc/hosts</code> file of a container via the <code>extraHosts</code> parameter of its <a>ContainerDefinition</a>. </p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct HostEntry { /// <p>The hostname to use in the <code>/etc/hosts</code> entry.</p> #[serde(rename = "hostname")] pub hostname: String, /// <p>The IP address to use in the <code>/etc/hosts</code> entry.</p> #[serde(rename = "ipAddress")] pub ip_address: String, } /// <p>Details on a container instance bind mount host volume.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct HostVolumeProperties { /// <p>When the <code>host</code> parameter is used, specify a <code>sourcePath</code> to declare the path on the host container instance that is presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If the <code>host</code> parameter contains a <code>sourcePath</code> file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the <code>sourcePath</code> value does not exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.</p> <p>If you are using the Fargate launch type, the <code>sourcePath</code> parameter is not supported.</p> #[serde(rename = "sourcePath")] #[serde(skip_serializing_if = "Option::is_none")] pub source_path: Option<String>, } /// <p>The Linux capabilities for the container that are added to or dropped from the default configuration provided by Docker. For more information on the default capabilities and the non-default available capabilities, see <a href="https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities">Runtime privilege and Linux capabilities</a> in the <i>Docker run reference</i>. For more detailed information on these Linux capabilities, see the <a href="http://man7.org/linux/man-pages/man7/capabilities.7.html">capabilities(7)</a> Linux manual page.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct KernelCapabilities { /// <p>The Linux capabilities for the container that have been added to the default configuration provided by Docker. This parameter maps to <code>CapAdd</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--cap-add</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>If you are using tasks that use the Fargate launch type, the <code>add</code> parameter is not supported.</p> </note> <p>Valid values: <code>"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"</code> </p> #[serde(rename = "add")] #[serde(skip_serializing_if = "Option::is_none")] pub add: Option<Vec<String>>, /// <p>The Linux capabilities for the container that have been removed from the default configuration provided by Docker. This parameter maps to <code>CapDrop</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--cap-drop</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <p>Valid values: <code>"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"</code> </p> #[serde(rename = "drop")] #[serde(skip_serializing_if = "Option::is_none")] pub drop: Option<Vec<String>>, } /// <p>A key-value pair object.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct KeyValuePair { /// <p>The name of the key-value pair. For environment variables, this is the name of the environment variable.</p> #[serde(rename = "name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The value of the key-value pair. For environment variables, this is the value of the environment variable.</p> #[serde(rename = "value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } /// <p>Linux-specific options that are applied to the container, such as Linux <a>KernelCapabilities</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct LinuxParameters { /// <p><p>The Linux capabilities for the container that are added to or dropped from the default configuration provided by Docker.</p> <note> <p>If you are using tasks that use the Fargate launch type, <code>capabilities</code> is supported but the <code>add</code> parameter is not supported.</p> </note></p> #[serde(rename = "capabilities")] #[serde(skip_serializing_if = "Option::is_none")] pub capabilities: Option<KernelCapabilities>, /// <p><p>Any host devices to expose to the container. This parameter maps to <code>Devices</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--device</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>If you are using tasks that use the Fargate launch type, the <code>devices</code> parameter is not supported.</p> </note></p> #[serde(rename = "devices")] #[serde(skip_serializing_if = "Option::is_none")] pub devices: Option<Vec<Device>>, /// <p>Run an <code>init</code> process inside the container that forwards signals and reaps processes. This parameter maps to the <code>--init</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>. This parameter requires version 1.25 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: <code>sudo docker version --format '{{.Server.APIVersion}}'</code> </p> #[serde(rename = "initProcessEnabled")] #[serde(skip_serializing_if = "Option::is_none")] pub init_process_enabled: Option<bool>, /// <p><p>The value for the size (in MiB) of the <code>/dev/shm</code> volume. This parameter maps to the <code>--shm-size</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>If you are using tasks that use the Fargate launch type, the <code>sharedMemorySize</code> parameter is not supported.</p> </note></p> #[serde(rename = "sharedMemorySize")] #[serde(skip_serializing_if = "Option::is_none")] pub shared_memory_size: Option<i64>, /// <p><p>The container path, mount options, and size (in MiB) of the tmpfs mount. This parameter maps to the <code>--tmpfs</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <note> <p>If you are using tasks that use the Fargate launch type, the <code>tmpfs</code> parameter is not supported.</p> </note></p> #[serde(rename = "tmpfs")] #[serde(skip_serializing_if = "Option::is_none")] pub tmpfs: Option<Vec<Tmpfs>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListAccountSettingsRequest { /// <p>Specifies whether to return the effective settings. If <code>true</code>, the account settings for the root user or the default setting for the <code>principalArn</code> are returned. If <code>false</code>, the account settings for the <code>principalArn</code> are returned if they are set. Otherwise, no account settings are returned.</p> #[serde(rename = "effectiveSettings")] #[serde(skip_serializing_if = "Option::is_none")] pub effective_settings: Option<bool>, /// <p>The maximum number of account setting results returned by <code>ListAccountSettings</code> in paginated output. When this parameter is used, <code>ListAccountSettings</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListAccountSettings</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 10. If this parameter is not used, then <code>ListAccountSettings</code> returns up to 10 results and a <code>nextToken</code> value if applicable.</p> #[serde(rename = "maxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p>The resource name you want to list the account settings for.</p> #[serde(rename = "name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p><p>The <code>nextToken</code> value returned from a previous paginated <code>ListAccountSettings</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note></p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The ARN of the principal, which can be an IAM user, IAM role, or the root user. If this field is omitted, the account settings are listed only for the authenticated user.</p> #[serde(rename = "principalArn")] #[serde(skip_serializing_if = "Option::is_none")] pub principal_arn: Option<String>, /// <p>The value of the account settings with which to filter results. You must also specify an account setting name to use this parameter.</p> #[serde(rename = "value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListAccountSettingsResponse { /// <p>The <code>nextToken</code> value to include in a future <code>ListAccountSettings</code> request. When the results of a <code>ListAccountSettings</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The account settings for the resource.</p> #[serde(rename = "settings")] #[serde(skip_serializing_if = "Option::is_none")] pub settings: Option<Vec<Setting>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListAttributesRequest { /// <p>The name of the attribute with which to filter the results. </p> #[serde(rename = "attributeName")] #[serde(skip_serializing_if = "Option::is_none")] pub attribute_name: Option<String>, /// <p>The value of the attribute with which to filter results. You must also specify an attribute name to use this parameter.</p> #[serde(rename = "attributeValue")] #[serde(skip_serializing_if = "Option::is_none")] pub attribute_value: Option<String>, /// <p>The short name or full Amazon Resource Name (ARN) of the cluster to list attributes. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The maximum number of cluster results returned by <code>ListAttributes</code> in paginated output. When this parameter is used, <code>ListAttributes</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListAttributes</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter is not used, then <code>ListAttributes</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p> #[serde(rename = "maxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p><p>The <code>nextToken</code> value returned from a previous paginated <code>ListAttributes</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note></p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The type of the target with which to list attributes.</p> #[serde(rename = "targetType")] pub target_type: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListAttributesResponse { /// <p>A list of attribute objects that meet the criteria of the request.</p> #[serde(rename = "attributes")] #[serde(skip_serializing_if = "Option::is_none")] pub attributes: Option<Vec<Attribute>>, /// <p>The <code>nextToken</code> value to include in a future <code>ListAttributes</code> request. When the results of a <code>ListAttributes</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListClustersRequest { /// <p>The maximum number of cluster results returned by <code>ListClusters</code> in paginated output. When this parameter is used, <code>ListClusters</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListClusters</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter is not used, then <code>ListClusters</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p> #[serde(rename = "maxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p><p>The <code>nextToken</code> value returned from a previous paginated <code>ListClusters</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note></p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListClustersResponse { /// <p>The list of full Amazon Resource Name (ARN) entries for each cluster associated with your account.</p> #[serde(rename = "clusterArns")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arns: Option<Vec<String>>, /// <p>The <code>nextToken</code> value to include in a future <code>ListClusters</code> request. When the results of a <code>ListClusters</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListContainerInstancesRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to list. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>You can filter the results of a <code>ListContainerInstances</code> operation with cluster query language statements. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster Query Language</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "filter")] #[serde(skip_serializing_if = "Option::is_none")] pub filter: Option<String>, /// <p>The maximum number of container instance results returned by <code>ListContainerInstances</code> in paginated output. When this parameter is used, <code>ListContainerInstances</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListContainerInstances</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter is not used, then <code>ListContainerInstances</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p> #[serde(rename = "maxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p><p>The <code>nextToken</code> value returned from a previous paginated <code>ListContainerInstances</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note></p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>Filters the container instances by status. For example, if you specify the <code>DRAINING</code> status, the results include only container instances that have been set to <code>DRAINING</code> using <a>UpdateContainerInstancesState</a>. If you do not specify this parameter, the default is to include container instances set to all states other than <code>INACTIVE</code>.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListContainerInstancesResponse { /// <p>The list of container instances with full ARN entries for each container instance associated with the specified cluster.</p> #[serde(rename = "containerInstanceArns")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instance_arns: Option<Vec<String>>, /// <p>The <code>nextToken</code> value to include in a future <code>ListContainerInstances</code> request. When the results of a <code>ListContainerInstances</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListServicesRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the services to list. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The launch type for the services to list.</p> #[serde(rename = "launchType")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_type: Option<String>, /// <p>The maximum number of service results returned by <code>ListServices</code> in paginated output. When this parameter is used, <code>ListServices</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListServices</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter is not used, then <code>ListServices</code> returns up to 10 results and a <code>nextToken</code> value if applicable.</p> #[serde(rename = "maxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p><p>The <code>nextToken</code> value returned from a previous paginated <code>ListServices</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note></p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The scheduling strategy for services to list.</p> #[serde(rename = "schedulingStrategy")] #[serde(skip_serializing_if = "Option::is_none")] pub scheduling_strategy: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListServicesResponse { /// <p>The <code>nextToken</code> value to include in a future <code>ListServices</code> request. When the results of a <code>ListServices</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The list of full ARN entries for each service associated with the specified cluster.</p> #[serde(rename = "serviceArns")] #[serde(skip_serializing_if = "Option::is_none")] pub service_arns: Option<Vec<String>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListTagsForResourceRequest { /// <p>The Amazon Resource Name (ARN) that identifies the resource for which to list the tags. Currently, the supported resources are Amazon ECS tasks, services, task definitions, clusters, and container instances.</p> #[serde(rename = "resourceArn")] pub resource_arn: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListTagsForResourceResponse { /// <p>The tags for the resource.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListTaskDefinitionFamiliesRequest { /// <p>The <code>familyPrefix</code> is a string that is used to filter the results of <code>ListTaskDefinitionFamilies</code>. If you specify a <code>familyPrefix</code>, only task definition family names that begin with the <code>familyPrefix</code> string are returned.</p> #[serde(rename = "familyPrefix")] #[serde(skip_serializing_if = "Option::is_none")] pub family_prefix: Option<String>, /// <p>The maximum number of task definition family results returned by <code>ListTaskDefinitionFamilies</code> in paginated output. When this parameter is used, <code>ListTaskDefinitions</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListTaskDefinitionFamilies</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter is not used, then <code>ListTaskDefinitionFamilies</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p> #[serde(rename = "maxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p><p>The <code>nextToken</code> value returned from a previous paginated <code>ListTaskDefinitionFamilies</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note></p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The task definition family status with which to filter the <code>ListTaskDefinitionFamilies</code> results. By default, both <code>ACTIVE</code> and <code>INACTIVE</code> task definition families are listed. If this parameter is set to <code>ACTIVE</code>, only task definition families that have an <code>ACTIVE</code> task definition revision are returned. If this parameter is set to <code>INACTIVE</code>, only task definition families that do not have any <code>ACTIVE</code> task definition revisions are returned. If you paginate the resulting output, be sure to keep the <code>status</code> value constant in each subsequent request.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListTaskDefinitionFamiliesResponse { /// <p>The list of task definition family names that match the <code>ListTaskDefinitionFamilies</code> request.</p> #[serde(rename = "families")] #[serde(skip_serializing_if = "Option::is_none")] pub families: Option<Vec<String>>, /// <p>The <code>nextToken</code> value to include in a future <code>ListTaskDefinitionFamilies</code> request. When the results of a <code>ListTaskDefinitionFamilies</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListTaskDefinitionsRequest { /// <p>The full family name with which to filter the <code>ListTaskDefinitions</code> results. Specifying a <code>familyPrefix</code> limits the listed task definitions to task definition revisions that belong to that family.</p> #[serde(rename = "familyPrefix")] #[serde(skip_serializing_if = "Option::is_none")] pub family_prefix: Option<String>, /// <p>The maximum number of task definition results returned by <code>ListTaskDefinitions</code> in paginated output. When this parameter is used, <code>ListTaskDefinitions</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListTaskDefinitions</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter is not used, then <code>ListTaskDefinitions</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p> #[serde(rename = "maxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p><p>The <code>nextToken</code> value returned from a previous paginated <code>ListTaskDefinitions</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note></p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The order in which to sort the results. Valid values are <code>ASC</code> and <code>DESC</code>. By default (<code>ASC</code>), task definitions are listed lexicographically by family name and in ascending numerical order by revision so that the newest task definitions in a family are listed last. Setting this parameter to <code>DESC</code> reverses the sort order on family name and revision so that the newest task definitions in a family are listed first.</p> #[serde(rename = "sort")] #[serde(skip_serializing_if = "Option::is_none")] pub sort: Option<String>, /// <p>The task definition status with which to filter the <code>ListTaskDefinitions</code> results. By default, only <code>ACTIVE</code> task definitions are listed. By setting this parameter to <code>INACTIVE</code>, you can view task definitions that are <code>INACTIVE</code> as long as an active task or service still references them. If you paginate the resulting output, be sure to keep the <code>status</code> value constant in each subsequent request.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListTaskDefinitionsResponse { /// <p>The <code>nextToken</code> value to include in a future <code>ListTaskDefinitions</code> request. When the results of a <code>ListTaskDefinitions</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The list of task definition Amazon Resource Name (ARN) entries for the <code>ListTaskDefinitions</code> request.</p> #[serde(rename = "taskDefinitionArns")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition_arns: Option<Vec<String>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListTasksRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the tasks to list. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The container instance ID or full ARN of the container instance with which to filter the <code>ListTasks</code> results. Specifying a <code>containerInstance</code> limits the results to tasks that belong to that container instance.</p> #[serde(rename = "containerInstance")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instance: Option<String>, /// <p><p>The task desired status with which to filter the <code>ListTasks</code> results. Specifying a <code>desiredStatus</code> of <code>STOPPED</code> limits the results to tasks that Amazon ECS has set the desired status to <code>STOPPED</code>. This can be useful for debugging tasks that are not starting properly or have died or finished. The default status filter is <code>RUNNING</code>, which shows tasks that Amazon ECS has set the desired status to <code>RUNNING</code>.</p> <note> <p>Although you can filter results based on a desired status of <code>PENDING</code>, this does not return any results. Amazon ECS never sets the desired status of a task to that value (only a task's <code>lastStatus</code> may have a value of <code>PENDING</code>).</p> </note></p> #[serde(rename = "desiredStatus")] #[serde(skip_serializing_if = "Option::is_none")] pub desired_status: Option<String>, /// <p>The name of the family with which to filter the <code>ListTasks</code> results. Specifying a <code>family</code> limits the results to tasks that belong to that family.</p> #[serde(rename = "family")] #[serde(skip_serializing_if = "Option::is_none")] pub family: Option<String>, /// <p>The launch type for services to list.</p> #[serde(rename = "launchType")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_type: Option<String>, /// <p>The maximum number of task results returned by <code>ListTasks</code> in paginated output. When this parameter is used, <code>ListTasks</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListTasks</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter is not used, then <code>ListTasks</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p> #[serde(rename = "maxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p><p>The <code>nextToken</code> value returned from a previous paginated <code>ListTasks</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note></p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The name of the service with which to filter the <code>ListTasks</code> results. Specifying a <code>serviceName</code> limits the results to tasks that belong to that service.</p> #[serde(rename = "serviceName")] #[serde(skip_serializing_if = "Option::is_none")] pub service_name: Option<String>, /// <p>The <code>startedBy</code> value with which to filter the task results. Specifying a <code>startedBy</code> value limits the results to tasks that were started with that value.</p> #[serde(rename = "startedBy")] #[serde(skip_serializing_if = "Option::is_none")] pub started_by: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListTasksResponse { /// <p>The <code>nextToken</code> value to include in a future <code>ListTasks</code> request. When the results of a <code>ListTasks</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p> #[serde(rename = "nextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The list of task ARN entries for the <code>ListTasks</code> request.</p> #[serde(rename = "taskArns")] #[serde(skip_serializing_if = "Option::is_none")] pub task_arns: Option<Vec<String>>, } /// <p>Details on a load balancer to be used with a service or task set.</p> <p>If the service is using the <code>ECS</code> deployment controller, you are limited to one load balancer or target group.</p> <p>If the service is using the <code>CODE_DEPLOY</code> deployment controller, the service is required to use either an Application Load Balancer or Network Load Balancer. When you are creating an AWS CodeDeploy deployment group, you specify two target groups (referred to as a <code>targetGroupPair</code>). Each target group binds to a separate task set in the deployment. The load balancer can also have up to two listeners, a required listener for production traffic and an optional listener that allows you to test new revisions of the service before routing production traffic to it.</p> <p>Services with tasks that use the <code>awsvpc</code> network mode (for example, those with the Fargate launch type) only support Application Load Balancers and Network Load Balancers. Classic Load Balancers are not supported. Also, when you create any target groups for these services, you must choose <code>ip</code> as the target type, not <code>instance</code>. Tasks that use the <code>awsvpc</code> network mode are associated with an elastic network interface, not an Amazon EC2 instance.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct LoadBalancer { /// <p>The name of the container (as it appears in a container definition) to associate with the load balancer.</p> #[serde(rename = "containerName")] #[serde(skip_serializing_if = "Option::is_none")] pub container_name: Option<String>, /// <p>The port on the container to associate with the load balancer. This port must correspond to a <code>containerPort</code> in the service's task definition. Your container instances must allow ingress traffic on the <code>hostPort</code> of the port mapping.</p> #[serde(rename = "containerPort")] #[serde(skip_serializing_if = "Option::is_none")] pub container_port: Option<i64>, /// <p>The name of the load balancer to associate with the Amazon ECS service or task set.</p> <p>A load balancer name is only specified when using a classic load balancer. If you are using an application load balancer or a network load balancer this should be omitted.</p> #[serde(rename = "loadBalancerName")] #[serde(skip_serializing_if = "Option::is_none")] pub load_balancer_name: Option<String>, /// <p><p>The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set.</p> <p>A target group ARN is only specified when using an application load balancer or a network load balancer. If you are using a classic load balancer this should be omitted.</p> <p>For services using the <code>ECS</code> deployment controller, you are limited to one target group. For services using the <code>CODE_DEPLOY</code> deployment controller, you are required to define two target groups for the load balancer.</p> <important> <p>If your service's task definition uses the <code>awsvpc</code> network mode (which is required for the Fargate launch type), you must choose <code>ip</code> as the target type, not <code>instance</code>, because tasks that use the <code>awsvpc</code> network mode are associated with an elastic network interface, not an Amazon EC2 instance.</p> </important></p> #[serde(rename = "targetGroupArn")] #[serde(skip_serializing_if = "Option::is_none")] pub target_group_arn: Option<String>, } /// <p>Log configuration options to send to a custom log driver for the container.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct LogConfiguration { /// <p>The log driver to use for the container. The valid values listed for this parameter are log drivers that the Amazon ECS container agent can communicate with by default.</p> <p>For tasks using the Fargate launch type, the supported log drivers are <code>awslogs</code> and <code>splunk</code>.</p> <p>For tasks using the EC2 launch type, the supported log drivers are <code>awslogs</code>, <code>syslog</code>, <code>gelf</code>, <code>fluentd</code>, <code>splunk</code>, <code>journald</code>, and <code>json-file</code>.</p> <p>For more information about using the <code>awslogs</code> log driver, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html">Using the awslogs Log Driver</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <note> <p>If you have a custom driver that is not listed above that you would like to work with the Amazon ECS container agent, you can fork the Amazon ECS container agent project that is <a href="https://github.com/aws/amazon-ecs-agent">available on GitHub</a> and customize it to work with that driver. We encourage you to submit pull requests for changes that you would like to have included. However, Amazon Web Services does not currently support running modified copies of this software.</p> </note> <p>This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: <code>sudo docker version --format '{{.Server.APIVersion}}'</code> </p> #[serde(rename = "logDriver")] pub log_driver: String, /// <p>The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: <code>sudo docker version --format '{{.Server.APIVersion}}'</code> </p> #[serde(rename = "options")] #[serde(skip_serializing_if = "Option::is_none")] pub options: Option<::std::collections::HashMap<String, String>>, /// <p>The secrets to pass to the log configuration.</p> #[serde(rename = "secretOptions")] #[serde(skip_serializing_if = "Option::is_none")] pub secret_options: Option<Vec<Secret>>, } /// <p>Details on a volume mount point that is used in a container definition.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct MountPoint { /// <p>The path on the container to mount the host volume at.</p> #[serde(rename = "containerPath")] #[serde(skip_serializing_if = "Option::is_none")] pub container_path: Option<String>, /// <p>If this value is <code>true</code>, the container has read-only access to the volume. If this value is <code>false</code>, then the container can write to the volume. The default value is <code>false</code>.</p> #[serde(rename = "readOnly")] #[serde(skip_serializing_if = "Option::is_none")] pub read_only: Option<bool>, /// <p>The name of the volume to mount. Must be a volume name referenced in the <code>name</code> parameter of task definition <code>volume</code>.</p> #[serde(rename = "sourceVolume")] #[serde(skip_serializing_if = "Option::is_none")] pub source_volume: Option<String>, } /// <p>Details on the network bindings between a container and its host container instance. After a task reaches the <code>RUNNING</code> status, manual and automatic host and container port assignments are visible in the <code>networkBindings</code> section of <a>DescribeTasks</a> API responses.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NetworkBinding { /// <p>The IP address that the container is bound to on the container instance.</p> #[serde(rename = "bindIP")] #[serde(skip_serializing_if = "Option::is_none")] pub bind_ip: Option<String>, /// <p>The port number on the container that is used with the network binding.</p> #[serde(rename = "containerPort")] #[serde(skip_serializing_if = "Option::is_none")] pub container_port: Option<i64>, /// <p>The port number on the host that is used with the network binding.</p> #[serde(rename = "hostPort")] #[serde(skip_serializing_if = "Option::is_none")] pub host_port: Option<i64>, /// <p>The protocol used for the network binding.</p> #[serde(rename = "protocol")] #[serde(skip_serializing_if = "Option::is_none")] pub protocol: Option<String>, } /// <p>An object representing the network configuration for a task or service.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct NetworkConfiguration { /// <p><p>The VPC subnets and security groups associated with a task.</p> <note> <p>All specified subnets and security groups must be from the same VPC.</p> </note></p> #[serde(rename = "awsvpcConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub awsvpc_configuration: Option<AwsVpcConfiguration>, } /// <p>An object representing the elastic network interface for tasks that use the <code>awsvpc</code> network mode.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct NetworkInterface { /// <p>The attachment ID for the network interface.</p> #[serde(rename = "attachmentId")] #[serde(skip_serializing_if = "Option::is_none")] pub attachment_id: Option<String>, /// <p>The private IPv6 address for the network interface.</p> #[serde(rename = "ipv6Address")] #[serde(skip_serializing_if = "Option::is_none")] pub ipv_6_address: Option<String>, /// <p>The private IPv4 address for the network interface.</p> #[serde(rename = "privateIpv4Address")] #[serde(skip_serializing_if = "Option::is_none")] pub private_ipv_4_address: Option<String>, } /// <p>An object representing a constraint on task placement. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html">Task Placement Constraints</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PlacementConstraint { /// <p>A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is <code>distinctInstance</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster Query Language</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "expression")] #[serde(skip_serializing_if = "Option::is_none")] pub expression: Option<String>, /// <p>The type of constraint. Use <code>distinctInstance</code> to ensure that each task in a particular group is running on a different container instance. Use <code>memberOf</code> to restrict the selection to a group of valid candidates. The value <code>distinctInstance</code> is not supported in task definitions.</p> #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<String>, } /// <p>The task placement strategy for a task or service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html">Task Placement Strategies</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PlacementStrategy { /// <p>The field to apply the placement strategy against. For the <code>spread</code> placement strategy, valid values are <code>instanceId</code> (or <code>host</code>, which has the same effect), or any platform or custom attribute that is applied to a container instance, such as <code>attribute:ecs.availability-zone</code>. For the <code>binpack</code> placement strategy, valid values are <code>cpu</code> and <code>memory</code>. For the <code>random</code> placement strategy, this field is not used.</p> #[serde(rename = "field")] #[serde(skip_serializing_if = "Option::is_none")] pub field: Option<String>, /// <p>The type of placement strategy. The <code>random</code> placement strategy randomly places tasks on available candidates. The <code>spread</code> placement strategy spreads placement across available candidates evenly based on the <code>field</code> parameter. The <code>binpack</code> strategy places tasks on available candidates that have the least available amount of the resource that is specified with the <code>field</code> parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task).</p> #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<String>, } /// <p>The devices that are available on the container instance. The only supported device type is a GPU.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct PlatformDevice { /// <p>The ID for the GPU(s) on the container instance. The available GPU IDs can also be obtained on the container instance in the <code>/var/lib/ecs/gpu/nvidia_gpu_info.json</code> file.</p> #[serde(rename = "id")] pub id: String, /// <p>The type of device that is available on the container instance. The only supported value is <code>GPU</code>.</p> #[serde(rename = "type")] pub type_: String, } /// <p>Port mappings allow containers to access ports on the host container instance to send or receive traffic. Port mappings are specified as part of the container definition.</p> <p>If you are using containers in a task with the <code>awsvpc</code> or <code>host</code> network mode, exposed ports should be specified using <code>containerPort</code>. The <code>hostPort</code> can be left blank or it must be the same value as the <code>containerPort</code>.</p> <p>After a task reaches the <code>RUNNING</code> status, manual and automatic host and container port assignments are visible in the <code>networkBindings</code> section of <a>DescribeTasks</a> API responses.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct PortMapping { /// <p><p>The port number on the container that is bound to the user-specified or automatically assigned host port.</p> <p>If you are using containers in a task with the <code>awsvpc</code> or <code>host</code> network mode, exposed ports should be specified using <code>containerPort</code>.</p> <p>If you are using containers in a task with the <code>bridge</code> network mode and you specify a container port and not a host port, your container automatically receives a host port in the ephemeral port range. For more information, see <code>hostPort</code>. Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.</p> <important> <p>You cannot expose the same container port for multiple protocols. An error will be returned if this is attempted.</p> </important></p> #[serde(rename = "containerPort")] #[serde(skip_serializing_if = "Option::is_none")] pub container_port: Option<i64>, /// <p>The port number on the container instance to reserve for your container.</p> <p>If you are using containers in a task with the <code>awsvpc</code> or <code>host</code> network mode, the <code>hostPort</code> can either be left blank or set to the same value as the <code>containerPort</code>.</p> <p>If you are using containers in a task with the <code>bridge</code> network mode, you can specify a non-reserved host port for your container port mapping, or you can omit the <code>hostPort</code> (or set it to <code>0</code>) while specifying a <code>containerPort</code> and your container automatically receives a port in the ephemeral port range for your container instance operating system and Docker version.</p> <p>The default ephemeral port range for Docker version 1.6.0 and later is listed on the instance under <code>/proc/sys/net/ipv4/ip_local_port_range</code>. If this kernel parameter is unavailable, the default ephemeral port range from 49153 through 65535 is used. Do not attempt to specify a host port in the ephemeral port range as these are reserved for automatic assignment. In general, ports below 32768 are outside of the ephemeral port range.</p> <note> <p>The default ephemeral port range from 49153 through 65535 is always used for Docker versions before 1.6.0.</p> </note> <p>The default reserved ports are 22 for SSH, the Docker ports 2375 and 2376, and the Amazon ECS container agent ports 51678-51680. Any host port that was previously specified in a running task is also reserved while the task is running (after a task stops, the host port is released). The current reserved ports are displayed in the <code>remainingResources</code> of <a>DescribeContainerInstances</a> output. A container instance can have up to 100 reserved ports at a time, including the default reserved ports. Automatically assigned ports don't count toward the 100 reserved ports limit.</p> #[serde(rename = "hostPort")] #[serde(skip_serializing_if = "Option::is_none")] pub host_port: Option<i64>, /// <p>The protocol used for the port mapping. Valid values are <code>tcp</code> and <code>udp</code>. The default is <code>tcp</code>.</p> #[serde(rename = "protocol")] #[serde(skip_serializing_if = "Option::is_none")] pub protocol: Option<String>, } /// <p>The configuration details for the App Mesh proxy.</p> <p>For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the <code>ecs-init</code> package to enable a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version <code>20190301</code> or later, then they contain the required versions of the container agent and <code>ecs-init</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html">Amazon ECS-optimized Linux AMI</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>For tasks using the Fargate launch type, the task or service requires platform version 1.3.0 or later.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ProxyConfiguration { /// <p>The name of the container that will serve as the App Mesh proxy.</p> #[serde(rename = "containerName")] pub container_name: String, /// <p><p>The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as key-value pairs.</p> <ul> <li> <p> <code>IgnoredUID</code> - (Required) The user ID (UID) of the proxy container as defined by the <code>user</code> parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If <code>IgnoredGID</code> is specified, this field can be empty.</p> </li> <li> <p> <code>IgnoredGID</code> - (Required) The group ID (GID) of the proxy container as defined by the <code>user</code> parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If <code>IgnoredUID</code> is specified, this field can be empty.</p> </li> <li> <p> <code>AppPorts</code> - (Required) The list of ports that the application uses. Network traffic to these ports is forwarded to the <code>ProxyIngressPort</code> and <code>ProxyEgressPort</code>.</p> </li> <li> <p> <code>ProxyIngressPort</code> - (Required) Specifies the port that incoming traffic to the <code>AppPorts</code> is directed to.</p> </li> <li> <p> <code>ProxyEgressPort</code> - (Required) Specifies the port that outgoing traffic from the <code>AppPorts</code> is directed to.</p> </li> <li> <p> <code>EgressIgnoredPorts</code> - (Required) The egress traffic going to the specified ports is ignored and not redirected to the <code>ProxyEgressPort</code>. It can be an empty list.</p> </li> <li> <p> <code>EgressIgnoredIPs</code> - (Required) The egress traffic going to the specified IP addresses is ignored and not redirected to the <code>ProxyEgressPort</code>. It can be an empty list.</p> </li> </ul></p> #[serde(rename = "properties")] #[serde(skip_serializing_if = "Option::is_none")] pub properties: Option<Vec<KeyValuePair>>, /// <p>The proxy type. The only supported value is <code>APPMESH</code>.</p> #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct PutAccountSettingDefaultRequest { /// <p>The resource name for which to modify the account setting. If <code>serviceLongArnFormat</code> is specified, the ARN for your Amazon ECS services is affected. If <code>taskLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If <code>containerInstanceLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If <code>awsvpcTrunking</code> is specified, the ENI limit for your Amazon ECS container instances is affected.</p> #[serde(rename = "name")] pub name: String, /// <p>The account setting value for the specified principal ARN. Accepted values are <code>enabled</code> and <code>disabled</code>.</p> #[serde(rename = "value")] pub value: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct PutAccountSettingDefaultResponse { #[serde(rename = "setting")] #[serde(skip_serializing_if = "Option::is_none")] pub setting: Option<Setting>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct PutAccountSettingRequest { /// <p>The resource name for which to modify the account setting. If <code>serviceLongArnFormat</code> is specified, the ARN for your Amazon ECS services is affected. If <code>taskLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS tasks is affected. If <code>containerInstanceLongArnFormat</code> is specified, the ARN and resource ID for your Amazon ECS container instances is affected. If <code>awsvpcTrunking</code> is specified, the ENI limit for your Amazon ECS container instances is affected.</p> #[serde(rename = "name")] pub name: String, /// <p>The ARN of the principal, which can be an IAM user, IAM role, or the root user. If you specify the root user, it modifies the account setting for all IAM users, IAM roles, and the root user of the account unless an IAM user or role explicitly overrides these settings. If this field is omitted, the setting is changed only for the authenticated user.</p> #[serde(rename = "principalArn")] #[serde(skip_serializing_if = "Option::is_none")] pub principal_arn: Option<String>, /// <p>The account setting value for the specified principal ARN. Accepted values are <code>enabled</code> and <code>disabled</code>.</p> #[serde(rename = "value")] pub value: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct PutAccountSettingResponse { /// <p>The current account setting for a resource.</p> #[serde(rename = "setting")] #[serde(skip_serializing_if = "Option::is_none")] pub setting: Option<Setting>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct PutAttributesRequest { /// <p>The attributes to apply to your resource. You can specify up to 10 custom attributes per resource. You can specify up to 10 attributes in a single call.</p> #[serde(rename = "attributes")] pub attributes: Vec<Attribute>, /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that contains the resource to apply attributes. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct PutAttributesResponse { /// <p>The attributes applied to your resource.</p> #[serde(rename = "attributes")] #[serde(skip_serializing_if = "Option::is_none")] pub attributes: Option<Vec<Attribute>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct RegisterContainerInstanceRequest { /// <p>The container instance attributes that this container instance supports.</p> #[serde(rename = "attributes")] #[serde(skip_serializing_if = "Option::is_none")] pub attributes: Option<Vec<Attribute>>, /// <p>The short name or full Amazon Resource Name (ARN) of the cluster with which to register your container instance. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The ARN of the container instance (if it was previously registered).</p> #[serde(rename = "containerInstanceArn")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instance_arn: Option<String>, /// <p>The instance identity document for the EC2 instance to register. This document can be found by running the following command from the instance: <code>curl http://169.254.169.254/latest/dynamic/instance-identity/document/</code> </p> #[serde(rename = "instanceIdentityDocument")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_identity_document: Option<String>, /// <p>The instance identity document signature for the EC2 instance to register. This signature can be found by running the following command from the instance: <code>curl http://169.254.169.254/latest/dynamic/instance-identity/signature/</code> </p> #[serde(rename = "instanceIdentityDocumentSignature")] #[serde(skip_serializing_if = "Option::is_none")] pub instance_identity_document_signature: Option<String>, /// <p>The devices that are available on the container instance. The only supported device type is a GPU.</p> #[serde(rename = "platformDevices")] #[serde(skip_serializing_if = "Option::is_none")] pub platform_devices: Option<Vec<PlatformDevice>>, /// <p>The metadata that you apply to the container instance to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The resources available on the instance.</p> #[serde(rename = "totalResources")] #[serde(skip_serializing_if = "Option::is_none")] pub total_resources: Option<Vec<Resource>>, /// <p>The version information for the Amazon ECS container agent and Docker daemon running on the container instance.</p> #[serde(rename = "versionInfo")] #[serde(skip_serializing_if = "Option::is_none")] pub version_info: Option<VersionInfo>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct RegisterContainerInstanceResponse { /// <p>The container instance that was registered.</p> #[serde(rename = "containerInstance")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instance: Option<ContainerInstance>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct RegisterTaskDefinitionRequest { /// <p>A list of container definitions in JSON format that describe the different containers that make up your task.</p> #[serde(rename = "containerDefinitions")] pub container_definitions: Vec<ContainerDefinition>, /// <p><p>The number of CPU units used by the task. It can be expressed as an integer using CPU units, for example <code>1024</code>, or as a string using vCPUs, for example <code>1 vCPU</code> or <code>1 vcpu</code>, in a task definition. String values are converted to an integer indicating the CPU units when the task definition is registered.</p> <note> <p>Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.</p> </note> <p>If you are using the EC2 launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>10240</code> CPU units (<code>10</code> vCPUs).</p> <p>If you are using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of supported values for the <code>memory</code> parameter:</p> <ul> <li> <p>256 (.25 vCPU) - Available <code>memory</code> values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)</p> </li> <li> <p>512 (.5 vCPU) - Available <code>memory</code> values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)</p> </li> <li> <p>1024 (1 vCPU) - Available <code>memory</code> values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)</p> </li> <li> <p>2048 (2 vCPU) - Available <code>memory</code> values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)</p> </li> <li> <p>4096 (4 vCPU) - Available <code>memory</code> values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)</p> </li> </ul></p> #[serde(rename = "cpu")] #[serde(skip_serializing_if = "Option::is_none")] pub cpu: Option<String>, /// <p>The Amazon Resource Name (ARN) of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.</p> #[serde(rename = "executionRoleArn")] #[serde(skip_serializing_if = "Option::is_none")] pub execution_role_arn: Option<String>, /// <p>You must specify a <code>family</code> for a task definition, which allows you to track multiple versions of the same task definition. The <code>family</code> is used as a name for your task definition. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed.</p> #[serde(rename = "family")] pub family: String, /// <p><p>The IPC resource namespace to use for the containers in the task. The valid values are <code>host</code>, <code>task</code>, or <code>none</code>. If <code>host</code> is specified, then all containers within the tasks that specified the <code>host</code> IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If <code>task</code> is specified, all containers within the specified task share the same IPC resources. If <code>none</code> is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see <a href="https://docs.docker.com/engine/reference/run/#ipc-settings---ipc">IPC settings</a> in the <i>Docker run reference</i>.</p> <p>If the <code>host</code> IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose. For more information, see <a href="https://docs.docker.com/engine/security/security/">Docker security</a>.</p> <p>If you are setting namespaced kernel parameters using <code>systemControls</code> for the containers in the task, the following will apply to your IPC resource namespace. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html">System Controls</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <ul> <li> <p>For tasks that use the <code>host</code> IPC mode, IPC namespace related <code>systemControls</code> are not supported.</p> </li> <li> <p>For tasks that use the <code>task</code> IPC mode, IPC namespace related <code>systemControls</code> will apply to all containers within a task.</p> </li> </ul> <note> <p>This parameter is not supported for Windows containers or tasks using the Fargate launch type.</p> </note></p> #[serde(rename = "ipcMode")] #[serde(skip_serializing_if = "Option::is_none")] pub ipc_mode: Option<String>, /// <p><p>The amount of memory (in MiB) used by the task. It can be expressed as an integer using MiB, for example <code>1024</code>, or as a string using GB, for example <code>1GB</code> or <code>1 GB</code>, in a task definition. String values are converted to an integer indicating the MiB when the task definition is registered.</p> <note> <p>Task-level CPU and memory parameters are ignored for Windows containers. We recommend specifying container-level resources for Windows containers.</p> </note> <p>If using the EC2 launch type, this field is optional.</p> <p>If using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of supported values for the <code>cpu</code> parameter:</p> <ul> <li> <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p> </li> <li> <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p> </li> <li> <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p> </li> <li> <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p> </li> <li> <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p> </li> </ul></p> #[serde(rename = "memory")] #[serde(skip_serializing_if = "Option::is_none")] pub memory: Option<String>, /// <p>The Docker networking mode to use for the containers in the task. The valid values are <code>none</code>, <code>bridge</code>, <code>awsvpc</code>, and <code>host</code>. The default Docker network mode is <code>bridge</code>. If you are using the Fargate launch type, the <code>awsvpc</code> network mode is required. If you are using the EC2 launch type, any network mode can be used. If the network mode is set to <code>none</code>, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The <code>host</code> and <code>awsvpc</code> network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the <code>bridge</code> mode.</p> <p>With the <code>host</code> and <code>awsvpc</code> network modes, exposed container ports are mapped directly to the corresponding host port (for the <code>host</code> network mode) or the attached elastic network interface port (for the <code>awsvpc</code> network mode), so you cannot take advantage of dynamic host port mappings. </p> <p>If the network mode is <code>awsvpc</code>, the task is allocated an elastic network interface, and you must specify a <a>NetworkConfiguration</a> value when you create a service or run a task with the task definition. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <note> <p>Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with the <code>ecs-init</code> package, or AWS Fargate infrastructure support the <code>awsvpc</code> network mode. </p> </note> <p>If the network mode is <code>host</code>, you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.</p> <p>Docker for Windows uses different network modes than Docker for Linux. When you register a task definition with Windows containers, you must not specify a network mode. If you use the console to register a task definition with Windows containers, you must choose the <code><default></code> network mode object. </p> <p>For more information, see <a href="https://docs.docker.com/engine/reference/run/#network-settings">Network settings</a> in the <i>Docker run reference</i>.</p> #[serde(rename = "networkMode")] #[serde(skip_serializing_if = "Option::is_none")] pub network_mode: Option<String>, /// <p><p>The process namespace to use for the containers in the task. The valid values are <code>host</code> or <code>task</code>. If <code>host</code> is specified, then all containers within the tasks that specified the <code>host</code> PID mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If <code>task</code> is specified, all containers within the specified task share the same process namespace. If no value is specified, the default is a private namespace. For more information, see <a href="https://docs.docker.com/engine/reference/run/#pid-settings---pid">PID settings</a> in the <i>Docker run reference</i>.</p> <p>If the <code>host</code> PID mode is used, be aware that there is a heightened risk of undesired process namespace expose. For more information, see <a href="https://docs.docker.com/engine/security/security/">Docker security</a>.</p> <note> <p>This parameter is not supported for Windows containers or tasks using the Fargate launch type.</p> </note></p> #[serde(rename = "pidMode")] #[serde(skip_serializing_if = "Option::is_none")] pub pid_mode: Option<String>, /// <p>An array of placement constraint objects to use for the task. You can specify a maximum of 10 constraints per task (this limit includes constraints in the task definition and those specified at runtime).</p> #[serde(rename = "placementConstraints")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_constraints: Option<Vec<TaskDefinitionPlacementConstraint>>, #[serde(rename = "proxyConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub proxy_configuration: Option<ProxyConfiguration>, /// <p>The launch type required by the task. If no value is specified, it defaults to <code>EC2</code>.</p> #[serde(rename = "requiresCompatibilities")] #[serde(skip_serializing_if = "Option::is_none")] pub requires_compatibilities: Option<Vec<String>>, /// <p>The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The short name or full Amazon Resource Name (ARN) of the IAM role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html">IAM Roles for Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "taskRoleArn")] #[serde(skip_serializing_if = "Option::is_none")] pub task_role_arn: Option<String>, /// <p>A list of volume definitions in JSON format that containers in your task may use.</p> #[serde(rename = "volumes")] #[serde(skip_serializing_if = "Option::is_none")] pub volumes: Option<Vec<Volume>>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct RegisterTaskDefinitionResponse { /// <p>The list of tags associated with the task definition.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The full description of the registered task definition.</p> #[serde(rename = "taskDefinition")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition: Option<TaskDefinition>, } /// <p>The repository credentials for private registry authentication.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct RepositoryCredentials { /// <p><p>The Amazon Resource Name (ARN) of the secret containing the private repository credentials.</p> <note> <p>When you are using the Amazon ECS API, AWS CLI, or AWS SDK, if the secret exists in the same Region as the task that you are launching then you can use either the full ARN or the name of the secret. When you are using the AWS Management Console, you must specify the full ARN of the secret.</p> </note></p> #[serde(rename = "credentialsParameter")] pub credentials_parameter: String, } /// <p>Describes the resources available for a container instance.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Resource { /// <p>When the <code>doubleValue</code> type is set, the value of the resource must be a double precision floating-point type.</p> #[serde(rename = "doubleValue")] #[serde(skip_serializing_if = "Option::is_none")] pub double_value: Option<f64>, /// <p>When the <code>integerValue</code> type is set, the value of the resource must be an integer.</p> #[serde(rename = "integerValue")] #[serde(skip_serializing_if = "Option::is_none")] pub integer_value: Option<i64>, /// <p>When the <code>longValue</code> type is set, the value of the resource must be an extended precision floating-point type.</p> #[serde(rename = "longValue")] #[serde(skip_serializing_if = "Option::is_none")] pub long_value: Option<i64>, /// <p>The name of the resource, such as <code>CPU</code>, <code>MEMORY</code>, <code>PORTS</code>, <code>PORTS_UDP</code>, or a user-defined resource.</p> #[serde(rename = "name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>When the <code>stringSetValue</code> type is set, the value of the resource must be a string type.</p> #[serde(rename = "stringSetValue")] #[serde(skip_serializing_if = "Option::is_none")] pub string_set_value: Option<Vec<String>>, /// <p>The type of the resource, such as <code>INTEGER</code>, <code>DOUBLE</code>, <code>LONG</code>, or <code>STRINGSET</code>.</p> #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<String>, } /// <p>The type and amount of a resource to assign to a container. The only supported resource is a GPU. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-gpu.html">Working with GPUs on Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i> </p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ResourceRequirement { /// <p>The type of resource to assign to a container. The only supported value is <code>GPU</code>.</p> #[serde(rename = "type")] pub type_: String, /// <p>The number of physical <code>GPUs</code> the Amazon ECS container agent will reserve for the container. The number of GPUs reserved for all containers in a task should not exceed the number of available GPUs on the container instance the task is launched on.</p> #[serde(rename = "value")] pub value: String, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct RunTaskRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster on which to run your task. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks per call.</p> #[serde(rename = "count")] #[serde(skip_serializing_if = "Option::is_none")] pub count: Option<i64>, /// <p>Specifies whether to enable Amazon ECS managed tags for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "enableECSManagedTags")] #[serde(skip_serializing_if = "Option::is_none")] pub enable_ecs_managed_tags: Option<bool>, /// <p>The name of the task group to associate with the task. The default value is the family name of the task definition (for example, family:my-family-name).</p> #[serde(rename = "group")] #[serde(skip_serializing_if = "Option::is_none")] pub group: Option<String>, /// <p>The launch type on which to run your task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS Launch Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "launchType")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_type: Option<String>, /// <p>The network configuration for the task. This parameter is required for task definitions that use the <code>awsvpc</code> network mode to receive their own elastic network interface, and it is not supported for other network modes. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "networkConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub network_configuration: Option<NetworkConfiguration>, /// <p><p>A list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it should receive. You can override the default command for a container (that is specified in the task definition or Docker image) with a <code>command</code> override. You can also override existing environment variables (that are specified in the task definition or Docker image) on a container or add new environment variables to it with an <code>environment</code> override.</p> <note> <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p> </note></p> #[serde(rename = "overrides")] #[serde(skip_serializing_if = "Option::is_none")] pub overrides: Option<TaskOverride>, /// <p>An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).</p> #[serde(rename = "placementConstraints")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_constraints: Option<Vec<PlacementConstraint>>, /// <p>The placement strategy objects to use for the task. You can specify a maximum of five strategy rules per task.</p> #[serde(rename = "placementStrategy")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_strategy: Option<Vec<PlacementStrategy>>, /// <p>The platform version the task should run. A platform version is only specified for tasks using the Fargate launch type. If one is not specified, the <code>LATEST</code> platform version is used by default. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">AWS Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "platformVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub platform_version: Option<String>, /// <p><p>Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the <a>TagResource</a> API action.</p> <note> <p>An error will be received if you specify the <code>SERVICE</code> option when running a task.</p> </note></p> #[serde(rename = "propagateTags")] #[serde(skip_serializing_if = "Option::is_none")] pub propagate_tags: Option<String>, /// <p>An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the <code>startedBy</code> parameter. You can then identify which tasks belong to that job by filtering the results of a <a>ListTasks</a> call with the <code>startedBy</code> value. Up to 36 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.</p> <p>If a task is started by an Amazon ECS service, then the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p> #[serde(rename = "startedBy")] #[serde(skip_serializing_if = "Option::is_none")] pub started_by: Option<String>, /// <p>The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run. If a <code>revision</code> is not specified, the latest <code>ACTIVE</code> revision is used.</p> #[serde(rename = "taskDefinition")] pub task_definition: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct RunTaskResponse { /// <p>Any failures associated with the call.</p> #[serde(rename = "failures")] #[serde(skip_serializing_if = "Option::is_none")] pub failures: Option<Vec<Failure>>, /// <p>A full description of the tasks that were run. The tasks that were successfully placed on your cluster are described here.</p> #[serde(rename = "tasks")] #[serde(skip_serializing_if = "Option::is_none")] pub tasks: Option<Vec<Task>>, } /// <p>A floating-point percentage of the desired number of tasks to place and keep running in the task set.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Scale { /// <p>The unit of measure for the scale value.</p> #[serde(rename = "unit")] #[serde(skip_serializing_if = "Option::is_none")] pub unit: Option<String>, /// <p>The value, specified as a percent total of a service's <code>desiredCount</code>, to scale the task set. Accepted values are numbers between 0 and 100.</p> #[serde(rename = "value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<f64>, } /// <p>An object representing the secret to expose to your container. Secrets can be exposed to a container in the following ways:</p> <ul> <li> <p>To inject sensitive data into your containers as environment variables, use the <code>secrets</code> container definition parameter.</p> </li> <li> <p>To reference sensitive information in the log configuration of a container, use the <code>secretOptions</code> container definition parameter.</p> </li> </ul> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html">Specifying Sensitive Data</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Secret { /// <p>The name of the secret.</p> #[serde(rename = "name")] pub name: String, /// <p><p>The secret to expose to the container. The supported values are either the full ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the AWS Systems Manager Parameter Store.</p> <note> <p>If the AWS Systems Manager Parameter Store parameter exists in the same Region as the task you are launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.</p> </note></p> #[serde(rename = "valueFrom")] pub value_from: String, } /// <p>Details on a service within a cluster</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Service { /// <p>The Amazon Resource Name (ARN) of the cluster that hosts the service.</p> #[serde(rename = "clusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>The Unix timestamp for when the service was created.</p> #[serde(rename = "createdAt")] #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option<f64>, /// <p>The principal that created the service.</p> #[serde(rename = "createdBy")] #[serde(skip_serializing_if = "Option::is_none")] pub created_by: Option<String>, /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p> #[serde(rename = "deploymentConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub deployment_configuration: Option<DeploymentConfiguration>, /// <p>The deployment controller type the service is using.</p> #[serde(rename = "deploymentController")] #[serde(skip_serializing_if = "Option::is_none")] pub deployment_controller: Option<DeploymentController>, /// <p>The current state of deployments for the service.</p> #[serde(rename = "deployments")] #[serde(skip_serializing_if = "Option::is_none")] pub deployments: Option<Vec<Deployment>>, /// <p>The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with <a>CreateService</a>, and it can be modified with <a>UpdateService</a>.</p> #[serde(rename = "desiredCount")] #[serde(skip_serializing_if = "Option::is_none")] pub desired_count: Option<i64>, /// <p>Specifies whether to enable Amazon ECS managed tags for the tasks in the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "enableECSManagedTags")] #[serde(skip_serializing_if = "Option::is_none")] pub enable_ecs_managed_tags: Option<bool>, /// <p>The event stream for your service. A maximum of 100 of the latest events are displayed.</p> #[serde(rename = "events")] #[serde(skip_serializing_if = "Option::is_none")] pub events: Option<Vec<ServiceEvent>>, /// <p>The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.</p> #[serde(rename = "healthCheckGracePeriodSeconds")] #[serde(skip_serializing_if = "Option::is_none")] pub health_check_grace_period_seconds: Option<i64>, /// <p>The launch type on which your service is running. If no value is specified, it will default to <code>EC2</code>. Valid values include <code>EC2</code> and <code>FARGATE</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS Launch Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "launchType")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_type: Option<String>, /// <p>A list of Elastic Load Balancing load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.</p> <p>Services with tasks that use the <code>awsvpc</code> network mode (for example, those with the Fargate launch type) only support Application Load Balancers and Network Load Balancers. Classic Load Balancers are not supported. Also, when you create any target groups for these services, you must choose <code>ip</code> as the target type, not <code>instance</code>. Tasks that use the <code>awsvpc</code> network mode are associated with an elastic network interface, not an Amazon EC2 instance.</p> #[serde(rename = "loadBalancers")] #[serde(skip_serializing_if = "Option::is_none")] pub load_balancers: Option<Vec<LoadBalancer>>, /// <p>The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the <code>awsvpc</code> networking mode.</p> #[serde(rename = "networkConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub network_configuration: Option<NetworkConfiguration>, /// <p>The number of tasks in the cluster that are in the <code>PENDING</code> state.</p> #[serde(rename = "pendingCount")] #[serde(skip_serializing_if = "Option::is_none")] pub pending_count: Option<i64>, /// <p>The placement constraints for the tasks in the service.</p> #[serde(rename = "placementConstraints")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_constraints: Option<Vec<PlacementConstraint>>, /// <p>The placement strategy that determines how tasks for the service are placed.</p> #[serde(rename = "placementStrategy")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_strategy: Option<Vec<PlacementStrategy>>, /// <p>The platform version on which to run your service. A platform version is only specified for tasks using the Fargate launch type. If one is not specified, the <code>LATEST</code> platform version is used by default. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">AWS Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "platformVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub platform_version: Option<String>, /// <p>Specifies whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags are not propagated.</p> #[serde(rename = "propagateTags")] #[serde(skip_serializing_if = "Option::is_none")] pub propagate_tags: Option<String>, /// <p>The ARN of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with an Elastic Load Balancing load balancer.</p> #[serde(rename = "roleArn")] #[serde(skip_serializing_if = "Option::is_none")] pub role_arn: Option<String>, /// <p>The number of tasks in the cluster that are in the <code>RUNNING</code> state.</p> #[serde(rename = "runningCount")] #[serde(skip_serializing_if = "Option::is_none")] pub running_count: Option<i64>, /// <p><p>The scheduling strategy to use for the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html">Services</a>.</p> <p>There are two service scheduler strategies available:</p> <ul> <li> <p> <code>REPLICA</code>-The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions.</p> </li> <li> <p> <code>DAEMON</code>-The daemon scheduling strategy deploys exactly one task on each container instance in your cluster. When you are using this strategy, do not specify a desired number of tasks or any task placement strategies.</p> <note> <p>Fargate tasks do not support the <code>DAEMON</code> scheduling strategy.</p> </note> </li> </ul></p> #[serde(rename = "schedulingStrategy")] #[serde(skip_serializing_if = "Option::is_none")] pub scheduling_strategy: Option<String>, /// <p>The ARN that identifies the service. The ARN contains the <code>arn:aws:ecs</code> namespace, followed by the Region of the service, the AWS account ID of the service owner, the <code>service</code> namespace, and then the service name. For example, <code>arn:aws:ecs:region:012345678910:service/my-service</code>.</p> #[serde(rename = "serviceArn")] #[serde(skip_serializing_if = "Option::is_none")] pub service_arn: Option<String>, /// <p>The name of your service. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a Region or across multiple Regions.</p> #[serde(rename = "serviceName")] #[serde(skip_serializing_if = "Option::is_none")] pub service_name: Option<String>, /// <p>The details of the service discovery registries to assign to this service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.</p> #[serde(rename = "serviceRegistries")] #[serde(skip_serializing_if = "Option::is_none")] pub service_registries: Option<Vec<ServiceRegistry>>, /// <p>The status of the service. The valid values are <code>ACTIVE</code>, <code>DRAINING</code>, or <code>INACTIVE</code>.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The task definition to use for tasks in the service. This value is specified when the service is created with <a>CreateService</a>, and it can be modified with <a>UpdateService</a>.</p> #[serde(rename = "taskDefinition")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition: Option<String>, /// <p>Information about a set of Amazon ECS tasks in either an AWS CodeDeploy or an <code>EXTERNAL</code> deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.</p> #[serde(rename = "taskSets")] #[serde(skip_serializing_if = "Option::is_none")] pub task_sets: Option<Vec<TaskSet>>, } /// <p>Details on an event associated with a service.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ServiceEvent { /// <p>The Unix timestamp for when the event was triggered.</p> #[serde(rename = "createdAt")] #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option<f64>, /// <p>The ID string of the event.</p> #[serde(rename = "id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>The event message.</p> #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>Details of the service registry.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct ServiceRegistry { /// <p>The container name value, already specified in the task definition, to be used for your service discovery service. If the task definition that your service task specifies uses the <code>bridge</code> or <code>host</code> network mode, you must specify a <code>containerName</code> and <code>containerPort</code> combination from the task definition. If the task definition that your service task specifies uses the <code>awsvpc</code> network mode and a type SRV DNS record is used, you must specify either a <code>containerName</code> and <code>containerPort</code> combination or a <code>port</code> value, but not both.</p> #[serde(rename = "containerName")] #[serde(skip_serializing_if = "Option::is_none")] pub container_name: Option<String>, /// <p>The port value, already specified in the task definition, to be used for your service discovery service. If the task definition your service task specifies uses the <code>bridge</code> or <code>host</code> network mode, you must specify a <code>containerName</code> and <code>containerPort</code> combination from the task definition. If the task definition your service task specifies uses the <code>awsvpc</code> network mode and a type SRV DNS record is used, you must specify either a <code>containerName</code> and <code>containerPort</code> combination or a <code>port</code> value, but not both.</p> #[serde(rename = "containerPort")] #[serde(skip_serializing_if = "Option::is_none")] pub container_port: Option<i64>, /// <p>The port value used if your service discovery service specified an SRV record. This field may be used if both the <code>awsvpc</code> network mode and SRV records are used.</p> #[serde(rename = "port")] #[serde(skip_serializing_if = "Option::is_none")] pub port: Option<i64>, /// <p>The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS Cloud Map. For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html">CreateService</a>.</p> #[serde(rename = "registryArn")] #[serde(skip_serializing_if = "Option::is_none")] pub registry_arn: Option<String>, } /// <p>The current account setting for a resource.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Setting { /// <p>The account resource name.</p> #[serde(rename = "name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, /// <p>The ARN of the principal, which can be an IAM user, IAM role, or the root user. If this field is omitted, the authenticated user is assumed.</p> #[serde(rename = "principalArn")] #[serde(skip_serializing_if = "Option::is_none")] pub principal_arn: Option<String>, /// <p>The current account setting for the resource name. If <code>enabled</code>, the resource receives the new Amazon Resource Name (ARN) and resource identifier (ID) format. If <code>disabled</code>, the resource receives the old Amazon Resource Name (ARN) and resource identifier (ID) format.</p> #[serde(rename = "value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct StartTaskRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster on which to start your task. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The container instance IDs or full ARN entries for the container instances on which you would like to place your task. You can specify up to 10 container instances.</p> #[serde(rename = "containerInstances")] pub container_instances: Vec<String>, /// <p>Specifies whether to enable Amazon ECS managed tags for the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html">Tagging Your Amazon ECS Resources</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "enableECSManagedTags")] #[serde(skip_serializing_if = "Option::is_none")] pub enable_ecs_managed_tags: Option<bool>, /// <p>The name of the task group to associate with the task. The default value is the family name of the task definition (for example, family:my-family-name).</p> #[serde(rename = "group")] #[serde(skip_serializing_if = "Option::is_none")] pub group: Option<String>, /// <p>The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the <code>awsvpc</code> networking mode.</p> #[serde(rename = "networkConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub network_configuration: Option<NetworkConfiguration>, /// <p><p>A list of container overrides in JSON format that specify the name of a container in the specified task definition and the overrides it should receive. You can override the default command for a container (that is specified in the task definition or Docker image) with a <code>command</code> override. You can also override existing environment variables (that are specified in the task definition or Docker image) on a container or add new environment variables to it with an <code>environment</code> override.</p> <note> <p>A total of 8192 characters are allowed for overrides. This limit includes the JSON formatting characters of the override structure.</p> </note></p> #[serde(rename = "overrides")] #[serde(skip_serializing_if = "Option::is_none")] pub overrides: Option<TaskOverride>, /// <p>Specifies whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags are not propagated.</p> #[serde(rename = "propagateTags")] #[serde(skip_serializing_if = "Option::is_none")] pub propagate_tags: Option<String>, /// <p>An optional tag specified when a task is started. For example, if you automatically trigger a task to run a batch process job, you could apply a unique identifier for that job to your task with the <code>startedBy</code> parameter. You can then identify which tasks belong to that job by filtering the results of a <a>ListTasks</a> call with the <code>startedBy</code> value. Up to 36 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.</p> <p>If a task is started by an Amazon ECS service, then the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p> #[serde(rename = "startedBy")] #[serde(skip_serializing_if = "Option::is_none")] pub started_by: Option<String>, /// <p>The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to start. If a <code>revision</code> is not specified, the latest <code>ACTIVE</code> revision is used.</p> #[serde(rename = "taskDefinition")] pub task_definition: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct StartTaskResponse { /// <p>Any failures associated with the call.</p> #[serde(rename = "failures")] #[serde(skip_serializing_if = "Option::is_none")] pub failures: Option<Vec<Failure>>, /// <p>A full description of the tasks that were started. Each task that was successfully placed on your container instances is described.</p> #[serde(rename = "tasks")] #[serde(skip_serializing_if = "Option::is_none")] pub tasks: Option<Vec<Task>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct StopTaskRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task to stop. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>An optional message specified when a task is stopped. For example, if you are using a custom scheduler, you can use this parameter to specify the reason for stopping the task here, and the message appears in subsequent <a>DescribeTasks</a> API operations on this task. Up to 255 characters are allowed in this message.</p> #[serde(rename = "reason")] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<String>, /// <p>The task ID or full Amazon Resource Name (ARN) of the task to stop.</p> #[serde(rename = "task")] pub task: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct StopTaskResponse { /// <p>The task that was stopped.</p> #[serde(rename = "task")] #[serde(skip_serializing_if = "Option::is_none")] pub task: Option<Task>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct SubmitAttachmentStateChangesRequest { /// <p>Any attachments associated with the state change request.</p> #[serde(rename = "attachments")] pub attachments: Vec<AttachmentStateChange>, /// <p>The short name or full ARN of the cluster that hosts the container instance the attachment belongs to.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct SubmitAttachmentStateChangesResponse { /// <p>Acknowledgement of the state change.</p> #[serde(rename = "acknowledgment")] #[serde(skip_serializing_if = "Option::is_none")] pub acknowledgment: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct SubmitContainerStateChangeRequest { /// <p>The short name or full ARN of the cluster that hosts the container.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The name of the container.</p> #[serde(rename = "containerName")] #[serde(skip_serializing_if = "Option::is_none")] pub container_name: Option<String>, /// <p>The exit code returned for the state change request.</p> #[serde(rename = "exitCode")] #[serde(skip_serializing_if = "Option::is_none")] pub exit_code: Option<i64>, /// <p>The network bindings of the container.</p> #[serde(rename = "networkBindings")] #[serde(skip_serializing_if = "Option::is_none")] pub network_bindings: Option<Vec<NetworkBinding>>, /// <p>The reason for the state change request.</p> #[serde(rename = "reason")] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<String>, /// <p>The status of the state change request.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The task ID or full Amazon Resource Name (ARN) of the task that hosts the container.</p> #[serde(rename = "task")] #[serde(skip_serializing_if = "Option::is_none")] pub task: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct SubmitContainerStateChangeResponse { /// <p>Acknowledgement of the state change.</p> #[serde(rename = "acknowledgment")] #[serde(skip_serializing_if = "Option::is_none")] pub acknowledgment: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct SubmitTaskStateChangeRequest { /// <p>Any attachments associated with the state change request.</p> #[serde(rename = "attachments")] #[serde(skip_serializing_if = "Option::is_none")] pub attachments: Option<Vec<AttachmentStateChange>>, /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>Any containers associated with the state change request.</p> #[serde(rename = "containers")] #[serde(skip_serializing_if = "Option::is_none")] pub containers: Option<Vec<ContainerStateChange>>, /// <p>The Unix timestamp for when the task execution stopped.</p> #[serde(rename = "executionStoppedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub execution_stopped_at: Option<f64>, /// <p>The Unix timestamp for when the container image pull began.</p> #[serde(rename = "pullStartedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub pull_started_at: Option<f64>, /// <p>The Unix timestamp for when the container image pull completed.</p> #[serde(rename = "pullStoppedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub pull_stopped_at: Option<f64>, /// <p>The reason for the state change request.</p> #[serde(rename = "reason")] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<String>, /// <p>The status of the state change request.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The task ID or full ARN of the task in the state change request.</p> #[serde(rename = "task")] #[serde(skip_serializing_if = "Option::is_none")] pub task: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct SubmitTaskStateChangeResponse { /// <p>Acknowledgement of the state change.</p> #[serde(rename = "acknowledgment")] #[serde(skip_serializing_if = "Option::is_none")] pub acknowledgment: Option<String>, } /// <p><p>A list of namespaced kernel parameters to set in the container. This parameter maps to <code>Sysctls</code> in the <a href="https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate">Create a container</a> section of the <a href="https://docs.docker.com/engine/api/v1.35/">Docker Remote API</a> and the <code>--sysctl</code> option to <a href="https://docs.docker.com/engine/reference/run/">docker run</a>.</p> <p>It is not recommended that you specify network-related <code>systemControls</code> parameters for multiple containers in a single task that also uses either the <code>awsvpc</code> or <code>host</code> network mode for the following reasons:</p> <ul> <li> <p>For tasks that use the <code>awsvpc</code> network mode, if you set <code>systemControls</code> for any container, it applies to all containers in the task. If you set different <code>systemControls</code> for multiple containers in a single task, the container that is started last determines which <code>systemControls</code> take effect.</p> </li> <li> <p>For tasks that use the <code>host</code> network mode, the <code>systemControls</code> parameter applies to the container instance's kernel parameter as well as that of all containers of any tasks running on that container instance.</p> </li> </ul></p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SystemControl { /// <p>The namespaced kernel parameter for which to set a <code>value</code>.</p> #[serde(rename = "namespace")] #[serde(skip_serializing_if = "Option::is_none")] pub namespace: Option<String>, /// <p>The value for the namespaced kernel parameter specified in <code>namespace</code>.</p> #[serde(rename = "value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } /// <p>The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Tag { /// <p>One part of a key-value pair that make up a tag. A <code>key</code> is a general label that acts like a category for more specific tag values.</p> #[serde(rename = "key")] #[serde(skip_serializing_if = "Option::is_none")] pub key: Option<String>, /// <p>The optional part of a key-value pair that make up a tag. A <code>value</code> acts as a descriptor within a tag category (key).</p> #[serde(rename = "value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct TagResourceRequest { /// <p>The Amazon Resource Name (ARN) of the resource to which to add tags. Currently, the supported resources are Amazon ECS tasks, services, task definitions, clusters, and container instances.</p> #[serde(rename = "resourceArn")] pub resource_arn: String, /// <p>The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] pub tags: Vec<Tag>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct TagResourceResponse {} /// <p>Details on a task in a cluster.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Task { /// <p>The Elastic Network Adapter associated with the task if the task uses the <code>awsvpc</code> network mode.</p> #[serde(rename = "attachments")] #[serde(skip_serializing_if = "Option::is_none")] pub attachments: Option<Vec<Attachment>>, /// <p>The ARN of the cluster that hosts the task.</p> #[serde(rename = "clusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>The connectivity status of a task.</p> #[serde(rename = "connectivity")] #[serde(skip_serializing_if = "Option::is_none")] pub connectivity: Option<String>, /// <p>The Unix timestamp for when the task last went into <code>CONNECTED</code> status.</p> #[serde(rename = "connectivityAt")] #[serde(skip_serializing_if = "Option::is_none")] pub connectivity_at: Option<f64>, /// <p>The ARN of the container instances that host the task.</p> #[serde(rename = "containerInstanceArn")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instance_arn: Option<String>, /// <p>The containers associated with the task.</p> #[serde(rename = "containers")] #[serde(skip_serializing_if = "Option::is_none")] pub containers: Option<Vec<Container>>, /// <p><p>The number of CPU units used by the task as expressed in a task definition. It can be expressed as an integer using CPU units, for example <code>1024</code>. It can also be expressed as a string using vCPUs, for example <code>1 vCPU</code> or <code>1 vcpu</code>. String values are converted to an integer indicating the CPU units when the task definition is registered.</p> <p>If you are using the EC2 launch type, this field is optional. Supported values are between <code>128</code> CPU units (<code>0.125</code> vCPUs) and <code>10240</code> CPU units (<code>10</code> vCPUs).</p> <p>If you are using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of supported values for the <code>memory</code> parameter:</p> <ul> <li> <p>256 (.25 vCPU) - Available <code>memory</code> values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)</p> </li> <li> <p>512 (.5 vCPU) - Available <code>memory</code> values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)</p> </li> <li> <p>1024 (1 vCPU) - Available <code>memory</code> values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)</p> </li> <li> <p>2048 (2 vCPU) - Available <code>memory</code> values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)</p> </li> <li> <p>4096 (4 vCPU) - Available <code>memory</code> values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)</p> </li> </ul></p> #[serde(rename = "cpu")] #[serde(skip_serializing_if = "Option::is_none")] pub cpu: Option<String>, /// <p>The Unix timestamp for when the task was created (the task entered the <code>PENDING</code> state).</p> #[serde(rename = "createdAt")] #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option<f64>, /// <p>The desired status of the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p> #[serde(rename = "desiredStatus")] #[serde(skip_serializing_if = "Option::is_none")] pub desired_status: Option<String>, /// <p>The Unix timestamp for when the task execution stopped.</p> #[serde(rename = "executionStoppedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub execution_stopped_at: Option<f64>, /// <p>The name of the task group associated with the task.</p> #[serde(rename = "group")] #[serde(skip_serializing_if = "Option::is_none")] pub group: Option<String>, /// <p><p>The health status for the task, which is determined by the health of the essential containers in the task. If all essential containers in the task are reporting as <code>HEALTHY</code>, then the task status also reports as <code>HEALTHY</code>. If any essential containers in the task are reporting as <code>UNHEALTHY</code> or <code>UNKNOWN</code>, then the task status also reports as <code>UNHEALTHY</code> or <code>UNKNOWN</code>, accordingly.</p> <note> <p>The Amazon ECS container agent does not monitor or report on Docker health checks that are embedded in a container image (such as those specified in a parent image or from the image's Dockerfile) and not specified in the container definition. Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image.</p> </note></p> #[serde(rename = "healthStatus")] #[serde(skip_serializing_if = "Option::is_none")] pub health_status: Option<String>, /// <p>The last known status of the task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html">Task Lifecycle</a>.</p> #[serde(rename = "lastStatus")] #[serde(skip_serializing_if = "Option::is_none")] pub last_status: Option<String>, /// <p>The launch type on which your task is running. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS Launch Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "launchType")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_type: Option<String>, /// <p><p>The amount of memory (in MiB) used by the task as expressed in a task definition. It can be expressed as an integer using MiB, for example <code>1024</code>. It can also be expressed as a string using GB, for example <code>1GB</code> or <code>1 GB</code>. String values are converted to an integer indicating the MiB when the task definition is registered.</p> <p>If you are using the EC2 launch type, this field is optional.</p> <p>If you are using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of supported values for the <code>cpu</code> parameter:</p> <ul> <li> <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p> </li> <li> <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p> </li> <li> <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p> </li> <li> <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p> </li> <li> <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p> </li> </ul></p> #[serde(rename = "memory")] #[serde(skip_serializing_if = "Option::is_none")] pub memory: Option<String>, /// <p>One or more container overrides.</p> #[serde(rename = "overrides")] #[serde(skip_serializing_if = "Option::is_none")] pub overrides: Option<TaskOverride>, /// <p>The platform version on which your task is running. A platform version is only specified for tasks using the Fargate launch type. If one is not specified, the <code>LATEST</code> platform version is used by default. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">AWS Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "platformVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub platform_version: Option<String>, /// <p>The Unix timestamp for when the container image pull began.</p> #[serde(rename = "pullStartedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub pull_started_at: Option<f64>, /// <p>The Unix timestamp for when the container image pull completed.</p> #[serde(rename = "pullStoppedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub pull_stopped_at: Option<f64>, /// <p>The Unix timestamp for when the task started (the task transitioned from the <code>PENDING</code> state to the <code>RUNNING</code> state).</p> #[serde(rename = "startedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub started_at: Option<f64>, /// <p>The tag specified when a task is started. If the task is started by an Amazon ECS service, then the <code>startedBy</code> parameter contains the deployment ID of the service that starts it.</p> #[serde(rename = "startedBy")] #[serde(skip_serializing_if = "Option::is_none")] pub started_by: Option<String>, /// <p>The stop code indicating why a task was stopped. The <code>stoppedReason</code> may contain additional details.</p> #[serde(rename = "stopCode")] #[serde(skip_serializing_if = "Option::is_none")] pub stop_code: Option<String>, /// <p>The Unix timestamp for when the task was stopped (the task transitioned from the <code>RUNNING</code> state to the <code>STOPPED</code> state).</p> #[serde(rename = "stoppedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub stopped_at: Option<f64>, /// <p>The reason that the task was stopped.</p> #[serde(rename = "stoppedReason")] #[serde(skip_serializing_if = "Option::is_none")] pub stopped_reason: Option<String>, /// <p>The Unix timestamp for when the task stops (transitions from the <code>RUNNING</code> state to <code>STOPPED</code>).</p> #[serde(rename = "stoppingAt")] #[serde(skip_serializing_if = "Option::is_none")] pub stopping_at: Option<f64>, /// <p>The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p> #[serde(rename = "tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<Vec<Tag>>, /// <p>The Amazon Resource Name (ARN) of the task.</p> #[serde(rename = "taskArn")] #[serde(skip_serializing_if = "Option::is_none")] pub task_arn: Option<String>, /// <p>The ARN of the task definition that creates the task.</p> #[serde(rename = "taskDefinitionArn")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition_arn: Option<String>, /// <p>The version counter for the task. Every time a task experiences a change that triggers a CloudWatch event, the version counter is incremented. If you are replicating your Amazon ECS task state with CloudWatch Events, you can compare the version of a task reported by the Amazon ECS API actionss with the version reported in CloudWatch Events for the task (inside the <code>detail</code> object) to verify that the version in your event stream is current.</p> #[serde(rename = "version")] #[serde(skip_serializing_if = "Option::is_none")] pub version: Option<i64>, } /// <p>The details of a task definition which describes the container and volume definitions of an Amazon Elastic Container Service task. You can specify which Docker images to use, the required resources, and other configurations related to launching the task definition through an Amazon ECS service or task.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct TaskDefinition { /// <p>The launch type to use with your task. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS Launch Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "compatibilities")] #[serde(skip_serializing_if = "Option::is_none")] pub compatibilities: Option<Vec<String>>, /// <p>A list of container definitions in JSON format that describe the different containers that make up your task. For more information about container definition parameters and defaults, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Amazon ECS Task Definitions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "containerDefinitions")] #[serde(skip_serializing_if = "Option::is_none")] pub container_definitions: Option<Vec<ContainerDefinition>>, /// <p><p>The number of <code>cpu</code> units used by the task. If you are using the EC2 launch type, this field is optional and any value can be used. If you are using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the <code>memory</code> parameter:</p> <ul> <li> <p>256 (.25 vCPU) - Available <code>memory</code> values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)</p> </li> <li> <p>512 (.5 vCPU) - Available <code>memory</code> values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)</p> </li> <li> <p>1024 (1 vCPU) - Available <code>memory</code> values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)</p> </li> <li> <p>2048 (2 vCPU) - Available <code>memory</code> values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)</p> </li> <li> <p>4096 (4 vCPU) - Available <code>memory</code> values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)</p> </li> </ul></p> #[serde(rename = "cpu")] #[serde(skip_serializing_if = "Option::is_none")] pub cpu: Option<String>, /// <p>The Amazon Resource Name (ARN) of the task execution role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role.</p> #[serde(rename = "executionRoleArn")] #[serde(skip_serializing_if = "Option::is_none")] pub execution_role_arn: Option<String>, /// <p>The name of a family that this task definition is registered to. A family groups multiple versions of a task definition. Amazon ECS gives the first task definition that you registered to a family a revision number of 1. Amazon ECS gives sequential revision numbers to each task definition that you add.</p> #[serde(rename = "family")] #[serde(skip_serializing_if = "Option::is_none")] pub family: Option<String>, /// <p><p>The IPC resource namespace to use for the containers in the task. The valid values are <code>host</code>, <code>task</code>, or <code>none</code>. If <code>host</code> is specified, then all containers within the tasks that specified the <code>host</code> IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If <code>task</code> is specified, all containers within the specified task share the same IPC resources. If <code>none</code> is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see <a href="https://docs.docker.com/engine/reference/run/#ipc-settings---ipc">IPC settings</a> in the <i>Docker run reference</i>.</p> <p>If the <code>host</code> IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose. For more information, see <a href="https://docs.docker.com/engine/security/security/">Docker security</a>.</p> <p>If you are setting namespaced kernel parameters using <code>systemControls</code> for the containers in the task, the following will apply to your IPC resource namespace. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html">System Controls</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <ul> <li> <p>For tasks that use the <code>host</code> IPC mode, IPC namespace related <code>systemControls</code> are not supported.</p> </li> <li> <p>For tasks that use the <code>task</code> IPC mode, IPC namespace related <code>systemControls</code> will apply to all containers within a task.</p> </li> </ul> <note> <p>This parameter is not supported for Windows containers or tasks using the Fargate launch type.</p> </note></p> #[serde(rename = "ipcMode")] #[serde(skip_serializing_if = "Option::is_none")] pub ipc_mode: Option<String>, /// <p><p>The amount (in MiB) of memory used by the task. If using the EC2 launch type, this field is optional and any value can be used. If using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the <code>cpu</code> parameter:</p> <ul> <li> <p>512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available <code>cpu</code> values: 256 (.25 vCPU)</p> </li> <li> <p>1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available <code>cpu</code> values: 512 (.5 vCPU)</p> </li> <li> <p>2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available <code>cpu</code> values: 1024 (1 vCPU)</p> </li> <li> <p>Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 2048 (2 vCPU)</p> </li> <li> <p>Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available <code>cpu</code> values: 4096 (4 vCPU)</p> </li> </ul></p> #[serde(rename = "memory")] #[serde(skip_serializing_if = "Option::is_none")] pub memory: Option<String>, /// <p>The Docker networking mode to use for the containers in the task. The valid values are <code>none</code>, <code>bridge</code>, <code>awsvpc</code>, and <code>host</code>. The default Docker network mode is <code>bridge</code>. If you are using the Fargate launch type, the <code>awsvpc</code> network mode is required. If you are using the EC2 launch type, any network mode can be used. If the network mode is set to <code>none</code>, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The <code>host</code> and <code>awsvpc</code> network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the <code>bridge</code> mode.</p> <p>With the <code>host</code> and <code>awsvpc</code> network modes, exposed container ports are mapped directly to the corresponding host port (for the <code>host</code> network mode) or the attached elastic network interface port (for the <code>awsvpc</code> network mode), so you cannot take advantage of dynamic host port mappings. </p> <p>If the network mode is <code>awsvpc</code>, the task is allocated an elastic network interface, and you must specify a <a>NetworkConfiguration</a> value when you create a service or run a task with the task definition. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <note> <p>Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with the <code>ecs-init</code> package, or AWS Fargate infrastructure support the <code>awsvpc</code> network mode. </p> </note> <p>If the network mode is <code>host</code>, you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.</p> <p>Docker for Windows uses different network modes than Docker for Linux. When you register a task definition with Windows containers, you must not specify a network mode. If you use the console to register a task definition with Windows containers, you must choose the <code><default></code> network mode object. </p> <p>For more information, see <a href="https://docs.docker.com/engine/reference/run/#network-settings">Network settings</a> in the <i>Docker run reference</i>.</p> #[serde(rename = "networkMode")] #[serde(skip_serializing_if = "Option::is_none")] pub network_mode: Option<String>, /// <p><p>The process namespace to use for the containers in the task. The valid values are <code>host</code> or <code>task</code>. If <code>host</code> is specified, then all containers within the tasks that specified the <code>host</code> PID mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If <code>task</code> is specified, all containers within the specified task share the same process namespace. If no value is specified, the default is a private namespace. For more information, see <a href="https://docs.docker.com/engine/reference/run/#pid-settings---pid">PID settings</a> in the <i>Docker run reference</i>.</p> <p>If the <code>host</code> PID mode is used, be aware that there is a heightened risk of undesired process namespace expose. For more information, see <a href="https://docs.docker.com/engine/security/security/">Docker security</a>.</p> <note> <p>This parameter is not supported for Windows containers or tasks using the Fargate launch type.</p> </note></p> #[serde(rename = "pidMode")] #[serde(skip_serializing_if = "Option::is_none")] pub pid_mode: Option<String>, /// <p>An array of placement constraint objects to use for tasks. This field is not valid if you are using the Fargate launch type for your task.</p> #[serde(rename = "placementConstraints")] #[serde(skip_serializing_if = "Option::is_none")] pub placement_constraints: Option<Vec<TaskDefinitionPlacementConstraint>>, /// <p>The configuration details for the App Mesh proxy.</p> <p>Your Amazon ECS container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the <code>ecs-init</code> package to enable a proxy configuration. If your container instances are launched from the Amazon ECS-optimized AMI version <code>20190301</code> or later, then they contain the required versions of the container agent and <code>ecs-init</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html">Amazon ECS-optimized Linux AMI</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "proxyConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub proxy_configuration: Option<ProxyConfiguration>, /// <p>The container instance attributes required by your task. This field is not valid if you are using the Fargate launch type for your task.</p> #[serde(rename = "requiresAttributes")] #[serde(skip_serializing_if = "Option::is_none")] pub requires_attributes: Option<Vec<Attribute>>, /// <p>The launch type the task requires. If no value is specified, it will default to <code>EC2</code>. Valid values include <code>EC2</code> and <code>FARGATE</code>.</p> #[serde(rename = "requiresCompatibilities")] #[serde(skip_serializing_if = "Option::is_none")] pub requires_compatibilities: Option<Vec<String>>, /// <p>The revision of the task in a particular family. The revision is a version number of a task definition in a family. When you register a task definition for the first time, the revision is <code>1</code>. Each time that you register a new revision of a task definition in the same family, the revision value always increases by one, even if you have deregistered previous revisions in this family.</p> #[serde(rename = "revision")] #[serde(skip_serializing_if = "Option::is_none")] pub revision: Option<i64>, /// <p>The status of the task definition.</p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The full Amazon Resource Name (ARN) of the task definition.</p> #[serde(rename = "taskDefinitionArn")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition_arn: Option<String>, /// <p>The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that grants containers in the task permission to call AWS APIs on your behalf. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_IAM_role.html">Amazon ECS Task Role</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>IAM roles for tasks on Windows require that the <code>-EnableTaskIAMRole</code> option is set when you launch the Amazon ECS-optimized Windows AMI. Your containers must also run some configuration code in order to take advantage of the feature. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html">Windows IAM Roles for Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "taskRoleArn")] #[serde(skip_serializing_if = "Option::is_none")] pub task_role_arn: Option<String>, /// <p>The list of volume definitions for the task.</p> <p>If your tasks are using the Fargate launch type, the <code>host</code> and <code>sourcePath</code> parameters are not supported.</p> <p>For more information about volume definition parameters and defaults, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html">Amazon ECS Task Definitions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "volumes")] #[serde(skip_serializing_if = "Option::is_none")] pub volumes: Option<Vec<Volume>>, } /// <p>An object representing a constraint on task placement in the task definition.</p> <p>If you are using the Fargate launch type, task placement constraints are not supported.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html">Task Placement Constraints</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TaskDefinitionPlacementConstraint { /// <p>A cluster query language expression to apply to the constraint. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster Query Language</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "expression")] #[serde(skip_serializing_if = "Option::is_none")] pub expression: Option<String>, /// <p>The type of constraint. The <code>DistinctInstance</code> constraint ensures that each task in a particular group is running on a different container instance. The <code>MemberOf</code> constraint restricts selection to be from a group of valid candidates.</p> #[serde(rename = "type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<String>, } /// <p>The overrides associated with a task.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct TaskOverride { /// <p>One or more container overrides sent to a task.</p> #[serde(rename = "containerOverrides")] #[serde(skip_serializing_if = "Option::is_none")] pub container_overrides: Option<Vec<ContainerOverride>>, /// <p>The Amazon Resource Name (ARN) of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.</p> #[serde(rename = "executionRoleArn")] #[serde(skip_serializing_if = "Option::is_none")] pub execution_role_arn: Option<String>, /// <p>The Amazon Resource Name (ARN) of the IAM role that containers in this task can assume. All containers in this task are granted the permissions that are specified in this role.</p> #[serde(rename = "taskRoleArn")] #[serde(skip_serializing_if = "Option::is_none")] pub task_role_arn: Option<String>, } /// <p>Information about a set of Amazon ECS tasks in either an AWS CodeDeploy or an <code>EXTERNAL</code> deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct TaskSet { /// <p>The Amazon Resource Name (ARN) of the cluster that the service that hosts the task set exists in.</p> #[serde(rename = "clusterArn")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster_arn: Option<String>, /// <p>The computed desired count for the task set. This is calculated by multiplying the service's <code>desiredCount</code> by the task set's <code>scale</code> percentage. The result is always rounded up. For example, if the computed desired count is 1.2, it rounds up to 2 tasks.</p> #[serde(rename = "computedDesiredCount")] #[serde(skip_serializing_if = "Option::is_none")] pub computed_desired_count: Option<i64>, /// <p>The Unix timestamp for when the task set was created.</p> #[serde(rename = "createdAt")] #[serde(skip_serializing_if = "Option::is_none")] pub created_at: Option<f64>, /// <p>The external ID associated with the task set.</p> <p>If a task set is created by an AWS CodeDeploy deployment, the <code>externalId</code> parameter contains the AWS CodeDeploy deployment ID.</p> <p>If a task set is created for an external deployment and is associated with a service discovery registry, the <code>externalId</code> parameter contains the <code>ECS_TASK_SET_EXTERNAL_ID</code> AWS Cloud Map attribute.</p> #[serde(rename = "externalId")] #[serde(skip_serializing_if = "Option::is_none")] pub external_id: Option<String>, /// <p>The ID of the task set.</p> #[serde(rename = "id")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>The launch type the tasks in the task set are using. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html">Amazon ECS Launch Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "launchType")] #[serde(skip_serializing_if = "Option::is_none")] pub launch_type: Option<String>, /// <p>Details on a load balancer that is used with a task set.</p> #[serde(rename = "loadBalancers")] #[serde(skip_serializing_if = "Option::is_none")] pub load_balancers: Option<Vec<LoadBalancer>>, /// <p>The network configuration for the task set.</p> #[serde(rename = "networkConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub network_configuration: Option<NetworkConfiguration>, /// <p>The number of tasks in the task set that are in the <code>PENDING</code> status during a deployment. A task in the <code>PENDING</code> state is preparing to enter the <code>RUNNING</code> state. A task set enters the <code>PENDING</code> status when it launches for the first time or when it is restarted after being in the <code>STOPPED</code> state.</p> #[serde(rename = "pendingCount")] #[serde(skip_serializing_if = "Option::is_none")] pub pending_count: Option<i64>, /// <p>The platform version on which the tasks in the task set are running. A platform version is only specified for tasks using the Fargate launch type. If one is not specified, the <code>LATEST</code> platform version is used by default. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">AWS Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "platformVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub platform_version: Option<String>, /// <p>The number of tasks in the task set that are in the <code>RUNNING</code> status during a deployment. A task in the <code>RUNNING</code> state is running and ready for use.</p> #[serde(rename = "runningCount")] #[serde(skip_serializing_if = "Option::is_none")] pub running_count: Option<i64>, /// <p>A floating-point percentage of the desired number of tasks to place and keep running in the task set.</p> #[serde(rename = "scale")] #[serde(skip_serializing_if = "Option::is_none")] pub scale: Option<Scale>, /// <p>The Amazon Resource Name (ARN) of the service the task set exists in.</p> #[serde(rename = "serviceArn")] #[serde(skip_serializing_if = "Option::is_none")] pub service_arn: Option<String>, /// <p>The details of the service discovery registries to assign to this task set. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html">Service Discovery</a>.</p> #[serde(rename = "serviceRegistries")] #[serde(skip_serializing_if = "Option::is_none")] pub service_registries: Option<Vec<ServiceRegistry>>, /// <p>The stability status, which indicates whether the task set has reached a steady state. If the following conditions are met, the task set will be in <code>STEADY_STATE</code>:</p> <ul> <li> <p>The task <code>runningCount</code> is equal to the <code>computedDesiredCount</code>.</p> </li> <li> <p>The <code>pendingCount</code> is <code>0</code>.</p> </li> <li> <p>There are no tasks running on container instances in the <code>DRAINING</code> status.</p> </li> <li> <p>All tasks are reporting a healthy status from the load balancers, service discovery, and container health checks.</p> <note> <p>If a <code>healthCheckGracePeriodSeconds</code> value was set when the service was created, you may see a <code>STEADY_STATE</code> reached since unhealthy Elastic Load Balancing target health checks will be ignored until it expires.</p> </note> </li> </ul> <p>If any of those conditions are not met, the stability status returns <code>STABILIZING</code>.</p> #[serde(rename = "stabilityStatus")] #[serde(skip_serializing_if = "Option::is_none")] pub stability_status: Option<String>, /// <p>The Unix timestamp for when the task set stability status was retrieved.</p> #[serde(rename = "stabilityStatusAt")] #[serde(skip_serializing_if = "Option::is_none")] pub stability_status_at: Option<f64>, /// <p>The tag specified when a task set is started. If the task set is created by an AWS CodeDeploy deployment, the <code>startedBy</code> parameter is <code>CODE_DEPLOY</code>. For a task set created for an external deployment, the startedBy field isn't used.</p> #[serde(rename = "startedBy")] #[serde(skip_serializing_if = "Option::is_none")] pub started_by: Option<String>, /// <p><p>The status of the task set. The following describes each state:</p> <dl> <dt>PRIMARY</dt> <dd> <p>The task set is serving production traffic.</p> </dd> <dt>ACTIVE</dt> <dd> <p>The task set is not serving production traffic.</p> </dd> <dt>DRAINING</dt> <dd> <p>The tasks in the task set are being stopped and their corresponding targets are being deregistered from their target group.</p> </dd> </dl></p> #[serde(rename = "status")] #[serde(skip_serializing_if = "Option::is_none")] pub status: Option<String>, /// <p>The task definition the task set is using.</p> #[serde(rename = "taskDefinition")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition: Option<String>, /// <p>The Amazon Resource Name (ARN) of the task set.</p> #[serde(rename = "taskSetArn")] #[serde(skip_serializing_if = "Option::is_none")] pub task_set_arn: Option<String>, /// <p>The Unix timestamp for when the task set was last updated.</p> #[serde(rename = "updatedAt")] #[serde(skip_serializing_if = "Option::is_none")] pub updated_at: Option<f64>, } /// <p>The container path, mount options, and size of the tmpfs mount.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Tmpfs { /// <p>The absolute file path where the tmpfs volume is to be mounted.</p> #[serde(rename = "containerPath")] pub container_path: String, /// <p>The list of tmpfs volume mount options.</p> <p>Valid values: <code>"defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "mpol"</code> </p> #[serde(rename = "mountOptions")] #[serde(skip_serializing_if = "Option::is_none")] pub mount_options: Option<Vec<String>>, /// <p>The size (in MiB) of the tmpfs volume.</p> #[serde(rename = "size")] pub size: i64, } /// <p>The <code>ulimit</code> settings to pass to the container.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Ulimit { /// <p>The hard limit for the ulimit type.</p> #[serde(rename = "hardLimit")] pub hard_limit: i64, /// <p>The <code>type</code> of the <code>ulimit</code>.</p> #[serde(rename = "name")] pub name: String, /// <p>The soft limit for the ulimit type.</p> #[serde(rename = "softLimit")] pub soft_limit: i64, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UntagResourceRequest { /// <p>The Amazon Resource Name (ARN) of the resource from which to delete tags. Currently, the supported resources are Amazon ECS tasks, services, task definitions, clusters, and container instances.</p> #[serde(rename = "resourceArn")] pub resource_arn: String, /// <p>The keys of the tags to be removed.</p> #[serde(rename = "tagKeys")] pub tag_keys: Vec<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct UntagResourceResponse {} #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UpdateContainerAgentRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that your container instance is running on. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>The container instance ID or full ARN entries for the container instance on which you would like to update the Amazon ECS container agent.</p> #[serde(rename = "containerInstance")] pub container_instance: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct UpdateContainerAgentResponse { /// <p>The container instance for which the container agent was updated.</p> #[serde(rename = "containerInstance")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instance: Option<ContainerInstance>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UpdateContainerInstancesStateRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instance to update. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>A list of container instance IDs or full ARN entries.</p> #[serde(rename = "containerInstances")] pub container_instances: Vec<String>, /// <p>The container instance state with which to update the container instance. The only valid values for this action are <code>ACTIVE</code> and <code>DRAINING</code>. A container instance can only be updated to <code>DRAINING</code> status once it has reached an <code>ACTIVE</code> state. If a container instance is in <code>REGISTERING</code>, <code>DEREGISTERING</code>, or <code>REGISTRATION_FAILED</code> state you can describe the container instance but will be unable to update the container instance state.</p> #[serde(rename = "status")] pub status: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct UpdateContainerInstancesStateResponse { /// <p>The list of container instances.</p> #[serde(rename = "containerInstances")] #[serde(skip_serializing_if = "Option::is_none")] pub container_instances: Option<Vec<ContainerInstance>>, /// <p>Any failures associated with the call.</p> #[serde(rename = "failures")] #[serde(skip_serializing_if = "Option::is_none")] pub failures: Option<Vec<Failure>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UpdateServicePrimaryTaskSetRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.</p> #[serde(rename = "cluster")] pub cluster: String, /// <p>The short name or full Amazon Resource Name (ARN) of the task set to set as the primary task set in the deployment.</p> #[serde(rename = "primaryTaskSet")] pub primary_task_set: String, /// <p>The short name or full Amazon Resource Name (ARN) of the service that the task set exists in.</p> #[serde(rename = "service")] pub service: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct UpdateServicePrimaryTaskSetResponse { #[serde(rename = "taskSet")] #[serde(skip_serializing_if = "Option::is_none")] pub task_set: Option<TaskSet>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UpdateServiceRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that your service is running on. If you do not specify a cluster, the default cluster is assumed.</p> #[serde(rename = "cluster")] #[serde(skip_serializing_if = "Option::is_none")] pub cluster: Option<String>, /// <p>Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.</p> #[serde(rename = "deploymentConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub deployment_configuration: Option<DeploymentConfiguration>, /// <p>The number of instantiations of the task to place and keep running in your service.</p> #[serde(rename = "desiredCount")] #[serde(skip_serializing_if = "Option::is_none")] pub desired_count: Option<i64>, /// <p>Whether to force a new deployment of the service. Deployments are not forced by default. You can use this option to trigger a new deployment with no service definition changes. For example, you can update a service's tasks to use a newer Docker image with the same image/tag combination (<code>my_image:latest</code>) or to roll Fargate tasks onto a newer platform version.</p> #[serde(rename = "forceNewDeployment")] #[serde(skip_serializing_if = "Option::is_none")] pub force_new_deployment: Option<bool>, /// <p>The period of time, in seconds, that the Amazon ECS service scheduler should ignore unhealthy Elastic Load Balancing target health checks after a task has first started. This is only valid if your service is configured to use a load balancer. If your service's tasks take a while to start and respond to Elastic Load Balancing health checks, you can specify a health check grace period of up to 1,800 seconds. During that time, the ECS service scheduler ignores the Elastic Load Balancing health check status. This grace period can prevent the ECS service scheduler from marking tasks as unhealthy and stopping them before they have time to come up.</p> #[serde(rename = "healthCheckGracePeriodSeconds")] #[serde(skip_serializing_if = "Option::is_none")] pub health_check_grace_period_seconds: Option<i64>, /// <p><p>The network configuration for the service. This parameter is required for task definitions that use the <code>awsvpc</code> network mode to receive their own elastic network interface, and it is not supported for other network modes. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <note> <p>Updating a service to add a subnet to a list of existing subnets does not trigger a service deployment. For example, if your network configuration change is to keep the existing subnets and simply add another subnet to the network configuration, this does not trigger a new service deployment.</p> </note></p> #[serde(rename = "networkConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub network_configuration: Option<NetworkConfiguration>, /// <p>The platform version on which your tasks in the service are running. A platform version is only specified for tasks using the Fargate launch type. If one is not specified, the <code>LATEST</code> platform version is used by default. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html">AWS Fargate Platform Versions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> #[serde(rename = "platformVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub platform_version: Option<String>, /// <p>The name of the service to update.</p> #[serde(rename = "service")] pub service: String, /// <p>The <code>family</code> and <code>revision</code> (<code>family:revision</code>) or full ARN of the task definition to run in your service. If a <code>revision</code> is not specified, the latest <code>ACTIVE</code> revision is used. If you modify the task definition with <code>UpdateService</code>, Amazon ECS spawns a task with the new version of the task definition and then stops an old task after the new version is running.</p> #[serde(rename = "taskDefinition")] #[serde(skip_serializing_if = "Option::is_none")] pub task_definition: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct UpdateServiceResponse { /// <p>The full description of your service following the update call.</p> #[serde(rename = "service")] #[serde(skip_serializing_if = "Option::is_none")] pub service: Option<Service>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UpdateTaskSetRequest { /// <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.</p> #[serde(rename = "cluster")] pub cluster: String, #[serde(rename = "scale")] pub scale: Scale, /// <p>The short name or full Amazon Resource Name (ARN) of the service that the task set exists in.</p> #[serde(rename = "service")] pub service: String, /// <p>The short name or full Amazon Resource Name (ARN) of the task set to update.</p> #[serde(rename = "taskSet")] pub task_set: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct UpdateTaskSetResponse { #[serde(rename = "taskSet")] #[serde(skip_serializing_if = "Option::is_none")] pub task_set: Option<TaskSet>, } /// <p>The Docker and Amazon ECS container agent version information about a container instance.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct VersionInfo { /// <p>The Git commit hash for the Amazon ECS container agent build on the <a href="https://github.com/aws/amazon-ecs-agent/commits/master">amazon-ecs-agent </a> GitHub repository.</p> #[serde(rename = "agentHash")] #[serde(skip_serializing_if = "Option::is_none")] pub agent_hash: Option<String>, /// <p>The version number of the Amazon ECS container agent.</p> #[serde(rename = "agentVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub agent_version: Option<String>, /// <p>The Docker version running on the container instance.</p> #[serde(rename = "dockerVersion")] #[serde(skip_serializing_if = "Option::is_none")] pub docker_version: Option<String>, } /// <p>A data volume used in a task definition. For tasks that use a Docker volume, specify a <code>DockerVolumeConfiguration</code>. For tasks that use a bind mount host volume, specify a <code>host</code> and optional <code>sourcePath</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html">Using Data Volumes in Tasks</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Volume { /// <p>This parameter is specified when you are using Docker volumes. Docker volumes are only supported when you are using the EC2 launch type. Windows containers only support the use of the <code>local</code> driver. To use bind mounts, specify a <code>host</code> instead.</p> #[serde(rename = "dockerVolumeConfiguration")] #[serde(skip_serializing_if = "Option::is_none")] pub docker_volume_configuration: Option<DockerVolumeConfiguration>, /// <p>This parameter is specified when you are using bind mount host volumes. Bind mount host volumes are supported when you are using either the EC2 or Fargate launch types. The contents of the <code>host</code> parameter determine whether your bind mount host volume persists on the host container instance and where it is stored. If the <code>host</code> parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data is not guaranteed to persist after the containers associated with it stop running.</p> <p>Windows containers can mount whole directories on the same drive as <code>$env:ProgramData</code>. Windows containers cannot mount directories on a different drive, and mount point cannot be across drives. For example, you can mount <code>C:\my\path:C:\my\path</code> and <code>D:\:D:\</code>, but not <code>D:\my\path:C:\my\path</code> or <code>D:\:C:\my\path</code>.</p> #[serde(rename = "host")] #[serde(skip_serializing_if = "Option::is_none")] pub host: Option<HostVolumeProperties>, /// <p>The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. This name is referenced in the <code>sourceVolume</code> parameter of container definition <code>mountPoints</code>.</p> #[serde(rename = "name")] #[serde(skip_serializing_if = "Option::is_none")] pub name: Option<String>, } /// <p>Details on a data volume from another container in the same task definition.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct VolumeFrom { /// <p>If this value is <code>true</code>, the container has read-only access to the volume. If this value is <code>false</code>, then the container can write to the volume. The default value is <code>false</code>.</p> #[serde(rename = "readOnly")] #[serde(skip_serializing_if = "Option::is_none")] pub read_only: Option<bool>, /// <p>The name of another container within the same task definition from which to mount volumes.</p> #[serde(rename = "sourceContainer")] #[serde(skip_serializing_if = "Option::is_none")] pub source_container: Option<String>, } /// Errors returned by CreateCluster #[derive(Debug, PartialEq)] pub enum CreateClusterError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl CreateClusterError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateClusterError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(CreateClusterError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(CreateClusterError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(CreateClusterError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CreateClusterError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CreateClusterError { fn description(&self) -> &str { match *self { CreateClusterError::Client(ref cause) => cause, CreateClusterError::InvalidParameter(ref cause) => cause, CreateClusterError::Server(ref cause) => cause, } } } /// Errors returned by CreateService #[derive(Debug, PartialEq)] pub enum CreateServiceError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>The specified platform version does not satisfy the task definition's required capabilities.</p> PlatformTaskDefinitionIncompatibility(String), /// <p>The specified platform version does not exist.</p> PlatformUnknown(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified task is not supported in this Region.</p> UnsupportedFeature(String), } impl CreateServiceError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateServiceError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(CreateServiceError::AccessDenied(err.msg)) } "ClientException" => { return RusotoError::Service(CreateServiceError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(CreateServiceError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(CreateServiceError::InvalidParameter(err.msg)) } "PlatformTaskDefinitionIncompatibilityException" => { return RusotoError::Service( CreateServiceError::PlatformTaskDefinitionIncompatibility(err.msg), ) } "PlatformUnknownException" => { return RusotoError::Service(CreateServiceError::PlatformUnknown(err.msg)) } "ServerException" => { return RusotoError::Service(CreateServiceError::Server(err.msg)) } "UnsupportedFeatureException" => { return RusotoError::Service(CreateServiceError::UnsupportedFeature(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CreateServiceError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CreateServiceError { fn description(&self) -> &str { match *self { CreateServiceError::AccessDenied(ref cause) => cause, CreateServiceError::Client(ref cause) => cause, CreateServiceError::ClusterNotFound(ref cause) => cause, CreateServiceError::InvalidParameter(ref cause) => cause, CreateServiceError::PlatformTaskDefinitionIncompatibility(ref cause) => cause, CreateServiceError::PlatformUnknown(ref cause) => cause, CreateServiceError::Server(ref cause) => cause, CreateServiceError::UnsupportedFeature(ref cause) => cause, } } } /// Errors returned by CreateTaskSet #[derive(Debug, PartialEq)] pub enum CreateTaskSetError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>The specified platform version does not satisfy the task definition's required capabilities.</p> PlatformTaskDefinitionIncompatibility(String), /// <p>The specified platform version does not exist.</p> PlatformUnknown(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified service is not active. You can't update a service that is inactive. If you have previously deleted a service, you can re-create it with <a>CreateService</a>.</p> ServiceNotActive(String), /// <p>The specified service could not be found. You can view your available services with <a>ListServices</a>. Amazon ECS services are cluster-specific and Region-specific.</p> ServiceNotFound(String), /// <p>The specified task is not supported in this Region.</p> UnsupportedFeature(String), } impl CreateTaskSetError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTaskSetError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(CreateTaskSetError::AccessDenied(err.msg)) } "ClientException" => { return RusotoError::Service(CreateTaskSetError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(CreateTaskSetError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(CreateTaskSetError::InvalidParameter(err.msg)) } "PlatformTaskDefinitionIncompatibilityException" => { return RusotoError::Service( CreateTaskSetError::PlatformTaskDefinitionIncompatibility(err.msg), ) } "PlatformUnknownException" => { return RusotoError::Service(CreateTaskSetError::PlatformUnknown(err.msg)) } "ServerException" => { return RusotoError::Service(CreateTaskSetError::Server(err.msg)) } "ServiceNotActiveException" => { return RusotoError::Service(CreateTaskSetError::ServiceNotActive(err.msg)) } "ServiceNotFoundException" => { return RusotoError::Service(CreateTaskSetError::ServiceNotFound(err.msg)) } "UnsupportedFeatureException" => { return RusotoError::Service(CreateTaskSetError::UnsupportedFeature(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CreateTaskSetError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CreateTaskSetError { fn description(&self) -> &str { match *self { CreateTaskSetError::AccessDenied(ref cause) => cause, CreateTaskSetError::Client(ref cause) => cause, CreateTaskSetError::ClusterNotFound(ref cause) => cause, CreateTaskSetError::InvalidParameter(ref cause) => cause, CreateTaskSetError::PlatformTaskDefinitionIncompatibility(ref cause) => cause, CreateTaskSetError::PlatformUnknown(ref cause) => cause, CreateTaskSetError::Server(ref cause) => cause, CreateTaskSetError::ServiceNotActive(ref cause) => cause, CreateTaskSetError::ServiceNotFound(ref cause) => cause, CreateTaskSetError::UnsupportedFeature(ref cause) => cause, } } } /// Errors returned by DeleteAccountSetting #[derive(Debug, PartialEq)] pub enum DeleteAccountSettingError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DeleteAccountSettingError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAccountSettingError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DeleteAccountSettingError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DeleteAccountSettingError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(DeleteAccountSettingError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteAccountSettingError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteAccountSettingError { fn description(&self) -> &str { match *self { DeleteAccountSettingError::Client(ref cause) => cause, DeleteAccountSettingError::InvalidParameter(ref cause) => cause, DeleteAccountSettingError::Server(ref cause) => cause, } } } /// Errors returned by DeleteAttributes #[derive(Debug, PartialEq)] pub enum DeleteAttributesError { /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>The specified target could not be found. You can view your available container instances with <a>ListContainerInstances</a>. Amazon ECS container instances are cluster-specific and Region-specific.</p> TargetNotFound(String), } impl DeleteAttributesError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAttributesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClusterNotFoundException" => { return RusotoError::Service(DeleteAttributesError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DeleteAttributesError::InvalidParameter(err.msg)) } "TargetNotFoundException" => { return RusotoError::Service(DeleteAttributesError::TargetNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteAttributesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteAttributesError { fn description(&self) -> &str { match *self { DeleteAttributesError::ClusterNotFound(ref cause) => cause, DeleteAttributesError::InvalidParameter(ref cause) => cause, DeleteAttributesError::TargetNotFound(ref cause) => cause, } } } /// Errors returned by DeleteCluster #[derive(Debug, PartialEq)] pub enum DeleteClusterError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>You cannot delete a cluster that has registered container instances. First, deregister the container instances before you can delete the cluster. For more information, see <a>DeregisterContainerInstance</a>.</p> ClusterContainsContainerInstances(String), /// <p>You cannot delete a cluster that contains services. First, update the service to reduce its desired task count to 0 and then delete the service. For more information, see <a>UpdateService</a> and <a>DeleteService</a>.</p> ClusterContainsServices(String), /// <p>You cannot delete a cluster that has active tasks.</p> ClusterContainsTasks(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DeleteClusterError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteClusterError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DeleteClusterError::Client(err.msg)) } "ClusterContainsContainerInstancesException" => { return RusotoError::Service( DeleteClusterError::ClusterContainsContainerInstances(err.msg), ) } "ClusterContainsServicesException" => { return RusotoError::Service(DeleteClusterError::ClusterContainsServices( err.msg, )) } "ClusterContainsTasksException" => { return RusotoError::Service(DeleteClusterError::ClusterContainsTasks(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(DeleteClusterError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DeleteClusterError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(DeleteClusterError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteClusterError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteClusterError { fn description(&self) -> &str { match *self { DeleteClusterError::Client(ref cause) => cause, DeleteClusterError::ClusterContainsContainerInstances(ref cause) => cause, DeleteClusterError::ClusterContainsServices(ref cause) => cause, DeleteClusterError::ClusterContainsTasks(ref cause) => cause, DeleteClusterError::ClusterNotFound(ref cause) => cause, DeleteClusterError::InvalidParameter(ref cause) => cause, DeleteClusterError::Server(ref cause) => cause, } } } /// Errors returned by DeleteService #[derive(Debug, PartialEq)] pub enum DeleteServiceError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified service could not be found. You can view your available services with <a>ListServices</a>. Amazon ECS services are cluster-specific and Region-specific.</p> ServiceNotFound(String), } impl DeleteServiceError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteServiceError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DeleteServiceError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(DeleteServiceError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DeleteServiceError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(DeleteServiceError::Server(err.msg)) } "ServiceNotFoundException" => { return RusotoError::Service(DeleteServiceError::ServiceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteServiceError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteServiceError { fn description(&self) -> &str { match *self { DeleteServiceError::Client(ref cause) => cause, DeleteServiceError::ClusterNotFound(ref cause) => cause, DeleteServiceError::InvalidParameter(ref cause) => cause, DeleteServiceError::Server(ref cause) => cause, DeleteServiceError::ServiceNotFound(ref cause) => cause, } } } /// Errors returned by DeleteTaskSet #[derive(Debug, PartialEq)] pub enum DeleteTaskSetError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified service is not active. You can't update a service that is inactive. If you have previously deleted a service, you can re-create it with <a>CreateService</a>.</p> ServiceNotActive(String), /// <p>The specified service could not be found. You can view your available services with <a>ListServices</a>. Amazon ECS services are cluster-specific and Region-specific.</p> ServiceNotFound(String), /// <p>The specified task set could not be found. You can view your available container instances with <a>DescribeTaskSets</a>. Task sets are specific to each cluster, service and Region.</p> TaskSetNotFound(String), /// <p>The specified task is not supported in this Region.</p> UnsupportedFeature(String), } impl DeleteTaskSetError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTaskSetError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(DeleteTaskSetError::AccessDenied(err.msg)) } "ClientException" => { return RusotoError::Service(DeleteTaskSetError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(DeleteTaskSetError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DeleteTaskSetError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(DeleteTaskSetError::Server(err.msg)) } "ServiceNotActiveException" => { return RusotoError::Service(DeleteTaskSetError::ServiceNotActive(err.msg)) } "ServiceNotFoundException" => { return RusotoError::Service(DeleteTaskSetError::ServiceNotFound(err.msg)) } "TaskSetNotFoundException" => { return RusotoError::Service(DeleteTaskSetError::TaskSetNotFound(err.msg)) } "UnsupportedFeatureException" => { return RusotoError::Service(DeleteTaskSetError::UnsupportedFeature(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteTaskSetError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteTaskSetError { fn description(&self) -> &str { match *self { DeleteTaskSetError::AccessDenied(ref cause) => cause, DeleteTaskSetError::Client(ref cause) => cause, DeleteTaskSetError::ClusterNotFound(ref cause) => cause, DeleteTaskSetError::InvalidParameter(ref cause) => cause, DeleteTaskSetError::Server(ref cause) => cause, DeleteTaskSetError::ServiceNotActive(ref cause) => cause, DeleteTaskSetError::ServiceNotFound(ref cause) => cause, DeleteTaskSetError::TaskSetNotFound(ref cause) => cause, DeleteTaskSetError::UnsupportedFeature(ref cause) => cause, } } } /// Errors returned by DeregisterContainerInstance #[derive(Debug, PartialEq)] pub enum DeregisterContainerInstanceError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DeregisterContainerInstanceError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<DeregisterContainerInstanceError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DeregisterContainerInstanceError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(DeregisterContainerInstanceError::ClusterNotFound( err.msg, )) } "InvalidParameterException" => { return RusotoError::Service( DeregisterContainerInstanceError::InvalidParameter(err.msg), ) } "ServerException" => { return RusotoError::Service(DeregisterContainerInstanceError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeregisterContainerInstanceError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeregisterContainerInstanceError { fn description(&self) -> &str { match *self { DeregisterContainerInstanceError::Client(ref cause) => cause, DeregisterContainerInstanceError::ClusterNotFound(ref cause) => cause, DeregisterContainerInstanceError::InvalidParameter(ref cause) => cause, DeregisterContainerInstanceError::Server(ref cause) => cause, } } } /// Errors returned by DeregisterTaskDefinition #[derive(Debug, PartialEq)] pub enum DeregisterTaskDefinitionError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DeregisterTaskDefinitionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeregisterTaskDefinitionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DeregisterTaskDefinitionError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DeregisterTaskDefinitionError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(DeregisterTaskDefinitionError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeregisterTaskDefinitionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeregisterTaskDefinitionError { fn description(&self) -> &str { match *self { DeregisterTaskDefinitionError::Client(ref cause) => cause, DeregisterTaskDefinitionError::InvalidParameter(ref cause) => cause, DeregisterTaskDefinitionError::Server(ref cause) => cause, } } } /// Errors returned by DescribeClusters #[derive(Debug, PartialEq)] pub enum DescribeClustersError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DescribeClustersError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeClustersError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DescribeClustersError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DescribeClustersError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(DescribeClustersError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeClustersError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeClustersError { fn description(&self) -> &str { match *self { DescribeClustersError::Client(ref cause) => cause, DescribeClustersError::InvalidParameter(ref cause) => cause, DescribeClustersError::Server(ref cause) => cause, } } } /// Errors returned by DescribeContainerInstances #[derive(Debug, PartialEq)] pub enum DescribeContainerInstancesError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DescribeContainerInstancesError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<DescribeContainerInstancesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DescribeContainerInstancesError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(DescribeContainerInstancesError::ClusterNotFound( err.msg, )) } "InvalidParameterException" => { return RusotoError::Service(DescribeContainerInstancesError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(DescribeContainerInstancesError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeContainerInstancesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeContainerInstancesError { fn description(&self) -> &str { match *self { DescribeContainerInstancesError::Client(ref cause) => cause, DescribeContainerInstancesError::ClusterNotFound(ref cause) => cause, DescribeContainerInstancesError::InvalidParameter(ref cause) => cause, DescribeContainerInstancesError::Server(ref cause) => cause, } } } /// Errors returned by DescribeServices #[derive(Debug, PartialEq)] pub enum DescribeServicesError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DescribeServicesError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeServicesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DescribeServicesError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(DescribeServicesError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DescribeServicesError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(DescribeServicesError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeServicesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeServicesError { fn description(&self) -> &str { match *self { DescribeServicesError::Client(ref cause) => cause, DescribeServicesError::ClusterNotFound(ref cause) => cause, DescribeServicesError::InvalidParameter(ref cause) => cause, DescribeServicesError::Server(ref cause) => cause, } } } /// Errors returned by DescribeTaskDefinition #[derive(Debug, PartialEq)] pub enum DescribeTaskDefinitionError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DescribeTaskDefinitionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTaskDefinitionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DescribeTaskDefinitionError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DescribeTaskDefinitionError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(DescribeTaskDefinitionError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeTaskDefinitionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeTaskDefinitionError { fn description(&self) -> &str { match *self { DescribeTaskDefinitionError::Client(ref cause) => cause, DescribeTaskDefinitionError::InvalidParameter(ref cause) => cause, DescribeTaskDefinitionError::Server(ref cause) => cause, } } } /// Errors returned by DescribeTaskSets #[derive(Debug, PartialEq)] pub enum DescribeTaskSetsError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified service is not active. You can't update a service that is inactive. If you have previously deleted a service, you can re-create it with <a>CreateService</a>.</p> ServiceNotActive(String), /// <p>The specified service could not be found. You can view your available services with <a>ListServices</a>. Amazon ECS services are cluster-specific and Region-specific.</p> ServiceNotFound(String), /// <p>The specified task is not supported in this Region.</p> UnsupportedFeature(String), } impl DescribeTaskSetsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTaskSetsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(DescribeTaskSetsError::AccessDenied(err.msg)) } "ClientException" => { return RusotoError::Service(DescribeTaskSetsError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(DescribeTaskSetsError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DescribeTaskSetsError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(DescribeTaskSetsError::Server(err.msg)) } "ServiceNotActiveException" => { return RusotoError::Service(DescribeTaskSetsError::ServiceNotActive(err.msg)) } "ServiceNotFoundException" => { return RusotoError::Service(DescribeTaskSetsError::ServiceNotFound(err.msg)) } "UnsupportedFeatureException" => { return RusotoError::Service(DescribeTaskSetsError::UnsupportedFeature(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeTaskSetsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeTaskSetsError { fn description(&self) -> &str { match *self { DescribeTaskSetsError::AccessDenied(ref cause) => cause, DescribeTaskSetsError::Client(ref cause) => cause, DescribeTaskSetsError::ClusterNotFound(ref cause) => cause, DescribeTaskSetsError::InvalidParameter(ref cause) => cause, DescribeTaskSetsError::Server(ref cause) => cause, DescribeTaskSetsError::ServiceNotActive(ref cause) => cause, DescribeTaskSetsError::ServiceNotFound(ref cause) => cause, DescribeTaskSetsError::UnsupportedFeature(ref cause) => cause, } } } /// Errors returned by DescribeTasks #[derive(Debug, PartialEq)] pub enum DescribeTasksError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DescribeTasksError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTasksError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DescribeTasksError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(DescribeTasksError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(DescribeTasksError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(DescribeTasksError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeTasksError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeTasksError { fn description(&self) -> &str { match *self { DescribeTasksError::Client(ref cause) => cause, DescribeTasksError::ClusterNotFound(ref cause) => cause, DescribeTasksError::InvalidParameter(ref cause) => cause, DescribeTasksError::Server(ref cause) => cause, } } } /// Errors returned by DiscoverPollEndpoint #[derive(Debug, PartialEq)] pub enum DiscoverPollEndpointError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl DiscoverPollEndpointError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DiscoverPollEndpointError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(DiscoverPollEndpointError::Client(err.msg)) } "ServerException" => { return RusotoError::Service(DiscoverPollEndpointError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DiscoverPollEndpointError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DiscoverPollEndpointError { fn description(&self) -> &str { match *self { DiscoverPollEndpointError::Client(ref cause) => cause, DiscoverPollEndpointError::Server(ref cause) => cause, } } } /// Errors returned by ListAccountSettings #[derive(Debug, PartialEq)] pub enum ListAccountSettingsError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl ListAccountSettingsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAccountSettingsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(ListAccountSettingsError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(ListAccountSettingsError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(ListAccountSettingsError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListAccountSettingsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListAccountSettingsError { fn description(&self) -> &str { match *self { ListAccountSettingsError::Client(ref cause) => cause, ListAccountSettingsError::InvalidParameter(ref cause) => cause, ListAccountSettingsError::Server(ref cause) => cause, } } } /// Errors returned by ListAttributes #[derive(Debug, PartialEq)] pub enum ListAttributesError { /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), } impl ListAttributesError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAttributesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClusterNotFoundException" => { return RusotoError::Service(ListAttributesError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(ListAttributesError::InvalidParameter(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListAttributesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListAttributesError { fn description(&self) -> &str { match *self { ListAttributesError::ClusterNotFound(ref cause) => cause, ListAttributesError::InvalidParameter(ref cause) => cause, } } } /// Errors returned by ListClusters #[derive(Debug, PartialEq)] pub enum ListClustersError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(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() { "ClientException" => { return RusotoError::Service(ListClustersError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(ListClustersError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(ListClustersError::Server(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::Client(ref cause) => cause, ListClustersError::InvalidParameter(ref cause) => cause, ListClustersError::Server(ref cause) => cause, } } } /// Errors returned by ListContainerInstances #[derive(Debug, PartialEq)] pub enum ListContainerInstancesError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl ListContainerInstancesError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListContainerInstancesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(ListContainerInstancesError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(ListContainerInstancesError::ClusterNotFound( err.msg, )) } "InvalidParameterException" => { return RusotoError::Service(ListContainerInstancesError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(ListContainerInstancesError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListContainerInstancesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListContainerInstancesError { fn description(&self) -> &str { match *self { ListContainerInstancesError::Client(ref cause) => cause, ListContainerInstancesError::ClusterNotFound(ref cause) => cause, ListContainerInstancesError::InvalidParameter(ref cause) => cause, ListContainerInstancesError::Server(ref cause) => cause, } } } /// Errors returned by ListServices #[derive(Debug, PartialEq)] pub enum ListServicesError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl ListServicesError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListServicesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(ListServicesError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(ListServicesError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(ListServicesError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(ListServicesError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListServicesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListServicesError { fn description(&self) -> &str { match *self { ListServicesError::Client(ref cause) => cause, ListServicesError::ClusterNotFound(ref cause) => cause, ListServicesError::InvalidParameter(ref cause) => cause, ListServicesError::Server(ref cause) => cause, } } } /// Errors returned by ListTagsForResource #[derive(Debug, PartialEq)] pub enum ListTagsForResourceError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl ListTagsForResourceError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(ListTagsForResourceError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(ListTagsForResourceError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(ListTagsForResourceError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(ListTagsForResourceError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListTagsForResourceError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListTagsForResourceError { fn description(&self) -> &str { match *self { ListTagsForResourceError::Client(ref cause) => cause, ListTagsForResourceError::ClusterNotFound(ref cause) => cause, ListTagsForResourceError::InvalidParameter(ref cause) => cause, ListTagsForResourceError::Server(ref cause) => cause, } } } /// Errors returned by ListTaskDefinitionFamilies #[derive(Debug, PartialEq)] pub enum ListTaskDefinitionFamiliesError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl ListTaskDefinitionFamiliesError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<ListTaskDefinitionFamiliesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(ListTaskDefinitionFamiliesError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(ListTaskDefinitionFamiliesError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(ListTaskDefinitionFamiliesError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListTaskDefinitionFamiliesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListTaskDefinitionFamiliesError { fn description(&self) -> &str { match *self { ListTaskDefinitionFamiliesError::Client(ref cause) => cause, ListTaskDefinitionFamiliesError::InvalidParameter(ref cause) => cause, ListTaskDefinitionFamiliesError::Server(ref cause) => cause, } } } /// Errors returned by ListTaskDefinitions #[derive(Debug, PartialEq)] pub enum ListTaskDefinitionsError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl ListTaskDefinitionsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTaskDefinitionsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(ListTaskDefinitionsError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(ListTaskDefinitionsError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(ListTaskDefinitionsError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListTaskDefinitionsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListTaskDefinitionsError { fn description(&self) -> &str { match *self { ListTaskDefinitionsError::Client(ref cause) => cause, ListTaskDefinitionsError::InvalidParameter(ref cause) => cause, ListTaskDefinitionsError::Server(ref cause) => cause, } } } /// Errors returned by ListTasks #[derive(Debug, PartialEq)] pub enum ListTasksError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified service could not be found. You can view your available services with <a>ListServices</a>. Amazon ECS services are cluster-specific and Region-specific.</p> ServiceNotFound(String), } impl ListTasksError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTasksError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => return RusotoError::Service(ListTasksError::Client(err.msg)), "ClusterNotFoundException" => { return RusotoError::Service(ListTasksError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(ListTasksError::InvalidParameter(err.msg)) } "ServerException" => return RusotoError::Service(ListTasksError::Server(err.msg)), "ServiceNotFoundException" => { return RusotoError::Service(ListTasksError::ServiceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListTasksError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListTasksError { fn description(&self) -> &str { match *self { ListTasksError::Client(ref cause) => cause, ListTasksError::ClusterNotFound(ref cause) => cause, ListTasksError::InvalidParameter(ref cause) => cause, ListTasksError::Server(ref cause) => cause, ListTasksError::ServiceNotFound(ref cause) => cause, } } } /// Errors returned by PutAccountSetting #[derive(Debug, PartialEq)] pub enum PutAccountSettingError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl PutAccountSettingError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutAccountSettingError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(PutAccountSettingError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(PutAccountSettingError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(PutAccountSettingError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for PutAccountSettingError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for PutAccountSettingError { fn description(&self) -> &str { match *self { PutAccountSettingError::Client(ref cause) => cause, PutAccountSettingError::InvalidParameter(ref cause) => cause, PutAccountSettingError::Server(ref cause) => cause, } } } /// Errors returned by PutAccountSettingDefault #[derive(Debug, PartialEq)] pub enum PutAccountSettingDefaultError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl PutAccountSettingDefaultError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutAccountSettingDefaultError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(PutAccountSettingDefaultError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(PutAccountSettingDefaultError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(PutAccountSettingDefaultError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for PutAccountSettingDefaultError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for PutAccountSettingDefaultError { fn description(&self) -> &str { match *self { PutAccountSettingDefaultError::Client(ref cause) => cause, PutAccountSettingDefaultError::InvalidParameter(ref cause) => cause, PutAccountSettingDefaultError::Server(ref cause) => cause, } } } /// Errors returned by PutAttributes #[derive(Debug, PartialEq)] pub enum PutAttributesError { /// <p>You can apply up to 10 custom attributes per resource. You can view the attributes of a resource with <a>ListAttributes</a>. You can remove existing attributes on a resource with <a>DeleteAttributes</a>.</p> AttributeLimitExceeded(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>The specified target could not be found. You can view your available container instances with <a>ListContainerInstances</a>. Amazon ECS container instances are cluster-specific and Region-specific.</p> TargetNotFound(String), } impl PutAttributesError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutAttributesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AttributeLimitExceededException" => { return RusotoError::Service(PutAttributesError::AttributeLimitExceeded( err.msg, )) } "ClusterNotFoundException" => { return RusotoError::Service(PutAttributesError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(PutAttributesError::InvalidParameter(err.msg)) } "TargetNotFoundException" => { return RusotoError::Service(PutAttributesError::TargetNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for PutAttributesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for PutAttributesError { fn description(&self) -> &str { match *self { PutAttributesError::AttributeLimitExceeded(ref cause) => cause, PutAttributesError::ClusterNotFound(ref cause) => cause, PutAttributesError::InvalidParameter(ref cause) => cause, PutAttributesError::TargetNotFound(ref cause) => cause, } } } /// Errors returned by RegisterContainerInstance #[derive(Debug, PartialEq)] pub enum RegisterContainerInstanceError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl RegisterContainerInstanceError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterContainerInstanceError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(RegisterContainerInstanceError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(RegisterContainerInstanceError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(RegisterContainerInstanceError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RegisterContainerInstanceError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RegisterContainerInstanceError { fn description(&self) -> &str { match *self { RegisterContainerInstanceError::Client(ref cause) => cause, RegisterContainerInstanceError::InvalidParameter(ref cause) => cause, RegisterContainerInstanceError::Server(ref cause) => cause, } } } /// Errors returned by RegisterTaskDefinition #[derive(Debug, PartialEq)] pub enum RegisterTaskDefinitionError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl RegisterTaskDefinitionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterTaskDefinitionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(RegisterTaskDefinitionError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(RegisterTaskDefinitionError::InvalidParameter( err.msg, )) } "ServerException" => { return RusotoError::Service(RegisterTaskDefinitionError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RegisterTaskDefinitionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RegisterTaskDefinitionError { fn description(&self) -> &str { match *self { RegisterTaskDefinitionError::Client(ref cause) => cause, RegisterTaskDefinitionError::InvalidParameter(ref cause) => cause, RegisterTaskDefinitionError::Server(ref cause) => cause, } } } /// Errors returned by RunTask #[derive(Debug, PartialEq)] pub enum RunTaskError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>Your AWS account has been blocked. For more information, contact <a href="http://aws.amazon.com/contact-us/">AWS Support</a>.</p> Blocked(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>The specified platform version does not satisfy the task definition's required capabilities.</p> PlatformTaskDefinitionIncompatibility(String), /// <p>The specified platform version does not exist.</p> PlatformUnknown(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified task is not supported in this Region.</p> UnsupportedFeature(String), } impl RunTaskError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RunTaskError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(RunTaskError::AccessDenied(err.msg)) } "BlockedException" => return RusotoError::Service(RunTaskError::Blocked(err.msg)), "ClientException" => return RusotoError::Service(RunTaskError::Client(err.msg)), "ClusterNotFoundException" => { return RusotoError::Service(RunTaskError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(RunTaskError::InvalidParameter(err.msg)) } "PlatformTaskDefinitionIncompatibilityException" => { return RusotoError::Service( RunTaskError::PlatformTaskDefinitionIncompatibility(err.msg), ) } "PlatformUnknownException" => { return RusotoError::Service(RunTaskError::PlatformUnknown(err.msg)) } "ServerException" => return RusotoError::Service(RunTaskError::Server(err.msg)), "UnsupportedFeatureException" => { return RusotoError::Service(RunTaskError::UnsupportedFeature(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RunTaskError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RunTaskError { fn description(&self) -> &str { match *self { RunTaskError::AccessDenied(ref cause) => cause, RunTaskError::Blocked(ref cause) => cause, RunTaskError::Client(ref cause) => cause, RunTaskError::ClusterNotFound(ref cause) => cause, RunTaskError::InvalidParameter(ref cause) => cause, RunTaskError::PlatformTaskDefinitionIncompatibility(ref cause) => cause, RunTaskError::PlatformUnknown(ref cause) => cause, RunTaskError::Server(ref cause) => cause, RunTaskError::UnsupportedFeature(ref cause) => cause, } } } /// Errors returned by StartTask #[derive(Debug, PartialEq)] pub enum StartTaskError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl StartTaskError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartTaskError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => return RusotoError::Service(StartTaskError::Client(err.msg)), "ClusterNotFoundException" => { return RusotoError::Service(StartTaskError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(StartTaskError::InvalidParameter(err.msg)) } "ServerException" => return RusotoError::Service(StartTaskError::Server(err.msg)), "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for StartTaskError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for StartTaskError { fn description(&self) -> &str { match *self { StartTaskError::Client(ref cause) => cause, StartTaskError::ClusterNotFound(ref cause) => cause, StartTaskError::InvalidParameter(ref cause) => cause, StartTaskError::Server(ref cause) => cause, } } } /// Errors returned by StopTask #[derive(Debug, PartialEq)] pub enum StopTaskError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl StopTaskError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopTaskError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => return RusotoError::Service(StopTaskError::Client(err.msg)), "ClusterNotFoundException" => { return RusotoError::Service(StopTaskError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(StopTaskError::InvalidParameter(err.msg)) } "ServerException" => return RusotoError::Service(StopTaskError::Server(err.msg)), "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for StopTaskError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for StopTaskError { fn description(&self) -> &str { match *self { StopTaskError::Client(ref cause) => cause, StopTaskError::ClusterNotFound(ref cause) => cause, StopTaskError::InvalidParameter(ref cause) => cause, StopTaskError::Server(ref cause) => cause, } } } /// Errors returned by SubmitAttachmentStateChanges #[derive(Debug, PartialEq)] pub enum SubmitAttachmentStateChangesError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl SubmitAttachmentStateChangesError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<SubmitAttachmentStateChangesError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(SubmitAttachmentStateChangesError::AccessDenied( err.msg, )) } "ClientException" => { return RusotoError::Service(SubmitAttachmentStateChangesError::Client(err.msg)) } "InvalidParameterException" => { return RusotoError::Service( SubmitAttachmentStateChangesError::InvalidParameter(err.msg), ) } "ServerException" => { return RusotoError::Service(SubmitAttachmentStateChangesError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SubmitAttachmentStateChangesError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SubmitAttachmentStateChangesError { fn description(&self) -> &str { match *self { SubmitAttachmentStateChangesError::AccessDenied(ref cause) => cause, SubmitAttachmentStateChangesError::Client(ref cause) => cause, SubmitAttachmentStateChangesError::InvalidParameter(ref cause) => cause, SubmitAttachmentStateChangesError::Server(ref cause) => cause, } } } /// Errors returned by SubmitContainerStateChange #[derive(Debug, PartialEq)] pub enum SubmitContainerStateChangeError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl SubmitContainerStateChangeError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<SubmitContainerStateChangeError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(SubmitContainerStateChangeError::AccessDenied( err.msg, )) } "ClientException" => { return RusotoError::Service(SubmitContainerStateChangeError::Client(err.msg)) } "ServerException" => { return RusotoError::Service(SubmitContainerStateChangeError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SubmitContainerStateChangeError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SubmitContainerStateChangeError { fn description(&self) -> &str { match *self { SubmitContainerStateChangeError::AccessDenied(ref cause) => cause, SubmitContainerStateChangeError::Client(ref cause) => cause, SubmitContainerStateChangeError::Server(ref cause) => cause, } } } /// Errors returned by SubmitTaskStateChange #[derive(Debug, PartialEq)] pub enum SubmitTaskStateChangeError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl SubmitTaskStateChangeError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SubmitTaskStateChangeError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(SubmitTaskStateChangeError::AccessDenied(err.msg)) } "ClientException" => { return RusotoError::Service(SubmitTaskStateChangeError::Client(err.msg)) } "ServerException" => { return RusotoError::Service(SubmitTaskStateChangeError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SubmitTaskStateChangeError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SubmitTaskStateChangeError { fn description(&self) -> &str { match *self { SubmitTaskStateChangeError::AccessDenied(ref cause) => cause, SubmitTaskStateChangeError::Client(ref cause) => cause, SubmitTaskStateChangeError::Server(ref cause) => cause, } } } /// Errors returned by TagResource #[derive(Debug, PartialEq)] pub enum TagResourceError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>The specified resource could not be found.</p> ResourceNotFound(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl TagResourceError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(TagResourceError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(TagResourceError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(TagResourceError::InvalidParameter(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg)) } "ServerException" => { return RusotoError::Service(TagResourceError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for TagResourceError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for TagResourceError { fn description(&self) -> &str { match *self { TagResourceError::Client(ref cause) => cause, TagResourceError::ClusterNotFound(ref cause) => cause, TagResourceError::InvalidParameter(ref cause) => cause, TagResourceError::ResourceNotFound(ref cause) => cause, TagResourceError::Server(ref cause) => cause, } } } /// Errors returned by UntagResource #[derive(Debug, PartialEq)] pub enum UntagResourceError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>The specified resource could not be found.</p> ResourceNotFound(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl UntagResourceError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(UntagResourceError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(UntagResourceError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(UntagResourceError::InvalidParameter(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg)) } "ServerException" => { return RusotoError::Service(UntagResourceError::Server(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UntagResourceError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UntagResourceError { fn description(&self) -> &str { match *self { UntagResourceError::Client(ref cause) => cause, UntagResourceError::ClusterNotFound(ref cause) => cause, UntagResourceError::InvalidParameter(ref cause) => cause, UntagResourceError::ResourceNotFound(ref cause) => cause, UntagResourceError::Server(ref cause) => cause, } } } /// Errors returned by UpdateContainerAgent #[derive(Debug, PartialEq)] pub enum UpdateContainerAgentError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>Amazon ECS is unable to determine the current version of the Amazon ECS container agent on the container instance and does not have enough information to proceed with an update. This could be because the agent running on the container instance is an older or custom version that does not use our version information.</p> MissingVersion(String), /// <p>There is no update available for this Amazon ECS container agent. This could be because the agent is already running the latest version, or it is so old that there is no update path to the current version.</p> NoUpdateAvailable(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>There is already a current Amazon ECS container agent update in progress on the specified container instance. If the container agent becomes disconnected while it is in a transitional stage, such as <code>PENDING</code> or <code>STAGING</code>, the update process can get stuck in that state. However, when the agent reconnects, it resumes where it stopped previously.</p> UpdateInProgress(String), } impl UpdateContainerAgentError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateContainerAgentError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(UpdateContainerAgentError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(UpdateContainerAgentError::ClusterNotFound( err.msg, )) } "InvalidParameterException" => { return RusotoError::Service(UpdateContainerAgentError::InvalidParameter( err.msg, )) } "MissingVersionException" => { return RusotoError::Service(UpdateContainerAgentError::MissingVersion(err.msg)) } "NoUpdateAvailableException" => { return RusotoError::Service(UpdateContainerAgentError::NoUpdateAvailable( err.msg, )) } "ServerException" => { return RusotoError::Service(UpdateContainerAgentError::Server(err.msg)) } "UpdateInProgressException" => { return RusotoError::Service(UpdateContainerAgentError::UpdateInProgress( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UpdateContainerAgentError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UpdateContainerAgentError { fn description(&self) -> &str { match *self { UpdateContainerAgentError::Client(ref cause) => cause, UpdateContainerAgentError::ClusterNotFound(ref cause) => cause, UpdateContainerAgentError::InvalidParameter(ref cause) => cause, UpdateContainerAgentError::MissingVersion(ref cause) => cause, UpdateContainerAgentError::NoUpdateAvailable(ref cause) => cause, UpdateContainerAgentError::Server(ref cause) => cause, UpdateContainerAgentError::UpdateInProgress(ref cause) => cause, } } } /// Errors returned by UpdateContainerInstancesState #[derive(Debug, PartialEq)] pub enum UpdateContainerInstancesStateError { /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), } impl UpdateContainerInstancesStateError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<UpdateContainerInstancesStateError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ClientException" => { return RusotoError::Service(UpdateContainerInstancesStateError::Client( err.msg, )) } "ClusterNotFoundException" => { return RusotoError::Service( UpdateContainerInstancesStateError::ClusterNotFound(err.msg), ) } "InvalidParameterException" => { return RusotoError::Service( UpdateContainerInstancesStateError::InvalidParameter(err.msg), ) } "ServerException" => { return RusotoError::Service(UpdateContainerInstancesStateError::Server( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UpdateContainerInstancesStateError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UpdateContainerInstancesStateError { fn description(&self) -> &str { match *self { UpdateContainerInstancesStateError::Client(ref cause) => cause, UpdateContainerInstancesStateError::ClusterNotFound(ref cause) => cause, UpdateContainerInstancesStateError::InvalidParameter(ref cause) => cause, UpdateContainerInstancesStateError::Server(ref cause) => cause, } } } /// Errors returned by UpdateService #[derive(Debug, PartialEq)] pub enum UpdateServiceError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>The specified platform version does not satisfy the task definition's required capabilities.</p> PlatformTaskDefinitionIncompatibility(String), /// <p>The specified platform version does not exist.</p> PlatformUnknown(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified service is not active. You can't update a service that is inactive. If you have previously deleted a service, you can re-create it with <a>CreateService</a>.</p> ServiceNotActive(String), /// <p>The specified service could not be found. You can view your available services with <a>ListServices</a>. Amazon ECS services are cluster-specific and Region-specific.</p> ServiceNotFound(String), } impl UpdateServiceError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateServiceError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(UpdateServiceError::AccessDenied(err.msg)) } "ClientException" => { return RusotoError::Service(UpdateServiceError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(UpdateServiceError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(UpdateServiceError::InvalidParameter(err.msg)) } "PlatformTaskDefinitionIncompatibilityException" => { return RusotoError::Service( UpdateServiceError::PlatformTaskDefinitionIncompatibility(err.msg), ) } "PlatformUnknownException" => { return RusotoError::Service(UpdateServiceError::PlatformUnknown(err.msg)) } "ServerException" => { return RusotoError::Service(UpdateServiceError::Server(err.msg)) } "ServiceNotActiveException" => { return RusotoError::Service(UpdateServiceError::ServiceNotActive(err.msg)) } "ServiceNotFoundException" => { return RusotoError::Service(UpdateServiceError::ServiceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UpdateServiceError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UpdateServiceError { fn description(&self) -> &str { match *self { UpdateServiceError::AccessDenied(ref cause) => cause, UpdateServiceError::Client(ref cause) => cause, UpdateServiceError::ClusterNotFound(ref cause) => cause, UpdateServiceError::InvalidParameter(ref cause) => cause, UpdateServiceError::PlatformTaskDefinitionIncompatibility(ref cause) => cause, UpdateServiceError::PlatformUnknown(ref cause) => cause, UpdateServiceError::Server(ref cause) => cause, UpdateServiceError::ServiceNotActive(ref cause) => cause, UpdateServiceError::ServiceNotFound(ref cause) => cause, } } } /// Errors returned by UpdateServicePrimaryTaskSet #[derive(Debug, PartialEq)] pub enum UpdateServicePrimaryTaskSetError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified service is not active. You can't update a service that is inactive. If you have previously deleted a service, you can re-create it with <a>CreateService</a>.</p> ServiceNotActive(String), /// <p>The specified service could not be found. You can view your available services with <a>ListServices</a>. Amazon ECS services are cluster-specific and Region-specific.</p> ServiceNotFound(String), /// <p>The specified task set could not be found. You can view your available container instances with <a>DescribeTaskSets</a>. Task sets are specific to each cluster, service and Region.</p> TaskSetNotFound(String), /// <p>The specified task is not supported in this Region.</p> UnsupportedFeature(String), } impl UpdateServicePrimaryTaskSetError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<UpdateServicePrimaryTaskSetError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(UpdateServicePrimaryTaskSetError::AccessDenied( err.msg, )) } "ClientException" => { return RusotoError::Service(UpdateServicePrimaryTaskSetError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(UpdateServicePrimaryTaskSetError::ClusterNotFound( err.msg, )) } "InvalidParameterException" => { return RusotoError::Service( UpdateServicePrimaryTaskSetError::InvalidParameter(err.msg), ) } "ServerException" => { return RusotoError::Service(UpdateServicePrimaryTaskSetError::Server(err.msg)) } "ServiceNotActiveException" => { return RusotoError::Service( UpdateServicePrimaryTaskSetError::ServiceNotActive(err.msg), ) } "ServiceNotFoundException" => { return RusotoError::Service(UpdateServicePrimaryTaskSetError::ServiceNotFound( err.msg, )) } "TaskSetNotFoundException" => { return RusotoError::Service(UpdateServicePrimaryTaskSetError::TaskSetNotFound( err.msg, )) } "UnsupportedFeatureException" => { return RusotoError::Service( UpdateServicePrimaryTaskSetError::UnsupportedFeature(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UpdateServicePrimaryTaskSetError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UpdateServicePrimaryTaskSetError { fn description(&self) -> &str { match *self { UpdateServicePrimaryTaskSetError::AccessDenied(ref cause) => cause, UpdateServicePrimaryTaskSetError::Client(ref cause) => cause, UpdateServicePrimaryTaskSetError::ClusterNotFound(ref cause) => cause, UpdateServicePrimaryTaskSetError::InvalidParameter(ref cause) => cause, UpdateServicePrimaryTaskSetError::Server(ref cause) => cause, UpdateServicePrimaryTaskSetError::ServiceNotActive(ref cause) => cause, UpdateServicePrimaryTaskSetError::ServiceNotFound(ref cause) => cause, UpdateServicePrimaryTaskSetError::TaskSetNotFound(ref cause) => cause, UpdateServicePrimaryTaskSetError::UnsupportedFeature(ref cause) => cause, } } } /// Errors returned by UpdateTaskSet #[derive(Debug, PartialEq)] pub enum UpdateTaskSetError { /// <p>You do not have authorization to perform the requested action.</p> AccessDenied(String), /// <p>These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an identifier that is not valid.</p> Client(String), /// <p>The specified cluster could not be found. You can view your available clusters with <a>ListClusters</a>. Amazon ECS clusters are Region-specific.</p> ClusterNotFound(String), /// <p>The specified parameter is invalid. Review the available parameters for the API request.</p> InvalidParameter(String), /// <p>These errors are usually caused by a server issue.</p> Server(String), /// <p>The specified service is not active. You can't update a service that is inactive. If you have previously deleted a service, you can re-create it with <a>CreateService</a>.</p> ServiceNotActive(String), /// <p>The specified service could not be found. You can view your available services with <a>ListServices</a>. Amazon ECS services are cluster-specific and Region-specific.</p> ServiceNotFound(String), /// <p>The specified task set could not be found. You can view your available container instances with <a>DescribeTaskSets</a>. Task sets are specific to each cluster, service and Region.</p> TaskSetNotFound(String), /// <p>The specified task is not supported in this Region.</p> UnsupportedFeature(String), } impl UpdateTaskSetError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTaskSetError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "AccessDeniedException" => { return RusotoError::Service(UpdateTaskSetError::AccessDenied(err.msg)) } "ClientException" => { return RusotoError::Service(UpdateTaskSetError::Client(err.msg)) } "ClusterNotFoundException" => { return RusotoError::Service(UpdateTaskSetError::ClusterNotFound(err.msg)) } "InvalidParameterException" => { return RusotoError::Service(UpdateTaskSetError::InvalidParameter(err.msg)) } "ServerException" => { return RusotoError::Service(UpdateTaskSetError::Server(err.msg)) } "ServiceNotActiveException" => { return RusotoError::Service(UpdateTaskSetError::ServiceNotActive(err.msg)) } "ServiceNotFoundException" => { return RusotoError::Service(UpdateTaskSetError::ServiceNotFound(err.msg)) } "TaskSetNotFoundException" => { return RusotoError::Service(UpdateTaskSetError::TaskSetNotFound(err.msg)) } "UnsupportedFeatureException" => { return RusotoError::Service(UpdateTaskSetError::UnsupportedFeature(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UpdateTaskSetError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UpdateTaskSetError { fn description(&self) -> &str { match *self { UpdateTaskSetError::AccessDenied(ref cause) => cause, UpdateTaskSetError::Client(ref cause) => cause, UpdateTaskSetError::ClusterNotFound(ref cause) => cause, UpdateTaskSetError::InvalidParameter(ref cause) => cause, UpdateTaskSetError::Server(ref cause) => cause, UpdateTaskSetError::ServiceNotActive(ref cause) => cause, UpdateTaskSetError::ServiceNotFound(ref cause) => cause, UpdateTaskSetError::TaskSetNotFound(ref cause) => cause, UpdateTaskSetError::UnsupportedFeature(ref cause) => cause, } } } /// Trait representing the capabilities of the Amazon ECS API. Amazon ECS clients implement this trait. pub trait Ecs { /// <p><p>Creates a new Amazon ECS cluster. By default, your account receives a <code>default</code> cluster when you launch your first container instance. However, you can create your own cluster with a unique name with the <code>CreateCluster</code> action.</p> <note> <p>When you call the <a>CreateCluster</a> API operation, Amazon ECS attempts to create the service-linked role for your account so that required resources in other AWS services can be managed on your behalf. However, if the IAM user that makes the call does not have permissions to create the service-linked role, it is not created. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html">Using Service-Linked Roles for Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </note></p> fn create_cluster( &self, input: CreateClusterRequest, ) -> RusotoFuture<CreateClusterResponse, CreateClusterError>; /// <p><p>Runs and maintains a desired number of tasks from a specified task definition. If the number of tasks running in a service drops below the <code>desiredCount</code>, Amazon ECS spawns another copy of the task in the specified cluster. To update an existing service, see <a>UpdateService</a>.</p> <p>In addition to maintaining the desired count of tasks in your service, you can optionally run your service behind a load balancer. The load balancer distributes traffic across the tasks that are associated with the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html">Service Load Balancing</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>Tasks for services that <i>do not</i> use a load balancer are considered healthy if they're in the <code>RUNNING</code> state. Tasks for services that <i>do</i> use a load balancer are considered healthy if they're in the <code>RUNNING</code> state and the container instance that they're hosted on is reported as healthy by the load balancer.</p> <p>There are two service scheduler strategies available:</p> <ul> <li> <p> <code>REPLICA</code> - The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html">Service Scheduler Concepts</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </li> <li> <p> <code>DAEMON</code> - The daemon scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that you specify in your cluster. When using this strategy, you don't need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html">Service Scheduler Concepts</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </li> </ul> <p>You can optionally specify a deployment configuration for your service. The deployment is triggered by changing properties, such as the task definition or the desired count of a service, with an <a>UpdateService</a> operation. The default value for a replica service for <code>minimumHealthyPercent</code> is 100%. The default value for a daemon service for <code>minimumHealthyPercent</code> is 0%.</p> <p>If a service is using the <code>ECS</code> deployment controller, the minimum healthy percent represents a lower limit on the number of tasks in a service that must remain in the <code>RUNNING</code> state during a deployment, as a percentage of the desired number of tasks (rounded up to the nearest integer), and while any container instances are in the <code>DRAINING</code> state if the service contains tasks using the EC2 launch type. This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a desired number of four tasks and a minimum healthy percent of 50%, the scheduler might stop two existing tasks to free up cluster capacity before starting two new tasks. Tasks for services that <i>do not</i> use a load balancer are considered healthy if they're in the <code>RUNNING</code> state. Tasks for services that <i>do</i> use a load balancer are considered healthy if they're in the <code>RUNNING</code> state and they're reported as healthy by the load balancer. The default value for minimum healthy percent is 100%.</p> <p>If a service is using the <code>ECS</code> deployment controller, the <b>maximum percent</b> parameter represents an upper limit on the number of tasks in a service that are allowed in the <code>RUNNING</code> or <code>PENDING</code> state during a deployment, as a percentage of the desired number of tasks (rounded down to the nearest integer), and while any container instances are in the <code>DRAINING</code> state if the service contains tasks using the EC2 launch type. This parameter enables you to define the deployment batch size. For example, if your service has a desired number of four tasks and a maximum percent value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default value for maximum percent is 200%.</p> <p>If a service is using either the <code>CODE_DEPLOY</code> or <code>EXTERNAL</code> deployment controller types and tasks that use the EC2 launch type, the <b>minimum healthy percent</b> and <b>maximum percent</b> values are used only to define the lower and upper limit on the number of the tasks in the service that remain in the <code>RUNNING</code> state while the container instances are in the <code>DRAINING</code> state. If the tasks in the service use the Fargate launch type, the minimum healthy percent and maximum percent values aren't used, although they're currently visible when describing your service.</p> <p>When creating a service that uses the <code>EXTERNAL</code> deployment controller, you can specify only parameters that aren't controlled at the task set level. The only required parameter is the service name. You control your services using the <a>CreateTaskSet</a> operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>When the service scheduler launches new tasks, it determines task placement in your cluster using the following logic:</p> <ul> <li> <p>Determine which of the container instances in your cluster can support your service's task definition (for example, they have the required CPU, memory, ports, and container instance attributes).</p> </li> <li> <p>By default, the service scheduler attempts to balance tasks across Availability Zones in this manner (although you can choose a different placement strategy) with the <code>placementStrategy</code> parameter):</p> <ul> <li> <p>Sort the valid container instances, giving priority to instances that have the fewest number of running tasks for this service in their respective Availability Zone. For example, if zone A has one running service task and zones B and C each have zero, valid container instances in either zone B or C are considered optimal for placement.</p> </li> <li> <p>Place the new service task on a valid container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the fewest number of running tasks for this service.</p> </li> </ul> </li> </ul></p> fn create_service( &self, input: CreateServiceRequest, ) -> RusotoFuture<CreateServiceResponse, CreateServiceError>; /// <p>Create a task set in the specified cluster and service. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn create_task_set( &self, input: CreateTaskSetRequest, ) -> RusotoFuture<CreateTaskSetResponse, CreateTaskSetError>; /// <p>Disables an account setting for a specified IAM user, IAM role, or the root user for an account.</p> fn delete_account_setting( &self, input: DeleteAccountSettingRequest, ) -> RusotoFuture<DeleteAccountSettingResponse, DeleteAccountSettingError>; /// <p>Deletes one or more custom attributes from an Amazon ECS resource.</p> fn delete_attributes( &self, input: DeleteAttributesRequest, ) -> RusotoFuture<DeleteAttributesResponse, DeleteAttributesError>; /// <p>Deletes the specified cluster. You must deregister all container instances from this cluster before you may delete it. You can list the container instances in a cluster with <a>ListContainerInstances</a> and deregister them with <a>DeregisterContainerInstance</a>.</p> fn delete_cluster( &self, input: DeleteClusterRequest, ) -> RusotoFuture<DeleteClusterResponse, DeleteClusterError>; /// <p><p>Deletes a specified service within a cluster. You can delete a service if you have no running tasks in it and the desired task count is zero. If the service is actively maintaining tasks, you cannot delete it, and you must update the service to a desired task count of zero. For more information, see <a>UpdateService</a>.</p> <note> <p>When you delete a service, if there are still running tasks that require cleanup, the service status moves from <code>ACTIVE</code> to <code>DRAINING</code>, and the service is no longer visible in the console or in the <a>ListServices</a> API operation. After the tasks have stopped, then the service status moves from <code>DRAINING</code> to <code>INACTIVE</code>. Services in the <code>DRAINING</code> or <code>INACTIVE</code> status can still be viewed with the <a>DescribeServices</a> API operation. However, in the future, <code>INACTIVE</code> services may be cleaned up and purged from Amazon ECS record keeping, and <a>DescribeServices</a> calls on those services return a <code>ServiceNotFoundException</code> error.</p> </note> <important> <p>If you attempt to create a new service with the same name as an existing service in either <code>ACTIVE</code> or <code>DRAINING</code> status, you receive an error.</p> </important></p> fn delete_service( &self, input: DeleteServiceRequest, ) -> RusotoFuture<DeleteServiceResponse, DeleteServiceError>; /// <p>Deletes a specified task set within a service. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn delete_task_set( &self, input: DeleteTaskSetRequest, ) -> RusotoFuture<DeleteTaskSetResponse, DeleteTaskSetError>; /// <p><p>Deregisters an Amazon ECS container instance from the specified cluster. This instance is no longer available to run tasks.</p> <p>If you intend to use the container instance for some other purpose after deregistration, you should stop all of the tasks running on the container instance before deregistration. That prevents any orphaned tasks from consuming resources.</p> <p>Deregistering a container instance removes the instance from a cluster, but it does not terminate the EC2 instance. If you are finished using the instance, be sure to terminate it in the Amazon EC2 console to stop billing.</p> <note> <p>If you terminate a running container instance, Amazon ECS automatically deregisters the instance from your cluster (stopped container instances or instances with disconnected agents are not automatically deregistered when terminated).</p> </note></p> fn deregister_container_instance( &self, input: DeregisterContainerInstanceRequest, ) -> RusotoFuture<DeregisterContainerInstanceResponse, DeregisterContainerInstanceError>; /// <p><p>Deregisters the specified task definition by family and revision. Upon deregistration, the task definition is marked as <code>INACTIVE</code>. Existing tasks and services that reference an <code>INACTIVE</code> task definition continue to run without disruption. Existing services that reference an <code>INACTIVE</code> task definition can still scale up or down by modifying the service's desired count.</p> <p>You cannot use an <code>INACTIVE</code> task definition to run new tasks or create new services, and you cannot update an existing service to reference an <code>INACTIVE</code> task definition. However, there may be up to a 10-minute window following deregistration where these restrictions have not yet taken effect.</p> <note> <p>At this time, <code>INACTIVE</code> task definitions remain discoverable in your account indefinitely. However, this behavior is subject to change in the future, so you should not rely on <code>INACTIVE</code> task definitions persisting beyond the lifecycle of any associated tasks and services.</p> </note></p> fn deregister_task_definition( &self, input: DeregisterTaskDefinitionRequest, ) -> RusotoFuture<DeregisterTaskDefinitionResponse, DeregisterTaskDefinitionError>; /// <p>Describes one or more of your clusters.</p> fn describe_clusters( &self, input: DescribeClustersRequest, ) -> RusotoFuture<DescribeClustersResponse, DescribeClustersError>; /// <p>Describes Amazon Elastic Container Service container instances. Returns metadata about registered and remaining resources on each container instance requested.</p> fn describe_container_instances( &self, input: DescribeContainerInstancesRequest, ) -> RusotoFuture<DescribeContainerInstancesResponse, DescribeContainerInstancesError>; /// <p>Describes the specified services running in your cluster.</p> fn describe_services( &self, input: DescribeServicesRequest, ) -> RusotoFuture<DescribeServicesResponse, DescribeServicesError>; /// <p><p>Describes a task definition. You can specify a <code>family</code> and <code>revision</code> to find information about a specific task definition, or you can simply specify the family to find the latest <code>ACTIVE</code> revision in that family.</p> <note> <p>You can only describe <code>INACTIVE</code> task definitions while an active task or service references them.</p> </note></p> fn describe_task_definition( &self, input: DescribeTaskDefinitionRequest, ) -> RusotoFuture<DescribeTaskDefinitionResponse, DescribeTaskDefinitionError>; /// <p>Describes the task sets in the specified cluster and service. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn describe_task_sets( &self, input: DescribeTaskSetsRequest, ) -> RusotoFuture<DescribeTaskSetsResponse, DescribeTaskSetsError>; /// <p>Describes a specified task or tasks.</p> fn describe_tasks( &self, input: DescribeTasksRequest, ) -> RusotoFuture<DescribeTasksResponse, DescribeTasksError>; /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Returns an endpoint for the Amazon ECS agent to poll for updates.</p></p> fn discover_poll_endpoint( &self, input: DiscoverPollEndpointRequest, ) -> RusotoFuture<DiscoverPollEndpointResponse, DiscoverPollEndpointError>; /// <p>Lists the account settings for a specified principal.</p> fn list_account_settings( &self, input: ListAccountSettingsRequest, ) -> RusotoFuture<ListAccountSettingsResponse, ListAccountSettingsError>; /// <p>Lists the attributes for Amazon ECS resources within a specified target type and cluster. When you specify a target type and cluster, <code>ListAttributes</code> returns a list of attribute objects, one for each attribute on each resource. You can filter the list of results to a single attribute name to only return results that have that name. You can also filter the results by attribute name and value, for example, to see which container instances in a cluster are running a Linux AMI (<code>ecs.os-type=linux</code>). </p> fn list_attributes( &self, input: ListAttributesRequest, ) -> RusotoFuture<ListAttributesResponse, ListAttributesError>; /// <p>Returns a list of existing clusters.</p> fn list_clusters( &self, input: ListClustersRequest, ) -> RusotoFuture<ListClustersResponse, ListClustersError>; /// <p>Returns a list of container instances in a specified cluster. You can filter the results of a <code>ListContainerInstances</code> operation with cluster query language statements inside the <code>filter</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster Query Language</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn list_container_instances( &self, input: ListContainerInstancesRequest, ) -> RusotoFuture<ListContainerInstancesResponse, ListContainerInstancesError>; /// <p>Lists the services that are running in a specified cluster.</p> fn list_services( &self, input: ListServicesRequest, ) -> RusotoFuture<ListServicesResponse, ListServicesError>; /// <p>List the tags for an Amazon ECS resource.</p> fn list_tags_for_resource( &self, input: ListTagsForResourceRequest, ) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError>; /// <p>Returns a list of task definition families that are registered to your account (which may include task definition families that no longer have any <code>ACTIVE</code> task definition revisions).</p> <p>You can filter out task definition families that do not contain any <code>ACTIVE</code> task definition revisions by setting the <code>status</code> parameter to <code>ACTIVE</code>. You can also filter the results with the <code>familyPrefix</code> parameter.</p> fn list_task_definition_families( &self, input: ListTaskDefinitionFamiliesRequest, ) -> RusotoFuture<ListTaskDefinitionFamiliesResponse, ListTaskDefinitionFamiliesError>; /// <p>Returns a list of task definitions that are registered to your account. You can filter the results by family name with the <code>familyPrefix</code> parameter or by status with the <code>status</code> parameter.</p> fn list_task_definitions( &self, input: ListTaskDefinitionsRequest, ) -> RusotoFuture<ListTaskDefinitionsResponse, ListTaskDefinitionsError>; /// <p>Returns a list of tasks for a specified cluster. You can filter the results by family name, by a particular container instance, or by the desired status of the task with the <code>family</code>, <code>containerInstance</code>, and <code>desiredStatus</code> parameters.</p> <p>Recently stopped tasks might appear in the returned results. Currently, stopped tasks appear in the returned results for at least one hour. </p> fn list_tasks( &self, input: ListTasksRequest, ) -> RusotoFuture<ListTasksResponse, ListTasksError>; /// <p>Modifies an account setting. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html">Account Settings</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>When <code>serviceLongArnFormat</code>, <code>taskLongArnFormat</code>, or <code>containerInstanceLongArnFormat</code> are specified, the ARN and resource ID format of the resource type for a specified IAM user, IAM role, or the root user for an account is changed. If you change the account setting for the root user, the default settings for all of the IAM users and roles for which no individual account setting has been specified are reset. The opt-in and opt-out account setting can be specified for each Amazon ECS resource separately. The ARN and resource ID format of a resource will be defined by the opt-in status of the IAM user or role that created the resource. You must enable this setting to use Amazon ECS features such as resource tagging.</p> <p>When <code>awsvpcTrunking</code> is specified, the elastic network interface (ENI) limit for any new container instances that support the feature is changed. If <code>awsvpcTrunking</code> is enabled, any new container instances that support the feature are launched have the increased ENI limits available to them. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-eni.html">Elastic Network Interface Trunking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn put_account_setting( &self, input: PutAccountSettingRequest, ) -> RusotoFuture<PutAccountSettingResponse, PutAccountSettingError>; /// <p>Modifies an account setting for all IAM users on an account for whom no individual account setting has been specified.</p> fn put_account_setting_default( &self, input: PutAccountSettingDefaultRequest, ) -> RusotoFuture<PutAccountSettingDefaultResponse, PutAccountSettingDefaultError>; /// <p>Create or update an attribute on an Amazon ECS resource. If the attribute does not exist, it is created. If the attribute exists, its value is replaced with the specified value. To delete an attribute, use <a>DeleteAttributes</a>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes">Attributes</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn put_attributes( &self, input: PutAttributesRequest, ) -> RusotoFuture<PutAttributesResponse, PutAttributesError>; /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Registers an EC2 instance into the specified cluster. This instance becomes available to place containers on.</p></p> fn register_container_instance( &self, input: RegisterContainerInstanceRequest, ) -> RusotoFuture<RegisterContainerInstanceResponse, RegisterContainerInstanceError>; /// <p>Registers a new task definition from the supplied <code>family</code> and <code>containerDefinitions</code>. Optionally, you can add data volumes to your containers with the <code>volumes</code> parameter. For more information about task definition parameters and defaults, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Amazon ECS Task Definitions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>You can specify an IAM role for your task with the <code>taskRoleArn</code> parameter. When you specify an IAM role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the IAM policy associated with the role. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html">IAM Roles for Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>You can specify a Docker networking mode for the containers in your task definition with the <code>networkMode</code> parameter. The available network modes correspond to those described in <a href="https://docs.docker.com/engine/reference/run/#/network-settings">Network settings</a> in the Docker run reference. If you specify the <code>awsvpc</code> network mode, the task is allocated an elastic network interface, and you must specify a <a>NetworkConfiguration</a> when you create a service or run a task with the task definition. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn register_task_definition( &self, input: RegisterTaskDefinitionRequest, ) -> RusotoFuture<RegisterTaskDefinitionResponse, RegisterTaskDefinitionError>; /// <p><p>Starts a new task using the specified task definition.</p> <p>You can allow Amazon ECS to place tasks for you, or you can customize how Amazon ECS places tasks using placement constraints and placement strategies. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html">Scheduling Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>Alternatively, you can use <a>StartTask</a> to use your own scheduler or place tasks manually on specific container instances.</p> <p>The Amazon ECS API follows an eventual consistency model, due to the distributed nature of the system supporting the API. This means that the result of an API command you run that affects your Amazon ECS resources might not be immediately visible to all subsequent commands you run. Keep this in mind when you carry out an API command that immediately follows a previous API command.</p> <p>To manage eventual consistency, you can do the following:</p> <ul> <li> <p>Confirm the state of the resource before you run a command to modify it. Run the DescribeTasks command using an exponential backoff algorithm to ensure that you allow enough time for the previous command to propagate through the system. To do this, run the DescribeTasks command repeatedly, starting with a couple of seconds of wait time and increasing gradually up to five minutes of wait time.</p> </li> <li> <p>Add wait time between subsequent commands, even if the DescribeTasks command returns an accurate response. Apply an exponential backoff algorithm starting with a couple of seconds of wait time, and increase gradually up to about five minutes of wait time.</p> </li> </ul></p> fn run_task(&self, input: RunTaskRequest) -> RusotoFuture<RunTaskResponse, RunTaskError>; /// <p>Starts a new task from the specified task definition on the specified container instance or instances.</p> <p>Alternatively, you can use <a>RunTask</a> to place tasks for you. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html">Scheduling Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn start_task( &self, input: StartTaskRequest, ) -> RusotoFuture<StartTaskResponse, StartTaskError>; /// <p><p>Stops a running task. Any tags associated with the task will be deleted.</p> <p>When <a>StopTask</a> is called on a task, the equivalent of <code>docker stop</code> is issued to the containers running in the task. This results in a <code>SIGTERM</code> value and a default 30-second timeout, after which the <code>SIGKILL</code> value is sent and the containers are forcibly stopped. If the container handles the <code>SIGTERM</code> value gracefully and exits within 30 seconds from receiving it, no <code>SIGKILL</code> value is sent.</p> <note> <p>The default 30-second timeout can be configured on the Amazon ECS container agent with the <code>ECS<em>CONTAINER</em>STOP_TIMEOUT</code> variable. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html">Amazon ECS Container Agent Configuration</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </note></p> fn stop_task(&self, input: StopTaskRequest) -> RusotoFuture<StopTaskResponse, StopTaskError>; /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Sent to acknowledge that an attachment changed states.</p></p> fn submit_attachment_state_changes( &self, input: SubmitAttachmentStateChangesRequest, ) -> RusotoFuture<SubmitAttachmentStateChangesResponse, SubmitAttachmentStateChangesError>; /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Sent to acknowledge that a container changed states.</p></p> fn submit_container_state_change( &self, input: SubmitContainerStateChangeRequest, ) -> RusotoFuture<SubmitContainerStateChangeResponse, SubmitContainerStateChangeError>; /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Sent to acknowledge that a task changed states.</p></p> fn submit_task_state_change( &self, input: SubmitTaskStateChangeRequest, ) -> RusotoFuture<SubmitTaskStateChangeResponse, SubmitTaskStateChangeError>; /// <p>Associates the specified tags to a resource with the specified <code>resourceArn</code>. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.</p> fn tag_resource( &self, input: TagResourceRequest, ) -> RusotoFuture<TagResourceResponse, TagResourceError>; /// <p>Deletes specified tags from a resource.</p> fn untag_resource( &self, input: UntagResourceRequest, ) -> RusotoFuture<UntagResourceResponse, UntagResourceError>; /// <p>Updates the Amazon ECS container agent on a specified container instance. Updating the Amazon ECS container agent does not interrupt running tasks or services on the container instance. The process for updating the agent differs depending on whether your container instance was launched with the Amazon ECS-optimized AMI or another operating system.</p> <p> <code>UpdateContainerAgent</code> requires the Amazon ECS-optimized AMI or Amazon Linux with the <code>ecs-init</code> service installed and running. For help updating the Amazon ECS container agent on other operating systems, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html#manually_update_agent">Manually Updating the Amazon ECS Container Agent</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn update_container_agent( &self, input: UpdateContainerAgentRequest, ) -> RusotoFuture<UpdateContainerAgentResponse, UpdateContainerAgentError>; /// <p>Modifies the status of an Amazon ECS container instance.</p> <p>Once a container instance has reached an <code>ACTIVE</code> state, you can change the status of a container instance to <code>DRAINING</code> to manually remove an instance from a cluster, for example to perform system updates, update the Docker daemon, or scale down the cluster size.</p> <important> <p>A container instance cannot be changed to <code>DRAINING</code> until it has reached an <code>ACTIVE</code> status. If the instance is in any other status, an error will be received.</p> </important> <p>When you set a container instance to <code>DRAINING</code>, Amazon ECS prevents new tasks from being scheduled for placement on the container instance and replacement service tasks are started on other container instances in the cluster if the resources are available. Service tasks on the container instance that are in the <code>PENDING</code> state are stopped immediately.</p> <p>Service tasks on the container instance that are in the <code>RUNNING</code> state are stopped and replaced according to the service's deployment configuration parameters, <code>minimumHealthyPercent</code> and <code>maximumPercent</code>. You can change the deployment configuration of your service using <a>UpdateService</a>.</p> <ul> <li> <p>If <code>minimumHealthyPercent</code> is below 100%, the scheduler can ignore <code>desiredCount</code> temporarily during task replacement. For example, <code>desiredCount</code> is four tasks, a minimum of 50% allows the scheduler to stop two existing tasks before starting two new tasks. If the minimum is 100%, the service scheduler can't remove existing tasks until the replacement tasks are considered healthy. Tasks for services that do not use a load balancer are considered healthy if they are in the <code>RUNNING</code> state. Tasks for services that use a load balancer are considered healthy if they are in the <code>RUNNING</code> state and the container instance they are hosted on is reported as healthy by the load balancer.</p> </li> <li> <p>The <code>maximumPercent</code> parameter represents an upper limit on the number of running tasks during task replacement, which enables you to define the replacement batch size. For example, if <code>desiredCount</code> is four tasks, a maximum of 200% starts four new tasks before stopping the four tasks to be drained, provided that the cluster resources required to do this are available. If the maximum is 100%, then replacement tasks can't start until the draining tasks have stopped.</p> </li> </ul> <p>Any <code>PENDING</code> or <code>RUNNING</code> tasks that do not belong to a service are not affected. You must wait for them to finish or stop them manually.</p> <p>A container instance has completed draining when it has no more <code>RUNNING</code> tasks. You can verify this using <a>ListTasks</a>.</p> <p>When a container instance has been drained, you can set a container instance to <code>ACTIVE</code> status and once it has reached that status the Amazon ECS scheduler can begin scheduling tasks on the instance again.</p> fn update_container_instances_state( &self, input: UpdateContainerInstancesStateRequest, ) -> RusotoFuture<UpdateContainerInstancesStateResponse, UpdateContainerInstancesStateError>; /// <p><p>Modifies the parameters of a service.</p> <p>For services using the rolling update (<code>ECS</code>) deployment controller, the desired count, deployment configuration, network configuration, or task definition used can be updated.</p> <p>For services using the blue/green (<code>CODE<em>DEPLOY</code>) deployment controller, only the desired count, deployment configuration, and health check grace period can be updated using this API. If the network configuration, platform version, or task definition need to be updated, a new AWS CodeDeploy deployment should be created. For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API</em>CreateDeployment.html">CreateDeployment</a> in the <i>AWS CodeDeploy API Reference</i>.</p> <p>For services using an external deployment controller, you can update only the desired count and health check grace period using this API. If the launch type, load balancer, network configuration, platform version, or task definition need to be updated, you should create a new task set. For more information, see <a>CreateTaskSet</a>.</p> <p>You can add to or subtract from the number of instantiations of a task definition in a service by specifying the cluster that the service is running in and a new <code>desiredCount</code> parameter.</p> <p>If you have updated the Docker image of your application, you can create a new task definition with that image and deploy it to your service. The service scheduler uses the minimum healthy percent and maximum percent parameters (in the service's deployment configuration) to determine the deployment strategy.</p> <note> <p>If your updated Docker image uses the same tag as what is in the existing task definition for your service (for example, <code>my_image:latest</code>), you do not need to create a new revision of your task definition. You can update the service using the <code>forceNewDeployment</code> option. The new tasks launched by the deployment pull the current image/tag combination from your repository when they start.</p> </note> <p>You can also update the deployment configuration of a service. When a deployment is triggered by updating the task definition of a service, the service scheduler uses the deployment configuration parameters, <code>minimumHealthyPercent</code> and <code>maximumPercent</code>, to determine the deployment strategy.</p> <ul> <li> <p>If <code>minimumHealthyPercent</code> is below 100%, the scheduler can ignore <code>desiredCount</code> temporarily during a deployment. For example, if <code>desiredCount</code> is four tasks, a minimum of 50% allows the scheduler to stop two existing tasks before starting two new tasks. Tasks for services that do not use a load balancer are considered healthy if they are in the <code>RUNNING</code> state. Tasks for services that use a load balancer are considered healthy if they are in the <code>RUNNING</code> state and the container instance they are hosted on is reported as healthy by the load balancer.</p> </li> <li> <p>The <code>maximumPercent</code> parameter represents an upper limit on the number of running tasks during a deployment, which enables you to define the deployment batch size. For example, if <code>desiredCount</code> is four tasks, a maximum of 200% starts four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available).</p> </li> </ul> <p>When <a>UpdateService</a> stops a task during a deployment, the equivalent of <code>docker stop</code> is issued to the containers running in the task. This results in a <code>SIGTERM</code> and a 30-second timeout, after which <code>SIGKILL</code> is sent and the containers are forcibly stopped. If the container handles the <code>SIGTERM</code> gracefully and exits within 30 seconds from receiving it, no <code>SIGKILL</code> is sent.</p> <p>When the service scheduler launches new tasks, it determines task placement in your cluster with the following logic:</p> <ul> <li> <p>Determine which of the container instances in your cluster can support your service's task definition (for example, they have the required CPU, memory, ports, and container instance attributes).</p> </li> <li> <p>By default, the service scheduler attempts to balance tasks across Availability Zones in this manner (although you can choose a different placement strategy):</p> <ul> <li> <p>Sort the valid container instances by the fewest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have zero, valid container instances in either zone B or C are considered optimal for placement.</p> </li> <li> <p>Place the new service task on a valid container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the fewest number of running tasks for this service.</p> </li> </ul> </li> </ul> <p>When the service scheduler stops running tasks, it attempts to maintain balance across the Availability Zones in your cluster using the following logic: </p> <ul> <li> <p>Sort the container instances by the largest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have two, container instances in either zone B or C are considered optimal for termination.</p> </li> <li> <p>Stop the task on a container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the largest number of running tasks for this service.</p> </li> </ul></p> fn update_service( &self, input: UpdateServiceRequest, ) -> RusotoFuture<UpdateServiceResponse, UpdateServiceError>; /// <p>Modifies which task set in a service is the primary task set. Any parameters that are updated on the primary task set in a service will transition to the service. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn update_service_primary_task_set( &self, input: UpdateServicePrimaryTaskSetRequest, ) -> RusotoFuture<UpdateServicePrimaryTaskSetResponse, UpdateServicePrimaryTaskSetError>; /// <p>Modifies a task set. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn update_task_set( &self, input: UpdateTaskSetRequest, ) -> RusotoFuture<UpdateTaskSetResponse, UpdateTaskSetError>; } /// A client for the Amazon ECS API. #[derive(Clone)] pub struct EcsClient { client: Client, region: region::Region, } impl EcsClient { /// 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) -> EcsClient { EcsClient { client: Client::shared(), region, } } pub fn new_with<P, D>( request_dispatcher: D, credentials_provider: P, region: region::Region, ) -> EcsClient where P: ProvideAwsCredentials + Send + Sync + 'static, P::Future: Send, D: DispatchSignedRequest + Send + Sync + 'static, D::Future: Send, { EcsClient { client: Client::new_with(credentials_provider, request_dispatcher), region, } } } impl Ecs for EcsClient { /// <p><p>Creates a new Amazon ECS cluster. By default, your account receives a <code>default</code> cluster when you launch your first container instance. However, you can create your own cluster with a unique name with the <code>CreateCluster</code> action.</p> <note> <p>When you call the <a>CreateCluster</a> API operation, Amazon ECS attempts to create the service-linked role for your account so that required resources in other AWS services can be managed on your behalf. However, if the IAM user that makes the call does not have permissions to create the service-linked role, it is not created. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html">Using Service-Linked Roles for Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </note></p> fn create_cluster( &self, input: CreateClusterRequest, ) -> RusotoFuture<CreateClusterResponse, CreateClusterError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.CreateCluster", ); 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::<CreateClusterResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(CreateClusterError::from_response(response))), ) } }) } /// <p><p>Runs and maintains a desired number of tasks from a specified task definition. If the number of tasks running in a service drops below the <code>desiredCount</code>, Amazon ECS spawns another copy of the task in the specified cluster. To update an existing service, see <a>UpdateService</a>.</p> <p>In addition to maintaining the desired count of tasks in your service, you can optionally run your service behind a load balancer. The load balancer distributes traffic across the tasks that are associated with the service. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html">Service Load Balancing</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>Tasks for services that <i>do not</i> use a load balancer are considered healthy if they're in the <code>RUNNING</code> state. Tasks for services that <i>do</i> use a load balancer are considered healthy if they're in the <code>RUNNING</code> state and the container instance that they're hosted on is reported as healthy by the load balancer.</p> <p>There are two service scheduler strategies available:</p> <ul> <li> <p> <code>REPLICA</code> - The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html">Service Scheduler Concepts</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </li> <li> <p> <code>DAEMON</code> - The daemon scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that you specify in your cluster. When using this strategy, you don't need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html">Service Scheduler Concepts</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </li> </ul> <p>You can optionally specify a deployment configuration for your service. The deployment is triggered by changing properties, such as the task definition or the desired count of a service, with an <a>UpdateService</a> operation. The default value for a replica service for <code>minimumHealthyPercent</code> is 100%. The default value for a daemon service for <code>minimumHealthyPercent</code> is 0%.</p> <p>If a service is using the <code>ECS</code> deployment controller, the minimum healthy percent represents a lower limit on the number of tasks in a service that must remain in the <code>RUNNING</code> state during a deployment, as a percentage of the desired number of tasks (rounded up to the nearest integer), and while any container instances are in the <code>DRAINING</code> state if the service contains tasks using the EC2 launch type. This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a desired number of four tasks and a minimum healthy percent of 50%, the scheduler might stop two existing tasks to free up cluster capacity before starting two new tasks. Tasks for services that <i>do not</i> use a load balancer are considered healthy if they're in the <code>RUNNING</code> state. Tasks for services that <i>do</i> use a load balancer are considered healthy if they're in the <code>RUNNING</code> state and they're reported as healthy by the load balancer. The default value for minimum healthy percent is 100%.</p> <p>If a service is using the <code>ECS</code> deployment controller, the <b>maximum percent</b> parameter represents an upper limit on the number of tasks in a service that are allowed in the <code>RUNNING</code> or <code>PENDING</code> state during a deployment, as a percentage of the desired number of tasks (rounded down to the nearest integer), and while any container instances are in the <code>DRAINING</code> state if the service contains tasks using the EC2 launch type. This parameter enables you to define the deployment batch size. For example, if your service has a desired number of four tasks and a maximum percent value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default value for maximum percent is 200%.</p> <p>If a service is using either the <code>CODE_DEPLOY</code> or <code>EXTERNAL</code> deployment controller types and tasks that use the EC2 launch type, the <b>minimum healthy percent</b> and <b>maximum percent</b> values are used only to define the lower and upper limit on the number of the tasks in the service that remain in the <code>RUNNING</code> state while the container instances are in the <code>DRAINING</code> state. If the tasks in the service use the Fargate launch type, the minimum healthy percent and maximum percent values aren't used, although they're currently visible when describing your service.</p> <p>When creating a service that uses the <code>EXTERNAL</code> deployment controller, you can specify only parameters that aren't controlled at the task set level. The only required parameter is the service name. You control your services using the <a>CreateTaskSet</a> operation. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>When the service scheduler launches new tasks, it determines task placement in your cluster using the following logic:</p> <ul> <li> <p>Determine which of the container instances in your cluster can support your service's task definition (for example, they have the required CPU, memory, ports, and container instance attributes).</p> </li> <li> <p>By default, the service scheduler attempts to balance tasks across Availability Zones in this manner (although you can choose a different placement strategy) with the <code>placementStrategy</code> parameter):</p> <ul> <li> <p>Sort the valid container instances, giving priority to instances that have the fewest number of running tasks for this service in their respective Availability Zone. For example, if zone A has one running service task and zones B and C each have zero, valid container instances in either zone B or C are considered optimal for placement.</p> </li> <li> <p>Place the new service task on a valid container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the fewest number of running tasks for this service.</p> </li> </ul> </li> </ul></p> fn create_service( &self, input: CreateServiceRequest, ) -> RusotoFuture<CreateServiceResponse, CreateServiceError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.CreateService", ); 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::<CreateServiceResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(CreateServiceError::from_response(response))), ) } }) } /// <p>Create a task set in the specified cluster and service. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn create_task_set( &self, input: CreateTaskSetRequest, ) -> RusotoFuture<CreateTaskSetResponse, CreateTaskSetError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.CreateTaskSet", ); 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::<CreateTaskSetResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(CreateTaskSetError::from_response(response))), ) } }) } /// <p>Disables an account setting for a specified IAM user, IAM role, or the root user for an account.</p> fn delete_account_setting( &self, input: DeleteAccountSettingRequest, ) -> RusotoFuture<DeleteAccountSettingResponse, DeleteAccountSettingError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DeleteAccountSetting", ); 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::<DeleteAccountSettingResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(DeleteAccountSettingError::from_response(response)) }), ) } }) } /// <p>Deletes one or more custom attributes from an Amazon ECS resource.</p> fn delete_attributes( &self, input: DeleteAttributesRequest, ) -> RusotoFuture<DeleteAttributesResponse, DeleteAttributesError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DeleteAttributes", ); 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::<DeleteAttributesResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DeleteAttributesError::from_response(response))), ) } }) } /// <p>Deletes the specified cluster. You must deregister all container instances from this cluster before you may delete it. You can list the container instances in a cluster with <a>ListContainerInstances</a> and deregister them with <a>DeregisterContainerInstance</a>.</p> fn delete_cluster( &self, input: DeleteClusterRequest, ) -> RusotoFuture<DeleteClusterResponse, DeleteClusterError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DeleteCluster", ); 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::<DeleteClusterResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DeleteClusterError::from_response(response))), ) } }) } /// <p><p>Deletes a specified service within a cluster. You can delete a service if you have no running tasks in it and the desired task count is zero. If the service is actively maintaining tasks, you cannot delete it, and you must update the service to a desired task count of zero. For more information, see <a>UpdateService</a>.</p> <note> <p>When you delete a service, if there are still running tasks that require cleanup, the service status moves from <code>ACTIVE</code> to <code>DRAINING</code>, and the service is no longer visible in the console or in the <a>ListServices</a> API operation. After the tasks have stopped, then the service status moves from <code>DRAINING</code> to <code>INACTIVE</code>. Services in the <code>DRAINING</code> or <code>INACTIVE</code> status can still be viewed with the <a>DescribeServices</a> API operation. However, in the future, <code>INACTIVE</code> services may be cleaned up and purged from Amazon ECS record keeping, and <a>DescribeServices</a> calls on those services return a <code>ServiceNotFoundException</code> error.</p> </note> <important> <p>If you attempt to create a new service with the same name as an existing service in either <code>ACTIVE</code> or <code>DRAINING</code> status, you receive an error.</p> </important></p> fn delete_service( &self, input: DeleteServiceRequest, ) -> RusotoFuture<DeleteServiceResponse, DeleteServiceError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DeleteService", ); 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::<DeleteServiceResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DeleteServiceError::from_response(response))), ) } }) } /// <p>Deletes a specified task set within a service. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn delete_task_set( &self, input: DeleteTaskSetRequest, ) -> RusotoFuture<DeleteTaskSetResponse, DeleteTaskSetError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DeleteTaskSet", ); 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::<DeleteTaskSetResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DeleteTaskSetError::from_response(response))), ) } }) } /// <p><p>Deregisters an Amazon ECS container instance from the specified cluster. This instance is no longer available to run tasks.</p> <p>If you intend to use the container instance for some other purpose after deregistration, you should stop all of the tasks running on the container instance before deregistration. That prevents any orphaned tasks from consuming resources.</p> <p>Deregistering a container instance removes the instance from a cluster, but it does not terminate the EC2 instance. If you are finished using the instance, be sure to terminate it in the Amazon EC2 console to stop billing.</p> <note> <p>If you terminate a running container instance, Amazon ECS automatically deregisters the instance from your cluster (stopped container instances or instances with disconnected agents are not automatically deregistered when terminated).</p> </note></p> fn deregister_container_instance( &self, input: DeregisterContainerInstanceRequest, ) -> RusotoFuture<DeregisterContainerInstanceResponse, DeregisterContainerInstanceError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DeregisterContainerInstance", ); 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::<DeregisterContainerInstanceResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DeregisterContainerInstanceError::from_response(response)) })) } }) } /// <p><p>Deregisters the specified task definition by family and revision. Upon deregistration, the task definition is marked as <code>INACTIVE</code>. Existing tasks and services that reference an <code>INACTIVE</code> task definition continue to run without disruption. Existing services that reference an <code>INACTIVE</code> task definition can still scale up or down by modifying the service's desired count.</p> <p>You cannot use an <code>INACTIVE</code> task definition to run new tasks or create new services, and you cannot update an existing service to reference an <code>INACTIVE</code> task definition. However, there may be up to a 10-minute window following deregistration where these restrictions have not yet taken effect.</p> <note> <p>At this time, <code>INACTIVE</code> task definitions remain discoverable in your account indefinitely. However, this behavior is subject to change in the future, so you should not rely on <code>INACTIVE</code> task definitions persisting beyond the lifecycle of any associated tasks and services.</p> </note></p> fn deregister_task_definition( &self, input: DeregisterTaskDefinitionRequest, ) -> RusotoFuture<DeregisterTaskDefinitionResponse, DeregisterTaskDefinitionError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DeregisterTaskDefinition", ); 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::<DeregisterTaskDefinitionResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DeregisterTaskDefinitionError::from_response(response)) })) } }) } /// <p>Describes one or more of your clusters.</p> fn describe_clusters( &self, input: DescribeClustersRequest, ) -> RusotoFuture<DescribeClustersResponse, DescribeClustersError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DescribeClusters", ); 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::<DescribeClustersResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeClustersError::from_response(response))), ) } }) } /// <p>Describes Amazon Elastic Container Service container instances. Returns metadata about registered and remaining resources on each container instance requested.</p> fn describe_container_instances( &self, input: DescribeContainerInstancesRequest, ) -> RusotoFuture<DescribeContainerInstancesResponse, DescribeContainerInstancesError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DescribeContainerInstances", ); 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::<DescribeContainerInstancesResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DescribeContainerInstancesError::from_response(response)) })) } }) } /// <p>Describes the specified services running in your cluster.</p> fn describe_services( &self, input: DescribeServicesRequest, ) -> RusotoFuture<DescribeServicesResponse, DescribeServicesError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DescribeServices", ); 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::<DescribeServicesResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeServicesError::from_response(response))), ) } }) } /// <p><p>Describes a task definition. You can specify a <code>family</code> and <code>revision</code> to find information about a specific task definition, or you can simply specify the family to find the latest <code>ACTIVE</code> revision in that family.</p> <note> <p>You can only describe <code>INACTIVE</code> task definitions while an active task or service references them.</p> </note></p> fn describe_task_definition( &self, input: DescribeTaskDefinitionRequest, ) -> RusotoFuture<DescribeTaskDefinitionResponse, DescribeTaskDefinitionError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DescribeTaskDefinition", ); 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::<DescribeTaskDefinitionResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(DescribeTaskDefinitionError::from_response(response)) }), ) } }) } /// <p>Describes the task sets in the specified cluster and service. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn describe_task_sets( &self, input: DescribeTaskSetsRequest, ) -> RusotoFuture<DescribeTaskSetsResponse, DescribeTaskSetsError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DescribeTaskSets", ); 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::<DescribeTaskSetsResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeTaskSetsError::from_response(response))), ) } }) } /// <p>Describes a specified task or tasks.</p> fn describe_tasks( &self, input: DescribeTasksRequest, ) -> RusotoFuture<DescribeTasksResponse, DescribeTasksError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DescribeTasks", ); 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::<DescribeTasksResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeTasksError::from_response(response))), ) } }) } /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Returns an endpoint for the Amazon ECS agent to poll for updates.</p></p> fn discover_poll_endpoint( &self, input: DiscoverPollEndpointRequest, ) -> RusotoFuture<DiscoverPollEndpointResponse, DiscoverPollEndpointError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.DiscoverPollEndpoint", ); 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::<DiscoverPollEndpointResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(DiscoverPollEndpointError::from_response(response)) }), ) } }) } /// <p>Lists the account settings for a specified principal.</p> fn list_account_settings( &self, input: ListAccountSettingsRequest, ) -> RusotoFuture<ListAccountSettingsResponse, ListAccountSettingsError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.ListAccountSettings", ); 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::<ListAccountSettingsResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(ListAccountSettingsError::from_response(response)) }), ) } }) } /// <p>Lists the attributes for Amazon ECS resources within a specified target type and cluster. When you specify a target type and cluster, <code>ListAttributes</code> returns a list of attribute objects, one for each attribute on each resource. You can filter the list of results to a single attribute name to only return results that have that name. You can also filter the results by attribute name and value, for example, to see which container instances in a cluster are running a Linux AMI (<code>ecs.os-type=linux</code>). </p> fn list_attributes( &self, input: ListAttributesRequest, ) -> RusotoFuture<ListAttributesResponse, ListAttributesError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.ListAttributes", ); 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::<ListAttributesResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListAttributesError::from_response(response))), ) } }) } /// <p>Returns a list of existing clusters.</p> fn list_clusters( &self, input: ListClustersRequest, ) -> RusotoFuture<ListClustersResponse, ListClustersError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.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::<ListClustersResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListClustersError::from_response(response))), ) } }) } /// <p>Returns a list of container instances in a specified cluster. You can filter the results of a <code>ListContainerInstances</code> operation with cluster query language statements inside the <code>filter</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster Query Language</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn list_container_instances( &self, input: ListContainerInstancesRequest, ) -> RusotoFuture<ListContainerInstancesResponse, ListContainerInstancesError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.ListContainerInstances", ); 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::<ListContainerInstancesResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(ListContainerInstancesError::from_response(response)) }), ) } }) } /// <p>Lists the services that are running in a specified cluster.</p> fn list_services( &self, input: ListServicesRequest, ) -> RusotoFuture<ListServicesResponse, ListServicesError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.ListServices", ); 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::<ListServicesResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListServicesError::from_response(response))), ) } }) } /// <p>List the tags for an Amazon ECS resource.</p> fn list_tags_for_resource( &self, input: ListTagsForResourceRequest, ) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.ListTagsForResource", ); 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::<ListTagsForResourceResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(ListTagsForResourceError::from_response(response)) }), ) } }) } /// <p>Returns a list of task definition families that are registered to your account (which may include task definition families that no longer have any <code>ACTIVE</code> task definition revisions).</p> <p>You can filter out task definition families that do not contain any <code>ACTIVE</code> task definition revisions by setting the <code>status</code> parameter to <code>ACTIVE</code>. You can also filter the results with the <code>familyPrefix</code> parameter.</p> fn list_task_definition_families( &self, input: ListTaskDefinitionFamiliesRequest, ) -> RusotoFuture<ListTaskDefinitionFamiliesResponse, ListTaskDefinitionFamiliesError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.ListTaskDefinitionFamilies", ); 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::<ListTaskDefinitionFamiliesResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(ListTaskDefinitionFamiliesError::from_response(response)) })) } }) } /// <p>Returns a list of task definitions that are registered to your account. You can filter the results by family name with the <code>familyPrefix</code> parameter or by status with the <code>status</code> parameter.</p> fn list_task_definitions( &self, input: ListTaskDefinitionsRequest, ) -> RusotoFuture<ListTaskDefinitionsResponse, ListTaskDefinitionsError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.ListTaskDefinitions", ); 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::<ListTaskDefinitionsResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(ListTaskDefinitionsError::from_response(response)) }), ) } }) } /// <p>Returns a list of tasks for a specified cluster. You can filter the results by family name, by a particular container instance, or by the desired status of the task with the <code>family</code>, <code>containerInstance</code>, and <code>desiredStatus</code> parameters.</p> <p>Recently stopped tasks might appear in the returned results. Currently, stopped tasks appear in the returned results for at least one hour. </p> fn list_tasks( &self, input: ListTasksRequest, ) -> RusotoFuture<ListTasksResponse, ListTasksError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.ListTasks", ); 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::<ListTasksResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListTasksError::from_response(response))), ) } }) } /// <p>Modifies an account setting. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html">Account Settings</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>When <code>serviceLongArnFormat</code>, <code>taskLongArnFormat</code>, or <code>containerInstanceLongArnFormat</code> are specified, the ARN and resource ID format of the resource type for a specified IAM user, IAM role, or the root user for an account is changed. If you change the account setting for the root user, the default settings for all of the IAM users and roles for which no individual account setting has been specified are reset. The opt-in and opt-out account setting can be specified for each Amazon ECS resource separately. The ARN and resource ID format of a resource will be defined by the opt-in status of the IAM user or role that created the resource. You must enable this setting to use Amazon ECS features such as resource tagging.</p> <p>When <code>awsvpcTrunking</code> is specified, the elastic network interface (ENI) limit for any new container instances that support the feature is changed. If <code>awsvpcTrunking</code> is enabled, any new container instances that support the feature are launched have the increased ENI limits available to them. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-eni.html">Elastic Network Interface Trunking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn put_account_setting( &self, input: PutAccountSettingRequest, ) -> RusotoFuture<PutAccountSettingResponse, PutAccountSettingError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.PutAccountSetting", ); 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::<PutAccountSettingResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(PutAccountSettingError::from_response(response))), ) } }) } /// <p>Modifies an account setting for all IAM users on an account for whom no individual account setting has been specified.</p> fn put_account_setting_default( &self, input: PutAccountSettingDefaultRequest, ) -> RusotoFuture<PutAccountSettingDefaultResponse, PutAccountSettingDefaultError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.PutAccountSettingDefault", ); 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::<PutAccountSettingDefaultResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(PutAccountSettingDefaultError::from_response(response)) })) } }) } /// <p>Create or update an attribute on an Amazon ECS resource. If the attribute does not exist, it is created. If the attribute exists, its value is replaced with the specified value. To delete an attribute, use <a>DeleteAttributes</a>. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes">Attributes</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn put_attributes( &self, input: PutAttributesRequest, ) -> RusotoFuture<PutAttributesResponse, PutAttributesError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.PutAttributes", ); 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::<PutAttributesResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(PutAttributesError::from_response(response))), ) } }) } /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Registers an EC2 instance into the specified cluster. This instance becomes available to place containers on.</p></p> fn register_container_instance( &self, input: RegisterContainerInstanceRequest, ) -> RusotoFuture<RegisterContainerInstanceResponse, RegisterContainerInstanceError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.RegisterContainerInstance", ); 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::<RegisterContainerInstanceResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(RegisterContainerInstanceError::from_response(response)) })) } }) } /// <p>Registers a new task definition from the supplied <code>family</code> and <code>containerDefinitions</code>. Optionally, you can add data volumes to your containers with the <code>volumes</code> parameter. For more information about task definition parameters and defaults, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Amazon ECS Task Definitions</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>You can specify an IAM role for your task with the <code>taskRoleArn</code> parameter. When you specify an IAM role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the IAM policy associated with the role. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html">IAM Roles for Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>You can specify a Docker networking mode for the containers in your task definition with the <code>networkMode</code> parameter. The available network modes correspond to those described in <a href="https://docs.docker.com/engine/reference/run/#/network-settings">Network settings</a> in the Docker run reference. If you specify the <code>awsvpc</code> network mode, the task is allocated an elastic network interface, and you must specify a <a>NetworkConfiguration</a> when you create a service or run a task with the task definition. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html">Task Networking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn register_task_definition( &self, input: RegisterTaskDefinitionRequest, ) -> RusotoFuture<RegisterTaskDefinitionResponse, RegisterTaskDefinitionError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.RegisterTaskDefinition", ); 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::<RegisterTaskDefinitionResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(RegisterTaskDefinitionError::from_response(response)) }), ) } }) } /// <p><p>Starts a new task using the specified task definition.</p> <p>You can allow Amazon ECS to place tasks for you, or you can customize how Amazon ECS places tasks using placement constraints and placement strategies. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html">Scheduling Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <p>Alternatively, you can use <a>StartTask</a> to use your own scheduler or place tasks manually on specific container instances.</p> <p>The Amazon ECS API follows an eventual consistency model, due to the distributed nature of the system supporting the API. This means that the result of an API command you run that affects your Amazon ECS resources might not be immediately visible to all subsequent commands you run. Keep this in mind when you carry out an API command that immediately follows a previous API command.</p> <p>To manage eventual consistency, you can do the following:</p> <ul> <li> <p>Confirm the state of the resource before you run a command to modify it. Run the DescribeTasks command using an exponential backoff algorithm to ensure that you allow enough time for the previous command to propagate through the system. To do this, run the DescribeTasks command repeatedly, starting with a couple of seconds of wait time and increasing gradually up to five minutes of wait time.</p> </li> <li> <p>Add wait time between subsequent commands, even if the DescribeTasks command returns an accurate response. Apply an exponential backoff algorithm starting with a couple of seconds of wait time, and increase gradually up to about five minutes of wait time.</p> </li> </ul></p> fn run_task(&self, input: RunTaskRequest) -> RusotoFuture<RunTaskResponse, RunTaskError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "AmazonEC2ContainerServiceV20141113.RunTask"); 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::<RunTaskResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(RunTaskError::from_response(response))), ) } }) } /// <p>Starts a new task from the specified task definition on the specified container instance or instances.</p> <p>Alternatively, you can use <a>RunTask</a> to place tasks for you. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html">Scheduling Tasks</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn start_task( &self, input: StartTaskRequest, ) -> RusotoFuture<StartTaskResponse, StartTaskError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.StartTask", ); 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::<StartTaskResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(StartTaskError::from_response(response))), ) } }) } /// <p><p>Stops a running task. Any tags associated with the task will be deleted.</p> <p>When <a>StopTask</a> is called on a task, the equivalent of <code>docker stop</code> is issued to the containers running in the task. This results in a <code>SIGTERM</code> value and a default 30-second timeout, after which the <code>SIGKILL</code> value is sent and the containers are forcibly stopped. If the container handles the <code>SIGTERM</code> value gracefully and exits within 30 seconds from receiving it, no <code>SIGKILL</code> value is sent.</p> <note> <p>The default 30-second timeout can be configured on the Amazon ECS container agent with the <code>ECS<em>CONTAINER</em>STOP_TIMEOUT</code> variable. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html">Amazon ECS Container Agent Configuration</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> </note></p> fn stop_task(&self, input: StopTaskRequest) -> RusotoFuture<StopTaskResponse, StopTaskError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.StopTask", ); 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::<StopTaskResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(StopTaskError::from_response(response))), ) } }) } /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Sent to acknowledge that an attachment changed states.</p></p> fn submit_attachment_state_changes( &self, input: SubmitAttachmentStateChangesRequest, ) -> RusotoFuture<SubmitAttachmentStateChangesResponse, SubmitAttachmentStateChangesError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.SubmitAttachmentStateChanges", ); 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::<SubmitAttachmentStateChangesResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(SubmitAttachmentStateChangesError::from_response(response)) })) } }) } /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Sent to acknowledge that a container changed states.</p></p> fn submit_container_state_change( &self, input: SubmitContainerStateChangeRequest, ) -> RusotoFuture<SubmitContainerStateChangeResponse, SubmitContainerStateChangeError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.SubmitContainerStateChange", ); 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::<SubmitContainerStateChangeResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(SubmitContainerStateChangeError::from_response(response)) })) } }) } /// <p><note> <p>This action is only used by the Amazon ECS agent, and it is not intended for use outside of the agent.</p> </note> <p>Sent to acknowledge that a task changed states.</p></p> fn submit_task_state_change( &self, input: SubmitTaskStateChangeRequest, ) -> RusotoFuture<SubmitTaskStateChangeResponse, SubmitTaskStateChangeError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.SubmitTaskStateChange", ); 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::<SubmitTaskStateChangeResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(SubmitTaskStateChangeError::from_response(response)) }), ) } }) } /// <p>Associates the specified tags to a resource with the specified <code>resourceArn</code>. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.</p> fn tag_resource( &self, input: TagResourceRequest, ) -> RusotoFuture<TagResourceResponse, TagResourceError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.TagResource", ); 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::<TagResourceResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(TagResourceError::from_response(response))), ) } }) } /// <p>Deletes specified tags from a resource.</p> fn untag_resource( &self, input: UntagResourceRequest, ) -> RusotoFuture<UntagResourceResponse, UntagResourceError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.UntagResource", ); 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::<UntagResourceResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(UntagResourceError::from_response(response))), ) } }) } /// <p>Updates the Amazon ECS container agent on a specified container instance. Updating the Amazon ECS container agent does not interrupt running tasks or services on the container instance. The process for updating the agent differs depending on whether your container instance was launched with the Amazon ECS-optimized AMI or another operating system.</p> <p> <code>UpdateContainerAgent</code> requires the Amazon ECS-optimized AMI or Amazon Linux with the <code>ecs-init</code> service installed and running. For help updating the Amazon ECS container agent on other operating systems, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html#manually_update_agent">Manually Updating the Amazon ECS Container Agent</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn update_container_agent( &self, input: UpdateContainerAgentRequest, ) -> RusotoFuture<UpdateContainerAgentResponse, UpdateContainerAgentError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.UpdateContainerAgent", ); 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::<UpdateContainerAgentResponse, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(UpdateContainerAgentError::from_response(response)) }), ) } }) } /// <p>Modifies the status of an Amazon ECS container instance.</p> <p>Once a container instance has reached an <code>ACTIVE</code> state, you can change the status of a container instance to <code>DRAINING</code> to manually remove an instance from a cluster, for example to perform system updates, update the Docker daemon, or scale down the cluster size.</p> <important> <p>A container instance cannot be changed to <code>DRAINING</code> until it has reached an <code>ACTIVE</code> status. If the instance is in any other status, an error will be received.</p> </important> <p>When you set a container instance to <code>DRAINING</code>, Amazon ECS prevents new tasks from being scheduled for placement on the container instance and replacement service tasks are started on other container instances in the cluster if the resources are available. Service tasks on the container instance that are in the <code>PENDING</code> state are stopped immediately.</p> <p>Service tasks on the container instance that are in the <code>RUNNING</code> state are stopped and replaced according to the service's deployment configuration parameters, <code>minimumHealthyPercent</code> and <code>maximumPercent</code>. You can change the deployment configuration of your service using <a>UpdateService</a>.</p> <ul> <li> <p>If <code>minimumHealthyPercent</code> is below 100%, the scheduler can ignore <code>desiredCount</code> temporarily during task replacement. For example, <code>desiredCount</code> is four tasks, a minimum of 50% allows the scheduler to stop two existing tasks before starting two new tasks. If the minimum is 100%, the service scheduler can't remove existing tasks until the replacement tasks are considered healthy. Tasks for services that do not use a load balancer are considered healthy if they are in the <code>RUNNING</code> state. Tasks for services that use a load balancer are considered healthy if they are in the <code>RUNNING</code> state and the container instance they are hosted on is reported as healthy by the load balancer.</p> </li> <li> <p>The <code>maximumPercent</code> parameter represents an upper limit on the number of running tasks during task replacement, which enables you to define the replacement batch size. For example, if <code>desiredCount</code> is four tasks, a maximum of 200% starts four new tasks before stopping the four tasks to be drained, provided that the cluster resources required to do this are available. If the maximum is 100%, then replacement tasks can't start until the draining tasks have stopped.</p> </li> </ul> <p>Any <code>PENDING</code> or <code>RUNNING</code> tasks that do not belong to a service are not affected. You must wait for them to finish or stop them manually.</p> <p>A container instance has completed draining when it has no more <code>RUNNING</code> tasks. You can verify this using <a>ListTasks</a>.</p> <p>When a container instance has been drained, you can set a container instance to <code>ACTIVE</code> status and once it has reached that status the Amazon ECS scheduler can begin scheduling tasks on the instance again.</p> fn update_container_instances_state( &self, input: UpdateContainerInstancesStateRequest, ) -> RusotoFuture<UpdateContainerInstancesStateResponse, UpdateContainerInstancesStateError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.UpdateContainerInstancesState", ); 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::<UpdateContainerInstancesStateResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(UpdateContainerInstancesStateError::from_response(response)) })) } }) } /// <p><p>Modifies the parameters of a service.</p> <p>For services using the rolling update (<code>ECS</code>) deployment controller, the desired count, deployment configuration, network configuration, or task definition used can be updated.</p> <p>For services using the blue/green (<code>CODE<em>DEPLOY</code>) deployment controller, only the desired count, deployment configuration, and health check grace period can be updated using this API. If the network configuration, platform version, or task definition need to be updated, a new AWS CodeDeploy deployment should be created. For more information, see <a href="https://docs.aws.amazon.com/codedeploy/latest/APIReference/API</em>CreateDeployment.html">CreateDeployment</a> in the <i>AWS CodeDeploy API Reference</i>.</p> <p>For services using an external deployment controller, you can update only the desired count and health check grace period using this API. If the launch type, load balancer, network configuration, platform version, or task definition need to be updated, you should create a new task set. For more information, see <a>CreateTaskSet</a>.</p> <p>You can add to or subtract from the number of instantiations of a task definition in a service by specifying the cluster that the service is running in and a new <code>desiredCount</code> parameter.</p> <p>If you have updated the Docker image of your application, you can create a new task definition with that image and deploy it to your service. The service scheduler uses the minimum healthy percent and maximum percent parameters (in the service's deployment configuration) to determine the deployment strategy.</p> <note> <p>If your updated Docker image uses the same tag as what is in the existing task definition for your service (for example, <code>my_image:latest</code>), you do not need to create a new revision of your task definition. You can update the service using the <code>forceNewDeployment</code> option. The new tasks launched by the deployment pull the current image/tag combination from your repository when they start.</p> </note> <p>You can also update the deployment configuration of a service. When a deployment is triggered by updating the task definition of a service, the service scheduler uses the deployment configuration parameters, <code>minimumHealthyPercent</code> and <code>maximumPercent</code>, to determine the deployment strategy.</p> <ul> <li> <p>If <code>minimumHealthyPercent</code> is below 100%, the scheduler can ignore <code>desiredCount</code> temporarily during a deployment. For example, if <code>desiredCount</code> is four tasks, a minimum of 50% allows the scheduler to stop two existing tasks before starting two new tasks. Tasks for services that do not use a load balancer are considered healthy if they are in the <code>RUNNING</code> state. Tasks for services that use a load balancer are considered healthy if they are in the <code>RUNNING</code> state and the container instance they are hosted on is reported as healthy by the load balancer.</p> </li> <li> <p>The <code>maximumPercent</code> parameter represents an upper limit on the number of running tasks during a deployment, which enables you to define the deployment batch size. For example, if <code>desiredCount</code> is four tasks, a maximum of 200% starts four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available).</p> </li> </ul> <p>When <a>UpdateService</a> stops a task during a deployment, the equivalent of <code>docker stop</code> is issued to the containers running in the task. This results in a <code>SIGTERM</code> and a 30-second timeout, after which <code>SIGKILL</code> is sent and the containers are forcibly stopped. If the container handles the <code>SIGTERM</code> gracefully and exits within 30 seconds from receiving it, no <code>SIGKILL</code> is sent.</p> <p>When the service scheduler launches new tasks, it determines task placement in your cluster with the following logic:</p> <ul> <li> <p>Determine which of the container instances in your cluster can support your service's task definition (for example, they have the required CPU, memory, ports, and container instance attributes).</p> </li> <li> <p>By default, the service scheduler attempts to balance tasks across Availability Zones in this manner (although you can choose a different placement strategy):</p> <ul> <li> <p>Sort the valid container instances by the fewest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have zero, valid container instances in either zone B or C are considered optimal for placement.</p> </li> <li> <p>Place the new service task on a valid container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the fewest number of running tasks for this service.</p> </li> </ul> </li> </ul> <p>When the service scheduler stops running tasks, it attempts to maintain balance across the Availability Zones in your cluster using the following logic: </p> <ul> <li> <p>Sort the container instances by the largest number of running tasks for this service in the same Availability Zone as the instance. For example, if zone A has one running service task and zones B and C each have two, container instances in either zone B or C are considered optimal for termination.</p> </li> <li> <p>Stop the task on a container instance in an optimal Availability Zone (based on the previous steps), favoring container instances with the largest number of running tasks for this service.</p> </li> </ul></p> fn update_service( &self, input: UpdateServiceRequest, ) -> RusotoFuture<UpdateServiceResponse, UpdateServiceError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.UpdateService", ); 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::<UpdateServiceResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(UpdateServiceError::from_response(response))), ) } }) } /// <p>Modifies which task set in a service is the primary task set. Any parameters that are updated on the primary task set in a service will transition to the service. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn update_service_primary_task_set( &self, input: UpdateServicePrimaryTaskSetRequest, ) -> RusotoFuture<UpdateServicePrimaryTaskSetResponse, UpdateServicePrimaryTaskSetError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.UpdateServicePrimaryTaskSet", ); 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::<UpdateServicePrimaryTaskSetResponse, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(UpdateServicePrimaryTaskSetError::from_response(response)) })) } }) } /// <p>Modifies a task set. This is used when a service uses the <code>EXTERNAL</code> deployment controller type. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html">Amazon ECS Deployment Types</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> fn update_task_set( &self, input: UpdateTaskSetRequest, ) -> RusotoFuture<UpdateTaskSetResponse, UpdateTaskSetError> { let mut request = SignedRequest::new("POST", "ecs", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "AmazonEC2ContainerServiceV20141113.UpdateTaskSet", ); 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::<UpdateTaskSetResponse, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(UpdateTaskSetError::from_response(response))), ) } }) } }