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
// 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 Cloud Map
///
/// Client for invoking operations on AWS Cloud Map. Each operation on AWS Cloud Map 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_servicediscovery::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_servicediscovery::config::Builder::from(&shared_config)
/// .retry_config(RetryConfig::disabled())
/// .build();
/// let client = aws_sdk_servicediscovery::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 [`CreateHttpNamespace`](crate::client::fluent_builders::CreateHttpNamespace) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreateHttpNamespace::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreateHttpNamespace::set_name): <p>The name that you want to assign to this namespace.</p>
/// - [`creator_request_id(impl Into<String>)`](crate::client::fluent_builders::CreateHttpNamespace::creator_request_id) / [`set_creator_request_id(Option<String>)`](crate::client::fluent_builders::CreateHttpNamespace::set_creator_request_id): <p>A unique string that identifies the request and that allows failed <code>CreateHttpNamespace</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::CreateHttpNamespace::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::CreateHttpNamespace::set_description): <p>A description for the namespace.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::CreateHttpNamespace::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::CreateHttpNamespace::set_tags): <p>The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</p>
/// - On success, responds with [`CreateHttpNamespaceOutput`](crate::output::CreateHttpNamespaceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::CreateHttpNamespaceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<CreateHttpNamespaceError>`](crate::error::CreateHttpNamespaceError)
pub fn create_http_namespace(&self) -> fluent_builders::CreateHttpNamespace {
fluent_builders::CreateHttpNamespace::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreatePrivateDnsNamespace`](crate::client::fluent_builders::CreatePrivateDnsNamespace) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::set_name): <p>The name that you want to assign to this namespace. When you create a private DNS namespace, Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace.</p>
/// - [`creator_request_id(impl Into<String>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::creator_request_id) / [`set_creator_request_id(Option<String>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::set_creator_request_id): <p>A unique string that identifies the request and that allows failed <code>CreatePrivateDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::set_description): <p>A description for the namespace.</p>
/// - [`vpc(impl Into<String>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::vpc) / [`set_vpc(Option<String>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::set_vpc): <p>The ID of the Amazon VPC that you want to associate the namespace with.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::set_tags): <p>The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</p>
/// - [`properties(PrivateDnsNamespaceProperties)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::properties) / [`set_properties(Option<PrivateDnsNamespaceProperties>)`](crate::client::fluent_builders::CreatePrivateDnsNamespace::set_properties): <p>Properties for the private DNS namespace.</p>
/// - On success, responds with [`CreatePrivateDnsNamespaceOutput`](crate::output::CreatePrivateDnsNamespaceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::CreatePrivateDnsNamespaceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<CreatePrivateDnsNamespaceError>`](crate::error::CreatePrivateDnsNamespaceError)
pub fn create_private_dns_namespace(&self) -> fluent_builders::CreatePrivateDnsNamespace {
fluent_builders::CreatePrivateDnsNamespace::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreatePublicDnsNamespace`](crate::client::fluent_builders::CreatePublicDnsNamespace) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreatePublicDnsNamespace::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreatePublicDnsNamespace::set_name): <p>The name that you want to assign to this namespace.</p>
/// - [`creator_request_id(impl Into<String>)`](crate::client::fluent_builders::CreatePublicDnsNamespace::creator_request_id) / [`set_creator_request_id(Option<String>)`](crate::client::fluent_builders::CreatePublicDnsNamespace::set_creator_request_id): <p>A unique string that identifies the request and that allows failed <code>CreatePublicDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::CreatePublicDnsNamespace::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::CreatePublicDnsNamespace::set_description): <p>A description for the namespace.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::CreatePublicDnsNamespace::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::CreatePublicDnsNamespace::set_tags): <p>The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</p>
/// - [`properties(PublicDnsNamespaceProperties)`](crate::client::fluent_builders::CreatePublicDnsNamespace::properties) / [`set_properties(Option<PublicDnsNamespaceProperties>)`](crate::client::fluent_builders::CreatePublicDnsNamespace::set_properties): <p>Properties for the public DNS namespace.</p>
/// - On success, responds with [`CreatePublicDnsNamespaceOutput`](crate::output::CreatePublicDnsNamespaceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::CreatePublicDnsNamespaceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<CreatePublicDnsNamespaceError>`](crate::error::CreatePublicDnsNamespaceError)
pub fn create_public_dns_namespace(&self) -> fluent_builders::CreatePublicDnsNamespace {
fluent_builders::CreatePublicDnsNamespace::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreateService`](crate::client::fluent_builders::CreateService) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreateService::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreateService::set_name): <p>The name that you want to assign to the service.</p> <p>If you want Cloud Map to create an <code>SRV</code> record when you register an instance and you're using a system that requires a specific <code>SRV</code> format, such as <a href="http://www.haproxy.org/">HAProxy</a>, specify the following for <code>Name</code>:</p> <ul> <li> <p>Start the name with an underscore (_), such as <code>_exampleservice</code>.</p> </li> <li> <p>End the name with <i>._protocol</i>, such as <code>._tcp</code>.</p> </li> </ul> <p>When you register an instance, Cloud Map creates an <code>SRV</code> record and assigns a name to the record by concatenating the service name and the namespace name (for example,</p> <p> <code>_exampleservice._tcp.example.com</code>).</p> <note> <p>For services that are accessible by DNS queries, you can't create multiple services with names that differ only by case (such as EXAMPLE and example). Otherwise, these services have the same DNS name and can't be distinguished. However, if you use a namespace that's only accessible by API calls, then you can create services that with names that differ only by case.</p> </note>
/// - [`namespace_id(impl Into<String>)`](crate::client::fluent_builders::CreateService::namespace_id) / [`set_namespace_id(Option<String>)`](crate::client::fluent_builders::CreateService::set_namespace_id): <p>The ID of the namespace that you want to use to create the service. The namespace ID must be specified, but it can be specified either here or in the <code>DnsConfig</code> object.</p>
/// - [`creator_request_id(impl Into<String>)`](crate::client::fluent_builders::CreateService::creator_request_id) / [`set_creator_request_id(Option<String>)`](crate::client::fluent_builders::CreateService::set_creator_request_id): <p>A unique string that identifies the request and that allows failed <code>CreateService</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::CreateService::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::CreateService::set_description): <p>A description for the service.</p>
/// - [`dns_config(DnsConfig)`](crate::client::fluent_builders::CreateService::dns_config) / [`set_dns_config(Option<DnsConfig>)`](crate::client::fluent_builders::CreateService::set_dns_config): <p>A complex type that contains information about the Amazon Route 53 records that you want Cloud Map to create when you register an instance. </p>
/// - [`health_check_config(HealthCheckConfig)`](crate::client::fluent_builders::CreateService::health_check_config) / [`set_health_check_config(Option<HealthCheckConfig>)`](crate::client::fluent_builders::CreateService::set_health_check_config): <p> <i>Public DNS and HTTP namespaces only.</i> A complex type that contains settings for an optional Route 53 health check. If you specify settings for a health check, Cloud Map associates the health check with all the Route 53 DNS records that you specify in <code>DnsConfig</code>.</p> <important> <p>If you specify a health check configuration, you can specify either <code>HealthCheckCustomConfig</code> or <code>HealthCheckConfig</code> but not both.</p> </important> <p>For information about the charges for health checks, see <a href="http://aws.amazon.com/cloud-map/pricing/">Cloud Map Pricing</a>.</p>
/// - [`health_check_custom_config(HealthCheckCustomConfig)`](crate::client::fluent_builders::CreateService::health_check_custom_config) / [`set_health_check_custom_config(Option<HealthCheckCustomConfig>)`](crate::client::fluent_builders::CreateService::set_health_check_custom_config): <p>A complex type that contains information about an optional custom health check.</p> <important> <p>If you specify a health check configuration, you can specify either <code>HealthCheckCustomConfig</code> or <code>HealthCheckConfig</code> but not both.</p> </important> <p>You can't add, update, or delete a <code>HealthCheckCustomConfig</code> configuration from an existing service.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::CreateService::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::CreateService::set_tags): <p>The tags to add to the service. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</p>
/// - [`r#type(ServiceTypeOption)`](crate::client::fluent_builders::CreateService::type) / [`set_type(Option<ServiceTypeOption>)`](crate::client::fluent_builders::CreateService::set_type): <p>If present, specifies that the service instances are only discoverable using the <code>DiscoverInstances</code> API operation. No DNS records is registered for the service instances. The only valid value is <code>HTTP</code>.</p>
/// - On success, responds with [`CreateServiceOutput`](crate::output::CreateServiceOutput) with field(s):
/// - [`service(Option<Service>)`](crate::output::CreateServiceOutput::service): <p>A complex type that contains information about the new service.</p>
/// - On failure, responds with [`SdkError<CreateServiceError>`](crate::error::CreateServiceError)
pub fn create_service(&self) -> fluent_builders::CreateService {
fluent_builders::CreateService::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteNamespace`](crate::client::fluent_builders::DeleteNamespace) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::DeleteNamespace::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::DeleteNamespace::set_id): <p>The ID of the namespace that you want to delete.</p>
/// - On success, responds with [`DeleteNamespaceOutput`](crate::output::DeleteNamespaceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::DeleteNamespaceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<DeleteNamespaceError>`](crate::error::DeleteNamespaceError)
pub fn delete_namespace(&self) -> fluent_builders::DeleteNamespace {
fluent_builders::DeleteNamespace::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteService`](crate::client::fluent_builders::DeleteService) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::DeleteService::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::DeleteService::set_id): <p>The ID of the service that you want to delete.</p>
/// - On success, responds with [`DeleteServiceOutput`](crate::output::DeleteServiceOutput)
/// - On failure, responds with [`SdkError<DeleteServiceError>`](crate::error::DeleteServiceError)
pub fn delete_service(&self) -> fluent_builders::DeleteService {
fluent_builders::DeleteService::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeregisterInstance`](crate::client::fluent_builders::DeregisterInstance) operation.
///
/// - The fluent builder is configurable:
/// - [`service_id(impl Into<String>)`](crate::client::fluent_builders::DeregisterInstance::service_id) / [`set_service_id(Option<String>)`](crate::client::fluent_builders::DeregisterInstance::set_service_id): <p>The ID of the service that the instance is associated with.</p>
/// - [`instance_id(impl Into<String>)`](crate::client::fluent_builders::DeregisterInstance::instance_id) / [`set_instance_id(Option<String>)`](crate::client::fluent_builders::DeregisterInstance::set_instance_id): <p>The value that you specified for <code>Id</code> in the <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html">RegisterInstance</a> request.</p>
/// - On success, responds with [`DeregisterInstanceOutput`](crate::output::DeregisterInstanceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::DeregisterInstanceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<DeregisterInstanceError>`](crate::error::DeregisterInstanceError)
pub fn deregister_instance(&self) -> fluent_builders::DeregisterInstance {
fluent_builders::DeregisterInstance::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DiscoverInstances`](crate::client::fluent_builders::DiscoverInstances) operation.
///
/// - The fluent builder is configurable:
/// - [`namespace_name(impl Into<String>)`](crate::client::fluent_builders::DiscoverInstances::namespace_name) / [`set_namespace_name(Option<String>)`](crate::client::fluent_builders::DiscoverInstances::set_namespace_name): <p>The <code>HttpName</code> name of the namespace. It's found in the <code>HttpProperties</code> member of the <code>Properties</code> member of the namespace.</p>
/// - [`service_name(impl Into<String>)`](crate::client::fluent_builders::DiscoverInstances::service_name) / [`set_service_name(Option<String>)`](crate::client::fluent_builders::DiscoverInstances::set_service_name): <p>The name of the service that you specified when you registered the instance.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::DiscoverInstances::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::DiscoverInstances::set_max_results): <p>The maximum number of instances that you want Cloud Map to return in the response to a <code>DiscoverInstances</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.</p>
/// - [`query_parameters(HashMap<String, String>)`](crate::client::fluent_builders::DiscoverInstances::query_parameters) / [`set_query_parameters(Option<HashMap<String, String>>)`](crate::client::fluent_builders::DiscoverInstances::set_query_parameters): <p>Filters to scope the results based on custom attributes for the instance (for example, <code>{version=v1, az=1a}</code>). Only instances that match all the specified key-value pairs are returned.</p>
/// - [`optional_parameters(HashMap<String, String>)`](crate::client::fluent_builders::DiscoverInstances::optional_parameters) / [`set_optional_parameters(Option<HashMap<String, String>>)`](crate::client::fluent_builders::DiscoverInstances::set_optional_parameters): <p>Opportunistic filters to scope the results based on custom attributes. If there are instances that match both the filters specified in both the <code>QueryParameters</code> parameter and this parameter, all of these instances are returned. Otherwise, the filters are ignored, and only instances that match the filters that are specified in the <code>QueryParameters</code> parameter are returned.</p>
/// - [`health_status(HealthStatusFilter)`](crate::client::fluent_builders::DiscoverInstances::health_status) / [`set_health_status(Option<HealthStatusFilter>)`](crate::client::fluent_builders::DiscoverInstances::set_health_status): <p>The health status of the instances that you want to discover. This parameter is ignored for services that don't have a health check configured, and all instances are returned.</p> <dl> <dt> HEALTHY </dt> <dd> <p>Returns healthy instances.</p> </dd> <dt> UNHEALTHY </dt> <dd> <p>Returns unhealthy instances.</p> </dd> <dt> ALL </dt> <dd> <p>Returns all instances.</p> </dd> <dt> HEALTHY_OR_ELSE_ALL </dt> <dd> <p>Returns healthy instances, unless none are reporting a healthy state. In that case, return all instances. This is also called failing open.</p> </dd> </dl>
/// - On success, responds with [`DiscoverInstancesOutput`](crate::output::DiscoverInstancesOutput) with field(s):
/// - [`instances(Option<Vec<HttpInstanceSummary>>)`](crate::output::DiscoverInstancesOutput::instances): <p>A complex type that contains one <code>HttpInstanceSummary</code> for each registered instance.</p>
/// - On failure, responds with [`SdkError<DiscoverInstancesError>`](crate::error::DiscoverInstancesError)
pub fn discover_instances(&self) -> fluent_builders::DiscoverInstances {
fluent_builders::DiscoverInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetInstance`](crate::client::fluent_builders::GetInstance) operation.
///
/// - The fluent builder is configurable:
/// - [`service_id(impl Into<String>)`](crate::client::fluent_builders::GetInstance::service_id) / [`set_service_id(Option<String>)`](crate::client::fluent_builders::GetInstance::set_service_id): <p>The ID of the service that the instance is associated with.</p>
/// - [`instance_id(impl Into<String>)`](crate::client::fluent_builders::GetInstance::instance_id) / [`set_instance_id(Option<String>)`](crate::client::fluent_builders::GetInstance::set_instance_id): <p>The ID of the instance that you want to get information about.</p>
/// - On success, responds with [`GetInstanceOutput`](crate::output::GetInstanceOutput) with field(s):
/// - [`instance(Option<Instance>)`](crate::output::GetInstanceOutput::instance): <p>A complex type that contains information about a specified instance.</p>
/// - On failure, responds with [`SdkError<GetInstanceError>`](crate::error::GetInstanceError)
pub fn get_instance(&self) -> fluent_builders::GetInstance {
fluent_builders::GetInstance::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetInstancesHealthStatus`](crate::client::fluent_builders::GetInstancesHealthStatus) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::GetInstancesHealthStatus::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`service_id(impl Into<String>)`](crate::client::fluent_builders::GetInstancesHealthStatus::service_id) / [`set_service_id(Option<String>)`](crate::client::fluent_builders::GetInstancesHealthStatus::set_service_id): <p>The ID of the service that the instance is associated with.</p>
/// - [`instances(Vec<String>)`](crate::client::fluent_builders::GetInstancesHealthStatus::instances) / [`set_instances(Option<Vec<String>>)`](crate::client::fluent_builders::GetInstancesHealthStatus::set_instances): <p>An array that contains the IDs of all the instances that you want to get the health status for.</p> <p>If you omit <code>Instances</code>, Cloud Map returns the health status for all the instances that are associated with the specified service.</p> <note> <p>To get the IDs for the instances that you've registered by using a specified service, submit a <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_ListInstances.html">ListInstances</a> request.</p> </note>
/// - [`max_results(i32)`](crate::client::fluent_builders::GetInstancesHealthStatus::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::GetInstancesHealthStatus::set_max_results): <p>The maximum number of instances that you want Cloud Map to return in the response to a <code>GetInstancesHealthStatus</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::GetInstancesHealthStatus::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::GetInstancesHealthStatus::set_next_token): <p>For the first <code>GetInstancesHealthStatus</code> request, omit this value.</p> <p>If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>GetInstancesHealthStatus</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p>
/// - On success, responds with [`GetInstancesHealthStatusOutput`](crate::output::GetInstancesHealthStatusOutput) with field(s):
/// - [`status(Option<HashMap<String, HealthStatus>>)`](crate::output::GetInstancesHealthStatusOutput::status): <p>A complex type that contains the IDs and the health status of the instances that you specified in the <code>GetInstancesHealthStatus</code> request.</p>
/// - [`next_token(Option<String>)`](crate::output::GetInstancesHealthStatusOutput::next_token): <p>If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>GetInstancesHealthStatus</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p>
/// - On failure, responds with [`SdkError<GetInstancesHealthStatusError>`](crate::error::GetInstancesHealthStatusError)
pub fn get_instances_health_status(&self) -> fluent_builders::GetInstancesHealthStatus {
fluent_builders::GetInstancesHealthStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetNamespace`](crate::client::fluent_builders::GetNamespace) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::GetNamespace::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::GetNamespace::set_id): <p>The ID of the namespace that you want to get information about.</p>
/// - On success, responds with [`GetNamespaceOutput`](crate::output::GetNamespaceOutput) with field(s):
/// - [`namespace(Option<Namespace>)`](crate::output::GetNamespaceOutput::namespace): <p>A complex type that contains information about the specified namespace.</p>
/// - On failure, responds with [`SdkError<GetNamespaceError>`](crate::error::GetNamespaceError)
pub fn get_namespace(&self) -> fluent_builders::GetNamespace {
fluent_builders::GetNamespace::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetOperation`](crate::client::fluent_builders::GetOperation) operation.
///
/// - The fluent builder is configurable:
/// - [`operation_id(impl Into<String>)`](crate::client::fluent_builders::GetOperation::operation_id) / [`set_operation_id(Option<String>)`](crate::client::fluent_builders::GetOperation::set_operation_id): <p>The ID of the operation that you want to get more information about.</p>
/// - On success, responds with [`GetOperationOutput`](crate::output::GetOperationOutput) with field(s):
/// - [`operation(Option<Operation>)`](crate::output::GetOperationOutput::operation): <p>A complex type that contains information about the operation.</p>
/// - On failure, responds with [`SdkError<GetOperationError>`](crate::error::GetOperationError)
pub fn get_operation(&self) -> fluent_builders::GetOperation {
fluent_builders::GetOperation::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetService`](crate::client::fluent_builders::GetService) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::GetService::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::GetService::set_id): <p>The ID of the service that you want to get settings for.</p>
/// - On success, responds with [`GetServiceOutput`](crate::output::GetServiceOutput) with field(s):
/// - [`service(Option<Service>)`](crate::output::GetServiceOutput::service): <p>A complex type that contains information about the service.</p>
/// - On failure, responds with [`SdkError<GetServiceError>`](crate::error::GetServiceError)
pub fn get_service(&self) -> fluent_builders::GetService {
fluent_builders::GetService::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListInstances`](crate::client::fluent_builders::ListInstances) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListInstances::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`service_id(impl Into<String>)`](crate::client::fluent_builders::ListInstances::service_id) / [`set_service_id(Option<String>)`](crate::client::fluent_builders::ListInstances::set_service_id): <p>The ID of the service that you want to list instances for.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListInstances::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListInstances::set_next_token): <p>For the first <code>ListInstances</code> request, omit this value.</p> <p>If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>ListInstances</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListInstances::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListInstances::set_max_results): <p>The maximum number of instances that you want Cloud Map to return in the response to a <code>ListInstances</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.</p>
/// - On success, responds with [`ListInstancesOutput`](crate::output::ListInstancesOutput) with field(s):
/// - [`instances(Option<Vec<InstanceSummary>>)`](crate::output::ListInstancesOutput::instances): <p>Summary information about the instances that are associated with the specified service.</p>
/// - [`next_token(Option<String>)`](crate::output::ListInstancesOutput::next_token): <p>If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>ListInstances</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p>
/// - On failure, responds with [`SdkError<ListInstancesError>`](crate::error::ListInstancesError)
pub fn list_instances(&self) -> fluent_builders::ListInstances {
fluent_builders::ListInstances::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListNamespaces`](crate::client::fluent_builders::ListNamespaces) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListNamespaces::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListNamespaces::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListNamespaces::set_next_token): <p>For the first <code>ListNamespaces</code> request, omit this value.</p> <p>If the response contains <code>NextToken</code>, submit another <code>ListNamespaces</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note> <p>Cloud Map gets <code>MaxResults</code> namespaces and then filters them based on the specified criteria. It's possible that no namespaces in the first <code>MaxResults</code> namespaces matched the specified criteria but that subsequent groups of <code>MaxResults</code> namespaces do contain namespaces that match the criteria.</p> </note>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListNamespaces::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListNamespaces::set_max_results): <p>The maximum number of namespaces that you want Cloud Map to return in the response to a <code>ListNamespaces</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 namespaces.</p>
/// - [`filters(Vec<NamespaceFilter>)`](crate::client::fluent_builders::ListNamespaces::filters) / [`set_filters(Option<Vec<NamespaceFilter>>)`](crate::client::fluent_builders::ListNamespaces::set_filters): <p>A complex type that contains specifications for the namespaces that you want to list.</p> <p>If you specify more than one filter, a namespace must match all filters to be returned by <code>ListNamespaces</code>.</p>
/// - On success, responds with [`ListNamespacesOutput`](crate::output::ListNamespacesOutput) with field(s):
/// - [`namespaces(Option<Vec<NamespaceSummary>>)`](crate::output::ListNamespacesOutput::namespaces): <p>An array that contains one <code>NamespaceSummary</code> object for each namespace that matches the specified filter criteria.</p>
/// - [`next_token(Option<String>)`](crate::output::ListNamespacesOutput::next_token): <p>If the response contains <code>NextToken</code>, submit another <code>ListNamespaces</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note> <p>Cloud Map gets <code>MaxResults</code> namespaces and then filters them based on the specified criteria. It's possible that no namespaces in the first <code>MaxResults</code> namespaces matched the specified criteria but that subsequent groups of <code>MaxResults</code> namespaces do contain namespaces that match the criteria.</p> </note>
/// - On failure, responds with [`SdkError<ListNamespacesError>`](crate::error::ListNamespacesError)
pub fn list_namespaces(&self) -> fluent_builders::ListNamespaces {
fluent_builders::ListNamespaces::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListOperations`](crate::client::fluent_builders::ListOperations) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListOperations::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListOperations::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListOperations::set_next_token): <p>For the first <code>ListOperations</code> request, omit this value.</p> <p>If the response contains <code>NextToken</code>, submit another <code>ListOperations</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note> <p>Cloud Map gets <code>MaxResults</code> operations and then filters them based on the specified criteria. It's possible that no operations in the first <code>MaxResults</code> operations matched the specified criteria but that subsequent groups of <code>MaxResults</code> operations do contain operations that match the criteria.</p> </note>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListOperations::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListOperations::set_max_results): <p>The maximum number of items that you want Cloud Map to return in the response to a <code>ListOperations</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 operations.</p>
/// - [`filters(Vec<OperationFilter>)`](crate::client::fluent_builders::ListOperations::filters) / [`set_filters(Option<Vec<OperationFilter>>)`](crate::client::fluent_builders::ListOperations::set_filters): <p>A complex type that contains specifications for the operations that you want to list, for example, operations that you started between a specified start date and end date.</p> <p>If you specify more than one filter, an operation must match all filters to be returned by <code>ListOperations</code>.</p>
/// - On success, responds with [`ListOperationsOutput`](crate::output::ListOperationsOutput) with field(s):
/// - [`operations(Option<Vec<OperationSummary>>)`](crate::output::ListOperationsOutput::operations): <p>Summary information about the operations that match the specified criteria.</p>
/// - [`next_token(Option<String>)`](crate::output::ListOperationsOutput::next_token): <p>If the response contains <code>NextToken</code>, submit another <code>ListOperations</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note> <p>Cloud Map gets <code>MaxResults</code> operations and then filters them based on the specified criteria. It's possible that no operations in the first <code>MaxResults</code> operations matched the specified criteria but that subsequent groups of <code>MaxResults</code> operations do contain operations that match the criteria.</p> </note>
/// - On failure, responds with [`SdkError<ListOperationsError>`](crate::error::ListOperationsError)
pub fn list_operations(&self) -> fluent_builders::ListOperations {
fluent_builders::ListOperations::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListServices`](crate::client::fluent_builders::ListServices) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListServices::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListServices::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListServices::set_next_token): <p>For the first <code>ListServices</code> request, omit this value.</p> <p>If the response contains <code>NextToken</code>, submit another <code>ListServices</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note> <p>Cloud Map gets <code>MaxResults</code> services and then filters them based on the specified criteria. It's possible that no services in the first <code>MaxResults</code> services matched the specified criteria but that subsequent groups of <code>MaxResults</code> services do contain services that match the criteria.</p> </note>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListServices::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListServices::set_max_results): <p>The maximum number of services that you want Cloud Map to return in the response to a <code>ListServices</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 services.</p>
/// - [`filters(Vec<ServiceFilter>)`](crate::client::fluent_builders::ListServices::filters) / [`set_filters(Option<Vec<ServiceFilter>>)`](crate::client::fluent_builders::ListServices::set_filters): <p>A complex type that contains specifications for the namespaces that you want to list services for. </p> <p>If you specify more than one filter, an operation must match all filters to be returned by <code>ListServices</code>.</p>
/// - On success, responds with [`ListServicesOutput`](crate::output::ListServicesOutput) with field(s):
/// - [`services(Option<Vec<ServiceSummary>>)`](crate::output::ListServicesOutput::services): <p>An array that contains one <code>ServiceSummary</code> object for each service that matches the specified filter criteria.</p>
/// - [`next_token(Option<String>)`](crate::output::ListServicesOutput::next_token): <p>If the response contains <code>NextToken</code>, submit another <code>ListServices</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note> <p>Cloud Map gets <code>MaxResults</code> services and then filters them based on the specified criteria. It's possible that no services in the first <code>MaxResults</code> services matched the specified criteria but that subsequent groups of <code>MaxResults</code> services do contain services that match the criteria.</p> </note>
/// - On failure, responds with [`SdkError<ListServicesError>`](crate::error::ListServicesError)
pub fn list_services(&self) -> fluent_builders::ListServices {
fluent_builders::ListServices::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListTagsForResource`](crate::client::fluent_builders::ListTagsForResource) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::ListTagsForResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::ListTagsForResource::set_resource_arn): <p>The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.</p>
/// - On success, responds with [`ListTagsForResourceOutput`](crate::output::ListTagsForResourceOutput) with field(s):
/// - [`tags(Option<Vec<Tag>>)`](crate::output::ListTagsForResourceOutput::tags): <p>The tags that are assigned to the resource.</p>
/// - On failure, responds with [`SdkError<ListTagsForResourceError>`](crate::error::ListTagsForResourceError)
pub fn list_tags_for_resource(&self) -> fluent_builders::ListTagsForResource {
fluent_builders::ListTagsForResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`RegisterInstance`](crate::client::fluent_builders::RegisterInstance) operation.
///
/// - The fluent builder is configurable:
/// - [`service_id(impl Into<String>)`](crate::client::fluent_builders::RegisterInstance::service_id) / [`set_service_id(Option<String>)`](crate::client::fluent_builders::RegisterInstance::set_service_id): <p>The ID of the service that you want to use for settings for the instance.</p>
/// - [`instance_id(impl Into<String>)`](crate::client::fluent_builders::RegisterInstance::instance_id) / [`set_instance_id(Option<String>)`](crate::client::fluent_builders::RegisterInstance::set_instance_id): <p>An identifier that you want to associate with the instance. Note the following:</p> <ul> <li> <p>If the service that's specified by <code>ServiceId</code> includes settings for an <code>SRV</code> record, the value of <code>InstanceId</code> is automatically included as part of the value for the <code>SRV</code> record. For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type">DnsRecord > Type</a>.</p> </li> <li> <p>You can use this value to update an existing instance.</p> </li> <li> <p>To register a new instance, you must specify a value that's unique among instances that you register by using the same service. </p> </li> <li> <p>If you specify an existing <code>InstanceId</code> and <code>ServiceId</code>, Cloud Map updates the existing DNS records, if any. If there's also an existing health check, Cloud Map deletes the old health check and creates a new one. </p> <note> <p>The health check isn't deleted immediately, so it will still appear for a while if you submit a <code>ListHealthChecks</code> request, for example.</p> </note> </li> </ul>
/// - [`creator_request_id(impl Into<String>)`](crate::client::fluent_builders::RegisterInstance::creator_request_id) / [`set_creator_request_id(Option<String>)`](crate::client::fluent_builders::RegisterInstance::set_creator_request_id): <p>A unique string that identifies the request and that allows failed <code>RegisterInstance</code> requests to be retried without the risk of executing the operation twice. You must use a unique <code>CreatorRequestId</code> string every time you submit a <code>RegisterInstance</code> request if you're registering additional instances for the same namespace and service. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
/// - [`attributes(HashMap<String, String>)`](crate::client::fluent_builders::RegisterInstance::attributes) / [`set_attributes(Option<HashMap<String, String>>)`](crate::client::fluent_builders::RegisterInstance::set_attributes): <p>A string map that contains the following information for the service that you specify in <code>ServiceId</code>:</p> <ul> <li> <p>The attributes that apply to the records that are defined in the service. </p> </li> <li> <p>For each attribute, the applicable value.</p> </li> </ul> <p>Supported attribute keys include the following:</p> <dl> <dt> AWS_ALIAS_DNS_NAME </dt> <dd> <p>If you want Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that's associated with the load balancer. For information about how to get the DNS name, see "DNSName" in the topic <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html">AliasTarget</a> in the <i>Route 53 API Reference</i>.</p> <p>Note the following:</p> <ul> <li> <p>The configuration for the service that's specified by <code>ServiceId</code> must include settings for an <code>A</code> record, an <code>AAAA</code> record, or both.</p> </li> <li> <p>In the service that's specified by <code>ServiceId</code>, the value of <code>RoutingPolicy</code> must be <code>WEIGHTED</code>.</p> </li> <li> <p>If the service that's specified by <code>ServiceId</code> includes <code>HealthCheckConfig</code> settings, Cloud Map will create the Route 53 health check, but it doesn't associate the health check with the alias record.</p> </li> <li> <p>Auto naming currently doesn't support creating alias records that route traffic to Amazon Web Services resources other than Elastic Load Balancing load balancers.</p> </li> <li> <p>If you specify a value for <code>AWS_ALIAS_DNS_NAME</code>, don't specify values for any of the <code>AWS_INSTANCE</code> attributes.</p> </li> </ul> </dd> <dt> AWS_EC2_INSTANCE_ID </dt> <dd> <p> <i>HTTP namespaces only.</i> The Amazon EC2 instance ID for the instance. If the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the only other attribute that can be specified is <code>AWS_INIT_HEALTH_STATUS</code>. When the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the <code>AWS_INSTANCE_IPV4</code> attribute will be filled out with the primary private IPv4 address.</p> </dd> <dt> AWS_INIT_HEALTH_STATUS </dt> <dd> <p>If the service configuration includes <code>HealthCheckCustomConfig</code>, you can optionally use <code>AWS_INIT_HEALTH_STATUS</code> to specify the initial status of the custom health check, <code>HEALTHY</code> or <code>UNHEALTHY</code>. If you don't specify a value for <code>AWS_INIT_HEALTH_STATUS</code>, the initial status is <code>HEALTHY</code>.</p> </dd> <dt> AWS_INSTANCE_CNAME </dt> <dd> <p>If the service configuration includes a <code>CNAME</code> record, the domain name that you want Route 53 to return in response to DNS queries (for example, <code>example.com</code>).</p> <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>CNAME</code> record.</p> </dd> <dt> AWS_INSTANCE_IPV4 </dt> <dd> <p>If the service configuration includes an <code>A</code> record, the IPv4 address that you want Route 53 to return in response to DNS queries (for example, <code>192.0.2.44</code>).</p> <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>A</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p> </dd> <dt> AWS_INSTANCE_IPV6 </dt> <dd> <p>If the service configuration includes an <code>AAAA</code> record, the IPv6 address that you want Route 53 to return in response to DNS queries (for example, <code>2001:0db8:85a3:0000:0000:abcd:0001:2345</code>).</p> <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>AAAA</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p> </dd> <dt> AWS_INSTANCE_PORT </dt> <dd> <p>If the service includes an <code>SRV</code> record, the value that you want Route 53 to return for the port.</p> <p>If the service includes <code>HealthCheckConfig</code>, the port on the endpoint that you want Route 53 to send requests to. </p> <p>This value is required if you specified settings for an <code>SRV</code> record or a Route 53 health check when you created the service.</p> </dd> <dt> Custom attributes </dt> <dd> <p>You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. The total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.</p> </dd> </dl>
/// - On success, responds with [`RegisterInstanceOutput`](crate::output::RegisterInstanceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::RegisterInstanceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<RegisterInstanceError>`](crate::error::RegisterInstanceError)
pub fn register_instance(&self) -> fluent_builders::RegisterInstance {
fluent_builders::RegisterInstance::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`TagResource`](crate::client::fluent_builders::TagResource) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::TagResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::TagResource::set_resource_arn): <p>The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::TagResource::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::TagResource::set_tags): <p>The tags to add to the specified resource. Specifying the tag key is required. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.</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_arn(impl Into<String>)`](crate::client::fluent_builders::UntagResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::UntagResource::set_resource_arn): <p>The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.</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>The tag keys to remove from the specified resource.</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 [`UpdateHttpNamespace`](crate::client::fluent_builders::UpdateHttpNamespace) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::UpdateHttpNamespace::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::UpdateHttpNamespace::set_id): <p>The ID of the namespace that you want to update.</p>
/// - [`updater_request_id(impl Into<String>)`](crate::client::fluent_builders::UpdateHttpNamespace::updater_request_id) / [`set_updater_request_id(Option<String>)`](crate::client::fluent_builders::UpdateHttpNamespace::set_updater_request_id): <p>A unique string that identifies the request and that allows failed <code>UpdateHttpNamespace</code> requests to be retried without the risk of running the operation twice. <code>UpdaterRequestId</code> can be any unique string (for example, a date/timestamp).</p>
/// - [`namespace(HttpNamespaceChange)`](crate::client::fluent_builders::UpdateHttpNamespace::namespace) / [`set_namespace(Option<HttpNamespaceChange>)`](crate::client::fluent_builders::UpdateHttpNamespace::set_namespace): <p>Updated properties for the the HTTP namespace.</p>
/// - On success, responds with [`UpdateHttpNamespaceOutput`](crate::output::UpdateHttpNamespaceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::UpdateHttpNamespaceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<UpdateHttpNamespaceError>`](crate::error::UpdateHttpNamespaceError)
pub fn update_http_namespace(&self) -> fluent_builders::UpdateHttpNamespace {
fluent_builders::UpdateHttpNamespace::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateInstanceCustomHealthStatus`](crate::client::fluent_builders::UpdateInstanceCustomHealthStatus) operation.
///
/// - The fluent builder is configurable:
/// - [`service_id(impl Into<String>)`](crate::client::fluent_builders::UpdateInstanceCustomHealthStatus::service_id) / [`set_service_id(Option<String>)`](crate::client::fluent_builders::UpdateInstanceCustomHealthStatus::set_service_id): <p>The ID of the service that includes the configuration for the custom health check that you want to change the status for.</p>
/// - [`instance_id(impl Into<String>)`](crate::client::fluent_builders::UpdateInstanceCustomHealthStatus::instance_id) / [`set_instance_id(Option<String>)`](crate::client::fluent_builders::UpdateInstanceCustomHealthStatus::set_instance_id): <p>The ID of the instance that you want to change the health status for.</p>
/// - [`status(CustomHealthStatus)`](crate::client::fluent_builders::UpdateInstanceCustomHealthStatus::status) / [`set_status(Option<CustomHealthStatus>)`](crate::client::fluent_builders::UpdateInstanceCustomHealthStatus::set_status): <p>The new status of the instance, <code>HEALTHY</code> or <code>UNHEALTHY</code>.</p>
/// - On success, responds with [`UpdateInstanceCustomHealthStatusOutput`](crate::output::UpdateInstanceCustomHealthStatusOutput)
/// - On failure, responds with [`SdkError<UpdateInstanceCustomHealthStatusError>`](crate::error::UpdateInstanceCustomHealthStatusError)
pub fn update_instance_custom_health_status(
&self,
) -> fluent_builders::UpdateInstanceCustomHealthStatus {
fluent_builders::UpdateInstanceCustomHealthStatus::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdatePrivateDnsNamespace`](crate::client::fluent_builders::UpdatePrivateDnsNamespace) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::UpdatePrivateDnsNamespace::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::UpdatePrivateDnsNamespace::set_id): <p>The ID of the namespace that you want to update.</p>
/// - [`updater_request_id(impl Into<String>)`](crate::client::fluent_builders::UpdatePrivateDnsNamespace::updater_request_id) / [`set_updater_request_id(Option<String>)`](crate::client::fluent_builders::UpdatePrivateDnsNamespace::set_updater_request_id): <p>A unique string that identifies the request and that allows failed <code>UpdatePrivateDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>UpdaterRequestId</code> can be any unique string (for example, a date/timestamp).</p>
/// - [`namespace(PrivateDnsNamespaceChange)`](crate::client::fluent_builders::UpdatePrivateDnsNamespace::namespace) / [`set_namespace(Option<PrivateDnsNamespaceChange>)`](crate::client::fluent_builders::UpdatePrivateDnsNamespace::set_namespace): <p>Updated properties for the private DNS namespace.</p>
/// - On success, responds with [`UpdatePrivateDnsNamespaceOutput`](crate::output::UpdatePrivateDnsNamespaceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::UpdatePrivateDnsNamespaceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<UpdatePrivateDnsNamespaceError>`](crate::error::UpdatePrivateDnsNamespaceError)
pub fn update_private_dns_namespace(&self) -> fluent_builders::UpdatePrivateDnsNamespace {
fluent_builders::UpdatePrivateDnsNamespace::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdatePublicDnsNamespace`](crate::client::fluent_builders::UpdatePublicDnsNamespace) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::UpdatePublicDnsNamespace::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::UpdatePublicDnsNamespace::set_id): <p>The ID of the namespace being updated.</p>
/// - [`updater_request_id(impl Into<String>)`](crate::client::fluent_builders::UpdatePublicDnsNamespace::updater_request_id) / [`set_updater_request_id(Option<String>)`](crate::client::fluent_builders::UpdatePublicDnsNamespace::set_updater_request_id): <p>A unique string that identifies the request and that allows failed <code>UpdatePublicDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>UpdaterRequestId</code> can be any unique string (for example, a date/timestamp).</p>
/// - [`namespace(PublicDnsNamespaceChange)`](crate::client::fluent_builders::UpdatePublicDnsNamespace::namespace) / [`set_namespace(Option<PublicDnsNamespaceChange>)`](crate::client::fluent_builders::UpdatePublicDnsNamespace::set_namespace): <p>Updated properties for the public DNS namespace.</p>
/// - On success, responds with [`UpdatePublicDnsNamespaceOutput`](crate::output::UpdatePublicDnsNamespaceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::UpdatePublicDnsNamespaceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<UpdatePublicDnsNamespaceError>`](crate::error::UpdatePublicDnsNamespaceError)
pub fn update_public_dns_namespace(&self) -> fluent_builders::UpdatePublicDnsNamespace {
fluent_builders::UpdatePublicDnsNamespace::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateService`](crate::client::fluent_builders::UpdateService) operation.
///
/// - The fluent builder is configurable:
/// - [`id(impl Into<String>)`](crate::client::fluent_builders::UpdateService::id) / [`set_id(Option<String>)`](crate::client::fluent_builders::UpdateService::set_id): <p>The ID of the service that you want to update.</p>
/// - [`service(ServiceChange)`](crate::client::fluent_builders::UpdateService::service) / [`set_service(Option<ServiceChange>)`](crate::client::fluent_builders::UpdateService::set_service): <p>A complex type that contains the new settings for the service.</p>
/// - On success, responds with [`UpdateServiceOutput`](crate::output::UpdateServiceOutput) with field(s):
/// - [`operation_id(Option<String>)`](crate::output::UpdateServiceOutput::operation_id): <p>A value that you can use to determine whether the request completed successfully. To get the status of the operation, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html">GetOperation</a>.</p>
/// - On failure, responds with [`SdkError<UpdateServiceError>`](crate::error::UpdateServiceError)
pub fn update_service(&self) -> fluent_builders::UpdateService {
fluent_builders::UpdateService::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 `CreateHttpNamespace`.
///
/// <p>Creates an HTTP namespace. Service instances registered using an HTTP namespace can be discovered using a <code>DiscoverInstances</code> request but can't be discovered using DNS.</p>
/// <p>For the current quota on the number of namespaces that you can create using the same account, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html">Cloud Map quotas</a> in the <i>Cloud Map Developer Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateHttpNamespace {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_http_namespace_input::Builder,
}
impl CreateHttpNamespace {
/// Creates a new `CreateHttpNamespace`.
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::CreateHttpNamespaceOutput,
aws_smithy_http::result::SdkError<crate::error::CreateHttpNamespaceError>,
> {
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 name that you want to assign to this namespace.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name that you want to assign to this namespace.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>A unique string that identifies the request and that allows failed <code>CreateHttpNamespace</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
pub fn creator_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.creator_request_id(input.into());
self
}
/// <p>A unique string that identifies the request and that allows failed <code>CreateHttpNamespace</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
pub fn set_creator_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_creator_request_id(input);
self
}
/// <p>A description for the namespace.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(input.into());
self
}
/// <p>A description for the namespace.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</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 `CreatePrivateDnsNamespace`.
///
/// <p>Creates a private namespace based on DNS, which is visible only inside a specified Amazon VPC. The namespace defines your service naming scheme. For example, if you name your namespace <code>example.com</code> and name your service <code>backend</code>, the resulting DNS name for the service is <code>backend.example.com</code>. Service instances that are registered using a private DNS namespace can be discovered using either a <code>DiscoverInstances</code> request or using DNS. For the current quota on the number of namespaces that you can create using the same account, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html">Cloud Map quotas</a> in the <i>Cloud Map Developer Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreatePrivateDnsNamespace {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_private_dns_namespace_input::Builder,
}
impl CreatePrivateDnsNamespace {
/// Creates a new `CreatePrivateDnsNamespace`.
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::CreatePrivateDnsNamespaceOutput,
aws_smithy_http::result::SdkError<crate::error::CreatePrivateDnsNamespaceError>,
> {
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 name that you want to assign to this namespace. When you create a private DNS namespace, Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name that you want to assign to this namespace. When you create a private DNS namespace, Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>A unique string that identifies the request and that allows failed <code>CreatePrivateDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn creator_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.creator_request_id(input.into());
self
}
/// <p>A unique string that identifies the request and that allows failed <code>CreatePrivateDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn set_creator_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_creator_request_id(input);
self
}
/// <p>A description for the namespace.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(input.into());
self
}
/// <p>A description for the namespace.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The ID of the Amazon VPC that you want to associate the namespace with.</p>
pub fn vpc(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.vpc(input.into());
self
}
/// <p>The ID of the Amazon VPC that you want to associate the namespace with.</p>
pub fn set_vpc(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_vpc(input);
self
}
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</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>Properties for the private DNS namespace.</p>
pub fn properties(mut self, input: crate::model::PrivateDnsNamespaceProperties) -> Self {
self.inner = self.inner.properties(input);
self
}
/// <p>Properties for the private DNS namespace.</p>
pub fn set_properties(
mut self,
input: std::option::Option<crate::model::PrivateDnsNamespaceProperties>,
) -> Self {
self.inner = self.inner.set_properties(input);
self
}
}
/// Fluent builder constructing a request to `CreatePublicDnsNamespace`.
///
/// <p>Creates a public namespace based on DNS, which is visible on the internet. The namespace defines your service naming scheme. For example, if you name your namespace <code>example.com</code> and name your service <code>backend</code>, the resulting DNS name for the service is <code>backend.example.com</code>. You can discover instances that were registered with a public DNS namespace by using either a <code>DiscoverInstances</code> request or using DNS. For the current quota on the number of namespaces that you can create using the same account, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html">Cloud Map quotas</a> in the <i>Cloud Map Developer Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreatePublicDnsNamespace {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_public_dns_namespace_input::Builder,
}
impl CreatePublicDnsNamespace {
/// Creates a new `CreatePublicDnsNamespace`.
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::CreatePublicDnsNamespaceOutput,
aws_smithy_http::result::SdkError<crate::error::CreatePublicDnsNamespaceError>,
> {
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 name that you want to assign to this namespace.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name that you want to assign to this namespace.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>A unique string that identifies the request and that allows failed <code>CreatePublicDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn creator_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.creator_request_id(input.into());
self
}
/// <p>A unique string that identifies the request and that allows failed <code>CreatePublicDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn set_creator_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_creator_request_id(input);
self
}
/// <p>A description for the namespace.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(input.into());
self
}
/// <p>A description for the namespace.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>The tags to add to the namespace. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</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>Properties for the public DNS namespace.</p>
pub fn properties(mut self, input: crate::model::PublicDnsNamespaceProperties) -> Self {
self.inner = self.inner.properties(input);
self
}
/// <p>Properties for the public DNS namespace.</p>
pub fn set_properties(
mut self,
input: std::option::Option<crate::model::PublicDnsNamespaceProperties>,
) -> Self {
self.inner = self.inner.set_properties(input);
self
}
}
/// Fluent builder constructing a request to `CreateService`.
///
/// <p>Creates a service. This action defines the configuration for the following entities:</p>
/// <ul>
/// <li> <p>For public and private DNS namespaces, one of the following combinations of DNS records in Amazon Route 53:</p>
/// <ul>
/// <li> <p> <code>A</code> </p> </li>
/// <li> <p> <code>AAAA</code> </p> </li>
/// <li> <p> <code>A</code> and <code>AAAA</code> </p> </li>
/// <li> <p> <code>SRV</code> </p> </li>
/// <li> <p> <code>CNAME</code> </p> </li>
/// </ul> </li>
/// <li> <p>Optionally, a health check</p> </li>
/// </ul>
/// <p>After you create the service, you can submit a <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html">RegisterInstance</a> request, and Cloud Map uses the values in the configuration to create the specified entities.</p>
/// <p>For the current quota on the number of instances that you can register using the same namespace and using the same service, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html">Cloud Map quotas</a> in the <i>Cloud Map Developer Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateService {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_service_input::Builder,
}
impl CreateService {
/// Creates a new `CreateService`.
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::CreateServiceOutput,
aws_smithy_http::result::SdkError<crate::error::CreateServiceError>,
> {
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 name that you want to assign to the service.</p>
/// <p>If you want Cloud Map to create an <code>SRV</code> record when you register an instance and you're using a system that requires a specific <code>SRV</code> format, such as <a href="http://www.haproxy.org/">HAProxy</a>, specify the following for <code>Name</code>:</p>
/// <ul>
/// <li> <p>Start the name with an underscore (_), such as <code>_exampleservice</code>.</p> </li>
/// <li> <p>End the name with <i>._protocol</i>, such as <code>._tcp</code>.</p> </li>
/// </ul>
/// <p>When you register an instance, Cloud Map creates an <code>SRV</code> record and assigns a name to the record by concatenating the service name and the namespace name (for example,</p>
/// <p> <code>_exampleservice._tcp.example.com</code>).</p> <note>
/// <p>For services that are accessible by DNS queries, you can't create multiple services with names that differ only by case (such as EXAMPLE and example). Otherwise, these services have the same DNS name and can't be distinguished. However, if you use a namespace that's only accessible by API calls, then you can create services that with names that differ only by case.</p>
/// </note>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name that you want to assign to the service.</p>
/// <p>If you want Cloud Map to create an <code>SRV</code> record when you register an instance and you're using a system that requires a specific <code>SRV</code> format, such as <a href="http://www.haproxy.org/">HAProxy</a>, specify the following for <code>Name</code>:</p>
/// <ul>
/// <li> <p>Start the name with an underscore (_), such as <code>_exampleservice</code>.</p> </li>
/// <li> <p>End the name with <i>._protocol</i>, such as <code>._tcp</code>.</p> </li>
/// </ul>
/// <p>When you register an instance, Cloud Map creates an <code>SRV</code> record and assigns a name to the record by concatenating the service name and the namespace name (for example,</p>
/// <p> <code>_exampleservice._tcp.example.com</code>).</p> <note>
/// <p>For services that are accessible by DNS queries, you can't create multiple services with names that differ only by case (such as EXAMPLE and example). Otherwise, these services have the same DNS name and can't be distinguished. However, if you use a namespace that's only accessible by API calls, then you can create services that with names that differ only by case.</p>
/// </note>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The ID of the namespace that you want to use to create the service. The namespace ID must be specified, but it can be specified either here or in the <code>DnsConfig</code> object.</p>
pub fn namespace_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.namespace_id(input.into());
self
}
/// <p>The ID of the namespace that you want to use to create the service. The namespace ID must be specified, but it can be specified either here or in the <code>DnsConfig</code> object.</p>
pub fn set_namespace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_namespace_id(input);
self
}
/// <p>A unique string that identifies the request and that allows failed <code>CreateService</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn creator_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.creator_request_id(input.into());
self
}
/// <p>A unique string that identifies the request and that allows failed <code>CreateService</code> requests to be retried without the risk of running the operation twice. <code>CreatorRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn set_creator_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_creator_request_id(input);
self
}
/// <p>A description for the service.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(input.into());
self
}
/// <p>A description for the service.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>A complex type that contains information about the Amazon Route 53 records that you want Cloud Map to create when you register an instance. </p>
pub fn dns_config(mut self, input: crate::model::DnsConfig) -> Self {
self.inner = self.inner.dns_config(input);
self
}
/// <p>A complex type that contains information about the Amazon Route 53 records that you want Cloud Map to create when you register an instance. </p>
pub fn set_dns_config(
mut self,
input: std::option::Option<crate::model::DnsConfig>,
) -> Self {
self.inner = self.inner.set_dns_config(input);
self
}
/// <p> <i>Public DNS and HTTP namespaces only.</i> A complex type that contains settings for an optional Route 53 health check. If you specify settings for a health check, Cloud Map associates the health check with all the Route 53 DNS records that you specify in <code>DnsConfig</code>.</p> <important>
/// <p>If you specify a health check configuration, you can specify either <code>HealthCheckCustomConfig</code> or <code>HealthCheckConfig</code> but not both.</p>
/// </important>
/// <p>For information about the charges for health checks, see <a href="http://aws.amazon.com/cloud-map/pricing/">Cloud Map Pricing</a>.</p>
pub fn health_check_config(mut self, input: crate::model::HealthCheckConfig) -> Self {
self.inner = self.inner.health_check_config(input);
self
}
/// <p> <i>Public DNS and HTTP namespaces only.</i> A complex type that contains settings for an optional Route 53 health check. If you specify settings for a health check, Cloud Map associates the health check with all the Route 53 DNS records that you specify in <code>DnsConfig</code>.</p> <important>
/// <p>If you specify a health check configuration, you can specify either <code>HealthCheckCustomConfig</code> or <code>HealthCheckConfig</code> but not both.</p>
/// </important>
/// <p>For information about the charges for health checks, see <a href="http://aws.amazon.com/cloud-map/pricing/">Cloud Map Pricing</a>.</p>
pub fn set_health_check_config(
mut self,
input: std::option::Option<crate::model::HealthCheckConfig>,
) -> Self {
self.inner = self.inner.set_health_check_config(input);
self
}
/// <p>A complex type that contains information about an optional custom health check.</p> <important>
/// <p>If you specify a health check configuration, you can specify either <code>HealthCheckCustomConfig</code> or <code>HealthCheckConfig</code> but not both.</p>
/// </important>
/// <p>You can't add, update, or delete a <code>HealthCheckCustomConfig</code> configuration from an existing service.</p>
pub fn health_check_custom_config(
mut self,
input: crate::model::HealthCheckCustomConfig,
) -> Self {
self.inner = self.inner.health_check_custom_config(input);
self
}
/// <p>A complex type that contains information about an optional custom health check.</p> <important>
/// <p>If you specify a health check configuration, you can specify either <code>HealthCheckCustomConfig</code> or <code>HealthCheckConfig</code> but not both.</p>
/// </important>
/// <p>You can't add, update, or delete a <code>HealthCheckCustomConfig</code> configuration from an existing service.</p>
pub fn set_health_check_custom_config(
mut self,
input: std::option::Option<crate::model::HealthCheckCustomConfig>,
) -> Self {
self.inner = self.inner.set_health_check_custom_config(input);
self
}
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags to add to the service. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>The tags to add to the service. Each tag consists of a key and an optional value that you define. Tags keys can be up to 128 characters in length, and tag values can be up to 256 characters in length.</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>If present, specifies that the service instances are only discoverable using the <code>DiscoverInstances</code> API operation. No DNS records is registered for the service instances. The only valid value is <code>HTTP</code>.</p>
pub fn r#type(mut self, input: crate::model::ServiceTypeOption) -> Self {
self.inner = self.inner.r#type(input);
self
}
/// <p>If present, specifies that the service instances are only discoverable using the <code>DiscoverInstances</code> API operation. No DNS records is registered for the service instances. The only valid value is <code>HTTP</code>.</p>
pub fn set_type(
mut self,
input: std::option::Option<crate::model::ServiceTypeOption>,
) -> Self {
self.inner = self.inner.set_type(input);
self
}
}
/// Fluent builder constructing a request to `DeleteNamespace`.
///
/// <p>Deletes a namespace from the current account. If the namespace still contains one or more services, the request fails.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeleteNamespace {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::delete_namespace_input::Builder,
}
impl DeleteNamespace {
/// Creates a new `DeleteNamespace`.
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::DeleteNamespaceOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteNamespaceError>,
> {
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 ID of the namespace that you want to delete.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// <p>The ID of the namespace that you want to delete.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `DeleteService`.
///
/// <p>Deletes a specified service. If the service still contains one or more registered instances, the request fails.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeleteService {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::delete_service_input::Builder,
}
impl DeleteService {
/// Creates a new `DeleteService`.
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::DeleteServiceOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteServiceError>,
> {
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 ID of the service that you want to delete.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// <p>The ID of the service that you want to delete.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `DeregisterInstance`.
///
/// <p>Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created for the specified instance.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeregisterInstance {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::deregister_instance_input::Builder,
}
impl DeregisterInstance {
/// Creates a new `DeregisterInstance`.
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::DeregisterInstanceOutput,
aws_smithy_http::result::SdkError<crate::error::DeregisterInstanceError>,
> {
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 ID of the service that the instance is associated with.</p>
pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(input.into());
self
}
/// <p>The ID of the service that the instance is associated with.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// <p>The value that you specified for <code>Id</code> in the <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html">RegisterInstance</a> request.</p>
pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(input.into());
self
}
/// <p>The value that you specified for <code>Id</code> in the <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html">RegisterInstance</a> request.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `DiscoverInstances`.
///
/// <p>Discovers registered instances for a specified namespace and service. You can use <code>DiscoverInstances</code> to discover instances for any type of namespace. For public and private DNS namespaces, you can also use DNS queries to discover instances.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DiscoverInstances {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::discover_instances_input::Builder,
}
impl DiscoverInstances {
/// Creates a new `DiscoverInstances`.
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::DiscoverInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::DiscoverInstancesError>,
> {
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 <code>HttpName</code> name of the namespace. It's found in the <code>HttpProperties</code> member of the <code>Properties</code> member of the namespace.</p>
pub fn namespace_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.namespace_name(input.into());
self
}
/// <p>The <code>HttpName</code> name of the namespace. It's found in the <code>HttpProperties</code> member of the <code>Properties</code> member of the namespace.</p>
pub fn set_namespace_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_namespace_name(input);
self
}
/// <p>The name of the service that you specified when you registered the instance.</p>
pub fn service_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_name(input.into());
self
}
/// <p>The name of the service that you specified when you registered the instance.</p>
pub fn set_service_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_name(input);
self
}
/// <p>The maximum number of instances that you want Cloud Map to return in the response to a <code>DiscoverInstances</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of instances that you want Cloud Map to return in the response to a <code>DiscoverInstances</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// Adds a key-value pair to `QueryParameters`.
///
/// To override the contents of this collection use [`set_query_parameters`](Self::set_query_parameters).
///
/// <p>Filters to scope the results based on custom attributes for the instance (for example, <code>{version=v1, az=1a}</code>). Only instances that match all the specified key-value pairs are returned.</p>
pub fn query_parameters(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.query_parameters(k.into(), v.into());
self
}
/// <p>Filters to scope the results based on custom attributes for the instance (for example, <code>{version=v1, az=1a}</code>). Only instances that match all the specified key-value pairs are returned.</p>
pub fn set_query_parameters(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.inner = self.inner.set_query_parameters(input);
self
}
/// Adds a key-value pair to `OptionalParameters`.
///
/// To override the contents of this collection use [`set_optional_parameters`](Self::set_optional_parameters).
///
/// <p>Opportunistic filters to scope the results based on custom attributes. If there are instances that match both the filters specified in both the <code>QueryParameters</code> parameter and this parameter, all of these instances are returned. Otherwise, the filters are ignored, and only instances that match the filters that are specified in the <code>QueryParameters</code> parameter are returned.</p>
pub fn optional_parameters(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.optional_parameters(k.into(), v.into());
self
}
/// <p>Opportunistic filters to scope the results based on custom attributes. If there are instances that match both the filters specified in both the <code>QueryParameters</code> parameter and this parameter, all of these instances are returned. Otherwise, the filters are ignored, and only instances that match the filters that are specified in the <code>QueryParameters</code> parameter are returned.</p>
pub fn set_optional_parameters(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.inner = self.inner.set_optional_parameters(input);
self
}
/// <p>The health status of the instances that you want to discover. This parameter is ignored for services that don't have a health check configured, and all instances are returned.</p>
/// <dl>
/// <dt>
/// HEALTHY
/// </dt>
/// <dd>
/// <p>Returns healthy instances.</p>
/// </dd>
/// <dt>
/// UNHEALTHY
/// </dt>
/// <dd>
/// <p>Returns unhealthy instances.</p>
/// </dd>
/// <dt>
/// ALL
/// </dt>
/// <dd>
/// <p>Returns all instances.</p>
/// </dd>
/// <dt>
/// HEALTHY_OR_ELSE_ALL
/// </dt>
/// <dd>
/// <p>Returns healthy instances, unless none are reporting a healthy state. In that case, return all instances. This is also called failing open.</p>
/// </dd>
/// </dl>
pub fn health_status(mut self, input: crate::model::HealthStatusFilter) -> Self {
self.inner = self.inner.health_status(input);
self
}
/// <p>The health status of the instances that you want to discover. This parameter is ignored for services that don't have a health check configured, and all instances are returned.</p>
/// <dl>
/// <dt>
/// HEALTHY
/// </dt>
/// <dd>
/// <p>Returns healthy instances.</p>
/// </dd>
/// <dt>
/// UNHEALTHY
/// </dt>
/// <dd>
/// <p>Returns unhealthy instances.</p>
/// </dd>
/// <dt>
/// ALL
/// </dt>
/// <dd>
/// <p>Returns all instances.</p>
/// </dd>
/// <dt>
/// HEALTHY_OR_ELSE_ALL
/// </dt>
/// <dd>
/// <p>Returns healthy instances, unless none are reporting a healthy state. In that case, return all instances. This is also called failing open.</p>
/// </dd>
/// </dl>
pub fn set_health_status(
mut self,
input: std::option::Option<crate::model::HealthStatusFilter>,
) -> Self {
self.inner = self.inner.set_health_status(input);
self
}
}
/// Fluent builder constructing a request to `GetInstance`.
///
/// <p>Gets information about a specified instance.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetInstance {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_instance_input::Builder,
}
impl GetInstance {
/// Creates a new `GetInstance`.
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::GetInstanceOutput,
aws_smithy_http::result::SdkError<crate::error::GetInstanceError>,
> {
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 ID of the service that the instance is associated with.</p>
pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(input.into());
self
}
/// <p>The ID of the service that the instance is associated with.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// <p>The ID of the instance that you want to get information about.</p>
pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(input.into());
self
}
/// <p>The ID of the instance that you want to get information about.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
}
/// Fluent builder constructing a request to `GetInstancesHealthStatus`.
///
/// <p>Gets the current health status (<code>Healthy</code>, <code>Unhealthy</code>, or <code>Unknown</code>) of one or more instances that are associated with a specified service.</p> <note>
/// <p>There's a brief delay between when you register an instance and when the health status for the instance is available. </p>
/// </note>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetInstancesHealthStatus {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_instances_health_status_input::Builder,
}
impl GetInstancesHealthStatus {
/// Creates a new `GetInstancesHealthStatus`.
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::GetInstancesHealthStatusOutput,
aws_smithy_http::result::SdkError<crate::error::GetInstancesHealthStatusError>,
> {
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::GetInstancesHealthStatusPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::GetInstancesHealthStatusPaginator {
crate::paginator::GetInstancesHealthStatusPaginator::new(self.handle, self.inner)
}
/// <p>The ID of the service that the instance is associated with.</p>
pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(input.into());
self
}
/// <p>The ID of the service that the instance is associated with.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// Appends an item to `Instances`.
///
/// To override the contents of this collection use [`set_instances`](Self::set_instances).
///
/// <p>An array that contains the IDs of all the instances that you want to get the health status for.</p>
/// <p>If you omit <code>Instances</code>, Cloud Map returns the health status for all the instances that are associated with the specified service.</p> <note>
/// <p>To get the IDs for the instances that you've registered by using a specified service, submit a <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_ListInstances.html">ListInstances</a> request.</p>
/// </note>
pub fn instances(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instances(input.into());
self
}
/// <p>An array that contains the IDs of all the instances that you want to get the health status for.</p>
/// <p>If you omit <code>Instances</code>, Cloud Map returns the health status for all the instances that are associated with the specified service.</p> <note>
/// <p>To get the IDs for the instances that you've registered by using a specified service, submit a <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_ListInstances.html">ListInstances</a> request.</p>
/// </note>
pub fn set_instances(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_instances(input);
self
}
/// <p>The maximum number of instances that you want Cloud Map to return in the response to a <code>GetInstancesHealthStatus</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of instances that you want Cloud Map to return in the response to a <code>GetInstancesHealthStatus</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// <p>For the first <code>GetInstancesHealthStatus</code> request, omit this value.</p>
/// <p>If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>GetInstancesHealthStatus</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>For the first <code>GetInstancesHealthStatus</code> request, omit this value.</p>
/// <p>If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>GetInstancesHealthStatus</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</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
}
}
/// Fluent builder constructing a request to `GetNamespace`.
///
/// <p>Gets information about a namespace.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetNamespace {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_namespace_input::Builder,
}
impl GetNamespace {
/// Creates a new `GetNamespace`.
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::GetNamespaceOutput,
aws_smithy_http::result::SdkError<crate::error::GetNamespaceError>,
> {
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 ID of the namespace that you want to get information about.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// <p>The ID of the namespace that you want to get information about.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `GetOperation`.
///
/// <p>Gets information about any operation that returns an operation ID in the response, such as a <code>CreateService</code> request.</p> <note>
/// <p>To get a list of operations that match specified criteria, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html">ListOperations</a>.</p>
/// </note>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetOperation {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_operation_input::Builder,
}
impl GetOperation {
/// Creates a new `GetOperation`.
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::GetOperationOutput,
aws_smithy_http::result::SdkError<crate::error::GetOperationError>,
> {
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 ID of the operation that you want to get more information about.</p>
pub fn operation_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.operation_id(input.into());
self
}
/// <p>The ID of the operation that you want to get more information about.</p>
pub fn set_operation_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_operation_id(input);
self
}
}
/// Fluent builder constructing a request to `GetService`.
///
/// <p>Gets the settings for a specified service.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetService {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::get_service_input::Builder,
}
impl GetService {
/// Creates a new `GetService`.
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::GetServiceOutput,
aws_smithy_http::result::SdkError<crate::error::GetServiceError>,
> {
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 ID of the service that you want to get settings for.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// <p>The ID of the service that you want to get settings for.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
}
/// Fluent builder constructing a request to `ListInstances`.
///
/// <p>Lists summary information about the instances that you registered by using a specified service.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListInstances {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_instances_input::Builder,
}
impl ListInstances {
/// Creates a new `ListInstances`.
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::ListInstancesOutput,
aws_smithy_http::result::SdkError<crate::error::ListInstancesError>,
> {
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::ListInstancesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListInstancesPaginator {
crate::paginator::ListInstancesPaginator::new(self.handle, self.inner)
}
/// <p>The ID of the service that you want to list instances for.</p>
pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(input.into());
self
}
/// <p>The ID of the service that you want to list instances for.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// <p>For the first <code>ListInstances</code> request, omit this value.</p>
/// <p>If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>ListInstances</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>For the first <code>ListInstances</code> request, omit this value.</p>
/// <p>If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>ListInstances</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</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>The maximum number of instances that you want Cloud Map to return in the response to a <code>ListInstances</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of instances that you want Cloud Map to return in the response to a <code>ListInstances</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.</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 `ListNamespaces`.
///
/// <p>Lists summary information about the namespaces that were created by the current account.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListNamespaces {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_namespaces_input::Builder,
}
impl ListNamespaces {
/// Creates a new `ListNamespaces`.
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::ListNamespacesOutput,
aws_smithy_http::result::SdkError<crate::error::ListNamespacesError>,
> {
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::ListNamespacesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListNamespacesPaginator {
crate::paginator::ListNamespacesPaginator::new(self.handle, self.inner)
}
/// <p>For the first <code>ListNamespaces</code> request, omit this value.</p>
/// <p>If the response contains <code>NextToken</code>, submit another <code>ListNamespaces</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note>
/// <p>Cloud Map gets <code>MaxResults</code> namespaces and then filters them based on the specified criteria. It's possible that no namespaces in the first <code>MaxResults</code> namespaces matched the specified criteria but that subsequent groups of <code>MaxResults</code> namespaces do contain namespaces that match the criteria.</p>
/// </note>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>For the first <code>ListNamespaces</code> request, omit this value.</p>
/// <p>If the response contains <code>NextToken</code>, submit another <code>ListNamespaces</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note>
/// <p>Cloud Map gets <code>MaxResults</code> namespaces and then filters them based on the specified criteria. It's possible that no namespaces in the first <code>MaxResults</code> namespaces matched the specified criteria but that subsequent groups of <code>MaxResults</code> namespaces do contain namespaces that match the criteria.</p>
/// </note>
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>The maximum number of namespaces that you want Cloud Map to return in the response to a <code>ListNamespaces</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 namespaces.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of namespaces that you want Cloud Map to return in the response to a <code>ListNamespaces</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 namespaces.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>A complex type that contains specifications for the namespaces that you want to list.</p>
/// <p>If you specify more than one filter, a namespace must match all filters to be returned by <code>ListNamespaces</code>.</p>
pub fn filters(mut self, input: crate::model::NamespaceFilter) -> Self {
self.inner = self.inner.filters(input);
self
}
/// <p>A complex type that contains specifications for the namespaces that you want to list.</p>
/// <p>If you specify more than one filter, a namespace must match all filters to be returned by <code>ListNamespaces</code>.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::NamespaceFilter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `ListOperations`.
///
/// <p>Lists operations that match the criteria that you specify.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListOperations {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_operations_input::Builder,
}
impl ListOperations {
/// Creates a new `ListOperations`.
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::ListOperationsOutput,
aws_smithy_http::result::SdkError<crate::error::ListOperationsError>,
> {
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::ListOperationsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListOperationsPaginator {
crate::paginator::ListOperationsPaginator::new(self.handle, self.inner)
}
/// <p>For the first <code>ListOperations</code> request, omit this value.</p>
/// <p>If the response contains <code>NextToken</code>, submit another <code>ListOperations</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note>
/// <p>Cloud Map gets <code>MaxResults</code> operations and then filters them based on the specified criteria. It's possible that no operations in the first <code>MaxResults</code> operations matched the specified criteria but that subsequent groups of <code>MaxResults</code> operations do contain operations that match the criteria.</p>
/// </note>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>For the first <code>ListOperations</code> request, omit this value.</p>
/// <p>If the response contains <code>NextToken</code>, submit another <code>ListOperations</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note>
/// <p>Cloud Map gets <code>MaxResults</code> operations and then filters them based on the specified criteria. It's possible that no operations in the first <code>MaxResults</code> operations matched the specified criteria but that subsequent groups of <code>MaxResults</code> operations do contain operations that match the criteria.</p>
/// </note>
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>The maximum number of items that you want Cloud Map to return in the response to a <code>ListOperations</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 operations.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of items that you want Cloud Map to return in the response to a <code>ListOperations</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 operations.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>A complex type that contains specifications for the operations that you want to list, for example, operations that you started between a specified start date and end date.</p>
/// <p>If you specify more than one filter, an operation must match all filters to be returned by <code>ListOperations</code>.</p>
pub fn filters(mut self, input: crate::model::OperationFilter) -> Self {
self.inner = self.inner.filters(input);
self
}
/// <p>A complex type that contains specifications for the operations that you want to list, for example, operations that you started between a specified start date and end date.</p>
/// <p>If you specify more than one filter, an operation must match all filters to be returned by <code>ListOperations</code>.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::OperationFilter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `ListServices`.
///
/// <p>Lists summary information for all the services that are associated with one or more specified namespaces.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListServices {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_services_input::Builder,
}
impl ListServices {
/// Creates a new `ListServices`.
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::ListServicesOutput,
aws_smithy_http::result::SdkError<crate::error::ListServicesError>,
> {
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::ListServicesPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
pub fn into_paginator(self) -> crate::paginator::ListServicesPaginator {
crate::paginator::ListServicesPaginator::new(self.handle, self.inner)
}
/// <p>For the first <code>ListServices</code> request, omit this value.</p>
/// <p>If the response contains <code>NextToken</code>, submit another <code>ListServices</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note>
/// <p>Cloud Map gets <code>MaxResults</code> services and then filters them based on the specified criteria. It's possible that no services in the first <code>MaxResults</code> services matched the specified criteria but that subsequent groups of <code>MaxResults</code> services do contain services that match the criteria.</p>
/// </note>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.next_token(input.into());
self
}
/// <p>For the first <code>ListServices</code> request, omit this value.</p>
/// <p>If the response contains <code>NextToken</code>, submit another <code>ListServices</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p> <note>
/// <p>Cloud Map gets <code>MaxResults</code> services and then filters them based on the specified criteria. It's possible that no services in the first <code>MaxResults</code> services matched the specified criteria but that subsequent groups of <code>MaxResults</code> services do contain services that match the criteria.</p>
/// </note>
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>The maximum number of services that you want Cloud Map to return in the response to a <code>ListServices</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 services.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_results(input);
self
}
/// <p>The maximum number of services that you want Cloud Map to return in the response to a <code>ListServices</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 services.</p>
pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_results(input);
self
}
/// Appends an item to `Filters`.
///
/// To override the contents of this collection use [`set_filters`](Self::set_filters).
///
/// <p>A complex type that contains specifications for the namespaces that you want to list services for. </p>
/// <p>If you specify more than one filter, an operation must match all filters to be returned by <code>ListServices</code>.</p>
pub fn filters(mut self, input: crate::model::ServiceFilter) -> Self {
self.inner = self.inner.filters(input);
self
}
/// <p>A complex type that contains specifications for the namespaces that you want to list services for. </p>
/// <p>If you specify more than one filter, an operation must match all filters to be returned by <code>ListServices</code>.</p>
pub fn set_filters(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ServiceFilter>>,
) -> Self {
self.inner = self.inner.set_filters(input);
self
}
}
/// Fluent builder constructing a request to `ListTagsForResource`.
///
/// <p>Lists tags for the specified resource.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListTagsForResource {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::list_tags_for_resource_input::Builder,
}
impl ListTagsForResource {
/// Creates a new `ListTagsForResource`.
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::ListTagsForResourceOutput,
aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError>,
> {
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 Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.</p>
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.</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
}
}
/// Fluent builder constructing a request to `RegisterInstance`.
///
/// <p>Creates or updates one or more records and, optionally, creates a health check based on the settings in a specified service. When you submit a <code>RegisterInstance</code> request, the following occurs:</p>
/// <ul>
/// <li> <p>For each DNS record that you define in the service that's specified by <code>ServiceId</code>, a record is created or updated in the hosted zone that's associated with the corresponding namespace.</p> </li>
/// <li> <p>If the service includes <code>HealthCheckConfig</code>, a health check is created based on the settings in the health check configuration.</p> </li>
/// <li> <p>The health check, if any, is associated with each of the new or updated records.</p> </li>
/// </ul> <important>
/// <p>One <code>RegisterInstance</code> request must complete before you can submit another request and specify the same service ID and instance ID.</p>
/// </important>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html">CreateService</a>.</p>
/// <p>When Cloud Map receives a DNS query for the specified DNS name, it returns the applicable value:</p>
/// <ul>
/// <li> <p> <b>If the health check is healthy</b>: returns all the records</p> </li>
/// <li> <p> <b>If the health check is unhealthy</b>: returns the applicable value for the last healthy instance</p> </li>
/// <li> <p> <b>If you didn't specify a health check configuration</b>: returns all the records</p> </li>
/// </ul>
/// <p>For the current quota on the number of instances that you can register using the same namespace and using the same service, see <a href="https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html">Cloud Map quotas</a> in the <i>Cloud Map Developer Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct RegisterInstance {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::register_instance_input::Builder,
}
impl RegisterInstance {
/// Creates a new `RegisterInstance`.
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::RegisterInstanceOutput,
aws_smithy_http::result::SdkError<crate::error::RegisterInstanceError>,
> {
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 ID of the service that you want to use for settings for the instance.</p>
pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(input.into());
self
}
/// <p>The ID of the service that you want to use for settings for the instance.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// <p>An identifier that you want to associate with the instance. Note the following:</p>
/// <ul>
/// <li> <p>If the service that's specified by <code>ServiceId</code> includes settings for an <code>SRV</code> record, the value of <code>InstanceId</code> is automatically included as part of the value for the <code>SRV</code> record. For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type">DnsRecord > Type</a>.</p> </li>
/// <li> <p>You can use this value to update an existing instance.</p> </li>
/// <li> <p>To register a new instance, you must specify a value that's unique among instances that you register by using the same service. </p> </li>
/// <li> <p>If you specify an existing <code>InstanceId</code> and <code>ServiceId</code>, Cloud Map updates the existing DNS records, if any. If there's also an existing health check, Cloud Map deletes the old health check and creates a new one. </p> <note>
/// <p>The health check isn't deleted immediately, so it will still appear for a while if you submit a <code>ListHealthChecks</code> request, for example.</p>
/// </note> </li>
/// </ul>
pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(input.into());
self
}
/// <p>An identifier that you want to associate with the instance. Note the following:</p>
/// <ul>
/// <li> <p>If the service that's specified by <code>ServiceId</code> includes settings for an <code>SRV</code> record, the value of <code>InstanceId</code> is automatically included as part of the value for the <code>SRV</code> record. For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type">DnsRecord > Type</a>.</p> </li>
/// <li> <p>You can use this value to update an existing instance.</p> </li>
/// <li> <p>To register a new instance, you must specify a value that's unique among instances that you register by using the same service. </p> </li>
/// <li> <p>If you specify an existing <code>InstanceId</code> and <code>ServiceId</code>, Cloud Map updates the existing DNS records, if any. If there's also an existing health check, Cloud Map deletes the old health check and creates a new one. </p> <note>
/// <p>The health check isn't deleted immediately, so it will still appear for a while if you submit a <code>ListHealthChecks</code> request, for example.</p>
/// </note> </li>
/// </ul>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>A unique string that identifies the request and that allows failed <code>RegisterInstance</code> requests to be retried without the risk of executing the operation twice. You must use a unique <code>CreatorRequestId</code> string every time you submit a <code>RegisterInstance</code> request if you're registering additional instances for the same namespace and service. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
pub fn creator_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.creator_request_id(input.into());
self
}
/// <p>A unique string that identifies the request and that allows failed <code>RegisterInstance</code> requests to be retried without the risk of executing the operation twice. You must use a unique <code>CreatorRequestId</code> string every time you submit a <code>RegisterInstance</code> request if you're registering additional instances for the same namespace and service. <code>CreatorRequestId</code> can be any unique string (for example, a date/time stamp).</p>
pub fn set_creator_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_creator_request_id(input);
self
}
/// Adds a key-value pair to `Attributes`.
///
/// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
///
/// <p>A string map that contains the following information for the service that you specify in <code>ServiceId</code>:</p>
/// <ul>
/// <li> <p>The attributes that apply to the records that are defined in the service. </p> </li>
/// <li> <p>For each attribute, the applicable value.</p> </li>
/// </ul>
/// <p>Supported attribute keys include the following:</p>
/// <dl>
/// <dt>
/// AWS_ALIAS_DNS_NAME
/// </dt>
/// <dd>
/// <p>If you want Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that's associated with the load balancer. For information about how to get the DNS name, see "DNSName" in the topic <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html">AliasTarget</a> in the <i>Route 53 API Reference</i>.</p>
/// <p>Note the following:</p>
/// <ul>
/// <li> <p>The configuration for the service that's specified by <code>ServiceId</code> must include settings for an <code>A</code> record, an <code>AAAA</code> record, or both.</p> </li>
/// <li> <p>In the service that's specified by <code>ServiceId</code>, the value of <code>RoutingPolicy</code> must be <code>WEIGHTED</code>.</p> </li>
/// <li> <p>If the service that's specified by <code>ServiceId</code> includes <code>HealthCheckConfig</code> settings, Cloud Map will create the Route 53 health check, but it doesn't associate the health check with the alias record.</p> </li>
/// <li> <p>Auto naming currently doesn't support creating alias records that route traffic to Amazon Web Services resources other than Elastic Load Balancing load balancers.</p> </li>
/// <li> <p>If you specify a value for <code>AWS_ALIAS_DNS_NAME</code>, don't specify values for any of the <code>AWS_INSTANCE</code> attributes.</p> </li>
/// </ul>
/// </dd>
/// <dt>
/// AWS_EC2_INSTANCE_ID
/// </dt>
/// <dd>
/// <p> <i>HTTP namespaces only.</i> The Amazon EC2 instance ID for the instance. If the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the only other attribute that can be specified is <code>AWS_INIT_HEALTH_STATUS</code>. When the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the <code>AWS_INSTANCE_IPV4</code> attribute will be filled out with the primary private IPv4 address.</p>
/// </dd>
/// <dt>
/// AWS_INIT_HEALTH_STATUS
/// </dt>
/// <dd>
/// <p>If the service configuration includes <code>HealthCheckCustomConfig</code>, you can optionally use <code>AWS_INIT_HEALTH_STATUS</code> to specify the initial status of the custom health check, <code>HEALTHY</code> or <code>UNHEALTHY</code>. If you don't specify a value for <code>AWS_INIT_HEALTH_STATUS</code>, the initial status is <code>HEALTHY</code>.</p>
/// </dd>
/// <dt>
/// AWS_INSTANCE_CNAME
/// </dt>
/// <dd>
/// <p>If the service configuration includes a <code>CNAME</code> record, the domain name that you want Route 53 to return in response to DNS queries (for example, <code>example.com</code>).</p>
/// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>CNAME</code> record.</p>
/// </dd>
/// <dt>
/// AWS_INSTANCE_IPV4
/// </dt>
/// <dd>
/// <p>If the service configuration includes an <code>A</code> record, the IPv4 address that you want Route 53 to return in response to DNS queries (for example, <code>192.0.2.44</code>).</p>
/// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>A</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
/// </dd>
/// <dt>
/// AWS_INSTANCE_IPV6
/// </dt>
/// <dd>
/// <p>If the service configuration includes an <code>AAAA</code> record, the IPv6 address that you want Route 53 to return in response to DNS queries (for example, <code>2001:0db8:85a3:0000:0000:abcd:0001:2345</code>).</p>
/// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>AAAA</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
/// </dd>
/// <dt>
/// AWS_INSTANCE_PORT
/// </dt>
/// <dd>
/// <p>If the service includes an <code>SRV</code> record, the value that you want Route 53 to return for the port.</p>
/// <p>If the service includes <code>HealthCheckConfig</code>, the port on the endpoint that you want Route 53 to send requests to. </p>
/// <p>This value is required if you specified settings for an <code>SRV</code> record or a Route 53 health check when you created the service.</p>
/// </dd>
/// <dt>
/// Custom attributes
/// </dt>
/// <dd>
/// <p>You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. The total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.</p>
/// </dd>
/// </dl>
pub fn attributes(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.attributes(k.into(), v.into());
self
}
/// <p>A string map that contains the following information for the service that you specify in <code>ServiceId</code>:</p>
/// <ul>
/// <li> <p>The attributes that apply to the records that are defined in the service. </p> </li>
/// <li> <p>For each attribute, the applicable value.</p> </li>
/// </ul>
/// <p>Supported attribute keys include the following:</p>
/// <dl>
/// <dt>
/// AWS_ALIAS_DNS_NAME
/// </dt>
/// <dd>
/// <p>If you want Cloud Map to create an Amazon Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that's associated with the load balancer. For information about how to get the DNS name, see "DNSName" in the topic <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html">AliasTarget</a> in the <i>Route 53 API Reference</i>.</p>
/// <p>Note the following:</p>
/// <ul>
/// <li> <p>The configuration for the service that's specified by <code>ServiceId</code> must include settings for an <code>A</code> record, an <code>AAAA</code> record, or both.</p> </li>
/// <li> <p>In the service that's specified by <code>ServiceId</code>, the value of <code>RoutingPolicy</code> must be <code>WEIGHTED</code>.</p> </li>
/// <li> <p>If the service that's specified by <code>ServiceId</code> includes <code>HealthCheckConfig</code> settings, Cloud Map will create the Route 53 health check, but it doesn't associate the health check with the alias record.</p> </li>
/// <li> <p>Auto naming currently doesn't support creating alias records that route traffic to Amazon Web Services resources other than Elastic Load Balancing load balancers.</p> </li>
/// <li> <p>If you specify a value for <code>AWS_ALIAS_DNS_NAME</code>, don't specify values for any of the <code>AWS_INSTANCE</code> attributes.</p> </li>
/// </ul>
/// </dd>
/// <dt>
/// AWS_EC2_INSTANCE_ID
/// </dt>
/// <dd>
/// <p> <i>HTTP namespaces only.</i> The Amazon EC2 instance ID for the instance. If the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the only other attribute that can be specified is <code>AWS_INIT_HEALTH_STATUS</code>. When the <code>AWS_EC2_INSTANCE_ID</code> attribute is specified, then the <code>AWS_INSTANCE_IPV4</code> attribute will be filled out with the primary private IPv4 address.</p>
/// </dd>
/// <dt>
/// AWS_INIT_HEALTH_STATUS
/// </dt>
/// <dd>
/// <p>If the service configuration includes <code>HealthCheckCustomConfig</code>, you can optionally use <code>AWS_INIT_HEALTH_STATUS</code> to specify the initial status of the custom health check, <code>HEALTHY</code> or <code>UNHEALTHY</code>. If you don't specify a value for <code>AWS_INIT_HEALTH_STATUS</code>, the initial status is <code>HEALTHY</code>.</p>
/// </dd>
/// <dt>
/// AWS_INSTANCE_CNAME
/// </dt>
/// <dd>
/// <p>If the service configuration includes a <code>CNAME</code> record, the domain name that you want Route 53 to return in response to DNS queries (for example, <code>example.com</code>).</p>
/// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>CNAME</code> record.</p>
/// </dd>
/// <dt>
/// AWS_INSTANCE_IPV4
/// </dt>
/// <dd>
/// <p>If the service configuration includes an <code>A</code> record, the IPv4 address that you want Route 53 to return in response to DNS queries (for example, <code>192.0.2.44</code>).</p>
/// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>A</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
/// </dd>
/// <dt>
/// AWS_INSTANCE_IPV6
/// </dt>
/// <dd>
/// <p>If the service configuration includes an <code>AAAA</code> record, the IPv6 address that you want Route 53 to return in response to DNS queries (for example, <code>2001:0db8:85a3:0000:0000:abcd:0001:2345</code>).</p>
/// <p>This value is required if the service specified by <code>ServiceId</code> includes settings for an <code>AAAA</code> record. If the service includes settings for an <code>SRV</code> record, you must specify a value for <code>AWS_INSTANCE_IPV4</code>, <code>AWS_INSTANCE_IPV6</code>, or both.</p>
/// </dd>
/// <dt>
/// AWS_INSTANCE_PORT
/// </dt>
/// <dd>
/// <p>If the service includes an <code>SRV</code> record, the value that you want Route 53 to return for the port.</p>
/// <p>If the service includes <code>HealthCheckConfig</code>, the port on the endpoint that you want Route 53 to send requests to. </p>
/// <p>This value is required if you specified settings for an <code>SRV</code> record or a Route 53 health check when you created the service.</p>
/// </dd>
/// <dt>
/// Custom attributes
/// </dt>
/// <dd>
/// <p>You can add up to 30 custom attributes. For each key-value pair, the maximum length of the attribute name is 255 characters, and the maximum length of the attribute value is 1,024 characters. The total size of all provided attributes (sum of all keys and values) must not exceed 5,000 characters.</p>
/// </dd>
/// </dl>
pub fn set_attributes(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.inner = self.inner.set_attributes(input);
self
}
}
/// Fluent builder constructing a request to `TagResource`.
///
/// <p>Adds one or more tags to the specified resource.</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>The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.</p>
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.</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 `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags to add to the specified resource. Specifying the tag key is required. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>The tags to add to the specified resource. Specifying the tag key is required. You can set the value of a tag to an empty string, but you can't set the value of a tag to null.</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 one or more tags from the specified resource.</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>The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.</p>
pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.resource_arn(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the resource that you want to retrieve tags for.</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 `TagKeys`.
///
/// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
///
/// <p>The tag keys to remove from the specified resource.</p>
pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.tag_keys(input.into());
self
}
/// <p>The tag keys to remove from the specified resource.</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 `UpdateHttpNamespace`.
///
/// <p>Updates an HTTP namespace.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateHttpNamespace {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_http_namespace_input::Builder,
}
impl UpdateHttpNamespace {
/// Creates a new `UpdateHttpNamespace`.
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::UpdateHttpNamespaceOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateHttpNamespaceError>,
> {
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 ID of the namespace that you want to update.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// <p>The ID of the namespace that you want to update.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
/// <p>A unique string that identifies the request and that allows failed <code>UpdateHttpNamespace</code> requests to be retried without the risk of running the operation twice. <code>UpdaterRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn updater_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.updater_request_id(input.into());
self
}
/// <p>A unique string that identifies the request and that allows failed <code>UpdateHttpNamespace</code> requests to be retried without the risk of running the operation twice. <code>UpdaterRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn set_updater_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_updater_request_id(input);
self
}
/// <p>Updated properties for the the HTTP namespace.</p>
pub fn namespace(mut self, input: crate::model::HttpNamespaceChange) -> Self {
self.inner = self.inner.namespace(input);
self
}
/// <p>Updated properties for the the HTTP namespace.</p>
pub fn set_namespace(
mut self,
input: std::option::Option<crate::model::HttpNamespaceChange>,
) -> Self {
self.inner = self.inner.set_namespace(input);
self
}
}
/// Fluent builder constructing a request to `UpdateInstanceCustomHealthStatus`.
///
/// <p>Submits a request to change the health status of a custom health check to healthy or unhealthy.</p>
/// <p>You can use <code>UpdateInstanceCustomHealthStatus</code> to change the status only for custom health checks, which you define using <code>HealthCheckCustomConfig</code> when you create a service. You can't use it to change the status for Route 53 health checks, which you define using <code>HealthCheckConfig</code>.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html">HealthCheckCustomConfig</a>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateInstanceCustomHealthStatus {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_instance_custom_health_status_input::Builder,
}
impl UpdateInstanceCustomHealthStatus {
/// Creates a new `UpdateInstanceCustomHealthStatus`.
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::UpdateInstanceCustomHealthStatusOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateInstanceCustomHealthStatusError>,
> {
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 ID of the service that includes the configuration for the custom health check that you want to change the status for.</p>
pub fn service_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.service_id(input.into());
self
}
/// <p>The ID of the service that includes the configuration for the custom health check that you want to change the status for.</p>
pub fn set_service_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_service_id(input);
self
}
/// <p>The ID of the instance that you want to change the health status for.</p>
pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.instance_id(input.into());
self
}
/// <p>The ID of the instance that you want to change the health status for.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The new status of the instance, <code>HEALTHY</code> or <code>UNHEALTHY</code>.</p>
pub fn status(mut self, input: crate::model::CustomHealthStatus) -> Self {
self.inner = self.inner.status(input);
self
}
/// <p>The new status of the instance, <code>HEALTHY</code> or <code>UNHEALTHY</code>.</p>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::CustomHealthStatus>,
) -> Self {
self.inner = self.inner.set_status(input);
self
}
}
/// Fluent builder constructing a request to `UpdatePrivateDnsNamespace`.
///
/// <p>Updates a private DNS namespace.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdatePrivateDnsNamespace {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_private_dns_namespace_input::Builder,
}
impl UpdatePrivateDnsNamespace {
/// Creates a new `UpdatePrivateDnsNamespace`.
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::UpdatePrivateDnsNamespaceOutput,
aws_smithy_http::result::SdkError<crate::error::UpdatePrivateDnsNamespaceError>,
> {
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 ID of the namespace that you want to update.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// <p>The ID of the namespace that you want to update.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
/// <p>A unique string that identifies the request and that allows failed <code>UpdatePrivateDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>UpdaterRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn updater_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.updater_request_id(input.into());
self
}
/// <p>A unique string that identifies the request and that allows failed <code>UpdatePrivateDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>UpdaterRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn set_updater_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_updater_request_id(input);
self
}
/// <p>Updated properties for the private DNS namespace.</p>
pub fn namespace(mut self, input: crate::model::PrivateDnsNamespaceChange) -> Self {
self.inner = self.inner.namespace(input);
self
}
/// <p>Updated properties for the private DNS namespace.</p>
pub fn set_namespace(
mut self,
input: std::option::Option<crate::model::PrivateDnsNamespaceChange>,
) -> Self {
self.inner = self.inner.set_namespace(input);
self
}
}
/// Fluent builder constructing a request to `UpdatePublicDnsNamespace`.
///
/// <p>Updates a public DNS namespace.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdatePublicDnsNamespace {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_public_dns_namespace_input::Builder,
}
impl UpdatePublicDnsNamespace {
/// Creates a new `UpdatePublicDnsNamespace`.
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::UpdatePublicDnsNamespaceOutput,
aws_smithy_http::result::SdkError<crate::error::UpdatePublicDnsNamespaceError>,
> {
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 ID of the namespace being updated.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// <p>The ID of the namespace being updated.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
/// <p>A unique string that identifies the request and that allows failed <code>UpdatePublicDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>UpdaterRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn updater_request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.updater_request_id(input.into());
self
}
/// <p>A unique string that identifies the request and that allows failed <code>UpdatePublicDnsNamespace</code> requests to be retried without the risk of running the operation twice. <code>UpdaterRequestId</code> can be any unique string (for example, a date/timestamp).</p>
pub fn set_updater_request_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_updater_request_id(input);
self
}
/// <p>Updated properties for the public DNS namespace.</p>
pub fn namespace(mut self, input: crate::model::PublicDnsNamespaceChange) -> Self {
self.inner = self.inner.namespace(input);
self
}
/// <p>Updated properties for the public DNS namespace.</p>
pub fn set_namespace(
mut self,
input: std::option::Option<crate::model::PublicDnsNamespaceChange>,
) -> Self {
self.inner = self.inner.set_namespace(input);
self
}
}
/// Fluent builder constructing a request to `UpdateService`.
///
/// <p>Submits a request to perform the following operations:</p>
/// <ul>
/// <li> <p>Update the TTL setting for existing <code>DnsRecords</code> configurations</p> </li>
/// <li> <p>Add, update, or delete <code>HealthCheckConfig</code> for a specified service</p> <note>
/// <p>You can't add, update, or delete a <code>HealthCheckCustomConfig</code> configuration.</p>
/// </note> </li>
/// </ul>
/// <p>For public and private DNS namespaces, note the following:</p>
/// <ul>
/// <li> <p>If you omit any existing <code>DnsRecords</code> or <code>HealthCheckConfig</code> configurations from an <code>UpdateService</code> request, the configurations are deleted from the service.</p> </li>
/// <li> <p>If you omit an existing <code>HealthCheckCustomConfig</code> configuration from an <code>UpdateService</code> request, the configuration isn't deleted from the service.</p> </li>
/// </ul>
/// <p>When you update settings for a service, Cloud Map also updates the corresponding settings in all the records and health checks that were created by using the specified service.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct UpdateService {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::update_service_input::Builder,
}
impl UpdateService {
/// Creates a new `UpdateService`.
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::UpdateServiceOutput,
aws_smithy_http::result::SdkError<crate::error::UpdateServiceError>,
> {
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 ID of the service that you want to update.</p>
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.id(input.into());
self
}
/// <p>The ID of the service that you want to update.</p>
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_id(input);
self
}
/// <p>A complex type that contains the new settings for the service.</p>
pub fn service(mut self, input: crate::model::ServiceChange) -> Self {
self.inner = self.inner.service(input);
self
}
/// <p>A complex type that contains the new settings for the service.</p>
pub fn set_service(
mut self,
input: std::option::Option<crate::model::ServiceChange>,
) -> Self {
self.inner = self.inner.set_service(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 }),
}
}
}