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
// ================================================================= // // * 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>Represents the input for <code>AddTagsToStream</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct AddTagsToStreamInput { /// <p>The name of the stream.</p> #[serde(rename = "StreamName")] pub stream_name: String, /// <p>A set of up to 10 key-value pairs to use to create the tags.</p> #[serde(rename = "Tags")] pub tags: ::std::collections::HashMap<String, String>, } /// <p>An object that represents the details of the consumer you registered.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Consumer { /// <p>When you register a consumer, Kinesis Data Streams generates an ARN for it. You need this ARN to be able to call <a>SubscribeToShard</a>.</p> <p>If you delete a consumer and then create a new one with the same name, it won't have the same ARN. That's because consumer ARNs contain the creation timestamp. This is important to keep in mind if you have IAM policies that reference consumer ARNs.</p> #[serde(rename = "ConsumerARN")] pub consumer_arn: String, /// <p><p/></p> #[serde(rename = "ConsumerCreationTimestamp")] pub consumer_creation_timestamp: f64, /// <p>The name of the consumer is something you choose when you register the consumer.</p> #[serde(rename = "ConsumerName")] pub consumer_name: String, /// <p>A consumer can't read data while in the <code>CREATING</code> or <code>DELETING</code> states.</p> #[serde(rename = "ConsumerStatus")] pub consumer_status: String, } /// <p>An object that represents the details of a registered consumer.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ConsumerDescription { /// <p>When you register a consumer, Kinesis Data Streams generates an ARN for it. You need this ARN to be able to call <a>SubscribeToShard</a>.</p> <p>If you delete a consumer and then create a new one with the same name, it won't have the same ARN. That's because consumer ARNs contain the creation timestamp. This is important to keep in mind if you have IAM policies that reference consumer ARNs.</p> #[serde(rename = "ConsumerARN")] pub consumer_arn: String, /// <p><p/></p> #[serde(rename = "ConsumerCreationTimestamp")] pub consumer_creation_timestamp: f64, /// <p>The name of the consumer is something you choose when you register the consumer.</p> #[serde(rename = "ConsumerName")] pub consumer_name: String, /// <p>A consumer can't read data while in the <code>CREATING</code> or <code>DELETING</code> states.</p> #[serde(rename = "ConsumerStatus")] pub consumer_status: String, /// <p>The ARN of the stream with which you registered the consumer.</p> #[serde(rename = "StreamARN")] pub stream_arn: String, } /// <p>Represents the input for <code>CreateStream</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CreateStreamInput { /// <p>The number of shards that the stream will use. The throughput of the stream is a function of the number of shards; more shards are required for greater provisioned throughput.</p> <p>DefaultShardLimit;</p> #[serde(rename = "ShardCount")] pub shard_count: i64, /// <p>A name to identify the stream. The stream name is scoped to the AWS account used by the application that creates the stream. It is also scoped by AWS Region. That is, two streams in two different AWS accounts can have the same name. Two streams in the same AWS account but in two different Regions can also have the same name.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p>Represents the input for <a>DecreaseStreamRetentionPeriod</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DecreaseStreamRetentionPeriodInput { /// <p>The new retention period of the stream, in hours. Must be less than the current retention period.</p> #[serde(rename = "RetentionPeriodHours")] pub retention_period_hours: i64, /// <p>The name of the stream to modify.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p>Represents the input for <a>DeleteStream</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteStreamInput { /// <p>If this parameter is unset (<code>null</code>) or if you set it to <code>false</code>, and the stream has registered consumers, the call to <code>DeleteStream</code> fails with a <code>ResourceInUseException</code>. </p> #[serde(rename = "EnforceConsumerDeletion")] #[serde(skip_serializing_if = "Option::is_none")] pub enforce_consumer_deletion: Option<bool>, /// <p>The name of the stream to delete.</p> #[serde(rename = "StreamName")] pub stream_name: String, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeregisterStreamConsumerInput { /// <p>The ARN returned by Kinesis Data Streams when you registered the consumer. If you don't know the ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its ARN.</p> #[serde(rename = "ConsumerARN")] #[serde(skip_serializing_if = "Option::is_none")] pub consumer_arn: Option<String>, /// <p>The name that you gave to the consumer.</p> #[serde(rename = "ConsumerName")] #[serde(skip_serializing_if = "Option::is_none")] pub consumer_name: Option<String>, /// <p>The ARN of the Kinesis data stream that the consumer is registered with. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and AWS Service Namespaces</a>.</p> #[serde(rename = "StreamARN")] #[serde(skip_serializing_if = "Option::is_none")] pub stream_arn: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeLimitsInput {} #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeLimitsOutput { /// <p>The number of open shards.</p> #[serde(rename = "OpenShardCount")] pub open_shard_count: i64, /// <p>The maximum number of shards.</p> #[serde(rename = "ShardLimit")] pub shard_limit: i64, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeStreamConsumerInput { /// <p>The ARN returned by Kinesis Data Streams when you registered the consumer.</p> #[serde(rename = "ConsumerARN")] #[serde(skip_serializing_if = "Option::is_none")] pub consumer_arn: Option<String>, /// <p>The name that you gave to the consumer.</p> #[serde(rename = "ConsumerName")] #[serde(skip_serializing_if = "Option::is_none")] pub consumer_name: Option<String>, /// <p>The ARN of the Kinesis data stream that the consumer is registered with. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and AWS Service Namespaces</a>.</p> #[serde(rename = "StreamARN")] #[serde(skip_serializing_if = "Option::is_none")] pub stream_arn: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeStreamConsumerOutput { /// <p>An object that represents the details of the consumer.</p> #[serde(rename = "ConsumerDescription")] pub consumer_description: ConsumerDescription, } /// <p>Represents the input for <code>DescribeStream</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeStreamInput { /// <p>The shard ID of the shard to start with.</p> #[serde(rename = "ExclusiveStartShardId")] #[serde(skip_serializing_if = "Option::is_none")] pub exclusive_start_shard_id: Option<String>, /// <p>The maximum number of shards to return in a single call. The default value is 100. If you specify a value greater than 100, at most 100 shards are returned.</p> #[serde(rename = "Limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<i64>, /// <p>The name of the stream to describe.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p>Represents the output for <code>DescribeStream</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeStreamOutput { /// <p>The current status of the stream, the stream Amazon Resource Name (ARN), an array of shard objects that comprise the stream, and whether there are more shards available.</p> #[serde(rename = "StreamDescription")] pub stream_description: StreamDescription, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeStreamSummaryInput { /// <p>The name of the stream to describe.</p> #[serde(rename = "StreamName")] pub stream_name: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeStreamSummaryOutput { /// <p>A <a>StreamDescriptionSummary</a> containing information about the stream.</p> #[serde(rename = "StreamDescriptionSummary")] pub stream_description_summary: StreamDescriptionSummary, } /// <p>Represents the input for <a>DisableEnhancedMonitoring</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DisableEnhancedMonitoringInput { /// <p>List of shard-level metrics to disable.</p> <p>The following are the valid shard-level metrics. The value "<code>ALL</code>" disables every metric.</p> <ul> <li> <p> <code>IncomingBytes</code> </p> </li> <li> <p> <code>IncomingRecords</code> </p> </li> <li> <p> <code>OutgoingBytes</code> </p> </li> <li> <p> <code>OutgoingRecords</code> </p> </li> <li> <p> <code>WriteProvisionedThroughputExceeded</code> </p> </li> <li> <p> <code>ReadProvisionedThroughputExceeded</code> </p> </li> <li> <p> <code>IteratorAgeMilliseconds</code> </p> </li> <li> <p> <code>ALL</code> </p> </li> </ul> <p>For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html">Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> #[serde(rename = "ShardLevelMetrics")] pub shard_level_metrics: Vec<String>, /// <p>The name of the Kinesis data stream for which to disable enhanced monitoring.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p>Represents the input for <a>EnableEnhancedMonitoring</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct EnableEnhancedMonitoringInput { /// <p>List of shard-level metrics to enable.</p> <p>The following are the valid shard-level metrics. The value "<code>ALL</code>" enables every metric.</p> <ul> <li> <p> <code>IncomingBytes</code> </p> </li> <li> <p> <code>IncomingRecords</code> </p> </li> <li> <p> <code>OutgoingBytes</code> </p> </li> <li> <p> <code>OutgoingRecords</code> </p> </li> <li> <p> <code>WriteProvisionedThroughputExceeded</code> </p> </li> <li> <p> <code>ReadProvisionedThroughputExceeded</code> </p> </li> <li> <p> <code>IteratorAgeMilliseconds</code> </p> </li> <li> <p> <code>ALL</code> </p> </li> </ul> <p>For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html">Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> #[serde(rename = "ShardLevelMetrics")] pub shard_level_metrics: Vec<String>, /// <p>The name of the stream for which to enable enhanced monitoring.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p>Represents enhanced metrics types.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct EnhancedMetrics { /// <p>List of shard-level metrics.</p> <p>The following are the valid shard-level metrics. The value "<code>ALL</code>" enhances every metric.</p> <ul> <li> <p> <code>IncomingBytes</code> </p> </li> <li> <p> <code>IncomingRecords</code> </p> </li> <li> <p> <code>OutgoingBytes</code> </p> </li> <li> <p> <code>OutgoingRecords</code> </p> </li> <li> <p> <code>WriteProvisionedThroughputExceeded</code> </p> </li> <li> <p> <code>ReadProvisionedThroughputExceeded</code> </p> </li> <li> <p> <code>IteratorAgeMilliseconds</code> </p> </li> <li> <p> <code>ALL</code> </p> </li> </ul> <p>For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html">Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> #[serde(rename = "ShardLevelMetrics")] #[serde(skip_serializing_if = "Option::is_none")] pub shard_level_metrics: Option<Vec<String>>, } /// <p>Represents the output for <a>EnableEnhancedMonitoring</a> and <a>DisableEnhancedMonitoring</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct EnhancedMonitoringOutput { /// <p>Represents the current state of the metrics that are in the enhanced state before the operation.</p> #[serde(rename = "CurrentShardLevelMetrics")] #[serde(skip_serializing_if = "Option::is_none")] pub current_shard_level_metrics: Option<Vec<String>>, /// <p>Represents the list of all the metrics that would be in the enhanced state after the operation.</p> #[serde(rename = "DesiredShardLevelMetrics")] #[serde(skip_serializing_if = "Option::is_none")] pub desired_shard_level_metrics: Option<Vec<String>>, /// <p>The name of the Kinesis data stream.</p> #[serde(rename = "StreamName")] #[serde(skip_serializing_if = "Option::is_none")] pub stream_name: Option<String>, } /// <p>The provided iterator exceeds the maximum age allowed.</p> #[derive(Default, Debug, Clone, PartialEq)] pub struct ExpiredIteratorException { /// <p>A message that provides information about the error.</p> pub message: Option<String>, } /// <p>The pagination token passed to the operation is expired.</p> #[derive(Default, Debug, Clone, PartialEq)] pub struct ExpiredNextTokenException { pub message: Option<String>, } /// <p>Represents the input for <a>GetRecords</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetRecordsInput { /// <p>The maximum number of records to return. Specify a value of up to 10,000. If you specify a value that is greater than 10,000, <a>GetRecords</a> throws <code>InvalidArgumentException</code>.</p> #[serde(rename = "Limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<i64>, /// <p>The position in the shard from which you want to start sequentially reading data records. A shard iterator specifies this position using the sequence number of a data record in the shard.</p> #[serde(rename = "ShardIterator")] pub shard_iterator: String, } /// <p>Represents the output for <a>GetRecords</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GetRecordsOutput { /// <p>The number of milliseconds the <a>GetRecords</a> response is from the tip of the stream, indicating how far behind current time the consumer is. A value of zero indicates that record processing is caught up, and there are no new records to process at this moment.</p> #[serde(rename = "MillisBehindLatest")] #[serde(skip_serializing_if = "Option::is_none")] pub millis_behind_latest: Option<i64>, /// <p>The next position in the shard from which to start sequentially reading data records. If set to <code>null</code>, the shard has been closed and the requested iterator does not return any more data. </p> #[serde(rename = "NextShardIterator")] #[serde(skip_serializing_if = "Option::is_none")] pub next_shard_iterator: Option<String>, /// <p>The data records retrieved from the shard.</p> #[serde(rename = "Records")] pub records: Vec<Record>, } /// <p>Represents the input for <code>GetShardIterator</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetShardIteratorInput { /// <p>The shard ID of the Kinesis Data Streams shard to get the iterator for.</p> #[serde(rename = "ShardId")] pub shard_id: String, /// <p><p>Determines how the shard iterator is used to start reading data records from the shard.</p> <p>The following are the valid Amazon Kinesis shard iterator types:</p> <ul> <li> <p>AT<em>SEQUENCE</em>NUMBER - Start reading from the position denoted by a specific sequence number, provided in the value <code>StartingSequenceNumber</code>.</p> </li> <li> <p>AFTER<em>SEQUENCE</em>NUMBER - Start reading right after the position denoted by a specific sequence number, provided in the value <code>StartingSequenceNumber</code>.</p> </li> <li> <p>AT<em>TIMESTAMP - Start reading from the position denoted by a specific time stamp, provided in the value <code>Timestamp</code>.</p> </li> <li> <p>TRIM</em>HORIZON - Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard.</p> </li> <li> <p>LATEST - Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard.</p> </li> </ul></p> #[serde(rename = "ShardIteratorType")] pub shard_iterator_type: String, /// <p>The sequence number of the data record in the shard from which to start reading. Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER.</p> #[serde(rename = "StartingSequenceNumber")] #[serde(skip_serializing_if = "Option::is_none")] pub starting_sequence_number: Option<String>, /// <p>The name of the Amazon Kinesis data stream.</p> #[serde(rename = "StreamName")] pub stream_name: String, /// <p>The time stamp of the data record from which to start reading. Used with shard iterator type AT_TIMESTAMP. A time stamp is the Unix epoch date with precision in milliseconds. For example, <code>2016-04-04T19:58:46.480-00:00</code> or <code>1459799926.480</code>. If a record with this exact time stamp does not exist, the iterator returned is for the next (later) record. If the time stamp is older than the current trim horizon, the iterator returned is for the oldest untrimmed data record (TRIM_HORIZON).</p> #[serde(rename = "Timestamp")] #[serde(skip_serializing_if = "Option::is_none")] pub timestamp: Option<f64>, } /// <p>Represents the output for <code>GetShardIterator</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GetShardIteratorOutput { /// <p>The position in the shard from which to start reading data records sequentially. A shard iterator specifies this position using the sequence number of a data record in a shard.</p> #[serde(rename = "ShardIterator")] #[serde(skip_serializing_if = "Option::is_none")] pub shard_iterator: Option<String>, } /// <p>The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct HashKeyRange { /// <p>The ending hash key of the hash key range.</p> #[serde(rename = "EndingHashKey")] pub ending_hash_key: String, /// <p>The starting hash key of the hash key range.</p> #[serde(rename = "StartingHashKey")] pub starting_hash_key: String, } /// <p>Represents the input for <a>IncreaseStreamRetentionPeriod</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct IncreaseStreamRetentionPeriodInput { /// <p>The new retention period of the stream, in hours. Must be more than the current retention period.</p> #[serde(rename = "RetentionPeriodHours")] pub retention_period_hours: i64, /// <p>The name of the stream to modify.</p> #[serde(rename = "StreamName")] pub stream_name: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct InternalFailureException { #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> #[derive(Default, Debug, Clone, PartialEq)] pub struct InvalidArgumentException { /// <p>A message that provides information about the error.</p> pub message: Option<String>, } /// <p>The ciphertext references a key that doesn't exist or that you don't have access to.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct KMSAccessDeniedException { /// <p>A message that provides information about the error.</p> #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The request was rejected because the specified customer master key (CMK) isn't enabled.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct KMSDisabledException { /// <p>A message that provides information about the error.</p> #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The request was rejected because the state of the specified resource isn't valid for this request. For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">How Key State Affects Use of a Customer Master Key</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct KMSInvalidStateException { /// <p>A message that provides information about the error.</p> #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The request was rejected because the specified entity or resource can't be found.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct KMSNotFoundException { /// <p>A message that provides information about the error.</p> #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The AWS access key ID needs a subscription for the service.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct KMSOptInRequired { /// <p>A message that provides information about the error.</p> #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The request was denied due to request throttling. For more information about throttling, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second">Limits</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct KMSThrottlingException { /// <p>A message that provides information about the error.</p> #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> #[derive(Default, Debug, Clone, PartialEq)] pub struct LimitExceededException { /// <p>A message that provides information about the error.</p> pub message: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListShardsInput { /// <p>Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately follows <code>ExclusiveStartShardId</code>.</p> <p>If you don't specify this parameter, the default behavior is for <code>ListShards</code> to list the shards starting with the first one in the stream.</p> <p>You cannot specify this parameter if you specify <code>NextToken</code>.</p> #[serde(rename = "ExclusiveStartShardId")] #[serde(skip_serializing_if = "Option::is_none")] pub exclusive_start_shard_id: Option<String>, /// <p>The maximum number of shards to return in a single call to <code>ListShards</code>. The minimum value you can specify for this parameter is 1, and the maximum is 1,000, which is also the default.</p> <p>When the number of shards to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>ListShards</code> to list the next set of shards.</p> #[serde(rename = "MaxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p><p>When the number of shards in the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of shards in the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListShards</code> to list the next set of shards.</p> <p>Don't specify <code>StreamName</code> or <code>StreamCreationTimestamp</code> if you specify <code>NextToken</code> because the latter unambiguously identifies the stream.</p> <p>You can optionally specify a value for the <code>MaxResults</code> parameter when you specify <code>NextToken</code>. If you specify a <code>MaxResults</code> value that is less than the number of shards that the operation returns if you don't specify <code>MaxResults</code>, the response will contain a new <code>NextToken</code> value. You can use the new <code>NextToken</code> value in a subsequent call to the <code>ListShards</code> operation.</p> <important> <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListShards</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListShards</code>, you get <code>ExpiredNextTokenException</code>.</p> </important></p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the shards for.</p> <p>You cannot specify this parameter if you specify the <code>NextToken</code> parameter.</p> #[serde(rename = "StreamCreationTimestamp")] #[serde(skip_serializing_if = "Option::is_none")] pub stream_creation_timestamp: Option<f64>, /// <p>The name of the data stream whose shards you want to list. </p> <p>You cannot specify this parameter if you specify the <code>NextToken</code> parameter.</p> #[serde(rename = "StreamName")] #[serde(skip_serializing_if = "Option::is_none")] pub stream_name: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListShardsOutput { /// <p><p>When the number of shards in the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of shards in the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListShards</code> to list the next set of shards. For more information about the use of this pagination token when calling the <code>ListShards</code> operation, see <a>ListShardsInput$NextToken</a>.</p> <important> <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListShards</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListShards</code>, you get <code>ExpiredNextTokenException</code>.</p> </important></p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and ending hash keys and the starting and ending sequence numbers for the shard.</p> #[serde(rename = "Shards")] #[serde(skip_serializing_if = "Option::is_none")] pub shards: Option<Vec<Shard>>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListStreamConsumersInput { /// <p>The maximum number of consumers that you want a single call of <code>ListStreamConsumers</code> to return.</p> #[serde(rename = "MaxResults")] #[serde(skip_serializing_if = "Option::is_none")] pub max_results: Option<i64>, /// <p><p>When the number of consumers that are registered with the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of consumers that are registered with the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListStreamConsumers</code> to list the next set of registered consumers.</p> <p>Don't specify <code>StreamName</code> or <code>StreamCreationTimestamp</code> if you specify <code>NextToken</code> because the latter unambiguously identifies the stream.</p> <p>You can optionally specify a value for the <code>MaxResults</code> parameter when you specify <code>NextToken</code>. If you specify a <code>MaxResults</code> value that is less than the number of consumers that the operation returns if you don't specify <code>MaxResults</code>, the response will contain a new <code>NextToken</code> value. You can use the new <code>NextToken</code> value in a subsequent call to the <code>ListStreamConsumers</code> operation to list the next set of consumers.</p> <important> <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListStreamConsumers</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListStreamConsumers</code>, you get <code>ExpiredNextTokenException</code>.</p> </important></p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, /// <p>The ARN of the Kinesis data stream for which you want to list the registered consumers. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and AWS Service Namespaces</a>.</p> #[serde(rename = "StreamARN")] pub stream_arn: String, /// <p>Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the consumers for. </p> <p>You can't specify this parameter if you specify the NextToken parameter. </p> #[serde(rename = "StreamCreationTimestamp")] #[serde(skip_serializing_if = "Option::is_none")] pub stream_creation_timestamp: Option<f64>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListStreamConsumersOutput { /// <p>An array of JSON objects. Each object represents one registered consumer.</p> #[serde(rename = "Consumers")] #[serde(skip_serializing_if = "Option::is_none")] pub consumers: Option<Vec<Consumer>>, /// <p><p>When the number of consumers that are registered with the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of registered consumers, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListStreamConsumers</code> to list the next set of registered consumers. For more information about the use of this pagination token when calling the <code>ListStreamConsumers</code> operation, see <a>ListStreamConsumersInput$NextToken</a>.</p> <important> <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListStreamConsumers</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListStreamConsumers</code>, you get <code>ExpiredNextTokenException</code>.</p> </important></p> #[serde(rename = "NextToken")] #[serde(skip_serializing_if = "Option::is_none")] pub next_token: Option<String>, } /// <p>Represents the input for <code>ListStreams</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListStreamsInput { /// <p>The name of the stream to start the list with.</p> #[serde(rename = "ExclusiveStartStreamName")] #[serde(skip_serializing_if = "Option::is_none")] pub exclusive_start_stream_name: Option<String>, /// <p>The maximum number of streams to list.</p> #[serde(rename = "Limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<i64>, } /// <p>Represents the output for <code>ListStreams</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListStreamsOutput { /// <p>If set to <code>true</code>, there are more streams available to list.</p> #[serde(rename = "HasMoreStreams")] pub has_more_streams: bool, /// <p>The names of the streams that are associated with the AWS account making the <code>ListStreams</code> request.</p> #[serde(rename = "StreamNames")] pub stream_names: Vec<String>, } /// <p>Represents the input for <code>ListTagsForStream</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListTagsForStreamInput { /// <p>The key to use as the starting point for the list of tags. If this parameter is set, <code>ListTagsForStream</code> gets all tags that occur after <code>ExclusiveStartTagKey</code>. </p> #[serde(rename = "ExclusiveStartTagKey")] #[serde(skip_serializing_if = "Option::is_none")] pub exclusive_start_tag_key: Option<String>, /// <p>The number of tags to return. If this number is less than the total number of tags associated with the stream, <code>HasMoreTags</code> is set to <code>true</code>. To list additional tags, set <code>ExclusiveStartTagKey</code> to the last key in the response.</p> #[serde(rename = "Limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<i64>, /// <p>The name of the stream.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p>Represents the output for <code>ListTagsForStream</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListTagsForStreamOutput { /// <p>If set to <code>true</code>, more tags are available. To request additional tags, set <code>ExclusiveStartTagKey</code> to the key of the last tag returned.</p> #[serde(rename = "HasMoreTags")] pub has_more_tags: bool, /// <p>A list of tags associated with <code>StreamName</code>, starting with the first tag after <code>ExclusiveStartTagKey</code> and up to the specified <code>Limit</code>. </p> #[serde(rename = "Tags")] pub tags: Vec<Tag>, } /// <p>Represents the input for <code>MergeShards</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct MergeShardsInput { /// <p>The shard ID of the adjacent shard for the merge.</p> #[serde(rename = "AdjacentShardToMerge")] pub adjacent_shard_to_merge: String, /// <p>The shard ID of the shard to combine with the adjacent shard for the merge.</p> #[serde(rename = "ShardToMerge")] pub shard_to_merge: String, /// <p>The name of the stream for the merge.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p>The request rate for the stream is too high, or the requested data is too large for the available throughput. Reduce the frequency or size of your requests. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>, and <a href="http://docs.aws.amazon.com/general/latest/gr/api-retries.html">Error Retries and Exponential Backoff in AWS</a> in the <i>AWS General Reference</i>.</p> #[derive(Default, Debug, Clone, PartialEq)] pub struct ProvisionedThroughputExceededException { /// <p>A message that provides information about the error.</p> pub message: Option<String>, } /// <p>Represents the input for <code>PutRecord</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct PutRecordInput { /// <p>The data blob to put into the record, which is base64-encoded when the blob is serialized. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).</p> #[serde(rename = "Data")] #[serde( deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob", serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob", default )] pub data: bytes::Bytes, /// <p>The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.</p> #[serde(rename = "ExplicitHashKey")] #[serde(skip_serializing_if = "Option::is_none")] pub explicit_hash_key: Option<String>, /// <p>Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis Data Streams uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.</p> #[serde(rename = "PartitionKey")] pub partition_key: String, /// <p>Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key. Usage: set the <code>SequenceNumberForOrdering</code> of record <i>n</i> to the sequence number of record <i>n-1</i> (as returned in the result when putting record <i>n-1</i>). If this parameter is not set, records are coarsely ordered based on arrival time.</p> #[serde(rename = "SequenceNumberForOrdering")] #[serde(skip_serializing_if = "Option::is_none")] pub sequence_number_for_ordering: Option<String>, /// <p>The name of the stream to put the data record into.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p>Represents the output for <code>PutRecord</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct PutRecordOutput { /// <p><p>The encryption type to use on the record. This parameter can be one of the following values:</p> <ul> <li> <p> <code>NONE</code>: Do not encrypt the records in the stream.</p> </li> <li> <p> <code>KMS</code>: Use server-side encryption on the records in the stream using a customer-managed AWS KMS key.</p> </li> </ul></p> #[serde(rename = "EncryptionType")] #[serde(skip_serializing_if = "Option::is_none")] pub encryption_type: Option<String>, /// <p>The sequence number identifier that was assigned to the put data record. The sequence number for the record is unique across all records in the stream. A sequence number is the identifier associated with every record put into the stream.</p> #[serde(rename = "SequenceNumber")] pub sequence_number: String, /// <p>The shard ID of the shard where the data record was placed.</p> #[serde(rename = "ShardId")] pub shard_id: String, } /// <p>A <code>PutRecords</code> request.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct PutRecordsInput { /// <p>The records associated with the request.</p> #[serde(rename = "Records")] pub records: Vec<PutRecordsRequestEntry>, /// <p>The stream name associated with the request.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p> <code>PutRecords</code> results.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct PutRecordsOutput { /// <p><p>The encryption type used on the records. This parameter can be one of the following values:</p> <ul> <li> <p> <code>NONE</code>: Do not encrypt the records.</p> </li> <li> <p> <code>KMS</code>: Use server-side encryption on the records using a customer-managed AWS KMS key.</p> </li> </ul></p> #[serde(rename = "EncryptionType")] #[serde(skip_serializing_if = "Option::is_none")] pub encryption_type: Option<String>, /// <p>The number of unsuccessfully processed records in a <code>PutRecords</code> request.</p> #[serde(rename = "FailedRecordCount")] #[serde(skip_serializing_if = "Option::is_none")] pub failed_record_count: Option<i64>, /// <p>An array of successfully and unsuccessfully processed record results, correlated with the request by natural ordering. A record that is successfully added to a stream includes <code>SequenceNumber</code> and <code>ShardId</code> in the result. A record that fails to be added to a stream includes <code>ErrorCode</code> and <code>ErrorMessage</code> in the result.</p> #[serde(rename = "Records")] pub records: Vec<PutRecordsResultEntry>, } /// <p>Represents the output for <code>PutRecords</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct PutRecordsRequestEntry { /// <p>The data blob to put into the record, which is base64-encoded when the blob is serialized. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).</p> #[serde(rename = "Data")] #[serde( deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob", serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob", default )] pub data: bytes::Bytes, /// <p>The hash value used to determine explicitly the shard that the data record is assigned to by overriding the partition key hash.</p> #[serde(rename = "ExplicitHashKey")] #[serde(skip_serializing_if = "Option::is_none")] pub explicit_hash_key: Option<String>, /// <p>Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis Data Streams uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.</p> #[serde(rename = "PartitionKey")] pub partition_key: String, } /// <p>Represents the result of an individual record from a <code>PutRecords</code> request. A record that is successfully added to a stream includes <code>SequenceNumber</code> and <code>ShardId</code> in the result. A record that fails to be added to the stream includes <code>ErrorCode</code> and <code>ErrorMessage</code> in the result.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct PutRecordsResultEntry { /// <p>The error code for an individual record result. <code>ErrorCodes</code> can be either <code>ProvisionedThroughputExceededException</code> or <code>InternalFailure</code>.</p> #[serde(rename = "ErrorCode")] #[serde(skip_serializing_if = "Option::is_none")] pub error_code: Option<String>, /// <p>The error message for an individual record result. An <code>ErrorCode</code> value of <code>ProvisionedThroughputExceededException</code> has an error message that includes the account ID, stream name, and shard ID. An <code>ErrorCode</code> value of <code>InternalFailure</code> has the error message <code>"Internal Service Failure"</code>.</p> #[serde(rename = "ErrorMessage")] #[serde(skip_serializing_if = "Option::is_none")] pub error_message: Option<String>, /// <p>The sequence number for an individual record result.</p> #[serde(rename = "SequenceNumber")] #[serde(skip_serializing_if = "Option::is_none")] pub sequence_number: Option<String>, /// <p>The shard ID for an individual record result.</p> #[serde(rename = "ShardId")] #[serde(skip_serializing_if = "Option::is_none")] pub shard_id: Option<String>, } /// <p>The unit of data of the Kinesis data stream, which is composed of a sequence number, a partition key, and a data blob.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Record { /// <p>The approximate time that the record was inserted into the stream.</p> #[serde(rename = "ApproximateArrivalTimestamp")] #[serde(skip_serializing_if = "Option::is_none")] pub approximate_arrival_timestamp: Option<f64>, /// <p>The data blob. The data in the blob is both opaque and immutable to Kinesis Data Streams, which does not inspect, interpret, or change the data in the blob in any way. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MB).</p> #[serde(rename = "Data")] #[serde( deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob", serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob", default )] pub data: bytes::Bytes, /// <p><p>The encryption type used on the record. This parameter can be one of the following values:</p> <ul> <li> <p> <code>NONE</code>: Do not encrypt the records in the stream.</p> </li> <li> <p> <code>KMS</code>: Use server-side encryption on the records in the stream using a customer-managed AWS KMS key.</p> </li> </ul></p> #[serde(rename = "EncryptionType")] #[serde(skip_serializing_if = "Option::is_none")] pub encryption_type: Option<String>, /// <p>Identifies which shard in the stream the data record is assigned to.</p> #[serde(rename = "PartitionKey")] pub partition_key: String, /// <p>The unique identifier of the record within its shard.</p> #[serde(rename = "SequenceNumber")] pub sequence_number: String, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct RegisterStreamConsumerInput { /// <p>For a given Kinesis data stream, each consumer must have a unique name. However, consumer names don't have to be unique across data streams.</p> #[serde(rename = "ConsumerName")] pub consumer_name: String, /// <p>The ARN of the Kinesis data stream that you want to register the consumer with. For more info, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and AWS Service Namespaces</a>.</p> #[serde(rename = "StreamARN")] pub stream_arn: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct RegisterStreamConsumerOutput { /// <p>An object that represents the details of the consumer you registered. When you register a consumer, it gets an ARN that is generated by Kinesis Data Streams.</p> #[serde(rename = "Consumer")] pub consumer: Consumer, } /// <p>Represents the input for <code>RemoveTagsFromStream</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct RemoveTagsFromStreamInput { /// <p>The name of the stream.</p> #[serde(rename = "StreamName")] pub stream_name: String, /// <p>A list of tag keys. Each corresponding tag is removed from the stream.</p> #[serde(rename = "TagKeys")] pub tag_keys: Vec<String>, } /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ResourceInUseException { /// <p>A message that provides information about the error.</p> #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ResourceNotFoundException { /// <p>A message that provides information about the error.</p> #[serde(rename = "message")] #[serde(skip_serializing_if = "Option::is_none")] pub message: Option<String>, } /// <p>The range of possible sequence numbers for the shard.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct SequenceNumberRange { /// <p>The ending sequence number for the range. Shards that are in the OPEN state have an ending sequence number of <code>null</code>.</p> #[serde(rename = "EndingSequenceNumber")] #[serde(skip_serializing_if = "Option::is_none")] pub ending_sequence_number: Option<String>, /// <p>The starting sequence number for the range.</p> #[serde(rename = "StartingSequenceNumber")] pub starting_sequence_number: String, } /// <p>A uniquely identified group of data records in a Kinesis data stream.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Shard { /// <p>The shard ID of the shard adjacent to the shard's parent.</p> #[serde(rename = "AdjacentParentShardId")] #[serde(skip_serializing_if = "Option::is_none")] pub adjacent_parent_shard_id: Option<String>, /// <p>The range of possible hash key values for the shard, which is a set of ordered contiguous positive integers.</p> #[serde(rename = "HashKeyRange")] pub hash_key_range: HashKeyRange, /// <p>The shard ID of the shard's parent.</p> #[serde(rename = "ParentShardId")] #[serde(skip_serializing_if = "Option::is_none")] pub parent_shard_id: Option<String>, /// <p>The range of possible sequence numbers for the shard.</p> #[serde(rename = "SequenceNumberRange")] pub sequence_number_range: SequenceNumberRange, /// <p>The unique identifier of the shard within the stream.</p> #[serde(rename = "ShardId")] pub shard_id: String, } /// <p>Represents the input for <code>SplitShard</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct SplitShardInput { /// <p>A hash key value for the starting hash key of one of the child shards created by the split. The hash key range for a given shard constitutes a set of ordered contiguous positive integers. The value for <code>NewStartingHashKey</code> must be in the range of hash keys being mapped into the shard. The <code>NewStartingHashKey</code> hash key value and all higher hash key values in hash key range are distributed to one of the child shards. All the lower hash key values in the range are distributed to the other child shard.</p> #[serde(rename = "NewStartingHashKey")] pub new_starting_hash_key: String, /// <p>The shard ID of the shard to split.</p> #[serde(rename = "ShardToSplit")] pub shard_to_split: String, /// <p>The name of the stream for the shard split.</p> #[serde(rename = "StreamName")] pub stream_name: String, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct StartStreamEncryptionInput { /// <p>The encryption type to use. The only valid value is <code>KMS</code>.</p> #[serde(rename = "EncryptionType")] pub encryption_type: String, /// <p><p>The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p> <ul> <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li> <li> <p>Alias ARN example: <code>arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li> <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li> <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li> <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li> </ul></p> #[serde(rename = "KeyId")] pub key_id: String, /// <p>The name of the stream for which to start encrypting records.</p> #[serde(rename = "StreamName")] pub stream_name: String, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct StartingPosition { #[serde(rename = "SequenceNumber")] #[serde(skip_serializing_if = "Option::is_none")] pub sequence_number: Option<String>, #[serde(rename = "Timestamp")] #[serde(skip_serializing_if = "Option::is_none")] pub timestamp: Option<f64>, #[serde(rename = "Type")] pub type_: String, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct StopStreamEncryptionInput { /// <p>The encryption type. The only valid value is <code>KMS</code>.</p> #[serde(rename = "EncryptionType")] pub encryption_type: String, /// <p><p>The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p> <ul> <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li> <li> <p>Alias ARN example: <code>arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li> <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li> <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li> <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li> </ul></p> #[serde(rename = "KeyId")] pub key_id: String, /// <p>The name of the stream on which to stop encrypting records.</p> #[serde(rename = "StreamName")] pub stream_name: String, } /// <p>Represents the output for <a>DescribeStream</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct StreamDescription { /// <p><p>The server-side encryption type used on the stream. This parameter can be one of the following values:</p> <ul> <li> <p> <code>NONE</code>: Do not encrypt the records in the stream.</p> </li> <li> <p> <code>KMS</code>: Use server-side encryption on the records in the stream using a customer-managed AWS KMS key.</p> </li> </ul></p> #[serde(rename = "EncryptionType")] #[serde(skip_serializing_if = "Option::is_none")] pub encryption_type: Option<String>, /// <p>Represents the current enhanced monitoring settings of the stream.</p> #[serde(rename = "EnhancedMonitoring")] pub enhanced_monitoring: Vec<EnhancedMetrics>, /// <p>If set to <code>true</code>, more shards in the stream are available to describe.</p> #[serde(rename = "HasMoreShards")] pub has_more_shards: bool, /// <p><p>The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p> <ul> <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li> <li> <p>Alias ARN example: <code>arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li> <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li> <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li> <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li> </ul></p> #[serde(rename = "KeyId")] #[serde(skip_serializing_if = "Option::is_none")] pub key_id: Option<String>, /// <p>The current retention period, in hours.</p> #[serde(rename = "RetentionPeriodHours")] pub retention_period_hours: i64, /// <p>The shards that comprise the stream.</p> #[serde(rename = "Shards")] pub shards: Vec<Shard>, /// <p>The Amazon Resource Name (ARN) for the stream being described.</p> #[serde(rename = "StreamARN")] pub stream_arn: String, /// <p>The approximate time that the stream was created.</p> #[serde(rename = "StreamCreationTimestamp")] pub stream_creation_timestamp: f64, /// <p>The name of the stream being described.</p> #[serde(rename = "StreamName")] pub stream_name: String, /// <p><p>The current status of the stream being described. The stream status is one of the following states:</p> <ul> <li> <p> <code>CREATING</code> - The stream is being created. Kinesis Data Streams immediately returns and sets <code>StreamStatus</code> to <code>CREATING</code>.</p> </li> <li> <p> <code>DELETING</code> - The stream is being deleted. The specified stream is in the <code>DELETING</code> state until Kinesis Data Streams completes the deletion.</p> </li> <li> <p> <code>ACTIVE</code> - The stream exists and is ready for read and write operations or deletion. You should perform read and write operations only on an <code>ACTIVE</code> stream.</p> </li> <li> <p> <code>UPDATING</code> - Shards in the stream are being merged or split. Read and write operations continue to work while the stream is in the <code>UPDATING</code> state.</p> </li> </ul></p> #[serde(rename = "StreamStatus")] pub stream_status: String, } /// <p>Represents the output for <a>DescribeStreamSummary</a> </p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct StreamDescriptionSummary { /// <p>The number of enhanced fan-out consumers registered with the stream.</p> #[serde(rename = "ConsumerCount")] #[serde(skip_serializing_if = "Option::is_none")] pub consumer_count: Option<i64>, /// <p><p>The encryption type used. This value is one of the following:</p> <ul> <li> <p> <code>KMS</code> </p> </li> <li> <p> <code>NONE</code> </p> </li> </ul></p> #[serde(rename = "EncryptionType")] #[serde(skip_serializing_if = "Option::is_none")] pub encryption_type: Option<String>, /// <p>Represents the current enhanced monitoring settings of the stream.</p> #[serde(rename = "EnhancedMonitoring")] pub enhanced_monitoring: Vec<EnhancedMetrics>, /// <p><p>The GUID for the customer-managed AWS KMS key to use for encryption. This value can be a globally unique identifier, a fully specified ARN to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p> <ul> <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li> <li> <p>Alias ARN example: <code> arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li> <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li> <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li> <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li> </ul></p> #[serde(rename = "KeyId")] #[serde(skip_serializing_if = "Option::is_none")] pub key_id: Option<String>, /// <p>The number of open shards in the stream.</p> #[serde(rename = "OpenShardCount")] pub open_shard_count: i64, /// <p>The current retention period, in hours.</p> #[serde(rename = "RetentionPeriodHours")] pub retention_period_hours: i64, /// <p>The Amazon Resource Name (ARN) for the stream being described.</p> #[serde(rename = "StreamARN")] pub stream_arn: String, /// <p>The approximate time that the stream was created.</p> #[serde(rename = "StreamCreationTimestamp")] pub stream_creation_timestamp: f64, /// <p>The name of the stream being described.</p> #[serde(rename = "StreamName")] pub stream_name: String, /// <p><p>The current status of the stream being described. The stream status is one of the following states:</p> <ul> <li> <p> <code>CREATING</code> - The stream is being created. Kinesis Data Streams immediately returns and sets <code>StreamStatus</code> to <code>CREATING</code>.</p> </li> <li> <p> <code>DELETING</code> - The stream is being deleted. The specified stream is in the <code>DELETING</code> state until Kinesis Data Streams completes the deletion.</p> </li> <li> <p> <code>ACTIVE</code> - The stream exists and is ready for read and write operations or deletion. You should perform read and write operations only on an <code>ACTIVE</code> stream.</p> </li> <li> <p> <code>UPDATING</code> - Shards in the stream are being merged or split. Read and write operations continue to work while the stream is in the <code>UPDATING</code> state.</p> </li> </ul></p> #[serde(rename = "StreamStatus")] pub stream_status: String, } /// <p>After you call <a>SubscribeToShard</a>, Kinesis Data Streams sends events of this type to your consumer. </p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct SubscribeToShardEvent { /// <p>Use this as <code>StartingSequenceNumber</code> in the next call to <a>SubscribeToShard</a>.</p> #[serde(rename = "ContinuationSequenceNumber")] pub continuation_sequence_number: String, /// <p>The number of milliseconds the read records are from the tip of the stream, indicating how far behind current time the consumer is. A value of zero indicates that record processing is caught up, and there are no new records to process at this moment.</p> #[serde(rename = "MillisBehindLatest")] pub millis_behind_latest: i64, /// <p><p/></p> #[serde(rename = "Records")] pub records: Vec<Record>, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct SubscribeToShardEventStream { #[serde(rename = "InternalFailureException")] #[serde(skip_serializing_if = "Option::is_none")] pub internal_failure_exception: Option<InternalFailureException>, #[serde(rename = "KMSAccessDeniedException")] #[serde(skip_serializing_if = "Option::is_none")] pub kms_access_denied_exception: Option<KMSAccessDeniedException>, #[serde(rename = "KMSDisabledException")] #[serde(skip_serializing_if = "Option::is_none")] pub kms_disabled_exception: Option<KMSDisabledException>, #[serde(rename = "KMSInvalidStateException")] #[serde(skip_serializing_if = "Option::is_none")] pub kms_invalid_state_exception: Option<KMSInvalidStateException>, #[serde(rename = "KMSNotFoundException")] #[serde(skip_serializing_if = "Option::is_none")] pub kms_not_found_exception: Option<KMSNotFoundException>, #[serde(rename = "KMSOptInRequired")] #[serde(skip_serializing_if = "Option::is_none")] pub kms_opt_in_required: Option<KMSOptInRequired>, #[serde(rename = "KMSThrottlingException")] #[serde(skip_serializing_if = "Option::is_none")] pub kms_throttling_exception: Option<KMSThrottlingException>, #[serde(rename = "ResourceInUseException")] #[serde(skip_serializing_if = "Option::is_none")] pub resource_in_use_exception: Option<ResourceInUseException>, #[serde(rename = "ResourceNotFoundException")] #[serde(skip_serializing_if = "Option::is_none")] pub resource_not_found_exception: Option<ResourceNotFoundException>, #[serde(rename = "SubscribeToShardEvent")] pub subscribe_to_shard_event: SubscribeToShardEvent, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct SubscribeToShardInput { /// <p>For this parameter, use the value you obtained when you called <a>RegisterStreamConsumer</a>.</p> #[serde(rename = "ConsumerARN")] pub consumer_arn: String, /// <p>The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use <a>ListShards</a>.</p> #[serde(rename = "ShardId")] pub shard_id: String, #[serde(rename = "StartingPosition")] pub starting_position: StartingPosition, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct SubscribeToShardOutput { /// <p>The event stream that your consumer can use to read records from the shard.</p> #[serde(rename = "EventStream")] pub event_stream: SubscribeToShardEventStream, } /// <p>Metadata assigned to the stream, consisting of a key-value pair.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct Tag { /// <p>A unique identifier for the tag. Maximum length: 128 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % @</p> #[serde(rename = "Key")] pub key: String, /// <p>An optional string, typically used to describe or define the tag. Maximum length: 256 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % @</p> #[serde(rename = "Value")] #[serde(skip_serializing_if = "Option::is_none")] pub value: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UpdateShardCountInput { /// <p>The scaling type. Uniform scaling creates shards of equal size.</p> #[serde(rename = "ScalingType")] pub scaling_type: String, /// <p>The name of the stream.</p> #[serde(rename = "StreamName")] pub stream_name: String, /// <p>The new number of shards.</p> #[serde(rename = "TargetShardCount")] pub target_shard_count: i64, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct UpdateShardCountOutput { /// <p>The current number of shards.</p> #[serde(rename = "CurrentShardCount")] #[serde(skip_serializing_if = "Option::is_none")] pub current_shard_count: Option<i64>, /// <p>The name of the stream.</p> #[serde(rename = "StreamName")] #[serde(skip_serializing_if = "Option::is_none")] pub stream_name: Option<String>, /// <p>The updated number of shards.</p> #[serde(rename = "TargetShardCount")] #[serde(skip_serializing_if = "Option::is_none")] pub target_shard_count: Option<i64>, } /// Errors returned by AddTagsToStream #[derive(Debug, PartialEq)] pub enum AddTagsToStreamError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl AddTagsToStreamError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsToStreamError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(AddTagsToStreamError::InvalidArgument(err.msg)) } "LimitExceededException" => { return RusotoError::Service(AddTagsToStreamError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(AddTagsToStreamError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(AddTagsToStreamError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for AddTagsToStreamError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for AddTagsToStreamError { fn description(&self) -> &str { match *self { AddTagsToStreamError::InvalidArgument(ref cause) => cause, AddTagsToStreamError::LimitExceeded(ref cause) => cause, AddTagsToStreamError::ResourceInUse(ref cause) => cause, AddTagsToStreamError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by CreateStream #[derive(Debug, PartialEq)] pub enum CreateStreamError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), } impl CreateStreamError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStreamError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(CreateStreamError::InvalidArgument(err.msg)) } "LimitExceededException" => { return RusotoError::Service(CreateStreamError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(CreateStreamError::ResourceInUse(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CreateStreamError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CreateStreamError { fn description(&self) -> &str { match *self { CreateStreamError::InvalidArgument(ref cause) => cause, CreateStreamError::LimitExceeded(ref cause) => cause, CreateStreamError::ResourceInUse(ref cause) => cause, } } } /// Errors returned by DecreaseStreamRetentionPeriod #[derive(Debug, PartialEq)] pub enum DecreaseStreamRetentionPeriodError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl DecreaseStreamRetentionPeriodError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<DecreaseStreamRetentionPeriodError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service( DecreaseStreamRetentionPeriodError::InvalidArgument(err.msg), ) } "LimitExceededException" => { return RusotoError::Service(DecreaseStreamRetentionPeriodError::LimitExceeded( err.msg, )) } "ResourceInUseException" => { return RusotoError::Service(DecreaseStreamRetentionPeriodError::ResourceInUse( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service( DecreaseStreamRetentionPeriodError::ResourceNotFound(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DecreaseStreamRetentionPeriodError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DecreaseStreamRetentionPeriodError { fn description(&self) -> &str { match *self { DecreaseStreamRetentionPeriodError::InvalidArgument(ref cause) => cause, DecreaseStreamRetentionPeriodError::LimitExceeded(ref cause) => cause, DecreaseStreamRetentionPeriodError::ResourceInUse(ref cause) => cause, DecreaseStreamRetentionPeriodError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DeleteStream #[derive(Debug, PartialEq)] pub enum DeleteStreamError { /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl DeleteStreamError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStreamError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "LimitExceededException" => { return RusotoError::Service(DeleteStreamError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(DeleteStreamError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(DeleteStreamError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteStreamError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteStreamError { fn description(&self) -> &str { match *self { DeleteStreamError::LimitExceeded(ref cause) => cause, DeleteStreamError::ResourceInUse(ref cause) => cause, DeleteStreamError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DeregisterStreamConsumer #[derive(Debug, PartialEq)] pub enum DeregisterStreamConsumerError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl DeregisterStreamConsumerError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeregisterStreamConsumerError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(DeregisterStreamConsumerError::InvalidArgument( err.msg, )) } "LimitExceededException" => { return RusotoError::Service(DeregisterStreamConsumerError::LimitExceeded( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(DeregisterStreamConsumerError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeregisterStreamConsumerError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeregisterStreamConsumerError { fn description(&self) -> &str { match *self { DeregisterStreamConsumerError::InvalidArgument(ref cause) => cause, DeregisterStreamConsumerError::LimitExceeded(ref cause) => cause, DeregisterStreamConsumerError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DescribeLimits #[derive(Debug, PartialEq)] pub enum DescribeLimitsError { /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), } impl DescribeLimitsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLimitsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "LimitExceededException" => { return RusotoError::Service(DescribeLimitsError::LimitExceeded(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeLimitsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeLimitsError { fn description(&self) -> &str { match *self { DescribeLimitsError::LimitExceeded(ref cause) => cause, } } } /// Errors returned by DescribeStream #[derive(Debug, PartialEq)] pub enum DescribeStreamError { /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl DescribeStreamError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStreamError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "LimitExceededException" => { return RusotoError::Service(DescribeStreamError::LimitExceeded(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(DescribeStreamError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeStreamError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeStreamError { fn description(&self) -> &str { match *self { DescribeStreamError::LimitExceeded(ref cause) => cause, DescribeStreamError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DescribeStreamConsumer #[derive(Debug, PartialEq)] pub enum DescribeStreamConsumerError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl DescribeStreamConsumerError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStreamConsumerError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(DescribeStreamConsumerError::InvalidArgument( err.msg, )) } "LimitExceededException" => { return RusotoError::Service(DescribeStreamConsumerError::LimitExceeded( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(DescribeStreamConsumerError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeStreamConsumerError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeStreamConsumerError { fn description(&self) -> &str { match *self { DescribeStreamConsumerError::InvalidArgument(ref cause) => cause, DescribeStreamConsumerError::LimitExceeded(ref cause) => cause, DescribeStreamConsumerError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DescribeStreamSummary #[derive(Debug, PartialEq)] pub enum DescribeStreamSummaryError { /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl DescribeStreamSummaryError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStreamSummaryError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "LimitExceededException" => { return RusotoError::Service(DescribeStreamSummaryError::LimitExceeded(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(DescribeStreamSummaryError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeStreamSummaryError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeStreamSummaryError { fn description(&self) -> &str { match *self { DescribeStreamSummaryError::LimitExceeded(ref cause) => cause, DescribeStreamSummaryError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by DisableEnhancedMonitoring #[derive(Debug, PartialEq)] pub enum DisableEnhancedMonitoringError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl DisableEnhancedMonitoringError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableEnhancedMonitoringError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(DisableEnhancedMonitoringError::InvalidArgument( err.msg, )) } "LimitExceededException" => { return RusotoError::Service(DisableEnhancedMonitoringError::LimitExceeded( err.msg, )) } "ResourceInUseException" => { return RusotoError::Service(DisableEnhancedMonitoringError::ResourceInUse( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(DisableEnhancedMonitoringError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DisableEnhancedMonitoringError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DisableEnhancedMonitoringError { fn description(&self) -> &str { match *self { DisableEnhancedMonitoringError::InvalidArgument(ref cause) => cause, DisableEnhancedMonitoringError::LimitExceeded(ref cause) => cause, DisableEnhancedMonitoringError::ResourceInUse(ref cause) => cause, DisableEnhancedMonitoringError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by EnableEnhancedMonitoring #[derive(Debug, PartialEq)] pub enum EnableEnhancedMonitoringError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl EnableEnhancedMonitoringError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableEnhancedMonitoringError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(EnableEnhancedMonitoringError::InvalidArgument( err.msg, )) } "LimitExceededException" => { return RusotoError::Service(EnableEnhancedMonitoringError::LimitExceeded( err.msg, )) } "ResourceInUseException" => { return RusotoError::Service(EnableEnhancedMonitoringError::ResourceInUse( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(EnableEnhancedMonitoringError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for EnableEnhancedMonitoringError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for EnableEnhancedMonitoringError { fn description(&self) -> &str { match *self { EnableEnhancedMonitoringError::InvalidArgument(ref cause) => cause, EnableEnhancedMonitoringError::LimitExceeded(ref cause) => cause, EnableEnhancedMonitoringError::ResourceInUse(ref cause) => cause, EnableEnhancedMonitoringError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by GetRecords #[derive(Debug, PartialEq)] pub enum GetRecordsError { /// <p>The provided iterator exceeds the maximum age allowed.</p> ExpiredIterator(String), /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The ciphertext references a key that doesn't exist or that you don't have access to.</p> KMSAccessDenied(String), /// <p>The request was rejected because the specified customer master key (CMK) isn't enabled.</p> KMSDisabled(String), /// <p>The request was rejected because the state of the specified resource isn't valid for this request. For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">How Key State Affects Use of a Customer Master Key</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> KMSInvalidState(String), /// <p>The request was rejected because the specified entity or resource can't be found.</p> KMSNotFound(String), /// <p>The AWS access key ID needs a subscription for the service.</p> KMSOptInRequired(String), /// <p>The request was denied due to request throttling. For more information about throttling, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second">Limits</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> KMSThrottling(String), /// <p>The request rate for the stream is too high, or the requested data is too large for the available throughput. Reduce the frequency or size of your requests. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>, and <a href="http://docs.aws.amazon.com/general/latest/gr/api-retries.html">Error Retries and Exponential Backoff in AWS</a> in the <i>AWS General Reference</i>.</p> ProvisionedThroughputExceeded(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl GetRecordsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRecordsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ExpiredIteratorException" => { return RusotoError::Service(GetRecordsError::ExpiredIterator(err.msg)) } "InvalidArgumentException" => { return RusotoError::Service(GetRecordsError::InvalidArgument(err.msg)) } "KMSAccessDeniedException" => { return RusotoError::Service(GetRecordsError::KMSAccessDenied(err.msg)) } "KMSDisabledException" => { return RusotoError::Service(GetRecordsError::KMSDisabled(err.msg)) } "KMSInvalidStateException" => { return RusotoError::Service(GetRecordsError::KMSInvalidState(err.msg)) } "KMSNotFoundException" => { return RusotoError::Service(GetRecordsError::KMSNotFound(err.msg)) } "KMSOptInRequired" => { return RusotoError::Service(GetRecordsError::KMSOptInRequired(err.msg)) } "KMSThrottlingException" => { return RusotoError::Service(GetRecordsError::KMSThrottling(err.msg)) } "ProvisionedThroughputExceededException" => { return RusotoError::Service(GetRecordsError::ProvisionedThroughputExceeded( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(GetRecordsError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetRecordsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetRecordsError { fn description(&self) -> &str { match *self { GetRecordsError::ExpiredIterator(ref cause) => cause, GetRecordsError::InvalidArgument(ref cause) => cause, GetRecordsError::KMSAccessDenied(ref cause) => cause, GetRecordsError::KMSDisabled(ref cause) => cause, GetRecordsError::KMSInvalidState(ref cause) => cause, GetRecordsError::KMSNotFound(ref cause) => cause, GetRecordsError::KMSOptInRequired(ref cause) => cause, GetRecordsError::KMSThrottling(ref cause) => cause, GetRecordsError::ProvisionedThroughputExceeded(ref cause) => cause, GetRecordsError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by GetShardIterator #[derive(Debug, PartialEq)] pub enum GetShardIteratorError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The request rate for the stream is too high, or the requested data is too large for the available throughput. Reduce the frequency or size of your requests. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>, and <a href="http://docs.aws.amazon.com/general/latest/gr/api-retries.html">Error Retries and Exponential Backoff in AWS</a> in the <i>AWS General Reference</i>.</p> ProvisionedThroughputExceeded(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl GetShardIteratorError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetShardIteratorError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(GetShardIteratorError::InvalidArgument(err.msg)) } "ProvisionedThroughputExceededException" => { return RusotoError::Service( GetShardIteratorError::ProvisionedThroughputExceeded(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service(GetShardIteratorError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetShardIteratorError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetShardIteratorError { fn description(&self) -> &str { match *self { GetShardIteratorError::InvalidArgument(ref cause) => cause, GetShardIteratorError::ProvisionedThroughputExceeded(ref cause) => cause, GetShardIteratorError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by IncreaseStreamRetentionPeriod #[derive(Debug, PartialEq)] pub enum IncreaseStreamRetentionPeriodError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl IncreaseStreamRetentionPeriodError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<IncreaseStreamRetentionPeriodError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service( IncreaseStreamRetentionPeriodError::InvalidArgument(err.msg), ) } "LimitExceededException" => { return RusotoError::Service(IncreaseStreamRetentionPeriodError::LimitExceeded( err.msg, )) } "ResourceInUseException" => { return RusotoError::Service(IncreaseStreamRetentionPeriodError::ResourceInUse( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service( IncreaseStreamRetentionPeriodError::ResourceNotFound(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for IncreaseStreamRetentionPeriodError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for IncreaseStreamRetentionPeriodError { fn description(&self) -> &str { match *self { IncreaseStreamRetentionPeriodError::InvalidArgument(ref cause) => cause, IncreaseStreamRetentionPeriodError::LimitExceeded(ref cause) => cause, IncreaseStreamRetentionPeriodError::ResourceInUse(ref cause) => cause, IncreaseStreamRetentionPeriodError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by ListShards #[derive(Debug, PartialEq)] pub enum ListShardsError { /// <p>The pagination token passed to the operation is expired.</p> ExpiredNextToken(String), /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl ListShardsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListShardsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ExpiredNextTokenException" => { return RusotoError::Service(ListShardsError::ExpiredNextToken(err.msg)) } "InvalidArgumentException" => { return RusotoError::Service(ListShardsError::InvalidArgument(err.msg)) } "LimitExceededException" => { return RusotoError::Service(ListShardsError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(ListShardsError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(ListShardsError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListShardsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListShardsError { fn description(&self) -> &str { match *self { ListShardsError::ExpiredNextToken(ref cause) => cause, ListShardsError::InvalidArgument(ref cause) => cause, ListShardsError::LimitExceeded(ref cause) => cause, ListShardsError::ResourceInUse(ref cause) => cause, ListShardsError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by ListStreamConsumers #[derive(Debug, PartialEq)] pub enum ListStreamConsumersError { /// <p>The pagination token passed to the operation is expired.</p> ExpiredNextToken(String), /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl ListStreamConsumersError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStreamConsumersError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "ExpiredNextTokenException" => { return RusotoError::Service(ListStreamConsumersError::ExpiredNextToken( err.msg, )) } "InvalidArgumentException" => { return RusotoError::Service(ListStreamConsumersError::InvalidArgument(err.msg)) } "LimitExceededException" => { return RusotoError::Service(ListStreamConsumersError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(ListStreamConsumersError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(ListStreamConsumersError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListStreamConsumersError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListStreamConsumersError { fn description(&self) -> &str { match *self { ListStreamConsumersError::ExpiredNextToken(ref cause) => cause, ListStreamConsumersError::InvalidArgument(ref cause) => cause, ListStreamConsumersError::LimitExceeded(ref cause) => cause, ListStreamConsumersError::ResourceInUse(ref cause) => cause, ListStreamConsumersError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by ListStreams #[derive(Debug, PartialEq)] pub enum ListStreamsError { /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), } impl ListStreamsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStreamsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "LimitExceededException" => { return RusotoError::Service(ListStreamsError::LimitExceeded(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListStreamsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListStreamsError { fn description(&self) -> &str { match *self { ListStreamsError::LimitExceeded(ref cause) => cause, } } } /// Errors returned by ListTagsForStream #[derive(Debug, PartialEq)] pub enum ListTagsForStreamError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl ListTagsForStreamError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForStreamError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(ListTagsForStreamError::InvalidArgument(err.msg)) } "LimitExceededException" => { return RusotoError::Service(ListTagsForStreamError::LimitExceeded(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(ListTagsForStreamError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListTagsForStreamError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListTagsForStreamError { fn description(&self) -> &str { match *self { ListTagsForStreamError::InvalidArgument(ref cause) => cause, ListTagsForStreamError::LimitExceeded(ref cause) => cause, ListTagsForStreamError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by MergeShards #[derive(Debug, PartialEq)] pub enum MergeShardsError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl MergeShardsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<MergeShardsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(MergeShardsError::InvalidArgument(err.msg)) } "LimitExceededException" => { return RusotoError::Service(MergeShardsError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(MergeShardsError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(MergeShardsError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for MergeShardsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for MergeShardsError { fn description(&self) -> &str { match *self { MergeShardsError::InvalidArgument(ref cause) => cause, MergeShardsError::LimitExceeded(ref cause) => cause, MergeShardsError::ResourceInUse(ref cause) => cause, MergeShardsError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by PutRecord #[derive(Debug, PartialEq)] pub enum PutRecordError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The ciphertext references a key that doesn't exist or that you don't have access to.</p> KMSAccessDenied(String), /// <p>The request was rejected because the specified customer master key (CMK) isn't enabled.</p> KMSDisabled(String), /// <p>The request was rejected because the state of the specified resource isn't valid for this request. For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">How Key State Affects Use of a Customer Master Key</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> KMSInvalidState(String), /// <p>The request was rejected because the specified entity or resource can't be found.</p> KMSNotFound(String), /// <p>The AWS access key ID needs a subscription for the service.</p> KMSOptInRequired(String), /// <p>The request was denied due to request throttling. For more information about throttling, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second">Limits</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> KMSThrottling(String), /// <p>The request rate for the stream is too high, or the requested data is too large for the available throughput. Reduce the frequency or size of your requests. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>, and <a href="http://docs.aws.amazon.com/general/latest/gr/api-retries.html">Error Retries and Exponential Backoff in AWS</a> in the <i>AWS General Reference</i>.</p> ProvisionedThroughputExceeded(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl PutRecordError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutRecordError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(PutRecordError::InvalidArgument(err.msg)) } "KMSAccessDeniedException" => { return RusotoError::Service(PutRecordError::KMSAccessDenied(err.msg)) } "KMSDisabledException" => { return RusotoError::Service(PutRecordError::KMSDisabled(err.msg)) } "KMSInvalidStateException" => { return RusotoError::Service(PutRecordError::KMSInvalidState(err.msg)) } "KMSNotFoundException" => { return RusotoError::Service(PutRecordError::KMSNotFound(err.msg)) } "KMSOptInRequired" => { return RusotoError::Service(PutRecordError::KMSOptInRequired(err.msg)) } "KMSThrottlingException" => { return RusotoError::Service(PutRecordError::KMSThrottling(err.msg)) } "ProvisionedThroughputExceededException" => { return RusotoError::Service(PutRecordError::ProvisionedThroughputExceeded( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(PutRecordError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for PutRecordError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for PutRecordError { fn description(&self) -> &str { match *self { PutRecordError::InvalidArgument(ref cause) => cause, PutRecordError::KMSAccessDenied(ref cause) => cause, PutRecordError::KMSDisabled(ref cause) => cause, PutRecordError::KMSInvalidState(ref cause) => cause, PutRecordError::KMSNotFound(ref cause) => cause, PutRecordError::KMSOptInRequired(ref cause) => cause, PutRecordError::KMSThrottling(ref cause) => cause, PutRecordError::ProvisionedThroughputExceeded(ref cause) => cause, PutRecordError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by PutRecords #[derive(Debug, PartialEq)] pub enum PutRecordsError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The ciphertext references a key that doesn't exist or that you don't have access to.</p> KMSAccessDenied(String), /// <p>The request was rejected because the specified customer master key (CMK) isn't enabled.</p> KMSDisabled(String), /// <p>The request was rejected because the state of the specified resource isn't valid for this request. For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">How Key State Affects Use of a Customer Master Key</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> KMSInvalidState(String), /// <p>The request was rejected because the specified entity or resource can't be found.</p> KMSNotFound(String), /// <p>The AWS access key ID needs a subscription for the service.</p> KMSOptInRequired(String), /// <p>The request was denied due to request throttling. For more information about throttling, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second">Limits</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> KMSThrottling(String), /// <p>The request rate for the stream is too high, or the requested data is too large for the available throughput. Reduce the frequency or size of your requests. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>, and <a href="http://docs.aws.amazon.com/general/latest/gr/api-retries.html">Error Retries and Exponential Backoff in AWS</a> in the <i>AWS General Reference</i>.</p> ProvisionedThroughputExceeded(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl PutRecordsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutRecordsError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(PutRecordsError::InvalidArgument(err.msg)) } "KMSAccessDeniedException" => { return RusotoError::Service(PutRecordsError::KMSAccessDenied(err.msg)) } "KMSDisabledException" => { return RusotoError::Service(PutRecordsError::KMSDisabled(err.msg)) } "KMSInvalidStateException" => { return RusotoError::Service(PutRecordsError::KMSInvalidState(err.msg)) } "KMSNotFoundException" => { return RusotoError::Service(PutRecordsError::KMSNotFound(err.msg)) } "KMSOptInRequired" => { return RusotoError::Service(PutRecordsError::KMSOptInRequired(err.msg)) } "KMSThrottlingException" => { return RusotoError::Service(PutRecordsError::KMSThrottling(err.msg)) } "ProvisionedThroughputExceededException" => { return RusotoError::Service(PutRecordsError::ProvisionedThroughputExceeded( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(PutRecordsError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for PutRecordsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for PutRecordsError { fn description(&self) -> &str { match *self { PutRecordsError::InvalidArgument(ref cause) => cause, PutRecordsError::KMSAccessDenied(ref cause) => cause, PutRecordsError::KMSDisabled(ref cause) => cause, PutRecordsError::KMSInvalidState(ref cause) => cause, PutRecordsError::KMSNotFound(ref cause) => cause, PutRecordsError::KMSOptInRequired(ref cause) => cause, PutRecordsError::KMSThrottling(ref cause) => cause, PutRecordsError::ProvisionedThroughputExceeded(ref cause) => cause, PutRecordsError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by RegisterStreamConsumer #[derive(Debug, PartialEq)] pub enum RegisterStreamConsumerError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl RegisterStreamConsumerError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterStreamConsumerError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(RegisterStreamConsumerError::InvalidArgument( err.msg, )) } "LimitExceededException" => { return RusotoError::Service(RegisterStreamConsumerError::LimitExceeded( err.msg, )) } "ResourceInUseException" => { return RusotoError::Service(RegisterStreamConsumerError::ResourceInUse( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(RegisterStreamConsumerError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RegisterStreamConsumerError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RegisterStreamConsumerError { fn description(&self) -> &str { match *self { RegisterStreamConsumerError::InvalidArgument(ref cause) => cause, RegisterStreamConsumerError::LimitExceeded(ref cause) => cause, RegisterStreamConsumerError::ResourceInUse(ref cause) => cause, RegisterStreamConsumerError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by RemoveTagsFromStream #[derive(Debug, PartialEq)] pub enum RemoveTagsFromStreamError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl RemoveTagsFromStreamError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsFromStreamError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(RemoveTagsFromStreamError::InvalidArgument( err.msg, )) } "LimitExceededException" => { return RusotoError::Service(RemoveTagsFromStreamError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(RemoveTagsFromStreamError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(RemoveTagsFromStreamError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RemoveTagsFromStreamError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RemoveTagsFromStreamError { fn description(&self) -> &str { match *self { RemoveTagsFromStreamError::InvalidArgument(ref cause) => cause, RemoveTagsFromStreamError::LimitExceeded(ref cause) => cause, RemoveTagsFromStreamError::ResourceInUse(ref cause) => cause, RemoveTagsFromStreamError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by SplitShard #[derive(Debug, PartialEq)] pub enum SplitShardError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl SplitShardError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SplitShardError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(SplitShardError::InvalidArgument(err.msg)) } "LimitExceededException" => { return RusotoError::Service(SplitShardError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(SplitShardError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(SplitShardError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SplitShardError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SplitShardError { fn description(&self) -> &str { match *self { SplitShardError::InvalidArgument(ref cause) => cause, SplitShardError::LimitExceeded(ref cause) => cause, SplitShardError::ResourceInUse(ref cause) => cause, SplitShardError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by StartStreamEncryption #[derive(Debug, PartialEq)] pub enum StartStreamEncryptionError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The ciphertext references a key that doesn't exist or that you don't have access to.</p> KMSAccessDenied(String), /// <p>The request was rejected because the specified customer master key (CMK) isn't enabled.</p> KMSDisabled(String), /// <p>The request was rejected because the state of the specified resource isn't valid for this request. For more information, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">How Key State Affects Use of a Customer Master Key</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> KMSInvalidState(String), /// <p>The request was rejected because the specified entity or resource can't be found.</p> KMSNotFound(String), /// <p>The AWS access key ID needs a subscription for the service.</p> KMSOptInRequired(String), /// <p>The request was denied due to request throttling. For more information about throttling, see <a href="http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second">Limits</a> in the <i>AWS Key Management Service Developer Guide</i>.</p> KMSThrottling(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl StartStreamEncryptionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartStreamEncryptionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(StartStreamEncryptionError::InvalidArgument( err.msg, )) } "KMSAccessDeniedException" => { return RusotoError::Service(StartStreamEncryptionError::KMSAccessDenied( err.msg, )) } "KMSDisabledException" => { return RusotoError::Service(StartStreamEncryptionError::KMSDisabled(err.msg)) } "KMSInvalidStateException" => { return RusotoError::Service(StartStreamEncryptionError::KMSInvalidState( err.msg, )) } "KMSNotFoundException" => { return RusotoError::Service(StartStreamEncryptionError::KMSNotFound(err.msg)) } "KMSOptInRequired" => { return RusotoError::Service(StartStreamEncryptionError::KMSOptInRequired( err.msg, )) } "KMSThrottlingException" => { return RusotoError::Service(StartStreamEncryptionError::KMSThrottling(err.msg)) } "LimitExceededException" => { return RusotoError::Service(StartStreamEncryptionError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(StartStreamEncryptionError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(StartStreamEncryptionError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for StartStreamEncryptionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for StartStreamEncryptionError { fn description(&self) -> &str { match *self { StartStreamEncryptionError::InvalidArgument(ref cause) => cause, StartStreamEncryptionError::KMSAccessDenied(ref cause) => cause, StartStreamEncryptionError::KMSDisabled(ref cause) => cause, StartStreamEncryptionError::KMSInvalidState(ref cause) => cause, StartStreamEncryptionError::KMSNotFound(ref cause) => cause, StartStreamEncryptionError::KMSOptInRequired(ref cause) => cause, StartStreamEncryptionError::KMSThrottling(ref cause) => cause, StartStreamEncryptionError::LimitExceeded(ref cause) => cause, StartStreamEncryptionError::ResourceInUse(ref cause) => cause, StartStreamEncryptionError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by StopStreamEncryption #[derive(Debug, PartialEq)] pub enum StopStreamEncryptionError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl StopStreamEncryptionError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopStreamEncryptionError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(StopStreamEncryptionError::InvalidArgument( err.msg, )) } "LimitExceededException" => { return RusotoError::Service(StopStreamEncryptionError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(StopStreamEncryptionError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(StopStreamEncryptionError::ResourceNotFound( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for StopStreamEncryptionError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for StopStreamEncryptionError { fn description(&self) -> &str { match *self { StopStreamEncryptionError::InvalidArgument(ref cause) => cause, StopStreamEncryptionError::LimitExceeded(ref cause) => cause, StopStreamEncryptionError::ResourceInUse(ref cause) => cause, StopStreamEncryptionError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by SubscribeToShard #[derive(Debug, PartialEq)] pub enum SubscribeToShardError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl SubscribeToShardError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SubscribeToShardError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(SubscribeToShardError::InvalidArgument(err.msg)) } "LimitExceededException" => { return RusotoError::Service(SubscribeToShardError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(SubscribeToShardError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(SubscribeToShardError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SubscribeToShardError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SubscribeToShardError { fn description(&self) -> &str { match *self { SubscribeToShardError::InvalidArgument(ref cause) => cause, SubscribeToShardError::LimitExceeded(ref cause) => cause, SubscribeToShardError::ResourceInUse(ref cause) => cause, SubscribeToShardError::ResourceNotFound(ref cause) => cause, } } } /// Errors returned by UpdateShardCount #[derive(Debug, PartialEq)] pub enum UpdateShardCountError { /// <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p> InvalidArgument(String), /// <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p> LimitExceeded(String), /// <p>The resource is not available for this operation. For successful operation, the resource must be in the <code>ACTIVE</code> state.</p> ResourceInUse(String), /// <p>The requested resource could not be found. The stream might not be specified correctly.</p> ResourceNotFound(String), } impl UpdateShardCountError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateShardCountError> { if let Some(err) = proto::json::Error::parse(&res) { match err.typ.as_str() { "InvalidArgumentException" => { return RusotoError::Service(UpdateShardCountError::InvalidArgument(err.msg)) } "LimitExceededException" => { return RusotoError::Service(UpdateShardCountError::LimitExceeded(err.msg)) } "ResourceInUseException" => { return RusotoError::Service(UpdateShardCountError::ResourceInUse(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(UpdateShardCountError::ResourceNotFound(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UpdateShardCountError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UpdateShardCountError { fn description(&self) -> &str { match *self { UpdateShardCountError::InvalidArgument(ref cause) => cause, UpdateShardCountError::LimitExceeded(ref cause) => cause, UpdateShardCountError::ResourceInUse(ref cause) => cause, UpdateShardCountError::ResourceNotFound(ref cause) => cause, } } } /// Trait representing the capabilities of the Kinesis API. Kinesis clients implement this trait. pub trait Kinesis { /// <p>Adds or updates tags for the specified Kinesis data stream. Each time you invoke this operation, you can specify up to 10 tags. If you want to add more than 10 tags to your stream, you can invoke this operation multiple times. In total, each stream can have up to 50 tags.</p> <p>If tags have already been assigned to the stream, <code>AddTagsToStream</code> overwrites any existing tags that correspond to the specified tag keys.</p> <p> <a>AddTagsToStream</a> has a limit of five transactions per second per account.</p> fn add_tags_to_stream( &self, input: AddTagsToStreamInput, ) -> RusotoFuture<(), AddTagsToStreamError>; /// <p>Creates a Kinesis data stream. A stream captures and transports data records that are continuously emitted from different data sources or <i>producers</i>. Scale-out within a stream is explicitly supported by means of shards, which are uniquely identified groups of data records in a stream.</p> <p>You specify and control the number of shards that a stream is composed of. Each shard can support reads up to five transactions per second, up to a maximum data read total of 2 MB per second. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MB per second. If the amount of data input increases or decreases, you can add or remove shards.</p> <p>The stream name identifies the stream. The name is scoped to the AWS account used by the application. It is also scoped by AWS Region. That is, two streams in two different accounts can have the same name, and two streams in the same account, but in two different Regions, can have the same name.</p> <p> <code>CreateStream</code> is an asynchronous operation. Upon receiving a <code>CreateStream</code> request, Kinesis Data Streams immediately returns and sets the stream status to <code>CREATING</code>. After the stream is created, Kinesis Data Streams sets the stream status to <code>ACTIVE</code>. You should perform read and write operations only on an <code>ACTIVE</code> stream. </p> <p>You receive a <code>LimitExceededException</code> when making a <code>CreateStream</code> request when you try to do one of the following:</p> <ul> <li> <p>Have more than five streams in the <code>CREATING</code> state at any point in time.</p> </li> <li> <p>Create more shards than are authorized for your account.</p> </li> </ul> <p>For the default shard limit for an AWS account, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Amazon Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To increase this limit, <a href="http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">contact AWS Support</a>.</p> <p>You can use <code>DescribeStream</code> to check the stream status, which is returned in <code>StreamStatus</code>.</p> <p> <a>CreateStream</a> has a limit of five transactions per second per account.</p> fn create_stream(&self, input: CreateStreamInput) -> RusotoFuture<(), CreateStreamError>; /// <p>Decreases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The minimum value of a stream's retention period is 24 hours.</p> <p>This operation may result in lost data. For example, if the stream's retention period is 48 hours and is decreased to 24 hours, any data already in the stream that is older than 24 hours is inaccessible.</p> fn decrease_stream_retention_period( &self, input: DecreaseStreamRetentionPeriodInput, ) -> RusotoFuture<(), DecreaseStreamRetentionPeriodError>; /// <p>Deletes a Kinesis data stream and all its shards and data. You must shut down any applications that are operating on the stream before you delete the stream. If an application attempts to operate on a deleted stream, it receives the exception <code>ResourceNotFoundException</code>.</p> <p>If the stream is in the <code>ACTIVE</code> state, you can delete it. After a <code>DeleteStream</code> request, the specified stream is in the <code>DELETING</code> state until Kinesis Data Streams completes the deletion.</p> <p> <b>Note:</b> Kinesis Data Streams might continue to accept data read and write operations, such as <a>PutRecord</a>, <a>PutRecords</a>, and <a>GetRecords</a>, on a stream in the <code>DELETING</code> state until the stream deletion is complete.</p> <p>When you delete a stream, any shards in that stream are also deleted, and any tags are dissociated from the stream.</p> <p>You can use the <a>DescribeStream</a> operation to check the state of the stream, which is returned in <code>StreamStatus</code>.</p> <p> <a>DeleteStream</a> has a limit of five transactions per second per account.</p> fn delete_stream(&self, input: DeleteStreamInput) -> RusotoFuture<(), DeleteStreamError>; /// <p>To deregister a consumer, provide its ARN. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to deregister, you can use the <a>ListStreamConsumers</a> operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its name and ARN.</p> <p>This operation has a limit of five transactions per second per account.</p> fn deregister_stream_consumer( &self, input: DeregisterStreamConsumerInput, ) -> RusotoFuture<(), DeregisterStreamConsumerError>; /// <p>Describes the shard limits and usage for the account.</p> <p>If you update your account limits, the old limits might be returned for a few minutes.</p> <p>This operation has a limit of one transaction per second per account.</p> fn describe_limits(&self) -> RusotoFuture<DescribeLimitsOutput, DescribeLimitsError>; /// <p>Describes the specified Kinesis data stream.</p> <p>The information returned includes the stream name, Amazon Resource Name (ARN), creation time, enhanced metric configuration, and shard map. The shard map is an array of shard objects. For each shard object, there is the hash key and sequence number ranges that the shard spans, and the IDs of any earlier shards that played in a role in creating the shard. Every record ingested in the stream is identified by a sequence number, which is assigned when the record is put into the stream.</p> <p>You can limit the number of shards returned by each call. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-retrieve-shards.html">Retrieving Shards from a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>There are no guarantees about the chronological order shards returned. To process shards in chronological order, use the ID of the parent shard to track the lineage to the oldest shard.</p> <p>This operation has a limit of 10 transactions per second per account.</p> fn describe_stream( &self, input: DescribeStreamInput, ) -> RusotoFuture<DescribeStreamOutput, DescribeStreamError>; /// <p>To get the description of a registered consumer, provide the ARN of the consumer. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to describe, you can use the <a>ListStreamConsumers</a> operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream.</p> <p>This operation has a limit of 20 transactions per second per account.</p> fn describe_stream_consumer( &self, input: DescribeStreamConsumerInput, ) -> RusotoFuture<DescribeStreamConsumerOutput, DescribeStreamConsumerError>; /// <p>Provides a summarized description of the specified Kinesis data stream without the shard list.</p> <p>The information returned includes the stream name, Amazon Resource Name (ARN), status, record retention period, approximate creation time, monitoring, encryption details, and open shard count. </p> fn describe_stream_summary( &self, input: DescribeStreamSummaryInput, ) -> RusotoFuture<DescribeStreamSummaryOutput, DescribeStreamSummaryError>; /// <p>Disables enhanced monitoring.</p> fn disable_enhanced_monitoring( &self, input: DisableEnhancedMonitoringInput, ) -> RusotoFuture<EnhancedMonitoringOutput, DisableEnhancedMonitoringError>; /// <p>Enables enhanced Kinesis data stream monitoring for shard-level metrics.</p> fn enable_enhanced_monitoring( &self, input: EnableEnhancedMonitoringInput, ) -> RusotoFuture<EnhancedMonitoringOutput, EnableEnhancedMonitoringError>; /// <p>Gets data records from a Kinesis data stream's shard.</p> <p>Specify a shard iterator using the <code>ShardIterator</code> parameter. The shard iterator specifies the position in the shard from which you want to start reading data records sequentially. If there are no records available in the portion of the shard that the iterator points to, <a>GetRecords</a> returns an empty list. It might take multiple calls to get to a portion of the shard that contains records.</p> <p>You can scale by provisioning multiple shards per stream while considering service limits (for more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Amazon Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>). Your application should have one thread per shard, each reading continuously from its stream. To read from a stream continually, call <a>GetRecords</a> in a loop. Use <a>GetShardIterator</a> to get the shard iterator to specify in the first <a>GetRecords</a> call. <a>GetRecords</a> returns a new shard iterator in <code>NextShardIterator</code>. Specify the shard iterator returned in <code>NextShardIterator</code> in subsequent calls to <a>GetRecords</a>. If the shard has been closed, the shard iterator can't return more data and <a>GetRecords</a> returns <code>null</code> in <code>NextShardIterator</code>. You can terminate the loop when the shard is closed, or when the shard iterator reaches the record with the sequence number or other attribute that marks it as the last record to process.</p> <p>Each data record can be up to 1 MiB in size, and each shard can read up to 2 MiB per second. You can ensure that your calls don't exceed the maximum supported size or throughput by using the <code>Limit</code> parameter to specify the maximum number of records that <a>GetRecords</a> can return. Consider your average record size when determining this limit. The maximum number of records that can be returned per call is 10,000.</p> <p>The size of the data returned by <a>GetRecords</a> varies depending on the utilization of the shard. The maximum size of data that <a>GetRecords</a> can return is 10 MiB. If a call returns this amount of data, subsequent calls made within the next 5 seconds throw <code>ProvisionedThroughputExceededException</code>. If there is insufficient provisioned throughput on the stream, subsequent calls made within the next 1 second throw <code>ProvisionedThroughputExceededException</code>. <a>GetRecords</a> doesn't return any data when it throws an exception. For this reason, we recommend that you wait 1 second between calls to <a>GetRecords</a>. However, it's possible that the application will get exceptions for longer than 1 second.</p> <p>To detect whether the application is falling behind in processing, you can use the <code>MillisBehindLatest</code> response attribute. You can also monitor the stream using CloudWatch metrics and other mechanisms (see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html">Monitoring</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>).</p> <p>Each Amazon Kinesis record includes a value, <code>ApproximateArrivalTimestamp</code>, that is set when a stream successfully receives and stores a record. This is commonly referred to as a server-side time stamp, whereas a client-side time stamp is set when a data producer creates or sends the record to a stream (a data producer is any data source putting data records into a stream, for example with <a>PutRecords</a>). The time stamp has millisecond precision. There are no guarantees about the time stamp accuracy, or that the time stamp is always increasing. For example, records in a shard or across a stream might have time stamps that are out of order.</p> <p>This operation has a limit of five transactions per second per account.</p> fn get_records( &self, input: GetRecordsInput, ) -> RusotoFuture<GetRecordsOutput, GetRecordsError>; /// <p>Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it is returned to the requester.</p> <p>A shard iterator specifies the shard position from which to start reading data records sequentially. The position is specified using the sequence number of a data record in a shard. A sequence number is the identifier associated with every record ingested in the stream, and is assigned when a record is put into the stream. Each stream has one or more shards.</p> <p>You must specify the shard iterator type. For example, you can set the <code>ShardIteratorType</code> parameter to read exactly from the position denoted by a specific sequence number by using the <code>AT_SEQUENCE_NUMBER</code> shard iterator type. Alternatively, the parameter can read right after the sequence number by using the <code>AFTER_SEQUENCE_NUMBER</code> shard iterator type, using sequence numbers returned by earlier calls to <a>PutRecord</a>, <a>PutRecords</a>, <a>GetRecords</a>, or <a>DescribeStream</a>. In the request, you can specify the shard iterator type <code>AT_TIMESTAMP</code> to read records from an arbitrary point in time, <code>TRIM_HORIZON</code> to cause <code>ShardIterator</code> to point to the last untrimmed record in the shard in the system (the oldest data record in the shard), or <code>LATEST</code> so that you always read the most recent data in the shard. </p> <p>When you read repeatedly from a stream, use a <a>GetShardIterator</a> request to get the first shard iterator for use in your first <a>GetRecords</a> request and for subsequent reads use the shard iterator returned by the <a>GetRecords</a> request in <code>NextShardIterator</code>. A new shard iterator is returned by every <a>GetRecords</a> request in <code>NextShardIterator</code>, which you use in the <code>ShardIterator</code> parameter of the next <a>GetRecords</a> request. </p> <p>If a <a>GetShardIterator</a> request is made too often, you receive a <code>ProvisionedThroughputExceededException</code>. For more information about throughput limits, see <a>GetRecords</a>, and <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>If the shard is closed, <a>GetShardIterator</a> returns a valid iterator for the last sequence number of the shard. A shard can be closed as a result of using <a>SplitShard</a> or <a>MergeShards</a>.</p> <p> <a>GetShardIterator</a> has a limit of five transactions per second per account per open shard.</p> fn get_shard_iterator( &self, input: GetShardIteratorInput, ) -> RusotoFuture<GetShardIteratorOutput, GetShardIteratorError>; /// <p>Increases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The maximum value of a stream's retention period is 168 hours (7 days).</p> <p>If you choose a longer stream retention period, this operation increases the time period during which records that have not yet expired are accessible. However, it does not make previous, expired data (older than the stream's previous retention period) accessible after the operation has been called. For example, if a stream's retention period is set to 24 hours and is increased to 168 hours, any data that is older than 24 hours remains inaccessible to consumer applications.</p> fn increase_stream_retention_period( &self, input: IncreaseStreamRetentionPeriodInput, ) -> RusotoFuture<(), IncreaseStreamRetentionPeriodError>; /// <p><p>Lists the shards in a stream and provides information about each shard. This operation has a limit of 100 transactions per second per data stream.</p> <important> <p>This API is a new operation that is used by the Amazon Kinesis Client Library (KCL). If you have a fine-grained IAM policy that only allows specific operations, you must update your policy to allow calls to this API. For more information, see <a href="https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html">Controlling Access to Amazon Kinesis Data Streams Resources Using IAM</a>.</p> </important></p> fn list_shards( &self, input: ListShardsInput, ) -> RusotoFuture<ListShardsOutput, ListShardsError>; /// <p>Lists the consumers registered to receive data from a stream using enhanced fan-out, and provides information about each consumer.</p> <p>This operation has a limit of 10 transactions per second per account.</p> fn list_stream_consumers( &self, input: ListStreamConsumersInput, ) -> RusotoFuture<ListStreamConsumersOutput, ListStreamConsumersError>; /// <p>Lists your Kinesis data streams.</p> <p>The number of streams may be too large to return from a single call to <code>ListStreams</code>. You can limit the number of returned streams using the <code>Limit</code> parameter. If you do not specify a value for the <code>Limit</code> parameter, Kinesis Data Streams uses the default limit, which is currently 10.</p> <p>You can detect if there are more streams available to list by using the <code>HasMoreStreams</code> flag from the returned output. If there are more streams available, you can request more streams by using the name of the last stream returned by the <code>ListStreams</code> request in the <code>ExclusiveStartStreamName</code> parameter in a subsequent request to <code>ListStreams</code>. The group of stream names returned by the subsequent request is then added to the list. You can continue this process until all the stream names have been collected in the list. </p> <p> <a>ListStreams</a> has a limit of five transactions per second per account.</p> fn list_streams( &self, input: ListStreamsInput, ) -> RusotoFuture<ListStreamsOutput, ListStreamsError>; /// <p>Lists the tags for the specified Kinesis data stream. This operation has a limit of five transactions per second per account.</p> fn list_tags_for_stream( &self, input: ListTagsForStreamInput, ) -> RusotoFuture<ListTagsForStreamOutput, ListTagsForStreamError>; /// <p>Merges two adjacent shards in a Kinesis data stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data. Two shards are considered adjacent if the union of the hash key ranges for the two shards form a contiguous set with no gaps. For example, if you have two shards, one with a hash key range of 276...381 and the other with a hash key range of 382...454, then you could merge these two shards into a single shard that would have a hash key range of 276...454. After the merge, the single child shard receives data for all hash key values covered by the two parent shards.</p> <p> <code>MergeShards</code> is called when there is a need to reduce the overall capacity of a stream because of excess capacity that is not being used. You must specify the shard to be merged and the adjacent shard for a stream. For more information about merging shards, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html">Merge Two Shards</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>If the stream is in the <code>ACTIVE</code> state, you can call <code>MergeShards</code>. If a stream is in the <code>CREATING</code>, <code>UPDATING</code>, or <code>DELETING</code> state, <code>MergeShards</code> returns a <code>ResourceInUseException</code>. If the specified stream does not exist, <code>MergeShards</code> returns a <code>ResourceNotFoundException</code>. </p> <p>You can use <a>DescribeStream</a> to check the state of the stream, which is returned in <code>StreamStatus</code>.</p> <p> <code>MergeShards</code> is an asynchronous operation. Upon receiving a <code>MergeShards</code> request, Amazon Kinesis Data Streams immediately returns a response and sets the <code>StreamStatus</code> to <code>UPDATING</code>. After the operation is completed, Kinesis Data Streams sets the <code>StreamStatus</code> to <code>ACTIVE</code>. Read and write operations continue to work while the stream is in the <code>UPDATING</code> state. </p> <p>You use <a>DescribeStream</a> to determine the shard IDs that are specified in the <code>MergeShards</code> request. </p> <p>If you try to operate on too many streams in parallel using <a>CreateStream</a>, <a>DeleteStream</a>, <code>MergeShards</code>, or <a>SplitShard</a>, you receive a <code>LimitExceededException</code>. </p> <p> <code>MergeShards</code> has a limit of five transactions per second per account.</p> fn merge_shards(&self, input: MergeShardsInput) -> RusotoFuture<(), MergeShardsError>; /// <p>Writes a single data record into an Amazon Kinesis data stream. Call <code>PutRecord</code> to send data into the stream for real-time ingestion and subsequent processing, one record at a time. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MB per second.</p> <p>You must specify the name of the stream that captures, stores, and transports the data; a partition key; and the data blob itself.</p> <p>The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on.</p> <p>The partition key is used by Kinesis Data Streams to distribute data across shards. Kinesis Data Streams segregates the data records that belong to a stream into multiple shards, using the partition key associated with each data record to determine the shard to which a given data record belongs.</p> <p>Partition keys are Unicode strings, with a maximum length limit of 256 characters for each key. An MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards using the hash key ranges of the shards. You can override hashing the partition key to determine the shard by explicitly specifying a hash value using the <code>ExplicitHashKey</code> parameter. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p> <code>PutRecord</code> returns the shard ID of where the data record was placed and the sequence number that was assigned to the data record.</p> <p>Sequence numbers increase over time and are specific to a shard within a stream, not across all shards within a stream. To guarantee strictly increasing ordering, write serially to a shard and use the <code>SequenceNumberForOrdering</code> parameter. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>If a <code>PutRecord</code> request cannot be processed because of insufficient provisioned throughput on the shard involved in the request, <code>PutRecord</code> throws <code>ProvisionedThroughputExceededException</code>. </p> <p>By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use <a>IncreaseStreamRetentionPeriod</a> or <a>DecreaseStreamRetentionPeriod</a> to modify this retention period.</p> fn put_record(&self, input: PutRecordInput) -> RusotoFuture<PutRecordOutput, PutRecordError>; /// <p>Writes multiple data records into a Kinesis data stream in a single call (also referred to as a <code>PutRecords</code> request). Use this operation to send data into the stream for data ingestion and processing. </p> <p>Each <code>PutRecords</code> request can support up to 500 records. Each record in the request can be as large as 1 MB, up to a limit of 5 MB for the entire request, including partition keys. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MB per second.</p> <p>You must specify the name of the stream that captures, stores, and transports the data; and an array of request <code>Records</code>, with each record in the array requiring a partition key and data blob. The record size limit applies to the total size of the partition key and data blob.</p> <p>The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on.</p> <p>The partition key is used by Kinesis Data Streams as input to a hash function that maps the partition key and associated data to a specific shard. An MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>Each record in the <code>Records</code> array may include an optional parameter, <code>ExplicitHashKey</code>, which overrides the partition key to shard mapping. This parameter allows a data producer to determine explicitly the shard where the record is stored. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecords">Adding Multiple Records with PutRecords</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>The <code>PutRecords</code> response includes an array of response <code>Records</code>. Each record in the response array directly correlates with a record in the request array using natural ordering, from the top to the bottom of the request and response. The response <code>Records</code> array always includes the same number of records as the request array.</p> <p>The response <code>Records</code> array includes both successfully and unsuccessfully processed records. Kinesis Data Streams attempts to process all records in each <code>PutRecords</code> request. A single record failure does not stop the processing of subsequent records.</p> <p>A successfully processed record includes <code>ShardId</code> and <code>SequenceNumber</code> values. The <code>ShardId</code> parameter identifies the shard in the stream where the record is stored. The <code>SequenceNumber</code> parameter is an identifier assigned to the put record, unique to all records in the stream.</p> <p>An unsuccessfully processed record includes <code>ErrorCode</code> and <code>ErrorMessage</code> values. <code>ErrorCode</code> reflects the type of error and can be one of the following values: <code>ProvisionedThroughputExceededException</code> or <code>InternalFailure</code>. <code>ErrorMessage</code> provides more detailed information about the <code>ProvisionedThroughputExceededException</code> exception including the account ID, stream name, and shard ID of the record that was throttled. For more information about partially successful responses, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords">Adding Multiple Records with PutRecords</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use <a>IncreaseStreamRetentionPeriod</a> or <a>DecreaseStreamRetentionPeriod</a> to modify this retention period.</p> fn put_records( &self, input: PutRecordsInput, ) -> RusotoFuture<PutRecordsOutput, PutRecordsError>; /// <p>Registers a consumer with a Kinesis data stream. When you use this operation, the consumer you register can read data from the stream at a rate of up to 2 MiB per second. This rate is unaffected by the total number of consumers that read from the same stream.</p> <p>You can register up to 5 consumers per stream. A given consumer can only be registered with one stream.</p> <p>This operation has a limit of five transactions per second per account.</p> fn register_stream_consumer( &self, input: RegisterStreamConsumerInput, ) -> RusotoFuture<RegisterStreamConsumerOutput, RegisterStreamConsumerError>; /// <p>Removes tags from the specified Kinesis data stream. Removed tags are deleted and cannot be recovered after this operation successfully completes.</p> <p>If you specify a tag that does not exist, it is ignored.</p> <p> <a>RemoveTagsFromStream</a> has a limit of five transactions per second per account.</p> fn remove_tags_from_stream( &self, input: RemoveTagsFromStreamInput, ) -> RusotoFuture<(), RemoveTagsFromStreamError>; /// <p>Splits a shard into two new shards in the Kinesis data stream, to increase the stream's capacity to ingest and transport data. <code>SplitShard</code> is called when there is a need to increase the overall capacity of a stream because of an expected increase in the volume of data records being ingested. </p> <p>You can also use <code>SplitShard</code> when a shard appears to be approaching its maximum utilization; for example, the producers sending data into the specific shard are suddenly sending more than previously anticipated. You can also call <code>SplitShard</code> to increase stream capacity, so that more Kinesis Data Streams applications can simultaneously read data from the stream for real-time processing. </p> <p>You must specify the shard to be split and the new hash key, which is the position in the shard where the shard gets split in two. In many cases, the new hash key might be the average of the beginning and ending hash key, but it can be any hash key value in the range being mapped into the shard. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-split.html">Split a Shard</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>You can use <a>DescribeStream</a> to determine the shard ID and hash key values for the <code>ShardToSplit</code> and <code>NewStartingHashKey</code> parameters that are specified in the <code>SplitShard</code> request.</p> <p> <code>SplitShard</code> is an asynchronous operation. Upon receiving a <code>SplitShard</code> request, Kinesis Data Streams immediately returns a response and sets the stream status to <code>UPDATING</code>. After the operation is completed, Kinesis Data Streams sets the stream status to <code>ACTIVE</code>. Read and write operations continue to work while the stream is in the <code>UPDATING</code> state. </p> <p>You can use <code>DescribeStream</code> to check the status of the stream, which is returned in <code>StreamStatus</code>. If the stream is in the <code>ACTIVE</code> state, you can call <code>SplitShard</code>. If a stream is in <code>CREATING</code> or <code>UPDATING</code> or <code>DELETING</code> states, <code>DescribeStream</code> returns a <code>ResourceInUseException</code>.</p> <p>If the specified stream does not exist, <code>DescribeStream</code> returns a <code>ResourceNotFoundException</code>. If you try to create more shards than are authorized for your account, you receive a <code>LimitExceededException</code>. </p> <p>For the default shard limit for an AWS account, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To increase this limit, <a href="http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">contact AWS Support</a>.</p> <p>If you try to operate on too many streams simultaneously using <a>CreateStream</a>, <a>DeleteStream</a>, <a>MergeShards</a>, and/or <a>SplitShard</a>, you receive a <code>LimitExceededException</code>. </p> <p> <code>SplitShard</code> has a limit of five transactions per second per account.</p> fn split_shard(&self, input: SplitShardInput) -> RusotoFuture<(), SplitShardError>; /// <p>Enables or updates server-side encryption using an AWS KMS key for a specified stream. </p> <p>Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to <code>UPDATING</code>. After the update is complete, Kinesis Data Streams sets the status of the stream back to <code>ACTIVE</code>. Updating or applying encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is <code>UPDATING</code>. Once the status of the stream is <code>ACTIVE</code>, encryption begins for records written to the stream. </p> <p>API Limits: You can successfully apply a new AWS KMS key for server-side encryption 25 times in a rolling 24-hour period.</p> <p>Note: It can take up to 5 seconds after the stream is in an <code>ACTIVE</code> status before all records written to the stream are encrypted. After you enable encryption, you can verify that encryption is applied by inspecting the API response from <code>PutRecord</code> or <code>PutRecords</code>.</p> fn start_stream_encryption( &self, input: StartStreamEncryptionInput, ) -> RusotoFuture<(), StartStreamEncryptionError>; /// <p>Disables server-side encryption for a specified stream. </p> <p>Stopping encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to <code>UPDATING</code>. After the update is complete, Kinesis Data Streams sets the status of the stream back to <code>ACTIVE</code>. Stopping encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is <code>UPDATING</code>. Once the status of the stream is <code>ACTIVE</code>, records written to the stream are no longer encrypted by Kinesis Data Streams. </p> <p>API Limits: You can successfully disable server-side encryption 25 times in a rolling 24-hour period. </p> <p>Note: It can take up to 5 seconds after the stream is in an <code>ACTIVE</code> status before all records written to the stream are no longer subject to encryption. After you disabled encryption, you can verify that encryption is not applied by inspecting the API response from <code>PutRecord</code> or <code>PutRecords</code>.</p> fn stop_stream_encryption( &self, input: StopStreamEncryptionInput, ) -> RusotoFuture<(), StopStreamEncryptionError>; /// <p>Call this operation from your consumer after you call <a>RegisterStreamConsumer</a> to register the consumer with Kinesis Data Streams. If the call succeeds, your consumer starts receiving events of type <a>SubscribeToShardEvent</a> for up to 5 minutes, after which time you need to call <code>SubscribeToShard</code> again to renew the subscription if you want to continue to receive records.</p> <p>You can make one call to <code>SubscribeToShard</code> per second per <code>ConsumerARN</code>. If your call succeeds, and then you call the operation again less than 5 seconds later, the second call generates a <a>ResourceInUseException</a>. If you call the operation a second time more than 5 seconds after the first call succeeds, the second call succeeds and the first connection gets shut down.</p> fn subscribe_to_shard( &self, input: SubscribeToShardInput, ) -> RusotoFuture<SubscribeToShardOutput, SubscribeToShardError>; /// <p>Updates the shard count of the specified stream to the specified number of shards.</p> <p>Updating the shard count is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to <code>UPDATING</code>. After the update is complete, Kinesis Data Streams sets the status of the stream back to <code>ACTIVE</code>. Depending on the size of the stream, the scaling action could take a few minutes to complete. You can continue to read and write data to your stream while its status is <code>UPDATING</code>.</p> <p>To update the shard count, Kinesis Data Streams performs splits or merges on individual shards. This can cause short-lived shards to be created, in addition to the final shards. We recommend that you double or halve the shard count, as this results in the fewest number of splits or merges.</p> <p>This operation has the following default limits. By default, you cannot do the following:</p> <ul> <li> <p>Scale more than twice per rolling 24-hour period per stream</p> </li> <li> <p>Scale up to more than double your current shard count for a stream</p> </li> <li> <p>Scale down below half your current shard count for a stream</p> </li> <li> <p>Scale up to more than 500 shards in a stream</p> </li> <li> <p>Scale a stream with more than 500 shards down unless the result is less than 500 shards</p> </li> <li> <p>Scale up to more than the shard limit for your account</p> </li> </ul> <p>For the default limits for an AWS account, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To request an increase in the call rate limit, the shard limit for this API, or your overall shard limit, use the <a href="https://console.aws.amazon.com/support/v1#/case/create?issueType=service-limit-increase&limitType=service-code-kinesis">limits form</a>.</p> fn update_shard_count( &self, input: UpdateShardCountInput, ) -> RusotoFuture<UpdateShardCountOutput, UpdateShardCountError>; } /// A client for the Kinesis API. #[derive(Clone)] pub struct KinesisClient { client: Client, region: region::Region, } impl KinesisClient { /// 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) -> KinesisClient { KinesisClient { client: Client::shared(), region, } } pub fn new_with<P, D>( request_dispatcher: D, credentials_provider: P, region: region::Region, ) -> KinesisClient where P: ProvideAwsCredentials + Send + Sync + 'static, P::Future: Send, D: DispatchSignedRequest + Send + Sync + 'static, D::Future: Send, { KinesisClient { client: Client::new_with(credentials_provider, request_dispatcher), region, } } } impl Kinesis for KinesisClient { /// <p>Adds or updates tags for the specified Kinesis data stream. Each time you invoke this operation, you can specify up to 10 tags. If you want to add more than 10 tags to your stream, you can invoke this operation multiple times. In total, each stream can have up to 50 tags.</p> <p>If tags have already been assigned to the stream, <code>AddTagsToStream</code> overwrites any existing tags that correspond to the specified tag keys.</p> <p> <a>AddTagsToStream</a> has a limit of five transactions per second per account.</p> fn add_tags_to_stream( &self, input: AddTagsToStreamInput, ) -> RusotoFuture<(), AddTagsToStreamError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.AddTagsToStream"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(AddTagsToStreamError::from_response(response))), ) } }) } /// <p>Creates a Kinesis data stream. A stream captures and transports data records that are continuously emitted from different data sources or <i>producers</i>. Scale-out within a stream is explicitly supported by means of shards, which are uniquely identified groups of data records in a stream.</p> <p>You specify and control the number of shards that a stream is composed of. Each shard can support reads up to five transactions per second, up to a maximum data read total of 2 MB per second. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MB per second. If the amount of data input increases or decreases, you can add or remove shards.</p> <p>The stream name identifies the stream. The name is scoped to the AWS account used by the application. It is also scoped by AWS Region. That is, two streams in two different accounts can have the same name, and two streams in the same account, but in two different Regions, can have the same name.</p> <p> <code>CreateStream</code> is an asynchronous operation. Upon receiving a <code>CreateStream</code> request, Kinesis Data Streams immediately returns and sets the stream status to <code>CREATING</code>. After the stream is created, Kinesis Data Streams sets the stream status to <code>ACTIVE</code>. You should perform read and write operations only on an <code>ACTIVE</code> stream. </p> <p>You receive a <code>LimitExceededException</code> when making a <code>CreateStream</code> request when you try to do one of the following:</p> <ul> <li> <p>Have more than five streams in the <code>CREATING</code> state at any point in time.</p> </li> <li> <p>Create more shards than are authorized for your account.</p> </li> </ul> <p>For the default shard limit for an AWS account, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Amazon Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To increase this limit, <a href="http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">contact AWS Support</a>.</p> <p>You can use <code>DescribeStream</code> to check the stream status, which is returned in <code>StreamStatus</code>.</p> <p> <a>CreateStream</a> has a limit of five transactions per second per account.</p> fn create_stream(&self, input: CreateStreamInput) -> RusotoFuture<(), CreateStreamError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.CreateStream"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(CreateStreamError::from_response(response))), ) } }) } /// <p>Decreases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The minimum value of a stream's retention period is 24 hours.</p> <p>This operation may result in lost data. For example, if the stream's retention period is 48 hours and is decreased to 24 hours, any data already in the stream that is older than 24 hours is inaccessible.</p> fn decrease_stream_retention_period( &self, input: DecreaseStreamRetentionPeriodInput, ) -> RusotoFuture<(), DecreaseStreamRetentionPeriodError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "Kinesis_20131202.DecreaseStreamRetentionPeriod", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DecreaseStreamRetentionPeriodError::from_response(response)) })) } }) } /// <p>Deletes a Kinesis data stream and all its shards and data. You must shut down any applications that are operating on the stream before you delete the stream. If an application attempts to operate on a deleted stream, it receives the exception <code>ResourceNotFoundException</code>.</p> <p>If the stream is in the <code>ACTIVE</code> state, you can delete it. After a <code>DeleteStream</code> request, the specified stream is in the <code>DELETING</code> state until Kinesis Data Streams completes the deletion.</p> <p> <b>Note:</b> Kinesis Data Streams might continue to accept data read and write operations, such as <a>PutRecord</a>, <a>PutRecords</a>, and <a>GetRecords</a>, on a stream in the <code>DELETING</code> state until the stream deletion is complete.</p> <p>When you delete a stream, any shards in that stream are also deleted, and any tags are dissociated from the stream.</p> <p>You can use the <a>DescribeStream</a> operation to check the state of the stream, which is returned in <code>StreamStatus</code>.</p> <p> <a>DeleteStream</a> has a limit of five transactions per second per account.</p> fn delete_stream(&self, input: DeleteStreamInput) -> RusotoFuture<(), DeleteStreamError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.DeleteStream"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DeleteStreamError::from_response(response))), ) } }) } /// <p>To deregister a consumer, provide its ARN. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to deregister, you can use the <a>ListStreamConsumers</a> operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its name and ARN.</p> <p>This operation has a limit of five transactions per second per account.</p> fn deregister_stream_consumer( &self, input: DeregisterStreamConsumerInput, ) -> RusotoFuture<(), DeregisterStreamConsumerError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.DeregisterStreamConsumer"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DeregisterStreamConsumerError::from_response(response)) })) } }) } /// <p>Describes the shard limits and usage for the account.</p> <p>If you update your account limits, the old limits might be returned for a few minutes.</p> <p>This operation has a limit of one transaction per second per account.</p> fn describe_limits(&self) -> RusotoFuture<DescribeLimitsOutput, DescribeLimitsError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.DescribeLimits"); request.set_payload(Some(bytes::Bytes::from_static(b"{}"))); 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::<DescribeLimitsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeLimitsError::from_response(response))), ) } }) } /// <p>Describes the specified Kinesis data stream.</p> <p>The information returned includes the stream name, Amazon Resource Name (ARN), creation time, enhanced metric configuration, and shard map. The shard map is an array of shard objects. For each shard object, there is the hash key and sequence number ranges that the shard spans, and the IDs of any earlier shards that played in a role in creating the shard. Every record ingested in the stream is identified by a sequence number, which is assigned when the record is put into the stream.</p> <p>You can limit the number of shards returned by each call. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-retrieve-shards.html">Retrieving Shards from a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>There are no guarantees about the chronological order shards returned. To process shards in chronological order, use the ID of the parent shard to track the lineage to the oldest shard.</p> <p>This operation has a limit of 10 transactions per second per account.</p> fn describe_stream( &self, input: DescribeStreamInput, ) -> RusotoFuture<DescribeStreamOutput, DescribeStreamError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.DescribeStream"); 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::<DescribeStreamOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeStreamError::from_response(response))), ) } }) } /// <p>To get the description of a registered consumer, provide the ARN of the consumer. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to describe, you can use the <a>ListStreamConsumers</a> operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream.</p> <p>This operation has a limit of 20 transactions per second per account.</p> fn describe_stream_consumer( &self, input: DescribeStreamConsumerInput, ) -> RusotoFuture<DescribeStreamConsumerOutput, DescribeStreamConsumerError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.DescribeStreamConsumer"); 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::<DescribeStreamConsumerOutput, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(DescribeStreamConsumerError::from_response(response)) }), ) } }) } /// <p>Provides a summarized description of the specified Kinesis data stream without the shard list.</p> <p>The information returned includes the stream name, Amazon Resource Name (ARN), status, record retention period, approximate creation time, monitoring, encryption details, and open shard count. </p> fn describe_stream_summary( &self, input: DescribeStreamSummaryInput, ) -> RusotoFuture<DescribeStreamSummaryOutput, DescribeStreamSummaryError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.DescribeStreamSummary"); 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::<DescribeStreamSummaryOutput, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(DescribeStreamSummaryError::from_response(response)) }), ) } }) } /// <p>Disables enhanced monitoring.</p> fn disable_enhanced_monitoring( &self, input: DisableEnhancedMonitoringInput, ) -> RusotoFuture<EnhancedMonitoringOutput, DisableEnhancedMonitoringError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.DisableEnhancedMonitoring"); 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::<EnhancedMonitoringOutput, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DisableEnhancedMonitoringError::from_response(response)) })) } }) } /// <p>Enables enhanced Kinesis data stream monitoring for shard-level metrics.</p> fn enable_enhanced_monitoring( &self, input: EnableEnhancedMonitoringInput, ) -> RusotoFuture<EnhancedMonitoringOutput, EnableEnhancedMonitoringError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.EnableEnhancedMonitoring"); 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::<EnhancedMonitoringOutput, _>() })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(EnableEnhancedMonitoringError::from_response(response)) })) } }) } /// <p>Gets data records from a Kinesis data stream's shard.</p> <p>Specify a shard iterator using the <code>ShardIterator</code> parameter. The shard iterator specifies the position in the shard from which you want to start reading data records sequentially. If there are no records available in the portion of the shard that the iterator points to, <a>GetRecords</a> returns an empty list. It might take multiple calls to get to a portion of the shard that contains records.</p> <p>You can scale by provisioning multiple shards per stream while considering service limits (for more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Amazon Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>). Your application should have one thread per shard, each reading continuously from its stream. To read from a stream continually, call <a>GetRecords</a> in a loop. Use <a>GetShardIterator</a> to get the shard iterator to specify in the first <a>GetRecords</a> call. <a>GetRecords</a> returns a new shard iterator in <code>NextShardIterator</code>. Specify the shard iterator returned in <code>NextShardIterator</code> in subsequent calls to <a>GetRecords</a>. If the shard has been closed, the shard iterator can't return more data and <a>GetRecords</a> returns <code>null</code> in <code>NextShardIterator</code>. You can terminate the loop when the shard is closed, or when the shard iterator reaches the record with the sequence number or other attribute that marks it as the last record to process.</p> <p>Each data record can be up to 1 MiB in size, and each shard can read up to 2 MiB per second. You can ensure that your calls don't exceed the maximum supported size or throughput by using the <code>Limit</code> parameter to specify the maximum number of records that <a>GetRecords</a> can return. Consider your average record size when determining this limit. The maximum number of records that can be returned per call is 10,000.</p> <p>The size of the data returned by <a>GetRecords</a> varies depending on the utilization of the shard. The maximum size of data that <a>GetRecords</a> can return is 10 MiB. If a call returns this amount of data, subsequent calls made within the next 5 seconds throw <code>ProvisionedThroughputExceededException</code>. If there is insufficient provisioned throughput on the stream, subsequent calls made within the next 1 second throw <code>ProvisionedThroughputExceededException</code>. <a>GetRecords</a> doesn't return any data when it throws an exception. For this reason, we recommend that you wait 1 second between calls to <a>GetRecords</a>. However, it's possible that the application will get exceptions for longer than 1 second.</p> <p>To detect whether the application is falling behind in processing, you can use the <code>MillisBehindLatest</code> response attribute. You can also monitor the stream using CloudWatch metrics and other mechanisms (see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html">Monitoring</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>).</p> <p>Each Amazon Kinesis record includes a value, <code>ApproximateArrivalTimestamp</code>, that is set when a stream successfully receives and stores a record. This is commonly referred to as a server-side time stamp, whereas a client-side time stamp is set when a data producer creates or sends the record to a stream (a data producer is any data source putting data records into a stream, for example with <a>PutRecords</a>). The time stamp has millisecond precision. There are no guarantees about the time stamp accuracy, or that the time stamp is always increasing. For example, records in a shard or across a stream might have time stamps that are out of order.</p> <p>This operation has a limit of five transactions per second per account.</p> fn get_records( &self, input: GetRecordsInput, ) -> RusotoFuture<GetRecordsOutput, GetRecordsError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.GetRecords"); 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::<GetRecordsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(GetRecordsError::from_response(response))), ) } }) } /// <p>Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it is returned to the requester.</p> <p>A shard iterator specifies the shard position from which to start reading data records sequentially. The position is specified using the sequence number of a data record in a shard. A sequence number is the identifier associated with every record ingested in the stream, and is assigned when a record is put into the stream. Each stream has one or more shards.</p> <p>You must specify the shard iterator type. For example, you can set the <code>ShardIteratorType</code> parameter to read exactly from the position denoted by a specific sequence number by using the <code>AT_SEQUENCE_NUMBER</code> shard iterator type. Alternatively, the parameter can read right after the sequence number by using the <code>AFTER_SEQUENCE_NUMBER</code> shard iterator type, using sequence numbers returned by earlier calls to <a>PutRecord</a>, <a>PutRecords</a>, <a>GetRecords</a>, or <a>DescribeStream</a>. In the request, you can specify the shard iterator type <code>AT_TIMESTAMP</code> to read records from an arbitrary point in time, <code>TRIM_HORIZON</code> to cause <code>ShardIterator</code> to point to the last untrimmed record in the shard in the system (the oldest data record in the shard), or <code>LATEST</code> so that you always read the most recent data in the shard. </p> <p>When you read repeatedly from a stream, use a <a>GetShardIterator</a> request to get the first shard iterator for use in your first <a>GetRecords</a> request and for subsequent reads use the shard iterator returned by the <a>GetRecords</a> request in <code>NextShardIterator</code>. A new shard iterator is returned by every <a>GetRecords</a> request in <code>NextShardIterator</code>, which you use in the <code>ShardIterator</code> parameter of the next <a>GetRecords</a> request. </p> <p>If a <a>GetShardIterator</a> request is made too often, you receive a <code>ProvisionedThroughputExceededException</code>. For more information about throughput limits, see <a>GetRecords</a>, and <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>If the shard is closed, <a>GetShardIterator</a> returns a valid iterator for the last sequence number of the shard. A shard can be closed as a result of using <a>SplitShard</a> or <a>MergeShards</a>.</p> <p> <a>GetShardIterator</a> has a limit of five transactions per second per account per open shard.</p> fn get_shard_iterator( &self, input: GetShardIteratorInput, ) -> RusotoFuture<GetShardIteratorOutput, GetShardIteratorError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.GetShardIterator"); 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::<GetShardIteratorOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(GetShardIteratorError::from_response(response))), ) } }) } /// <p>Increases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The maximum value of a stream's retention period is 168 hours (7 days).</p> <p>If you choose a longer stream retention period, this operation increases the time period during which records that have not yet expired are accessible. However, it does not make previous, expired data (older than the stream's previous retention period) accessible after the operation has been called. For example, if a stream's retention period is set to 24 hours and is increased to 168 hours, any data that is older than 24 hours remains inaccessible to consumer applications.</p> fn increase_stream_retention_period( &self, input: IncreaseStreamRetentionPeriodInput, ) -> RusotoFuture<(), IncreaseStreamRetentionPeriodError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header( "x-amz-target", "Kinesis_20131202.IncreaseStreamRetentionPeriod", ); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(IncreaseStreamRetentionPeriodError::from_response(response)) })) } }) } /// <p><p>Lists the shards in a stream and provides information about each shard. This operation has a limit of 100 transactions per second per data stream.</p> <important> <p>This API is a new operation that is used by the Amazon Kinesis Client Library (KCL). If you have a fine-grained IAM policy that only allows specific operations, you must update your policy to allow calls to this API. For more information, see <a href="https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html">Controlling Access to Amazon Kinesis Data Streams Resources Using IAM</a>.</p> </important></p> fn list_shards( &self, input: ListShardsInput, ) -> RusotoFuture<ListShardsOutput, ListShardsError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.ListShards"); 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::<ListShardsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListShardsError::from_response(response))), ) } }) } /// <p>Lists the consumers registered to receive data from a stream using enhanced fan-out, and provides information about each consumer.</p> <p>This operation has a limit of 10 transactions per second per account.</p> fn list_stream_consumers( &self, input: ListStreamConsumersInput, ) -> RusotoFuture<ListStreamConsumersOutput, ListStreamConsumersError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.ListStreamConsumers"); 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::<ListStreamConsumersOutput, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(ListStreamConsumersError::from_response(response)) }), ) } }) } /// <p>Lists your Kinesis data streams.</p> <p>The number of streams may be too large to return from a single call to <code>ListStreams</code>. You can limit the number of returned streams using the <code>Limit</code> parameter. If you do not specify a value for the <code>Limit</code> parameter, Kinesis Data Streams uses the default limit, which is currently 10.</p> <p>You can detect if there are more streams available to list by using the <code>HasMoreStreams</code> flag from the returned output. If there are more streams available, you can request more streams by using the name of the last stream returned by the <code>ListStreams</code> request in the <code>ExclusiveStartStreamName</code> parameter in a subsequent request to <code>ListStreams</code>. The group of stream names returned by the subsequent request is then added to the list. You can continue this process until all the stream names have been collected in the list. </p> <p> <a>ListStreams</a> has a limit of five transactions per second per account.</p> fn list_streams( &self, input: ListStreamsInput, ) -> RusotoFuture<ListStreamsOutput, ListStreamsError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.ListStreams"); 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::<ListStreamsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListStreamsError::from_response(response))), ) } }) } /// <p>Lists the tags for the specified Kinesis data stream. This operation has a limit of five transactions per second per account.</p> fn list_tags_for_stream( &self, input: ListTagsForStreamInput, ) -> RusotoFuture<ListTagsForStreamOutput, ListTagsForStreamError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.ListTagsForStream"); 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::<ListTagsForStreamOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListTagsForStreamError::from_response(response))), ) } }) } /// <p>Merges two adjacent shards in a Kinesis data stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data. Two shards are considered adjacent if the union of the hash key ranges for the two shards form a contiguous set with no gaps. For example, if you have two shards, one with a hash key range of 276...381 and the other with a hash key range of 382...454, then you could merge these two shards into a single shard that would have a hash key range of 276...454. After the merge, the single child shard receives data for all hash key values covered by the two parent shards.</p> <p> <code>MergeShards</code> is called when there is a need to reduce the overall capacity of a stream because of excess capacity that is not being used. You must specify the shard to be merged and the adjacent shard for a stream. For more information about merging shards, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html">Merge Two Shards</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>If the stream is in the <code>ACTIVE</code> state, you can call <code>MergeShards</code>. If a stream is in the <code>CREATING</code>, <code>UPDATING</code>, or <code>DELETING</code> state, <code>MergeShards</code> returns a <code>ResourceInUseException</code>. If the specified stream does not exist, <code>MergeShards</code> returns a <code>ResourceNotFoundException</code>. </p> <p>You can use <a>DescribeStream</a> to check the state of the stream, which is returned in <code>StreamStatus</code>.</p> <p> <code>MergeShards</code> is an asynchronous operation. Upon receiving a <code>MergeShards</code> request, Amazon Kinesis Data Streams immediately returns a response and sets the <code>StreamStatus</code> to <code>UPDATING</code>. After the operation is completed, Kinesis Data Streams sets the <code>StreamStatus</code> to <code>ACTIVE</code>. Read and write operations continue to work while the stream is in the <code>UPDATING</code> state. </p> <p>You use <a>DescribeStream</a> to determine the shard IDs that are specified in the <code>MergeShards</code> request. </p> <p>If you try to operate on too many streams in parallel using <a>CreateStream</a>, <a>DeleteStream</a>, <code>MergeShards</code>, or <a>SplitShard</a>, you receive a <code>LimitExceededException</code>. </p> <p> <code>MergeShards</code> has a limit of five transactions per second per account.</p> fn merge_shards(&self, input: MergeShardsInput) -> RusotoFuture<(), MergeShardsError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.MergeShards"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(MergeShardsError::from_response(response))), ) } }) } /// <p>Writes a single data record into an Amazon Kinesis data stream. Call <code>PutRecord</code> to send data into the stream for real-time ingestion and subsequent processing, one record at a time. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MB per second.</p> <p>You must specify the name of the stream that captures, stores, and transports the data; a partition key; and the data blob itself.</p> <p>The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on.</p> <p>The partition key is used by Kinesis Data Streams to distribute data across shards. Kinesis Data Streams segregates the data records that belong to a stream into multiple shards, using the partition key associated with each data record to determine the shard to which a given data record belongs.</p> <p>Partition keys are Unicode strings, with a maximum length limit of 256 characters for each key. An MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards using the hash key ranges of the shards. You can override hashing the partition key to determine the shard by explicitly specifying a hash value using the <code>ExplicitHashKey</code> parameter. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p> <code>PutRecord</code> returns the shard ID of where the data record was placed and the sequence number that was assigned to the data record.</p> <p>Sequence numbers increase over time and are specific to a shard within a stream, not across all shards within a stream. To guarantee strictly increasing ordering, write serially to a shard and use the <code>SequenceNumberForOrdering</code> parameter. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>If a <code>PutRecord</code> request cannot be processed because of insufficient provisioned throughput on the shard involved in the request, <code>PutRecord</code> throws <code>ProvisionedThroughputExceededException</code>. </p> <p>By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use <a>IncreaseStreamRetentionPeriod</a> or <a>DecreaseStreamRetentionPeriod</a> to modify this retention period.</p> fn put_record(&self, input: PutRecordInput) -> RusotoFuture<PutRecordOutput, PutRecordError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.PutRecord"); 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::<PutRecordOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(PutRecordError::from_response(response))), ) } }) } /// <p>Writes multiple data records into a Kinesis data stream in a single call (also referred to as a <code>PutRecords</code> request). Use this operation to send data into the stream for data ingestion and processing. </p> <p>Each <code>PutRecords</code> request can support up to 500 records. Each record in the request can be as large as 1 MB, up to a limit of 5 MB for the entire request, including partition keys. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MB per second.</p> <p>You must specify the name of the stream that captures, stores, and transports the data; and an array of request <code>Records</code>, with each record in the array requiring a partition key and data blob. The record size limit applies to the total size of the partition key and data blob.</p> <p>The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on.</p> <p>The partition key is used by Kinesis Data Streams as input to a hash function that maps the partition key and associated data to a specific shard. An MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>Each record in the <code>Records</code> array may include an optional parameter, <code>ExplicitHashKey</code>, which overrides the partition key to shard mapping. This parameter allows a data producer to determine explicitly the shard where the record is stored. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecords">Adding Multiple Records with PutRecords</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>The <code>PutRecords</code> response includes an array of response <code>Records</code>. Each record in the response array directly correlates with a record in the request array using natural ordering, from the top to the bottom of the request and response. The response <code>Records</code> array always includes the same number of records as the request array.</p> <p>The response <code>Records</code> array includes both successfully and unsuccessfully processed records. Kinesis Data Streams attempts to process all records in each <code>PutRecords</code> request. A single record failure does not stop the processing of subsequent records.</p> <p>A successfully processed record includes <code>ShardId</code> and <code>SequenceNumber</code> values. The <code>ShardId</code> parameter identifies the shard in the stream where the record is stored. The <code>SequenceNumber</code> parameter is an identifier assigned to the put record, unique to all records in the stream.</p> <p>An unsuccessfully processed record includes <code>ErrorCode</code> and <code>ErrorMessage</code> values. <code>ErrorCode</code> reflects the type of error and can be one of the following values: <code>ProvisionedThroughputExceededException</code> or <code>InternalFailure</code>. <code>ErrorMessage</code> provides more detailed information about the <code>ProvisionedThroughputExceededException</code> exception including the account ID, stream name, and shard ID of the record that was throttled. For more information about partially successful responses, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords">Adding Multiple Records with PutRecords</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use <a>IncreaseStreamRetentionPeriod</a> or <a>DecreaseStreamRetentionPeriod</a> to modify this retention period.</p> fn put_records( &self, input: PutRecordsInput, ) -> RusotoFuture<PutRecordsOutput, PutRecordsError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.PutRecords"); 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::<PutRecordsOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(PutRecordsError::from_response(response))), ) } }) } /// <p>Registers a consumer with a Kinesis data stream. When you use this operation, the consumer you register can read data from the stream at a rate of up to 2 MiB per second. This rate is unaffected by the total number of consumers that read from the same stream.</p> <p>You can register up to 5 consumers per stream. A given consumer can only be registered with one stream.</p> <p>This operation has a limit of five transactions per second per account.</p> fn register_stream_consumer( &self, input: RegisterStreamConsumerInput, ) -> RusotoFuture<RegisterStreamConsumerOutput, RegisterStreamConsumerError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.RegisterStreamConsumer"); 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::<RegisterStreamConsumerOutput, _>() })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(RegisterStreamConsumerError::from_response(response)) }), ) } }) } /// <p>Removes tags from the specified Kinesis data stream. Removed tags are deleted and cannot be recovered after this operation successfully completes.</p> <p>If you specify a tag that does not exist, it is ignored.</p> <p> <a>RemoveTagsFromStream</a> has a limit of five transactions per second per account.</p> fn remove_tags_from_stream( &self, input: RemoveTagsFromStreamInput, ) -> RusotoFuture<(), RemoveTagsFromStreamError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.RemoveTagsFromStream"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(RemoveTagsFromStreamError::from_response(response)) }), ) } }) } /// <p>Splits a shard into two new shards in the Kinesis data stream, to increase the stream's capacity to ingest and transport data. <code>SplitShard</code> is called when there is a need to increase the overall capacity of a stream because of an expected increase in the volume of data records being ingested. </p> <p>You can also use <code>SplitShard</code> when a shard appears to be approaching its maximum utilization; for example, the producers sending data into the specific shard are suddenly sending more than previously anticipated. You can also call <code>SplitShard</code> to increase stream capacity, so that more Kinesis Data Streams applications can simultaneously read data from the stream for real-time processing. </p> <p>You must specify the shard to be split and the new hash key, which is the position in the shard where the shard gets split in two. In many cases, the new hash key might be the average of the beginning and ending hash key, but it can be any hash key value in the range being mapped into the shard. For more information, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-split.html">Split a Shard</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <p>You can use <a>DescribeStream</a> to determine the shard ID and hash key values for the <code>ShardToSplit</code> and <code>NewStartingHashKey</code> parameters that are specified in the <code>SplitShard</code> request.</p> <p> <code>SplitShard</code> is an asynchronous operation. Upon receiving a <code>SplitShard</code> request, Kinesis Data Streams immediately returns a response and sets the stream status to <code>UPDATING</code>. After the operation is completed, Kinesis Data Streams sets the stream status to <code>ACTIVE</code>. Read and write operations continue to work while the stream is in the <code>UPDATING</code> state. </p> <p>You can use <code>DescribeStream</code> to check the status of the stream, which is returned in <code>StreamStatus</code>. If the stream is in the <code>ACTIVE</code> state, you can call <code>SplitShard</code>. If a stream is in <code>CREATING</code> or <code>UPDATING</code> or <code>DELETING</code> states, <code>DescribeStream</code> returns a <code>ResourceInUseException</code>.</p> <p>If the specified stream does not exist, <code>DescribeStream</code> returns a <code>ResourceNotFoundException</code>. If you try to create more shards than are authorized for your account, you receive a <code>LimitExceededException</code>. </p> <p>For the default shard limit for an AWS account, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To increase this limit, <a href="http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">contact AWS Support</a>.</p> <p>If you try to operate on too many streams simultaneously using <a>CreateStream</a>, <a>DeleteStream</a>, <a>MergeShards</a>, and/or <a>SplitShard</a>, you receive a <code>LimitExceededException</code>. </p> <p> <code>SplitShard</code> has a limit of five transactions per second per account.</p> fn split_shard(&self, input: SplitShardInput) -> RusotoFuture<(), SplitShardError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.SplitShard"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(SplitShardError::from_response(response))), ) } }) } /// <p>Enables or updates server-side encryption using an AWS KMS key for a specified stream. </p> <p>Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to <code>UPDATING</code>. After the update is complete, Kinesis Data Streams sets the status of the stream back to <code>ACTIVE</code>. Updating or applying encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is <code>UPDATING</code>. Once the status of the stream is <code>ACTIVE</code>, encryption begins for records written to the stream. </p> <p>API Limits: You can successfully apply a new AWS KMS key for server-side encryption 25 times in a rolling 24-hour period.</p> <p>Note: It can take up to 5 seconds after the stream is in an <code>ACTIVE</code> status before all records written to the stream are encrypted. After you enable encryption, you can verify that encryption is applied by inspecting the API response from <code>PutRecord</code> or <code>PutRecords</code>.</p> fn start_stream_encryption( &self, input: StartStreamEncryptionInput, ) -> RusotoFuture<(), StartStreamEncryptionError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.StartStreamEncryption"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(StartStreamEncryptionError::from_response(response)) }), ) } }) } /// <p>Disables server-side encryption for a specified stream. </p> <p>Stopping encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to <code>UPDATING</code>. After the update is complete, Kinesis Data Streams sets the status of the stream back to <code>ACTIVE</code>. Stopping encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is <code>UPDATING</code>. Once the status of the stream is <code>ACTIVE</code>, records written to the stream are no longer encrypted by Kinesis Data Streams. </p> <p>API Limits: You can successfully disable server-side encryption 25 times in a rolling 24-hour period. </p> <p>Note: It can take up to 5 seconds after the stream is in an <code>ACTIVE</code> status before all records written to the stream are no longer subject to encryption. After you disabled encryption, you can verify that encryption is not applied by inspecting the API response from <code>PutRecord</code> or <code>PutRecords</code>.</p> fn stop_stream_encryption( &self, input: StopStreamEncryptionInput, ) -> RusotoFuture<(), StopStreamEncryptionError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.StopStreamEncryption"); let encoded = serde_json::to_string(&input).unwrap(); request.set_payload(Some(encoded)); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(future::ok(::std::mem::drop(response))) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(StopStreamEncryptionError::from_response(response)) }), ) } }) } /// <p>Call this operation from your consumer after you call <a>RegisterStreamConsumer</a> to register the consumer with Kinesis Data Streams. If the call succeeds, your consumer starts receiving events of type <a>SubscribeToShardEvent</a> for up to 5 minutes, after which time you need to call <code>SubscribeToShard</code> again to renew the subscription if you want to continue to receive records.</p> <p>You can make one call to <code>SubscribeToShard</code> per second per <code>ConsumerARN</code>. If your call succeeds, and then you call the operation again less than 5 seconds later, the second call generates a <a>ResourceInUseException</a>. If you call the operation a second time more than 5 seconds after the first call succeeds, the second call succeeds and the first connection gets shut down.</p> fn subscribe_to_shard( &self, input: SubscribeToShardInput, ) -> RusotoFuture<SubscribeToShardOutput, SubscribeToShardError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.SubscribeToShard"); 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::<SubscribeToShardOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(SubscribeToShardError::from_response(response))), ) } }) } /// <p>Updates the shard count of the specified stream to the specified number of shards.</p> <p>Updating the shard count is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to <code>UPDATING</code>. After the update is complete, Kinesis Data Streams sets the status of the stream back to <code>ACTIVE</code>. Depending on the size of the stream, the scaling action could take a few minutes to complete. You can continue to read and write data to your stream while its status is <code>UPDATING</code>.</p> <p>To update the shard count, Kinesis Data Streams performs splits or merges on individual shards. This can cause short-lived shards to be created, in addition to the final shards. We recommend that you double or halve the shard count, as this results in the fewest number of splits or merges.</p> <p>This operation has the following default limits. By default, you cannot do the following:</p> <ul> <li> <p>Scale more than twice per rolling 24-hour period per stream</p> </li> <li> <p>Scale up to more than double your current shard count for a stream</p> </li> <li> <p>Scale down below half your current shard count for a stream</p> </li> <li> <p>Scale up to more than 500 shards in a stream</p> </li> <li> <p>Scale a stream with more than 500 shards down unless the result is less than 500 shards</p> </li> <li> <p>Scale up to more than the shard limit for your account</p> </li> </ul> <p>For the default limits for an AWS account, see <a href="http://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To request an increase in the call rate limit, the shard limit for this API, or your overall shard limit, use the <a href="https://console.aws.amazon.com/support/v1#/case/create?issueType=service-limit-increase&limitType=service-code-kinesis">limits form</a>.</p> fn update_shard_count( &self, input: UpdateShardCountInput, ) -> RusotoFuture<UpdateShardCountOutput, UpdateShardCountError> { let mut request = SignedRequest::new("POST", "kinesis", &self.region, "/"); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-target", "Kinesis_20131202.UpdateShardCount"); 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::<UpdateShardCountOutput, _>() })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(UpdateShardCountError::from_response(response))), ) } }) } }