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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle {
pub(crate) client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
pub(crate) conf: crate::Config,
}
/// Client for AWS Resource Access Manager
///
/// Client for invoking operations on AWS Resource Access Manager. Each operation on AWS Resource Access Manager is a method on this
/// this struct. `.send()` MUST be invoked on the generated operations to dispatch the request to the service.
///
/// # Examples
/// **Constructing a client and invoking an operation**
/// ```rust,no_run
/// # async fn docs() {
/// // create a shared configuration. This can be used & shared between multiple service clients.
/// let shared_config = aws_config::load_from_env().await;
/// let client = aws_sdk_ram::Client::new(&shared_config);
/// // invoke an operation
/// /* let rsp = client
/// .<operation_name>().
/// .<param>("some value")
/// .send().await; */
/// # }
/// ```
/// **Constructing a client with custom configuration**
/// ```rust,no_run
/// use aws_config::RetryConfig;
/// # async fn docs() {
/// let shared_config = aws_config::load_from_env().await;
/// let config = aws_sdk_ram::config::Builder::from(&shared_config)
/// .retry_config(RetryConfig::disabled())
/// .build();
/// let client = aws_sdk_ram::Client::from_conf(config);
/// # }
#[derive(std::fmt::Debug)]
pub struct Client {
handle: std::sync::Arc<Handle>,
}
impl std::clone::Clone for Client {
fn clone(&self) -> Self {
Self {
handle: self.handle.clone(),
}
}
}
#[doc(inline)]
pub use aws_smithy_client::Builder;
impl
From<
aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
> for Client
{
fn from(
client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
) -> Self {
Self::with_config(client, crate::Config::builder().build())
}
}
impl Client {
/// Creates a client with the given service configuration.
pub fn with_config(
client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
conf: crate::Config,
) -> Self {
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
/// Returns the client's configuration.
pub fn conf(&self) -> &crate::Config {
&self.handle.conf
}
}
impl Client {
/// Constructs a fluent builder for the [`AcceptResourceShareInvitation`](crate::client::fluent_builders::AcceptResourceShareInvitation) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_invitation_arn(impl Into<String>)`](crate::client::fluent_builders::AcceptResourceShareInvitation::resource_share_invitation_arn) / [`set_resource_share_invitation_arn(Option<String>)`](crate::client::fluent_builders::AcceptResourceShareInvitation::set_resource_share_invitation_arn): <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the invitation that you want to accept.</p>
/// - [`client_token(impl Into<String>)`](crate::client::fluent_builders::AcceptResourceShareInvitation::client_token) / [`set_client_token(Option<String>)`](crate::client::fluent_builders::AcceptResourceShareInvitation::set_client_token): <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
/// - On success, responds with [`AcceptResourceShareInvitationOutput`](crate::output::AcceptResourceShareInvitationOutput) with field(s):
/// - [`resource_share_invitation(Option<ResourceShareInvitation>)`](crate::output::AcceptResourceShareInvitationOutput::resource_share_invitation): <p>An object that contains information about the specified invitation.</p>
/// - [`client_token(Option<String>)`](crate::output::AcceptResourceShareInvitationOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<AcceptResourceShareInvitationError>`](crate::error::AcceptResourceShareInvitationError)
pub fn accept_resource_share_invitation(
&self,
) -> fluent_builders::AcceptResourceShareInvitation {
fluent_builders::AcceptResourceShareInvitation::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`AssociateResourceShare`](crate::client::fluent_builders::AssociateResourceShare) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::AssociateResourceShare::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::AssociateResourceShare::set_resource_share_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to add principals or resources to.</p>
/// - [`resource_arns(Vec<String>)`](crate::client::fluent_builders::AssociateResourceShare::resource_arns) / [`set_resource_arns(Option<Vec<String>>)`](crate::client::fluent_builders::AssociateResourceShare::set_resource_arns): <p>Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resources that you want to share. This can be <code>null</code> if you want to add only principals.</p>
/// - [`principals(Vec<String>)`](crate::client::fluent_builders::AssociateResourceShare::principals) / [`set_principals(Option<Vec<String>>)`](crate::client::fluent_builders::AssociateResourceShare::set_principals): <p>Specifies a list of principals to whom you want to the resource share. This can be <code>null</code> if you want to add only resources.</p> <p>What the principals can do with the resources in the share is determined by the RAM permissions that you associate with the resource share. See <code>AssociateResourceSharePermission</code>.</p> <p>You can include the following values:</p> <ul> <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li> <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li> <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li> <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li> <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li> </ul> <note> <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p> </note>
/// - [`client_token(impl Into<String>)`](crate::client::fluent_builders::AssociateResourceShare::client_token) / [`set_client_token(Option<String>)`](crate::client::fluent_builders::AssociateResourceShare::set_client_token): <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
/// - On success, responds with [`AssociateResourceShareOutput`](crate::output::AssociateResourceShareOutput) with field(s):
/// - [`resource_share_associations(Option<Vec<ResourceShareAssociation>>)`](crate::output::AssociateResourceShareOutput::resource_share_associations): <p>An array of objects that contain information about the associations.</p>
/// - [`client_token(Option<String>)`](crate::output::AssociateResourceShareOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<AssociateResourceShareError>`](crate::error::AssociateResourceShareError)
pub fn associate_resource_share(&self) -> fluent_builders::AssociateResourceShare {
fluent_builders::AssociateResourceShare::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`AssociateResourceSharePermission`](crate::client::fluent_builders::AssociateResourceSharePermission) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::AssociateResourceSharePermission::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::AssociateResourceSharePermission::set_resource_share_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share to which you want to add or replace permissions.</p>
/// - [`permission_arn(impl Into<String>)`](crate::client::fluent_builders::AssociateResourceSharePermission::permission_arn) / [`set_permission_arn(Option<String>)`](crate::client::fluent_builders::AssociateResourceSharePermission::set_permission_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
/// - [`replace(bool)`](crate::client::fluent_builders::AssociateResourceSharePermission::replace) / [`set_replace(Option<bool>)`](crate::client::fluent_builders::AssociateResourceSharePermission::set_replace): <p>Specifies whether the specified permission should replace or add to the existing permission associated with the resource share. Use <code>true</code> to replace the current permissions. Use <code>false</code> to add the permission to the current permission. The default value is <code>false</code>.</p> <note> <p>A resource share can have only one permission per resource type. If a resource share already has a permission for the specified resource type and you don't set <code>replace</code> to <code>true</code> then the operation returns an error. This helps prevent accidental overwriting of a permission.</p> </note>
/// - [`client_token(impl Into<String>)`](crate::client::fluent_builders::AssociateResourceSharePermission::client_token) / [`set_client_token(Option<String>)`](crate::client::fluent_builders::AssociateResourceSharePermission::set_client_token): <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
/// - [`permission_version(i32)`](crate::client::fluent_builders::AssociateResourceSharePermission::permission_version) / [`set_permission_version(Option<i32>)`](crate::client::fluent_builders::AssociateResourceSharePermission::set_permission_version): <p>Specifies the version of the RAM permission to associate with the resource share. If you don't specify this parameter, the operation uses the version designated as the default. You can use the <code>ListPermissionVersions</code> operation to discover the available versions of a permission.</p>
/// - On success, responds with [`AssociateResourceSharePermissionOutput`](crate::output::AssociateResourceSharePermissionOutput) with field(s):
/// - [`return_value(Option<bool>)`](crate::output::AssociateResourceSharePermissionOutput::return_value): <p>A return value of <code>true</code> indicates that the request succeeded. A value of <code>false</code> indicates that the request failed.</p>
/// - [`client_token(Option<String>)`](crate::output::AssociateResourceSharePermissionOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<AssociateResourceSharePermissionError>`](crate::error::AssociateResourceSharePermissionError)
pub fn associate_resource_share_permission(
&self,
) -> fluent_builders::AssociateResourceSharePermission {
fluent_builders::AssociateResourceSharePermission::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreateResourceShare`](crate::client::fluent_builders::CreateResourceShare) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreateResourceShare::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreateResourceShare::set_name): <p>Specifies the name of the resource share.</p>
/// - [`resource_arns(Vec<String>)`](crate::client::fluent_builders::CreateResourceShare::resource_arns) / [`set_resource_arns(Option<Vec<String>>)`](crate::client::fluent_builders::CreateResourceShare::set_resource_arns): <p>Specifies a list of one or more ARNs of the resources to associate with the resource share.</p>
/// - [`principals(Vec<String>)`](crate::client::fluent_builders::CreateResourceShare::principals) / [`set_principals(Option<Vec<String>>)`](crate::client::fluent_builders::CreateResourceShare::set_principals): <p>Specifies a list of one or more principals to associate with the resource share.</p> <p>You can include the following values:</p> <ul> <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li> <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li> <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li> <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li> <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li> </ul> <note> <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p> </note>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::CreateResourceShare::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::CreateResourceShare::set_tags): <p>Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.</p>
/// - [`allow_external_principals(bool)`](crate::client::fluent_builders::CreateResourceShare::allow_external_principals) / [`set_allow_external_principals(Option<bool>)`](crate::client::fluent_builders::CreateResourceShare::set_allow_external_principals): <p>Specifies whether principals outside your organization in Organizations can be associated with a resource share. A value of <code>true</code> lets you share with individual Amazon Web Services accounts that are <i>not</i> in your organization. A value of <code>false</code> only has meaning if your account is a member of an Amazon Web Services Organization. The default value is <code>true</code>.</p>
/// - [`client_token(impl Into<String>)`](crate::client::fluent_builders::CreateResourceShare::client_token) / [`set_client_token(Option<String>)`](crate::client::fluent_builders::CreateResourceShare::set_client_token): <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
/// - [`permission_arns(Vec<String>)`](crate::client::fluent_builders::CreateResourceShare::permission_arns) / [`set_permission_arns(Option<Vec<String>>)`](crate::client::fluent_builders::CreateResourceShare::set_permission_arns): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the RAM permission to associate with the resource share. If you do not specify an ARN for the permission, RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.</p>
/// - On success, responds with [`CreateResourceShareOutput`](crate::output::CreateResourceShareOutput) with field(s):
/// - [`resource_share(Option<ResourceShare>)`](crate::output::CreateResourceShareOutput::resource_share): <p>An object with information about the new resource share.</p>
/// - [`client_token(Option<String>)`](crate::output::CreateResourceShareOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<CreateResourceShareError>`](crate::error::CreateResourceShareError)
pub fn create_resource_share(&self) -> fluent_builders::CreateResourceShare {
fluent_builders::CreateResourceShare::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteResourceShare`](crate::client::fluent_builders::DeleteResourceShare) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::DeleteResourceShare::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::DeleteResourceShare::set_resource_share_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share to delete.</p>
/// - [`client_token(impl Into<String>)`](crate::client::fluent_builders::DeleteResourceShare::client_token) / [`set_client_token(Option<String>)`](crate::client::fluent_builders::DeleteResourceShare::set_client_token): <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
/// - On success, responds with [`DeleteResourceShareOutput`](crate::output::DeleteResourceShareOutput) with field(s):
/// - [`return_value(Option<bool>)`](crate::output::DeleteResourceShareOutput::return_value): <p>A return value of <code>true</code> indicates that the request succeeded. A value of <code>false</code> indicates that the request failed.</p>
/// - [`client_token(Option<String>)`](crate::output::DeleteResourceShareOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<DeleteResourceShareError>`](crate::error::DeleteResourceShareError)
pub fn delete_resource_share(&self) -> fluent_builders::DeleteResourceShare {
fluent_builders::DeleteResourceShare::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DisassociateResourceShare`](crate::client::fluent_builders::DisassociateResourceShare) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::DisassociateResourceShare::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::DisassociateResourceShare::set_resource_share_arn): <p>Specifies <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to remove resources from.</p>
/// - [`resource_arns(Vec<String>)`](crate::client::fluent_builders::DisassociateResourceShare::resource_arns) / [`set_resource_arns(Option<Vec<String>>)`](crate::client::fluent_builders::DisassociateResourceShare::set_resource_arns): <p>Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> for one or more resources that you want to remove from the resource share. After the operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account that created the resources.</p>
/// - [`principals(Vec<String>)`](crate::client::fluent_builders::DisassociateResourceShare::principals) / [`set_principals(Option<Vec<String>>)`](crate::client::fluent_builders::DisassociateResourceShare::set_principals): <p>Specifies a list of one or more principals that no longer are to have access to the resources in this resource share.</p> <p>You can include the following values:</p> <ul> <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li> <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li> <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li> <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li> <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li> </ul> <note> <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p> </note>
/// - [`client_token(impl Into<String>)`](crate::client::fluent_builders::DisassociateResourceShare::client_token) / [`set_client_token(Option<String>)`](crate::client::fluent_builders::DisassociateResourceShare::set_client_token): <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
/// - On success, responds with [`DisassociateResourceShareOutput`](crate::output::DisassociateResourceShareOutput) with field(s):
/// - [`resource_share_associations(Option<Vec<ResourceShareAssociation>>)`](crate::output::DisassociateResourceShareOutput::resource_share_associations): <p>An array of objects that contain information about the updated associations for this resource share.</p>
/// - [`client_token(Option<String>)`](crate::output::DisassociateResourceShareOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<DisassociateResourceShareError>`](crate::error::DisassociateResourceShareError)
pub fn disassociate_resource_share(&self) -> fluent_builders::DisassociateResourceShare {
fluent_builders::DisassociateResourceShare::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DisassociateResourceSharePermission`](crate::client::fluent_builders::DisassociateResourceSharePermission) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::DisassociateResourceSharePermission::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::DisassociateResourceSharePermission::set_resource_share_arn): <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share from which you want to disassociate a permission.</p>
/// - [`permission_arn(impl Into<String>)`](crate::client::fluent_builders::DisassociateResourceSharePermission::permission_arn) / [`set_permission_arn(Option<String>)`](crate::client::fluent_builders::DisassociateResourceSharePermission::set_permission_arn): <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the permission to disassociate from the resource share. Changes to permissions take effect immediately.</p>
/// - [`client_token(impl Into<String>)`](crate::client::fluent_builders::DisassociateResourceSharePermission::client_token) / [`set_client_token(Option<String>)`](crate::client::fluent_builders::DisassociateResourceSharePermission::set_client_token): <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
/// - On success, responds with [`DisassociateResourceSharePermissionOutput`](crate::output::DisassociateResourceSharePermissionOutput) with field(s):
/// - [`return_value(Option<bool>)`](crate::output::DisassociateResourceSharePermissionOutput::return_value): <p>A return value of <code>true</code> indicates that the request succeeded. A value of <code>false</code> indicates that the request failed.</p>
/// - [`client_token(Option<String>)`](crate::output::DisassociateResourceSharePermissionOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<DisassociateResourceSharePermissionError>`](crate::error::DisassociateResourceSharePermissionError)
pub fn disassociate_resource_share_permission(
&self,
) -> fluent_builders::DisassociateResourceSharePermission {
fluent_builders::DisassociateResourceSharePermission::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`EnableSharingWithAwsOrganization`](crate::client::fluent_builders::EnableSharingWithAwsOrganization) operation.
///
/// - The fluent builder takes no input, just [`send`](crate::client::fluent_builders::EnableSharingWithAwsOrganization::send) it.
/// - On success, responds with [`EnableSharingWithAwsOrganizationOutput`](crate::output::EnableSharingWithAwsOrganizationOutput) with field(s):
/// - [`return_value(Option<bool>)`](crate::output::EnableSharingWithAwsOrganizationOutput::return_value): <p>A return value of <code>true</code> indicates that the request succeeded. A value of <code>false</code> indicates that the request failed.</p>
/// - On failure, responds with [`SdkError<EnableSharingWithAwsOrganizationError>`](crate::error::EnableSharingWithAwsOrganizationError)
pub fn enable_sharing_with_aws_organization(
&self,
) -> fluent_builders::EnableSharingWithAwsOrganization {
fluent_builders::EnableSharingWithAwsOrganization::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetPermission`](crate::client::fluent_builders::GetPermission) operation.
///
/// - The fluent builder is configurable:
/// - [`permission_arn(impl Into<String>)`](crate::client::fluent_builders::GetPermission::permission_arn) / [`set_permission_arn(Option<String>)`](crate::client::fluent_builders::GetPermission::set_permission_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the permission whose contents you want to retrieve. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
/// - [`permission_version(i32)`](crate::client::fluent_builders::GetPermission::permission_version) / [`set_permission_version(Option<i32>)`](crate::client::fluent_builders::GetPermission::set_permission_version): <p>Specifies identifier for the version of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.</p>
/// - On success, responds with [`GetPermissionOutput`](crate::output::GetPermissionOutput) with field(s):
/// - [`permission(Option<ResourceSharePermissionDetail>)`](crate::output::GetPermissionOutput::permission): <p>An object that contains information about the permission.</p>
/// - On failure, responds with [`SdkError<GetPermissionError>`](crate::error::GetPermissionError)
pub fn get_permission(&self) -> fluent_builders::GetPermission {
fluent_builders::GetPermission::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetResourcePolicies`](crate::client::fluent_builders::GetResourcePolicies) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::GetResourcePolicies::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_arns(Vec<String>)`](crate::client::fluent_builders::GetResourcePolicies::resource_arns) / [`set_resource_arns(Option<Vec<String>>)`](crate::client::fluent_builders::GetResourcePolicies::set_resource_arns): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resources whose policies you want to retrieve.</p>
/// - [`principal(impl Into<String>)`](crate::client::fluent_builders::GetResourcePolicies::principal) / [`set_principal(Option<String>)`](crate::client::fluent_builders::GetResourcePolicies::set_principal): <p>Specifies the principal.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::GetResourcePolicies::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::GetResourcePolicies::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::GetResourcePolicies::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::GetResourcePolicies::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - On success, responds with [`GetResourcePoliciesOutput`](crate::output::GetResourcePoliciesOutput) with field(s):
/// - [`policies(Option<Vec<String>>)`](crate::output::GetResourcePoliciesOutput::policies): <p>An array of resource policy documents in JSON format.</p>
/// - [`next_token(Option<String>)`](crate::output::GetResourcePoliciesOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<GetResourcePoliciesError>`](crate::error::GetResourcePoliciesError)
pub fn get_resource_policies(&self) -> fluent_builders::GetResourcePolicies {
fluent_builders::GetResourcePolicies::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetResourceShareAssociations`](crate::client::fluent_builders::GetResourceShareAssociations) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::GetResourceShareAssociations::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`association_type(ResourceShareAssociationType)`](crate::client::fluent_builders::GetResourceShareAssociations::association_type) / [`set_association_type(Option<ResourceShareAssociationType>)`](crate::client::fluent_builders::GetResourceShareAssociations::set_association_type): <p>Specifies whether you want to retrieve the associations that involve a specified resource or principal.</p> <ul> <li> <p> <code>PRINCIPAL</code> – list the principals that are associated with the specified resource share.</p> </li> <li> <p> <code>RESOURCE</code> – list the resources that are associated with the specified resource share.</p> </li> </ul>
/// - [`resource_share_arns(Vec<String>)`](crate::client::fluent_builders::GetResourceShareAssociations::resource_share_arns) / [`set_resource_share_arns(Option<Vec<String>>)`](crate::client::fluent_builders::GetResourceShareAssociations::set_resource_share_arns): <p>Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share whose associations you want to retrieve.</p>
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::GetResourceShareAssociations::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::GetResourceShareAssociations::set_resource_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource whose resource shares you want to retrieve.</p> <p>You cannot specify this parameter if the association type is <code>PRINCIPAL</code>.</p>
/// - [`principal(impl Into<String>)`](crate::client::fluent_builders::GetResourceShareAssociations::principal) / [`set_principal(Option<String>)`](crate::client::fluent_builders::GetResourceShareAssociations::set_principal): <p>Specifies the ID of the principal whose resource shares you want to retrieve. This can be an Amazon Web Services account ID, an organization ID, an organizational unit ID, or the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an individual IAM user or role.</p> <p>You cannot specify this parameter if the association type is <code>RESOURCE</code>.</p>
/// - [`association_status(ResourceShareAssociationStatus)`](crate::client::fluent_builders::GetResourceShareAssociations::association_status) / [`set_association_status(Option<ResourceShareAssociationStatus>)`](crate::client::fluent_builders::GetResourceShareAssociations::set_association_status): <p>Specifies that you want to retrieve only associations with this status.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::GetResourceShareAssociations::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::GetResourceShareAssociations::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::GetResourceShareAssociations::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::GetResourceShareAssociations::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - On success, responds with [`GetResourceShareAssociationsOutput`](crate::output::GetResourceShareAssociationsOutput) with field(s):
/// - [`resource_share_associations(Option<Vec<ResourceShareAssociation>>)`](crate::output::GetResourceShareAssociationsOutput::resource_share_associations): <p>An array of objects that contain the details about the associations.</p>
/// - [`next_token(Option<String>)`](crate::output::GetResourceShareAssociationsOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<GetResourceShareAssociationsError>`](crate::error::GetResourceShareAssociationsError)
pub fn get_resource_share_associations(&self) -> fluent_builders::GetResourceShareAssociations {
fluent_builders::GetResourceShareAssociations::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetResourceShareInvitations`](crate::client::fluent_builders::GetResourceShareInvitations) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::GetResourceShareInvitations::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_share_invitation_arns(Vec<String>)`](crate::client::fluent_builders::GetResourceShareInvitations::resource_share_invitation_arns) / [`set_resource_share_invitation_arns(Option<Vec<String>>)`](crate::client::fluent_builders::GetResourceShareInvitations::set_resource_share_invitation_arns): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share invitations you want information about.</p>
/// - [`resource_share_arns(Vec<String>)`](crate::client::fluent_builders::GetResourceShareInvitations::resource_share_arns) / [`set_resource_share_arns(Option<Vec<String>>)`](crate::client::fluent_builders::GetResourceShareInvitations::set_resource_share_arns): <p>Specifies that you want details about invitations only for the resource shares described by this list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> </p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::GetResourceShareInvitations::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::GetResourceShareInvitations::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::GetResourceShareInvitations::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::GetResourceShareInvitations::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - On success, responds with [`GetResourceShareInvitationsOutput`](crate::output::GetResourceShareInvitationsOutput) with field(s):
/// - [`resource_share_invitations(Option<Vec<ResourceShareInvitation>>)`](crate::output::GetResourceShareInvitationsOutput::resource_share_invitations): <p>An array of objects that contain the details about the invitations.</p>
/// - [`next_token(Option<String>)`](crate::output::GetResourceShareInvitationsOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<GetResourceShareInvitationsError>`](crate::error::GetResourceShareInvitationsError)
pub fn get_resource_share_invitations(&self) -> fluent_builders::GetResourceShareInvitations {
fluent_builders::GetResourceShareInvitations::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetResourceShares`](crate::client::fluent_builders::GetResourceShares) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::GetResourceShares::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_share_arns(Vec<String>)`](crate::client::fluent_builders::GetResourceShares::resource_share_arns) / [`set_resource_share_arns(Option<Vec<String>>)`](crate::client::fluent_builders::GetResourceShares::set_resource_share_arns): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of individual resource shares that you want information about.</p>
/// - [`resource_share_status(ResourceShareStatus)`](crate::client::fluent_builders::GetResourceShares::resource_share_status) / [`set_resource_share_status(Option<ResourceShareStatus>)`](crate::client::fluent_builders::GetResourceShares::set_resource_share_status): <p>Specifies that you want to retrieve details of only those resource shares that have this status.</p>
/// - [`resource_owner(ResourceOwner)`](crate::client::fluent_builders::GetResourceShares::resource_owner) / [`set_resource_owner(Option<ResourceOwner>)`](crate::client::fluent_builders::GetResourceShares::set_resource_owner): <p>Specifies that you want to retrieve details of only those resource shares that match the following:</p> <ul> <li> <p> <b> <code>SELF</code> </b> – resource shares that your account shares with other accounts</p> </li> <li> <p> <b> <code>OTHER-ACCOUNTS</code> </b> – resource shares that other accounts share with your account</p> </li> </ul>
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::GetResourceShares::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::GetResourceShares::set_name): <p>Specifies the name of an individual resource share that you want to retrieve details about.</p>
/// - [`tag_filters(Vec<TagFilter>)`](crate::client::fluent_builders::GetResourceShares::tag_filters) / [`set_tag_filters(Option<Vec<TagFilter>>)`](crate::client::fluent_builders::GetResourceShares::set_tag_filters): <p>Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::GetResourceShares::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::GetResourceShares::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::GetResourceShares::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::GetResourceShares::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - [`permission_arn(impl Into<String>)`](crate::client::fluent_builders::GetResourceShares::permission_arn) / [`set_permission_arn(Option<String>)`](crate::client::fluent_builders::GetResourceShares::set_permission_arn): <p>Specifies that you want to retrieve details of only those resource shares that use the RAM permission with this <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a>.</p>
/// - On success, responds with [`GetResourceSharesOutput`](crate::output::GetResourceSharesOutput) with field(s):
/// - [`resource_shares(Option<Vec<ResourceShare>>)`](crate::output::GetResourceSharesOutput::resource_shares): <p>An array of objects that contain the information about the resource shares.</p>
/// - [`next_token(Option<String>)`](crate::output::GetResourceSharesOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<GetResourceSharesError>`](crate::error::GetResourceSharesError)
pub fn get_resource_shares(&self) -> fluent_builders::GetResourceShares {
fluent_builders::GetResourceShares::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListPendingInvitationResources`](crate::client::fluent_builders::ListPendingInvitationResources) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListPendingInvitationResources::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_share_invitation_arn(impl Into<String>)`](crate::client::fluent_builders::ListPendingInvitationResources::resource_share_invitation_arn) / [`set_resource_share_invitation_arn(Option<String>)`](crate::client::fluent_builders::ListPendingInvitationResources::set_resource_share_invitation_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the invitation. You can use <code>GetResourceShareInvitations</code> to find the ARN of the invitation.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListPendingInvitationResources::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListPendingInvitationResources::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListPendingInvitationResources::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListPendingInvitationResources::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - [`resource_region_scope(ResourceRegionScopeFilter)`](crate::client::fluent_builders::ListPendingInvitationResources::resource_region_scope) / [`set_resource_region_scope(Option<ResourceRegionScopeFilter>)`](crate::client::fluent_builders::ListPendingInvitationResources::set_resource_region_scope): <p>Specifies that you want the results to include only resources that have the specified scope.</p> <ul> <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li> <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li> <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li> </ul> <p>The default value is <code>ALL</code>.</p>
/// - On success, responds with [`ListPendingInvitationResourcesOutput`](crate::output::ListPendingInvitationResourcesOutput) with field(s):
/// - [`resources(Option<Vec<Resource>>)`](crate::output::ListPendingInvitationResourcesOutput::resources): <p>An array of objects that contain the information about the resources included the specified resource share.</p>
/// - [`next_token(Option<String>)`](crate::output::ListPendingInvitationResourcesOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<ListPendingInvitationResourcesError>`](crate::error::ListPendingInvitationResourcesError)
pub fn list_pending_invitation_resources(
&self,
) -> fluent_builders::ListPendingInvitationResources {
fluent_builders::ListPendingInvitationResources::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListPermissions`](crate::client::fluent_builders::ListPermissions) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListPermissions::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_type(impl Into<String>)`](crate::client::fluent_builders::ListPermissions::resource_type) / [`set_resource_type(Option<String>)`](crate::client::fluent_builders::ListPermissions::set_resource_type): <p>Specifies that you want to list permissions for only the specified resource type. For example, to list only permissions that apply to EC2 subnets, specify <code>ec2:Subnet</code>. You can use the <code>ListResourceTypes</code> operation to get the specific string required.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListPermissions::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListPermissions::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListPermissions::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListPermissions::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - On success, responds with [`ListPermissionsOutput`](crate::output::ListPermissionsOutput) with field(s):
/// - [`permissions(Option<Vec<ResourceSharePermissionSummary>>)`](crate::output::ListPermissionsOutput::permissions): <p>An array of objects with information about the permissions.</p>
/// - [`next_token(Option<String>)`](crate::output::ListPermissionsOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<ListPermissionsError>`](crate::error::ListPermissionsError)
pub fn list_permissions(&self) -> fluent_builders::ListPermissions {
fluent_builders::ListPermissions::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListPermissionVersions`](crate::client::fluent_builders::ListPermissionVersions) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListPermissionVersions::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`permission_arn(impl Into<String>)`](crate::client::fluent_builders::ListPermissionVersions::permission_arn) / [`set_permission_arn(Option<String>)`](crate::client::fluent_builders::ListPermissionVersions::set_permission_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the RAM permission whose versions you want to list. You can use the <code>permissionVersion</code> parameter on the <code>AssociateResourceSharePermission</code> operation to specify a non-default version to attach.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListPermissionVersions::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListPermissionVersions::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListPermissionVersions::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListPermissionVersions::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - On success, responds with [`ListPermissionVersionsOutput`](crate::output::ListPermissionVersionsOutput) with field(s):
/// - [`permissions(Option<Vec<ResourceSharePermissionSummary>>)`](crate::output::ListPermissionVersionsOutput::permissions): <p>An array of objects that contain details for each of the available versions.</p>
/// - [`next_token(Option<String>)`](crate::output::ListPermissionVersionsOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<ListPermissionVersionsError>`](crate::error::ListPermissionVersionsError)
pub fn list_permission_versions(&self) -> fluent_builders::ListPermissionVersions {
fluent_builders::ListPermissionVersions::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListPrincipals`](crate::client::fluent_builders::ListPrincipals) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListPrincipals::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_owner(ResourceOwner)`](crate::client::fluent_builders::ListPrincipals::resource_owner) / [`set_resource_owner(Option<ResourceOwner>)`](crate::client::fluent_builders::ListPrincipals::set_resource_owner): <p>Specifies that you want to list information for only resource shares that match the following:</p> <ul> <li> <p> <b> <code>SELF</code> </b> – principals that your account is sharing resources with</p> </li> <li> <p> <b> <code>OTHER-ACCOUNTS</code> </b> – principals that are sharing resources with your account</p> </li> </ul>
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::ListPrincipals::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::ListPrincipals::set_resource_arn): <p>Specifies that you want to list principal information for the resource share with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a>.</p>
/// - [`principals(Vec<String>)`](crate::client::fluent_builders::ListPrincipals::principals) / [`set_principals(Option<Vec<String>>)`](crate::client::fluent_builders::ListPrincipals::set_principals): <p>Specifies that you want to list information for only the listed principals.</p> <p>You can include the following values:</p> <ul> <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li> <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li> <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li> <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li> <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li> </ul> <note> <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p> </note>
/// - [`resource_type(impl Into<String>)`](crate::client::fluent_builders::ListPrincipals::resource_type) / [`set_resource_type(Option<String>)`](crate::client::fluent_builders::ListPrincipals::set_resource_type): <p>Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.</p> <p>For a list of valid values, query the <code>ListResourceTypes</code> operation.</p>
/// - [`resource_share_arns(Vec<String>)`](crate::client::fluent_builders::ListPrincipals::resource_share_arns) / [`set_resource_share_arns(Option<Vec<String>>)`](crate::client::fluent_builders::ListPrincipals::set_resource_share_arns): <p>Specifies that you want to list information for only principals associated with the resource shares specified by a list the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListPrincipals::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListPrincipals::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListPrincipals::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListPrincipals::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - On success, responds with [`ListPrincipalsOutput`](crate::output::ListPrincipalsOutput) with field(s):
/// - [`principals(Option<Vec<Principal>>)`](crate::output::ListPrincipalsOutput::principals): <p>An array of objects that contain the details about the principals.</p>
/// - [`next_token(Option<String>)`](crate::output::ListPrincipalsOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<ListPrincipalsError>`](crate::error::ListPrincipalsError)
pub fn list_principals(&self) -> fluent_builders::ListPrincipals {
fluent_builders::ListPrincipals::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListResources`](crate::client::fluent_builders::ListResources) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListResources::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_owner(ResourceOwner)`](crate::client::fluent_builders::ListResources::resource_owner) / [`set_resource_owner(Option<ResourceOwner>)`](crate::client::fluent_builders::ListResources::set_resource_owner): <p>Specifies that you want to list only the resource shares that match the following:</p> <ul> <li> <p> <b> <code>SELF</code> </b> – resources that your account shares with other accounts</p> </li> <li> <p> <b> <code>OTHER-ACCOUNTS</code> </b> – resources that other accounts share with your account</p> </li> </ul>
/// - [`principal(impl Into<String>)`](crate::client::fluent_builders::ListResources::principal) / [`set_principal(Option<String>)`](crate::client::fluent_builders::ListResources::set_principal): <p>Specifies that you want to list only the resource shares that are associated with the specified principal.</p>
/// - [`resource_type(impl Into<String>)`](crate::client::fluent_builders::ListResources::resource_type) / [`set_resource_type(Option<String>)`](crate::client::fluent_builders::ListResources::set_resource_type): <p>Specifies that you want to list only the resource shares that include resources of the specified resource type.</p> <p>For valid values, query the <code>ListResourceTypes</code> operation.</p>
/// - [`resource_arns(Vec<String>)`](crate::client::fluent_builders::ListResources::resource_arns) / [`set_resource_arns(Option<Vec<String>>)`](crate::client::fluent_builders::ListResources::set_resource_arns): <p>Specifies that you want to list only the resource shares that include resources with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
/// - [`resource_share_arns(Vec<String>)`](crate::client::fluent_builders::ListResources::resource_share_arns) / [`set_resource_share_arns(Option<Vec<String>>)`](crate::client::fluent_builders::ListResources::set_resource_share_arns): <p>Specifies that you want to list only resources in the resource shares identified by the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListResources::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListResources::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListResources::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListResources::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - [`resource_region_scope(ResourceRegionScopeFilter)`](crate::client::fluent_builders::ListResources::resource_region_scope) / [`set_resource_region_scope(Option<ResourceRegionScopeFilter>)`](crate::client::fluent_builders::ListResources::set_resource_region_scope): <p>Specifies that you want the results to include only resources that have the specified scope.</p> <ul> <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li> <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li> <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li> </ul> <p>The default value is <code>ALL</code>.</p>
/// - On success, responds with [`ListResourcesOutput`](crate::output::ListResourcesOutput) with field(s):
/// - [`resources(Option<Vec<Resource>>)`](crate::output::ListResourcesOutput::resources): <p>An array of objects that contain information about the resources.</p>
/// - [`next_token(Option<String>)`](crate::output::ListResourcesOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<ListResourcesError>`](crate::error::ListResourcesError)
pub fn list_resources(&self) -> fluent_builders::ListResources {
fluent_builders::ListResources::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListResourceSharePermissions`](crate::client::fluent_builders::ListResourceSharePermissions) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListResourceSharePermissions::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::ListResourceSharePermissions::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::ListResourceSharePermissions::set_resource_share_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share for which you want to retrieve the associated permissions.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListResourceSharePermissions::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListResourceSharePermissions::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListResourceSharePermissions::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListResourceSharePermissions::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - On success, responds with [`ListResourceSharePermissionsOutput`](crate::output::ListResourceSharePermissionsOutput) with field(s):
/// - [`permissions(Option<Vec<ResourceSharePermissionSummary>>)`](crate::output::ListResourceSharePermissionsOutput::permissions): <p>An array of objects that describe the permissions associated with the resource share.</p>
/// - [`next_token(Option<String>)`](crate::output::ListResourceSharePermissionsOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<ListResourceSharePermissionsError>`](crate::error::ListResourceSharePermissionsError)
pub fn list_resource_share_permissions(&self) -> fluent_builders::ListResourceSharePermissions {
fluent_builders::ListResourceSharePermissions::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListResourceTypes`](crate::client::fluent_builders::ListResourceTypes) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListResourceTypes::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListResourceTypes::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListResourceTypes::set_next_token): <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListResourceTypes::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListResourceTypes::set_max_results): <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
/// - [`resource_region_scope(ResourceRegionScopeFilter)`](crate::client::fluent_builders::ListResourceTypes::resource_region_scope) / [`set_resource_region_scope(Option<ResourceRegionScopeFilter>)`](crate::client::fluent_builders::ListResourceTypes::set_resource_region_scope): <p>Specifies that you want the results to include only resources that have the specified scope.</p> <ul> <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li> <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li> <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li> </ul> <p>The default value is <code>ALL</code>.</p>
/// - On success, responds with [`ListResourceTypesOutput`](crate::output::ListResourceTypesOutput) with field(s):
/// - [`resource_types(Option<Vec<ServiceNameAndResourceType>>)`](crate::output::ListResourceTypesOutput::resource_types): <p>An array of objects that contain information about the resource types that can be shared using RAM.</p>
/// - [`next_token(Option<String>)`](crate::output::ListResourceTypesOutput::next_token): <p>If present, this value indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the <code>NextToken</code> response element comes back as <code>null</code>. This indicates that this is the last page of results.</p>
/// - On failure, responds with [`SdkError<ListResourceTypesError>`](crate::error::ListResourceTypesError)
pub fn list_resource_types(&self) -> fluent_builders::ListResourceTypes {
fluent_builders::ListResourceTypes::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PromoteResourceShareCreatedFromPolicy`](crate::client::fluent_builders::PromoteResourceShareCreatedFromPolicy) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::PromoteResourceShareCreatedFromPolicy::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::PromoteResourceShareCreatedFromPolicy::set_resource_share_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share to promote.</p>
/// - On success, responds with [`PromoteResourceShareCreatedFromPolicyOutput`](crate::output::PromoteResourceShareCreatedFromPolicyOutput) with field(s):
/// - [`return_value(Option<bool>)`](crate::output::PromoteResourceShareCreatedFromPolicyOutput::return_value): <p>A return value of <code>true</code> indicates that the request succeeded. A value of <code>false</code> indicates that the request failed.</p>
/// - On failure, responds with [`SdkError<PromoteResourceShareCreatedFromPolicyError>`](crate::error::PromoteResourceShareCreatedFromPolicyError)
pub fn promote_resource_share_created_from_policy(
&self,
) -> fluent_builders::PromoteResourceShareCreatedFromPolicy {
fluent_builders::PromoteResourceShareCreatedFromPolicy::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`RejectResourceShareInvitation`](crate::client::fluent_builders::RejectResourceShareInvitation) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_invitation_arn(impl Into<String>)`](crate::client::fluent_builders::RejectResourceShareInvitation::resource_share_invitation_arn) / [`set_resource_share_invitation_arn(Option<String>)`](crate::client::fluent_builders::RejectResourceShareInvitation::set_resource_share_invitation_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the invitation that you want to reject.</p>
/// - [`client_token(impl Into<String>)`](crate::client::fluent_builders::RejectResourceShareInvitation::client_token) / [`set_client_token(Option<String>)`](crate::client::fluent_builders::RejectResourceShareInvitation::set_client_token): <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
/// - On success, responds with [`RejectResourceShareInvitationOutput`](crate::output::RejectResourceShareInvitationOutput) with field(s):
/// - [`resource_share_invitation(Option<ResourceShareInvitation>)`](crate::output::RejectResourceShareInvitationOutput::resource_share_invitation): <p>An object that contains the details about the rejected invitation.</p>
/// - [`client_token(Option<String>)`](crate::output::RejectResourceShareInvitationOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<RejectResourceShareInvitationError>`](crate::error::RejectResourceShareInvitationError)
pub fn reject_resource_share_invitation(
&self,
) -> fluent_builders::RejectResourceShareInvitation {
fluent_builders::RejectResourceShareInvitation::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`TagResource`](crate::client::fluent_builders::TagResource) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::TagResource::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::TagResource::set_resource_share_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to add tags to.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::TagResource::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::TagResource::set_tags): <p>A list of one or more tag key and value pairs. The tag key must be present and not be an empty string. The tag value must be present but can be an empty string.</p>
/// - On success, responds with [`TagResourceOutput`](crate::output::TagResourceOutput)
/// - On failure, responds with [`SdkError<TagResourceError>`](crate::error::TagResourceError)
pub fn tag_resource(&self) -> fluent_builders::TagResource {
fluent_builders::TagResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UntagResource`](crate::client::fluent_builders::UntagResource) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::UntagResource::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::UntagResource::set_resource_share_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to remove tags from. The tags are removed from the resource share, not the resources in the resource share.</p>
/// - [`tag_keys(Vec<String>)`](crate::client::fluent_builders::UntagResource::tag_keys) / [`set_tag_keys(Option<Vec<String>>)`](crate::client::fluent_builders::UntagResource::set_tag_keys): <p>Specifies a list of one or more tag keys that you want to remove.</p>
/// - On success, responds with [`UntagResourceOutput`](crate::output::UntagResourceOutput)
/// - On failure, responds with [`SdkError<UntagResourceError>`](crate::error::UntagResourceError)
pub fn untag_resource(&self) -> fluent_builders::UntagResource {
fluent_builders::UntagResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateResourceShare`](crate::client::fluent_builders::UpdateResourceShare) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_share_arn(impl Into<String>)`](crate::client::fluent_builders::UpdateResourceShare::resource_share_arn) / [`set_resource_share_arn(Option<String>)`](crate::client::fluent_builders::UpdateResourceShare::set_resource_share_arn): <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to modify.</p>
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::UpdateResourceShare::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::UpdateResourceShare::set_name): <p>If specified, the new name that you want to attach to the resource share.</p>
/// - [`allow_external_principals(bool)`](crate::client::fluent_builders::UpdateResourceShare::allow_external_principals) / [`set_allow_external_principals(Option<bool>)`](crate::client::fluent_builders::UpdateResourceShare::set_allow_external_principals): <p>Specifies whether principals outside your organization in Organizations can be associated with a resource share.</p>
/// - [`client_token(impl Into<String>)`](crate::client::fluent_builders::UpdateResourceShare::client_token) / [`set_client_token(Option<String>)`](crate::client::fluent_builders::UpdateResourceShare::set_client_token): <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
/// - On success, responds with [`UpdateResourceShareOutput`](crate::output::UpdateResourceShareOutput) with field(s):
/// - [`resource_share(Option<ResourceShare>)`](crate::output::UpdateResourceShareOutput::resource_share): <p>Information about the resource share.</p>
/// - [`client_token(Option<String>)`](crate::output::UpdateResourceShareOutput::client_token): <p>The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the <code>clientToken</code> request parameter of that later call. All other parameters must also have the same values that you used in the first call.</p>
/// - On failure, responds with [`SdkError<UpdateResourceShareError>`](crate::error::UpdateResourceShareError)
pub fn update_resource_share(&self) -> fluent_builders::UpdateResourceShare {
fluent_builders::UpdateResourceShare::new(self.handle.clone())
}
}
pub mod fluent_builders {
//! Utilities to ergonomically construct a request to the service.
//!
//! Fluent builders are created through the [`Client`](crate::client::Client) by calling
//! one if its operation methods. After parameters are set using the builder methods,
//! the `send` method can be called to initiate the request.
/// Fluent builder constructing a request to `AcceptResourceShareInvitation`.
///
/// <p>Accepts an invitation to a resource share from another Amazon Web Services account. After you accept the invitation, the resources included in the resource share are available to interact with in the relevant Amazon Web Services Management Consoles and tools.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct AcceptResourceShareInvitation {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::accept_resource_share_invitation_input::Builder,
}
impl AcceptResourceShareInvitation {
/// Creates a new `AcceptResourceShareInvitation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AcceptResourceShareInvitationOutput,
aws_smithy_http::result::SdkError<crate::error::AcceptResourceShareInvitationError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the invitation that you want to accept.</p>
pub fn resource_share_invitation_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.resource_share_invitation_arn(input.into());
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the invitation that you want to accept.</p>
pub fn set_resource_share_invitation_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_invitation_arn(input);
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `AssociateResourceShare`.
///
/// <p>Adds the specified list of principals and list of resources to a resource share. Principals that already have access to this resource share immediately receive access to the added resources. Newly added principals immediately receive access to the resources shared in this resource share. </p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct AssociateResourceShare {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::associate_resource_share_input::Builder,
}
impl AssociateResourceShare {
/// Creates a new `AssociateResourceShare`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateResourceShareOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateResourceShareError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to add principals or resources to.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to add principals or resources to.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
/// Appends an item to `resourceArns`.
///
/// To override the contents of this collection use [`set_resource_arns`](Self::set_resource_arns).
///
/// <p>Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resources that you want to share. This can be <code>null</code> if you want to add only principals.</p>
pub fn resource_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arns(input.into());
self
}
/// <p>Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resources that you want to share. This can be <code>null</code> if you want to add only principals.</p>
pub fn set_resource_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_arns(input);
self
}
/// Appends an item to `principals`.
///
/// To override the contents of this collection use [`set_principals`](Self::set_principals).
///
/// <p>Specifies a list of principals to whom you want to the resource share. This can be <code>null</code> if you want to add only resources.</p>
/// <p>What the principals can do with the resources in the share is determined by the RAM permissions that you associate with the resource share. See <code>AssociateResourceSharePermission</code>.</p>
/// <p>You can include the following values:</p>
/// <ul>
/// <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li>
/// <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li>
/// <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li>
/// <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li>
/// <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li>
/// </ul> <note>
/// <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p>
/// </note>
pub fn principals(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.principals(input.into());
self
}
/// <p>Specifies a list of principals to whom you want to the resource share. This can be <code>null</code> if you want to add only resources.</p>
/// <p>What the principals can do with the resources in the share is determined by the RAM permissions that you associate with the resource share. See <code>AssociateResourceSharePermission</code>.</p>
/// <p>You can include the following values:</p>
/// <ul>
/// <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li>
/// <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li>
/// <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li>
/// <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li>
/// <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li>
/// </ul> <note>
/// <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p>
/// </note>
pub fn set_principals(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_principals(input);
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `AssociateResourceSharePermission`.
///
/// <p>Adds or replaces the RAM permission for a resource type included in a resource share. You can have exactly one permission associated with each resource type in the resource share. You can add a new RAM permission only if there are currently no resources of that resource type currently in the resource share.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct AssociateResourceSharePermission {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::associate_resource_share_permission_input::Builder,
}
impl AssociateResourceSharePermission {
/// Creates a new `AssociateResourceSharePermission`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateResourceSharePermissionOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateResourceSharePermissionError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share to which you want to add or replace permissions.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share to which you want to add or replace permissions.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
pub fn permission_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.permission_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
pub fn set_permission_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_permission_arn(input);
self
}
/// <p>Specifies whether the specified permission should replace or add to the existing permission associated with the resource share. Use <code>true</code> to replace the current permissions. Use <code>false</code> to add the permission to the current permission. The default value is <code>false</code>.</p> <note>
/// <p>A resource share can have only one permission per resource type. If a resource share already has a permission for the specified resource type and you don't set <code>replace</code> to <code>true</code> then the operation returns an error. This helps prevent accidental overwriting of a permission.</p>
/// </note>
pub fn replace(mut self, input: bool) -> Self {
self.inner = self.inner.replace(input);
self
}
/// <p>Specifies whether the specified permission should replace or add to the existing permission associated with the resource share. Use <code>true</code> to replace the current permissions. Use <code>false</code> to add the permission to the current permission. The default value is <code>false</code>.</p> <note>
/// <p>A resource share can have only one permission per resource type. If a resource share already has a permission for the specified resource type and you don't set <code>replace</code> to <code>true</code> then the operation returns an error. This helps prevent accidental overwriting of a permission.</p>
/// </note>
pub fn set_replace(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_replace(input);
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// <p>Specifies the version of the RAM permission to associate with the resource share. If you don't specify this parameter, the operation uses the version designated as the default. You can use the <code>ListPermissionVersions</code> operation to discover the available versions of a permission.</p>
pub fn permission_version(mut self, input: i32) -> Self {
self.inner = self.inner.permission_version(input);
self
}
/// <p>Specifies the version of the RAM permission to associate with the resource share. If you don't specify this parameter, the operation uses the version designated as the default. You can use the <code>ListPermissionVersions</code> operation to discover the available versions of a permission.</p>
pub fn set_permission_version(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_permission_version(input);
self
}
}
/// Fluent builder constructing a request to `CreateResourceShare`.
///
/// <p>Creates a resource share. You can provide a list of the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> for the resources that you want to share, a list of principals you want to share the resources with, and the permissions to grant those principals.</p> <note>
/// <p>Sharing a resource makes it available for use by principals outside of the Amazon Web Services account that created the resource. Sharing doesn't change any permissions or quotas that apply to the resource in the account that created it.</p>
/// </note>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateResourceShare {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_resource_share_input::Builder,
}
impl CreateResourceShare {
/// Creates a new `CreateResourceShare`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateResourceShareOutput,
aws_smithy_http::result::SdkError<crate::error::CreateResourceShareError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the name of the resource share.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>Specifies the name of the resource share.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// Appends an item to `resourceArns`.
///
/// To override the contents of this collection use [`set_resource_arns`](Self::set_resource_arns).
///
/// <p>Specifies a list of one or more ARNs of the resources to associate with the resource share.</p>
pub fn resource_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arns(input.into());
self
}
/// <p>Specifies a list of one or more ARNs of the resources to associate with the resource share.</p>
pub fn set_resource_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_arns(input);
self
}
/// Appends an item to `principals`.
///
/// To override the contents of this collection use [`set_principals`](Self::set_principals).
///
/// <p>Specifies a list of one or more principals to associate with the resource share.</p>
/// <p>You can include the following values:</p>
/// <ul>
/// <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li>
/// <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li>
/// <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li>
/// <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li>
/// <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li>
/// </ul> <note>
/// <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p>
/// </note>
pub fn principals(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.principals(input.into());
self
}
/// <p>Specifies a list of one or more principals to associate with the resource share.</p>
/// <p>You can include the following values:</p>
/// <ul>
/// <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li>
/// <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li>
/// <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li>
/// <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li>
/// <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li>
/// </ul> <note>
/// <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p>
/// </note>
pub fn set_principals(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_principals(input);
self
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
/// <p>Specifies whether principals outside your organization in Organizations can be associated with a resource share. A value of <code>true</code> lets you share with individual Amazon Web Services accounts that are <i>not</i> in your organization. A value of <code>false</code> only has meaning if your account is a member of an Amazon Web Services Organization. The default value is <code>true</code>.</p>
pub fn allow_external_principals(mut self, input: bool) -> Self {
self.inner = self.inner.allow_external_principals(input);
self
}
/// <p>Specifies whether principals outside your organization in Organizations can be associated with a resource share. A value of <code>true</code> lets you share with individual Amazon Web Services accounts that are <i>not</i> in your organization. A value of <code>false</code> only has meaning if your account is a member of an Amazon Web Services Organization. The default value is <code>true</code>.</p>
pub fn set_allow_external_principals(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_allow_external_principals(input);
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
/// Appends an item to `permissionArns`.
///
/// To override the contents of this collection use [`set_permission_arns`](Self::set_permission_arns).
///
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the RAM permission to associate with the resource share. If you do not specify an ARN for the permission, RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.</p>
pub fn permission_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.permission_arns(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the RAM permission to associate with the resource share. If you do not specify an ARN for the permission, RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.</p>
pub fn set_permission_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_permission_arns(input);
self
}
}
/// Fluent builder constructing a request to `DeleteResourceShare`.
///
/// <p>Deletes the specified resource share. This doesn't delete any of the resources that were associated with the resource share; it only stops the sharing of those resources outside of the Amazon Web Services account that created them.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeleteResourceShare {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::delete_resource_share_input::Builder,
}
impl DeleteResourceShare {
/// Creates a new `DeleteResourceShare`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteResourceShareOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteResourceShareError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share to delete.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share to delete.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateResourceShare`.
///
/// <p>Disassociates the specified principals or resources from the specified resource share.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DisassociateResourceShare {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::disassociate_resource_share_input::Builder,
}
impl DisassociateResourceShare {
/// Creates a new `DisassociateResourceShare`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateResourceShareOutput,
aws_smithy_http::result::SdkError<crate::error::DisassociateResourceShareError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to remove resources from.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>Specifies <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to remove resources from.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
/// Appends an item to `resourceArns`.
///
/// To override the contents of this collection use [`set_resource_arns`](Self::set_resource_arns).
///
/// <p>Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> for one or more resources that you want to remove from the resource share. After the operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account that created the resources.</p>
pub fn resource_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arns(input.into());
self
}
/// <p>Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> for one or more resources that you want to remove from the resource share. After the operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account that created the resources.</p>
pub fn set_resource_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_arns(input);
self
}
/// Appends an item to `principals`.
///
/// To override the contents of this collection use [`set_principals`](Self::set_principals).
///
/// <p>Specifies a list of one or more principals that no longer are to have access to the resources in this resource share.</p>
/// <p>You can include the following values:</p>
/// <ul>
/// <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li>
/// <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li>
/// <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li>
/// <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li>
/// <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li>
/// </ul> <note>
/// <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p>
/// </note>
pub fn principals(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.principals(input.into());
self
}
/// <p>Specifies a list of one or more principals that no longer are to have access to the resources in this resource share.</p>
/// <p>You can include the following values:</p>
/// <ul>
/// <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li>
/// <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li>
/// <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li>
/// <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li>
/// <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li>
/// </ul> <note>
/// <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p>
/// </note>
pub fn set_principals(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_principals(input);
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `DisassociateResourceSharePermission`.
///
/// <p>Disassociates an RAM permission from a resource share. Permission changes take effect immediately. You can remove a RAM permission from a resource share only if there are currently no resources of the relevant resource type currently attached to the resource share.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DisassociateResourceSharePermission {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::disassociate_resource_share_permission_input::Builder,
}
impl DisassociateResourceSharePermission {
/// Creates a new `DisassociateResourceSharePermission`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DisassociateResourceSharePermissionOutput,
aws_smithy_http::result::SdkError<
crate::error::DisassociateResourceSharePermissionError,
>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share from which you want to disassociate a permission.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share from which you want to disassociate a permission.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the permission to disassociate from the resource share. Changes to permissions take effect immediately.</p>
pub fn permission_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.permission_arn(input.into());
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the permission to disassociate from the resource share. Changes to permissions take effect immediately.</p>
pub fn set_permission_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_permission_arn(input);
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `EnableSharingWithAwsOrganization`.
///
/// <p>Enables resource sharing within your organization in Organizations. Calling this operation enables RAM to retrieve information about the organization and its structure. This lets you share resources with all of the accounts in an organization by specifying the organization's ID, or all of the accounts in an organizational unit (OU) by specifying the OU's ID. Until you enable sharing within the organization, you can specify only individual Amazon Web Services accounts, or for supported resource types, IAM users and roles.</p>
/// <p>You must call this operation from an IAM user or role in the organization's management account.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct EnableSharingWithAwsOrganization {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::enable_sharing_with_aws_organization_input::Builder,
}
impl EnableSharingWithAwsOrganization {
/// Creates a new `EnableSharingWithAwsOrganization`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::EnableSharingWithAwsOrganizationOutput,
aws_smithy_http::result::SdkError<crate::error::EnableSharingWithAwsOrganizationError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
}
/// Fluent builder constructing a request to `GetPermission`.
///
/// <p>Gets the contents of an RAM permission in JSON format.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetPermission {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_permission_input::Builder,
}
impl GetPermission {
/// Creates a new `GetPermission`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetPermissionOutput,
aws_smithy_http::result::SdkError<crate::error::GetPermissionError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the permission whose contents you want to retrieve. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
pub fn permission_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.permission_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the permission whose contents you want to retrieve. To find the ARN for a permission, use either the <code>ListPermissions</code> operation or go to the <a href="https://console.aws.amazon.com/ram/home#Permissions:">Permissions library</a> page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.</p>
pub fn set_permission_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_permission_arn(input);
self
}
/// <p>Specifies identifier for the version of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.</p>
pub fn permission_version(mut self, input: i32) -> Self {
self.inner = self.inner.permission_version(input);
self
}
/// <p>Specifies identifier for the version of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.</p>
pub fn set_permission_version(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_permission_version(input);
self
}
}
/// Fluent builder constructing a request to `GetResourcePolicies`.
///
/// <p>Retrieves the resource policies for the specified resources that you own and have shared.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetResourcePolicies {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_resource_policies_input::Builder,
}
impl GetResourcePolicies {
/// Creates a new `GetResourcePolicies`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetResourcePoliciesOutput,
aws_smithy_http::result::SdkError<crate::error::GetResourcePoliciesError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::GetResourcePoliciesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::GetResourcePoliciesPaginator {
crate::paginator::GetResourcePoliciesPaginator::new(self.handle, self.inner)
}
/// Appends an item to `resourceArns`.
///
/// To override the contents of this collection use [`set_resource_arns`](Self::set_resource_arns).
///
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resources whose policies you want to retrieve.</p>
pub fn resource_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arns(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resources whose policies you want to retrieve.</p>
pub fn set_resource_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_arns(input);
self
}
/// <p>Specifies the principal.</p>
pub fn principal(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.principal(input.into());
self
}
/// <p>Specifies the principal.</p>
pub fn set_principal(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_principal(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `GetResourceShareAssociations`.
///
/// <p>Retrieves the resource and principal associations for resource shares that you own.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetResourceShareAssociations {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_resource_share_associations_input::Builder,
}
impl GetResourceShareAssociations {
/// Creates a new `GetResourceShareAssociations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetResourceShareAssociationsOutput,
aws_smithy_http::result::SdkError<crate::error::GetResourceShareAssociationsError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::GetResourceShareAssociationsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::GetResourceShareAssociationsPaginator {
crate::paginator::GetResourceShareAssociationsPaginator::new(self.handle, self.inner)
}
/// <p>Specifies whether you want to retrieve the associations that involve a specified resource or principal.</p>
/// <ul>
/// <li> <p> <code>PRINCIPAL</code> – list the principals that are associated with the specified resource share.</p> </li>
/// <li> <p> <code>RESOURCE</code> – list the resources that are associated with the specified resource share.</p> </li>
/// </ul>
pub fn association_type(
mut self,
input: crate::model::ResourceShareAssociationType,
) -> Self {
self.inner = self.inner.association_type(input);
self
}
/// <p>Specifies whether you want to retrieve the associations that involve a specified resource or principal.</p>
/// <ul>
/// <li> <p> <code>PRINCIPAL</code> – list the principals that are associated with the specified resource share.</p> </li>
/// <li> <p> <code>RESOURCE</code> – list the resources that are associated with the specified resource share.</p> </li>
/// </ul>
pub fn set_association_type(
mut self,
input: std::option::Option<crate::model::ResourceShareAssociationType>,
) -> Self {
self.inner = self.inner.set_association_type(input);
self
}
/// Appends an item to `resourceShareArns`.
///
/// To override the contents of this collection use [`set_resource_share_arns`](Self::set_resource_share_arns).
///
/// <p>Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share whose associations you want to retrieve.</p>
pub fn resource_share_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arns(input.into());
self
}
/// <p>Specifies a list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share whose associations you want to retrieve.</p>
pub fn set_resource_share_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_share_arns(input);
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource whose resource shares you want to retrieve.</p>
/// <p>You cannot specify this parameter if the association type is <code>PRINCIPAL</code>.</p>
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource whose resource shares you want to retrieve.</p>
/// <p>You cannot specify this parameter if the association type is <code>PRINCIPAL</code>.</p>
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_resource_arn(input);
self
}
/// <p>Specifies the ID of the principal whose resource shares you want to retrieve. This can be an Amazon Web Services account ID, an organization ID, an organizational unit ID, or the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an individual IAM user or role.</p>
/// <p>You cannot specify this parameter if the association type is <code>RESOURCE</code>.</p>
pub fn principal(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.principal(input.into());
self
}
/// <p>Specifies the ID of the principal whose resource shares you want to retrieve. This can be an Amazon Web Services account ID, an organization ID, an organizational unit ID, or the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an individual IAM user or role.</p>
/// <p>You cannot specify this parameter if the association type is <code>RESOURCE</code>.</p>
pub fn set_principal(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_principal(input);
self
}
/// <p>Specifies that you want to retrieve only associations with this status.</p>
pub fn association_status(
mut self,
input: crate::model::ResourceShareAssociationStatus,
) -> Self {
self.inner = self.inner.association_status(input);
self
}
/// <p>Specifies that you want to retrieve only associations with this status.</p>
pub fn set_association_status(
mut self,
input: std::option::Option<crate::model::ResourceShareAssociationStatus>,
) -> Self {
self.inner = self.inner.set_association_status(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `GetResourceShareInvitations`.
///
/// <p>Retrieves details about invitations that you have received for resource shares.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetResourceShareInvitations {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_resource_share_invitations_input::Builder,
}
impl GetResourceShareInvitations {
/// Creates a new `GetResourceShareInvitations`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetResourceShareInvitationsOutput,
aws_smithy_http::result::SdkError<crate::error::GetResourceShareInvitationsError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::GetResourceShareInvitationsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::GetResourceShareInvitationsPaginator {
crate::paginator::GetResourceShareInvitationsPaginator::new(self.handle, self.inner)
}
/// Appends an item to `resourceShareInvitationArns`.
///
/// To override the contents of this collection use [`set_resource_share_invitation_arns`](Self::set_resource_share_invitation_arns).
///
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share invitations you want information about.</p>
pub fn resource_share_invitation_arns(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.resource_share_invitation_arns(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of the resource share invitations you want information about.</p>
pub fn set_resource_share_invitation_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_share_invitation_arns(input);
self
}
/// Appends an item to `resourceShareArns`.
///
/// To override the contents of this collection use [`set_resource_share_arns`](Self::set_resource_share_arns).
///
/// <p>Specifies that you want details about invitations only for the resource shares described by this list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> </p>
pub fn resource_share_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arns(input.into());
self
}
/// <p>Specifies that you want details about invitations only for the resource shares described by this list of <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> </p>
pub fn set_resource_share_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_share_arns(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `GetResourceShares`.
///
/// <p>Retrieves details about the resource shares that you own or that are shared with you.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetResourceShares {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_resource_shares_input::Builder,
}
impl GetResourceShares {
/// Creates a new `GetResourceShares`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::GetResourceSharesOutput,
aws_smithy_http::result::SdkError<crate::error::GetResourceSharesError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::GetResourceSharesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::GetResourceSharesPaginator {
crate::paginator::GetResourceSharesPaginator::new(self.handle, self.inner)
}
/// Appends an item to `resourceShareArns`.
///
/// To override the contents of this collection use [`set_resource_share_arns`](Self::set_resource_share_arns).
///
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of individual resource shares that you want information about.</p>
pub fn resource_share_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arns(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a> of individual resource shares that you want information about.</p>
pub fn set_resource_share_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_share_arns(input);
self
}
/// <p>Specifies that you want to retrieve details of only those resource shares that have this status.</p>
pub fn resource_share_status(mut self, input: crate::model::ResourceShareStatus) -> Self {
self.inner = self.inner.resource_share_status(input);
self
}
/// <p>Specifies that you want to retrieve details of only those resource shares that have this status.</p>
pub fn set_resource_share_status(
mut self,
input: std::option::Option<crate::model::ResourceShareStatus>,
) -> Self {
self.inner = self.inner.set_resource_share_status(input);
self
}
/// <p>Specifies that you want to retrieve details of only those resource shares that match the following:</p>
/// <ul>
/// <li> <p> <b> <code>SELF</code> </b> – resource shares that your account shares with other accounts</p> </li>
/// <li> <p> <b> <code>OTHER-ACCOUNTS</code> </b> – resource shares that other accounts share with your account</p> </li>
/// </ul>
pub fn resource_owner(mut self, input: crate::model::ResourceOwner) -> Self {
self.inner = self.inner.resource_owner(input);
self
}
/// <p>Specifies that you want to retrieve details of only those resource shares that match the following:</p>
/// <ul>
/// <li> <p> <b> <code>SELF</code> </b> – resource shares that your account shares with other accounts</p> </li>
/// <li> <p> <b> <code>OTHER-ACCOUNTS</code> </b> – resource shares that other accounts share with your account</p> </li>
/// </ul>
pub fn set_resource_owner(
mut self,
input: std::option::Option<crate::model::ResourceOwner>,
) -> Self {
self.inner = self.inner.set_resource_owner(input);
self
}
/// <p>Specifies the name of an individual resource share that you want to retrieve details about.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>Specifies the name of an individual resource share that you want to retrieve details about.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// Appends an item to `tagFilters`.
///
/// To override the contents of this collection use [`set_tag_filters`](Self::set_tag_filters).
///
/// <p>Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.</p>
pub fn tag_filters(mut self, input: crate::model::TagFilter) -> Self {
self.inner = self.inner.tag_filters(input);
self
}
/// <p>Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.</p>
pub fn set_tag_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::TagFilter>>,
) -> Self {
self.inner = self.inner.set_tag_filters(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>Specifies that you want to retrieve details of only those resource shares that use the RAM permission with this <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a>.</p>
pub fn permission_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.permission_arn(input.into());
self
}
/// <p>Specifies that you want to retrieve details of only those resource shares that use the RAM permission with this <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a>.</p>
pub fn set_permission_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_permission_arn(input);
self
}
}
/// Fluent builder constructing a request to `ListPendingInvitationResources`.
///
/// <p>Lists the resources in a resource share that is shared with you but for which the invitation is still <code>PENDING</code>. That means that you haven't accepted or rejected the invitation and the invitation hasn't expired.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListPendingInvitationResources {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_pending_invitation_resources_input::Builder,
}
impl ListPendingInvitationResources {
/// Creates a new `ListPendingInvitationResources`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListPendingInvitationResourcesOutput,
aws_smithy_http::result::SdkError<crate::error::ListPendingInvitationResourcesError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListPendingInvitationResourcesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListPendingInvitationResourcesPaginator {
crate::paginator::ListPendingInvitationResourcesPaginator::new(self.handle, self.inner)
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the invitation. You can use <code>GetResourceShareInvitations</code> to find the ARN of the invitation.</p>
pub fn resource_share_invitation_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.resource_share_invitation_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the invitation. You can use <code>GetResourceShareInvitations</code> to find the ARN of the invitation.</p>
pub fn set_resource_share_invitation_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_invitation_arn(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>Specifies that you want the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li>
/// <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li>
/// <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn resource_region_scope(
mut self,
input: crate::model::ResourceRegionScopeFilter,
) -> Self {
self.inner = self.inner.resource_region_scope(input);
self
}
/// <p>Specifies that you want the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li>
/// <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li>
/// <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn set_resource_region_scope(
mut self,
input: std::option::Option<crate::model::ResourceRegionScopeFilter>,
) -> Self {
self.inner = self.inner.set_resource_region_scope(input);
self
}
}
/// Fluent builder constructing a request to `ListPermissions`.
///
/// <p>Retrieves a list of available RAM permissions that you can use for the supported resource types. </p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListPermissions {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_permissions_input::Builder,
}
impl ListPermissions {
/// Creates a new `ListPermissions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListPermissionsOutput,
aws_smithy_http::result::SdkError<crate::error::ListPermissionsError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListPermissionsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListPermissionsPaginator {
crate::paginator::ListPermissionsPaginator::new(self.handle, self.inner)
}
/// <p>Specifies that you want to list permissions for only the specified resource type. For example, to list only permissions that apply to EC2 subnets, specify <code>ec2:Subnet</code>. You can use the <code>ListResourceTypes</code> operation to get the specific string required.</p>
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_type(input.into());
self
}
/// <p>Specifies that you want to list permissions for only the specified resource type. For example, to list only permissions that apply to EC2 subnets, specify <code>ec2:Subnet</code>. You can use the <code>ListResourceTypes</code> operation to get the specific string required.</p>
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_type(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `ListPermissionVersions`.
///
/// <p>Lists the available versions of the specified RAM permission.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListPermissionVersions {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_permission_versions_input::Builder,
}
impl ListPermissionVersions {
/// Creates a new `ListPermissionVersions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListPermissionVersionsOutput,
aws_smithy_http::result::SdkError<crate::error::ListPermissionVersionsError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListPermissionVersionsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListPermissionVersionsPaginator {
crate::paginator::ListPermissionVersionsPaginator::new(self.handle, self.inner)
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the RAM permission whose versions you want to list. You can use the <code>permissionVersion</code> parameter on the <code>AssociateResourceSharePermission</code> operation to specify a non-default version to attach.</p>
pub fn permission_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.permission_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the RAM permission whose versions you want to list. You can use the <code>permissionVersion</code> parameter on the <code>AssociateResourceSharePermission</code> operation to specify a non-default version to attach.</p>
pub fn set_permission_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_permission_arn(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `ListPrincipals`.
///
/// <p>Lists the principals that you are sharing resources with or that are sharing resources with you.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListPrincipals {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_principals_input::Builder,
}
impl ListPrincipals {
/// Creates a new `ListPrincipals`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListPrincipalsOutput,
aws_smithy_http::result::SdkError<crate::error::ListPrincipalsError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListPrincipalsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListPrincipalsPaginator {
crate::paginator::ListPrincipalsPaginator::new(self.handle, self.inner)
}
/// <p>Specifies that you want to list information for only resource shares that match the following:</p>
/// <ul>
/// <li> <p> <b> <code>SELF</code> </b> – principals that your account is sharing resources with</p> </li>
/// <li> <p> <b> <code>OTHER-ACCOUNTS</code> </b> – principals that are sharing resources with your account</p> </li>
/// </ul>
pub fn resource_owner(mut self, input: crate::model::ResourceOwner) -> Self {
self.inner = self.inner.resource_owner(input);
self
}
/// <p>Specifies that you want to list information for only resource shares that match the following:</p>
/// <ul>
/// <li> <p> <b> <code>SELF</code> </b> – principals that your account is sharing resources with</p> </li>
/// <li> <p> <b> <code>OTHER-ACCOUNTS</code> </b> – principals that are sharing resources with your account</p> </li>
/// </ul>
pub fn set_resource_owner(
mut self,
input: std::option::Option<crate::model::ResourceOwner>,
) -> Self {
self.inner = self.inner.set_resource_owner(input);
self
}
/// <p>Specifies that you want to list principal information for the resource share with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a>.</p>
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arn(input.into());
self
}
/// <p>Specifies that you want to list principal information for the resource share with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a>.</p>
pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_resource_arn(input);
self
}
/// Appends an item to `principals`.
///
/// To override the contents of this collection use [`set_principals`](Self::set_principals).
///
/// <p>Specifies that you want to list information for only the listed principals.</p>
/// <p>You can include the following values:</p>
/// <ul>
/// <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li>
/// <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li>
/// <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li>
/// <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li>
/// <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li>
/// </ul> <note>
/// <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p>
/// </note>
pub fn principals(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.principals(input.into());
self
}
/// <p>Specifies that you want to list information for only the listed principals.</p>
/// <p>You can include the following values:</p>
/// <ul>
/// <li> <p>An Amazon Web Services account ID, for example: <code>123456789012</code> </p> </li>
/// <li> <p>An <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of an organization in Organizations, for example: <code>organizations::123456789012:organization/o-exampleorgid</code> </p> </li>
/// <li> <p>An ARN of an organizational unit (OU) in Organizations, for example: <code>organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123</code> </p> </li>
/// <li> <p>An ARN of an IAM role, for example: <code>iam::123456789012:role/rolename</code> </p> </li>
/// <li> <p>An ARN of an IAM user, for example: <code>iam::123456789012user/username</code> </p> </li>
/// </ul> <note>
/// <p>Not all resource types can be shared with IAM roles and users. For more information, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types">Sharing with IAM roles and users</a> in the <i>Resource Access Manager User Guide</i>.</p>
/// </note>
pub fn set_principals(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_principals(input);
self
}
/// <p>Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.</p>
/// <p>For a list of valid values, query the <code>ListResourceTypes</code> operation.</p>
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_type(input.into());
self
}
/// <p>Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.</p>
/// <p>For a list of valid values, query the <code>ListResourceTypes</code> operation.</p>
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_type(input);
self
}
/// Appends an item to `resourceShareArns`.
///
/// To override the contents of this collection use [`set_resource_share_arns`](Self::set_resource_share_arns).
///
/// <p>Specifies that you want to list information for only principals associated with the resource shares specified by a list the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn resource_share_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arns(input.into());
self
}
/// <p>Specifies that you want to list information for only principals associated with the resource shares specified by a list the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn set_resource_share_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_share_arns(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `ListResources`.
///
/// <p>Lists the resources that you added to a resource share or the resources that are shared with you.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListResources {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_resources_input::Builder,
}
impl ListResources {
/// Creates a new `ListResources`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListResourcesOutput,
aws_smithy_http::result::SdkError<crate::error::ListResourcesError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListResourcesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListResourcesPaginator {
crate::paginator::ListResourcesPaginator::new(self.handle, self.inner)
}
/// <p>Specifies that you want to list only the resource shares that match the following:</p>
/// <ul>
/// <li> <p> <b> <code>SELF</code> </b> – resources that your account shares with other accounts</p> </li>
/// <li> <p> <b> <code>OTHER-ACCOUNTS</code> </b> – resources that other accounts share with your account</p> </li>
/// </ul>
pub fn resource_owner(mut self, input: crate::model::ResourceOwner) -> Self {
self.inner = self.inner.resource_owner(input);
self
}
/// <p>Specifies that you want to list only the resource shares that match the following:</p>
/// <ul>
/// <li> <p> <b> <code>SELF</code> </b> – resources that your account shares with other accounts</p> </li>
/// <li> <p> <b> <code>OTHER-ACCOUNTS</code> </b> – resources that other accounts share with your account</p> </li>
/// </ul>
pub fn set_resource_owner(
mut self,
input: std::option::Option<crate::model::ResourceOwner>,
) -> Self {
self.inner = self.inner.set_resource_owner(input);
self
}
/// <p>Specifies that you want to list only the resource shares that are associated with the specified principal.</p>
pub fn principal(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.principal(input.into());
self
}
/// <p>Specifies that you want to list only the resource shares that are associated with the specified principal.</p>
pub fn set_principal(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_principal(input);
self
}
/// <p>Specifies that you want to list only the resource shares that include resources of the specified resource type.</p>
/// <p>For valid values, query the <code>ListResourceTypes</code> operation.</p>
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_type(input.into());
self
}
/// <p>Specifies that you want to list only the resource shares that include resources of the specified resource type.</p>
/// <p>For valid values, query the <code>ListResourceTypes</code> operation.</p>
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_type(input);
self
}
/// Appends an item to `resourceArns`.
///
/// To override the contents of this collection use [`set_resource_arns`](Self::set_resource_arns).
///
/// <p>Specifies that you want to list only the resource shares that include resources with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn resource_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arns(input.into());
self
}
/// <p>Specifies that you want to list only the resource shares that include resources with the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn set_resource_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_arns(input);
self
}
/// Appends an item to `resourceShareArns`.
///
/// To override the contents of this collection use [`set_resource_share_arns`](Self::set_resource_share_arns).
///
/// <p>Specifies that you want to list only resources in the resource shares identified by the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn resource_share_arns(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arns(input.into());
self
}
/// <p>Specifies that you want to list only resources in the resource shares identified by the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs)</a>.</p>
pub fn set_resource_share_arns(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_resource_share_arns(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>Specifies that you want the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li>
/// <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li>
/// <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn resource_region_scope(
mut self,
input: crate::model::ResourceRegionScopeFilter,
) -> Self {
self.inner = self.inner.resource_region_scope(input);
self
}
/// <p>Specifies that you want the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li>
/// <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li>
/// <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn set_resource_region_scope(
mut self,
input: std::option::Option<crate::model::ResourceRegionScopeFilter>,
) -> Self {
self.inner = self.inner.set_resource_region_scope(input);
self
}
}
/// Fluent builder constructing a request to `ListResourceSharePermissions`.
///
/// <p>Lists the RAM permissions that are associated with a resource share.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListResourceSharePermissions {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_resource_share_permissions_input::Builder,
}
impl ListResourceSharePermissions {
/// Creates a new `ListResourceSharePermissions`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListResourceSharePermissionsOutput,
aws_smithy_http::result::SdkError<crate::error::ListResourceSharePermissionsError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListResourceSharePermissionsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListResourceSharePermissionsPaginator {
crate::paginator::ListResourceSharePermissionsPaginator::new(self.handle, self.inner)
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share for which you want to retrieve the associated permissions.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share for which you want to retrieve the associated permissions.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
}
/// Fluent builder constructing a request to `ListResourceTypes`.
///
/// <p>Lists the resource types that can be shared by RAM.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListResourceTypes {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_resource_types_input::Builder,
}
impl ListResourceTypes {
/// Creates a new `ListResourceTypes`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListResourceTypesOutput,
aws_smithy_http::result::SdkError<crate::error::ListResourceTypesError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::paginator::ListResourceTypesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListResourceTypesPaginator {
crate::paginator::ListResourceTypesPaginator::new(self.handle, self.inner)
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_next_token(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>Specifies that you want the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li>
/// <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li>
/// <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn resource_region_scope(
mut self,
input: crate::model::ResourceRegionScopeFilter,
) -> Self {
self.inner = self.inner.resource_region_scope(input);
self
}
/// <p>Specifies that you want the results to include only resources that have the specified scope.</p>
/// <ul>
/// <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li>
/// <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li>
/// <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li>
/// </ul>
/// <p>The default value is <code>ALL</code>.</p>
pub fn set_resource_region_scope(
mut self,
input: std::option::Option<crate::model::ResourceRegionScopeFilter>,
) -> Self {
self.inner = self.inner.set_resource_region_scope(input);
self
}
}
/// Fluent builder constructing a request to `PromoteResourceShareCreatedFromPolicy`.
///
/// <p>When you attach a resource-based permission policy to a resource, it automatically creates a resource share. However, resource shares created this way are visible only to the resource share owner, and the resource share can't be modified in RAM.</p>
/// <p>You can use this operation to promote the resource share to a full RAM resource share. When you promote a resource share, you can then manage the resource share in RAM and it becomes visible to all of the principals you shared it with.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct PromoteResourceShareCreatedFromPolicy {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::promote_resource_share_created_from_policy_input::Builder,
}
impl PromoteResourceShareCreatedFromPolicy {
/// Creates a new `PromoteResourceShareCreatedFromPolicy`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PromoteResourceShareCreatedFromPolicyOutput,
aws_smithy_http::result::SdkError<
crate::error::PromoteResourceShareCreatedFromPolicyError,
>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share to promote.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share to promote.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
}
/// Fluent builder constructing a request to `RejectResourceShareInvitation`.
///
/// <p>Rejects an invitation to a resource share from another Amazon Web Services account.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct RejectResourceShareInvitation {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::reject_resource_share_invitation_input::Builder,
}
impl RejectResourceShareInvitation {
/// Creates a new `RejectResourceShareInvitation`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::RejectResourceShareInvitationOutput,
aws_smithy_http::result::SdkError<crate::error::RejectResourceShareInvitationError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the invitation that you want to reject.</p>
pub fn resource_share_invitation_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.resource_share_invitation_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the invitation that you want to reject.</p>
pub fn set_resource_share_invitation_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_invitation_arn(input);
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
/// Fluent builder constructing a request to `TagResource`.
///
/// <p>Adds the specified tag keys and values to the specified resource share. The tags are attached only to the resource share, not to the resources that are in the resource share.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct TagResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::tag_resource_input::Builder,
}
impl TagResource {
/// Creates a new `TagResource`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::TagResourceOutput,
aws_smithy_http::result::SdkError<crate::error::TagResourceError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to add tags to.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to add tags to.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A list of one or more tag key and value pairs. The tag key must be present and not be an empty string. The tag value must be present but can be an empty string.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>A list of one or more tag key and value pairs. The tag key must be present and not be an empty string. The tag value must be present but can be an empty string.</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `UntagResource`.
///
/// <p>Removes the specified tag key and value pairs from the specified resource share.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UntagResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::untag_resource_input::Builder,
}
impl UntagResource {
/// Creates a new `UntagResource`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UntagResourceOutput,
aws_smithy_http::result::SdkError<crate::error::UntagResourceError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to remove tags from. The tags are removed from the resource share, not the resources in the resource share.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to remove tags from. The tags are removed from the resource share, not the resources in the resource share.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
/// Appends an item to `tagKeys`.
///
/// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
///
/// <p>Specifies a list of one or more tag keys that you want to remove.</p>
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.tag_keys(input.into());
self
}
/// <p>Specifies a list of one or more tag keys that you want to remove.</p>
pub fn set_tag_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_tag_keys(input);
self
}
}
/// Fluent builder constructing a request to `UpdateResourceShare`.
///
/// <p>Modifies some of the properties of the specified resource share.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateResourceShare {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_resource_share_input::Builder,
}
impl UpdateResourceShare {
/// Creates a new `UpdateResourceShare`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::UpdateResourceShareOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateResourceShareError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to modify.</p>
pub fn resource_share_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_share_arn(input.into());
self
}
/// <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resoure Name (ARN)</a> of the resource share that you want to modify.</p>
pub fn set_resource_share_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_resource_share_arn(input);
self
}
/// <p>If specified, the new name that you want to attach to the resource share.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>If specified, the new name that you want to attach to the resource share.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>Specifies whether principals outside your organization in Organizations can be associated with a resource share.</p>
pub fn allow_external_principals(mut self, input: bool) -> Self {
self.inner = self.inner.allow_external_principals(input);
self
}
/// <p>Specifies whether principals outside your organization in Organizations can be associated with a resource share.</p>
pub fn set_allow_external_principals(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_allow_external_principals(input);
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_token(input.into());
self
}
/// <p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value.</a>.</p>
/// <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p>
pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_client_token(input);
self
}
}
}
impl Client {
/// Creates a client with the given service config and connector override.
pub fn from_conf_conn<C, E>(conf: crate::Config, conn: C) -> Self
where
C: aws_smithy_client::bounds::SmithyConnector<Error = E> + Send + 'static,
E: Into<aws_smithy_http::result::ConnectorError>,
{
let retry_config = conf.retry_config.as_ref().cloned().unwrap_or_default();
let timeout_config = conf.timeout_config.as_ref().cloned().unwrap_or_default();
let sleep_impl = conf.sleep_impl.clone();
let mut builder = aws_smithy_client::Builder::new()
.connector(aws_smithy_client::erase::DynConnector::new(conn))
.middleware(aws_smithy_client::erase::DynMiddleware::new(
crate::middleware::DefaultMiddleware::new(),
));
builder.set_retry_config(retry_config.into());
builder.set_timeout_config(timeout_config);
if let Some(sleep_impl) = sleep_impl {
builder.set_sleep_impl(Some(sleep_impl));
}
let client = builder.build();
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
/// Creates a new client from a shared config.
#[cfg(any(feature = "rustls", feature = "native-tls"))]
pub fn new(sdk_config: &aws_types::sdk_config::SdkConfig) -> Self {
Self::from_conf(sdk_config.into())
}
/// Creates a new client from the service [`Config`](crate::Config).
#[cfg(any(feature = "rustls", feature = "native-tls"))]
pub fn from_conf(conf: crate::Config) -> Self {
let retry_config = conf.retry_config.as_ref().cloned().unwrap_or_default();
let timeout_config = conf.timeout_config.as_ref().cloned().unwrap_or_default();
let sleep_impl = conf.sleep_impl.clone();
let mut builder = aws_smithy_client::Builder::dyn_https().middleware(
aws_smithy_client::erase::DynMiddleware::new(
crate::middleware::DefaultMiddleware::new(),
),
);
builder.set_retry_config(retry_config.into());
builder.set_timeout_config(timeout_config);
// the builder maintains a try-state. To avoid suppressing the warning when sleep is unset,
// only set it if we actually have a sleep impl.
if let Some(sleep_impl) = sleep_impl {
builder.set_sleep_impl(Some(sleep_impl));
}
let client = builder.build();
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
}