1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636
// ================================================================= // // * 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::param::{Params, ServiceParams}; use rusoto_core::proto; use rusoto_core::signature::SignedRequest; use serde_json; /// <p>Provides options to abort a multipart upload identified by the upload ID.</p> <p>For information about the underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-abort-upload.html">Abort Multipart Upload</a>. For conceptual information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html">Working with Archives in Amazon Glacier</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct AbortMultipartUploadInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The upload ID of the multipart upload to delete.</p> #[serde(rename = "uploadId")] pub upload_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>The input values for <code>AbortVaultLock</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct AbortVaultLockInput { /// <p>The <code>AccountId</code> value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>The input values for <code>AddTagsToVault</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct AddTagsToVaultInput { /// <p>The tags to add to the vault. Each tag is composed of a key and a value. The value can be an empty string.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<::std::collections::HashMap<String, String>>, /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> <p>For information about the underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html">Upload Archive</a>. For conceptual information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html">Working with Archives in Amazon Glacier</a>.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ArchiveCreationOutput { /// <p>The ID of the archive. This value is also included as part of the location.</p> #[serde(rename = "archiveId")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_id: Option<String>, /// <p>The checksum of the archive computed by Amazon Glacier.</p> #[serde(rename = "checksum")] #[serde(skip_serializing_if = "Option::is_none")] pub checksum: Option<String>, /// <p>The relative URI path of the newly added archive resource.</p> #[serde(rename = "location")] #[serde(skip_serializing_if = "Option::is_none")] pub location: Option<String>, } /// <p>Contains information about the comma-separated value (CSV) file to select from.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CSVInput { /// <p>A single character used to indicate that a row should be ignored when the character is present at the start of that row.</p> #[serde(rename = "Comments")] #[serde(skip_serializing_if = "Option::is_none")] pub comments: Option<String>, /// <p>A value used to separate individual fields from each other within a record.</p> #[serde(rename = "FieldDelimiter")] #[serde(skip_serializing_if = "Option::is_none")] pub field_delimiter: Option<String>, /// <p>Describes the first line of input. Valid values are <code>None</code>, <code>Ignore</code>, and <code>Use</code>.</p> #[serde(rename = "FileHeaderInfo")] #[serde(skip_serializing_if = "Option::is_none")] pub file_header_info: Option<String>, /// <p>A value used as an escape character where the field delimiter is part of the value.</p> #[serde(rename = "QuoteCharacter")] #[serde(skip_serializing_if = "Option::is_none")] pub quote_character: Option<String>, /// <p>A single character used for escaping the quotation-mark character inside an already escaped value.</p> #[serde(rename = "QuoteEscapeCharacter")] #[serde(skip_serializing_if = "Option::is_none")] pub quote_escape_character: Option<String>, /// <p>A value used to separate individual records from each other.</p> #[serde(rename = "RecordDelimiter")] #[serde(skip_serializing_if = "Option::is_none")] pub record_delimiter: Option<String>, } /// <p>Contains information about the comma-separated value (CSV) file that the job results are stored in.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct CSVOutput { /// <p>A value used to separate individual fields from each other within a record.</p> #[serde(rename = "FieldDelimiter")] #[serde(skip_serializing_if = "Option::is_none")] pub field_delimiter: Option<String>, /// <p>A value used as an escape character where the field delimiter is part of the value.</p> #[serde(rename = "QuoteCharacter")] #[serde(skip_serializing_if = "Option::is_none")] pub quote_character: Option<String>, /// <p>A single character used for escaping the quotation-mark character inside an already escaped value.</p> #[serde(rename = "QuoteEscapeCharacter")] #[serde(skip_serializing_if = "Option::is_none")] pub quote_escape_character: Option<String>, /// <p>A value that indicates whether all output fields should be contained within quotation marks.</p> #[serde(rename = "QuoteFields")] #[serde(skip_serializing_if = "Option::is_none")] pub quote_fields: Option<String>, /// <p>A value used to separate individual records from each other.</p> #[serde(rename = "RecordDelimiter")] #[serde(skip_serializing_if = "Option::is_none")] pub record_delimiter: Option<String>, } /// <p>Provides options to complete a multipart upload operation. This informs Amazon Glacier that all the archive parts have been uploaded and Amazon Glacier can now assemble the archive from the uploaded parts. After assembling and saving the archive to the vault, Amazon Glacier returns the URI path of the newly created archive resource.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CompleteMultipartUploadInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The total size, in bytes, of the entire archive. This value should be the sum of all the sizes of the individual parts that you uploaded.</p> #[serde(rename = "archiveSize")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_size: Option<String>, /// <p>The SHA256 tree hash of the entire archive. It is the tree hash of SHA256 tree hash of the individual parts. If the value you specify in the request does not match the SHA256 tree hash of the final assembled archive as computed by Amazon Glacier, Amazon Glacier returns an error and the request fails.</p> #[serde(rename = "checksum")] #[serde(skip_serializing_if = "Option::is_none")] pub checksum: Option<String>, /// <p>The upload ID of the multipart upload.</p> #[serde(rename = "uploadId")] pub upload_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>The input values for <code>CompleteVaultLock</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CompleteVaultLockInput { /// <p>The <code>AccountId</code> value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The <code>lockId</code> value is the lock ID obtained from a <a>InitiateVaultLock</a> request.</p> #[serde(rename = "lockId")] pub lock_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Provides options to create a vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct CreateVaultInput { /// <p>The <code>AccountId</code> value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct CreateVaultOutput { /// <p>The URI of the vault that was created.</p> #[serde(rename = "location")] #[serde(skip_serializing_if = "Option::is_none")] pub location: Option<String>, } /// <p>Data retrieval policy.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct DataRetrievalPolicy { /// <p>The policy rule. Although this is a list type, currently there must be only one rule, which contains a Strategy field and optionally a BytesPerHour field.</p> #[serde(rename = "Rules")] #[serde(skip_serializing_if = "Option::is_none")] pub rules: Option<Vec<DataRetrievalRule>>, } /// <p>Data retrieval policy rule.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct DataRetrievalRule { /// <p>The maximum number of bytes that can be retrieved in an hour.</p> <p>This field is required only if the value of the Strategy field is <code>BytesPerHour</code>. Your PUT operation will be rejected if the Strategy field is not set to <code>BytesPerHour</code> and you set this field.</p> #[serde(rename = "BytesPerHour")] #[serde(skip_serializing_if = "Option::is_none")] pub bytes_per_hour: Option<i64>, /// <p>The type of data retrieval policy to set.</p> <p>Valid values: BytesPerHour|FreeTier|None</p> #[serde(rename = "Strategy")] #[serde(skip_serializing_if = "Option::is_none")] pub strategy: Option<String>, } /// <p>Provides options for deleting an archive from an Amazon Glacier vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteArchiveInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The ID of the archive to delete.</p> #[serde(rename = "archiveId")] pub archive_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>DeleteVaultAccessPolicy input.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteVaultAccessPolicyInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Provides options for deleting a vault from Amazon Glacier.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteVaultInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Provides options for deleting a vault notification configuration from an Amazon Glacier vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DeleteVaultNotificationsInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Provides options for retrieving a job description.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeJobInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The ID of the job to describe.</p> #[serde(rename = "jobId")] pub job_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Provides options for retrieving metadata for a specific vault in Amazon Glacier.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct DescribeVaultInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct DescribeVaultOutput { /// <p>The Universal Coordinated Time (UTC) date when the vault was created. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p> #[serde(rename = "CreationDate")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date: Option<String>, /// <p>The Universal Coordinated Time (UTC) date when Amazon Glacier completed the last vault inventory. This value should be a string in the ISO 8601 date format, for example <code>2012-03-20T17:03:43.221Z</code>.</p> #[serde(rename = "LastInventoryDate")] #[serde(skip_serializing_if = "Option::is_none")] pub last_inventory_date: Option<String>, /// <p>The number of archives in the vault as of the last inventory date. This field will return <code>null</code> if an inventory has not yet run on the vault, for example if you just created the vault.</p> #[serde(rename = "NumberOfArchives")] #[serde(skip_serializing_if = "Option::is_none")] pub number_of_archives: Option<i64>, /// <p>Total size, in bytes, of the archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.</p> #[serde(rename = "SizeInBytes")] #[serde(skip_serializing_if = "Option::is_none")] pub size_in_bytes: Option<i64>, /// <p>The Amazon Resource Name (ARN) of the vault.</p> #[serde(rename = "VaultARN")] #[serde(skip_serializing_if = "Option::is_none")] pub vault_arn: Option<String>, /// <p>The name of the vault.</p> #[serde(rename = "VaultName")] #[serde(skip_serializing_if = "Option::is_none")] pub vault_name: Option<String>, } /// <p>Contains information about the encryption used to store the job results in Amazon S3. </p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Encryption { /// <p>The server-side encryption algorithm used when storing job results in Amazon S3, for example <code>AES256</code> or <code>aws:kms</code>.</p> #[serde(rename = "EncryptionType")] #[serde(skip_serializing_if = "Option::is_none")] pub encryption_type: Option<String>, /// <p>Optional. If the encryption type is <code>aws:kms</code>, you can use this value to specify the encryption context for the job results.</p> #[serde(rename = "KMSContext")] #[serde(skip_serializing_if = "Option::is_none")] pub kms_context: Option<String>, /// <p>The AWS KMS key ID to use for object encryption. All GET and PUT requests for an object protected by AWS KMS fail if not made by using Secure Sockets Layer (SSL) or Signature Version 4. </p> #[serde(rename = "KMSKeyId")] #[serde(skip_serializing_if = "Option::is_none")] pub kms_key_id: Option<String>, } /// <p>Input for GetDataRetrievalPolicy.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetDataRetrievalPolicyInput { /// <p>The <code>AccountId</code> value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, } /// <p>Contains the Amazon Glacier response to the <code>GetDataRetrievalPolicy</code> request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GetDataRetrievalPolicyOutput { /// <p>Contains the returned data retrieval policy in JSON format.</p> #[serde(rename = "Policy")] #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option<DataRetrievalPolicy>, } /// <p>Provides options for downloading output of an Amazon Glacier job.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetJobOutputInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The job ID whose data is downloaded.</p> #[serde(rename = "jobId")] pub job_id: String, /// <p><p>The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify the range as <code>bytes=0-1048575</code>. By default, this operation downloads the entire output.</p> <p>If the job output is large, then you can use a range to retrieve a portion of the output. This allows you to download the entire output in smaller chunks of bytes. For example, suppose you have 1 GB of job output you want to download and you decide to download 128 MB chunks of data at a time, which is a total of eight Get Job Output requests. You use the following process to download the job output:</p> <ol> <li> <p>Download a 128 MB chunk of output by specifying the appropriate byte range. Verify that all 128 MB of data was received.</p> </li> <li> <p>Along with the data, the response includes a SHA256 tree hash of the payload. You compute the checksum of the payload on the client and compare it with the checksum you received in the response to ensure you received all the expected data.</p> </li> <li> <p>Repeat steps 1 and 2 for all the eight 128 MB chunks of output data, each time specifying the appropriate byte range.</p> </li> <li> <p>After downloading all the parts of the job output, you have a list of eight checksum values. Compute the tree hash of these values to find the checksum of the entire output. Using the <a>DescribeJob</a> API, obtain job information of the job that provided you the output. The response includes the checksum of the entire archive stored in Amazon Glacier. You compare this value with the checksum you computed to ensure you have downloaded the entire archive content with no errors.</p> <p/> </li> </ol></p> #[serde(rename = "range")] #[serde(skip_serializing_if = "Option::is_none")] pub range: Option<String>, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq)] pub struct GetJobOutputOutput { /// <p>Indicates the range units accepted. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">RFC2616</a>. </p> pub accept_ranges: Option<String>, /// <p>The description of an archive.</p> pub archive_description: Option<String>, /// <p>The job data, either archive data or inventory data.</p> pub body: Option<bytes::Bytes>, /// <p><p>The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:</p> <ul> <li> <p>You get the entire range of the archive.</p> </li> <li> <p>You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.</p> </li> <li> <p>You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.</p> </li> </ul></p> pub checksum: Option<String>, /// <p>The range of bytes returned by Amazon Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.</p> pub content_range: Option<String>, /// <p>The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.</p> pub content_type: Option<String>, /// <p>The HTTP response code for a job output request. The value depends on whether a range was specified in the request.</p> pub status: Option<i64>, } /// <p>Input for GetVaultAccessPolicy.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetVaultAccessPolicyInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Output for GetVaultAccessPolicy.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GetVaultAccessPolicyOutput { /// <p>Contains the returned vault access policy as a JSON string.</p> #[serde(rename = "policy")] #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option<VaultAccessPolicy>, } /// <p>The input values for <code>GetVaultLock</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetVaultLockInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GetVaultLockOutput { /// <p>The UTC date and time at which the vault lock was put into the <code>InProgress</code> state.</p> #[serde(rename = "CreationDate")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date: Option<String>, /// <p>The UTC date and time at which the lock ID expires. This value can be <code>null</code> if the vault lock is in a <code>Locked</code> state.</p> #[serde(rename = "ExpirationDate")] #[serde(skip_serializing_if = "Option::is_none")] pub expiration_date: Option<String>, /// <p>The vault lock policy as a JSON string, which uses "\" as an escape character.</p> #[serde(rename = "Policy")] #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option<String>, /// <p>The state of the vault lock. <code>InProgress</code> or <code>Locked</code>.</p> #[serde(rename = "State")] #[serde(skip_serializing_if = "Option::is_none")] pub state: Option<String>, } /// <p>Provides options for retrieving the notification configuration set on an Amazon Glacier vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct GetVaultNotificationsInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GetVaultNotificationsOutput { /// <p>Returns the notification configuration set on the vault.</p> #[serde(rename = "vaultNotificationConfig")] #[serde(skip_serializing_if = "Option::is_none")] pub vault_notification_config: Option<VaultNotificationConfig>, } /// <p>Contains the description of an Amazon Glacier job.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct GlacierJobDescription { /// <p>The job type. This value is either <code>ArchiveRetrieval</code>, <code>InventoryRetrieval</code>, or <code>Select</code>. </p> #[serde(rename = "Action")] #[serde(skip_serializing_if = "Option::is_none")] pub action: Option<String>, /// <p>The archive ID requested for a select job or archive retrieval. Otherwise, this field is null.</p> #[serde(rename = "ArchiveId")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_id: Option<String>, /// <p>The SHA256 tree hash of the entire archive for an archive retrieval. For inventory retrieval or select jobs, this field is null.</p> #[serde(rename = "ArchiveSHA256TreeHash")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_sha256_tree_hash: Option<String>, /// <p>For an archive retrieval job, this value is the size in bytes of the archive being requested for download. For an inventory retrieval or select job, this value is null.</p> #[serde(rename = "ArchiveSizeInBytes")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_size_in_bytes: Option<i64>, /// <p>The job status. When a job is completed, you get the job's output using Get Job Output (GET output).</p> #[serde(rename = "Completed")] #[serde(skip_serializing_if = "Option::is_none")] pub completed: Option<bool>, /// <p>The UTC time that the job request completed. While the job is in progress, the value is null.</p> #[serde(rename = "CompletionDate")] #[serde(skip_serializing_if = "Option::is_none")] pub completion_date: Option<String>, /// <p>The UTC date when the job was created. This value is a string representation of ISO 8601 date format, for example <code>"2012-03-20T17:03:43.221Z"</code>.</p> #[serde(rename = "CreationDate")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date: Option<String>, /// <p>Parameters used for range inventory retrieval.</p> #[serde(rename = "InventoryRetrievalParameters")] #[serde(skip_serializing_if = "Option::is_none")] pub inventory_retrieval_parameters: Option<InventoryRetrievalJobDescription>, /// <p>For an inventory retrieval job, this value is the size in bytes of the inventory requested for download. For an archive retrieval or select job, this value is null.</p> #[serde(rename = "InventorySizeInBytes")] #[serde(skip_serializing_if = "Option::is_none")] pub inventory_size_in_bytes: Option<i64>, /// <p>The job description provided when initiating the job.</p> #[serde(rename = "JobDescription")] #[serde(skip_serializing_if = "Option::is_none")] pub job_description: Option<String>, /// <p>An opaque string that identifies an Amazon Glacier job.</p> #[serde(rename = "JobId")] #[serde(skip_serializing_if = "Option::is_none")] pub job_id: Option<String>, /// <p>Contains the job output location.</p> #[serde(rename = "JobOutputPath")] #[serde(skip_serializing_if = "Option::is_none")] pub job_output_path: Option<String>, /// <p>Contains the location where the data from the select job is stored.</p> #[serde(rename = "OutputLocation")] #[serde(skip_serializing_if = "Option::is_none")] pub output_location: Option<OutputLocation>, /// <p>The retrieved byte range for archive retrieval jobs in the form <i>StartByteValue</i>-<i>EndByteValue</i>. If no range was specified in the archive retrieval, then the whole archive is retrieved. In this case, <i>StartByteValue</i> equals 0 and <i>EndByteValue</i> equals the size of the archive minus 1. For inventory retrieval or select jobs, this field is null. </p> #[serde(rename = "RetrievalByteRange")] #[serde(skip_serializing_if = "Option::is_none")] pub retrieval_byte_range: Option<String>, /// <p><p>For an archive retrieval job, this value is the checksum of the archive. Otherwise, this value is null.</p> <p>The SHA256 tree hash value for the requested range of an archive. If the <b>InitiateJob</b> request for an archive specified a tree-hash aligned range, then this field returns a value.</p> <p>If the whole archive is retrieved, this value is the same as the ArchiveSHA256TreeHash value.</p> <p>This field is null for the following:</p> <ul> <li> <p>Archive retrieval jobs that specify a range that is not tree-hash aligned</p> </li> </ul> <ul> <li> <p>Archival jobs that specify a range that is equal to the whole archive, when the job status is <code>InProgress</code> </p> </li> </ul> <ul> <li> <p>Inventory jobs</p> </li> <li> <p>Select jobs</p> </li> </ul></p> #[serde(rename = "SHA256TreeHash")] #[serde(skip_serializing_if = "Option::is_none")] pub sha256_tree_hash: Option<String>, /// <p>An Amazon SNS topic that receives notification.</p> #[serde(rename = "SNSTopic")] #[serde(skip_serializing_if = "Option::is_none")] pub sns_topic: Option<String>, /// <p>Contains the parameters used for a select.</p> #[serde(rename = "SelectParameters")] #[serde(skip_serializing_if = "Option::is_none")] pub select_parameters: Option<SelectParameters>, /// <p>The status code can be <code>InProgress</code>, <code>Succeeded</code>, or <code>Failed</code>, and indicates the status of the job.</p> #[serde(rename = "StatusCode")] #[serde(skip_serializing_if = "Option::is_none")] pub status_code: Option<String>, /// <p>A friendly message that describes the job status.</p> #[serde(rename = "StatusMessage")] #[serde(skip_serializing_if = "Option::is_none")] pub status_message: Option<String>, /// <p>The tier to use for a select or an archive retrieval. Valid values are <code>Expedited</code>, <code>Standard</code>, or <code>Bulk</code>. <code>Standard</code> is the default.</p> #[serde(rename = "Tier")] #[serde(skip_serializing_if = "Option::is_none")] pub tier: Option<String>, /// <p>The Amazon Resource Name (ARN) of the vault from which an archive retrieval was requested.</p> #[serde(rename = "VaultARN")] #[serde(skip_serializing_if = "Option::is_none")] pub vault_arn: Option<String>, } /// <p>Contains information about a grant.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Grant { /// <p>The grantee.</p> #[serde(rename = "Grantee")] #[serde(skip_serializing_if = "Option::is_none")] pub grantee: Option<Grantee>, /// <p>Specifies the permission given to the grantee. </p> #[serde(rename = "Permission")] #[serde(skip_serializing_if = "Option::is_none")] pub permission: Option<String>, } /// <p>Contains information about the grantee.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct Grantee { /// <p>Screen name of the grantee.</p> #[serde(rename = "DisplayName")] #[serde(skip_serializing_if = "Option::is_none")] pub display_name: Option<String>, /// <p>Email address of the grantee.</p> #[serde(rename = "EmailAddress")] #[serde(skip_serializing_if = "Option::is_none")] pub email_address: Option<String>, /// <p>The canonical user ID of the grantee.</p> #[serde(rename = "ID")] #[serde(skip_serializing_if = "Option::is_none")] pub id: Option<String>, /// <p>Type of grantee</p> #[serde(rename = "Type")] pub type_: String, /// <p>URI of the grantee group.</p> #[serde(rename = "URI")] #[serde(skip_serializing_if = "Option::is_none")] pub uri: Option<String>, } /// <p>Provides options for initiating an Amazon Glacier job.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct InitiateJobInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>Provides options for specifying job information.</p> #[serde(rename = "jobParameters")] #[serde(skip_serializing_if = "Option::is_none")] pub job_parameters: Option<JobParameters>, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct InitiateJobOutput { /// <p>The ID of the job.</p> #[serde(rename = "jobId")] #[serde(skip_serializing_if = "Option::is_none")] pub job_id: Option<String>, /// <p>The path to the location of where the select results are stored.</p> #[serde(rename = "jobOutputPath")] #[serde(skip_serializing_if = "Option::is_none")] pub job_output_path: Option<String>, /// <p>The relative URI path of the job.</p> #[serde(rename = "location")] #[serde(skip_serializing_if = "Option::is_none")] pub location: Option<String>, } /// <p>Provides options for initiating a multipart upload to an Amazon Glacier vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct InitiateMultipartUploadInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The archive description that you are uploading in parts.</p> <p>The part size must be a megabyte (1024 KB) multiplied by a power of 2, for example 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8 MB), and so on. The minimum allowable part size is 1 MB, and the maximum is 4 GB (4096 MB).</p> #[serde(rename = "archiveDescription")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_description: Option<String>, /// <p>The size of each part except the last, in bytes. The last part can be smaller than this part size.</p> #[serde(rename = "partSize")] #[serde(skip_serializing_if = "Option::is_none")] pub part_size: Option<String>, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>The Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct InitiateMultipartUploadOutput { /// <p>The relative URI path of the multipart upload ID Amazon Glacier created.</p> #[serde(rename = "location")] #[serde(skip_serializing_if = "Option::is_none")] pub location: Option<String>, /// <p>The ID of the multipart upload. This value is also included as part of the location.</p> #[serde(rename = "uploadId")] #[serde(skip_serializing_if = "Option::is_none")] pub upload_id: Option<String>, } /// <p>The input values for <code>InitiateVaultLock</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct InitiateVaultLockInput { /// <p>The <code>AccountId</code> value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The vault lock policy as a JSON string, which uses "\" as an escape character.</p> #[serde(rename = "policy")] #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option<VaultLockPolicy>, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct InitiateVaultLockOutput { /// <p>The lock ID, which is used to complete the vault locking process.</p> #[serde(rename = "lockId")] #[serde(skip_serializing_if = "Option::is_none")] pub lock_id: Option<String>, } /// <p>Describes how the archive is serialized.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct InputSerialization { /// <p>Describes the serialization of a CSV-encoded object.</p> #[serde(rename = "csv")] #[serde(skip_serializing_if = "Option::is_none")] pub csv: Option<CSVInput>, } /// <p>Describes the options for a range inventory retrieval job.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct InventoryRetrievalJobDescription { /// <p>The end of the date range in UTC for vault inventory retrieval that includes archives created before this date. This value should be a string in the ISO 8601 date format, for example <code>2013-03-20T17:03:43Z</code>.</p> #[serde(rename = "EndDate")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date: Option<String>, /// <p>The output format for the vault inventory list, which is set by the <b>InitiateJob</b> request when initiating a job to retrieve a vault inventory. Valid values are <code>CSV</code> and <code>JSON</code>.</p> #[serde(rename = "Format")] #[serde(skip_serializing_if = "Option::is_none")] pub format: Option<String>, /// <p>The maximum number of inventory items returned per vault inventory retrieval request. This limit is set when initiating the job with the a <b>InitiateJob</b> request. </p> #[serde(rename = "Limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<String>, /// <p>An opaque string that represents where to continue pagination of the vault inventory retrieval results. You use the marker in a new <b>InitiateJob</b> request to obtain additional inventory items. If there are no more inventory items, this value is <code>null</code>. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html#api-initiate-job-post-vault-inventory-list-filtering"> Range Inventory Retrieval</a>.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The start of the date range in Universal Coordinated Time (UTC) for vault inventory retrieval that includes archives created on or after this date. This value should be a string in the ISO 8601 date format, for example <code>2013-03-20T17:03:43Z</code>.</p> #[serde(rename = "StartDate")] #[serde(skip_serializing_if = "Option::is_none")] pub start_date: Option<String>, } /// <p>Provides options for specifying a range inventory retrieval job.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct InventoryRetrievalJobInput { /// <p>The end of the date range in UTC for vault inventory retrieval that includes archives created before this date. This value should be a string in the ISO 8601 date format, for example <code>2013-03-20T17:03:43Z</code>.</p> #[serde(rename = "EndDate")] #[serde(skip_serializing_if = "Option::is_none")] pub end_date: Option<String>, /// <p>Specifies the maximum number of inventory items returned per vault inventory retrieval request. Valid values are greater than or equal to 1.</p> #[serde(rename = "Limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<String>, /// <p>An opaque string that represents where to continue pagination of the vault inventory retrieval results. You use the marker in a new <b>InitiateJob</b> request to obtain additional inventory items. If there are no more inventory items, this value is <code>null</code>.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The start of the date range in UTC for vault inventory retrieval that includes archives created on or after this date. This value should be a string in the ISO 8601 date format, for example <code>2013-03-20T17:03:43Z</code>.</p> #[serde(rename = "StartDate")] #[serde(skip_serializing_if = "Option::is_none")] pub start_date: Option<String>, } /// <p>Provides options for defining a job.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct JobParameters { /// <p>The ID of the archive that you want to retrieve. This field is required only if <code>Type</code> is set to <code>select</code> or <code>archive-retrieval</code>code>. An error occurs if you specify this request parameter for an inventory retrieval job request. </p> #[serde(rename = "ArchiveId")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_id: Option<String>, /// <p>The optional description for the job. The description must be less than or equal to 1,024 bytes. The allowable characters are 7-bit ASCII without control codes-specifically, ASCII values 32-126 decimal or 0x20-0x7E hexadecimal.</p> #[serde(rename = "Description")] #[serde(skip_serializing_if = "Option::is_none")] pub description: Option<String>, /// <p>When initiating a job to retrieve a vault inventory, you can optionally add this parameter to your request to specify the output format. If you are initiating an inventory job and do not specify a Format field, JSON is the default format. Valid values are "CSV" and "JSON".</p> #[serde(rename = "Format")] #[serde(skip_serializing_if = "Option::is_none")] pub format: Option<String>, /// <p>Input parameters used for range inventory retrieval.</p> #[serde(rename = "InventoryRetrievalParameters")] #[serde(skip_serializing_if = "Option::is_none")] pub inventory_retrieval_parameters: Option<InventoryRetrievalJobInput>, /// <p>Contains information about the location where the select job results are stored.</p> #[serde(rename = "OutputLocation")] #[serde(skip_serializing_if = "Option::is_none")] pub output_location: Option<OutputLocation>, /// <p>The byte range to retrieve for an archive retrieval. in the form "<i>StartByteValue</i>-<i>EndByteValue</i>" If not specified, the whole archive is retrieved. If specified, the byte range must be megabyte (1024*1024) aligned which means that <i>StartByteValue</i> must be divisible by 1 MB and <i>EndByteValue</i> plus 1 must be divisible by 1 MB or be the end of the archive specified as the archive byte size value minus 1. If RetrievalByteRange is not megabyte aligned, this operation returns a 400 response. </p> <p>An error occurs if you specify this field for an inventory retrieval job request.</p> #[serde(rename = "RetrievalByteRange")] #[serde(skip_serializing_if = "Option::is_none")] pub retrieval_byte_range: Option<String>, /// <p>The Amazon SNS topic ARN to which Amazon Glacier sends a notification when the job is completed and the output is ready for you to download. The specified topic publishes the notification to its subscribers. The SNS topic must exist.</p> #[serde(rename = "SNSTopic")] #[serde(skip_serializing_if = "Option::is_none")] pub sns_topic: Option<String>, /// <p>Contains the parameters that define a job.</p> #[serde(rename = "SelectParameters")] #[serde(skip_serializing_if = "Option::is_none")] pub select_parameters: Option<SelectParameters>, /// <p>The tier to use for a select or an archive retrieval job. Valid values are <code>Expedited</code>, <code>Standard</code>, or <code>Bulk</code>. <code>Standard</code> is the default.</p> #[serde(rename = "Tier")] #[serde(skip_serializing_if = "Option::is_none")] pub tier: Option<String>, /// <p>The job type. You can initiate a job to perform a select query on an archive, retrieve an archive, or get an inventory of a vault. Valid values are "select", "archive-retrieval" and "inventory-retrieval".</p> #[serde(rename = "Type")] #[serde(skip_serializing_if = "Option::is_none")] pub type_: Option<String>, } /// <p>Provides options for retrieving a job list for an Amazon Glacier vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListJobsInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The state of the jobs to return. You can specify <code>true</code> or <code>false</code>.</p> #[serde(rename = "completed")] #[serde(skip_serializing_if = "Option::is_none")] pub completed: Option<String>, /// <p>The maximum number of jobs to be returned. The default limit is 50. The number of jobs returned might be fewer than the specified limit, but the number of returned jobs never exceeds the limit.</p> #[serde(rename = "limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<String>, /// <p>An opaque string used for pagination. This value specifies the job at which the listing of jobs should begin. Get the marker value from a previous List Jobs response. You only need to include the marker if you are continuing the pagination of results started in a previous List Jobs request.</p> #[serde(rename = "marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The type of job status to return. You can specify the following values: <code>InProgress</code>, <code>Succeeded</code>, or <code>Failed</code>.</p> #[serde(rename = "statuscode")] #[serde(skip_serializing_if = "Option::is_none")] pub statuscode: Option<String>, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListJobsOutput { /// <p>A list of job objects. Each job object contains metadata describing the job.</p> #[serde(rename = "JobList")] #[serde(skip_serializing_if = "Option::is_none")] pub job_list: Option<Vec<GlacierJobDescription>>, /// <p> An opaque string used for pagination that specifies the job at which the listing of jobs should begin. You get the <code>marker</code> value from a previous List Jobs response. You only need to include the marker if you are continuing the pagination of the results started in a previous List Jobs request. </p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } /// <p>Provides options for retrieving list of in-progress multipart uploads for an Amazon Glacier vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListMultipartUploadsInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>Specifies the maximum number of uploads returned in the response body. If this value is not specified, the List Uploads operation returns up to 50 uploads.</p> #[serde(rename = "limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<String>, /// <p>An opaque string used for pagination. This value specifies the upload at which the listing of uploads should begin. Get the marker value from a previous List Uploads response. You need only include the marker if you are continuing the pagination of results started in a previous List Uploads request.</p> #[serde(rename = "marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListMultipartUploadsOutput { /// <p>An opaque string that represents where to continue pagination of the results. You use the marker in a new List Multipart Uploads request to obtain more uploads in the list. If there are no more uploads, this value is <code>null</code>.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>A list of in-progress multipart uploads.</p> #[serde(rename = "UploadsList")] #[serde(skip_serializing_if = "Option::is_none")] pub uploads_list: Option<Vec<UploadListElement>>, } /// <p>Provides options for retrieving a list of parts of an archive that have been uploaded in a specific multipart upload.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListPartsInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The maximum number of parts to be returned. The default limit is 50. The number of parts returned might be fewer than the specified limit, but the number of returned parts never exceeds the limit.</p> #[serde(rename = "limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<String>, /// <p>An opaque string used for pagination. This value specifies the part at which the listing of parts should begin. Get the marker value from the response of a previous List Parts response. You need only include the marker if you are continuing the pagination of results started in a previous List Parts request.</p> #[serde(rename = "marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The upload ID of the multipart upload.</p> #[serde(rename = "uploadId")] pub upload_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListPartsOutput { /// <p>The description of the archive that was specified in the Initiate Multipart Upload request.</p> #[serde(rename = "ArchiveDescription")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_description: Option<String>, /// <p>The UTC time at which the multipart upload was initiated.</p> #[serde(rename = "CreationDate")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date: Option<String>, /// <p>An opaque string that represents where to continue pagination of the results. You use the marker in a new List Parts request to obtain more jobs in the list. If there are no more parts, this value is <code>null</code>.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>The ID of the upload to which the parts are associated.</p> #[serde(rename = "MultipartUploadId")] #[serde(skip_serializing_if = "Option::is_none")] pub multipart_upload_id: Option<String>, /// <p>The part size in bytes. This is the same value that you specified in the Initiate Multipart Upload request.</p> #[serde(rename = "PartSizeInBytes")] #[serde(skip_serializing_if = "Option::is_none")] pub part_size_in_bytes: Option<i64>, /// <p>A list of the part sizes of the multipart upload. Each object in the array contains a <code>RangeBytes</code> and <code>sha256-tree-hash</code> name/value pair.</p> #[serde(rename = "Parts")] #[serde(skip_serializing_if = "Option::is_none")] pub parts: Option<Vec<PartListElement>>, /// <p>The Amazon Resource Name (ARN) of the vault to which the multipart upload was initiated.</p> #[serde(rename = "VaultARN")] #[serde(skip_serializing_if = "Option::is_none")] pub vault_arn: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListProvisionedCapacityInput { /// <p>The AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '-' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, don't include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListProvisionedCapacityOutput { /// <p>The response body contains the following JSON fields.</p> #[serde(rename = "ProvisionedCapacityList")] #[serde(skip_serializing_if = "Option::is_none")] pub provisioned_capacity_list: Option<Vec<ProvisionedCapacityDescription>>, } /// <p>The input value for <code>ListTagsForVaultInput</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListTagsForVaultInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListTagsForVaultOutput { /// <p>The tags attached to the vault. Each tag is composed of a key and a value.</p> #[serde(rename = "Tags")] #[serde(skip_serializing_if = "Option::is_none")] pub tags: Option<::std::collections::HashMap<String, String>>, } /// <p>Provides options to retrieve the vault list owned by the calling user's account. The list provides metadata information for each vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct ListVaultsInput { /// <p>The <code>AccountId</code> value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The maximum number of vaults to be returned. The default limit is 10. The number of vaults returned might be fewer than the specified limit, but the number of returned vaults never exceeds the limit.</p> #[serde(rename = "limit")] #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option<String>, /// <p>A string used for pagination. The marker specifies the vault ARN after which the listing of vaults should begin.</p> #[serde(rename = "marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ListVaultsOutput { /// <p>The vault ARN at which to continue pagination of the results. You use the marker in another List Vaults request to obtain more vaults in the list.</p> #[serde(rename = "Marker")] #[serde(skip_serializing_if = "Option::is_none")] pub marker: Option<String>, /// <p>List of vaults.</p> #[serde(rename = "VaultList")] #[serde(skip_serializing_if = "Option::is_none")] pub vault_list: Option<Vec<DescribeVaultOutput>>, } /// <p>Contains information about the location where the select job results are stored.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct OutputLocation { /// <p>Describes an S3 location that will receive the results of the job request.</p> #[serde(rename = "S3")] #[serde(skip_serializing_if = "Option::is_none")] pub s3: Option<S3Location>, } /// <p>Describes how the select output is serialized.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct OutputSerialization { /// <p>Describes the serialization of CSV-encoded query results.</p> #[serde(rename = "csv")] #[serde(skip_serializing_if = "Option::is_none")] pub csv: Option<CSVOutput>, } /// <p>A list of the part sizes of the multipart upload.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct PartListElement { /// <p>The byte range of a part, inclusive of the upper value of the range.</p> #[serde(rename = "RangeInBytes")] #[serde(skip_serializing_if = "Option::is_none")] pub range_in_bytes: Option<String>, /// <p>The SHA256 tree hash value that Amazon Glacier calculated for the part. This field is never <code>null</code>.</p> #[serde(rename = "SHA256TreeHash")] #[serde(skip_serializing_if = "Option::is_none")] pub sha256_tree_hash: Option<String>, } /// <p>The definition for a provisioned capacity unit.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct ProvisionedCapacityDescription { /// <p>The ID that identifies the provisioned capacity unit.</p> #[serde(rename = "CapacityId")] #[serde(skip_serializing_if = "Option::is_none")] pub capacity_id: Option<String>, /// <p>The date that the provisioned capacity unit expires, in Universal Coordinated Time (UTC).</p> #[serde(rename = "ExpirationDate")] #[serde(skip_serializing_if = "Option::is_none")] pub expiration_date: Option<String>, /// <p>The date that the provisioned capacity unit was purchased, in Universal Coordinated Time (UTC).</p> #[serde(rename = "StartDate")] #[serde(skip_serializing_if = "Option::is_none")] pub start_date: Option<String>, } #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct PurchaseProvisionedCapacityInput { /// <p>The AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '-' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, don't include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, } #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct PurchaseProvisionedCapacityOutput { /// <p>The ID that identifies the provisioned capacity unit.</p> #[serde(rename = "capacityId")] #[serde(skip_serializing_if = "Option::is_none")] pub capacity_id: Option<String>, } /// <p>The input value for <code>RemoveTagsFromVaultInput</code>.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct RemoveTagsFromVaultInput { /// <p>A list of tag keys. Each corresponding tag is removed from the vault.</p> #[serde(rename = "TagKeys")] #[serde(skip_serializing_if = "Option::is_none")] pub tag_keys: Option<Vec<String>>, /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains information about the location in Amazon S3 where the select job results are stored.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct S3Location { /// <p>A list of grants that control access to the staged results.</p> #[serde(rename = "AccessControlList")] #[serde(skip_serializing_if = "Option::is_none")] pub access_control_list: Option<Vec<Grant>>, /// <p>The name of the Amazon S3 bucket where the job results are stored.</p> #[serde(rename = "BucketName")] #[serde(skip_serializing_if = "Option::is_none")] pub bucket_name: Option<String>, /// <p>The canned access control list (ACL) to apply to the job results.</p> #[serde(rename = "CannedACL")] #[serde(skip_serializing_if = "Option::is_none")] pub canned_acl: Option<String>, /// <p>Contains information about the encryption used to store the job results in Amazon S3.</p> #[serde(rename = "Encryption")] #[serde(skip_serializing_if = "Option::is_none")] pub encryption: Option<Encryption>, /// <p>The prefix that is prepended to the results for this request.</p> #[serde(rename = "Prefix")] #[serde(skip_serializing_if = "Option::is_none")] pub prefix: Option<String>, /// <p>The storage class used to store the job results.</p> #[serde(rename = "StorageClass")] #[serde(skip_serializing_if = "Option::is_none")] pub storage_class: Option<String>, /// <p>The tag-set that is applied to the job results.</p> #[serde(rename = "Tagging")] #[serde(skip_serializing_if = "Option::is_none")] pub tagging: Option<::std::collections::HashMap<String, String>>, /// <p>A map of metadata to store with the job results in Amazon S3.</p> #[serde(rename = "UserMetadata")] #[serde(skip_serializing_if = "Option::is_none")] pub user_metadata: Option<::std::collections::HashMap<String, String>>, } /// <p>Contains information about the parameters used for a select.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct SelectParameters { /// <p>The expression that is used to select the object.</p> #[serde(rename = "Expression")] #[serde(skip_serializing_if = "Option::is_none")] pub expression: Option<String>, /// <p>The type of the provided expression, for example <code>SQL</code>.</p> #[serde(rename = "ExpressionType")] #[serde(skip_serializing_if = "Option::is_none")] pub expression_type: Option<String>, /// <p>Describes the serialization format of the object.</p> #[serde(rename = "InputSerialization")] #[serde(skip_serializing_if = "Option::is_none")] pub input_serialization: Option<InputSerialization>, /// <p>Describes how the results of the select job are serialized.</p> #[serde(rename = "OutputSerialization")] #[serde(skip_serializing_if = "Option::is_none")] pub output_serialization: Option<OutputSerialization>, } /// <p>SetDataRetrievalPolicy input.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct SetDataRetrievalPolicyInput { /// <p>The data retrieval policy in JSON format.</p> #[serde(rename = "Policy")] #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option<DataRetrievalPolicy>, /// <p>The <code>AccountId</code> value is the AWS account ID. This value must match the AWS account ID associated with the credentials used to sign the request. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you specify your account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, } /// <p>SetVaultAccessPolicy input.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct SetVaultAccessPolicyInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The vault access policy as a JSON string.</p> #[serde(rename = "policy")] #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option<VaultAccessPolicy>, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Provides options to configure notifications that will be sent when specific events happen to a vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct SetVaultNotificationsInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, /// <p>Provides options for specifying notification configuration.</p> #[serde(rename = "vaultNotificationConfig")] #[serde(skip_serializing_if = "Option::is_none")] pub vault_notification_config: Option<VaultNotificationConfig>, } /// <p>Provides options to add an archive to a vault.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UploadArchiveInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The optional description of the archive you are uploading.</p> #[serde(rename = "archiveDescription")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_description: Option<String>, /// <p>The data to upload.</p> #[serde(rename = "body")] #[serde( deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob", serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob", default )] #[serde(skip_serializing_if = "Option::is_none")] pub body: Option<bytes::Bytes>, /// <p>The SHA256 tree hash of the data being uploaded.</p> #[serde(rename = "checksum")] #[serde(skip_serializing_if = "Option::is_none")] pub checksum: Option<String>, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>A list of in-progress multipart uploads for a vault.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct UploadListElement { /// <p>The description of the archive that was specified in the Initiate Multipart Upload request.</p> #[serde(rename = "ArchiveDescription")] #[serde(skip_serializing_if = "Option::is_none")] pub archive_description: Option<String>, /// <p>The UTC time at which the multipart upload was initiated.</p> #[serde(rename = "CreationDate")] #[serde(skip_serializing_if = "Option::is_none")] pub creation_date: Option<String>, /// <p>The ID of a multipart upload.</p> #[serde(rename = "MultipartUploadId")] #[serde(skip_serializing_if = "Option::is_none")] pub multipart_upload_id: Option<String>, /// <p>The part size, in bytes, specified in the Initiate Multipart Upload request. This is the size of all the parts in the upload except the last part, which may be smaller than this size.</p> #[serde(rename = "PartSizeInBytes")] #[serde(skip_serializing_if = "Option::is_none")] pub part_size_in_bytes: Option<i64>, /// <p>The Amazon Resource Name (ARN) of the vault that contains the archive.</p> #[serde(rename = "VaultARN")] #[serde(skip_serializing_if = "Option::is_none")] pub vault_arn: Option<String>, } /// <p>Provides options to upload a part of an archive in a multipart upload operation.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct UploadMultipartPartInput { /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID. </p> #[serde(rename = "accountId")] pub account_id: String, /// <p>The data to upload.</p> #[serde(rename = "body")] #[serde( deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob", serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob", default )] #[serde(skip_serializing_if = "Option::is_none")] pub body: Option<bytes::Bytes>, /// <p>The SHA256 tree hash of the data being uploaded.</p> #[serde(rename = "checksum")] #[serde(skip_serializing_if = "Option::is_none")] pub checksum: Option<String>, /// <p>Identifies the range of bytes in the assembled archive that will be uploaded in this part. Amazon Glacier uses this information to assemble the archive in the proper sequence. The format of this header follows RFC 2616. An example header is Content-Range:bytes 0-4194303/*.</p> #[serde(rename = "range")] #[serde(skip_serializing_if = "Option::is_none")] pub range: Option<String>, /// <p>The upload ID of the multipart upload.</p> #[serde(rename = "uploadId")] pub upload_id: String, /// <p>The name of the vault.</p> #[serde(rename = "vaultName")] pub vault_name: String, } /// <p>Contains the Amazon Glacier response to your request.</p> #[derive(Default, Debug, Clone, PartialEq, Deserialize)] #[cfg_attr(test, derive(Serialize))] pub struct UploadMultipartPartOutput { /// <p>The SHA256 tree hash that Amazon Glacier computed for the uploaded part.</p> #[serde(rename = "checksum")] #[serde(skip_serializing_if = "Option::is_none")] pub checksum: Option<String>, } /// <p>Contains the vault access policy.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct VaultAccessPolicy { /// <p>The vault access policy.</p> #[serde(rename = "Policy")] #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option<String>, } /// <p>Contains the vault lock policy.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize)] pub struct VaultLockPolicy { /// <p>The vault lock policy.</p> #[serde(rename = "Policy")] #[serde(skip_serializing_if = "Option::is_none")] pub policy: Option<String>, } /// <p>Represents a vault's notification configuration.</p> #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct VaultNotificationConfig { /// <p>A list of one or more events for which Amazon Glacier will send a notification to the specified Amazon SNS topic.</p> #[serde(rename = "Events")] #[serde(skip_serializing_if = "Option::is_none")] pub events: Option<Vec<String>>, /// <p>The Amazon Simple Notification Service (Amazon SNS) topic Amazon Resource Name (ARN).</p> #[serde(rename = "SNSTopic")] #[serde(skip_serializing_if = "Option::is_none")] pub sns_topic: Option<String>, } /// Errors returned by AbortMultipartUpload #[derive(Debug, PartialEq)] pub enum AbortMultipartUploadError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl AbortMultipartUploadError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AbortMultipartUploadError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(AbortMultipartUploadError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(AbortMultipartUploadError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(AbortMultipartUploadError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(AbortMultipartUploadError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for AbortMultipartUploadError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for AbortMultipartUploadError { fn description(&self) -> &str { match *self { AbortMultipartUploadError::InvalidParameterValue(ref cause) => cause, AbortMultipartUploadError::MissingParameterValue(ref cause) => cause, AbortMultipartUploadError::ResourceNotFound(ref cause) => cause, AbortMultipartUploadError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by AbortVaultLock #[derive(Debug, PartialEq)] pub enum AbortVaultLockError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl AbortVaultLockError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AbortVaultLockError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(AbortVaultLockError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(AbortVaultLockError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(AbortVaultLockError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(AbortVaultLockError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for AbortVaultLockError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for AbortVaultLockError { fn description(&self) -> &str { match *self { AbortVaultLockError::InvalidParameterValue(ref cause) => cause, AbortVaultLockError::MissingParameterValue(ref cause) => cause, AbortVaultLockError::ResourceNotFound(ref cause) => cause, AbortVaultLockError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by AddTagsToVault #[derive(Debug, PartialEq)] pub enum AddTagsToVaultError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if the request results in a vault or account limit being exceeded.</p> LimitExceeded(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl AddTagsToVaultError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsToVaultError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(AddTagsToVaultError::InvalidParameterValue( err.msg, )) } "LimitExceededException" => { return RusotoError::Service(AddTagsToVaultError::LimitExceeded(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(AddTagsToVaultError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(AddTagsToVaultError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(AddTagsToVaultError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for AddTagsToVaultError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for AddTagsToVaultError { fn description(&self) -> &str { match *self { AddTagsToVaultError::InvalidParameterValue(ref cause) => cause, AddTagsToVaultError::LimitExceeded(ref cause) => cause, AddTagsToVaultError::MissingParameterValue(ref cause) => cause, AddTagsToVaultError::ResourceNotFound(ref cause) => cause, AddTagsToVaultError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by CompleteMultipartUpload #[derive(Debug, PartialEq)] pub enum CompleteMultipartUploadError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl CompleteMultipartUploadError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CompleteMultipartUploadError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service( CompleteMultipartUploadError::InvalidParameterValue(err.msg), ) } "MissingParameterValueException" => { return RusotoError::Service( CompleteMultipartUploadError::MissingParameterValue(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service(CompleteMultipartUploadError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(CompleteMultipartUploadError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CompleteMultipartUploadError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CompleteMultipartUploadError { fn description(&self) -> &str { match *self { CompleteMultipartUploadError::InvalidParameterValue(ref cause) => cause, CompleteMultipartUploadError::MissingParameterValue(ref cause) => cause, CompleteMultipartUploadError::ResourceNotFound(ref cause) => cause, CompleteMultipartUploadError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by CompleteVaultLock #[derive(Debug, PartialEq)] pub enum CompleteVaultLockError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl CompleteVaultLockError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CompleteVaultLockError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(CompleteVaultLockError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(CompleteVaultLockError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(CompleteVaultLockError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(CompleteVaultLockError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CompleteVaultLockError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CompleteVaultLockError { fn description(&self) -> &str { match *self { CompleteVaultLockError::InvalidParameterValue(ref cause) => cause, CompleteVaultLockError::MissingParameterValue(ref cause) => cause, CompleteVaultLockError::ResourceNotFound(ref cause) => cause, CompleteVaultLockError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by CreateVault #[derive(Debug, PartialEq)] pub enum CreateVaultError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if the request results in a vault or account limit being exceeded.</p> LimitExceeded(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl CreateVaultError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVaultError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(CreateVaultError::InvalidParameterValue(err.msg)) } "LimitExceededException" => { return RusotoError::Service(CreateVaultError::LimitExceeded(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(CreateVaultError::MissingParameterValue(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(CreateVaultError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for CreateVaultError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for CreateVaultError { fn description(&self) -> &str { match *self { CreateVaultError::InvalidParameterValue(ref cause) => cause, CreateVaultError::LimitExceeded(ref cause) => cause, CreateVaultError::MissingParameterValue(ref cause) => cause, CreateVaultError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by DeleteArchive #[derive(Debug, PartialEq)] pub enum DeleteArchiveError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl DeleteArchiveError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteArchiveError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(DeleteArchiveError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(DeleteArchiveError::MissingParameterValue(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(DeleteArchiveError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(DeleteArchiveError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteArchiveError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteArchiveError { fn description(&self) -> &str { match *self { DeleteArchiveError::InvalidParameterValue(ref cause) => cause, DeleteArchiveError::MissingParameterValue(ref cause) => cause, DeleteArchiveError::ResourceNotFound(ref cause) => cause, DeleteArchiveError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by DeleteVault #[derive(Debug, PartialEq)] pub enum DeleteVaultError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl DeleteVaultError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVaultError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(DeleteVaultError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(DeleteVaultError::MissingParameterValue(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(DeleteVaultError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(DeleteVaultError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteVaultError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteVaultError { fn description(&self) -> &str { match *self { DeleteVaultError::InvalidParameterValue(ref cause) => cause, DeleteVaultError::MissingParameterValue(ref cause) => cause, DeleteVaultError::ResourceNotFound(ref cause) => cause, DeleteVaultError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by DeleteVaultAccessPolicy #[derive(Debug, PartialEq)] pub enum DeleteVaultAccessPolicyError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl DeleteVaultAccessPolicyError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVaultAccessPolicyError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service( DeleteVaultAccessPolicyError::InvalidParameterValue(err.msg), ) } "MissingParameterValueException" => { return RusotoError::Service( DeleteVaultAccessPolicyError::MissingParameterValue(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service(DeleteVaultAccessPolicyError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(DeleteVaultAccessPolicyError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteVaultAccessPolicyError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteVaultAccessPolicyError { fn description(&self) -> &str { match *self { DeleteVaultAccessPolicyError::InvalidParameterValue(ref cause) => cause, DeleteVaultAccessPolicyError::MissingParameterValue(ref cause) => cause, DeleteVaultAccessPolicyError::ResourceNotFound(ref cause) => cause, DeleteVaultAccessPolicyError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by DeleteVaultNotifications #[derive(Debug, PartialEq)] pub enum DeleteVaultNotificationsError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl DeleteVaultNotificationsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVaultNotificationsError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service( DeleteVaultNotificationsError::InvalidParameterValue(err.msg), ) } "MissingParameterValueException" => { return RusotoError::Service( DeleteVaultNotificationsError::MissingParameterValue(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service(DeleteVaultNotificationsError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(DeleteVaultNotificationsError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DeleteVaultNotificationsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DeleteVaultNotificationsError { fn description(&self) -> &str { match *self { DeleteVaultNotificationsError::InvalidParameterValue(ref cause) => cause, DeleteVaultNotificationsError::MissingParameterValue(ref cause) => cause, DeleteVaultNotificationsError::ResourceNotFound(ref cause) => cause, DeleteVaultNotificationsError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by DescribeJob #[derive(Debug, PartialEq)] pub enum DescribeJobError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl DescribeJobError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeJobError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(DescribeJobError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(DescribeJobError::MissingParameterValue(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(DescribeJobError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(DescribeJobError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeJobError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeJobError { fn description(&self) -> &str { match *self { DescribeJobError::InvalidParameterValue(ref cause) => cause, DescribeJobError::MissingParameterValue(ref cause) => cause, DescribeJobError::ResourceNotFound(ref cause) => cause, DescribeJobError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by DescribeVault #[derive(Debug, PartialEq)] pub enum DescribeVaultError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl DescribeVaultError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVaultError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(DescribeVaultError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(DescribeVaultError::MissingParameterValue(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(DescribeVaultError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(DescribeVaultError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for DescribeVaultError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for DescribeVaultError { fn description(&self) -> &str { match *self { DescribeVaultError::InvalidParameterValue(ref cause) => cause, DescribeVaultError::MissingParameterValue(ref cause) => cause, DescribeVaultError::ResourceNotFound(ref cause) => cause, DescribeVaultError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by GetDataRetrievalPolicy #[derive(Debug, PartialEq)] pub enum GetDataRetrievalPolicyError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl GetDataRetrievalPolicyError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDataRetrievalPolicyError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service( GetDataRetrievalPolicyError::InvalidParameterValue(err.msg), ) } "MissingParameterValueException" => { return RusotoError::Service( GetDataRetrievalPolicyError::MissingParameterValue(err.msg), ) } "ServiceUnavailableException" => { return RusotoError::Service(GetDataRetrievalPolicyError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetDataRetrievalPolicyError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetDataRetrievalPolicyError { fn description(&self) -> &str { match *self { GetDataRetrievalPolicyError::InvalidParameterValue(ref cause) => cause, GetDataRetrievalPolicyError::MissingParameterValue(ref cause) => cause, GetDataRetrievalPolicyError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by GetJobOutput #[derive(Debug, PartialEq)] pub enum GetJobOutputError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl GetJobOutputError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetJobOutputError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(GetJobOutputError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(GetJobOutputError::MissingParameterValue(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(GetJobOutputError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(GetJobOutputError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetJobOutputError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetJobOutputError { fn description(&self) -> &str { match *self { GetJobOutputError::InvalidParameterValue(ref cause) => cause, GetJobOutputError::MissingParameterValue(ref cause) => cause, GetJobOutputError::ResourceNotFound(ref cause) => cause, GetJobOutputError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by GetVaultAccessPolicy #[derive(Debug, PartialEq)] pub enum GetVaultAccessPolicyError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl GetVaultAccessPolicyError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetVaultAccessPolicyError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(GetVaultAccessPolicyError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(GetVaultAccessPolicyError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(GetVaultAccessPolicyError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(GetVaultAccessPolicyError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetVaultAccessPolicyError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetVaultAccessPolicyError { fn description(&self) -> &str { match *self { GetVaultAccessPolicyError::InvalidParameterValue(ref cause) => cause, GetVaultAccessPolicyError::MissingParameterValue(ref cause) => cause, GetVaultAccessPolicyError::ResourceNotFound(ref cause) => cause, GetVaultAccessPolicyError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by GetVaultLock #[derive(Debug, PartialEq)] pub enum GetVaultLockError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl GetVaultLockError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetVaultLockError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(GetVaultLockError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(GetVaultLockError::MissingParameterValue(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(GetVaultLockError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(GetVaultLockError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetVaultLockError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetVaultLockError { fn description(&self) -> &str { match *self { GetVaultLockError::InvalidParameterValue(ref cause) => cause, GetVaultLockError::MissingParameterValue(ref cause) => cause, GetVaultLockError::ResourceNotFound(ref cause) => cause, GetVaultLockError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by GetVaultNotifications #[derive(Debug, PartialEq)] pub enum GetVaultNotificationsError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl GetVaultNotificationsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetVaultNotificationsError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(GetVaultNotificationsError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(GetVaultNotificationsError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(GetVaultNotificationsError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(GetVaultNotificationsError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for GetVaultNotificationsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for GetVaultNotificationsError { fn description(&self) -> &str { match *self { GetVaultNotificationsError::InvalidParameterValue(ref cause) => cause, GetVaultNotificationsError::MissingParameterValue(ref cause) => cause, GetVaultNotificationsError::ResourceNotFound(ref cause) => cause, GetVaultNotificationsError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by InitiateJob #[derive(Debug, PartialEq)] pub enum InitiateJobError { /// <p>Returned if there is insufficient capacity to process this expedited request. This error only applies to expedited retrievals and not to standard or bulk retrievals.</p> InsufficientCapacity(String), /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if a retrieval job would exceed the current data policy's retrieval rate limit. For more information about data retrieval policies,</p> PolicyEnforced(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl InitiateJobError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<InitiateJobError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InsufficientCapacityException" => { return RusotoError::Service(InitiateJobError::InsufficientCapacity(err.msg)) } "InvalidParameterValueException" => { return RusotoError::Service(InitiateJobError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(InitiateJobError::MissingParameterValue(err.msg)) } "PolicyEnforcedException" => { return RusotoError::Service(InitiateJobError::PolicyEnforced(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(InitiateJobError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(InitiateJobError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for InitiateJobError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for InitiateJobError { fn description(&self) -> &str { match *self { InitiateJobError::InsufficientCapacity(ref cause) => cause, InitiateJobError::InvalidParameterValue(ref cause) => cause, InitiateJobError::MissingParameterValue(ref cause) => cause, InitiateJobError::PolicyEnforced(ref cause) => cause, InitiateJobError::ResourceNotFound(ref cause) => cause, InitiateJobError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by InitiateMultipartUpload #[derive(Debug, PartialEq)] pub enum InitiateMultipartUploadError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl InitiateMultipartUploadError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<InitiateMultipartUploadError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service( InitiateMultipartUploadError::InvalidParameterValue(err.msg), ) } "MissingParameterValueException" => { return RusotoError::Service( InitiateMultipartUploadError::MissingParameterValue(err.msg), ) } "ResourceNotFoundException" => { return RusotoError::Service(InitiateMultipartUploadError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(InitiateMultipartUploadError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for InitiateMultipartUploadError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for InitiateMultipartUploadError { fn description(&self) -> &str { match *self { InitiateMultipartUploadError::InvalidParameterValue(ref cause) => cause, InitiateMultipartUploadError::MissingParameterValue(ref cause) => cause, InitiateMultipartUploadError::ResourceNotFound(ref cause) => cause, InitiateMultipartUploadError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by InitiateVaultLock #[derive(Debug, PartialEq)] pub enum InitiateVaultLockError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl InitiateVaultLockError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<InitiateVaultLockError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(InitiateVaultLockError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(InitiateVaultLockError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(InitiateVaultLockError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(InitiateVaultLockError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for InitiateVaultLockError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for InitiateVaultLockError { fn description(&self) -> &str { match *self { InitiateVaultLockError::InvalidParameterValue(ref cause) => cause, InitiateVaultLockError::MissingParameterValue(ref cause) => cause, InitiateVaultLockError::ResourceNotFound(ref cause) => cause, InitiateVaultLockError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by ListJobs #[derive(Debug, PartialEq)] pub enum ListJobsError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl ListJobsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListJobsError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(ListJobsError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(ListJobsError::MissingParameterValue(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(ListJobsError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(ListJobsError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListJobsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListJobsError { fn description(&self) -> &str { match *self { ListJobsError::InvalidParameterValue(ref cause) => cause, ListJobsError::MissingParameterValue(ref cause) => cause, ListJobsError::ResourceNotFound(ref cause) => cause, ListJobsError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by ListMultipartUploads #[derive(Debug, PartialEq)] pub enum ListMultipartUploadsError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl ListMultipartUploadsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListMultipartUploadsError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(ListMultipartUploadsError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(ListMultipartUploadsError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(ListMultipartUploadsError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(ListMultipartUploadsError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListMultipartUploadsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListMultipartUploadsError { fn description(&self) -> &str { match *self { ListMultipartUploadsError::InvalidParameterValue(ref cause) => cause, ListMultipartUploadsError::MissingParameterValue(ref cause) => cause, ListMultipartUploadsError::ResourceNotFound(ref cause) => cause, ListMultipartUploadsError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by ListParts #[derive(Debug, PartialEq)] pub enum ListPartsError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl ListPartsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPartsError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(ListPartsError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(ListPartsError::MissingParameterValue(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(ListPartsError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(ListPartsError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListPartsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListPartsError { fn description(&self) -> &str { match *self { ListPartsError::InvalidParameterValue(ref cause) => cause, ListPartsError::MissingParameterValue(ref cause) => cause, ListPartsError::ResourceNotFound(ref cause) => cause, ListPartsError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by ListProvisionedCapacity #[derive(Debug, PartialEq)] pub enum ListProvisionedCapacityError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl ListProvisionedCapacityError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListProvisionedCapacityError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service( ListProvisionedCapacityError::InvalidParameterValue(err.msg), ) } "MissingParameterValueException" => { return RusotoError::Service( ListProvisionedCapacityError::MissingParameterValue(err.msg), ) } "ServiceUnavailableException" => { return RusotoError::Service(ListProvisionedCapacityError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListProvisionedCapacityError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListProvisionedCapacityError { fn description(&self) -> &str { match *self { ListProvisionedCapacityError::InvalidParameterValue(ref cause) => cause, ListProvisionedCapacityError::MissingParameterValue(ref cause) => cause, ListProvisionedCapacityError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by ListTagsForVault #[derive(Debug, PartialEq)] pub enum ListTagsForVaultError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl ListTagsForVaultError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForVaultError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(ListTagsForVaultError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(ListTagsForVaultError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(ListTagsForVaultError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(ListTagsForVaultError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListTagsForVaultError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListTagsForVaultError { fn description(&self) -> &str { match *self { ListTagsForVaultError::InvalidParameterValue(ref cause) => cause, ListTagsForVaultError::MissingParameterValue(ref cause) => cause, ListTagsForVaultError::ResourceNotFound(ref cause) => cause, ListTagsForVaultError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by ListVaults #[derive(Debug, PartialEq)] pub enum ListVaultsError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl ListVaultsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVaultsError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(ListVaultsError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(ListVaultsError::MissingParameterValue(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(ListVaultsError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(ListVaultsError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for ListVaultsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for ListVaultsError { fn description(&self) -> &str { match *self { ListVaultsError::InvalidParameterValue(ref cause) => cause, ListVaultsError::MissingParameterValue(ref cause) => cause, ListVaultsError::ResourceNotFound(ref cause) => cause, ListVaultsError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by PurchaseProvisionedCapacity #[derive(Debug, PartialEq)] pub enum PurchaseProvisionedCapacityError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if the request results in a vault or account limit being exceeded.</p> LimitExceeded(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl PurchaseProvisionedCapacityError { pub fn from_response( res: BufferedHttpResponse, ) -> RusotoError<PurchaseProvisionedCapacityError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service( PurchaseProvisionedCapacityError::InvalidParameterValue(err.msg), ) } "LimitExceededException" => { return RusotoError::Service(PurchaseProvisionedCapacityError::LimitExceeded( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service( PurchaseProvisionedCapacityError::MissingParameterValue(err.msg), ) } "ServiceUnavailableException" => { return RusotoError::Service( PurchaseProvisionedCapacityError::ServiceUnavailable(err.msg), ) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for PurchaseProvisionedCapacityError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for PurchaseProvisionedCapacityError { fn description(&self) -> &str { match *self { PurchaseProvisionedCapacityError::InvalidParameterValue(ref cause) => cause, PurchaseProvisionedCapacityError::LimitExceeded(ref cause) => cause, PurchaseProvisionedCapacityError::MissingParameterValue(ref cause) => cause, PurchaseProvisionedCapacityError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by RemoveTagsFromVault #[derive(Debug, PartialEq)] pub enum RemoveTagsFromVaultError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl RemoveTagsFromVaultError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsFromVaultError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(RemoveTagsFromVaultError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(RemoveTagsFromVaultError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(RemoveTagsFromVaultError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(RemoveTagsFromVaultError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for RemoveTagsFromVaultError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for RemoveTagsFromVaultError { fn description(&self) -> &str { match *self { RemoveTagsFromVaultError::InvalidParameterValue(ref cause) => cause, RemoveTagsFromVaultError::MissingParameterValue(ref cause) => cause, RemoveTagsFromVaultError::ResourceNotFound(ref cause) => cause, RemoveTagsFromVaultError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by SetDataRetrievalPolicy #[derive(Debug, PartialEq)] pub enum SetDataRetrievalPolicyError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl SetDataRetrievalPolicyError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetDataRetrievalPolicyError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service( SetDataRetrievalPolicyError::InvalidParameterValue(err.msg), ) } "MissingParameterValueException" => { return RusotoError::Service( SetDataRetrievalPolicyError::MissingParameterValue(err.msg), ) } "ServiceUnavailableException" => { return RusotoError::Service(SetDataRetrievalPolicyError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SetDataRetrievalPolicyError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SetDataRetrievalPolicyError { fn description(&self) -> &str { match *self { SetDataRetrievalPolicyError::InvalidParameterValue(ref cause) => cause, SetDataRetrievalPolicyError::MissingParameterValue(ref cause) => cause, SetDataRetrievalPolicyError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by SetVaultAccessPolicy #[derive(Debug, PartialEq)] pub enum SetVaultAccessPolicyError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl SetVaultAccessPolicyError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetVaultAccessPolicyError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(SetVaultAccessPolicyError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(SetVaultAccessPolicyError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(SetVaultAccessPolicyError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(SetVaultAccessPolicyError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SetVaultAccessPolicyError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SetVaultAccessPolicyError { fn description(&self) -> &str { match *self { SetVaultAccessPolicyError::InvalidParameterValue(ref cause) => cause, SetVaultAccessPolicyError::MissingParameterValue(ref cause) => cause, SetVaultAccessPolicyError::ResourceNotFound(ref cause) => cause, SetVaultAccessPolicyError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by SetVaultNotifications #[derive(Debug, PartialEq)] pub enum SetVaultNotificationsError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl SetVaultNotificationsError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetVaultNotificationsError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(SetVaultNotificationsError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(SetVaultNotificationsError::MissingParameterValue( err.msg, )) } "ResourceNotFoundException" => { return RusotoError::Service(SetVaultNotificationsError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(SetVaultNotificationsError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for SetVaultNotificationsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for SetVaultNotificationsError { fn description(&self) -> &str { match *self { SetVaultNotificationsError::InvalidParameterValue(ref cause) => cause, SetVaultNotificationsError::MissingParameterValue(ref cause) => cause, SetVaultNotificationsError::ResourceNotFound(ref cause) => cause, SetVaultNotificationsError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by UploadArchive #[derive(Debug, PartialEq)] pub enum UploadArchiveError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if, when uploading an archive, Amazon Glacier times out while receiving the upload.</p> RequestTimeout(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl UploadArchiveError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UploadArchiveError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(UploadArchiveError::InvalidParameterValue(err.msg)) } "MissingParameterValueException" => { return RusotoError::Service(UploadArchiveError::MissingParameterValue(err.msg)) } "RequestTimeoutException" => { return RusotoError::Service(UploadArchiveError::RequestTimeout(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(UploadArchiveError::ResourceNotFound(err.msg)) } "ServiceUnavailableException" => { return RusotoError::Service(UploadArchiveError::ServiceUnavailable(err.msg)) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UploadArchiveError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UploadArchiveError { fn description(&self) -> &str { match *self { UploadArchiveError::InvalidParameterValue(ref cause) => cause, UploadArchiveError::MissingParameterValue(ref cause) => cause, UploadArchiveError::RequestTimeout(ref cause) => cause, UploadArchiveError::ResourceNotFound(ref cause) => cause, UploadArchiveError::ServiceUnavailable(ref cause) => cause, } } } /// Errors returned by UploadMultipartPart #[derive(Debug, PartialEq)] pub enum UploadMultipartPartError { /// <p>Returned if a parameter of the request is incorrectly specified.</p> InvalidParameterValue(String), /// <p>Returned if a required header or parameter is missing from the request.</p> MissingParameterValue(String), /// <p>Returned if, when uploading an archive, Amazon Glacier times out while receiving the upload.</p> RequestTimeout(String), /// <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p> ResourceNotFound(String), /// <p>Returned if the service cannot complete the request.</p> ServiceUnavailable(String), } impl UploadMultipartPartError { pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UploadMultipartPartError> { if let Some(err) = proto::json::Error::parse_rest(&res) { match err.typ.as_str() { "InvalidParameterValueException" => { return RusotoError::Service(UploadMultipartPartError::InvalidParameterValue( err.msg, )) } "MissingParameterValueException" => { return RusotoError::Service(UploadMultipartPartError::MissingParameterValue( err.msg, )) } "RequestTimeoutException" => { return RusotoError::Service(UploadMultipartPartError::RequestTimeout(err.msg)) } "ResourceNotFoundException" => { return RusotoError::Service(UploadMultipartPartError::ResourceNotFound( err.msg, )) } "ServiceUnavailableException" => { return RusotoError::Service(UploadMultipartPartError::ServiceUnavailable( err.msg, )) } "ValidationException" => return RusotoError::Validation(err.msg), _ => {} } } return RusotoError::Unknown(res); } } impl fmt::Display for UploadMultipartPartError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) } } impl Error for UploadMultipartPartError { fn description(&self) -> &str { match *self { UploadMultipartPartError::InvalidParameterValue(ref cause) => cause, UploadMultipartPartError::MissingParameterValue(ref cause) => cause, UploadMultipartPartError::RequestTimeout(ref cause) => cause, UploadMultipartPartError::ResourceNotFound(ref cause) => cause, UploadMultipartPartError::ServiceUnavailable(ref cause) => cause, } } } /// Trait representing the capabilities of the Amazon Glacier API. Amazon Glacier clients implement this trait. pub trait Glacier { /// <p>This operation aborts a multipart upload identified by the upload ID.</p> <p>After the Abort Multipart Upload request succeeds, you cannot upload any more parts to the multipart upload or complete the multipart upload. Aborting a completed upload fails. However, aborting an already-aborted upload will succeed, for a short time. For more information about uploading a part and completing a multipart upload, see <a>UploadMultipartPart</a> and <a>CompleteMultipartUpload</a>.</p> <p>This operation is idempotent.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html">Working with Archives in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-abort-upload.html">Abort Multipart Upload</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn abort_multipart_upload( &self, input: AbortMultipartUploadInput, ) -> RusotoFuture<(), AbortMultipartUploadError>; /// <p>This operation aborts the vault locking process if the vault lock is not in the <code>Locked</code> state. If the vault lock is in the <code>Locked</code> state when this operation is requested, the operation returns an <code>AccessDeniedException</code> error. Aborting the vault locking process removes the vault lock policy from the specified vault. </p> <p>A vault lock is put into the <code>InProgress</code> state by calling <a>InitiateVaultLock</a>. A vault lock is put into the <code>Locked</code> state by calling <a>CompleteVaultLock</a>. You can get the state of a vault lock by calling <a>GetVaultLock</a>. For more information about the vault locking process, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html">Amazon Glacier Vault Lock</a>. For more information about vault lock policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html">Amazon Glacier Access Control with Vault Lock Policies</a>. </p> <p>This operation is idempotent. You can successfully invoke this operation multiple times, if the vault lock is in the <code>InProgress</code> state or if there is no policy associated with the vault.</p> fn abort_vault_lock(&self, input: AbortVaultLockInput) -> RusotoFuture<(), AbortVaultLockError>; /// <p>This operation adds the specified tags to a vault. Each tag is composed of a key and a value. Each vault can have up to 10 tags. If your request would cause the tag limit for the vault to be exceeded, the operation throws the <code>LimitExceededException</code> error. If a tag already exists on the vault under a specified key, the existing key value will be overwritten. For more information about tags, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html">Tagging Amazon Glacier Resources</a>. </p> fn add_tags_to_vault( &self, input: AddTagsToVaultInput, ) -> RusotoFuture<(), AddTagsToVaultError>; /// <p>You call this operation to inform Amazon Glacier that all the archive parts have been uploaded and that Amazon Glacier can now assemble the archive from the uploaded parts. After assembling and saving the archive to the vault, Amazon Glacier returns the URI path of the newly created archive resource. Using the URI path, you can then access the archive. After you upload an archive, you should save the archive ID returned to retrieve the archive at a later point. You can also get the vault inventory to obtain a list of archive IDs in a vault. For more information, see <a>InitiateJob</a>.</p> <p>In the request, you must include the computed SHA256 tree hash of the entire archive you have uploaded. For information about computing a SHA256 tree hash, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html">Computing Checksums</a>. On the server side, Amazon Glacier also constructs the SHA256 tree hash of the assembled archive. If the values match, Amazon Glacier saves the archive to the vault; otherwise, it returns an error, and the operation fails. The <a>ListParts</a> operation returns a list of parts uploaded for a specific multipart upload. It includes checksum information for each uploaded part that can be used to debug a bad checksum issue.</p> <p>Additionally, Amazon Glacier also checks for any missing content ranges when assembling the archive, if missing content ranges are found, Amazon Glacier returns an error and the operation fails.</p> <p>Complete Multipart Upload is an idempotent operation. After your first successful complete multipart upload, if you call the operation again within a short period, the operation will succeed and return the same archive ID. This is useful in the event you experience a network issue that causes an aborted connection or receive a 500 server error, in which case you can repeat your Complete Multipart Upload request and get the same archive ID without creating duplicate archives. Note, however, that after the multipart upload completes, you cannot call the List Parts operation and the multipart upload will not appear in List Multipart Uploads response, even if idempotent complete is possible.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html">Uploading Large Archives in Parts (Multipart Upload)</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-complete-upload.html">Complete Multipart Upload</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn complete_multipart_upload( &self, input: CompleteMultipartUploadInput, ) -> RusotoFuture<ArchiveCreationOutput, CompleteMultipartUploadError>; /// <p>This operation completes the vault locking process by transitioning the vault lock from the <code>InProgress</code> state to the <code>Locked</code> state, which causes the vault lock policy to become unchangeable. A vault lock is put into the <code>InProgress</code> state by calling <a>InitiateVaultLock</a>. You can obtain the state of the vault lock by calling <a>GetVaultLock</a>. For more information about the vault locking process, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html">Amazon Glacier Vault Lock</a>. </p> <p>This operation is idempotent. This request is always successful if the vault lock is in the <code>Locked</code> state and the provided lock ID matches the lock ID originally used to lock the vault.</p> <p>If an invalid lock ID is passed in the request when the vault lock is in the <code>Locked</code> state, the operation returns an <code>AccessDeniedException</code> error. If an invalid lock ID is passed in the request when the vault lock is in the <code>InProgress</code> state, the operation throws an <code>InvalidParameter</code> error.</p> fn complete_vault_lock( &self, input: CompleteVaultLockInput, ) -> RusotoFuture<(), CompleteVaultLockError>; /// <p>This operation creates a new vault with the specified name. The name of the vault must be unique within a region for an AWS account. You can create up to 1,000 vaults per account. If you need to create more vaults, contact Amazon Glacier.</p> <p>You must use the following guidelines when naming a vault.</p> <ul> <li> <p>Names can be between 1 and 255 characters long.</p> </li> <li> <p>Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), and '.' (period).</p> </li> </ul> <p>This operation is idempotent.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/creating-vaults.html">Creating a Vault in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-put.html">Create Vault </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn create_vault( &self, input: CreateVaultInput, ) -> RusotoFuture<CreateVaultOutput, CreateVaultError>; /// <p>This operation deletes an archive from a vault. Subsequent requests to initiate a retrieval of this archive will fail. Archive retrievals that are in progress for this archive ID may or may not succeed according to the following scenarios:</p> <ul> <li> <p>If the archive retrieval job is actively preparing the data for download when Amazon Glacier receives the delete archive request, the archival retrieval operation might fail.</p> </li> <li> <p>If the archive retrieval job has successfully prepared the archive for download when Amazon Glacier receives the delete archive request, you will be able to download the output.</p> </li> </ul> <p>This operation is idempotent. Attempting to delete an already-deleted archive does not result in an error.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-an-archive.html">Deleting an Archive in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html">Delete Archive</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn delete_archive(&self, input: DeleteArchiveInput) -> RusotoFuture<(), DeleteArchiveError>; /// <p>This operation deletes a vault. Amazon Glacier will delete a vault only if there are no archives in the vault as of the last inventory and there have been no writes to the vault since the last inventory. If either of these conditions is not satisfied, the vault deletion fails (that is, the vault is not removed) and Amazon Glacier returns an error. You can use <a>DescribeVault</a> to return the number of archives in a vault, and you can use <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html">Initiate a Job (POST jobs)</a> to initiate a new inventory retrieval for a vault. The inventory contains the archive IDs you use to delete archives using <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html">Delete Archive (DELETE archive)</a>.</p> <p>This operation is idempotent.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-vaults.html">Deleting a Vault in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-delete.html">Delete Vault </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn delete_vault(&self, input: DeleteVaultInput) -> RusotoFuture<(), DeleteVaultError>; /// <p>This operation deletes the access policy associated with the specified vault. The operation is eventually consistent; that is, it might take some time for Amazon Glacier to completely remove the access policy, and you might still see the effect of the policy for a short time after you send the delete request.</p> <p>This operation is idempotent. You can invoke delete multiple times, even if there is no policy associated with the vault. For more information about vault access policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html">Amazon Glacier Access Control with Vault Access Policies</a>. </p> fn delete_vault_access_policy( &self, input: DeleteVaultAccessPolicyInput, ) -> RusotoFuture<(), DeleteVaultAccessPolicyError>; /// <p>This operation deletes the notification configuration set for a vault. The operation is eventually consistent; that is, it might take some time for Amazon Glacier to completely disable the notifications and you might still receive some notifications for a short time after you send the delete request.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-delete.html">Delete Vault Notification Configuration </a> in the Amazon Glacier Developer Guide. </p> fn delete_vault_notifications( &self, input: DeleteVaultNotificationsInput, ) -> RusotoFuture<(), DeleteVaultNotificationsError>; /// <p>This operation returns information about a job you previously initiated, including the job initiation date, the user who initiated the job, the job status code/message and the Amazon SNS topic to notify after Amazon Glacier completes the job. For more information about initiating a job, see <a>InitiateJob</a>. </p> <note> <p>This operation enables you to check the status of your job. However, it is strongly recommended that you set up an Amazon SNS topic and specify it in your initiate job request so that Amazon Glacier can notify the topic after it completes the job.</p> </note> <p>A job ID will not expire for at least 24 hours after Amazon Glacier completes the job.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For more information about using this operation, see the documentation for the underlying REST API <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-describe-job-get.html">Describe Job</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn describe_job( &self, input: DescribeJobInput, ) -> RusotoFuture<GlacierJobDescription, DescribeJobError>; /// <p>This operation returns information about a vault, including the vault's Amazon Resource Name (ARN), the date the vault was created, the number of archives it contains, and the total size of all the archives in the vault. The number of archives and their total size are as of the last inventory generation. This means that if you add or remove an archive from a vault, and then immediately use Describe Vault, the change in contents will not be immediately reflected. If you want to retrieve the latest inventory of the vault, use <a>InitiateJob</a>. Amazon Glacier generates vault inventories approximately daily. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html">Downloading a Vault Inventory in Amazon Glacier</a>. </p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html">Retrieving Vault Metadata in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-get.html">Describe Vault </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn describe_vault( &self, input: DescribeVaultInput, ) -> RusotoFuture<DescribeVaultOutput, DescribeVaultError>; /// <p>This operation returns the current data retrieval policy for the account and region specified in the GET request. For more information about data retrieval policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html">Amazon Glacier Data Retrieval Policies</a>.</p> fn get_data_retrieval_policy( &self, input: GetDataRetrievalPolicyInput, ) -> RusotoFuture<GetDataRetrievalPolicyOutput, GetDataRetrievalPolicyError>; /// <p>This operation downloads the output of the job you initiated using <a>InitiateJob</a>. Depending on the job type you specified when you initiated the job, the output will be either the content of an archive or a vault inventory.</p> <p>You can download all the job output or download a portion of the output by specifying a byte range. In the case of an archive retrieval job, depending on the byte range you specify, Amazon Glacier returns the checksum for the portion of the data. You can compute the checksum on the client and verify that the values match to ensure the portion you downloaded is the correct data.</p> <p>A job ID will not expire for at least 24 hours after Amazon Glacier completes the job. That a byte range. For both archive and inventory retrieval jobs, you should verify the downloaded size against the size returned in the headers from the <b>Get Job Output</b> response.</p> <p>For archive retrieval jobs, you should also verify that the size is what you expected. If you download a portion of the output, the expected size is based on the range of bytes you specified. For example, if you specify a range of <code>bytes=0-1048575</code>, you should verify your download size is 1,048,576 bytes. If you download an entire archive, the expected size is the size of the archive when you uploaded it to Amazon Glacier The expected size is also returned in the headers from the <b>Get Job Output</b> response.</p> <p>In the case of an archive retrieval job, depending on the byte range you specify, Amazon Glacier returns the checksum for the portion of the data. To ensure the portion you downloaded is the correct data, compute the checksum on the client, verify that the values match, and verify that the size is what you expected.</p> <p>A job ID does not expire for at least 24 hours after Amazon Glacier completes the job. That is, you can download the job output within the 24 hours period after Amazon Glacier completes the job.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and the underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html">Downloading a Vault Inventory</a>, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/downloading-an-archive.html">Downloading an Archive</a>, and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-job-output-get.html">Get Job Output </a> </p> fn get_job_output( &self, input: GetJobOutputInput, ) -> RusotoFuture<GetJobOutputOutput, GetJobOutputError>; /// <p>This operation retrieves the <code>access-policy</code> subresource set on the vault; for more information on setting this subresource, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-SetVaultAccessPolicy.html">Set Vault Access Policy (PUT access-policy)</a>. If there is no access policy set on the vault, the operation returns a <code>404 Not found</code> error. For more information about vault access policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html">Amazon Glacier Access Control with Vault Access Policies</a>.</p> fn get_vault_access_policy( &self, input: GetVaultAccessPolicyInput, ) -> RusotoFuture<GetVaultAccessPolicyOutput, GetVaultAccessPolicyError>; /// <p>This operation retrieves the following attributes from the <code>lock-policy</code> subresource set on the specified vault: </p> <ul> <li> <p>The vault lock policy set on the vault.</p> </li> <li> <p>The state of the vault lock, which is either <code>InProgess</code> or <code>Locked</code>.</p> </li> <li> <p>When the lock ID expires. The lock ID is used to complete the vault locking process.</p> </li> <li> <p>When the vault lock was initiated and put into the <code>InProgress</code> state.</p> </li> </ul> <p>A vault lock is put into the <code>InProgress</code> state by calling <a>InitiateVaultLock</a>. A vault lock is put into the <code>Locked</code> state by calling <a>CompleteVaultLock</a>. You can abort the vault locking process by calling <a>AbortVaultLock</a>. For more information about the vault locking process, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html">Amazon Glacier Vault Lock</a>. </p> <p>If there is no vault lock policy set on the vault, the operation returns a <code>404 Not found</code> error. For more information about vault lock policies, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html">Amazon Glacier Access Control with Vault Lock Policies</a>. </p> fn get_vault_lock( &self, input: GetVaultLockInput, ) -> RusotoFuture<GetVaultLockOutput, GetVaultLockError>; /// <p>This operation retrieves the <code>notification-configuration</code> subresource of the specified vault.</p> <p>For information about setting a notification configuration on a vault, see <a>SetVaultNotifications</a>. If a notification configuration for a vault is not set, the operation returns a <code>404 Not Found</code> error. For more information about vault notifications, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon Glacier</a>. </p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-get.html">Get Vault Notification Configuration </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn get_vault_notifications( &self, input: GetVaultNotificationsInput, ) -> RusotoFuture<GetVaultNotificationsOutput, GetVaultNotificationsError>; /// <p>This operation initiates a job of the specified type, which can be a select, an archival retrieval, or a vault retrieval. For more information about using this operation, see the documentation for the underlying REST API <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html">Initiate a Job</a>. </p> fn initiate_job( &self, input: InitiateJobInput, ) -> RusotoFuture<InitiateJobOutput, InitiateJobError>; /// <p>This operation initiates a multipart upload. Amazon Glacier creates a multipart upload resource and returns its ID in the response. The multipart upload ID is used in subsequent requests to upload parts of an archive (see <a>UploadMultipartPart</a>).</p> <p>When you initiate a multipart upload, you specify the part size in number of bytes. The part size must be a megabyte (1024 KB) multiplied by a power of 2-for example, 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8 MB), and so on. The minimum allowable part size is 1 MB, and the maximum is 4 GB.</p> <p>Every part you upload to this resource (see <a>UploadMultipartPart</a>), except the last one, must have the same size. The last one can be the same size or smaller. For example, suppose you want to upload a 16.2 MB file. If you initiate the multipart upload with a part size of 4 MB, you will upload four parts of 4 MB each and one part of 0.2 MB. </p> <note> <p>You don't need to know the size of the archive when you start a multipart upload because Amazon Glacier does not require you to specify the overall archive size.</p> </note> <p>After you complete the multipart upload, Amazon Glacier removes the multipart upload resource referenced by the ID. Amazon Glacier also removes the multipart upload resource if you cancel the multipart upload or it may be removed if there is no activity for a period of 24 hours.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html">Uploading Large Archives in Parts (Multipart Upload)</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-initiate-upload.html">Initiate Multipart Upload</a> in the <i>Amazon Glacier Developer Guide</i>.</p> fn initiate_multipart_upload( &self, input: InitiateMultipartUploadInput, ) -> RusotoFuture<InitiateMultipartUploadOutput, InitiateMultipartUploadError>; /// <p>This operation initiates the vault locking process by doing the following:</p> <ul> <li> <p>Installing a vault lock policy on the specified vault.</p> </li> <li> <p>Setting the lock state of vault lock to <code>InProgress</code>.</p> </li> <li> <p>Returning a lock ID, which is used to complete the vault locking process.</p> </li> </ul> <p>You can set one vault lock policy for each vault and this policy can be up to 20 KB in size. For more information about vault lock policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html">Amazon Glacier Access Control with Vault Lock Policies</a>. </p> <p>You must complete the vault locking process within 24 hours after the vault lock enters the <code>InProgress</code> state. After the 24 hour window ends, the lock ID expires, the vault automatically exits the <code>InProgress</code> state, and the vault lock policy is removed from the vault. You call <a>CompleteVaultLock</a> to complete the vault locking process by setting the state of the vault lock to <code>Locked</code>. </p> <p>After a vault lock is in the <code>Locked</code> state, you cannot initiate a new vault lock for the vault.</p> <p>You can abort the vault locking process by calling <a>AbortVaultLock</a>. You can get the state of the vault lock by calling <a>GetVaultLock</a>. For more information about the vault locking process, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html">Amazon Glacier Vault Lock</a>.</p> <p>If this operation is called when the vault lock is in the <code>InProgress</code> state, the operation returns an <code>AccessDeniedException</code> error. When the vault lock is in the <code>InProgress</code> state you must call <a>AbortVaultLock</a> before you can initiate a new vault lock policy. </p> fn initiate_vault_lock( &self, input: InitiateVaultLockInput, ) -> RusotoFuture<InitiateVaultLockOutput, InitiateVaultLockError>; /// <p>This operation lists jobs for a vault, including jobs that are in-progress and jobs that have recently finished. The List Job operation returns a list of these jobs sorted by job initiation time.</p> <note> <p>Amazon Glacier retains recently completed jobs for a period before deleting them; however, it eventually removes completed jobs. The output of completed jobs can be retrieved. Retaining completed jobs for a period of time after they have completed enables you to get a job output in the event you miss the job completion notification or your first attempt to download it fails. For example, suppose you start an archive retrieval job to download an archive. After the job completes, you start to download the archive but encounter a network error. In this scenario, you can retry and download the archive while the job exists.</p> </note> <p>The List Jobs operation supports pagination. You should always check the response <code>Marker</code> field. If there are no more jobs to list, the <code>Marker</code> field is set to <code>null</code>. If there are more jobs to list, the <code>Marker</code> field is set to a non-null value, which you can use to continue the pagination of the list. To return a list of jobs that begins at a specific job, set the marker request parameter to the <code>Marker</code> value for that job that you obtained from a previous List Jobs request.</p> <p>You can set a maximum limit for the number of jobs returned in the response by specifying the <code>limit</code> parameter in the request. The default limit is 50. The number of jobs returned might be fewer than the limit, but the number of returned jobs never exceeds the limit.</p> <p>Additionally, you can filter the jobs list returned by specifying the optional <code>statuscode</code> parameter or <code>completed</code> parameter, or both. Using the <code>statuscode</code> parameter, you can specify to return only jobs that match either the <code>InProgress</code>, <code>Succeeded</code>, or <code>Failed</code> status. Using the <code>completed</code> parameter, you can specify to return only jobs that were completed (<code>true</code>) or jobs that were not completed (<code>false</code>).</p> <p>For more information about using this operation, see the documentation for the underlying REST API <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-jobs-get.html">List Jobs</a>. </p> fn list_jobs(&self, input: ListJobsInput) -> RusotoFuture<ListJobsOutput, ListJobsError>; /// <p>This operation lists in-progress multipart uploads for the specified vault. An in-progress multipart upload is a multipart upload that has been initiated by an <a>InitiateMultipartUpload</a> request, but has not yet been completed or aborted. The list returned in the List Multipart Upload response has no guaranteed order. </p> <p>The List Multipart Uploads operation supports pagination. By default, this operation returns up to 50 multipart uploads in the response. You should always check the response for a <code>marker</code> at which to continue the list; if there are no more items the <code>marker</code> is <code>null</code>. To return a list of multipart uploads that begins at a specific upload, set the <code>marker</code> request parameter to the value you obtained from a previous List Multipart Upload request. You can also limit the number of uploads returned in the response by specifying the <code>limit</code> parameter in the request.</p> <p>Note the difference between this operation and listing parts (<a>ListParts</a>). The List Multipart Uploads operation lists all multipart uploads for a vault and does not require a multipart upload ID. The List Parts operation requires a multipart upload ID since parts are associated with a single upload.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and the underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html">Working with Archives in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-uploads.html">List Multipart Uploads </a> in the <i>Amazon Glacier Developer Guide</i>.</p> fn list_multipart_uploads( &self, input: ListMultipartUploadsInput, ) -> RusotoFuture<ListMultipartUploadsOutput, ListMultipartUploadsError>; /// <p>This operation lists the parts of an archive that have been uploaded in a specific multipart upload. You can make this request at any time during an in-progress multipart upload before you complete the upload (see <a>CompleteMultipartUpload</a>. List Parts returns an error for completed uploads. The list returned in the List Parts response is sorted by part range. </p> <p>The List Parts operation supports pagination. By default, this operation returns up to 50 uploaded parts in the response. You should always check the response for a <code>marker</code> at which to continue the list; if there are no more items the <code>marker</code> is <code>null</code>. To return a list of parts that begins at a specific part, set the <code>marker</code> request parameter to the value you obtained from a previous List Parts request. You can also limit the number of parts returned in the response by specifying the <code>limit</code> parameter in the request. </p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and the underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html">Working with Archives in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-parts.html">List Parts</a> in the <i>Amazon Glacier Developer Guide</i>.</p> fn list_parts(&self, input: ListPartsInput) -> RusotoFuture<ListPartsOutput, ListPartsError>; /// <p>This operation lists the provisioned capacity units for the specified AWS account.</p> fn list_provisioned_capacity( &self, input: ListProvisionedCapacityInput, ) -> RusotoFuture<ListProvisionedCapacityOutput, ListProvisionedCapacityError>; /// <p>This operation lists all the tags attached to a vault. The operation returns an empty map if there are no tags. For more information about tags, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html">Tagging Amazon Glacier Resources</a>.</p> fn list_tags_for_vault( &self, input: ListTagsForVaultInput, ) -> RusotoFuture<ListTagsForVaultOutput, ListTagsForVaultError>; /// <p>This operation lists all vaults owned by the calling user's account. The list returned in the response is ASCII-sorted by vault name.</p> <p>By default, this operation returns up to 10 items. If there are more vaults to list, the response <code>marker</code> field contains the vault Amazon Resource Name (ARN) at which to continue the list with a new List Vaults request; otherwise, the <code>marker</code> field is <code>null</code>. To return a list of vaults that begins at a specific vault, set the <code>marker</code> request parameter to the vault ARN you obtained from a previous List Vaults request. You can also limit the number of vaults returned in the response by specifying the <code>limit</code> parameter in the request. </p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html">Retrieving Vault Metadata in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vaults-get.html">List Vaults </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn list_vaults( &self, input: ListVaultsInput, ) -> RusotoFuture<ListVaultsOutput, ListVaultsError>; /// <p>This operation purchases a provisioned capacity unit for an AWS account. </p> fn purchase_provisioned_capacity( &self, input: PurchaseProvisionedCapacityInput, ) -> RusotoFuture<PurchaseProvisionedCapacityOutput, PurchaseProvisionedCapacityError>; /// <p>This operation removes one or more tags from the set of tags attached to a vault. For more information about tags, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html">Tagging Amazon Glacier Resources</a>. This operation is idempotent. The operation will be successful, even if there are no tags attached to the vault. </p> fn remove_tags_from_vault( &self, input: RemoveTagsFromVaultInput, ) -> RusotoFuture<(), RemoveTagsFromVaultError>; /// <p>This operation sets and then enacts a data retrieval policy in the region specified in the PUT request. You can set one policy per region for an AWS account. The policy is enacted within a few minutes of a successful PUT operation.</p> <p>The set policy operation does not affect retrieval jobs that were in progress before the policy was enacted. For more information about data retrieval policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html">Amazon Glacier Data Retrieval Policies</a>. </p> fn set_data_retrieval_policy( &self, input: SetDataRetrievalPolicyInput, ) -> RusotoFuture<(), SetDataRetrievalPolicyError>; /// <p>This operation configures an access policy for a vault and will overwrite an existing policy. To configure a vault access policy, send a PUT request to the <code>access-policy</code> subresource of the vault. An access policy is specific to a vault and is also called a vault subresource. You can set one access policy per vault and the policy can be up to 20 KB in size. For more information about vault access policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html">Amazon Glacier Access Control with Vault Access Policies</a>. </p> fn set_vault_access_policy( &self, input: SetVaultAccessPolicyInput, ) -> RusotoFuture<(), SetVaultAccessPolicyError>; /// <p>This operation configures notifications that will be sent when specific events happen to a vault. By default, you don't get any notifications.</p> <p>To configure vault notifications, send a PUT request to the <code>notification-configuration</code> subresource of the vault. The request should include a JSON document that provides an Amazon SNS topic and specific events for which you want Amazon Glacier to send notifications to the topic.</p> <p>Amazon SNS topics must grant permission to the vault to be allowed to publish notifications to the topic. You can configure a vault to publish a notification for the following vault events:</p> <ul> <li> <p> <b>ArchiveRetrievalCompleted</b> This event occurs when a job that was initiated for an archive retrieval is completed (<a>InitiateJob</a>). The status of the completed job can be "Succeeded" or "Failed". The notification sent to the SNS topic is the same output as returned from <a>DescribeJob</a>. </p> </li> <li> <p> <b>InventoryRetrievalCompleted</b> This event occurs when a job that was initiated for an inventory retrieval is completed (<a>InitiateJob</a>). The status of the completed job can be "Succeeded" or "Failed". The notification sent to the SNS topic is the same output as returned from <a>DescribeJob</a>. </p> </li> </ul> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-put.html">Set Vault Notification Configuration </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn set_vault_notifications( &self, input: SetVaultNotificationsInput, ) -> RusotoFuture<(), SetVaultNotificationsError>; /// <p>This operation adds an archive to a vault. This is a synchronous operation, and for a successful upload, your data is durably persisted. Amazon Glacier returns the archive ID in the <code>x-amz-archive-id</code> header of the response. </p> <p>You must use the archive ID to access your data in Amazon Glacier. After you upload an archive, you should save the archive ID returned so that you can retrieve or delete the archive later. Besides saving the archive ID, you can also index it and give it a friendly name to allow for better searching. You can also use the optional archive description field to specify how the archive is referred to in an external index of archives, such as you might create in Amazon DynamoDB. You can also get the vault inventory to obtain a list of archive IDs in a vault. For more information, see <a>InitiateJob</a>. </p> <p>You must provide a SHA256 tree hash of the data you are uploading. For information about computing a SHA256 tree hash, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html">Computing Checksums</a>. </p> <p>You can optionally specify an archive description of up to 1,024 printable ASCII characters. You can get the archive description when you either retrieve the archive or get the vault inventory. For more information, see <a>InitiateJob</a>. Amazon Glacier does not interpret the description in any way. An archive description does not need to be unique. You cannot use the description to retrieve or sort the archive list. </p> <p>Archives are immutable. After you upload an archive, you cannot edit the archive or its description.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-an-archive.html">Uploading an Archive in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html">Upload Archive</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn upload_archive( &self, input: UploadArchiveInput, ) -> RusotoFuture<ArchiveCreationOutput, UploadArchiveError>; /// <p>This operation uploads a part of an archive. You can upload archive parts in any order. You can also upload them in parallel. You can upload up to 10,000 parts for a multipart upload.</p> <p>Amazon Glacier rejects your upload part request if any of the following conditions is true:</p> <ul> <li> <p> <b>SHA256 tree hash does not match</b>To ensure that part data is not corrupted in transmission, you compute a SHA256 tree hash of the part and include it in your request. Upon receiving the part data, Amazon Glacier also computes a SHA256 tree hash. If these hash values don't match, the operation fails. For information about computing a SHA256 tree hash, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html">Computing Checksums</a>.</p> </li> <li> <p> <b>Part size does not match</b>The size of each part except the last must match the size specified in the corresponding <a>InitiateMultipartUpload</a> request. The size of the last part must be the same size as, or smaller than, the specified size.</p> <note> <p>If you upload a part whose size is smaller than the part size you specified in your initiate multipart upload request and that part is not the last part, then the upload part request will succeed. However, the subsequent Complete Multipart Upload request will fail.</p> </note> </li> <li> <p> <b>Range does not align</b>The byte range value in the request does not align with the part size specified in the corresponding initiate request. For example, if you specify a part size of 4194304 bytes (4 MB), then 0 to 4194303 bytes (4 MB - 1) and 4194304 (4 MB) to 8388607 (8 MB - 1) are valid part ranges. However, if you set a range value of 2 MB to 6 MB, the range does not align with the part size and the upload will fail. </p> </li> </ul> <p>This operation is idempotent. If you upload the same part multiple times, the data included in the most recent request overwrites the previously uploaded data.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html">Uploading Large Archives in Parts (Multipart Upload)</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-upload-part.html">Upload Part </a> in the <i>Amazon Glacier Developer Guide</i>.</p> fn upload_multipart_part( &self, input: UploadMultipartPartInput, ) -> RusotoFuture<UploadMultipartPartOutput, UploadMultipartPartError>; } /// A client for the Amazon Glacier API. #[derive(Clone)] pub struct GlacierClient { client: Client, region: region::Region, } impl GlacierClient { /// 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) -> GlacierClient { GlacierClient { client: Client::shared(), region, } } pub fn new_with<P, D>( request_dispatcher: D, credentials_provider: P, region: region::Region, ) -> GlacierClient where P: ProvideAwsCredentials + Send + Sync + 'static, P::Future: Send, D: DispatchSignedRequest + Send + Sync + 'static, D::Future: Send, { GlacierClient { client: Client::new_with(credentials_provider, request_dispatcher), region, } } } impl Glacier for GlacierClient { /// <p>This operation aborts a multipart upload identified by the upload ID.</p> <p>After the Abort Multipart Upload request succeeds, you cannot upload any more parts to the multipart upload or complete the multipart upload. Aborting a completed upload fails. However, aborting an already-aborted upload will succeed, for a short time. For more information about uploading a part and completing a multipart upload, see <a>UploadMultipartPart</a> and <a>CompleteMultipartUpload</a>.</p> <p>This operation is idempotent.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html">Working with Archives in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-abort-upload.html">Abort Multipart Upload</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn abort_multipart_upload( &self, input: AbortMultipartUploadInput, ) -> RusotoFuture<(), AbortMultipartUploadError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/multipart-uploads/{upload_id}", account_id = input.account_id, upload_id = input.upload_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("DELETE", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(AbortMultipartUploadError::from_response(response)) }), ) } }) } /// <p>This operation aborts the vault locking process if the vault lock is not in the <code>Locked</code> state. If the vault lock is in the <code>Locked</code> state when this operation is requested, the operation returns an <code>AccessDeniedException</code> error. Aborting the vault locking process removes the vault lock policy from the specified vault. </p> <p>A vault lock is put into the <code>InProgress</code> state by calling <a>InitiateVaultLock</a>. A vault lock is put into the <code>Locked</code> state by calling <a>CompleteVaultLock</a>. You can get the state of a vault lock by calling <a>GetVaultLock</a>. For more information about the vault locking process, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html">Amazon Glacier Vault Lock</a>. For more information about vault lock policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html">Amazon Glacier Access Control with Vault Lock Policies</a>. </p> <p>This operation is idempotent. You can successfully invoke this operation multiple times, if the vault lock is in the <code>InProgress</code> state or if there is no policy associated with the vault.</p> fn abort_vault_lock( &self, input: AbortVaultLockInput, ) -> RusotoFuture<(), AbortVaultLockError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/lock-policy", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("DELETE", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(AbortVaultLockError::from_response(response))), ) } }) } /// <p>This operation adds the specified tags to a vault. Each tag is composed of a key and a value. Each vault can have up to 10 tags. If your request would cause the tag limit for the vault to be exceeded, the operation throws the <code>LimitExceededException</code> error. If a tag already exists on the vault under a specified key, the existing key value will be overwritten. For more information about tags, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html">Tagging Amazon Glacier Resources</a>. </p> fn add_tags_to_vault( &self, input: AddTagsToVaultInput, ) -> RusotoFuture<(), AddTagsToVaultError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/tags", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("POST", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let encoded = Some(serde_json::to_vec(&input).unwrap()); request.set_payload(encoded); let mut params = Params::new(); params.put("operation", "add"); request.set_params(params); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(AddTagsToVaultError::from_response(response))), ) } }) } /// <p>You call this operation to inform Amazon Glacier that all the archive parts have been uploaded and that Amazon Glacier can now assemble the archive from the uploaded parts. After assembling and saving the archive to the vault, Amazon Glacier returns the URI path of the newly created archive resource. Using the URI path, you can then access the archive. After you upload an archive, you should save the archive ID returned to retrieve the archive at a later point. You can also get the vault inventory to obtain a list of archive IDs in a vault. For more information, see <a>InitiateJob</a>.</p> <p>In the request, you must include the computed SHA256 tree hash of the entire archive you have uploaded. For information about computing a SHA256 tree hash, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html">Computing Checksums</a>. On the server side, Amazon Glacier also constructs the SHA256 tree hash of the assembled archive. If the values match, Amazon Glacier saves the archive to the vault; otherwise, it returns an error, and the operation fails. The <a>ListParts</a> operation returns a list of parts uploaded for a specific multipart upload. It includes checksum information for each uploaded part that can be used to debug a bad checksum issue.</p> <p>Additionally, Amazon Glacier also checks for any missing content ranges when assembling the archive, if missing content ranges are found, Amazon Glacier returns an error and the operation fails.</p> <p>Complete Multipart Upload is an idempotent operation. After your first successful complete multipart upload, if you call the operation again within a short period, the operation will succeed and return the same archive ID. This is useful in the event you experience a network issue that causes an aborted connection or receive a 500 server error, in which case you can repeat your Complete Multipart Upload request and get the same archive ID without creating duplicate archives. Note, however, that after the multipart upload completes, you cannot call the List Parts operation and the multipart upload will not appear in List Multipart Uploads response, even if idempotent complete is possible.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html">Uploading Large Archives in Parts (Multipart Upload)</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-complete-upload.html">Complete Multipart Upload</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn complete_multipart_upload( &self, input: CompleteMultipartUploadInput, ) -> RusotoFuture<ArchiveCreationOutput, CompleteMultipartUploadError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/multipart-uploads/{upload_id}", account_id = input.account_id, upload_id = input.upload_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("POST", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); if let Some(ref archive_size) = input.archive_size { request.add_header("x-amz-archive-size", &archive_size.to_string()); } if let Some(ref checksum) = input.checksum { request.add_header("x-amz-sha256-tree-hash", &checksum.to_string()); } self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 201 { Box::new(response.buffer().from_err().and_then(|response| { let mut result = proto::json::ResponsePayload::new(&response) .deserialize::<ArchiveCreationOutput, _>()?; if let Some(archive_id) = response.headers.get("x-amz-archive-id") { let value = archive_id.to_owned(); result.archive_id = Some(value) }; if let Some(checksum) = response.headers.get("x-amz-sha256-tree-hash") { let value = checksum.to_owned(); result.checksum = Some(value) }; if let Some(location) = response.headers.get("Location") { let value = location.to_owned(); result.location = Some(value) }; Ok(result) })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(CompleteMultipartUploadError::from_response(response)) })) } }) } /// <p>This operation completes the vault locking process by transitioning the vault lock from the <code>InProgress</code> state to the <code>Locked</code> state, which causes the vault lock policy to become unchangeable. A vault lock is put into the <code>InProgress</code> state by calling <a>InitiateVaultLock</a>. You can obtain the state of the vault lock by calling <a>GetVaultLock</a>. For more information about the vault locking process, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html">Amazon Glacier Vault Lock</a>. </p> <p>This operation is idempotent. This request is always successful if the vault lock is in the <code>Locked</code> state and the provided lock ID matches the lock ID originally used to lock the vault.</p> <p>If an invalid lock ID is passed in the request when the vault lock is in the <code>Locked</code> state, the operation returns an <code>AccessDeniedException</code> error. If an invalid lock ID is passed in the request when the vault lock is in the <code>InProgress</code> state, the operation throws an <code>InvalidParameter</code> error.</p> fn complete_vault_lock( &self, input: CompleteVaultLockInput, ) -> RusotoFuture<(), CompleteVaultLockError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/lock-policy/{lock_id}", account_id = input.account_id, lock_id = input.lock_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("POST", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(CompleteVaultLockError::from_response(response))), ) } }) } /// <p>This operation creates a new vault with the specified name. The name of the vault must be unique within a region for an AWS account. You can create up to 1,000 vaults per account. If you need to create more vaults, contact Amazon Glacier.</p> <p>You must use the following guidelines when naming a vault.</p> <ul> <li> <p>Names can be between 1 and 255 characters long.</p> </li> <li> <p>Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), and '.' (period).</p> </li> </ul> <p>This operation is idempotent.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/creating-vaults.html">Creating a Vault in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-put.html">Create Vault </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn create_vault( &self, input: CreateVaultInput, ) -> RusotoFuture<CreateVaultOutput, CreateVaultError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("PUT", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 201 { Box::new(response.buffer().from_err().and_then(|response| { let mut result = proto::json::ResponsePayload::new(&response) .deserialize::<CreateVaultOutput, _>()?; if let Some(location) = response.headers.get("Location") { let value = location.to_owned(); result.location = Some(value) }; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(CreateVaultError::from_response(response))), ) } }) } /// <p>This operation deletes an archive from a vault. Subsequent requests to initiate a retrieval of this archive will fail. Archive retrievals that are in progress for this archive ID may or may not succeed according to the following scenarios:</p> <ul> <li> <p>If the archive retrieval job is actively preparing the data for download when Amazon Glacier receives the delete archive request, the archival retrieval operation might fail.</p> </li> <li> <p>If the archive retrieval job has successfully prepared the archive for download when Amazon Glacier receives the delete archive request, you will be able to download the output.</p> </li> </ul> <p>This operation is idempotent. Attempting to delete an already-deleted archive does not result in an error.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-an-archive.html">Deleting an Archive in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html">Delete Archive</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn delete_archive(&self, input: DeleteArchiveInput) -> RusotoFuture<(), DeleteArchiveError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/archives/{archive_id}", account_id = input.account_id, archive_id = input.archive_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("DELETE", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DeleteArchiveError::from_response(response))), ) } }) } /// <p>This operation deletes a vault. Amazon Glacier will delete a vault only if there are no archives in the vault as of the last inventory and there have been no writes to the vault since the last inventory. If either of these conditions is not satisfied, the vault deletion fails (that is, the vault is not removed) and Amazon Glacier returns an error. You can use <a>DescribeVault</a> to return the number of archives in a vault, and you can use <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html">Initiate a Job (POST jobs)</a> to initiate a new inventory retrieval for a vault. The inventory contains the archive IDs you use to delete archives using <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-delete.html">Delete Archive (DELETE archive)</a>.</p> <p>This operation is idempotent.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/deleting-vaults.html">Deleting a Vault in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-delete.html">Delete Vault </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn delete_vault(&self, input: DeleteVaultInput) -> RusotoFuture<(), DeleteVaultError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("DELETE", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DeleteVaultError::from_response(response))), ) } }) } /// <p>This operation deletes the access policy associated with the specified vault. The operation is eventually consistent; that is, it might take some time for Amazon Glacier to completely remove the access policy, and you might still see the effect of the policy for a short time after you send the delete request.</p> <p>This operation is idempotent. You can invoke delete multiple times, even if there is no policy associated with the vault. For more information about vault access policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html">Amazon Glacier Access Control with Vault Access Policies</a>. </p> fn delete_vault_access_policy( &self, input: DeleteVaultAccessPolicyInput, ) -> RusotoFuture<(), DeleteVaultAccessPolicyError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/access-policy", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("DELETE", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DeleteVaultAccessPolicyError::from_response(response)) })) } }) } /// <p>This operation deletes the notification configuration set for a vault. The operation is eventually consistent; that is, it might take some time for Amazon Glacier to completely disable the notifications and you might still receive some notifications for a short time after you send the delete request.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-delete.html">Delete Vault Notification Configuration </a> in the Amazon Glacier Developer Guide. </p> fn delete_vault_notifications( &self, input: DeleteVaultNotificationsInput, ) -> RusotoFuture<(), DeleteVaultNotificationsError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/notification-configuration", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("DELETE", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(DeleteVaultNotificationsError::from_response(response)) })) } }) } /// <p>This operation returns information about a job you previously initiated, including the job initiation date, the user who initiated the job, the job status code/message and the Amazon SNS topic to notify after Amazon Glacier completes the job. For more information about initiating a job, see <a>InitiateJob</a>. </p> <note> <p>This operation enables you to check the status of your job. However, it is strongly recommended that you set up an Amazon SNS topic and specify it in your initiate job request so that Amazon Glacier can notify the topic after it completes the job.</p> </note> <p>A job ID will not expire for at least 24 hours after Amazon Glacier completes the job.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For more information about using this operation, see the documentation for the underlying REST API <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-describe-job-get.html">Describe Job</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn describe_job( &self, input: DescribeJobInput, ) -> RusotoFuture<GlacierJobDescription, DescribeJobError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/jobs/{job_id}", account_id = input.account_id, job_id = input.job_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<GlacierJobDescription, _>()?; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeJobError::from_response(response))), ) } }) } /// <p>This operation returns information about a vault, including the vault's Amazon Resource Name (ARN), the date the vault was created, the number of archives it contains, and the total size of all the archives in the vault. The number of archives and their total size are as of the last inventory generation. This means that if you add or remove an archive from a vault, and then immediately use Describe Vault, the change in contents will not be immediately reflected. If you want to retrieve the latest inventory of the vault, use <a>InitiateJob</a>. Amazon Glacier generates vault inventories approximately daily. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html">Downloading a Vault Inventory in Amazon Glacier</a>. </p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html">Retrieving Vault Metadata in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-get.html">Describe Vault </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn describe_vault( &self, input: DescribeVaultInput, ) -> RusotoFuture<DescribeVaultOutput, DescribeVaultError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<DescribeVaultOutput, _>()?; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(DescribeVaultError::from_response(response))), ) } }) } /// <p>This operation returns the current data retrieval policy for the account and region specified in the GET request. For more information about data retrieval policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html">Amazon Glacier Data Retrieval Policies</a>.</p> fn get_data_retrieval_policy( &self, input: GetDataRetrievalPolicyInput, ) -> RusotoFuture<GetDataRetrievalPolicyOutput, GetDataRetrievalPolicyError> { let request_uri = format!( "/{account_id}/policies/data-retrieval", account_id = input.account_id ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<GetDataRetrievalPolicyOutput, _>()?; Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(GetDataRetrievalPolicyError::from_response(response)) }), ) } }) } /// <p>This operation downloads the output of the job you initiated using <a>InitiateJob</a>. Depending on the job type you specified when you initiated the job, the output will be either the content of an archive or a vault inventory.</p> <p>You can download all the job output or download a portion of the output by specifying a byte range. In the case of an archive retrieval job, depending on the byte range you specify, Amazon Glacier returns the checksum for the portion of the data. You can compute the checksum on the client and verify that the values match to ensure the portion you downloaded is the correct data.</p> <p>A job ID will not expire for at least 24 hours after Amazon Glacier completes the job. That a byte range. For both archive and inventory retrieval jobs, you should verify the downloaded size against the size returned in the headers from the <b>Get Job Output</b> response.</p> <p>For archive retrieval jobs, you should also verify that the size is what you expected. If you download a portion of the output, the expected size is based on the range of bytes you specified. For example, if you specify a range of <code>bytes=0-1048575</code>, you should verify your download size is 1,048,576 bytes. If you download an entire archive, the expected size is the size of the archive when you uploaded it to Amazon Glacier The expected size is also returned in the headers from the <b>Get Job Output</b> response.</p> <p>In the case of an archive retrieval job, depending on the byte range you specify, Amazon Glacier returns the checksum for the portion of the data. To ensure the portion you downloaded is the correct data, compute the checksum on the client, verify that the values match, and verify that the size is what you expected.</p> <p>A job ID does not expire for at least 24 hours after Amazon Glacier completes the job. That is, you can download the job output within the 24 hours period after Amazon Glacier completes the job.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and the underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-inventory.html">Downloading a Vault Inventory</a>, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/downloading-an-archive.html">Downloading an Archive</a>, and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-job-output-get.html">Get Job Output </a> </p> fn get_job_output( &self, input: GetJobOutputInput, ) -> RusotoFuture<GetJobOutputOutput, GetJobOutputError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/jobs/{job_id}/output", account_id = input.account_id, job_id = input.job_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); if let Some(ref range) = input.range { request.add_header("Range", &range.to_string()); } self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let mut result = GetJobOutputOutput::default(); result.body = Some(response.body); if let Some(accept_ranges) = response.headers.get("Accept-Ranges") { let value = accept_ranges.to_owned(); result.accept_ranges = Some(value) }; if let Some(archive_description) = response.headers.get("x-amz-archive-description") { let value = archive_description.to_owned(); result.archive_description = Some(value) }; if let Some(checksum) = response.headers.get("x-amz-sha256-tree-hash") { let value = checksum.to_owned(); result.checksum = Some(value) }; if let Some(content_range) = response.headers.get("Content-Range") { let value = content_range.to_owned(); result.content_range = Some(value) }; if let Some(content_type) = response.headers.get("Content-Type") { let value = content_type.to_owned(); result.content_type = Some(value) }; result.status = Some(response.status.as_u16() as i64); Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(GetJobOutputError::from_response(response))), ) } }) } /// <p>This operation retrieves the <code>access-policy</code> subresource set on the vault; for more information on setting this subresource, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-SetVaultAccessPolicy.html">Set Vault Access Policy (PUT access-policy)</a>. If there is no access policy set on the vault, the operation returns a <code>404 Not found</code> error. For more information about vault access policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html">Amazon Glacier Access Control with Vault Access Policies</a>.</p> fn get_vault_access_policy( &self, input: GetVaultAccessPolicyInput, ) -> RusotoFuture<GetVaultAccessPolicyOutput, GetVaultAccessPolicyError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/access-policy", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<GetVaultAccessPolicyOutput, _>()?; Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(GetVaultAccessPolicyError::from_response(response)) }), ) } }) } /// <p>This operation retrieves the following attributes from the <code>lock-policy</code> subresource set on the specified vault: </p> <ul> <li> <p>The vault lock policy set on the vault.</p> </li> <li> <p>The state of the vault lock, which is either <code>InProgess</code> or <code>Locked</code>.</p> </li> <li> <p>When the lock ID expires. The lock ID is used to complete the vault locking process.</p> </li> <li> <p>When the vault lock was initiated and put into the <code>InProgress</code> state.</p> </li> </ul> <p>A vault lock is put into the <code>InProgress</code> state by calling <a>InitiateVaultLock</a>. A vault lock is put into the <code>Locked</code> state by calling <a>CompleteVaultLock</a>. You can abort the vault locking process by calling <a>AbortVaultLock</a>. For more information about the vault locking process, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html">Amazon Glacier Vault Lock</a>. </p> <p>If there is no vault lock policy set on the vault, the operation returns a <code>404 Not found</code> error. For more information about vault lock policies, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html">Amazon Glacier Access Control with Vault Lock Policies</a>. </p> fn get_vault_lock( &self, input: GetVaultLockInput, ) -> RusotoFuture<GetVaultLockOutput, GetVaultLockError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/lock-policy", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<GetVaultLockOutput, _>()?; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(GetVaultLockError::from_response(response))), ) } }) } /// <p>This operation retrieves the <code>notification-configuration</code> subresource of the specified vault.</p> <p>For information about setting a notification configuration on a vault, see <a>SetVaultNotifications</a>. If a notification configuration for a vault is not set, the operation returns a <code>404 Not Found</code> error. For more information about vault notifications, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon Glacier</a>. </p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-get.html">Get Vault Notification Configuration </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn get_vault_notifications( &self, input: GetVaultNotificationsInput, ) -> RusotoFuture<GetVaultNotificationsOutput, GetVaultNotificationsError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/notification-configuration", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<GetVaultNotificationsOutput, _>()?; Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(GetVaultNotificationsError::from_response(response)) }), ) } }) } /// <p>This operation initiates a job of the specified type, which can be a select, an archival retrieval, or a vault retrieval. For more information about using this operation, see the documentation for the underlying REST API <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html">Initiate a Job</a>. </p> fn initiate_job( &self, input: InitiateJobInput, ) -> RusotoFuture<InitiateJobOutput, InitiateJobError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/jobs", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("POST", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let encoded = Some(serde_json::to_vec(&input.job_parameters).unwrap()); request.set_payload(encoded); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 202 { Box::new(response.buffer().from_err().and_then(|response| { let mut result = proto::json::ResponsePayload::new(&response) .deserialize::<InitiateJobOutput, _>()?; if let Some(job_id) = response.headers.get("x-amz-job-id") { let value = job_id.to_owned(); result.job_id = Some(value) }; if let Some(job_output_path) = response.headers.get("x-amz-job-output-path") { let value = job_output_path.to_owned(); result.job_output_path = Some(value) }; if let Some(location) = response.headers.get("Location") { let value = location.to_owned(); result.location = Some(value) }; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(InitiateJobError::from_response(response))), ) } }) } /// <p>This operation initiates a multipart upload. Amazon Glacier creates a multipart upload resource and returns its ID in the response. The multipart upload ID is used in subsequent requests to upload parts of an archive (see <a>UploadMultipartPart</a>).</p> <p>When you initiate a multipart upload, you specify the part size in number of bytes. The part size must be a megabyte (1024 KB) multiplied by a power of 2-for example, 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8 MB), and so on. The minimum allowable part size is 1 MB, and the maximum is 4 GB.</p> <p>Every part you upload to this resource (see <a>UploadMultipartPart</a>), except the last one, must have the same size. The last one can be the same size or smaller. For example, suppose you want to upload a 16.2 MB file. If you initiate the multipart upload with a part size of 4 MB, you will upload four parts of 4 MB each and one part of 0.2 MB. </p> <note> <p>You don't need to know the size of the archive when you start a multipart upload because Amazon Glacier does not require you to specify the overall archive size.</p> </note> <p>After you complete the multipart upload, Amazon Glacier removes the multipart upload resource referenced by the ID. Amazon Glacier also removes the multipart upload resource if you cancel the multipart upload or it may be removed if there is no activity for a period of 24 hours.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html">Uploading Large Archives in Parts (Multipart Upload)</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-initiate-upload.html">Initiate Multipart Upload</a> in the <i>Amazon Glacier Developer Guide</i>.</p> fn initiate_multipart_upload( &self, input: InitiateMultipartUploadInput, ) -> RusotoFuture<InitiateMultipartUploadOutput, InitiateMultipartUploadError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/multipart-uploads", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("POST", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); if let Some(ref archive_description) = input.archive_description { request.add_header( "x-amz-archive-description", &archive_description.to_string(), ); } if let Some(ref part_size) = input.part_size { request.add_header("x-amz-part-size", &part_size.to_string()); } self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 201 { Box::new(response.buffer().from_err().and_then(|response| { let mut result = proto::json::ResponsePayload::new(&response) .deserialize::<InitiateMultipartUploadOutput, _>()?; if let Some(location) = response.headers.get("Location") { let value = location.to_owned(); result.location = Some(value) }; if let Some(upload_id) = response.headers.get("x-amz-multipart-upload-id") { let value = upload_id.to_owned(); result.upload_id = Some(value) }; Ok(result) })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(InitiateMultipartUploadError::from_response(response)) })) } }) } /// <p>This operation initiates the vault locking process by doing the following:</p> <ul> <li> <p>Installing a vault lock policy on the specified vault.</p> </li> <li> <p>Setting the lock state of vault lock to <code>InProgress</code>.</p> </li> <li> <p>Returning a lock ID, which is used to complete the vault locking process.</p> </li> </ul> <p>You can set one vault lock policy for each vault and this policy can be up to 20 KB in size. For more information about vault lock policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock-policy.html">Amazon Glacier Access Control with Vault Lock Policies</a>. </p> <p>You must complete the vault locking process within 24 hours after the vault lock enters the <code>InProgress</code> state. After the 24 hour window ends, the lock ID expires, the vault automatically exits the <code>InProgress</code> state, and the vault lock policy is removed from the vault. You call <a>CompleteVaultLock</a> to complete the vault locking process by setting the state of the vault lock to <code>Locked</code>. </p> <p>After a vault lock is in the <code>Locked</code> state, you cannot initiate a new vault lock for the vault.</p> <p>You can abort the vault locking process by calling <a>AbortVaultLock</a>. You can get the state of the vault lock by calling <a>GetVaultLock</a>. For more information about the vault locking process, <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-lock.html">Amazon Glacier Vault Lock</a>.</p> <p>If this operation is called when the vault lock is in the <code>InProgress</code> state, the operation returns an <code>AccessDeniedException</code> error. When the vault lock is in the <code>InProgress</code> state you must call <a>AbortVaultLock</a> before you can initiate a new vault lock policy. </p> fn initiate_vault_lock( &self, input: InitiateVaultLockInput, ) -> RusotoFuture<InitiateVaultLockOutput, InitiateVaultLockError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/lock-policy", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("POST", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let encoded = Some(serde_json::to_vec(&input.policy).unwrap()); request.set_payload(encoded); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 201 { Box::new(response.buffer().from_err().and_then(|response| { let mut result = proto::json::ResponsePayload::new(&response) .deserialize::<InitiateVaultLockOutput, _>()?; if let Some(lock_id) = response.headers.get("x-amz-lock-id") { let value = lock_id.to_owned(); result.lock_id = Some(value) }; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(InitiateVaultLockError::from_response(response))), ) } }) } /// <p>This operation lists jobs for a vault, including jobs that are in-progress and jobs that have recently finished. The List Job operation returns a list of these jobs sorted by job initiation time.</p> <note> <p>Amazon Glacier retains recently completed jobs for a period before deleting them; however, it eventually removes completed jobs. The output of completed jobs can be retrieved. Retaining completed jobs for a period of time after they have completed enables you to get a job output in the event you miss the job completion notification or your first attempt to download it fails. For example, suppose you start an archive retrieval job to download an archive. After the job completes, you start to download the archive but encounter a network error. In this scenario, you can retry and download the archive while the job exists.</p> </note> <p>The List Jobs operation supports pagination. You should always check the response <code>Marker</code> field. If there are no more jobs to list, the <code>Marker</code> field is set to <code>null</code>. If there are more jobs to list, the <code>Marker</code> field is set to a non-null value, which you can use to continue the pagination of the list. To return a list of jobs that begins at a specific job, set the marker request parameter to the <code>Marker</code> value for that job that you obtained from a previous List Jobs request.</p> <p>You can set a maximum limit for the number of jobs returned in the response by specifying the <code>limit</code> parameter in the request. The default limit is 50. The number of jobs returned might be fewer than the limit, but the number of returned jobs never exceeds the limit.</p> <p>Additionally, you can filter the jobs list returned by specifying the optional <code>statuscode</code> parameter or <code>completed</code> parameter, or both. Using the <code>statuscode</code> parameter, you can specify to return only jobs that match either the <code>InProgress</code>, <code>Succeeded</code>, or <code>Failed</code> status. Using the <code>completed</code> parameter, you can specify to return only jobs that were completed (<code>true</code>) or jobs that were not completed (<code>false</code>).</p> <p>For more information about using this operation, see the documentation for the underlying REST API <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-jobs-get.html">List Jobs</a>. </p> fn list_jobs(&self, input: ListJobsInput) -> RusotoFuture<ListJobsOutput, ListJobsError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/jobs", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let mut params = Params::new(); if let Some(ref x) = input.completed { params.put("completed", x); } if let Some(ref x) = input.limit { params.put("limit", x); } if let Some(ref x) = input.marker { params.put("marker", x); } if let Some(ref x) = input.statuscode { params.put("statuscode", x); } request.set_params(params); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<ListJobsOutput, _>()?; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListJobsError::from_response(response))), ) } }) } /// <p>This operation lists in-progress multipart uploads for the specified vault. An in-progress multipart upload is a multipart upload that has been initiated by an <a>InitiateMultipartUpload</a> request, but has not yet been completed or aborted. The list returned in the List Multipart Upload response has no guaranteed order. </p> <p>The List Multipart Uploads operation supports pagination. By default, this operation returns up to 50 multipart uploads in the response. You should always check the response for a <code>marker</code> at which to continue the list; if there are no more items the <code>marker</code> is <code>null</code>. To return a list of multipart uploads that begins at a specific upload, set the <code>marker</code> request parameter to the value you obtained from a previous List Multipart Upload request. You can also limit the number of uploads returned in the response by specifying the <code>limit</code> parameter in the request.</p> <p>Note the difference between this operation and listing parts (<a>ListParts</a>). The List Multipart Uploads operation lists all multipart uploads for a vault and does not require a multipart upload ID. The List Parts operation requires a multipart upload ID since parts are associated with a single upload.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and the underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html">Working with Archives in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-uploads.html">List Multipart Uploads </a> in the <i>Amazon Glacier Developer Guide</i>.</p> fn list_multipart_uploads( &self, input: ListMultipartUploadsInput, ) -> RusotoFuture<ListMultipartUploadsOutput, ListMultipartUploadsError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/multipart-uploads", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let mut params = Params::new(); if let Some(ref x) = input.limit { params.put("limit", x); } if let Some(ref x) = input.marker { params.put("marker", x); } request.set_params(params); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<ListMultipartUploadsOutput, _>()?; Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(ListMultipartUploadsError::from_response(response)) }), ) } }) } /// <p>This operation lists the parts of an archive that have been uploaded in a specific multipart upload. You can make this request at any time during an in-progress multipart upload before you complete the upload (see <a>CompleteMultipartUpload</a>. List Parts returns an error for completed uploads. The list returned in the List Parts response is sorted by part range. </p> <p>The List Parts operation supports pagination. By default, this operation returns up to 50 uploaded parts in the response. You should always check the response for a <code>marker</code> at which to continue the list; if there are no more items the <code>marker</code> is <code>null</code>. To return a list of parts that begins at a specific part, set the <code>marker</code> request parameter to the value you obtained from a previous List Parts request. You can also limit the number of parts returned in the response by specifying the <code>limit</code> parameter in the request. </p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and the underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html">Working with Archives in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-parts.html">List Parts</a> in the <i>Amazon Glacier Developer Guide</i>.</p> fn list_parts(&self, input: ListPartsInput) -> RusotoFuture<ListPartsOutput, ListPartsError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/multipart-uploads/{upload_id}", account_id = input.account_id, upload_id = input.upload_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let mut params = Params::new(); if let Some(ref x) = input.limit { params.put("limit", x); } if let Some(ref x) = input.marker { params.put("marker", x); } request.set_params(params); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<ListPartsOutput, _>()?; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListPartsError::from_response(response))), ) } }) } /// <p>This operation lists the provisioned capacity units for the specified AWS account.</p> fn list_provisioned_capacity( &self, input: ListProvisionedCapacityInput, ) -> RusotoFuture<ListProvisionedCapacityOutput, ListProvisionedCapacityError> { let request_uri = format!( "/{account_id}/provisioned-capacity", account_id = input.account_id ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<ListProvisionedCapacityOutput, _>()?; Ok(result) })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(ListProvisionedCapacityError::from_response(response)) })) } }) } /// <p>This operation lists all the tags attached to a vault. The operation returns an empty map if there are no tags. For more information about tags, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html">Tagging Amazon Glacier Resources</a>.</p> fn list_tags_for_vault( &self, input: ListTagsForVaultInput, ) -> RusotoFuture<ListTagsForVaultOutput, ListTagsForVaultError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/tags", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<ListTagsForVaultOutput, _>()?; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListTagsForVaultError::from_response(response))), ) } }) } /// <p>This operation lists all vaults owned by the calling user's account. The list returned in the response is ASCII-sorted by vault name.</p> <p>By default, this operation returns up to 10 items. If there are more vaults to list, the response <code>marker</code> field contains the vault Amazon Resource Name (ARN) at which to continue the list with a new List Vaults request; otherwise, the <code>marker</code> field is <code>null</code>. To return a list of vaults that begins at a specific vault, set the <code>marker</code> request parameter to the vault ARN you obtained from a previous List Vaults request. You can also limit the number of vaults returned in the response by specifying the <code>limit</code> parameter in the request. </p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/retrieving-vault-info.html">Retrieving Vault Metadata in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vaults-get.html">List Vaults </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn list_vaults( &self, input: ListVaultsInput, ) -> RusotoFuture<ListVaultsOutput, ListVaultsError> { let request_uri = format!("/{account_id}/vaults", account_id = input.account_id); let mut request = SignedRequest::new("GET", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let mut params = Params::new(); if let Some(ref x) = input.limit { params.put("limit", x); } if let Some(ref x) = input.marker { params.put("marker", x); } request.set_params(params); self.client.sign_and_dispatch(request, |response| { if response.status.is_success() { Box::new(response.buffer().from_err().and_then(|response| { let result = proto::json::ResponsePayload::new(&response) .deserialize::<ListVaultsOutput, _>()?; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(ListVaultsError::from_response(response))), ) } }) } /// <p>This operation purchases a provisioned capacity unit for an AWS account. </p> fn purchase_provisioned_capacity( &self, input: PurchaseProvisionedCapacityInput, ) -> RusotoFuture<PurchaseProvisionedCapacityOutput, PurchaseProvisionedCapacityError> { let request_uri = format!( "/{account_id}/provisioned-capacity", account_id = input.account_id ); let mut request = SignedRequest::new("POST", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 201 { Box::new(response.buffer().from_err().and_then(|response| { let mut result = proto::json::ResponsePayload::new(&response) .deserialize::<PurchaseProvisionedCapacityOutput, _>()?; if let Some(capacity_id) = response.headers.get("x-amz-capacity-id") { let value = capacity_id.to_owned(); result.capacity_id = Some(value) }; Ok(result) })) } else { Box::new(response.buffer().from_err().and_then(|response| { Err(PurchaseProvisionedCapacityError::from_response(response)) })) } }) } /// <p>This operation removes one or more tags from the set of tags attached to a vault. For more information about tags, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/tagging.html">Tagging Amazon Glacier Resources</a>. This operation is idempotent. The operation will be successful, even if there are no tags attached to the vault. </p> fn remove_tags_from_vault( &self, input: RemoveTagsFromVaultInput, ) -> RusotoFuture<(), RemoveTagsFromVaultError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/tags", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("POST", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let encoded = Some(serde_json::to_vec(&input).unwrap()); request.set_payload(encoded); let mut params = Params::new(); params.put("operation", "remove"); request.set_params(params); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(RemoveTagsFromVaultError::from_response(response)) }), ) } }) } /// <p>This operation sets and then enacts a data retrieval policy in the region specified in the PUT request. You can set one policy per region for an AWS account. The policy is enacted within a few minutes of a successful PUT operation.</p> <p>The set policy operation does not affect retrieval jobs that were in progress before the policy was enacted. For more information about data retrieval policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html">Amazon Glacier Data Retrieval Policies</a>. </p> fn set_data_retrieval_policy( &self, input: SetDataRetrievalPolicyInput, ) -> RusotoFuture<(), SetDataRetrievalPolicyError> { let request_uri = format!( "/{account_id}/policies/data-retrieval", account_id = input.account_id ); let mut request = SignedRequest::new("PUT", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let encoded = Some(serde_json::to_vec(&input).unwrap()); request.set_payload(encoded); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(SetDataRetrievalPolicyError::from_response(response)) }), ) } }) } /// <p>This operation configures an access policy for a vault and will overwrite an existing policy. To configure a vault access policy, send a PUT request to the <code>access-policy</code> subresource of the vault. An access policy is specific to a vault and is also called a vault subresource. You can set one access policy per vault and the policy can be up to 20 KB in size. For more information about vault access policies, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html">Amazon Glacier Access Control with Vault Access Policies</a>. </p> fn set_vault_access_policy( &self, input: SetVaultAccessPolicyInput, ) -> RusotoFuture<(), SetVaultAccessPolicyError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/access-policy", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("PUT", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let encoded = Some(serde_json::to_vec(&input.policy).unwrap()); request.set_payload(encoded); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(SetVaultAccessPolicyError::from_response(response)) }), ) } }) } /// <p>This operation configures notifications that will be sent when specific events happen to a vault. By default, you don't get any notifications.</p> <p>To configure vault notifications, send a PUT request to the <code>notification-configuration</code> subresource of the vault. The request should include a JSON document that provides an Amazon SNS topic and specific events for which you want Amazon Glacier to send notifications to the topic.</p> <p>Amazon SNS topics must grant permission to the vault to be allowed to publish notifications to the topic. You can configure a vault to publish a notification for the following vault events:</p> <ul> <li> <p> <b>ArchiveRetrievalCompleted</b> This event occurs when a job that was initiated for an archive retrieval is completed (<a>InitiateJob</a>). The status of the completed job can be "Succeeded" or "Failed". The notification sent to the SNS topic is the same output as returned from <a>DescribeJob</a>. </p> </li> <li> <p> <b>InventoryRetrievalCompleted</b> This event occurs when a job that was initiated for an inventory retrieval is completed (<a>InitiateJob</a>). The status of the completed job can be "Succeeded" or "Failed". The notification sent to the SNS topic is the same output as returned from <a>DescribeJob</a>. </p> </li> </ul> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p>For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/configuring-notifications.html">Configuring Vault Notifications in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-vault-notifications-put.html">Set Vault Notification Configuration </a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn set_vault_notifications( &self, input: SetVaultNotificationsInput, ) -> RusotoFuture<(), SetVaultNotificationsError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/notification-configuration", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("PUT", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let encoded = Some(serde_json::to_vec(&input.vault_notification_config).unwrap()); request.set_payload(encoded); self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let result = ::std::mem::drop(response); Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(SetVaultNotificationsError::from_response(response)) }), ) } }) } /// <p>This operation adds an archive to a vault. This is a synchronous operation, and for a successful upload, your data is durably persisted. Amazon Glacier returns the archive ID in the <code>x-amz-archive-id</code> header of the response. </p> <p>You must use the archive ID to access your data in Amazon Glacier. After you upload an archive, you should save the archive ID returned so that you can retrieve or delete the archive later. Besides saving the archive ID, you can also index it and give it a friendly name to allow for better searching. You can also use the optional archive description field to specify how the archive is referred to in an external index of archives, such as you might create in Amazon DynamoDB. You can also get the vault inventory to obtain a list of archive IDs in a vault. For more information, see <a>InitiateJob</a>. </p> <p>You must provide a SHA256 tree hash of the data you are uploading. For information about computing a SHA256 tree hash, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html">Computing Checksums</a>. </p> <p>You can optionally specify an archive description of up to 1,024 printable ASCII characters. You can get the archive description when you either retrieve the archive or get the vault inventory. For more information, see <a>InitiateJob</a>. Amazon Glacier does not interpret the description in any way. An archive description does not need to be unique. You cannot use the description to retrieve or sort the archive list. </p> <p>Archives are immutable. After you upload an archive, you cannot edit the archive or its description.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-an-archive.html">Uploading an Archive in Amazon Glacier</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html">Upload Archive</a> in the <i>Amazon Glacier Developer Guide</i>. </p> fn upload_archive( &self, input: UploadArchiveInput, ) -> RusotoFuture<ArchiveCreationOutput, UploadArchiveError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/archives", account_id = input.account_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("POST", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let encoded = if let Some(ref payload) = input.body { Some(payload.to_owned()) } else { None }; request.set_payload(encoded); if let Some(ref archive_description) = input.archive_description { request.add_header( "x-amz-archive-description", &archive_description.to_string(), ); } if let Some(ref checksum) = input.checksum { request.add_header("x-amz-sha256-tree-hash", &checksum.to_string()); } self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 201 { Box::new(response.buffer().from_err().and_then(|response| { let mut result = proto::json::ResponsePayload::new(&response) .deserialize::<ArchiveCreationOutput, _>()?; if let Some(archive_id) = response.headers.get("x-amz-archive-id") { let value = archive_id.to_owned(); result.archive_id = Some(value) }; if let Some(checksum) = response.headers.get("x-amz-sha256-tree-hash") { let value = checksum.to_owned(); result.checksum = Some(value) }; if let Some(location) = response.headers.get("Location") { let value = location.to_owned(); result.location = Some(value) }; Ok(result) })) } else { Box::new( response .buffer() .from_err() .and_then(|response| Err(UploadArchiveError::from_response(response))), ) } }) } /// <p>This operation uploads a part of an archive. You can upload archive parts in any order. You can also upload them in parallel. You can upload up to 10,000 parts for a multipart upload.</p> <p>Amazon Glacier rejects your upload part request if any of the following conditions is true:</p> <ul> <li> <p> <b>SHA256 tree hash does not match</b>To ensure that part data is not corrupted in transmission, you compute a SHA256 tree hash of the part and include it in your request. Upon receiving the part data, Amazon Glacier also computes a SHA256 tree hash. If these hash values don't match, the operation fails. For information about computing a SHA256 tree hash, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html">Computing Checksums</a>.</p> </li> <li> <p> <b>Part size does not match</b>The size of each part except the last must match the size specified in the corresponding <a>InitiateMultipartUpload</a> request. The size of the last part must be the same size as, or smaller than, the specified size.</p> <note> <p>If you upload a part whose size is smaller than the part size you specified in your initiate multipart upload request and that part is not the last part, then the upload part request will succeed. However, the subsequent Complete Multipart Upload request will fail.</p> </note> </li> <li> <p> <b>Range does not align</b>The byte range value in the request does not align with the part size specified in the corresponding initiate request. For example, if you specify a part size of 4194304 bytes (4 MB), then 0 to 4194303 bytes (4 MB - 1) and 4194304 (4 MB) to 8388607 (8 MB - 1) are valid part ranges. However, if you set a range value of 2 MB to 6 MB, the range does not align with the part size and the upload will fail. </p> </li> </ul> <p>This operation is idempotent. If you upload the same part multiple times, the data included in the most recent request overwrites the previously uploaded data.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For conceptual information and underlying REST API, see <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/uploading-archive-mpu.html">Uploading Large Archives in Parts (Multipart Upload)</a> and <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/api-upload-part.html">Upload Part </a> in the <i>Amazon Glacier Developer Guide</i>.</p> fn upload_multipart_part( &self, input: UploadMultipartPartInput, ) -> RusotoFuture<UploadMultipartPartOutput, UploadMultipartPartError> { let request_uri = format!( "/{account_id}/vaults/{vault_name}/multipart-uploads/{upload_id}", account_id = input.account_id, upload_id = input.upload_id, vault_name = input.vault_name ); let mut request = SignedRequest::new("PUT", "glacier", &self.region, &request_uri); request.set_content_type("application/x-amz-json-1.1".to_owned()); request.add_header("x-amz-glacier-version", "2012-06-01"); let encoded = if let Some(ref payload) = input.body { Some(payload.to_owned()) } else { None }; request.set_payload(encoded); if let Some(ref checksum) = input.checksum { request.add_header("x-amz-sha256-tree-hash", &checksum.to_string()); } if let Some(ref range) = input.range { request.add_header("Content-Range", &range.to_string()); } self.client.sign_and_dispatch(request, |response| { if response.status.as_u16() == 204 { Box::new(response.buffer().from_err().and_then(|response| { let mut result = proto::json::ResponsePayload::new(&response) .deserialize::<UploadMultipartPartOutput, _>()?; if let Some(checksum) = response.headers.get("x-amz-sha256-tree-hash") { let value = checksum.to_owned(); result.checksum = Some(value) }; Ok(result) })) } else { Box::new( response.buffer().from_err().and_then(|response| { Err(UploadMultipartPartError::from_response(response)) }), ) } }) } }