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
|
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package detective
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/restjson"
)
const opAcceptInvitation = "AcceptInvitation"
// AcceptInvitationRequest generates a "aws/request.Request" representing the
// client's request for the AcceptInvitation 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 AcceptInvitation for more information on using the AcceptInvitation
// 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 AcceptInvitationRequest method.
// req, resp := client.AcceptInvitationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/AcceptInvitation
func (c *Detective) AcceptInvitationRequest(input *AcceptInvitationInput) (req *request.Request, output *AcceptInvitationOutput) {
op := &request.Operation{
Name: opAcceptInvitation,
HTTPMethod: "PUT",
HTTPPath: "/invitation",
}
if input == nil {
input = &AcceptInvitationInput{}
}
output = &AcceptInvitationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AcceptInvitation API operation for Amazon Detective.
//
// Accepts an invitation for the member account to contribute data to a behavior
// graph. This operation can only be called by an invited member account.
//
// The request provides the ARN of behavior graph.
//
// The member account status in the graph must be INVITED.
//
// 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 Amazon Detective's
// API operation AcceptInvitation for usage and error information.
//
// Returned Error Types:
// * ConflictException
// The request attempted an invalid action.
//
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ResourceNotFoundException
// The request refers to a nonexistent resource.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/AcceptInvitation
func (c *Detective) AcceptInvitation(input *AcceptInvitationInput) (*AcceptInvitationOutput, error) {
req, out := c.AcceptInvitationRequest(input)
return out, req.Send()
}
// AcceptInvitationWithContext is the same as AcceptInvitation with the addition of
// the ability to pass a context and additional request options.
//
// See AcceptInvitation 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 *Detective) AcceptInvitationWithContext(ctx aws.Context, input *AcceptInvitationInput, opts ...request.Option) (*AcceptInvitationOutput, error) {
req, out := c.AcceptInvitationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateGraph = "CreateGraph"
// CreateGraphRequest generates a "aws/request.Request" representing the
// client's request for the CreateGraph 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 CreateGraph for more information on using the CreateGraph
// 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 CreateGraphRequest method.
// req, resp := client.CreateGraphRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateGraph
func (c *Detective) CreateGraphRequest(input *CreateGraphInput) (req *request.Request, output *CreateGraphOutput) {
op := &request.Operation{
Name: opCreateGraph,
HTTPMethod: "POST",
HTTPPath: "/graph",
}
if input == nil {
input = &CreateGraphInput{}
}
output = &CreateGraphOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateGraph API operation for Amazon Detective.
//
// Creates a new behavior graph for the calling account, and sets that account
// as the master account. This operation is called by the account that is enabling
// Detective.
//
// Before you try to enable Detective, make sure that your account has been
// enrolled in Amazon GuardDuty for at least 48 hours. If you do not meet this
// requirement, you cannot enable Detective. If you do meet the GuardDuty prerequisite,
// then when you make the request to enable Detective, it checks whether your
// data volume is within the Detective quota. If it exceeds the quota, then
// you cannot enable Detective.
//
// The operation also enables Detective for the calling account in the currently
// selected Region. It returns the ARN of the new behavior graph.
//
// CreateGraph triggers a process to create the corresponding data tables for
// the new behavior graph.
//
// An account can only be the master account for one behavior graph within a
// Region. If the same account calls CreateGraph with the same master account,
// it always returns the same behavior graph ARN. It does not create a new behavior
// graph.
//
// 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 Amazon Detective's
// API operation CreateGraph for usage and error information.
//
// Returned Error Types:
// * ConflictException
// The request attempted an invalid action.
//
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ServiceQuotaExceededException
// This request cannot be completed for one of the following reasons.
//
// * The request would cause the number of member accounts in the behavior
// graph to exceed the maximum allowed. A behavior graph cannot have more
// than 1000 member accounts.
//
// * The request would cause the data rate for the behavior graph to exceed
// the maximum allowed.
//
// * Detective is unable to verify the data rate for the member account.
// This is usually because the member account is not enrolled in Amazon GuardDuty.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateGraph
func (c *Detective) CreateGraph(input *CreateGraphInput) (*CreateGraphOutput, error) {
req, out := c.CreateGraphRequest(input)
return out, req.Send()
}
// CreateGraphWithContext is the same as CreateGraph with the addition of
// the ability to pass a context and additional request options.
//
// See CreateGraph 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 *Detective) CreateGraphWithContext(ctx aws.Context, input *CreateGraphInput, opts ...request.Option) (*CreateGraphOutput, error) {
req, out := c.CreateGraphRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateMembers = "CreateMembers"
// CreateMembersRequest generates a "aws/request.Request" representing the
// client's request for the CreateMembers 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 CreateMembers for more information on using the CreateMembers
// 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 CreateMembersRequest method.
// req, resp := client.CreateMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateMembers
func (c *Detective) CreateMembersRequest(input *CreateMembersInput) (req *request.Request, output *CreateMembersOutput) {
op := &request.Operation{
Name: opCreateMembers,
HTTPMethod: "POST",
HTTPPath: "/graph/members",
}
if input == nil {
input = &CreateMembersInput{}
}
output = &CreateMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateMembers API operation for Amazon Detective.
//
// Sends a request to invite the specified AWS accounts to be member accounts
// in the behavior graph. This operation can only be called by the master account
// for a behavior graph.
//
// CreateMembers verifies the accounts and then sends invitations to the verified
// accounts.
//
// The request provides the behavior graph ARN and the list of accounts to invite.
//
// The response separates the requested accounts into two lists:
//
// * The accounts that CreateMembers was able to start the verification for.
// This list includes member accounts that are being verified, that have
// passed verification and are being sent an invitation, and that have failed
// verification.
//
// * The accounts that CreateMembers was unable to process. This list includes
// accounts that were already invited to be member accounts in the behavior
// graph.
//
// 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 Amazon Detective's
// API operation CreateMembers for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ResourceNotFoundException
// The request refers to a nonexistent resource.
//
// * ValidationException
// The request parameters are invalid.
//
// * ServiceQuotaExceededException
// This request cannot be completed for one of the following reasons.
//
// * The request would cause the number of member accounts in the behavior
// graph to exceed the maximum allowed. A behavior graph cannot have more
// than 1000 member accounts.
//
// * The request would cause the data rate for the behavior graph to exceed
// the maximum allowed.
//
// * Detective is unable to verify the data rate for the member account.
// This is usually because the member account is not enrolled in Amazon GuardDuty.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateMembers
func (c *Detective) CreateMembers(input *CreateMembersInput) (*CreateMembersOutput, error) {
req, out := c.CreateMembersRequest(input)
return out, req.Send()
}
// CreateMembersWithContext is the same as CreateMembers with the addition of
// the ability to pass a context and additional request options.
//
// See CreateMembers 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 *Detective) CreateMembersWithContext(ctx aws.Context, input *CreateMembersInput, opts ...request.Option) (*CreateMembersOutput, error) {
req, out := c.CreateMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteGraph = "DeleteGraph"
// DeleteGraphRequest generates a "aws/request.Request" representing the
// client's request for the DeleteGraph 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 DeleteGraph for more information on using the DeleteGraph
// 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 DeleteGraphRequest method.
// req, resp := client.DeleteGraphRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteGraph
func (c *Detective) DeleteGraphRequest(input *DeleteGraphInput) (req *request.Request, output *DeleteGraphOutput) {
op := &request.Operation{
Name: opDeleteGraph,
HTTPMethod: "POST",
HTTPPath: "/graph/removal",
}
if input == nil {
input = &DeleteGraphInput{}
}
output = &DeleteGraphOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteGraph API operation for Amazon Detective.
//
// Disables the specified behavior graph and queues it to be deleted. This operation
// removes the graph from each member account's list of behavior graphs.
//
// DeleteGraph can only be called by the master account for a behavior graph.
//
// 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 Amazon Detective's
// API operation DeleteGraph for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ResourceNotFoundException
// The request refers to a nonexistent resource.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteGraph
func (c *Detective) DeleteGraph(input *DeleteGraphInput) (*DeleteGraphOutput, error) {
req, out := c.DeleteGraphRequest(input)
return out, req.Send()
}
// DeleteGraphWithContext is the same as DeleteGraph with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteGraph 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 *Detective) DeleteGraphWithContext(ctx aws.Context, input *DeleteGraphInput, opts ...request.Option) (*DeleteGraphOutput, error) {
req, out := c.DeleteGraphRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteMembers = "DeleteMembers"
// DeleteMembersRequest generates a "aws/request.Request" representing the
// client's request for the DeleteMembers 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 DeleteMembers for more information on using the DeleteMembers
// 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 DeleteMembersRequest method.
// req, resp := client.DeleteMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteMembers
func (c *Detective) DeleteMembersRequest(input *DeleteMembersInput) (req *request.Request, output *DeleteMembersOutput) {
op := &request.Operation{
Name: opDeleteMembers,
HTTPMethod: "POST",
HTTPPath: "/graph/members/removal",
}
if input == nil {
input = &DeleteMembersInput{}
}
output = &DeleteMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteMembers API operation for Amazon Detective.
//
// Deletes one or more member accounts from the master account behavior graph.
// This operation can only be called by a Detective master account. That account
// cannot use DeleteMembers to delete their own account from the behavior graph.
// To disable a behavior graph, the master account uses the DeleteGraph API
// method.
//
// 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 Amazon Detective's
// API operation DeleteMembers for usage and error information.
//
// Returned Error Types:
// * ConflictException
// The request attempted an invalid action.
//
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ResourceNotFoundException
// The request refers to a nonexistent resource.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteMembers
func (c *Detective) DeleteMembers(input *DeleteMembersInput) (*DeleteMembersOutput, error) {
req, out := c.DeleteMembersRequest(input)
return out, req.Send()
}
// DeleteMembersWithContext is the same as DeleteMembers with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteMembers 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 *Detective) DeleteMembersWithContext(ctx aws.Context, input *DeleteMembersInput, opts ...request.Option) (*DeleteMembersOutput, error) {
req, out := c.DeleteMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDisassociateMembership = "DisassociateMembership"
// DisassociateMembershipRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateMembership 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 DisassociateMembership for more information on using the DisassociateMembership
// 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 DisassociateMembershipRequest method.
// req, resp := client.DisassociateMembershipRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DisassociateMembership
func (c *Detective) DisassociateMembershipRequest(input *DisassociateMembershipInput) (req *request.Request, output *DisassociateMembershipOutput) {
op := &request.Operation{
Name: opDisassociateMembership,
HTTPMethod: "POST",
HTTPPath: "/membership/removal",
}
if input == nil {
input = &DisassociateMembershipInput{}
}
output = &DisassociateMembershipOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DisassociateMembership API operation for Amazon Detective.
//
// Removes the member account from the specified behavior graph. This operation
// can only be called by a member account that has the ENABLED status.
//
// 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 Amazon Detective's
// API operation DisassociateMembership for usage and error information.
//
// Returned Error Types:
// * ConflictException
// The request attempted an invalid action.
//
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ResourceNotFoundException
// The request refers to a nonexistent resource.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DisassociateMembership
func (c *Detective) DisassociateMembership(input *DisassociateMembershipInput) (*DisassociateMembershipOutput, error) {
req, out := c.DisassociateMembershipRequest(input)
return out, req.Send()
}
// DisassociateMembershipWithContext is the same as DisassociateMembership with the addition of
// the ability to pass a context and additional request options.
//
// See DisassociateMembership 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 *Detective) DisassociateMembershipWithContext(ctx aws.Context, input *DisassociateMembershipInput, opts ...request.Option) (*DisassociateMembershipOutput, error) {
req, out := c.DisassociateMembershipRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetMembers = "GetMembers"
// GetMembersRequest generates a "aws/request.Request" representing the
// client's request for the GetMembers 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 GetMembers for more information on using the GetMembers
// 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 GetMembersRequest method.
// req, resp := client.GetMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/GetMembers
func (c *Detective) GetMembersRequest(input *GetMembersInput) (req *request.Request, output *GetMembersOutput) {
op := &request.Operation{
Name: opGetMembers,
HTTPMethod: "POST",
HTTPPath: "/graph/members/get",
}
if input == nil {
input = &GetMembersInput{}
}
output = &GetMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// GetMembers API operation for Amazon Detective.
//
// Returns the membership details for specified member accounts for a behavior
// graph.
//
// 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 Amazon Detective's
// API operation GetMembers for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ResourceNotFoundException
// The request refers to a nonexistent resource.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/GetMembers
func (c *Detective) GetMembers(input *GetMembersInput) (*GetMembersOutput, error) {
req, out := c.GetMembersRequest(input)
return out, req.Send()
}
// GetMembersWithContext is the same as GetMembers with the addition of
// the ability to pass a context and additional request options.
//
// See GetMembers 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 *Detective) GetMembersWithContext(ctx aws.Context, input *GetMembersInput, opts ...request.Option) (*GetMembersOutput, error) {
req, out := c.GetMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListGraphs = "ListGraphs"
// ListGraphsRequest generates a "aws/request.Request" representing the
// client's request for the ListGraphs 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 ListGraphs for more information on using the ListGraphs
// 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 ListGraphsRequest method.
// req, resp := client.ListGraphsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListGraphs
func (c *Detective) ListGraphsRequest(input *ListGraphsInput) (req *request.Request, output *ListGraphsOutput) {
op := &request.Operation{
Name: opListGraphs,
HTTPMethod: "POST",
HTTPPath: "/graphs/list",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListGraphsInput{}
}
output = &ListGraphsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListGraphs API operation for Amazon Detective.
//
// Returns the list of behavior graphs that the calling account is a master
// of. This operation can only be called by a master account.
//
// Because an account can currently only be the master of one behavior graph
// within a Region, the results always contain a single graph.
//
// 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 Amazon Detective's
// API operation ListGraphs for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListGraphs
func (c *Detective) ListGraphs(input *ListGraphsInput) (*ListGraphsOutput, error) {
req, out := c.ListGraphsRequest(input)
return out, req.Send()
}
// ListGraphsWithContext is the same as ListGraphs with the addition of
// the ability to pass a context and additional request options.
//
// See ListGraphs 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 *Detective) ListGraphsWithContext(ctx aws.Context, input *ListGraphsInput, opts ...request.Option) (*ListGraphsOutput, error) {
req, out := c.ListGraphsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListGraphsPages iterates over the pages of a ListGraphs operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListGraphs 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 ListGraphs operation.
// pageNum := 0
// err := client.ListGraphsPages(params,
// func(page *detective.ListGraphsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Detective) ListGraphsPages(input *ListGraphsInput, fn func(*ListGraphsOutput, bool) bool) error {
return c.ListGraphsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListGraphsPagesWithContext same as ListGraphsPages 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 *Detective) ListGraphsPagesWithContext(ctx aws.Context, input *ListGraphsInput, fn func(*ListGraphsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListGraphsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListGraphsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListGraphsOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opListInvitations = "ListInvitations"
// ListInvitationsRequest generates a "aws/request.Request" representing the
// client's request for the ListInvitations 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 ListInvitations for more information on using the ListInvitations
// 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 ListInvitationsRequest method.
// req, resp := client.ListInvitationsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListInvitations
func (c *Detective) ListInvitationsRequest(input *ListInvitationsInput) (req *request.Request, output *ListInvitationsOutput) {
op := &request.Operation{
Name: opListInvitations,
HTTPMethod: "POST",
HTTPPath: "/invitations/list",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListInvitationsInput{}
}
output = &ListInvitationsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListInvitations API operation for Amazon Detective.
//
// Retrieves the list of open and accepted behavior graph invitations for the
// member account. This operation can only be called by a member account.
//
// Open invitations are invitations that the member account has not responded
// to.
//
// The results do not include behavior graphs for which the member account declined
// the invitation. The results also do not include behavior graphs that the
// member account resigned from or was removed from.
//
// 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 Amazon Detective's
// API operation ListInvitations for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListInvitations
func (c *Detective) ListInvitations(input *ListInvitationsInput) (*ListInvitationsOutput, error) {
req, out := c.ListInvitationsRequest(input)
return out, req.Send()
}
// ListInvitationsWithContext is the same as ListInvitations with the addition of
// the ability to pass a context and additional request options.
//
// See ListInvitations 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 *Detective) ListInvitationsWithContext(ctx aws.Context, input *ListInvitationsInput, opts ...request.Option) (*ListInvitationsOutput, error) {
req, out := c.ListInvitationsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListInvitationsPages iterates over the pages of a ListInvitations operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListInvitations 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 ListInvitations operation.
// pageNum := 0
// err := client.ListInvitationsPages(params,
// func(page *detective.ListInvitationsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Detective) ListInvitationsPages(input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool) error {
return c.ListInvitationsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListInvitationsPagesWithContext same as ListInvitationsPages 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 *Detective) ListInvitationsPagesWithContext(ctx aws.Context, input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListInvitationsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListInvitationsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListInvitationsOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opListMembers = "ListMembers"
// ListMembersRequest generates a "aws/request.Request" representing the
// client's request for the ListMembers 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 ListMembers for more information on using the ListMembers
// 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 ListMembersRequest method.
// req, resp := client.ListMembersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListMembers
func (c *Detective) ListMembersRequest(input *ListMembersInput) (req *request.Request, output *ListMembersOutput) {
op := &request.Operation{
Name: opListMembers,
HTTPMethod: "POST",
HTTPPath: "/graph/members/list",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListMembersInput{}
}
output = &ListMembersOutput{}
req = c.newRequest(op, input, output)
return
}
// ListMembers API operation for Amazon Detective.
//
// Retrieves the list of member accounts for a behavior graph. Does not return
// member accounts that were removed from the behavior graph.
//
// 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 Amazon Detective's
// API operation ListMembers for usage and error information.
//
// Returned Error Types:
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ResourceNotFoundException
// The request refers to a nonexistent resource.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListMembers
func (c *Detective) ListMembers(input *ListMembersInput) (*ListMembersOutput, error) {
req, out := c.ListMembersRequest(input)
return out, req.Send()
}
// ListMembersWithContext is the same as ListMembers with the addition of
// the ability to pass a context and additional request options.
//
// See ListMembers 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 *Detective) ListMembersWithContext(ctx aws.Context, input *ListMembersInput, opts ...request.Option) (*ListMembersOutput, error) {
req, out := c.ListMembersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListMembersPages iterates over the pages of a ListMembers operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListMembers 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 ListMembers operation.
// pageNum := 0
// err := client.ListMembersPages(params,
// func(page *detective.ListMembersOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *Detective) ListMembersPages(input *ListMembersInput, fn func(*ListMembersOutput, bool) bool) error {
return c.ListMembersPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListMembersPagesWithContext same as ListMembersPages 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 *Detective) ListMembersPagesWithContext(ctx aws.Context, input *ListMembersInput, fn func(*ListMembersOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListMembersInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListMembersRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
for p.Next() {
if !fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) {
break
}
}
return p.Err()
}
const opRejectInvitation = "RejectInvitation"
// RejectInvitationRequest generates a "aws/request.Request" representing the
// client's request for the RejectInvitation 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 RejectInvitation for more information on using the RejectInvitation
// 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 RejectInvitationRequest method.
// req, resp := client.RejectInvitationRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/RejectInvitation
func (c *Detective) RejectInvitationRequest(input *RejectInvitationInput) (req *request.Request, output *RejectInvitationOutput) {
op := &request.Operation{
Name: opRejectInvitation,
HTTPMethod: "POST",
HTTPPath: "/invitation/removal",
}
if input == nil {
input = &RejectInvitationInput{}
}
output = &RejectInvitationOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// RejectInvitation API operation for Amazon Detective.
//
// Rejects an invitation to contribute the account data to a behavior graph.
// This operation must be called by a member account that has the INVITED status.
//
// 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 Amazon Detective's
// API operation RejectInvitation for usage and error information.
//
// Returned Error Types:
// * ConflictException
// The request attempted an invalid action.
//
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ResourceNotFoundException
// The request refers to a nonexistent resource.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/RejectInvitation
func (c *Detective) RejectInvitation(input *RejectInvitationInput) (*RejectInvitationOutput, error) {
req, out := c.RejectInvitationRequest(input)
return out, req.Send()
}
// RejectInvitationWithContext is the same as RejectInvitation with the addition of
// the ability to pass a context and additional request options.
//
// See RejectInvitation 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 *Detective) RejectInvitationWithContext(ctx aws.Context, input *RejectInvitationInput, opts ...request.Option) (*RejectInvitationOutput, error) {
req, out := c.RejectInvitationRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opStartMonitoringMember = "StartMonitoringMember"
// StartMonitoringMemberRequest generates a "aws/request.Request" representing the
// client's request for the StartMonitoringMember 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 StartMonitoringMember for more information on using the StartMonitoringMember
// 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 StartMonitoringMemberRequest method.
// req, resp := client.StartMonitoringMemberRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/StartMonitoringMember
func (c *Detective) StartMonitoringMemberRequest(input *StartMonitoringMemberInput) (req *request.Request, output *StartMonitoringMemberOutput) {
op := &request.Operation{
Name: opStartMonitoringMember,
HTTPMethod: "POST",
HTTPPath: "/graph/member/monitoringstate",
}
if input == nil {
input = &StartMonitoringMemberInput{}
}
output = &StartMonitoringMemberOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// StartMonitoringMember API operation for Amazon Detective.
//
// Sends a request to enable data ingest for a member account that has a status
// of ACCEPTED_BUT_DISABLED.
//
// For valid member accounts, the status is updated as follows.
//
// * If Detective enabled the member account, then the new status is ENABLED.
//
// * If Detective cannot enable the member account, the status remains ACCEPTED_BUT_DISABLED.
//
// 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 Amazon Detective's
// API operation StartMonitoringMember for usage and error information.
//
// Returned Error Types:
// * ConflictException
// The request attempted an invalid action.
//
// * InternalServerException
// The request was valid but failed because of a problem with the service.
//
// * ResourceNotFoundException
// The request refers to a nonexistent resource.
//
// * ServiceQuotaExceededException
// This request cannot be completed for one of the following reasons.
//
// * The request would cause the number of member accounts in the behavior
// graph to exceed the maximum allowed. A behavior graph cannot have more
// than 1000 member accounts.
//
// * The request would cause the data rate for the behavior graph to exceed
// the maximum allowed.
//
// * Detective is unable to verify the data rate for the member account.
// This is usually because the member account is not enrolled in Amazon GuardDuty.
//
// * ValidationException
// The request parameters are invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/StartMonitoringMember
func (c *Detective) StartMonitoringMember(input *StartMonitoringMemberInput) (*StartMonitoringMemberOutput, error) {
req, out := c.StartMonitoringMemberRequest(input)
return out, req.Send()
}
// StartMonitoringMemberWithContext is the same as StartMonitoringMember with the addition of
// the ability to pass a context and additional request options.
//
// See StartMonitoringMember 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 *Detective) StartMonitoringMemberWithContext(ctx aws.Context, input *StartMonitoringMemberInput, opts ...request.Option) (*StartMonitoringMemberOutput, error) {
req, out := c.StartMonitoringMemberRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
type AcceptInvitationInput struct {
_ struct{} `type:"structure"`
// The ARN of the behavior graph that the member account is accepting the invitation
// for.
//
// The member account status in the behavior graph must be INVITED.
//
// GraphArn is a required field
GraphArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s AcceptInvitationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AcceptInvitationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AcceptInvitationInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "AcceptInvitationInput"}
if s.GraphArn == nil {
invalidParams.Add(request.NewErrParamRequired("GraphArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGraphArn sets the GraphArn field's value.
func (s *AcceptInvitationInput) SetGraphArn(v string) *AcceptInvitationInput {
s.GraphArn = &v
return s
}
type AcceptInvitationOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s AcceptInvitationOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AcceptInvitationOutput) GoString() string {
return s.String()
}
// An AWS account that is the master of or a member of a behavior graph.
type Account struct {
_ struct{} `type:"structure"`
// The account identifier of the AWS account.
//
// AccountId is a required field
AccountId *string `min:"12" type:"string" required:"true"`
// The AWS account root user email address for the AWS account.
//
// EmailAddress is a required field
EmailAddress *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s Account) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Account) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Account) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Account"}
if s.AccountId == nil {
invalidParams.Add(request.NewErrParamRequired("AccountId"))
}
if s.AccountId != nil && len(*s.AccountId) < 12 {
invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
}
if s.EmailAddress == nil {
invalidParams.Add(request.NewErrParamRequired("EmailAddress"))
}
if s.EmailAddress != nil && len(*s.EmailAddress) < 1 {
invalidParams.Add(request.NewErrParamMinLen("EmailAddress", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAccountId sets the AccountId field's value.
func (s *Account) SetAccountId(v string) *Account {
s.AccountId = &v
return s
}
// SetEmailAddress sets the EmailAddress field's value.
func (s *Account) SetEmailAddress(v string) *Account {
s.EmailAddress = &v
return s
}
// The request attempted an invalid action.
type ConflictException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ConflictException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ConflictException) GoString() string {
return s.String()
}
func newErrorConflictException(v protocol.ResponseMetadata) error {
return &ConflictException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ConflictException) Code() string {
return "ConflictException"
}
// Message returns the exception's message.
func (s *ConflictException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ConflictException) OrigErr() error {
return nil
}
func (s *ConflictException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ConflictException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ConflictException) RequestID() string {
return s.RespMetadata.RequestID
}
type CreateGraphInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s CreateGraphInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateGraphInput) GoString() string {
return s.String()
}
type CreateGraphOutput struct {
_ struct{} `type:"structure"`
// The ARN of the new behavior graph.
GraphArn *string `type:"string"`
}
// String returns the string representation
func (s CreateGraphOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateGraphOutput) GoString() string {
return s.String()
}
// SetGraphArn sets the GraphArn field's value.
func (s *CreateGraphOutput) SetGraphArn(v string) *CreateGraphOutput {
s.GraphArn = &v
return s
}
type CreateMembersInput struct {
_ struct{} `type:"structure"`
// The list of AWS accounts to invite to become member accounts in the behavior
// graph. For each invited account, the account list contains the account identifier
// and the AWS account root user email address.
//
// Accounts is a required field
Accounts []*Account `min:"1" type:"list" required:"true"`
// The ARN of the behavior graph to invite the member accounts to contribute
// their data to.
//
// GraphArn is a required field
GraphArn *string `type:"string" required:"true"`
// Customized message text to include in the invitation email message to the
// invited member accounts.
Message *string `min:"1" type:"string"`
}
// String returns the string representation
func (s CreateMembersInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateMembersInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateMembersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateMembersInput"}
if s.Accounts == nil {
invalidParams.Add(request.NewErrParamRequired("Accounts"))
}
if s.Accounts != nil && len(s.Accounts) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Accounts", 1))
}
if s.GraphArn == nil {
invalidParams.Add(request.NewErrParamRequired("GraphArn"))
}
if s.Message != nil && len(*s.Message) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Message", 1))
}
if s.Accounts != nil {
for i, v := range s.Accounts {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Accounts", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAccounts sets the Accounts field's value.
func (s *CreateMembersInput) SetAccounts(v []*Account) *CreateMembersInput {
s.Accounts = v
return s
}
// SetGraphArn sets the GraphArn field's value.
func (s *CreateMembersInput) SetGraphArn(v string) *CreateMembersInput {
s.GraphArn = &v
return s
}
// SetMessage sets the Message field's value.
func (s *CreateMembersInput) SetMessage(v string) *CreateMembersInput {
s.Message = &v
return s
}
type CreateMembersOutput struct {
_ struct{} `type:"structure"`
// The set of member account invitation requests that Detective was able to
// process. This includes accounts that are being verified, that failed verification,
// and that passed verification and are being sent an invitation.
Members []*MemberDetail `type:"list"`
// The list of accounts for which Detective was unable to process the invitation
// request. For each account, the list provides the reason why the request could
// not be processed. The list includes accounts that are already member accounts
// in the behavior graph.
UnprocessedAccounts []*UnprocessedAccount `type:"list"`
}
// String returns the string representation
func (s CreateMembersOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateMembersOutput) GoString() string {
return s.String()
}
// SetMembers sets the Members field's value.
func (s *CreateMembersOutput) SetMembers(v []*MemberDetail) *CreateMembersOutput {
s.Members = v
return s
}
// SetUnprocessedAccounts sets the UnprocessedAccounts field's value.
func (s *CreateMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *CreateMembersOutput {
s.UnprocessedAccounts = v
return s
}
type DeleteGraphInput struct {
_ struct{} `type:"structure"`
// The ARN of the behavior graph to disable.
//
// GraphArn is a required field
GraphArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteGraphInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteGraphInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteGraphInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteGraphInput"}
if s.GraphArn == nil {
invalidParams.Add(request.NewErrParamRequired("GraphArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGraphArn sets the GraphArn field's value.
func (s *DeleteGraphInput) SetGraphArn(v string) *DeleteGraphInput {
s.GraphArn = &v
return s
}
type DeleteGraphOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteGraphOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteGraphOutput) GoString() string {
return s.String()
}
type DeleteMembersInput struct {
_ struct{} `type:"structure"`
// The list of AWS account identifiers for the member accounts to delete from
// the behavior graph.
//
// AccountIds is a required field
AccountIds []*string `min:"1" type:"list" required:"true"`
// The ARN of the behavior graph to delete members from.
//
// GraphArn is a required field
GraphArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteMembersInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteMembersInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteMembersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteMembersInput"}
if s.AccountIds == nil {
invalidParams.Add(request.NewErrParamRequired("AccountIds"))
}
if s.AccountIds != nil && len(s.AccountIds) < 1 {
invalidParams.Add(request.NewErrParamMinLen("AccountIds", 1))
}
if s.GraphArn == nil {
invalidParams.Add(request.NewErrParamRequired("GraphArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAccountIds sets the AccountIds field's value.
func (s *DeleteMembersInput) SetAccountIds(v []*string) *DeleteMembersInput {
s.AccountIds = v
return s
}
// SetGraphArn sets the GraphArn field's value.
func (s *DeleteMembersInput) SetGraphArn(v string) *DeleteMembersInput {
s.GraphArn = &v
return s
}
type DeleteMembersOutput struct {
_ struct{} `type:"structure"`
// The list of AWS account identifiers for the member accounts that Detective
// successfully deleted from the behavior graph.
AccountIds []*string `min:"1" type:"list"`
// The list of member accounts that Detective was not able to delete from the
// behavior graph. For each member account, provides the reason that the deletion
// could not be processed.
UnprocessedAccounts []*UnprocessedAccount `type:"list"`
}
// String returns the string representation
func (s DeleteMembersOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteMembersOutput) GoString() string {
return s.String()
}
// SetAccountIds sets the AccountIds field's value.
func (s *DeleteMembersOutput) SetAccountIds(v []*string) *DeleteMembersOutput {
s.AccountIds = v
return s
}
// SetUnprocessedAccounts sets the UnprocessedAccounts field's value.
func (s *DeleteMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *DeleteMembersOutput {
s.UnprocessedAccounts = v
return s
}
type DisassociateMembershipInput struct {
_ struct{} `type:"structure"`
// The ARN of the behavior graph to remove the member account from.
//
// The member account's member status in the behavior graph must be ENABLED.
//
// GraphArn is a required field
GraphArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DisassociateMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisassociateMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DisassociateMembershipInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DisassociateMembershipInput"}
if s.GraphArn == nil {
invalidParams.Add(request.NewErrParamRequired("GraphArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGraphArn sets the GraphArn field's value.
func (s *DisassociateMembershipInput) SetGraphArn(v string) *DisassociateMembershipInput {
s.GraphArn = &v
return s
}
type DisassociateMembershipOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DisassociateMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisassociateMembershipOutput) GoString() string {
return s.String()
}
type GetMembersInput struct {
_ struct{} `type:"structure"`
// The list of AWS account identifiers for the member account for which to return
// member details.
//
// You cannot use GetMembers to retrieve information about member accounts that
// were removed from the behavior graph.
//
// AccountIds is a required field
AccountIds []*string `min:"1" type:"list" required:"true"`
// The ARN of the behavior graph for which to request the member details.
//
// GraphArn is a required field
GraphArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s GetMembersInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetMembersInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetMembersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetMembersInput"}
if s.AccountIds == nil {
invalidParams.Add(request.NewErrParamRequired("AccountIds"))
}
if s.AccountIds != nil && len(s.AccountIds) < 1 {
invalidParams.Add(request.NewErrParamMinLen("AccountIds", 1))
}
if s.GraphArn == nil {
invalidParams.Add(request.NewErrParamRequired("GraphArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAccountIds sets the AccountIds field's value.
func (s *GetMembersInput) SetAccountIds(v []*string) *GetMembersInput {
s.AccountIds = v
return s
}
// SetGraphArn sets the GraphArn field's value.
func (s *GetMembersInput) SetGraphArn(v string) *GetMembersInput {
s.GraphArn = &v
return s
}
type GetMembersOutput struct {
_ struct{} `type:"structure"`
// The member account details that Detective is returning in response to the
// request.
MemberDetails []*MemberDetail `type:"list"`
// The requested member accounts for which Detective was unable to return member
// details.
//
// For each account, provides the reason why the request could not be processed.
UnprocessedAccounts []*UnprocessedAccount `type:"list"`
}
// String returns the string representation
func (s GetMembersOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetMembersOutput) GoString() string {
return s.String()
}
// SetMemberDetails sets the MemberDetails field's value.
func (s *GetMembersOutput) SetMemberDetails(v []*MemberDetail) *GetMembersOutput {
s.MemberDetails = v
return s
}
// SetUnprocessedAccounts sets the UnprocessedAccounts field's value.
func (s *GetMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *GetMembersOutput {
s.UnprocessedAccounts = v
return s
}
// A behavior graph in Detective.
type Graph struct {
_ struct{} `type:"structure"`
// The ARN of the behavior graph.
Arn *string `type:"string"`
// The date and time that the behavior graph was created. The value is in milliseconds
// since the epoch.
CreatedTime *time.Time `type:"timestamp"`
}
// String returns the string representation
func (s Graph) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Graph) GoString() string {
return s.String()
}
// SetArn sets the Arn field's value.
func (s *Graph) SetArn(v string) *Graph {
s.Arn = &v
return s
}
// SetCreatedTime sets the CreatedTime field's value.
func (s *Graph) SetCreatedTime(v time.Time) *Graph {
s.CreatedTime = &v
return s
}
// The request was valid but failed because of a problem with the service.
type InternalServerException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s InternalServerException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s InternalServerException) GoString() string {
return s.String()
}
func newErrorInternalServerException(v protocol.ResponseMetadata) error {
return &InternalServerException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *InternalServerException) Code() string {
return "InternalServerException"
}
// Message returns the exception's message.
func (s *InternalServerException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *InternalServerException) OrigErr() error {
return nil
}
func (s *InternalServerException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *InternalServerException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *InternalServerException) RequestID() string {
return s.RespMetadata.RequestID
}
type ListGraphsInput struct {
_ struct{} `type:"structure"`
// The maximum number of graphs to return at a time. The total must be less
// than the overall limit on the number of results to return, which is currently
// 200.
MaxResults *int64 `min:"1" type:"integer"`
// For requests to get the next page of results, the pagination token that was
// returned with the previous set of results. The initial request does not include
// a pagination token.
NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListGraphsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListGraphsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListGraphsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListGraphsInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.NextToken != nil && len(*s.NextToken) < 1 {
invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListGraphsInput) SetMaxResults(v int64) *ListGraphsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListGraphsInput) SetNextToken(v string) *ListGraphsInput {
s.NextToken = &v
return s
}
type ListGraphsOutput struct {
_ struct{} `type:"structure"`
// A list of behavior graphs that the account is a master for.
GraphList []*Graph `type:"list"`
// If there are more behavior graphs remaining in the results, then this is
// the pagination token to use to request the next page of behavior graphs.
NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListGraphsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListGraphsOutput) GoString() string {
return s.String()
}
// SetGraphList sets the GraphList field's value.
func (s *ListGraphsOutput) SetGraphList(v []*Graph) *ListGraphsOutput {
s.GraphList = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListGraphsOutput) SetNextToken(v string) *ListGraphsOutput {
s.NextToken = &v
return s
}
type ListInvitationsInput struct {
_ struct{} `type:"structure"`
// The maximum number of behavior graph invitations to return in the response.
// The total must be less than the overall limit on the number of results to
// return, which is currently 200.
MaxResults *int64 `min:"1" type:"integer"`
// For requests to retrieve the next page of results, the pagination token that
// was returned with the previous page of results. The initial request does
// not include a pagination token.
NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListInvitationsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListInvitationsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListInvitationsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListInvitationsInput"}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.NextToken != nil && len(*s.NextToken) < 1 {
invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListInvitationsInput) SetMaxResults(v int64) *ListInvitationsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListInvitationsInput) SetNextToken(v string) *ListInvitationsInput {
s.NextToken = &v
return s
}
type ListInvitationsOutput struct {
_ struct{} `type:"structure"`
// The list of behavior graphs for which the member account has open or accepted
// invitations.
Invitations []*MemberDetail `type:"list"`
// If there are more behavior graphs remaining in the results, then this is
// the pagination token to use to request the next page of behavior graphs.
NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListInvitationsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListInvitationsOutput) GoString() string {
return s.String()
}
// SetInvitations sets the Invitations field's value.
func (s *ListInvitationsOutput) SetInvitations(v []*MemberDetail) *ListInvitationsOutput {
s.Invitations = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListInvitationsOutput) SetNextToken(v string) *ListInvitationsOutput {
s.NextToken = &v
return s
}
type ListMembersInput struct {
_ struct{} `type:"structure"`
// The ARN of the behavior graph for which to retrieve the list of member accounts.
//
// GraphArn is a required field
GraphArn *string `type:"string" required:"true"`
// The maximum number of member accounts to include in the response. The total
// must be less than the overall limit on the number of results to return, which
// is currently 200.
MaxResults *int64 `min:"1" type:"integer"`
// For requests to retrieve the next page of member account results, the pagination
// token that was returned with the previous page of results. The initial request
// does not include a pagination token.
NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListMembersInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListMembersInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListMembersInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListMembersInput"}
if s.GraphArn == nil {
invalidParams.Add(request.NewErrParamRequired("GraphArn"))
}
if s.MaxResults != nil && *s.MaxResults < 1 {
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
}
if s.NextToken != nil && len(*s.NextToken) < 1 {
invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGraphArn sets the GraphArn field's value.
func (s *ListMembersInput) SetGraphArn(v string) *ListMembersInput {
s.GraphArn = &v
return s
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListMembersInput) SetMaxResults(v int64) *ListMembersInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListMembersInput) SetNextToken(v string) *ListMembersInput {
s.NextToken = &v
return s
}
type ListMembersOutput struct {
_ struct{} `type:"structure"`
// The list of member accounts in the behavior graph.
//
// The results include member accounts that did not pass verification and member
// accounts that have not yet accepted the invitation to the behavior graph.
// The results do not include member accounts that were removed from the behavior
// graph.
MemberDetails []*MemberDetail `type:"list"`
// If there are more member accounts remaining in the results, then this is
// the pagination token to use to request the next page of member accounts.
NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListMembersOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListMembersOutput) GoString() string {
return s.String()
}
// SetMemberDetails sets the MemberDetails field's value.
func (s *ListMembersOutput) SetMemberDetails(v []*MemberDetail) *ListMembersOutput {
s.MemberDetails = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListMembersOutput) SetNextToken(v string) *ListMembersOutput {
s.NextToken = &v
return s
}
// Details about a member account that was invited to contribute to a behavior
// graph.
type MemberDetail struct {
_ struct{} `type:"structure"`
// The AWS account identifier for the member account.
AccountId *string `min:"12" type:"string"`
// For member accounts with a status of ACCEPTED_BUT_DISABLED, the reason that
// the member account is not enabled.
//
// The reason can have one of the following values:
//
// * VOLUME_TOO_HIGH - Indicates that adding the member account would cause
// the data volume for the behavior graph to be too high.
//
// * VOLUME_UNKNOWN - Indicates that Detective is unable to verify the data
// volume for the member account. This is usually because the member account
// is not enrolled in Amazon GuardDuty.
DisabledReason *string `type:"string" enum:"MemberDisabledReason"`
// The AWS account root user email address for the member account.
EmailAddress *string `min:"1" type:"string"`
// The ARN of the behavior graph that the member account was invited to.
GraphArn *string `type:"string"`
// The date and time that Detective sent the invitation to the member account.
// The value is in milliseconds since the epoch.
InvitedTime *time.Time `type:"timestamp"`
// The AWS account identifier of the master account for the behavior graph.
MasterId *string `min:"12" type:"string"`
// The member account data volume as a percentage of the maximum allowed data
// volume. 0 indicates 0 percent, and 100 indicates 100 percent.
//
// Note that this is not the percentage of the behavior graph data volume.
//
// For example, the data volume for the behavior graph is 80 GB per day. The
// maximum data volume is 160 GB per day. If the data volume for the member
// account is 40 GB per day, then PercentOfGraphUtilization is 25. It represents
// 25% of the maximum allowed data volume.
PercentOfGraphUtilization *float64 `type:"double"`
// The date and time when the graph utilization percentage was last updated.
PercentOfGraphUtilizationUpdatedTime *time.Time `type:"timestamp"`
// The current membership status of the member account. The status can have
// one of the following values:
//
// * INVITED - Indicates that the member was sent an invitation but has not
// yet responded.
//
// * VERIFICATION_IN_PROGRESS - Indicates that Detective is verifying that
// the account identifier and email address provided for the member account
// match. If they do match, then Detective sends the invitation. If the email
// address and account identifier don't match, then the member cannot be
// added to the behavior graph.
//
// * VERIFICATION_FAILED - Indicates that the account and email address provided
// for the member account do not match, and Detective did not send an invitation
// to the account.
//
// * ENABLED - Indicates that the member account accepted the invitation
// to contribute to the behavior graph.
//
// * ACCEPTED_BUT_DISABLED - Indicates that the member account accepted the
// invitation but is prevented from contributing data to the behavior graph.
// DisabledReason provides the reason why the member account is not enabled.
//
// Member accounts that declined an invitation or that were removed from the
// behavior graph are not included.
Status *string `type:"string" enum:"MemberStatus"`
// The date and time that the member account was last updated. The value is
// in milliseconds since the epoch.
UpdatedTime *time.Time `type:"timestamp"`
}
// String returns the string representation
func (s MemberDetail) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s MemberDetail) GoString() string {
return s.String()
}
// SetAccountId sets the AccountId field's value.
func (s *MemberDetail) SetAccountId(v string) *MemberDetail {
s.AccountId = &v
return s
}
// SetDisabledReason sets the DisabledReason field's value.
func (s *MemberDetail) SetDisabledReason(v string) *MemberDetail {
s.DisabledReason = &v
return s
}
// SetEmailAddress sets the EmailAddress field's value.
func (s *MemberDetail) SetEmailAddress(v string) *MemberDetail {
s.EmailAddress = &v
return s
}
// SetGraphArn sets the GraphArn field's value.
func (s *MemberDetail) SetGraphArn(v string) *MemberDetail {
s.GraphArn = &v
return s
}
// SetInvitedTime sets the InvitedTime field's value.
func (s *MemberDetail) SetInvitedTime(v time.Time) *MemberDetail {
s.InvitedTime = &v
return s
}
// SetMasterId sets the MasterId field's value.
func (s *MemberDetail) SetMasterId(v string) *MemberDetail {
s.MasterId = &v
return s
}
// SetPercentOfGraphUtilization sets the PercentOfGraphUtilization field's value.
func (s *MemberDetail) SetPercentOfGraphUtilization(v float64) *MemberDetail {
s.PercentOfGraphUtilization = &v
return s
}
// SetPercentOfGraphUtilizationUpdatedTime sets the PercentOfGraphUtilizationUpdatedTime field's value.
func (s *MemberDetail) SetPercentOfGraphUtilizationUpdatedTime(v time.Time) *MemberDetail {
s.PercentOfGraphUtilizationUpdatedTime = &v
return s
}
// SetStatus sets the Status field's value.
func (s *MemberDetail) SetStatus(v string) *MemberDetail {
s.Status = &v
return s
}
// SetUpdatedTime sets the UpdatedTime field's value.
func (s *MemberDetail) SetUpdatedTime(v time.Time) *MemberDetail {
s.UpdatedTime = &v
return s
}
type RejectInvitationInput struct {
_ struct{} `type:"structure"`
// The ARN of the behavior graph to reject the invitation to.
//
// The member account's current member status in the behavior graph must be
// INVITED.
//
// GraphArn is a required field
GraphArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s RejectInvitationInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RejectInvitationInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *RejectInvitationInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "RejectInvitationInput"}
if s.GraphArn == nil {
invalidParams.Add(request.NewErrParamRequired("GraphArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetGraphArn sets the GraphArn field's value.
func (s *RejectInvitationInput) SetGraphArn(v string) *RejectInvitationInput {
s.GraphArn = &v
return s
}
type RejectInvitationOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s RejectInvitationOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s RejectInvitationOutput) GoString() string {
return s.String()
}
// The request refers to a nonexistent resource.
type ResourceNotFoundException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ResourceNotFoundException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ResourceNotFoundException) GoString() string {
return s.String()
}
func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
return &ResourceNotFoundException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ResourceNotFoundException) Code() string {
return "ResourceNotFoundException"
}
// Message returns the exception's message.
func (s *ResourceNotFoundException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ResourceNotFoundException) OrigErr() error {
return nil
}
func (s *ResourceNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ResourceNotFoundException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ResourceNotFoundException) RequestID() string {
return s.RespMetadata.RequestID
}
// This request cannot be completed for one of the following reasons.
//
// * The request would cause the number of member accounts in the behavior
// graph to exceed the maximum allowed. A behavior graph cannot have more
// than 1000 member accounts.
//
// * The request would cause the data rate for the behavior graph to exceed
// the maximum allowed.
//
// * Detective is unable to verify the data rate for the member account.
// This is usually because the member account is not enrolled in Amazon GuardDuty.
type ServiceQuotaExceededException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ServiceQuotaExceededException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ServiceQuotaExceededException) GoString() string {
return s.String()
}
func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error {
return &ServiceQuotaExceededException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ServiceQuotaExceededException) Code() string {
return "ServiceQuotaExceededException"
}
// Message returns the exception's message.
func (s *ServiceQuotaExceededException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ServiceQuotaExceededException) OrigErr() error {
return nil
}
func (s *ServiceQuotaExceededException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ServiceQuotaExceededException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ServiceQuotaExceededException) RequestID() string {
return s.RespMetadata.RequestID
}
type StartMonitoringMemberInput struct {
_ struct{} `type:"structure"`
// The account ID of the member account to try to enable.
//
// The account must be an invited member account with a status of ACCEPTED_BUT_DISABLED.
//
// AccountId is a required field
AccountId *string `min:"12" type:"string" required:"true"`
// The ARN of the behavior graph.
//
// GraphArn is a required field
GraphArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s StartMonitoringMemberInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s StartMonitoringMemberInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *StartMonitoringMemberInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "StartMonitoringMemberInput"}
if s.AccountId == nil {
invalidParams.Add(request.NewErrParamRequired("AccountId"))
}
if s.AccountId != nil && len(*s.AccountId) < 12 {
invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
}
if s.GraphArn == nil {
invalidParams.Add(request.NewErrParamRequired("GraphArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAccountId sets the AccountId field's value.
func (s *StartMonitoringMemberInput) SetAccountId(v string) *StartMonitoringMemberInput {
s.AccountId = &v
return s
}
// SetGraphArn sets the GraphArn field's value.
func (s *StartMonitoringMemberInput) SetGraphArn(v string) *StartMonitoringMemberInput {
s.GraphArn = &v
return s
}
type StartMonitoringMemberOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s StartMonitoringMemberOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s StartMonitoringMemberOutput) GoString() string {
return s.String()
}
// A member account that was included in a request but for which the request
// could not be processed.
type UnprocessedAccount struct {
_ struct{} `type:"structure"`
// The AWS account identifier of the member account that was not processed.
AccountId *string `min:"12" type:"string"`
// The reason that the member account request could not be processed.
Reason *string `type:"string"`
}
// String returns the string representation
func (s UnprocessedAccount) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s UnprocessedAccount) GoString() string {
return s.String()
}
// SetAccountId sets the AccountId field's value.
func (s *UnprocessedAccount) SetAccountId(v string) *UnprocessedAccount {
s.AccountId = &v
return s
}
// SetReason sets the Reason field's value.
func (s *UnprocessedAccount) SetReason(v string) *UnprocessedAccount {
s.Reason = &v
return s
}
// The request parameters are invalid.
type ValidationException struct {
_ struct{} `type:"structure"`
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
Message_ *string `locationName:"Message" type:"string"`
}
// String returns the string representation
func (s ValidationException) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ValidationException) GoString() string {
return s.String()
}
func newErrorValidationException(v protocol.ResponseMetadata) error {
return &ValidationException{
RespMetadata: v,
}
}
// Code returns the exception type name.
func (s *ValidationException) Code() string {
return "ValidationException"
}
// Message returns the exception's message.
func (s *ValidationException) Message() string {
if s.Message_ != nil {
return *s.Message_
}
return ""
}
// OrigErr always returns nil, satisfies awserr.Error interface.
func (s *ValidationException) OrigErr() error {
return nil
}
func (s *ValidationException) Error() string {
return fmt.Sprintf("%s: %s", s.Code(), s.Message())
}
// Status code returns the HTTP status code for the request's response error.
func (s *ValidationException) StatusCode() int {
return s.RespMetadata.StatusCode
}
// RequestID returns the service's response RequestID for request.
func (s *ValidationException) RequestID() string {
return s.RespMetadata.RequestID
}
const (
// MemberDisabledReasonVolumeTooHigh is a MemberDisabledReason enum value
MemberDisabledReasonVolumeTooHigh = "VOLUME_TOO_HIGH"
// MemberDisabledReasonVolumeUnknown is a MemberDisabledReason enum value
MemberDisabledReasonVolumeUnknown = "VOLUME_UNKNOWN"
)
// MemberDisabledReason_Values returns all elements of the MemberDisabledReason enum
func MemberDisabledReason_Values() []string {
return []string{
MemberDisabledReasonVolumeTooHigh,
MemberDisabledReasonVolumeUnknown,
}
}
const (
// MemberStatusInvited is a MemberStatus enum value
MemberStatusInvited = "INVITED"
// MemberStatusVerificationInProgress is a MemberStatus enum value
MemberStatusVerificationInProgress = "VERIFICATION_IN_PROGRESS"
// MemberStatusVerificationFailed is a MemberStatus enum value
MemberStatusVerificationFailed = "VERIFICATION_FAILED"
// MemberStatusEnabled is a MemberStatus enum value
MemberStatusEnabled = "ENABLED"
// MemberStatusAcceptedButDisabled is a MemberStatus enum value
MemberStatusAcceptedButDisabled = "ACCEPTED_BUT_DISABLED"
)
// MemberStatus_Values returns all elements of the MemberStatus enum
func MemberStatus_Values() []string {
return []string{
MemberStatusInvited,
MemberStatusVerificationInProgress,
MemberStatusVerificationFailed,
MemberStatusEnabled,
MemberStatusAcceptedButDisabled,
}
}
|