1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166
|
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package servicediscovery
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opCreateHttpNamespace = "CreateHttpNamespace"
// CreateHttpNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the CreateHttpNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateHttpNamespace for more information on using the CreateHttpNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateHttpNamespaceRequest method.
// req, resp := client.CreateHttpNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace
func (c *ServiceDiscovery) CreateHttpNamespaceRequest(input *CreateHttpNamespaceInput) (req *request.Request, output *CreateHttpNamespaceOutput) {
op := &request.Operation{
Name: opCreateHttpNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateHttpNamespaceInput{}
}
output = &CreateHttpNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateHttpNamespace API operation for AWS Cloud Map.
//
// Creates an HTTP namespace. Service instances that you register using an HTTP
// namespace can be discovered using a DiscoverInstances request but can't be
// discovered using DNS.
//
// For the current limit on the number of namespaces that you can create using
// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation CreateHttpNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists"
// The namespace that you're trying to create already exists.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace
func (c *ServiceDiscovery) CreateHttpNamespace(input *CreateHttpNamespaceInput) (*CreateHttpNamespaceOutput, error) {
req, out := c.CreateHttpNamespaceRequest(input)
return out, req.Send()
}
// CreateHttpNamespaceWithContext is the same as CreateHttpNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See CreateHttpNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) CreateHttpNamespaceWithContext(ctx aws.Context, input *CreateHttpNamespaceInput, opts ...request.Option) (*CreateHttpNamespaceOutput, error) {
req, out := c.CreateHttpNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreatePrivateDnsNamespace = "CreatePrivateDnsNamespace"
// CreatePrivateDnsNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the CreatePrivateDnsNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreatePrivateDnsNamespace for more information on using the CreatePrivateDnsNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreatePrivateDnsNamespaceRequest method.
// req, resp := client.CreatePrivateDnsNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace
func (c *ServiceDiscovery) CreatePrivateDnsNamespaceRequest(input *CreatePrivateDnsNamespaceInput) (req *request.Request, output *CreatePrivateDnsNamespaceOutput) {
op := &request.Operation{
Name: opCreatePrivateDnsNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreatePrivateDnsNamespaceInput{}
}
output = &CreatePrivateDnsNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreatePrivateDnsNamespace API operation for AWS Cloud Map.
//
// Creates a private namespace based on DNS, which will be visible only inside
// a specified Amazon VPC. The namespace defines your service naming scheme.
// For example, if you name your namespace example.com and name your service
// backend, the resulting DNS name for the service will be backend.example.com.
// For the current limit on the number of namespaces that you can create using
// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation CreatePrivateDnsNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists"
// The namespace that you're trying to create already exists.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace
func (c *ServiceDiscovery) CreatePrivateDnsNamespace(input *CreatePrivateDnsNamespaceInput) (*CreatePrivateDnsNamespaceOutput, error) {
req, out := c.CreatePrivateDnsNamespaceRequest(input)
return out, req.Send()
}
// CreatePrivateDnsNamespaceWithContext is the same as CreatePrivateDnsNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See CreatePrivateDnsNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) CreatePrivateDnsNamespaceWithContext(ctx aws.Context, input *CreatePrivateDnsNamespaceInput, opts ...request.Option) (*CreatePrivateDnsNamespaceOutput, error) {
req, out := c.CreatePrivateDnsNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreatePublicDnsNamespace = "CreatePublicDnsNamespace"
// CreatePublicDnsNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the CreatePublicDnsNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreatePublicDnsNamespace for more information on using the CreatePublicDnsNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreatePublicDnsNamespaceRequest method.
// req, resp := client.CreatePublicDnsNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace
func (c *ServiceDiscovery) CreatePublicDnsNamespaceRequest(input *CreatePublicDnsNamespaceInput) (req *request.Request, output *CreatePublicDnsNamespaceOutput) {
op := &request.Operation{
Name: opCreatePublicDnsNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreatePublicDnsNamespaceInput{}
}
output = &CreatePublicDnsNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreatePublicDnsNamespace API operation for AWS Cloud Map.
//
// Creates a public namespace based on DNS, which will be visible on the internet.
// The namespace defines your service naming scheme. For example, if you name
// your namespace example.com and name your service backend, the resulting DNS
// name for the service will be backend.example.com. For the current limit on
// the number of namespaces that you can create using the same AWS account,
// see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation CreatePublicDnsNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists"
// The namespace that you're trying to create already exists.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace
func (c *ServiceDiscovery) CreatePublicDnsNamespace(input *CreatePublicDnsNamespaceInput) (*CreatePublicDnsNamespaceOutput, error) {
req, out := c.CreatePublicDnsNamespaceRequest(input)
return out, req.Send()
}
// CreatePublicDnsNamespaceWithContext is the same as CreatePublicDnsNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See CreatePublicDnsNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) CreatePublicDnsNamespaceWithContext(ctx aws.Context, input *CreatePublicDnsNamespaceInput, opts ...request.Option) (*CreatePublicDnsNamespaceOutput, error) {
req, out := c.CreatePublicDnsNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateService = "CreateService"
// CreateServiceRequest generates a "aws/request.Request" representing the
// client's request for the CreateService operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateService for more information on using the CreateService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateServiceRequest method.
// req, resp := client.CreateServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService
func (c *ServiceDiscovery) CreateServiceRequest(input *CreateServiceInput) (req *request.Request, output *CreateServiceOutput) {
op := &request.Operation{
Name: opCreateService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateServiceInput{}
}
output = &CreateServiceOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateService API operation for AWS Cloud Map.
//
// Creates a service, which defines the configuration for the following entities:
//
// * For public and private DNS namespaces, one of the following combinations
// of DNS records in Amazon Route 53:
//
// A
//
// AAAA
//
// A and AAAA
//
// SRV
//
// CNAME
//
// * Optionally, a health check
//
// After you create the service, you can submit a RegisterInstance request,
// and AWS Cloud Map uses the values in the configuration to create the specified
// entities.
//
// For the current limit on the number of instances that you can register using
// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation CreateService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeNamespaceNotFound "NamespaceNotFound"
// No namespace exists with the specified ID.
//
// * ErrCodeServiceAlreadyExists "ServiceAlreadyExists"
// The service can't be created because a service with the same name already
// exists.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService
func (c *ServiceDiscovery) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) {
req, out := c.CreateServiceRequest(input)
return out, req.Send()
}
// CreateServiceWithContext is the same as CreateService with the addition of
// the ability to pass a context and additional request options.
//
// See CreateService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) CreateServiceWithContext(ctx aws.Context, input *CreateServiceInput, opts ...request.Option) (*CreateServiceOutput, error) {
req, out := c.CreateServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteNamespace = "DeleteNamespace"
// DeleteNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteNamespace for more information on using the DeleteNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteNamespaceRequest method.
// req, resp := client.DeleteNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace
func (c *ServiceDiscovery) DeleteNamespaceRequest(input *DeleteNamespaceInput) (req *request.Request, output *DeleteNamespaceOutput) {
op := &request.Operation{
Name: opDeleteNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteNamespaceInput{}
}
output = &DeleteNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteNamespace API operation for AWS Cloud Map.
//
// Deletes a namespace from the current account. If the namespace still contains
// one or more services, the request fails.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation DeleteNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeNamespaceNotFound "NamespaceNotFound"
// No namespace exists with the specified ID.
//
// * ErrCodeResourceInUse "ResourceInUse"
// The specified resource can't be deleted because it contains other resources.
// For example, you can't delete a service that contains any instances.
//
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace
func (c *ServiceDiscovery) DeleteNamespace(input *DeleteNamespaceInput) (*DeleteNamespaceOutput, error) {
req, out := c.DeleteNamespaceRequest(input)
return out, req.Send()
}
// DeleteNamespaceWithContext is the same as DeleteNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) DeleteNamespaceWithContext(ctx aws.Context, input *DeleteNamespaceInput, opts ...request.Option) (*DeleteNamespaceOutput, error) {
req, out := c.DeleteNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteService = "DeleteService"
// DeleteServiceRequest generates a "aws/request.Request" representing the
// client's request for the DeleteService operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteService for more information on using the DeleteService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteServiceRequest method.
// req, resp := client.DeleteServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService
func (c *ServiceDiscovery) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Request, output *DeleteServiceOutput) {
op := &request.Operation{
Name: opDeleteService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteServiceInput{}
}
output = &DeleteServiceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteService API operation for AWS Cloud Map.
//
// Deletes a specified service. If the service still contains one or more registered
// instances, the request fails.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation DeleteService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// * ErrCodeResourceInUse "ResourceInUse"
// The specified resource can't be deleted because it contains other resources.
// For example, you can't delete a service that contains any instances.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService
func (c *ServiceDiscovery) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) {
req, out := c.DeleteServiceRequest(input)
return out, req.Send()
}
// DeleteServiceWithContext is the same as DeleteService with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) DeleteServiceWithContext(ctx aws.Context, input *DeleteServiceInput, opts ...request.Option) (*DeleteServiceOutput, error) {
req, out := c.DeleteServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeregisterInstance = "DeregisterInstance"
// DeregisterInstanceRequest generates a "aws/request.Request" representing the
// client's request for the DeregisterInstance operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeregisterInstance for more information on using the DeregisterInstance
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeregisterInstanceRequest method.
// req, resp := client.DeregisterInstanceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance
func (c *ServiceDiscovery) DeregisterInstanceRequest(input *DeregisterInstanceInput) (req *request.Request, output *DeregisterInstanceOutput) {
op := &request.Operation{
Name: opDeregisterInstance,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeregisterInstanceInput{}
}
output = &DeregisterInstanceOutput{}
req = c.newRequest(op, input, output)
return
}
// DeregisterInstance API operation for AWS Cloud Map.
//
// Deletes the Amazon Route 53 DNS records and health check, if any, that AWS
// Cloud Map created for the specified instance.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation DeregisterInstance for usage and error information.
//
// Returned Error Codes:
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeInstanceNotFound "InstanceNotFound"
// No instance exists with the specified ID, or the instance was recently registered,
// and information about the instance hasn't propagated yet.
//
// * ErrCodeResourceInUse "ResourceInUse"
// The specified resource can't be deleted because it contains other resources.
// For example, you can't delete a service that contains any instances.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance
func (c *ServiceDiscovery) DeregisterInstance(input *DeregisterInstanceInput) (*DeregisterInstanceOutput, error) {
req, out := c.DeregisterInstanceRequest(input)
return out, req.Send()
}
// DeregisterInstanceWithContext is the same as DeregisterInstance with the addition of
// the ability to pass a context and additional request options.
//
// See DeregisterInstance for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) DeregisterInstanceWithContext(ctx aws.Context, input *DeregisterInstanceInput, opts ...request.Option) (*DeregisterInstanceOutput, error) {
req, out := c.DeregisterInstanceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDiscoverInstances = "DiscoverInstances"
// DiscoverInstancesRequest generates a "aws/request.Request" representing the
// client's request for the DiscoverInstances operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DiscoverInstances for more information on using the DiscoverInstances
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DiscoverInstancesRequest method.
// req, resp := client.DiscoverInstancesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances
func (c *ServiceDiscovery) DiscoverInstancesRequest(input *DiscoverInstancesInput) (req *request.Request, output *DiscoverInstancesOutput) {
op := &request.Operation{
Name: opDiscoverInstances,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DiscoverInstancesInput{}
}
output = &DiscoverInstancesOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("data-", nil))
req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
return
}
// DiscoverInstances API operation for AWS Cloud Map.
//
// Discovers registered instances for a specified namespace and service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation DiscoverInstances for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// * ErrCodeNamespaceNotFound "NamespaceNotFound"
// No namespace exists with the specified ID.
//
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances
func (c *ServiceDiscovery) DiscoverInstances(input *DiscoverInstancesInput) (*DiscoverInstancesOutput, error) {
req, out := c.DiscoverInstancesRequest(input)
return out, req.Send()
}
// DiscoverInstancesWithContext is the same as DiscoverInstances with the addition of
// the ability to pass a context and additional request options.
//
// See DiscoverInstances for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) DiscoverInstancesWithContext(ctx aws.Context, input *DiscoverInstancesInput, opts ...request.Option) (*DiscoverInstancesOutput, error) {
req, out := c.DiscoverInstancesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetInstance = "GetInstance"
// GetInstanceRequest generates a "aws/request.Request" representing the
// client's request for the GetInstance operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetInstance for more information on using the GetInstance
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetInstanceRequest method.
// req, resp := client.GetInstanceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance
func (c *ServiceDiscovery) GetInstanceRequest(input *GetInstanceInput) (req *request.Request, output *GetInstanceOutput) {
op := &request.Operation{
Name: opGetInstance,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetInstanceInput{}
}
output = &GetInstanceOutput{}
req = c.newRequest(op, input, output)
return
}
// GetInstance API operation for AWS Cloud Map.
//
// Gets information about a specified instance.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetInstance for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInstanceNotFound "InstanceNotFound"
// No instance exists with the specified ID, or the instance was recently registered,
// and information about the instance hasn't propagated yet.
//
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance
func (c *ServiceDiscovery) GetInstance(input *GetInstanceInput) (*GetInstanceOutput, error) {
req, out := c.GetInstanceRequest(input)
return out, req.Send()
}
// GetInstanceWithContext is the same as GetInstance with the addition of
// the ability to pass a context and additional request options.
//
// See GetInstance for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetInstanceWithContext(ctx aws.Context, input *GetInstanceInput, opts ...request.Option) (*GetInstanceOutput, error) {
req, out := c.GetInstanceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetInstancesHealthStatus = "GetInstancesHealthStatus"
// GetInstancesHealthStatusRequest generates a "aws/request.Request" representing the
// client's request for the GetInstancesHealthStatus operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetInstancesHealthStatus for more information on using the GetInstancesHealthStatus
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetInstancesHealthStatusRequest method.
// req, resp := client.GetInstancesHealthStatusRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus
func (c *ServiceDiscovery) GetInstancesHealthStatusRequest(input *GetInstancesHealthStatusInput) (req *request.Request, output *GetInstancesHealthStatusOutput) {
op := &request.Operation{
Name: opGetInstancesHealthStatus,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &GetInstancesHealthStatusInput{}
}
output = &GetInstancesHealthStatusOutput{}
req = c.newRequest(op, input, output)
return
}
// GetInstancesHealthStatus API operation for AWS Cloud Map.
//
// Gets the current health status (Healthy, Unhealthy, or Unknown) of one or
// more instances that are associated with a specified service.
//
// There is a brief delay between when you register an instance and when the
// health status for the instance is available.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetInstancesHealthStatus for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInstanceNotFound "InstanceNotFound"
// No instance exists with the specified ID, or the instance was recently registered,
// and information about the instance hasn't propagated yet.
//
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus
func (c *ServiceDiscovery) GetInstancesHealthStatus(input *GetInstancesHealthStatusInput) (*GetInstancesHealthStatusOutput, error) {
req, out := c.GetInstancesHealthStatusRequest(input)
return out, req.Send()
}
// GetInstancesHealthStatusWithContext is the same as GetInstancesHealthStatus with the addition of
// the ability to pass a context and additional request options.
//
// See GetInstancesHealthStatus for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetInstancesHealthStatusWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, opts ...request.Option) (*GetInstancesHealthStatusOutput, error) {
req, out := c.GetInstancesHealthStatusRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// GetInstancesHealthStatusPages iterates over the pages of a GetInstancesHealthStatus operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See GetInstancesHealthStatus method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a GetInstancesHealthStatus operation.
// pageNum := 0
// err := client.GetInstancesHealthStatusPages(params,
// func(page *GetInstancesHealthStatusOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) GetInstancesHealthStatusPages(input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool) error {
return c.GetInstancesHealthStatusPagesWithContext(aws.BackgroundContext(), input, fn)
}
// GetInstancesHealthStatusPagesWithContext same as GetInstancesHealthStatusPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetInstancesHealthStatusPagesWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *GetInstancesHealthStatusInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.GetInstancesHealthStatusRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*GetInstancesHealthStatusOutput), !p.HasNextPage())
}
return p.Err()
}
const opGetNamespace = "GetNamespace"
// GetNamespaceRequest generates a "aws/request.Request" representing the
// client's request for the GetNamespace operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetNamespace for more information on using the GetNamespace
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetNamespaceRequest method.
// req, resp := client.GetNamespaceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace
func (c *ServiceDiscovery) GetNamespaceRequest(input *GetNamespaceInput) (req *request.Request, output *GetNamespaceOutput) {
op := &request.Operation{
Name: opGetNamespace,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetNamespaceInput{}
}
output = &GetNamespaceOutput{}
req = c.newRequest(op, input, output)
return
}
// GetNamespace API operation for AWS Cloud Map.
//
// Gets information about a namespace.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetNamespace for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeNamespaceNotFound "NamespaceNotFound"
// No namespace exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace
func (c *ServiceDiscovery) GetNamespace(input *GetNamespaceInput) (*GetNamespaceOutput, error) {
req, out := c.GetNamespaceRequest(input)
return out, req.Send()
}
// GetNamespaceWithContext is the same as GetNamespace with the addition of
// the ability to pass a context and additional request options.
//
// See GetNamespace for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetNamespaceWithContext(ctx aws.Context, input *GetNamespaceInput, opts ...request.Option) (*GetNamespaceOutput, error) {
req, out := c.GetNamespaceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetOperation = "GetOperation"
// GetOperationRequest generates a "aws/request.Request" representing the
// client's request for the GetOperation operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetOperation for more information on using the GetOperation
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetOperationRequest method.
// req, resp := client.GetOperationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation
func (c *ServiceDiscovery) GetOperationRequest(input *GetOperationInput) (req *request.Request, output *GetOperationOutput) {
op := &request.Operation{
Name: opGetOperation,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetOperationInput{}
}
output = &GetOperationOutput{}
req = c.newRequest(op, input, output)
return
}
// GetOperation API operation for AWS Cloud Map.
//
// Gets information about any operation that returns an operation ID in the
// response, such as a CreateService request.
//
// To get a list of operations that match specified criteria, see ListOperations.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetOperation for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeOperationNotFound "OperationNotFound"
// No operation exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation
func (c *ServiceDiscovery) GetOperation(input *GetOperationInput) (*GetOperationOutput, error) {
req, out := c.GetOperationRequest(input)
return out, req.Send()
}
// GetOperationWithContext is the same as GetOperation with the addition of
// the ability to pass a context and additional request options.
//
// See GetOperation for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetOperationWithContext(ctx aws.Context, input *GetOperationInput, opts ...request.Option) (*GetOperationOutput, error) {
req, out := c.GetOperationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetService = "GetService"
// GetServiceRequest generates a "aws/request.Request" representing the
// client's request for the GetService operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetService for more information on using the GetService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetServiceRequest method.
// req, resp := client.GetServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService
func (c *ServiceDiscovery) GetServiceRequest(input *GetServiceInput) (req *request.Request, output *GetServiceOutput) {
op := &request.Operation{
Name: opGetService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetServiceInput{}
}
output = &GetServiceOutput{}
req = c.newRequest(op, input, output)
return
}
// GetService API operation for AWS Cloud Map.
//
// Gets the settings for a specified service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation GetService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService
func (c *ServiceDiscovery) GetService(input *GetServiceInput) (*GetServiceOutput, error) {
req, out := c.GetServiceRequest(input)
return out, req.Send()
}
// GetServiceWithContext is the same as GetService with the addition of
// the ability to pass a context and additional request options.
//
// See GetService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) GetServiceWithContext(ctx aws.Context, input *GetServiceInput, opts ...request.Option) (*GetServiceOutput, error) {
req, out := c.GetServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListInstances = "ListInstances"
// ListInstancesRequest generates a "aws/request.Request" representing the
// client's request for the ListInstances operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListInstances for more information on using the ListInstances
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListInstancesRequest method.
// req, resp := client.ListInstancesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances
func (c *ServiceDiscovery) ListInstancesRequest(input *ListInstancesInput) (req *request.Request, output *ListInstancesOutput) {
op := &request.Operation{
Name: opListInstances,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListInstancesInput{}
}
output = &ListInstancesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListInstances API operation for AWS Cloud Map.
//
// Lists summary information about the instances that you registered by using
// a specified service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation ListInstances for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances
func (c *ServiceDiscovery) ListInstances(input *ListInstancesInput) (*ListInstancesOutput, error) {
req, out := c.ListInstancesRequest(input)
return out, req.Send()
}
// ListInstancesWithContext is the same as ListInstances with the addition of
// the ability to pass a context and additional request options.
//
// See ListInstances for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListInstancesWithContext(ctx aws.Context, input *ListInstancesInput, opts ...request.Option) (*ListInstancesOutput, error) {
req, out := c.ListInstancesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListInstancesPages iterates over the pages of a ListInstances operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListInstances method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListInstances operation.
// pageNum := 0
// err := client.ListInstancesPages(params,
// func(page *ListInstancesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) ListInstancesPages(input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool) error {
return c.ListInstancesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListInstancesPagesWithContext same as ListInstancesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListInstancesPagesWithContext(ctx aws.Context, input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListInstancesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListInstancesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListInstancesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListNamespaces = "ListNamespaces"
// ListNamespacesRequest generates a "aws/request.Request" representing the
// client's request for the ListNamespaces operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListNamespaces for more information on using the ListNamespaces
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListNamespacesRequest method.
// req, resp := client.ListNamespacesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces
func (c *ServiceDiscovery) ListNamespacesRequest(input *ListNamespacesInput) (req *request.Request, output *ListNamespacesOutput) {
op := &request.Operation{
Name: opListNamespaces,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListNamespacesInput{}
}
output = &ListNamespacesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListNamespaces API operation for AWS Cloud Map.
//
// Lists summary information about the namespaces that were created by the current
// AWS account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation ListNamespaces for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces
func (c *ServiceDiscovery) ListNamespaces(input *ListNamespacesInput) (*ListNamespacesOutput, error) {
req, out := c.ListNamespacesRequest(input)
return out, req.Send()
}
// ListNamespacesWithContext is the same as ListNamespaces with the addition of
// the ability to pass a context and additional request options.
//
// See ListNamespaces for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListNamespacesWithContext(ctx aws.Context, input *ListNamespacesInput, opts ...request.Option) (*ListNamespacesOutput, error) {
req, out := c.ListNamespacesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListNamespacesPages iterates over the pages of a ListNamespaces operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListNamespaces method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListNamespaces operation.
// pageNum := 0
// err := client.ListNamespacesPages(params,
// func(page *ListNamespacesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) ListNamespacesPages(input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool) error {
return c.ListNamespacesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListNamespacesPagesWithContext same as ListNamespacesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListNamespacesPagesWithContext(ctx aws.Context, input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListNamespacesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListNamespacesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListNamespacesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListOperations = "ListOperations"
// ListOperationsRequest generates a "aws/request.Request" representing the
// client's request for the ListOperations operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListOperations for more information on using the ListOperations
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListOperationsRequest method.
// req, resp := client.ListOperationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations
func (c *ServiceDiscovery) ListOperationsRequest(input *ListOperationsInput) (req *request.Request, output *ListOperationsOutput) {
op := &request.Operation{
Name: opListOperations,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListOperationsInput{}
}
output = &ListOperationsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListOperations API operation for AWS Cloud Map.
//
// Lists operations that match the criteria that you specify.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation ListOperations for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations
func (c *ServiceDiscovery) ListOperations(input *ListOperationsInput) (*ListOperationsOutput, error) {
req, out := c.ListOperationsRequest(input)
return out, req.Send()
}
// ListOperationsWithContext is the same as ListOperations with the addition of
// the ability to pass a context and additional request options.
//
// See ListOperations for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListOperationsWithContext(ctx aws.Context, input *ListOperationsInput, opts ...request.Option) (*ListOperationsOutput, error) {
req, out := c.ListOperationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListOperationsPages iterates over the pages of a ListOperations operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListOperations method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListOperations operation.
// pageNum := 0
// err := client.ListOperationsPages(params,
// func(page *ListOperationsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) ListOperationsPages(input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool) error {
return c.ListOperationsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListOperationsPagesWithContext same as ListOperationsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListOperationsPagesWithContext(ctx aws.Context, input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListOperationsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListOperationsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListOperationsOutput), !p.HasNextPage())
}
return p.Err()
}
const opListServices = "ListServices"
// ListServicesRequest generates a "aws/request.Request" representing the
// client's request for the ListServices operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListServices for more information on using the ListServices
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListServicesRequest method.
// req, resp := client.ListServicesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices
func (c *ServiceDiscovery) ListServicesRequest(input *ListServicesInput) (req *request.Request, output *ListServicesOutput) {
op := &request.Operation{
Name: opListServices,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListServicesInput{}
}
output = &ListServicesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListServices API operation for AWS Cloud Map.
//
// Lists summary information for all the services that are associated with one
// or more specified namespaces.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation ListServices for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices
func (c *ServiceDiscovery) ListServices(input *ListServicesInput) (*ListServicesOutput, error) {
req, out := c.ListServicesRequest(input)
return out, req.Send()
}
// ListServicesWithContext is the same as ListServices with the addition of
// the ability to pass a context and additional request options.
//
// See ListServices for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListServicesWithContext(ctx aws.Context, input *ListServicesInput, opts ...request.Option) (*ListServicesOutput, error) {
req, out := c.ListServicesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListServicesPages iterates over the pages of a ListServices operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListServices method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListServices operation.
// pageNum := 0
// err := client.ListServicesPages(params,
// func(page *ListServicesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ServiceDiscovery) ListServicesPages(input *ListServicesInput, fn func(*ListServicesOutput, bool) bool) error {
return c.ListServicesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListServicesPagesWithContext same as ListServicesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) ListServicesPagesWithContext(ctx aws.Context, input *ListServicesInput, fn func(*ListServicesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListServicesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListServicesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListServicesOutput), !p.HasNextPage())
}
return p.Err()
}
const opRegisterInstance = "RegisterInstance"
// RegisterInstanceRequest generates a "aws/request.Request" representing the
// client's request for the RegisterInstance operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See RegisterInstance for more information on using the RegisterInstance
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the RegisterInstanceRequest method.
// req, resp := client.RegisterInstanceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance
func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) (req *request.Request, output *RegisterInstanceOutput) {
op := &request.Operation{
Name: opRegisterInstance,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &RegisterInstanceInput{}
}
output = &RegisterInstanceOutput{}
req = c.newRequest(op, input, output)
return
}
// RegisterInstance API operation for AWS Cloud Map.
//
// 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 RegisterInstance
// request, the following occurs:
//
// * For each DNS record that you define in the service that is specified
// by ServiceId, a record is created or updated in the hosted zone that is
// associated with the corresponding namespace.
//
// * If the service includes HealthCheckConfig, a health check is created
// based on the settings in the health check configuration.
//
// * The health check, if any, is associated with each of the new or updated
// records.
//
// One RegisterInstance request must complete before you can submit another
// request and specify the same service ID and instance ID.
//
// For more information, see CreateService.
//
// When AWS Cloud Map receives a DNS query for the specified DNS name, it returns
// the applicable value:
//
// * If the health check is healthy: returns all the records
//
// * If the health check is unhealthy: returns the applicable value for the
// last healthy instance
//
// * If you didn't specify a health check configuration: returns all the
// records
//
// For the current limit on the number of instances that you can register using
// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html)
// in the AWS Cloud Map Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation RegisterInstance for usage and error information.
//
// Returned Error Codes:
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeResourceInUse "ResourceInUse"
// The specified resource can't be deleted because it contains other resources.
// For example, you can't delete a service that contains any instances.
//
// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded"
// The resource can't be created because you've reached the limit on the number
// of resources.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance
func (c *ServiceDiscovery) RegisterInstance(input *RegisterInstanceInput) (*RegisterInstanceOutput, error) {
req, out := c.RegisterInstanceRequest(input)
return out, req.Send()
}
// RegisterInstanceWithContext is the same as RegisterInstance with the addition of
// the ability to pass a context and additional request options.
//
// See RegisterInstance for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) RegisterInstanceWithContext(ctx aws.Context, input *RegisterInstanceInput, opts ...request.Option) (*RegisterInstanceOutput, error) {
req, out := c.RegisterInstanceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateInstanceCustomHealthStatus = "UpdateInstanceCustomHealthStatus"
// UpdateInstanceCustomHealthStatusRequest generates a "aws/request.Request" representing the
// client's request for the UpdateInstanceCustomHealthStatus operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateInstanceCustomHealthStatus for more information on using the UpdateInstanceCustomHealthStatus
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateInstanceCustomHealthStatusRequest method.
// req, resp := client.UpdateInstanceCustomHealthStatusRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus
func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusRequest(input *UpdateInstanceCustomHealthStatusInput) (req *request.Request, output *UpdateInstanceCustomHealthStatusOutput) {
op := &request.Operation{
Name: opUpdateInstanceCustomHealthStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateInstanceCustomHealthStatusInput{}
}
output = &UpdateInstanceCustomHealthStatusOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// UpdateInstanceCustomHealthStatus API operation for AWS Cloud Map.
//
// Submits a request to change the health status of a custom health check to
// healthy or unhealthy.
//
// You can use UpdateInstanceCustomHealthStatus to change the status only for
// custom health checks, which you define using HealthCheckCustomConfig when
// you create a service. You can't use it to change the status for Route 53
// health checks, which you define using HealthCheckConfig.
//
// For more information, see HealthCheckCustomConfig.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation UpdateInstanceCustomHealthStatus for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInstanceNotFound "InstanceNotFound"
// No instance exists with the specified ID, or the instance was recently registered,
// and information about the instance hasn't propagated yet.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// * ErrCodeCustomHealthNotFound "CustomHealthNotFound"
// The health check for the instance that is specified by ServiceId and InstanceId
// is not a custom health check.
//
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus
func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatus(input *UpdateInstanceCustomHealthStatusInput) (*UpdateInstanceCustomHealthStatusOutput, error) {
req, out := c.UpdateInstanceCustomHealthStatusRequest(input)
return out, req.Send()
}
// UpdateInstanceCustomHealthStatusWithContext is the same as UpdateInstanceCustomHealthStatus with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateInstanceCustomHealthStatus for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusWithContext(ctx aws.Context, input *UpdateInstanceCustomHealthStatusInput, opts ...request.Option) (*UpdateInstanceCustomHealthStatusOutput, error) {
req, out := c.UpdateInstanceCustomHealthStatusRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUpdateService = "UpdateService"
// UpdateServiceRequest generates a "aws/request.Request" representing the
// client's request for the UpdateService operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UpdateService for more information on using the UpdateService
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UpdateServiceRequest method.
// req, resp := client.UpdateServiceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService
func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Request, output *UpdateServiceOutput) {
op := &request.Operation{
Name: opUpdateService,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateServiceInput{}
}
output = &UpdateServiceOutput{}
req = c.newRequest(op, input, output)
return
}
// UpdateService API operation for AWS Cloud Map.
//
// Submits a request to perform the following operations:
//
// * Add or delete DnsRecords configurations
//
// * Update the TTL setting for existing DnsRecords configurations
//
// * Add, update, or delete HealthCheckConfig for a specified service
//
// For public and private DNS namespaces, you must specify all DnsRecords configurations
// (and, optionally, HealthCheckConfig) that you want to appear in the updated
// service. Any current configurations that don't appear in an UpdateService
// request are deleted.
//
// When you update the TTL setting for a service, AWS Cloud Map also updates
// the corresponding settings in all the records and health checks that were
// created by using the specified service.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for AWS Cloud Map's
// API operation UpdateService for usage and error information.
//
// Returned Error Codes:
// * ErrCodeDuplicateRequest "DuplicateRequest"
// The operation is already in progress.
//
// * ErrCodeInvalidInput "InvalidInput"
// One or more specified values aren't valid. For example, a required value
// might be missing, a numeric value might be outside the allowed range, or
// a string value might exceed length constraints.
//
// * ErrCodeServiceNotFound "ServiceNotFound"
// No service exists with the specified ID.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService
func (c *ServiceDiscovery) UpdateService(input *UpdateServiceInput) (*UpdateServiceOutput, error) {
req, out := c.UpdateServiceRequest(input)
return out, req.Send()
}
// UpdateServiceWithContext is the same as UpdateService with the addition of
// the ability to pass a context and additional request options.
//
// See UpdateService for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ServiceDiscovery) UpdateServiceWithContext(ctx aws.Context, input *UpdateServiceInput, opts ...request.Option) (*UpdateServiceOutput, error) {
req, out := c.UpdateServiceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
type CreateHttpNamespaceInput struct {
_ struct{} `type:"structure"`
// A unique string that identifies the request and that allows failed CreateHttpNamespace
// requests to be retried without the risk of executing the operation twice.
// CreatorRequestId can be any unique string, for example, a date/time stamp.
CreatorRequestId *string `type:"string" idempotencyToken:"true"`
// A description for the namespace.
Description *string `type:"string"`
// The name that you want to assign to this namespace.
//
// Name is a required field
Name *string `type:"string" required:"true"`
}
// String returns the string representation
func (s CreateHttpNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHttpNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateHttpNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateHttpNamespaceInput"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *CreateHttpNamespaceInput) SetCreatorRequestId(v string) *CreateHttpNamespaceInput {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *CreateHttpNamespaceInput) SetDescription(v string) *CreateHttpNamespaceInput {
s.Description = &v
return s
}
// SetName sets the Name field's value.
func (s *CreateHttpNamespaceInput) SetName(v string) *CreateHttpNamespaceInput {
s.Name = &v
return s
}
type CreateHttpNamespaceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s CreateHttpNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateHttpNamespaceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *CreateHttpNamespaceOutput) SetOperationId(v string) *CreateHttpNamespaceOutput {
s.OperationId = &v
return s
}
type CreatePrivateDnsNamespaceInput struct {
_ struct{} `type:"structure"`
// A unique string that identifies the request and that allows failed CreatePrivateDnsNamespace
// requests to be retried without the risk of executing the operation twice.
// CreatorRequestId can be any unique string, for example, a date/time stamp.
CreatorRequestId *string `type:"string" idempotencyToken:"true"`
// A description for the namespace.
Description *string `type:"string"`
// The name that you want to assign to this namespace. When you create a private
// DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private
// hosted zone that has the same name as the namespace.
//
// Name is a required field
Name *string `type:"string" required:"true"`
// The ID of the Amazon VPC that you want to associate the namespace with.
//
// Vpc is a required field
Vpc *string `type:"string" required:"true"`
}
// String returns the string representation
func (s CreatePrivateDnsNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreatePrivateDnsNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreatePrivateDnsNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreatePrivateDnsNamespaceInput"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Vpc == nil {
invalidParams.Add(request.NewErrParamRequired("Vpc"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *CreatePrivateDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePrivateDnsNamespaceInput {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *CreatePrivateDnsNamespaceInput) SetDescription(v string) *CreatePrivateDnsNamespaceInput {
s.Description = &v
return s
}
// SetName sets the Name field's value.
func (s *CreatePrivateDnsNamespaceInput) SetName(v string) *CreatePrivateDnsNamespaceInput {
s.Name = &v
return s
}
// SetVpc sets the Vpc field's value.
func (s *CreatePrivateDnsNamespaceInput) SetVpc(v string) *CreatePrivateDnsNamespaceInput {
s.Vpc = &v
return s
}
type CreatePrivateDnsNamespaceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s CreatePrivateDnsNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreatePrivateDnsNamespaceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *CreatePrivateDnsNamespaceOutput) SetOperationId(v string) *CreatePrivateDnsNamespaceOutput {
s.OperationId = &v
return s
}
type CreatePublicDnsNamespaceInput struct {
_ struct{} `type:"structure"`
// A unique string that identifies the request and that allows failed CreatePublicDnsNamespace
// requests to be retried without the risk of executing the operation twice.
// CreatorRequestId can be any unique string, for example, a date/time stamp.
CreatorRequestId *string `type:"string" idempotencyToken:"true"`
// A description for the namespace.
Description *string `type:"string"`
// The name that you want to assign to this namespace.
//
// Name is a required field
Name *string `type:"string" required:"true"`
}
// String returns the string representation
func (s CreatePublicDnsNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreatePublicDnsNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreatePublicDnsNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreatePublicDnsNamespaceInput"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *CreatePublicDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePublicDnsNamespaceInput {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *CreatePublicDnsNamespaceInput) SetDescription(v string) *CreatePublicDnsNamespaceInput {
s.Description = &v
return s
}
// SetName sets the Name field's value.
func (s *CreatePublicDnsNamespaceInput) SetName(v string) *CreatePublicDnsNamespaceInput {
s.Name = &v
return s
}
type CreatePublicDnsNamespaceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s CreatePublicDnsNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreatePublicDnsNamespaceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *CreatePublicDnsNamespaceOutput) SetOperationId(v string) *CreatePublicDnsNamespaceOutput {
s.OperationId = &v
return s
}
type CreateServiceInput struct {
_ struct{} `type:"structure"`
// A unique string that identifies the request and that allows failed CreateService
// requests to be retried without the risk of executing the operation twice.
// CreatorRequestId can be any unique string, for example, a date/time stamp.
CreatorRequestId *string `type:"string" idempotencyToken:"true"`
// A description for the service.
Description *string `type:"string"`
// A complex type that contains information about the Amazon Route 53 records
// that you want AWS Cloud Map to create when you register an instance.
DnsConfig *DnsConfig `type:"structure"`
// Public DNS namespaces only. A complex type that contains settings for an
// optional Route 53 health check. If you specify settings for a health check,
// AWS Cloud Map associates the health check with all the Route 53 DNS records
// that you specify in DnsConfig.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
//
// For information about the charges for health checks, see AWS Cloud Map Pricing
// (http://aws.amazon.com/cloud-map/pricing/).
HealthCheckConfig *HealthCheckConfig `type:"structure"`
// A complex type that contains information about an optional custom health
// check.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"`
// The name that you want to assign to the service.
//
// Name is a required field
Name *string `type:"string" required:"true"`
// The ID of the namespace that you want to use to create the service.
NamespaceId *string `type:"string"`
}
// String returns the string representation
func (s CreateServiceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateServiceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateServiceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.DnsConfig != nil {
if err := s.DnsConfig.Validate(); err != nil {
invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams))
}
}
if s.HealthCheckConfig != nil {
if err := s.HealthCheckConfig.Validate(); err != nil {
invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams))
}
}
if s.HealthCheckCustomConfig != nil {
if err := s.HealthCheckCustomConfig.Validate(); err != nil {
invalidParams.AddNested("HealthCheckCustomConfig", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *CreateServiceInput) SetCreatorRequestId(v string) *CreateServiceInput {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *CreateServiceInput) SetDescription(v string) *CreateServiceInput {
s.Description = &v
return s
}
// SetDnsConfig sets the DnsConfig field's value.
func (s *CreateServiceInput) SetDnsConfig(v *DnsConfig) *CreateServiceInput {
s.DnsConfig = v
return s
}
// SetHealthCheckConfig sets the HealthCheckConfig field's value.
func (s *CreateServiceInput) SetHealthCheckConfig(v *HealthCheckConfig) *CreateServiceInput {
s.HealthCheckConfig = v
return s
}
// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value.
func (s *CreateServiceInput) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *CreateServiceInput {
s.HealthCheckCustomConfig = v
return s
}
// SetName sets the Name field's value.
func (s *CreateServiceInput) SetName(v string) *CreateServiceInput {
s.Name = &v
return s
}
// SetNamespaceId sets the NamespaceId field's value.
func (s *CreateServiceInput) SetNamespaceId(v string) *CreateServiceInput {
s.NamespaceId = &v
return s
}
type CreateServiceOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about the new service.
Service *Service `type:"structure"`
}
// String returns the string representation
func (s CreateServiceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateServiceOutput) GoString() string {
return s.String()
}
// SetService sets the Service field's value.
func (s *CreateServiceOutput) SetService(v *Service) *CreateServiceOutput {
s.Service = v
return s
}
type DeleteNamespaceInput struct {
_ struct{} `type:"structure"`
// The ID of the namespace that you want to delete.
//
// Id is a required field
Id *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteNamespaceInput"}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetId sets the Id field's value.
func (s *DeleteNamespaceInput) SetId(v string) *DeleteNamespaceInput {
s.Id = &v
return s
}
type DeleteNamespaceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s DeleteNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteNamespaceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *DeleteNamespaceOutput) SetOperationId(v string) *DeleteNamespaceOutput {
s.OperationId = &v
return s
}
type DeleteServiceInput struct {
_ struct{} `type:"structure"`
// The ID of the service that you want to delete.
//
// Id is a required field
Id *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteServiceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteServiceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteServiceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteServiceInput"}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetId sets the Id field's value.
func (s *DeleteServiceInput) SetId(v string) *DeleteServiceInput {
s.Id = &v
return s
}
type DeleteServiceOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteServiceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteServiceOutput) GoString() string {
return s.String()
}
type DeregisterInstanceInput struct {
_ struct{} `type:"structure"`
// The value that you specified for Id in the RegisterInstance request.
//
// InstanceId is a required field
InstanceId *string `type:"string" required:"true"`
// The ID of the service that the instance is associated with.
//
// ServiceId is a required field
ServiceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeregisterInstanceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeregisterInstanceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeregisterInstanceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeregisterInstanceInput"}
if s.InstanceId == nil {
invalidParams.Add(request.NewErrParamRequired("InstanceId"))
}
if s.ServiceId == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetInstanceId sets the InstanceId field's value.
func (s *DeregisterInstanceInput) SetInstanceId(v string) *DeregisterInstanceInput {
s.InstanceId = &v
return s
}
// SetServiceId sets the ServiceId field's value.
func (s *DeregisterInstanceInput) SetServiceId(v string) *DeregisterInstanceInput {
s.ServiceId = &v
return s
}
type DeregisterInstanceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// For more information, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s DeregisterInstanceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeregisterInstanceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *DeregisterInstanceOutput) SetOperationId(v string) *DeregisterInstanceOutput {
s.OperationId = &v
return s
}
type DiscoverInstancesInput struct {
_ struct{} `type:"structure"`
// The health status of the instances that you want to discover.
HealthStatus *string `type:"string" enum:"HealthStatusFilter"`
// The maximum number of instances that you want Cloud Map to return in the
// response to a DiscoverInstances request. If you don't specify a value for
// MaxResults, Cloud Map returns up to 100 instances.
MaxResults *int64 `min:"1" type:"integer"`
// The name of the namespace that you specified when you registered the instance.
//
// NamespaceName is a required field
NamespaceName *string `type:"string" required:"true"`
// A string map that contains attributes with values that you can use to filter
// instances by any custom attribute that you specified when you registered
// the instance. Only instances that match all the specified key/value pairs
// will be returned.
QueryParameters map[string]*string `type:"map"`
// The name of the service that you specified when you registered the instance.
//
// ServiceName is a required field
ServiceName *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DiscoverInstancesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DiscoverInstancesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DiscoverInstancesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DiscoverInstancesInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.NamespaceName == nil {
invalidParams.Add(request.NewErrParamRequired("NamespaceName"))
}
if s.ServiceName == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceName"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetHealthStatus sets the HealthStatus field's value.
func (s *DiscoverInstancesInput) SetHealthStatus(v string) *DiscoverInstancesInput {
s.HealthStatus = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *DiscoverInstancesInput) SetMaxResults(v int64) *DiscoverInstancesInput {
s.MaxResults = &v
return s
}
// SetNamespaceName sets the NamespaceName field's value.
func (s *DiscoverInstancesInput) SetNamespaceName(v string) *DiscoverInstancesInput {
s.NamespaceName = &v
return s
}
// SetQueryParameters sets the QueryParameters field's value.
func (s *DiscoverInstancesInput) SetQueryParameters(v map[string]*string) *DiscoverInstancesInput {
s.QueryParameters = v
return s
}
// SetServiceName sets the ServiceName field's value.
func (s *DiscoverInstancesInput) SetServiceName(v string) *DiscoverInstancesInput {
s.ServiceName = &v
return s
}
type DiscoverInstancesOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains one HttpInstanceSummary for each registered
// instance.
Instances []*HttpInstanceSummary `type:"list"`
}
// String returns the string representation
func (s DiscoverInstancesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DiscoverInstancesOutput) GoString() string {
return s.String()
}
// SetInstances sets the Instances field's value.
func (s *DiscoverInstancesOutput) SetInstances(v []*HttpInstanceSummary) *DiscoverInstancesOutput {
s.Instances = v
return s
}
// A complex type that contains information about the Amazon Route 53 DNS records
// that you want AWS Cloud Map to create when you register an instance.
type DnsConfig struct {
_ struct{} `type:"structure"`
// An array that contains one DnsRecord object for each Route 53 DNS record
// that you want AWS Cloud Map to create when you register an instance.
//
// DnsRecords is a required field
DnsRecords []*DnsRecord `type:"list" required:"true"`
// The ID of the namespace to use for DNS configuration.
//
// Deprecated: Top level attribute in request should be used to reference namespace-id
NamespaceId *string `deprecated:"true" type:"string"`
// The routing policy that you want to apply to all Route 53 DNS records that
// AWS Cloud Map creates when you register an instance and specify this service.
//
// If you want to use this service to register instances that create alias records,
// specify WEIGHTED for the routing policy.
//
// You can specify the following values:
//
// MULTIVALUE
//
// If you define a health check for the service and the health check is healthy,
// Route 53 returns the applicable value for up to eight instances.
//
// For example, suppose the service includes configurations for one A record
// and a health check, and you use the service to register 10 instances. Route
// 53 responds to DNS queries with IP addresses for up to eight healthy instances.
// If fewer than eight instances are healthy, Route 53 responds to every DNS
// query with the IP addresses for all of the healthy instances.
//
// If you don't define a health check for the service, Route 53 assumes that
// all instances are healthy and returns the values for up to eight instances.
//
// For more information about the multivalue routing policy, see Multivalue
// Answer Routing (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue)
// in the Route 53 Developer Guide.
//
// WEIGHTED
//
// Route 53 returns the applicable value from one randomly selected instance
// from among the instances that you registered using the same service. Currently,
// all records have the same weight, so you can't route more or less traffic
// to any instances.
//
// For example, suppose the service includes configurations for one A record
// and a health check, and you use the service to register 10 instances. Route
// 53 responds to DNS queries with the IP address for one randomly selected
// instance from among the healthy instances. If no instances are healthy, Route
// 53 responds to DNS queries as if all of the instances were healthy.
//
// If you don't define a health check for the service, Route 53 assumes that
// all instances are healthy and returns the applicable value for one randomly
// selected instance.
//
// For more information about the weighted routing policy, see Weighted Routing
// (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted)
// in the Route 53 Developer Guide.
RoutingPolicy *string `type:"string" enum:"RoutingPolicy"`
}
// String returns the string representation
func (s DnsConfig) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DnsConfig) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DnsConfig) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DnsConfig"}
if s.DnsRecords == nil {
invalidParams.Add(request.NewErrParamRequired("DnsRecords"))
}
if s.DnsRecords != nil {
for i, v := range s.DnsRecords {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDnsRecords sets the DnsRecords field's value.
func (s *DnsConfig) SetDnsRecords(v []*DnsRecord) *DnsConfig {
s.DnsRecords = v
return s
}
// SetNamespaceId sets the NamespaceId field's value.
func (s *DnsConfig) SetNamespaceId(v string) *DnsConfig {
s.NamespaceId = &v
return s
}
// SetRoutingPolicy sets the RoutingPolicy field's value.
func (s *DnsConfig) SetRoutingPolicy(v string) *DnsConfig {
s.RoutingPolicy = &v
return s
}
// A complex type that contains information about changes to the Route 53 DNS
// records that AWS Cloud Map creates when you register an instance.
type DnsConfigChange struct {
_ struct{} `type:"structure"`
// An array that contains one DnsRecord object for each Route 53 record that
// you want AWS Cloud Map to create when you register an instance.
//
// DnsRecords is a required field
DnsRecords []*DnsRecord `type:"list" required:"true"`
}
// String returns the string representation
func (s DnsConfigChange) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DnsConfigChange) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DnsConfigChange) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DnsConfigChange"}
if s.DnsRecords == nil {
invalidParams.Add(request.NewErrParamRequired("DnsRecords"))
}
if s.DnsRecords != nil {
for i, v := range s.DnsRecords {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDnsRecords sets the DnsRecords field's value.
func (s *DnsConfigChange) SetDnsRecords(v []*DnsRecord) *DnsConfigChange {
s.DnsRecords = v
return s
}
// A complex type that contains the ID for the Route 53 hosted zone that AWS
// Cloud Map creates when you create a namespace.
type DnsProperties struct {
_ struct{} `type:"structure"`
// The ID for the Route 53 hosted zone that AWS Cloud Map creates when you create
// a namespace.
HostedZoneId *string `type:"string"`
}
// String returns the string representation
func (s DnsProperties) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DnsProperties) GoString() string {
return s.String()
}
// SetHostedZoneId sets the HostedZoneId field's value.
func (s *DnsProperties) SetHostedZoneId(v string) *DnsProperties {
s.HostedZoneId = &v
return s
}
// A complex type that contains information about the Route 53 DNS records that
// you want AWS Cloud Map to create when you register an instance.
type DnsRecord struct {
_ struct{} `type:"structure"`
// The amount of time, in seconds, that you want DNS resolvers to cache the
// settings for this record.
//
// Alias records don't include a TTL because Route 53 uses the TTL for the AWS
// resource that an alias record routes traffic to. If you include the AWS_ALIAS_DNS_NAME
// attribute when you submit a RegisterInstance request, the TTL value is ignored.
// Always specify a TTL for the service; you can use a service to register instances
// that create either alias or non-alias records.
//
// TTL is a required field
TTL *int64 `type:"long" required:"true"`
// The type of the resource, which indicates the type of value that Route 53
// returns in response to DNS queries.
//
// Note the following:
//
// * A, AAAA, and SRV records: You can specify settings for a maximum of
// one A, one AAAA, and one SRV record. You can specify them in any combination.
//
// * CNAME records: If you specify CNAME for Type, you can't define any other
// records. This is a limitation of DNS: you can't create a CNAME record
// and any other type of record that has the same name as a CNAME record.
//
// * Alias records: If you want AWS Cloud Map to create a Route 53 alias
// record when you register an instance, specify A or AAAA for Type.
//
// * All records: You specify settings other than TTL and Type when you register
// an instance.
//
// The following values are supported:
//
// A
//
// Route 53 returns the IP address of the resource in IPv4 format, such as 192.0.2.44.
//
// AAAA
//
// Route 53 returns the IP address of the resource in IPv6 format, such as 2001:0db8:85a3:0000:0000:abcd:0001:2345.
//
// CNAME
//
// Route 53 returns the domain name of the resource, such as www.example.com.
// Note the following:
//
// * You specify the domain name that you want to route traffic to when you
// register an instance. For more information, see RegisterInstanceRequest$Attributes.
//
// * You must specify WEIGHTED for the value of RoutingPolicy.
//
// * You can't specify both CNAME for Type and settings for HealthCheckConfig.
// If you do, the request will fail with an InvalidInput error.
//
// SRV
//
// Route 53 returns the value for an SRV record. The value for an SRV record
// uses the following values:
//
// priority weight port service-hostname
//
// Note the following about the values:
//
// * The values of priority and weight are both set to 1 and can't be changed.
//
//
// * The value of port comes from the value that you specify for the AWS_INSTANCE_PORT
// attribute when you submit a RegisterInstance request.
//
// * The value of service-hostname is a concatenation of the following values:
//
// The value that you specify for InstanceId when you register an instance.
//
// The name of the service.
//
// The name of the namespace.
//
// For example, if the value of InstanceId is test, the name of the service
// is backend, and the name of the namespace is example.com, the value of
// service-hostname is:
//
// test.backend.example.com
//
// If you specify settings for an SRV record and if you specify values for AWS_INSTANCE_IPV4,
// AWS_INSTANCE_IPV6, or both in the RegisterInstance request, AWS Cloud Map
// automatically creates A and/or AAAA records that have the same name as the
// value of service-hostname in the SRV record. You can ignore these records.
//
// Type is a required field
Type *string `type:"string" required:"true" enum:"RecordType"`
}
// String returns the string representation
func (s DnsRecord) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DnsRecord) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DnsRecord) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DnsRecord"}
if s.TTL == nil {
invalidParams.Add(request.NewErrParamRequired("TTL"))
}
if s.Type == nil {
invalidParams.Add(request.NewErrParamRequired("Type"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetTTL sets the TTL field's value.
func (s *DnsRecord) SetTTL(v int64) *DnsRecord {
s.TTL = &v
return s
}
// SetType sets the Type field's value.
func (s *DnsRecord) SetType(v string) *DnsRecord {
s.Type = &v
return s
}
type GetInstanceInput struct {
_ struct{} `type:"structure"`
// The ID of the instance that you want to get information about.
//
// InstanceId is a required field
InstanceId *string `type:"string" required:"true"`
// The ID of the service that the instance is associated with.
//
// ServiceId is a required field
ServiceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetInstanceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetInstanceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetInstanceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"}
if s.InstanceId == nil {
invalidParams.Add(request.NewErrParamRequired("InstanceId"))
}
if s.ServiceId == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetInstanceId sets the InstanceId field's value.
func (s *GetInstanceInput) SetInstanceId(v string) *GetInstanceInput {
s.InstanceId = &v
return s
}
// SetServiceId sets the ServiceId field's value.
func (s *GetInstanceInput) SetServiceId(v string) *GetInstanceInput {
s.ServiceId = &v
return s
}
type GetInstanceOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about a specified instance.
Instance *Instance `type:"structure"`
}
// String returns the string representation
func (s GetInstanceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetInstanceOutput) GoString() string {
return s.String()
}
// SetInstance sets the Instance field's value.
func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput {
s.Instance = v
return s
}
type GetInstancesHealthStatusInput struct {
_ struct{} `type:"structure"`
// An array that contains the IDs of all the instances that you want to get
// the health status for.
//
// If you omit Instances, AWS Cloud Map returns the health status for all the
// instances that are associated with the specified service.
//
// To get the IDs for the instances that you've registered by using a specified
// service, submit a ListInstances request.
Instances []*string `min:"1" type:"list"`
// The maximum number of instances that you want AWS Cloud Map to return in
// the response to a GetInstancesHealthStatus request. If you don't specify
// a value for MaxResults, AWS Cloud Map returns up to 100 instances.
MaxResults *int64 `min:"1" type:"integer"`
// For the first GetInstancesHealthStatus request, omit this value.
//
// If more than MaxResults instances match the specified criteria, you can submit
// another GetInstancesHealthStatus request to get the next group of results.
// Specify the value of NextToken from the previous response in the next request.
NextToken *string `type:"string"`
// The ID of the service that the instance is associated with.
//
// ServiceId is a required field
ServiceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetInstancesHealthStatusInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetInstancesHealthStatusInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetInstancesHealthStatusInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetInstancesHealthStatusInput"}
if s.Instances != nil && len(s.Instances) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Instances", 1))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.ServiceId == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetInstances sets the Instances field's value.
func (s *GetInstancesHealthStatusInput) SetInstances(v []*string) *GetInstancesHealthStatusInput {
s.Instances = v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *GetInstancesHealthStatusInput) SetMaxResults(v int64) *GetInstancesHealthStatusInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *GetInstancesHealthStatusInput) SetNextToken(v string) *GetInstancesHealthStatusInput {
s.NextToken = &v
return s
}
// SetServiceId sets the ServiceId field's value.
func (s *GetInstancesHealthStatusInput) SetServiceId(v string) *GetInstancesHealthStatusInput {
s.ServiceId = &v
return s
}
type GetInstancesHealthStatusOutput struct {
_ struct{} `type:"structure"`
// If more than MaxResults instances match the specified criteria, you can submit
// another GetInstancesHealthStatus request to get the next group of results.
// Specify the value of NextToken from the previous response in the next request.
NextToken *string `type:"string"`
// A complex type that contains the IDs and the health status of the instances
// that you specified in the GetInstancesHealthStatus request.
Status map[string]*string `type:"map"`
}
// String returns the string representation
func (s GetInstancesHealthStatusOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetInstancesHealthStatusOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *GetInstancesHealthStatusOutput) SetNextToken(v string) *GetInstancesHealthStatusOutput {
s.NextToken = &v
return s
}
// SetStatus sets the Status field's value.
func (s *GetInstancesHealthStatusOutput) SetStatus(v map[string]*string) *GetInstancesHealthStatusOutput {
s.Status = v
return s
}
type GetNamespaceInput struct {
_ struct{} `type:"structure"`
// The ID of the namespace that you want to get information about.
//
// Id is a required field
Id *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetNamespaceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetNamespaceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetNamespaceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetNamespaceInput"}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetId sets the Id field's value.
func (s *GetNamespaceInput) SetId(v string) *GetNamespaceInput {
s.Id = &v
return s
}
type GetNamespaceOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about the specified namespace.
Namespace *Namespace `type:"structure"`
}
// String returns the string representation
func (s GetNamespaceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetNamespaceOutput) GoString() string {
return s.String()
}
// SetNamespace sets the Namespace field's value.
func (s *GetNamespaceOutput) SetNamespace(v *Namespace) *GetNamespaceOutput {
s.Namespace = v
return s
}
type GetOperationInput struct {
_ struct{} `type:"structure"`
// The ID of the operation that you want to get more information about.
//
// OperationId is a required field
OperationId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetOperationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetOperationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetOperationInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"}
if s.OperationId == nil {
invalidParams.Add(request.NewErrParamRequired("OperationId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetOperationId sets the OperationId field's value.
func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput {
s.OperationId = &v
return s
}
type GetOperationOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about the operation.
Operation *Operation `type:"structure"`
}
// String returns the string representation
func (s GetOperationOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetOperationOutput) GoString() string {
return s.String()
}
// SetOperation sets the Operation field's value.
func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput {
s.Operation = v
return s
}
type GetServiceInput struct {
_ struct{} `type:"structure"`
// The ID of the service that you want to get settings for.
//
// Id is a required field
Id *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetServiceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetServiceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetServiceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetServiceInput"}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetId sets the Id field's value.
func (s *GetServiceInput) SetId(v string) *GetServiceInput {
s.Id = &v
return s
}
type GetServiceOutput struct {
_ struct{} `type:"structure"`
// A complex type that contains information about the service.
Service *Service `type:"structure"`
}
// String returns the string representation
func (s GetServiceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetServiceOutput) GoString() string {
return s.String()
}
// SetService sets the Service field's value.
func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput {
s.Service = v
return s
}
// Public DNS namespaces only. A complex type that contains settings for an
// optional health check. If you specify settings for a health check, AWS Cloud
// Map associates the health check with the records that you specify in DnsConfig.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
//
// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
// For information about pricing for health checks, see Amazon Route 53 Pricing
// (http://aws.amazon.com/route53/pricing/).
//
// Note the following about configuring health checks.
//
// A and AAAA records
//
// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud
// Map creates a health check that uses the IPv4 address to check the health
// of the resource. If the endpoint that is specified by the IPv4 address is
// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy.
//
// CNAME records
//
// You can't specify settings for HealthCheckConfig when the DNSConfig includes
// CNAME for the value of Type. If you do, the CreateService request will fail
// with an InvalidInput error.
//
// Request interval
//
// A Route 53 health checker in each health-checking region sends a health check
// request to an endpoint every 30 seconds. On average, your endpoint receives
// a health check request about every two seconds. However, health checkers
// don't coordinate with one another, so you'll sometimes see several requests
// per second followed by a few seconds with no health checks at all.
//
// Health checking regions
//
// Health checkers perform checks from all Route 53 health-checking regions.
// For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions).
//
// Alias records
//
// When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute,
// AWS Cloud Map creates a Route 53 alias record. Note the following:
//
// * Route 53 automatically sets EvaluateTargetHealth to true for alias records.
// When EvaluateTargetHealth is true, the alias record inherits the health
// of the referenced AWS resource. such as an ELB load balancer. For more
// information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth).
//
// * If you include HealthCheckConfig and then use the service to register
// an instance that creates an alias record, Route 53 doesn't create the
// health check.
//
// Charges for health checks
//
// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
// For information about pricing for health checks, see Amazon Route 53 Pricing
// (http://aws.amazon.com/route53/pricing/).
type HealthCheckConfig struct {
_ struct{} `type:"structure"`
// The number of consecutive health checks that an endpoint must pass or fail
// for Route 53 to change the current status of the endpoint from unhealthy
// to healthy or vice versa. For more information, see How Route 53 Determines
// Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html)
// in the Route 53 Developer Guide.
FailureThreshold *int64 `min:"1" type:"integer"`
// The path that you want Route 53 to request when performing health checks.
// The path can be any value for which your endpoint will return an HTTP status
// code of 2xx or 3xx when the endpoint is healthy, such as the file /docs/route53-health-check.html.
// Route 53 automatically adds the DNS name for the service. If you don't specify
// a value for ResourcePath, the default value is /.
//
// If you specify TCP for Type, you must not specify a value for ResourcePath.
ResourcePath *string `type:"string"`
// The type of health check that you want to create, which indicates how Route
// 53 determines whether an endpoint is healthy.
//
// You can't change the value of Type after you create a health check.
//
// You can create the following types of health checks:
//
// * HTTP: Route 53 tries to establish a TCP connection. If successful, Route
// 53 submits an HTTP request and waits for an HTTP status code of 200 or
// greater and less than 400.
//
// * HTTPS: Route 53 tries to establish a TCP connection. If successful,
// Route 53 submits an HTTPS request and waits for an HTTP status code of
// 200 or greater and less than 400.
//
// If you specify HTTPS for the value of Type, the endpoint must support TLS
// v1.0 or later.
//
// * TCP: Route 53 tries to establish a TCP connection.
//
// If you specify TCP for Type, don't specify a value for ResourcePath.
//
// For more information, see How Route 53 Determines Whether an Endpoint Is
// Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html)
// in the Route 53 Developer Guide.
//
// Type is a required field
Type *string `type:"string" required:"true" enum:"HealthCheckType"`
}
// String returns the string representation
func (s HealthCheckConfig) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s HealthCheckConfig) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *HealthCheckConfig) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "HealthCheckConfig"}
if s.FailureThreshold != nil && *s.FailureThreshold < 1 {
invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1))
}
if s.Type == nil {
invalidParams.Add(request.NewErrParamRequired("Type"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFailureThreshold sets the FailureThreshold field's value.
func (s *HealthCheckConfig) SetFailureThreshold(v int64) *HealthCheckConfig {
s.FailureThreshold = &v
return s
}
// SetResourcePath sets the ResourcePath field's value.
func (s *HealthCheckConfig) SetResourcePath(v string) *HealthCheckConfig {
s.ResourcePath = &v
return s
}
// SetType sets the Type field's value.
func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig {
s.Type = &v
return s
}
// A complex type that contains information about an optional custom health
// check. A custom health check, which requires that you use a third-party health
// checker to evaluate the health of your resources, is useful in the following
// circumstances:
//
// * You can't use a health check that is defined by HealthCheckConfig because
// the resource isn't available over the internet. For example, you can use
// a custom health check when the instance is in an Amazon VPC. (To check
// the health of resources in a VPC, the health checker must also be in the
// VPC.)
//
// * You want to use a third-party health checker regardless of where your
// resources are.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
//
// To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus
// request. Cloud Map doesn't monitor the status of the resource, it just keeps
// a record of the status specified in the most recent UpdateInstanceCustomHealthStatus
// request.
//
// Here's how custom health checks work:
//
// You create a service and specify a value for FailureThreshold.
//
// The failure threshold indicates the number of 30-second intervals you want
// AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus
// request and the time that AWS Cloud Map stops routing internet traffic to
// the corresponding resource.
//
// You register an instance.
//
// You configure a third-party health checker to monitor the resource that is
// associated with the new instance.
//
// AWS Cloud Map doesn't check the health of the resource directly.
//
// The third-party health-checker determines that the resource is unhealthy
// and notifies your application.
//
// Your application submits an UpdateInstanceCustomHealthStatus request.
//
// AWS Cloud Map waits for (FailureThreshold x 30) seconds.
//
// If another UpdateInstanceCustomHealthStatus request doesn't arrive during
// that time to change the status back to healthy, AWS Cloud Map stops routing
// traffic to the resource.
//
// Note the following about configuring custom health checks.
type HealthCheckCustomConfig struct {
_ struct{} `type:"structure"`
// The number of 30-second intervals that you want Cloud Map to wait after receiving
// an UpdateInstanceCustomHealthStatus request before it changes the health
// status of a service instance. For example, suppose you specify a value of
// 2 for FailureTheshold, and then your application sends an UpdateInstanceCustomHealthStatus
// request. Cloud Map waits for approximately 60 seconds (2 x 30) before changing
// the status of the service instance based on that request.
//
// Sending a second or subsequent UpdateInstanceCustomHealthStatus request with
// the same value before FailureThreshold x 30 seconds has passed doesn't accelerate
// the change. Cloud Map still waits FailureThreshold x 30 seconds after the
// first request to make the change.
FailureThreshold *int64 `min:"1" type:"integer"`
}
// String returns the string representation
func (s HealthCheckCustomConfig) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s HealthCheckCustomConfig) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *HealthCheckCustomConfig) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "HealthCheckCustomConfig"}
if s.FailureThreshold != nil && *s.FailureThreshold < 1 {
invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFailureThreshold sets the FailureThreshold field's value.
func (s *HealthCheckCustomConfig) SetFailureThreshold(v int64) *HealthCheckCustomConfig {
s.FailureThreshold = &v
return s
}
// In a response to a DiscoverInstance request, HttpInstanceSummary contains
// information about one instance that matches the values that you specified
// in the request.
type HttpInstanceSummary struct {
_ struct{} `type:"structure"`
// If you included any attributes when you registered the instance, the values
// of those attributes.
Attributes map[string]*string `type:"map"`
// If you configured health checking in the service, the current health status
// of the service instance.
HealthStatus *string `type:"string" enum:"HealthStatus"`
// The ID of an instance that matches the values that you specified in the request.
InstanceId *string `type:"string"`
// The name of the namespace that you specified when you registered the instance.
NamespaceName *string `type:"string"`
// The name of the service that you specified when you registered the instance.
ServiceName *string `type:"string"`
}
// String returns the string representation
func (s HttpInstanceSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s HttpInstanceSummary) GoString() string {
return s.String()
}
// SetAttributes sets the Attributes field's value.
func (s *HttpInstanceSummary) SetAttributes(v map[string]*string) *HttpInstanceSummary {
s.Attributes = v
return s
}
// SetHealthStatus sets the HealthStatus field's value.
func (s *HttpInstanceSummary) SetHealthStatus(v string) *HttpInstanceSummary {
s.HealthStatus = &v
return s
}
// SetInstanceId sets the InstanceId field's value.
func (s *HttpInstanceSummary) SetInstanceId(v string) *HttpInstanceSummary {
s.InstanceId = &v
return s
}
// SetNamespaceName sets the NamespaceName field's value.
func (s *HttpInstanceSummary) SetNamespaceName(v string) *HttpInstanceSummary {
s.NamespaceName = &v
return s
}
// SetServiceName sets the ServiceName field's value.
func (s *HttpInstanceSummary) SetServiceName(v string) *HttpInstanceSummary {
s.ServiceName = &v
return s
}
// A complex type that contains the name of an HTTP namespace.
type HttpProperties struct {
_ struct{} `type:"structure"`
// The name of an HTTP namespace.
HttpName *string `type:"string"`
}
// String returns the string representation
func (s HttpProperties) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s HttpProperties) GoString() string {
return s.String()
}
// SetHttpName sets the HttpName field's value.
func (s *HttpProperties) SetHttpName(v string) *HttpProperties {
s.HttpName = &v
return s
}
// A complex type that contains information about an instance that AWS Cloud
// Map creates when you submit a RegisterInstance request.
type Instance struct {
_ struct{} `type:"structure"`
// A string map that contains the following information for the service that
// you specify in ServiceId:
//
// * The attributes that apply to the records that are defined in the service.
//
//
// * For each attribute, the applicable value.
//
// Supported attribute keys include the following:
//
// AWS_ALIAS_DNS_NAME
//
// If you want AWS Cloud Map to create a Route 53 alias record that routes traffic
// to an Elastic Load Balancing load balancer, specify the DNS name that is
// associated with the load balancer. For information about how to get the DNS
// name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html).
//
// Note the following:
//
// The configuration for the service that is specified by ServiceId must include
// settings for an A record, an AAAA record, or both.
//
// * In the service that is specified by ServiceId, the value of RoutingPolicy
// must be WEIGHTED.
//
// * If the service that is specified by ServiceId includes HealthCheckConfig
// settings, AWS Cloud Map will create the health check, but it won't associate
// the health check with the alias record.
//
// * Auto naming currently doesn't support creating alias records that route
// traffic to AWS resources other than ELB load balancers.
//
// * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values
// for any of the AWS_INSTANCE attributes.
//
// AWS_INSTANCE_CNAME
//
// If the service configuration includes a CNAME record, the domain name that
// you want Route 53 to return in response to DNS queries, for example, example.com.
//
// This value is required if the service specified by ServiceIdincludes settings for an CNAME record.
//
// AWS_INSTANCE_IPV4
//
// If the service configuration includes an A record, the IPv4 address that
// you want Route 53 to return in response to DNS queries, for example, 192.0.2.44.
//
// This value is required if the service specified by ServiceIdincludes settings for an A record. If the service includes settings for an
// SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.
//
// AWS_INSTANCE_IPV6
//
// If the service configuration includes an AAAA record, the IPv6 address that
// you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345.
//
// This value is required if the service specified by ServiceIdincludes settings for an AAAA record. If the service includes settings for
// an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.
//
// AWS_INSTANCE_PORT
//
// If the service includes an SRV record, the value that you want Route 53 to
// return for the port.
//
// If the service includes HealthCheckConfig
Attributes map[string]*string `type:"map"`
// A unique string that identifies the request and that allows failed RegisterInstance
// requests to be retried without the risk of executing the operation twice.
// You must use a unique CreatorRequestId string every time you submit a RegisterInstance
// request if you're registering additional instances for the same namespace
// and service. CreatorRequestId can be any unique string, for example, a date/time
// stamp.
CreatorRequestId *string `type:"string"`
// An identifier that you want to associate with the instance. Note the following:
//
// * If the service that is specified by ServiceId includes settings for
// an SRV record, the value of InstanceId is automatically included as part
// of the value for the SRV record. For more information, see DnsRecord$Type.
//
// * You can use this value to update an existing instance.
//
// * To register a new instance, you must specify a value that is unique
// among instances that you register by using the same service.
//
// * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates
// the existing DNS records. If there's also an existing health check, AWS
// Cloud Map deletes the old health check and creates a new one.
//
// The health check isn't deleted immediately, so it will still appear for a
// while if you submit a ListHealthChecks request, for example.
//
// Id is a required field
Id *string `type:"string" required:"true"`
}
// String returns the string representation
func (s Instance) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Instance) GoString() string {
return s.String()
}
// SetAttributes sets the Attributes field's value.
func (s *Instance) SetAttributes(v map[string]*string) *Instance {
s.Attributes = v
return s
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *Instance) SetCreatorRequestId(v string) *Instance {
s.CreatorRequestId = &v
return s
}
// SetId sets the Id field's value.
func (s *Instance) SetId(v string) *Instance {
s.Id = &v
return s
}
// A complex type that contains information about the instances that you registered
// by using a specified service.
type InstanceSummary struct {
_ struct{} `type:"structure"`
// A string map that contains the following information:
//
// * The attributes that are associate with the instance.
//
// * For each attribute, the applicable value.
//
// Supported attribute keys include the following:
//
// * AWS_ALIAS_DNS_NAME: For an alias record that routes traffic to an Elastic
// Load Balancing load balancer, the DNS name that is associated with the
// load balancer.
//
// * AWS_INSTANCE_CNAME: For a CNAME record, the domain name that Route 53
// returns in response to DNS queries, for example, example.com.
//
// * AWS_INSTANCE_IPV4: For an A record, the IPv4 address that Route 53 returns
// in response to DNS queries, for example, 192.0.2.44.
//
// * AWS_INSTANCE_IPV6: For an AAAA record, the IPv6 address that Route 53
// returns in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345.
//
// * AWS_INSTANCE_PORT: For an SRV record, the value that Route 53 returns
// for the port. In addition, if the service includes HealthCheckConfig,
// the port on the endpoint that Route 53 sends requests to.
Attributes map[string]*string `type:"map"`
// The ID for an instance that you created by using a specified service.
Id *string `type:"string"`
}
// String returns the string representation
func (s InstanceSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InstanceSummary) GoString() string {
return s.String()
}
// SetAttributes sets the Attributes field's value.
func (s *InstanceSummary) SetAttributes(v map[string]*string) *InstanceSummary {
s.Attributes = v
return s
}
// SetId sets the Id field's value.
func (s *InstanceSummary) SetId(v string) *InstanceSummary {
s.Id = &v
return s
}
type ListInstancesInput struct {
_ struct{} `type:"structure"`
// The maximum number of instances that you want AWS Cloud Map to return in
// the response to a ListInstances request. If you don't specify a value for
// MaxResults, AWS Cloud Map returns up to 100 instances.
MaxResults *int64 `min:"1" type:"integer"`
// For the first ListInstances request, omit this value.
//
// If more than MaxResults instances match the specified criteria, you can submit
// another ListInstances request to get the next group of results. Specify the
// value of NextToken from the previous response in the next request.
NextToken *string `type:"string"`
// The ID of the service that you want to list instances for.
//
// ServiceId is a required field
ServiceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s ListInstancesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListInstancesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListInstancesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListInstancesInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.ServiceId == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListInstancesInput) SetMaxResults(v int64) *ListInstancesInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListInstancesInput) SetNextToken(v string) *ListInstancesInput {
s.NextToken = &v
return s
}
// SetServiceId sets the ServiceId field's value.
func (s *ListInstancesInput) SetServiceId(v string) *ListInstancesInput {
s.ServiceId = &v
return s
}
type ListInstancesOutput struct {
_ struct{} `type:"structure"`
// Summary information about the instances that are associated with the specified
// service.
Instances []*InstanceSummary `type:"list"`
// If more than MaxResults instances match the specified criteria, you can submit
// another ListInstances request to get the next group of results. Specify the
// value of NextToken from the previous response in the next request.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListInstancesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListInstancesOutput) GoString() string {
return s.String()
}
// SetInstances sets the Instances field's value.
func (s *ListInstancesOutput) SetInstances(v []*InstanceSummary) *ListInstancesOutput {
s.Instances = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListInstancesOutput) SetNextToken(v string) *ListInstancesOutput {
s.NextToken = &v
return s
}
type ListNamespacesInput struct {
_ struct{} `type:"structure"`
// A complex type that contains specifications for the namespaces that you want
// to list.
//
// If you specify more than one filter, a namespace must match all filters to
// be returned by ListNamespaces.
Filters []*NamespaceFilter `type:"list"`
// The maximum number of namespaces that you want AWS Cloud Map to return in
// the response to a ListNamespaces request. If you don't specify a value for
// MaxResults, AWS Cloud Map returns up to 100 namespaces.
MaxResults *int64 `min:"1" type:"integer"`
// For the first ListNamespaces request, omit this value.
//
// If the response contains NextToken, submit another ListNamespaces request
// to get the next group of results. Specify the value of NextToken from the
// previous response in the next request.
//
// AWS Cloud Map gets MaxResults namespaces and then filters them based on the
// specified criteria. It's possible that no namespaces in the first MaxResults
// namespaces matched the specified criteria but that subsequent groups of MaxResults
// namespaces do contain namespaces that match the criteria.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListNamespacesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListNamespacesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListNamespacesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListNamespacesInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.Filters != nil {
for i, v := range s.Filters {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFilters sets the Filters field's value.
func (s *ListNamespacesInput) SetFilters(v []*NamespaceFilter) *ListNamespacesInput {
s.Filters = v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListNamespacesInput) SetMaxResults(v int64) *ListNamespacesInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListNamespacesInput) SetNextToken(v string) *ListNamespacesInput {
s.NextToken = &v
return s
}
type ListNamespacesOutput struct {
_ struct{} `type:"structure"`
// An array that contains one NamespaceSummary object for each namespace that
// matches the specified filter criteria.
Namespaces []*NamespaceSummary `type:"list"`
// If the response contains NextToken, submit another ListNamespaces request
// to get the next group of results. Specify the value of NextToken from the
// previous response in the next request.
//
// AWS Cloud Map gets MaxResults namespaces and then filters them based on the
// specified criteria. It's possible that no namespaces in the first MaxResults
// namespaces matched the specified criteria but that subsequent groups of MaxResults
// namespaces do contain namespaces that match the criteria.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListNamespacesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListNamespacesOutput) GoString() string {
return s.String()
}
// SetNamespaces sets the Namespaces field's value.
func (s *ListNamespacesOutput) SetNamespaces(v []*NamespaceSummary) *ListNamespacesOutput {
s.Namespaces = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListNamespacesOutput) SetNextToken(v string) *ListNamespacesOutput {
s.NextToken = &v
return s
}
type ListOperationsInput struct {
_ struct{} `type:"structure"`
// 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.
//
// If you specify more than one filter, an operation must match all filters
// to be returned by ListOperations.
Filters []*OperationFilter `type:"list"`
// The maximum number of items that you want AWS Cloud Map to return in the
// response to a ListOperations request. If you don't specify a value for MaxResults,
// AWS Cloud Map returns up to 100 operations.
MaxResults *int64 `min:"1" type:"integer"`
// For the first ListOperations request, omit this value.
//
// If the response contains NextToken, submit another ListOperations request
// to get the next group of results. Specify the value of NextToken from the
// previous response in the next request.
//
// AWS Cloud Map gets MaxResults operations and then filters them based on the
// specified criteria. It's possible that no operations in the first MaxResults
// operations matched the specified criteria but that subsequent groups of MaxResults
// operations do contain operations that match the criteria.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListOperationsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListOperationsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListOperationsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListOperationsInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.Filters != nil {
for i, v := range s.Filters {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFilters sets the Filters field's value.
func (s *ListOperationsInput) SetFilters(v []*OperationFilter) *ListOperationsInput {
s.Filters = v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListOperationsInput) SetMaxResults(v int64) *ListOperationsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListOperationsInput) SetNextToken(v string) *ListOperationsInput {
s.NextToken = &v
return s
}
type ListOperationsOutput struct {
_ struct{} `type:"structure"`
// If the response contains NextToken, submit another ListOperations request
// to get the next group of results. Specify the value of NextToken from the
// previous response in the next request.
//
// AWS Cloud Map gets MaxResults operations and then filters them based on the
// specified criteria. It's possible that no operations in the first MaxResults
// operations matched the specified criteria but that subsequent groups of MaxResults
// operations do contain operations that match the criteria.
NextToken *string `type:"string"`
// Summary information about the operations that match the specified criteria.
Operations []*OperationSummary `type:"list"`
}
// String returns the string representation
func (s ListOperationsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListOperationsOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *ListOperationsOutput) SetNextToken(v string) *ListOperationsOutput {
s.NextToken = &v
return s
}
// SetOperations sets the Operations field's value.
func (s *ListOperationsOutput) SetOperations(v []*OperationSummary) *ListOperationsOutput {
s.Operations = v
return s
}
type ListServicesInput struct {
_ struct{} `type:"structure"`
// A complex type that contains specifications for the namespaces that you want
// to list services for.
//
// If you specify more than one filter, an operation must match all filters
// to be returned by ListServices.
Filters []*ServiceFilter `type:"list"`
// The maximum number of services that you want AWS Cloud Map to return in the
// response to a ListServices request. If you don't specify a value for MaxResults,
// AWS Cloud Map returns up to 100 services.
MaxResults *int64 `min:"1" type:"integer"`
// For the first ListServices request, omit this value.
//
// If the response contains NextToken, submit another ListServices request to
// get the next group of results. Specify the value of NextToken from the previous
// response in the next request.
//
// AWS Cloud Map gets MaxResults services and then filters them based on the
// specified criteria. It's possible that no services in the first MaxResults
// services matched the specified criteria but that subsequent groups of MaxResults
// services do contain services that match the criteria.
NextToken *string `type:"string"`
}
// String returns the string representation
func (s ListServicesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListServicesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListServicesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListServicesInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.Filters != nil {
for i, v := range s.Filters {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetFilters sets the Filters field's value.
func (s *ListServicesInput) SetFilters(v []*ServiceFilter) *ListServicesInput {
s.Filters = v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListServicesInput) SetMaxResults(v int64) *ListServicesInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListServicesInput) SetNextToken(v string) *ListServicesInput {
s.NextToken = &v
return s
}
type ListServicesOutput struct {
_ struct{} `type:"structure"`
// If the response contains NextToken, submit another ListServices request to
// get the next group of results. Specify the value of NextToken from the previous
// response in the next request.
//
// AWS Cloud Map gets MaxResults services and then filters them based on the
// specified criteria. It's possible that no services in the first MaxResults
// services matched the specified criteria but that subsequent groups of MaxResults
// services do contain services that match the criteria.
NextToken *string `type:"string"`
// An array that contains one ServiceSummary object for each service that matches
// the specified filter criteria.
Services []*ServiceSummary `type:"list"`
}
// String returns the string representation
func (s ListServicesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListServicesOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *ListServicesOutput) SetNextToken(v string) *ListServicesOutput {
s.NextToken = &v
return s
}
// SetServices sets the Services field's value.
func (s *ListServicesOutput) SetServices(v []*ServiceSummary) *ListServicesOutput {
s.Services = v
return s
}
// A complex type that contains information about a specified namespace.
type Namespace struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace
// when you create it.
Arn *string `type:"string"`
// The date that the namespace was created, in Unix date/time format and Coordinated
// Universal Time (UTC). The value of CreateDate is accurate to milliseconds.
// For example, the value 1516925490.087 represents Friday, January 26, 2018
// 12:11:30.087 AM.
CreateDate *time.Time `type:"timestamp"`
// A unique string that identifies the request and that allows failed requests
// to be retried without the risk of executing an operation twice.
CreatorRequestId *string `type:"string"`
// The description that you specify for the namespace when you create it.
Description *string `type:"string"`
// The ID of a namespace.
Id *string `type:"string"`
// The name of the namespace, such as example.com.
Name *string `type:"string"`
// A complex type that contains information that's specific to the type of the
// namespace.
Properties *NamespaceProperties `type:"structure"`
// The number of services that are associated with the namespace.
ServiceCount *int64 `type:"integer"`
// The type of the namespace. Valid values are DNS_PUBLIC and DNS_PRIVATE.
Type *string `type:"string" enum:"NamespaceType"`
}
// String returns the string representation
func (s Namespace) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Namespace) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *Namespace) SetArn(v string) *Namespace {
s.Arn = &v
return s
}
// SetCreateDate sets the CreateDate field's value.
func (s *Namespace) SetCreateDate(v time.Time) *Namespace {
s.CreateDate = &v
return s
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *Namespace) SetCreatorRequestId(v string) *Namespace {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *Namespace) SetDescription(v string) *Namespace {
s.Description = &v
return s
}
// SetId sets the Id field's value.
func (s *Namespace) SetId(v string) *Namespace {
s.Id = &v
return s
}
// SetName sets the Name field's value.
func (s *Namespace) SetName(v string) *Namespace {
s.Name = &v
return s
}
// SetProperties sets the Properties field's value.
func (s *Namespace) SetProperties(v *NamespaceProperties) *Namespace {
s.Properties = v
return s
}
// SetServiceCount sets the ServiceCount field's value.
func (s *Namespace) SetServiceCount(v int64) *Namespace {
s.ServiceCount = &v
return s
}
// SetType sets the Type field's value.
func (s *Namespace) SetType(v string) *Namespace {
s.Type = &v
return s
}
// A complex type that identifies the namespaces that you want to list. You
// can choose to list public or private namespaces.
type NamespaceFilter struct {
_ struct{} `type:"structure"`
// The operator that you want to use to determine whether ListNamespaces returns
// a namespace. Valid values for condition include:
//
// * EQ: When you specify EQ for the condition, you can choose to list only
// public namespaces or private namespaces, but not both. EQ is the default
// condition and can be omitted.
//
// * IN: When you specify IN for the condition, you can choose to list public
// namespaces, private namespaces, or both.
//
// * BETWEEN: Not applicable
Condition *string `type:"string" enum:"FilterCondition"`
// Specify TYPE.
//
// Name is a required field
Name *string `type:"string" required:"true" enum:"NamespaceFilterName"`
// If you specify EQ for Condition, specify either DNS_PUBLIC or DNS_PRIVATE.
//
// If you specify IN for Condition, you can specify DNS_PUBLIC, DNS_PRIVATE,
// or both.
//
// Values is a required field
Values []*string `type:"list" required:"true"`
}
// String returns the string representation
func (s NamespaceFilter) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s NamespaceFilter) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *NamespaceFilter) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "NamespaceFilter"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Values == nil {
invalidParams.Add(request.NewErrParamRequired("Values"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCondition sets the Condition field's value.
func (s *NamespaceFilter) SetCondition(v string) *NamespaceFilter {
s.Condition = &v
return s
}
// SetName sets the Name field's value.
func (s *NamespaceFilter) SetName(v string) *NamespaceFilter {
s.Name = &v
return s
}
// SetValues sets the Values field's value.
func (s *NamespaceFilter) SetValues(v []*string) *NamespaceFilter {
s.Values = v
return s
}
// A complex type that contains information that is specific to the namespace
// type.
type NamespaceProperties struct {
_ struct{} `type:"structure"`
// A complex type that contains the ID for the Route 53 hosted zone that AWS
// Cloud Map creates when you create a namespace.
DnsProperties *DnsProperties `type:"structure"`
// A complex type that contains the name of an HTTP namespace.
HttpProperties *HttpProperties `type:"structure"`
}
// String returns the string representation
func (s NamespaceProperties) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s NamespaceProperties) GoString() string {
return s.String()
}
// SetDnsProperties sets the DnsProperties field's value.
func (s *NamespaceProperties) SetDnsProperties(v *DnsProperties) *NamespaceProperties {
s.DnsProperties = v
return s
}
// SetHttpProperties sets the HttpProperties field's value.
func (s *NamespaceProperties) SetHttpProperties(v *HttpProperties) *NamespaceProperties {
s.HttpProperties = v
return s
}
// A complex type that contains information about a namespace.
type NamespaceSummary struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace
// when you create it.
Arn *string `type:"string"`
// The date and time that the namespace was created.
CreateDate *time.Time `type:"timestamp"`
// A description for the namespace.
Description *string `type:"string"`
// The ID of the namespace.
Id *string `type:"string"`
// The name of the namespace. When you create a namespace, AWS Cloud Map automatically
// creates a Route 53 hosted zone that has the same name as the namespace.
Name *string `type:"string"`
// A complex type that contains information that is specific to the namespace
// type.
Properties *NamespaceProperties `type:"structure"`
// The number of services that were created using the namespace.
ServiceCount *int64 `type:"integer"`
// The type of the namespace, either public or private.
Type *string `type:"string" enum:"NamespaceType"`
}
// String returns the string representation
func (s NamespaceSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s NamespaceSummary) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *NamespaceSummary) SetArn(v string) *NamespaceSummary {
s.Arn = &v
return s
}
// SetCreateDate sets the CreateDate field's value.
func (s *NamespaceSummary) SetCreateDate(v time.Time) *NamespaceSummary {
s.CreateDate = &v
return s
}
// SetDescription sets the Description field's value.
func (s *NamespaceSummary) SetDescription(v string) *NamespaceSummary {
s.Description = &v
return s
}
// SetId sets the Id field's value.
func (s *NamespaceSummary) SetId(v string) *NamespaceSummary {
s.Id = &v
return s
}
// SetName sets the Name field's value.
func (s *NamespaceSummary) SetName(v string) *NamespaceSummary {
s.Name = &v
return s
}
// SetProperties sets the Properties field's value.
func (s *NamespaceSummary) SetProperties(v *NamespaceProperties) *NamespaceSummary {
s.Properties = v
return s
}
// SetServiceCount sets the ServiceCount field's value.
func (s *NamespaceSummary) SetServiceCount(v int64) *NamespaceSummary {
s.ServiceCount = &v
return s
}
// SetType sets the Type field's value.
func (s *NamespaceSummary) SetType(v string) *NamespaceSummary {
s.Type = &v
return s
}
// A complex type that contains information about a specified operation.
type Operation struct {
_ struct{} `type:"structure"`
// The date and time that the request was submitted, in Unix date/time format
// and Coordinated Universal Time (UTC). The value of CreateDate is accurate
// to milliseconds. For example, the value 1516925490.087 represents Friday,
// January 26, 2018 12:11:30.087 AM.
CreateDate *time.Time `type:"timestamp"`
// The code associated with ErrorMessage. Values for ErrorCode include the following:
//
// * ACCESS_DENIED
//
// * CANNOT_CREATE_HOSTED_ZONE
//
// * EXPIRED_TOKEN
//
// * HOSTED_ZONE_NOT_FOUND
//
// * INTERNAL_FAILURE
//
// * INVALID_CHANGE_BATCH
//
// * THROTTLED_REQUEST
ErrorCode *string `type:"string"`
// If the value of Status is FAIL, the reason that the operation failed.
ErrorMessage *string `type:"string"`
// The ID of the operation that you want to get information about.
Id *string `type:"string"`
// The status of the operation. Values include the following:
//
// * SUBMITTED: This is the initial state immediately after you submit a
// request.
//
// * PENDING: AWS Cloud Map is performing the operation.
//
// * SUCCESS: The operation succeeded.
//
// * FAIL: The operation failed. For the failure reason, see ErrorMessage.
Status *string `type:"string" enum:"OperationStatus"`
// The name of the target entity that is associated with the operation:
//
// * NAMESPACE: The namespace ID is returned in the ResourceId property.
//
// * SERVICE: The service ID is returned in the ResourceId property.
//
// * INSTANCE: The instance ID is returned in the ResourceId property.
Targets map[string]*string `type:"map"`
// The name of the operation that is associated with the specified ID.
Type *string `type:"string" enum:"OperationType"`
// The date and time that the value of Status changed to the current value,
// in Unix date/time format and Coordinated Universal Time (UTC). The value
// of UpdateDate is accurate to milliseconds. For example, the value 1516925490.087
// represents Friday, January 26, 2018 12:11:30.087 AM.
UpdateDate *time.Time `type:"timestamp"`
}
// String returns the string representation
func (s Operation) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Operation) GoString() string {
return s.String()
}
// SetCreateDate sets the CreateDate field's value.
func (s *Operation) SetCreateDate(v time.Time) *Operation {
s.CreateDate = &v
return s
}
// SetErrorCode sets the ErrorCode field's value.
func (s *Operation) SetErrorCode(v string) *Operation {
s.ErrorCode = &v
return s
}
// SetErrorMessage sets the ErrorMessage field's value.
func (s *Operation) SetErrorMessage(v string) *Operation {
s.ErrorMessage = &v
return s
}
// SetId sets the Id field's value.
func (s *Operation) SetId(v string) *Operation {
s.Id = &v
return s
}
// SetStatus sets the Status field's value.
func (s *Operation) SetStatus(v string) *Operation {
s.Status = &v
return s
}
// SetTargets sets the Targets field's value.
func (s *Operation) SetTargets(v map[string]*string) *Operation {
s.Targets = v
return s
}
// SetType sets the Type field's value.
func (s *Operation) SetType(v string) *Operation {
s.Type = &v
return s
}
// SetUpdateDate sets the UpdateDate field's value.
func (s *Operation) SetUpdateDate(v time.Time) *Operation {
s.UpdateDate = &v
return s
}
// A complex type that lets you select the operations that you want to list.
type OperationFilter struct {
_ struct{} `type:"structure"`
// The operator that you want to use to determine whether an operation matches
// the specified value. Valid values for condition include:
//
// * EQ: When you specify EQ for the condition, you can specify only one
// value. EQ is supported for NAMESPACE_ID, SERVICE_ID, STATUS, and TYPE.
// EQ is the default condition and can be omitted.
//
// * IN: When you specify IN for the condition, you can specify a list of
// one or more values. IN is supported for STATUS and TYPE. An operation
// must match one of the specified values to be returned in the response.
//
// * BETWEEN: Specify a start date and an end date in Unix date/time format
// and Coordinated Universal Time (UTC). The start date must be the first
// value. BETWEEN is supported for UPDATE_DATE.
Condition *string `type:"string" enum:"FilterCondition"`
// Specify the operations that you want to get:
//
// * NAMESPACE_ID: Gets operations related to specified namespaces.
//
// * SERVICE_ID: Gets operations related to specified services.
//
// * STATUS: Gets operations based on the status of the operations: SUBMITTED,
// PENDING, SUCCEED, or FAIL.
//
// * TYPE: Gets specified types of operation.
//
// * UPDATE_DATE: Gets operations that changed status during a specified
// date/time range.
//
// Name is a required field
Name *string `type:"string" required:"true" enum:"OperationFilterName"`
// Specify values that are applicable to the value that you specify for Name:
//
// * NAMESPACE_ID: Specify one namespace ID.
//
// * SERVICE_ID: Specify one service ID.
//
// * STATUS: Specify one or more statuses: SUBMITTED, PENDING, SUCCEED, or
// FAIL.
//
// * TYPE: Specify one or more of the following types: CREATE_NAMESPACE,
// DELETE_NAMESPACE, UPDATE_SERVICE, REGISTER_INSTANCE, or DEREGISTER_INSTANCE.
//
// * UPDATE_DATE: Specify a start date and an end date in Unix date/time
// format and Coordinated Universal Time (UTC). The start date must be the
// first value.
//
// Values is a required field
Values []*string `type:"list" required:"true"`
}
// String returns the string representation
func (s OperationFilter) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s OperationFilter) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *OperationFilter) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "OperationFilter"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Values == nil {
invalidParams.Add(request.NewErrParamRequired("Values"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCondition sets the Condition field's value.
func (s *OperationFilter) SetCondition(v string) *OperationFilter {
s.Condition = &v
return s
}
// SetName sets the Name field's value.
func (s *OperationFilter) SetName(v string) *OperationFilter {
s.Name = &v
return s
}
// SetValues sets the Values field's value.
func (s *OperationFilter) SetValues(v []*string) *OperationFilter {
s.Values = v
return s
}
// A complex type that contains information about an operation that matches
// the criteria that you specified in a ListOperations request.
type OperationSummary struct {
_ struct{} `type:"structure"`
// The ID for an operation.
Id *string `type:"string"`
// The status of the operation. Values include the following:
//
// * SUBMITTED: This is the initial state immediately after you submit a
// request.
//
// * PENDING: AWS Cloud Map is performing the operation.
//
// * SUCCESS: The operation succeeded.
//
// * FAIL: The operation failed. For the failure reason, see ErrorMessage.
Status *string `type:"string" enum:"OperationStatus"`
}
// String returns the string representation
func (s OperationSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s OperationSummary) GoString() string {
return s.String()
}
// SetId sets the Id field's value.
func (s *OperationSummary) SetId(v string) *OperationSummary {
s.Id = &v
return s
}
// SetStatus sets the Status field's value.
func (s *OperationSummary) SetStatus(v string) *OperationSummary {
s.Status = &v
return s
}
type RegisterInstanceInput struct {
_ struct{} `type:"structure"`
// A string map that contains the following information for the service that
// you specify in ServiceId:
//
// * The attributes that apply to the records that are defined in the service.
//
//
// * For each attribute, the applicable value.
//
// Supported attribute keys include the following:
//
// AWS_ALIAS_DNS_NAME
//
// If you want AWS 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 is associated with the load balancer. For information about how
// to get the DNS name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html)in the Route 53 API Reference.
//
// Note the following:
//
// The configuration for the service that is specified by ServiceId must include
// settings for an A record, an AAAA record, or both.
//
// * In the service that is specified by ServiceId, the value of RoutingPolicy
// must be WEIGHTED.
//
// * If the service that is specified by ServiceId includes HealthCheckConfig
// settings, AWS Cloud Map will create the Route 53 health check, but it
// won't associate the health check with the alias record.
//
// * Auto naming currently doesn't support creating alias records that route
// traffic to AWS resources other than ELB load balancers.
//
// * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values
// for any of the AWS_INSTANCE attributes.
//
// AWS_INIT_HEALTH_STATUS
//
// If the service configuration includes HealthCheckCustomConfig, you can optionally use AWS_INIT_HEALTH_STATUSto specify the initial status of the custom health check, HEALTHYor UNHEALTHY. If you don't specify a value for AWS_INIT_HEALTH_STATUS, the initial status is HEALTHY.
//
// AWS_INSTANCE_CNAME
//
// If the service configuration includes a CNAME record, the domain name that
// you want Route 53 to return in response to DNS queries, for example, example.com.
//
// This value is required if the service specified by ServiceIdincludes settings for an CNAME record.
//
// AWS_INSTANCE_IPV4
//
// If the service configuration includes an A record, the IPv4 address that
// you want Route 53 to return in response to DNS queries, for example, 192.0.2.44.
//
// This value is required if the service specified by ServiceIdincludes settings for an A record. If the service includes settings for an
// SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.
//
// AWS_INSTANCE_IPV6
//
// If the service configuration includes an AAAA record, the IPv6 address that
// you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345.
//
// This value is required if the service specified by ServiceIdincludes settings for an AAAA record. If the service includes settings for
// an SRV record, you must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.
//
// AWS_INSTANCE_PORT
//
// If the service includes an SRV record, the value that you want Route 53 to
// return for the port.
//
// If the service includes HealthCheckConfig, the port on the endpoint that you want Route 53 to send requests to.
//
// This value is required if you specified settings for an SRV record when you
// created the service.
//
// Custom attributes
//
// Attributes is a required field
Attributes map[string]*string `type:"map" required:"true"`
// A unique string that identifies the request and that allows failed RegisterInstance
// requests to be retried without the risk of executing the operation twice.
// You must use a unique CreatorRequestId string every time you submit a RegisterInstance
// request if you're registering additional instances for the same namespace
// and service. CreatorRequestId can be any unique string, for example, a date/time
// stamp.
CreatorRequestId *string `type:"string" idempotencyToken:"true"`
// An identifier that you want to associate with the instance. Note the following:
//
// * If the service that is specified by ServiceId includes settings for
// an SRV record, the value of InstanceId is automatically included as part
// of the value for the SRV record. For more information, see DnsRecord$Type.
//
// * You can use this value to update an existing instance.
//
// * To register a new instance, you must specify a value that is unique
// among instances that you register by using the same service.
//
// * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates
// the existing DNS records, if any. If there's also an existing health check,
// AWS Cloud Map deletes the old health check and creates a new one.
//
// The health check isn't deleted immediately, so it will still appear for a
// while if you submit a ListHealthChecks request, for example.
//
// InstanceId is a required field
InstanceId *string `type:"string" required:"true"`
// The ID of the service that you want to use for settings for the instance.
//
// ServiceId is a required field
ServiceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s RegisterInstanceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RegisterInstanceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *RegisterInstanceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RegisterInstanceInput"}
if s.Attributes == nil {
invalidParams.Add(request.NewErrParamRequired("Attributes"))
}
if s.InstanceId == nil {
invalidParams.Add(request.NewErrParamRequired("InstanceId"))
}
if s.ServiceId == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAttributes sets the Attributes field's value.
func (s *RegisterInstanceInput) SetAttributes(v map[string]*string) *RegisterInstanceInput {
s.Attributes = v
return s
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *RegisterInstanceInput) SetCreatorRequestId(v string) *RegisterInstanceInput {
s.CreatorRequestId = &v
return s
}
// SetInstanceId sets the InstanceId field's value.
func (s *RegisterInstanceInput) SetInstanceId(v string) *RegisterInstanceInput {
s.InstanceId = &v
return s
}
// SetServiceId sets the ServiceId field's value.
func (s *RegisterInstanceInput) SetServiceId(v string) *RegisterInstanceInput {
s.ServiceId = &v
return s
}
type RegisterInstanceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s RegisterInstanceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RegisterInstanceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *RegisterInstanceOutput) SetOperationId(v string) *RegisterInstanceOutput {
s.OperationId = &v
return s
}
// A complex type that contains information about the specified service.
type Service struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service
// when you create it.
Arn *string `type:"string"`
// The date and time that the service was created, in Unix format and Coordinated
// Universal Time (UTC). The value of CreateDate is accurate to milliseconds.
// For example, the value 1516925490.087 represents Friday, January 26, 2018
// 12:11:30.087 AM.
CreateDate *time.Time `type:"timestamp"`
// A unique string that identifies the request and that allows failed requests
// to be retried without the risk of executing the operation twice. CreatorRequestId
// can be any unique string, for example, a date/time stamp.
CreatorRequestId *string `type:"string"`
// The description of the service.
Description *string `type:"string"`
// A complex type that contains information about the Route 53 DNS records that
// you want AWS Cloud Map to create when you register an instance.
DnsConfig *DnsConfig `type:"structure"`
// Public DNS namespaces only. A complex type that contains settings for an
// optional health check. If you specify settings for a health check, AWS Cloud
// Map associates the health check with the records that you specify in DnsConfig.
//
// For information about the charges for health checks, see Amazon Route 53
// Pricing (http://aws.amazon.com/route53/pricing/).
HealthCheckConfig *HealthCheckConfig `type:"structure"`
// A complex type that contains information about an optional custom health
// check.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"`
// The ID that AWS Cloud Map assigned to the service when you created it.
Id *string `type:"string"`
// The number of instances that are currently associated with the service. Instances
// that were previously associated with the service but that have been deleted
// are not included in the count.
InstanceCount *int64 `type:"integer"`
// The name of the service.
Name *string `type:"string"`
// The ID of the namespace that was used to create the service.
NamespaceId *string `type:"string"`
}
// String returns the string representation
func (s Service) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Service) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *Service) SetArn(v string) *Service {
s.Arn = &v
return s
}
// SetCreateDate sets the CreateDate field's value.
func (s *Service) SetCreateDate(v time.Time) *Service {
s.CreateDate = &v
return s
}
// SetCreatorRequestId sets the CreatorRequestId field's value.
func (s *Service) SetCreatorRequestId(v string) *Service {
s.CreatorRequestId = &v
return s
}
// SetDescription sets the Description field's value.
func (s *Service) SetDescription(v string) *Service {
s.Description = &v
return s
}
// SetDnsConfig sets the DnsConfig field's value.
func (s *Service) SetDnsConfig(v *DnsConfig) *Service {
s.DnsConfig = v
return s
}
// SetHealthCheckConfig sets the HealthCheckConfig field's value.
func (s *Service) SetHealthCheckConfig(v *HealthCheckConfig) *Service {
s.HealthCheckConfig = v
return s
}
// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value.
func (s *Service) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *Service {
s.HealthCheckCustomConfig = v
return s
}
// SetId sets the Id field's value.
func (s *Service) SetId(v string) *Service {
s.Id = &v
return s
}
// SetInstanceCount sets the InstanceCount field's value.
func (s *Service) SetInstanceCount(v int64) *Service {
s.InstanceCount = &v
return s
}
// SetName sets the Name field's value.
func (s *Service) SetName(v string) *Service {
s.Name = &v
return s
}
// SetNamespaceId sets the NamespaceId field's value.
func (s *Service) SetNamespaceId(v string) *Service {
s.NamespaceId = &v
return s
}
// A complex type that contains changes to an existing service.
type ServiceChange struct {
_ struct{} `type:"structure"`
// A description for the service.
Description *string `type:"string"`
// A complex type that contains information about the Route 53 DNS records that
// you want AWS Cloud Map to create when you register an instance.
//
// DnsConfig is a required field
DnsConfig *DnsConfigChange `type:"structure" required:"true"`
// Public DNS namespaces only. A complex type that contains settings for an
// optional health check. If you specify settings for a health check, AWS Cloud
// Map associates the health check with the records that you specify in DnsConfig.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
//
// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
// For information about pricing for health checks, see Amazon Route 53 Pricing
// (http://aws.amazon.com/route53/pricing/).
//
// Note the following about configuring health checks.
//
// A and AAAA records
//
// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud
// Map creates a health check that uses the IPv4 address to check the health
// of the resource. If the endpoint that is specified by the IPv4 address is
// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy.
//
// CNAME records
//
// You can't specify settings for HealthCheckConfig when the DNSConfig includes
// CNAME for the value of Type. If you do, the CreateService request will fail
// with an InvalidInput error.
//
// Request interval
//
// A Route 53 health checker in each health-checking region sends a health check
// request to an endpoint every 30 seconds. On average, your endpoint receives
// a health check request about every two seconds. However, health checkers
// don't coordinate with one another, so you'll sometimes see several requests
// per second followed by a few seconds with no health checks at all.
//
// Health checking regions
//
// Health checkers perform checks from all Route 53 health-checking regions.
// For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions).
//
// Alias records
//
// When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute,
// AWS Cloud Map creates a Route 53 alias record. Note the following:
//
// * Route 53 automatically sets EvaluateTargetHealth to true for alias records.
// When EvaluateTargetHealth is true, the alias record inherits the health
// of the referenced AWS resource. such as an ELB load balancer. For more
// information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth).
//
// * If you include HealthCheckConfig and then use the service to register
// an instance that creates an alias record, Route 53 doesn't create the
// health check.
//
// Charges for health checks
//
// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
// For information about pricing for health checks, see Amazon Route 53 Pricing
// (http://aws.amazon.com/route53/pricing/).
HealthCheckConfig *HealthCheckConfig `type:"structure"`
}
// String returns the string representation
func (s ServiceChange) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ServiceChange) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ServiceChange) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ServiceChange"}
if s.DnsConfig == nil {
invalidParams.Add(request.NewErrParamRequired("DnsConfig"))
}
if s.DnsConfig != nil {
if err := s.DnsConfig.Validate(); err != nil {
invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams))
}
}
if s.HealthCheckConfig != nil {
if err := s.HealthCheckConfig.Validate(); err != nil {
invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetDescription sets the Description field's value.
func (s *ServiceChange) SetDescription(v string) *ServiceChange {
s.Description = &v
return s
}
// SetDnsConfig sets the DnsConfig field's value.
func (s *ServiceChange) SetDnsConfig(v *DnsConfigChange) *ServiceChange {
s.DnsConfig = v
return s
}
// SetHealthCheckConfig sets the HealthCheckConfig field's value.
func (s *ServiceChange) SetHealthCheckConfig(v *HealthCheckConfig) *ServiceChange {
s.HealthCheckConfig = v
return s
}
// A complex type that lets you specify the namespaces that you want to list
// services for.
type ServiceFilter struct {
_ struct{} `type:"structure"`
// The operator that you want to use to determine whether a service is returned
// by ListServices. Valid values for Condition include the following:
//
// * EQ: When you specify EQ, specify one namespace ID for Values. EQ is
// the default condition and can be omitted.
//
// * IN: When you specify IN, specify a list of the IDs for the namespaces
// that you want ListServices to return a list of services for.
//
// * BETWEEN: Not applicable.
Condition *string `type:"string" enum:"FilterCondition"`
// Specify NAMESPACE_ID.
//
// Name is a required field
Name *string `type:"string" required:"true" enum:"ServiceFilterName"`
// The values that are applicable to the value that you specify for Condition
// to filter the list of services.
//
// Values is a required field
Values []*string `type:"list" required:"true"`
}
// String returns the string representation
func (s ServiceFilter) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ServiceFilter) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ServiceFilter) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ServiceFilter"}
if s.Name == nil {
invalidParams.Add(request.NewErrParamRequired("Name"))
}
if s.Values == nil {
invalidParams.Add(request.NewErrParamRequired("Values"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetCondition sets the Condition field's value.
func (s *ServiceFilter) SetCondition(v string) *ServiceFilter {
s.Condition = &v
return s
}
// SetName sets the Name field's value.
func (s *ServiceFilter) SetName(v string) *ServiceFilter {
s.Name = &v
return s
}
// SetValues sets the Values field's value.
func (s *ServiceFilter) SetValues(v []*string) *ServiceFilter {
s.Values = v
return s
}
// A complex type that contains information about a specified service.
type ServiceSummary struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service
// when you create it.
Arn *string `type:"string"`
// The date and time that the service was created.
CreateDate *time.Time `type:"timestamp"`
// The description that you specify when you create the service.
Description *string `type:"string"`
// A complex type that contains information about the Amazon Route 53 DNS records
// that you want AWS Cloud Map to create when you register an instance.
DnsConfig *DnsConfig `type:"structure"`
// Public DNS namespaces only. A complex type that contains settings for an
// optional health check. If you specify settings for a health check, AWS Cloud
// Map associates the health check with the records that you specify in DnsConfig.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
//
// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
// For information about pricing for health checks, see Amazon Route 53 Pricing
// (http://aws.amazon.com/route53/pricing/).
//
// Note the following about configuring health checks.
//
// A and AAAA records
//
// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud
// Map creates a health check that uses the IPv4 address to check the health
// of the resource. If the endpoint that is specified by the IPv4 address is
// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy.
//
// CNAME records
//
// You can't specify settings for HealthCheckConfig when the DNSConfig includes
// CNAME for the value of Type. If you do, the CreateService request will fail
// with an InvalidInput error.
//
// Request interval
//
// A Route 53 health checker in each health-checking region sends a health check
// request to an endpoint every 30 seconds. On average, your endpoint receives
// a health check request about every two seconds. However, health checkers
// don't coordinate with one another, so you'll sometimes see several requests
// per second followed by a few seconds with no health checks at all.
//
// Health checking regions
//
// Health checkers perform checks from all Route 53 health-checking regions.
// For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions).
//
// Alias records
//
// When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute,
// AWS Cloud Map creates a Route 53 alias record. Note the following:
//
// * Route 53 automatically sets EvaluateTargetHealth to true for alias records.
// When EvaluateTargetHealth is true, the alias record inherits the health
// of the referenced AWS resource. such as an ELB load balancer. For more
// information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth).
//
// * If you include HealthCheckConfig and then use the service to register
// an instance that creates an alias record, Route 53 doesn't create the
// health check.
//
// Charges for health checks
//
// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
// For information about pricing for health checks, see Amazon Route 53 Pricing
// (http://aws.amazon.com/route53/pricing/).
HealthCheckConfig *HealthCheckConfig `type:"structure"`
// A complex type that contains information about an optional custom health
// check. A custom health check, which requires that you use a third-party health
// checker to evaluate the health of your resources, is useful in the following
// circumstances:
//
// * You can't use a health check that is defined by HealthCheckConfig because
// the resource isn't available over the internet. For example, you can use
// a custom health check when the instance is in an Amazon VPC. (To check
// the health of resources in a VPC, the health checker must also be in the
// VPC.)
//
// * You want to use a third-party health checker regardless of where your
// resources are.
//
// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
// or HealthCheckConfig but not both.
//
// To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus
// request. Cloud Map doesn't monitor the status of the resource, it just keeps
// a record of the status specified in the most recent UpdateInstanceCustomHealthStatus
// request.
//
// Here's how custom health checks work:
//
// You create a service and specify a value for FailureThreshold.
//
// The failure threshold indicates the number of 30-second intervals you want
// AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus
// request and the time that AWS Cloud Map stops routing internet traffic to
// the corresponding resource.
//
// You register an instance.
//
// You configure a third-party health checker to monitor the resource that is
// associated with the new instance.
//
// AWS Cloud Map doesn't check the health of the resource directly.
//
// The third-party health-checker determines that the resource is unhealthy
// and notifies your application.
//
// Your application submits an UpdateInstanceCustomHealthStatus request.
//
// AWS Cloud Map waits for (FailureThreshold x 30) seconds.
//
// If another UpdateInstanceCustomHealthStatus request doesn't arrive during
// that time to change the status back to healthy, AWS Cloud Map stops routing
// traffic to the resource.
//
// Note the following about configuring custom health checks.
HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"`
// The ID that AWS Cloud Map assigned to the service when you created it.
Id *string `type:"string"`
// The number of instances that are currently associated with the service. Instances
// that were previously associated with the service but that have been deleted
// are not included in the count.
InstanceCount *int64 `type:"integer"`
// The name of the service.
Name *string `type:"string"`
}
// String returns the string representation
func (s ServiceSummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ServiceSummary) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *ServiceSummary) SetArn(v string) *ServiceSummary {
s.Arn = &v
return s
}
// SetCreateDate sets the CreateDate field's value.
func (s *ServiceSummary) SetCreateDate(v time.Time) *ServiceSummary {
s.CreateDate = &v
return s
}
// SetDescription sets the Description field's value.
func (s *ServiceSummary) SetDescription(v string) *ServiceSummary {
s.Description = &v
return s
}
// SetDnsConfig sets the DnsConfig field's value.
func (s *ServiceSummary) SetDnsConfig(v *DnsConfig) *ServiceSummary {
s.DnsConfig = v
return s
}
// SetHealthCheckConfig sets the HealthCheckConfig field's value.
func (s *ServiceSummary) SetHealthCheckConfig(v *HealthCheckConfig) *ServiceSummary {
s.HealthCheckConfig = v
return s
}
// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value.
func (s *ServiceSummary) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *ServiceSummary {
s.HealthCheckCustomConfig = v
return s
}
// SetId sets the Id field's value.
func (s *ServiceSummary) SetId(v string) *ServiceSummary {
s.Id = &v
return s
}
// SetInstanceCount sets the InstanceCount field's value.
func (s *ServiceSummary) SetInstanceCount(v int64) *ServiceSummary {
s.InstanceCount = &v
return s
}
// SetName sets the Name field's value.
func (s *ServiceSummary) SetName(v string) *ServiceSummary {
s.Name = &v
return s
}
type UpdateInstanceCustomHealthStatusInput struct {
_ struct{} `type:"structure"`
// The ID of the instance that you want to change the health status for.
//
// InstanceId is a required field
InstanceId *string `type:"string" required:"true"`
// The ID of the service that includes the configuration for the custom health
// check that you want to change the status for.
//
// ServiceId is a required field
ServiceId *string `type:"string" required:"true"`
// The new status of the instance, HEALTHY or UNHEALTHY.
//
// Status is a required field
Status *string `type:"string" required:"true" enum:"CustomHealthStatus"`
}
// String returns the string representation
func (s UpdateInstanceCustomHealthStatusInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateInstanceCustomHealthStatusInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateInstanceCustomHealthStatusInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateInstanceCustomHealthStatusInput"}
if s.InstanceId == nil {
invalidParams.Add(request.NewErrParamRequired("InstanceId"))
}
if s.ServiceId == nil {
invalidParams.Add(request.NewErrParamRequired("ServiceId"))
}
if s.Status == nil {
invalidParams.Add(request.NewErrParamRequired("Status"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetInstanceId sets the InstanceId field's value.
func (s *UpdateInstanceCustomHealthStatusInput) SetInstanceId(v string) *UpdateInstanceCustomHealthStatusInput {
s.InstanceId = &v
return s
}
// SetServiceId sets the ServiceId field's value.
func (s *UpdateInstanceCustomHealthStatusInput) SetServiceId(v string) *UpdateInstanceCustomHealthStatusInput {
s.ServiceId = &v
return s
}
// SetStatus sets the Status field's value.
func (s *UpdateInstanceCustomHealthStatusInput) SetStatus(v string) *UpdateInstanceCustomHealthStatusInput {
s.Status = &v
return s
}
type UpdateInstanceCustomHealthStatusOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s UpdateInstanceCustomHealthStatusOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateInstanceCustomHealthStatusOutput) GoString() string {
return s.String()
}
type UpdateServiceInput struct {
_ struct{} `type:"structure"`
// The ID of the service that you want to update.
//
// Id is a required field
Id *string `type:"string" required:"true"`
// A complex type that contains the new settings for the service.
//
// Service is a required field
Service *ServiceChange `type:"structure" required:"true"`
}
// String returns the string representation
func (s UpdateServiceInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateServiceInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *UpdateServiceInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "UpdateServiceInput"}
if s.Id == nil {
invalidParams.Add(request.NewErrParamRequired("Id"))
}
if s.Service == nil {
invalidParams.Add(request.NewErrParamRequired("Service"))
}
if s.Service != nil {
if err := s.Service.Validate(); err != nil {
invalidParams.AddNested("Service", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetId sets the Id field's value.
func (s *UpdateServiceInput) SetId(v string) *UpdateServiceInput {
s.Id = &v
return s
}
// SetService sets the Service field's value.
func (s *UpdateServiceInput) SetService(v *ServiceChange) *UpdateServiceInput {
s.Service = v
return s
}
type UpdateServiceOutput struct {
_ struct{} `type:"structure"`
// A value that you can use to determine whether the request completed successfully.
// To get the status of the operation, see GetOperation.
OperationId *string `type:"string"`
}
// String returns the string representation
func (s UpdateServiceOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UpdateServiceOutput) GoString() string {
return s.String()
}
// SetOperationId sets the OperationId field's value.
func (s *UpdateServiceOutput) SetOperationId(v string) *UpdateServiceOutput {
s.OperationId = &v
return s
}
const (
// CustomHealthStatusHealthy is a CustomHealthStatus enum value
CustomHealthStatusHealthy = "HEALTHY"
// CustomHealthStatusUnhealthy is a CustomHealthStatus enum value
CustomHealthStatusUnhealthy = "UNHEALTHY"
)
const (
// FilterConditionEq is a FilterCondition enum value
FilterConditionEq = "EQ"
// FilterConditionIn is a FilterCondition enum value
FilterConditionIn = "IN"
// FilterConditionBetween is a FilterCondition enum value
FilterConditionBetween = "BETWEEN"
)
const (
// HealthCheckTypeHttp is a HealthCheckType enum value
HealthCheckTypeHttp = "HTTP"
// HealthCheckTypeHttps is a HealthCheckType enum value
HealthCheckTypeHttps = "HTTPS"
// HealthCheckTypeTcp is a HealthCheckType enum value
HealthCheckTypeTcp = "TCP"
)
const (
// HealthStatusHealthy is a HealthStatus enum value
HealthStatusHealthy = "HEALTHY"
// HealthStatusUnhealthy is a HealthStatus enum value
HealthStatusUnhealthy = "UNHEALTHY"
// HealthStatusUnknown is a HealthStatus enum value
HealthStatusUnknown = "UNKNOWN"
)
const (
// HealthStatusFilterHealthy is a HealthStatusFilter enum value
HealthStatusFilterHealthy = "HEALTHY"
// HealthStatusFilterUnhealthy is a HealthStatusFilter enum value
HealthStatusFilterUnhealthy = "UNHEALTHY"
// HealthStatusFilterAll is a HealthStatusFilter enum value
HealthStatusFilterAll = "ALL"
)
const (
// NamespaceFilterNameType is a NamespaceFilterName enum value
NamespaceFilterNameType = "TYPE"
)
const (
// NamespaceTypeDnsPublic is a NamespaceType enum value
NamespaceTypeDnsPublic = "DNS_PUBLIC"
// NamespaceTypeDnsPrivate is a NamespaceType enum value
NamespaceTypeDnsPrivate = "DNS_PRIVATE"
// NamespaceTypeHttp is a NamespaceType enum value
NamespaceTypeHttp = "HTTP"
)
const (
// OperationFilterNameNamespaceId is a OperationFilterName enum value
OperationFilterNameNamespaceId = "NAMESPACE_ID"
// OperationFilterNameServiceId is a OperationFilterName enum value
OperationFilterNameServiceId = "SERVICE_ID"
// OperationFilterNameStatus is a OperationFilterName enum value
OperationFilterNameStatus = "STATUS"
// OperationFilterNameType is a OperationFilterName enum value
OperationFilterNameType = "TYPE"
// OperationFilterNameUpdateDate is a OperationFilterName enum value
OperationFilterNameUpdateDate = "UPDATE_DATE"
)
const (
// OperationStatusSubmitted is a OperationStatus enum value
OperationStatusSubmitted = "SUBMITTED"
// OperationStatusPending is a OperationStatus enum value
OperationStatusPending = "PENDING"
// OperationStatusSuccess is a OperationStatus enum value
OperationStatusSuccess = "SUCCESS"
// OperationStatusFail is a OperationStatus enum value
OperationStatusFail = "FAIL"
)
const (
// OperationTargetTypeNamespace is a OperationTargetType enum value
OperationTargetTypeNamespace = "NAMESPACE"
// OperationTargetTypeService is a OperationTargetType enum value
OperationTargetTypeService = "SERVICE"
// OperationTargetTypeInstance is a OperationTargetType enum value
OperationTargetTypeInstance = "INSTANCE"
)
const (
// OperationTypeCreateNamespace is a OperationType enum value
OperationTypeCreateNamespace = "CREATE_NAMESPACE"
// OperationTypeDeleteNamespace is a OperationType enum value
OperationTypeDeleteNamespace = "DELETE_NAMESPACE"
// OperationTypeUpdateService is a OperationType enum value
OperationTypeUpdateService = "UPDATE_SERVICE"
// OperationTypeRegisterInstance is a OperationType enum value
OperationTypeRegisterInstance = "REGISTER_INSTANCE"
// OperationTypeDeregisterInstance is a OperationType enum value
OperationTypeDeregisterInstance = "DEREGISTER_INSTANCE"
)
const (
// RecordTypeSrv is a RecordType enum value
RecordTypeSrv = "SRV"
// RecordTypeA is a RecordType enum value
RecordTypeA = "A"
// RecordTypeAaaa is a RecordType enum value
RecordTypeAaaa = "AAAA"
// RecordTypeCname is a RecordType enum value
RecordTypeCname = "CNAME"
)
const (
// RoutingPolicyMultivalue is a RoutingPolicy enum value
RoutingPolicyMultivalue = "MULTIVALUE"
// RoutingPolicyWeighted is a RoutingPolicy enum value
RoutingPolicyWeighted = "WEIGHTED"
)
const (
// ServiceFilterNameNamespaceId is a ServiceFilterName enum value
ServiceFilterNameNamespaceId = "NAMESPACE_ID"
)
|