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
|
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package fms
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opAssociateAdminAccount = "AssociateAdminAccount"
// AssociateAdminAccountRequest generates a "aws/request.Request" representing the
// client's request for the AssociateAdminAccount 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 AssociateAdminAccount for more information on using the AssociateAdminAccount
// 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 AssociateAdminAccountRequest method.
// req, resp := client.AssociateAdminAccountRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount
func (c *FMS) AssociateAdminAccountRequest(input *AssociateAdminAccountInput) (req *request.Request, output *AssociateAdminAccountOutput) {
op := &request.Operation{
Name: opAssociateAdminAccount,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &AssociateAdminAccountInput{}
}
output = &AssociateAdminAccountOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AssociateAdminAccount API operation for Firewall Management Service.
//
// Sets the AWS Firewall Manager administrator account. AWS Firewall Manager
// must be associated with the master account your AWS organization or associated
// with a member account that has the appropriate permissions. If the account
// ID that you submit is not an AWS Organizations master account, AWS Firewall
// Manager will set the appropriate permissions for the given member account.
//
// The account that you associate with AWS Firewall Manager is called the AWS
// Firewall Manager administrator account.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Firewall Management Service's
// API operation AssociateAdminAccount for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The parameters of the request were invalid.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount
func (c *FMS) AssociateAdminAccount(input *AssociateAdminAccountInput) (*AssociateAdminAccountOutput, error) {
req, out := c.AssociateAdminAccountRequest(input)
return out, req.Send()
}
// AssociateAdminAccountWithContext is the same as AssociateAdminAccount with the addition of
// the ability to pass a context and additional request options.
//
// See AssociateAdminAccount 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 *FMS) AssociateAdminAccountWithContext(ctx aws.Context, input *AssociateAdminAccountInput, opts ...request.Option) (*AssociateAdminAccountOutput, error) {
req, out := c.AssociateAdminAccountRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteNotificationChannel = "DeleteNotificationChannel"
// DeleteNotificationChannelRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNotificationChannel 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 DeleteNotificationChannel for more information on using the DeleteNotificationChannel
// 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 DeleteNotificationChannelRequest method.
// req, resp := client.DeleteNotificationChannelRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel
func (c *FMS) DeleteNotificationChannelRequest(input *DeleteNotificationChannelInput) (req *request.Request, output *DeleteNotificationChannelOutput) {
op := &request.Operation{
Name: opDeleteNotificationChannel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteNotificationChannelInput{}
}
output = &DeleteNotificationChannelOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteNotificationChannel API operation for Firewall Management Service.
//
// Deletes an AWS Firewall Manager association with the IAM role and the Amazon
// Simple Notification Service (SNS) topic that is used to record AWS Firewall
// Manager SNS logs.
//
// 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 Firewall Management Service's
// API operation DeleteNotificationChannel for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel
func (c *FMS) DeleteNotificationChannel(input *DeleteNotificationChannelInput) (*DeleteNotificationChannelOutput, error) {
req, out := c.DeleteNotificationChannelRequest(input)
return out, req.Send()
}
// DeleteNotificationChannelWithContext is the same as DeleteNotificationChannel with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteNotificationChannel 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 *FMS) DeleteNotificationChannelWithContext(ctx aws.Context, input *DeleteNotificationChannelInput, opts ...request.Option) (*DeleteNotificationChannelOutput, error) {
req, out := c.DeleteNotificationChannelRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeletePolicy = "DeletePolicy"
// DeletePolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeletePolicy 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 DeletePolicy for more information on using the DeletePolicy
// 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 DeletePolicyRequest method.
// req, resp := client.DeletePolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy
func (c *FMS) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) {
op := &request.Operation{
Name: opDeletePolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeletePolicyInput{}
}
output = &DeletePolicyOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeletePolicy API operation for Firewall Management Service.
//
// Permanently deletes an AWS Firewall Manager policy.
//
// 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 Firewall Management Service's
// API operation DeletePolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy
func (c *FMS) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) {
req, out := c.DeletePolicyRequest(input)
return out, req.Send()
}
// DeletePolicyWithContext is the same as DeletePolicy with the addition of
// the ability to pass a context and additional request options.
//
// See DeletePolicy 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 *FMS) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) {
req, out := c.DeletePolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDisassociateAdminAccount = "DisassociateAdminAccount"
// DisassociateAdminAccountRequest generates a "aws/request.Request" representing the
// client's request for the DisassociateAdminAccount 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 DisassociateAdminAccount for more information on using the DisassociateAdminAccount
// 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 DisassociateAdminAccountRequest method.
// req, resp := client.DisassociateAdminAccountRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount
func (c *FMS) DisassociateAdminAccountRequest(input *DisassociateAdminAccountInput) (req *request.Request, output *DisassociateAdminAccountOutput) {
op := &request.Operation{
Name: opDisassociateAdminAccount,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DisassociateAdminAccountInput{}
}
output = &DisassociateAdminAccountOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DisassociateAdminAccount API operation for Firewall Management Service.
//
// Disassociates the account that has been set as the AWS Firewall Manager administrator
// account. You will need to submit an AssociateAdminAccount request to set
// a new account as the AWS Firewall administrator.
//
// 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 Firewall Management Service's
// API operation DisassociateAdminAccount for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount
func (c *FMS) DisassociateAdminAccount(input *DisassociateAdminAccountInput) (*DisassociateAdminAccountOutput, error) {
req, out := c.DisassociateAdminAccountRequest(input)
return out, req.Send()
}
// DisassociateAdminAccountWithContext is the same as DisassociateAdminAccount with the addition of
// the ability to pass a context and additional request options.
//
// See DisassociateAdminAccount 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 *FMS) DisassociateAdminAccountWithContext(ctx aws.Context, input *DisassociateAdminAccountInput, opts ...request.Option) (*DisassociateAdminAccountOutput, error) {
req, out := c.DisassociateAdminAccountRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetAdminAccount = "GetAdminAccount"
// GetAdminAccountRequest generates a "aws/request.Request" representing the
// client's request for the GetAdminAccount 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 GetAdminAccount for more information on using the GetAdminAccount
// 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 GetAdminAccountRequest method.
// req, resp := client.GetAdminAccountRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount
func (c *FMS) GetAdminAccountRequest(input *GetAdminAccountInput) (req *request.Request, output *GetAdminAccountOutput) {
op := &request.Operation{
Name: opGetAdminAccount,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetAdminAccountInput{}
}
output = &GetAdminAccountOutput{}
req = c.newRequest(op, input, output)
return
}
// GetAdminAccount API operation for Firewall Management Service.
//
// Returns the AWS Organizations master account that is associated with AWS
// Firewall Manager as the AWS Firewall Manager administrator.
//
// 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 Firewall Management Service's
// API operation GetAdminAccount for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount
func (c *FMS) GetAdminAccount(input *GetAdminAccountInput) (*GetAdminAccountOutput, error) {
req, out := c.GetAdminAccountRequest(input)
return out, req.Send()
}
// GetAdminAccountWithContext is the same as GetAdminAccount with the addition of
// the ability to pass a context and additional request options.
//
// See GetAdminAccount 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 *FMS) GetAdminAccountWithContext(ctx aws.Context, input *GetAdminAccountInput, opts ...request.Option) (*GetAdminAccountOutput, error) {
req, out := c.GetAdminAccountRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetComplianceDetail = "GetComplianceDetail"
// GetComplianceDetailRequest generates a "aws/request.Request" representing the
// client's request for the GetComplianceDetail 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 GetComplianceDetail for more information on using the GetComplianceDetail
// 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 GetComplianceDetailRequest method.
// req, resp := client.GetComplianceDetailRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail
func (c *FMS) GetComplianceDetailRequest(input *GetComplianceDetailInput) (req *request.Request, output *GetComplianceDetailOutput) {
op := &request.Operation{
Name: opGetComplianceDetail,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetComplianceDetailInput{}
}
output = &GetComplianceDetailOutput{}
req = c.newRequest(op, input, output)
return
}
// GetComplianceDetail API operation for Firewall Management Service.
//
// Returns detailed compliance information about the specified member account.
// Details include resources that are in and out of compliance with the specified
// policy. Resources are considered non-compliant if the specified policy has
// not been applied to them.
//
// 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 Firewall Management Service's
// API operation GetComplianceDetail for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail
func (c *FMS) GetComplianceDetail(input *GetComplianceDetailInput) (*GetComplianceDetailOutput, error) {
req, out := c.GetComplianceDetailRequest(input)
return out, req.Send()
}
// GetComplianceDetailWithContext is the same as GetComplianceDetail with the addition of
// the ability to pass a context and additional request options.
//
// See GetComplianceDetail 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 *FMS) GetComplianceDetailWithContext(ctx aws.Context, input *GetComplianceDetailInput, opts ...request.Option) (*GetComplianceDetailOutput, error) {
req, out := c.GetComplianceDetailRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetNotificationChannel = "GetNotificationChannel"
// GetNotificationChannelRequest generates a "aws/request.Request" representing the
// client's request for the GetNotificationChannel 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 GetNotificationChannel for more information on using the GetNotificationChannel
// 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 GetNotificationChannelRequest method.
// req, resp := client.GetNotificationChannelRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel
func (c *FMS) GetNotificationChannelRequest(input *GetNotificationChannelInput) (req *request.Request, output *GetNotificationChannelOutput) {
op := &request.Operation{
Name: opGetNotificationChannel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetNotificationChannelInput{}
}
output = &GetNotificationChannelOutput{}
req = c.newRequest(op, input, output)
return
}
// GetNotificationChannel API operation for Firewall Management Service.
//
// Returns information about the Amazon Simple Notification Service (SNS) topic
// that is used to record AWS Firewall Manager SNS logs.
//
// 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 Firewall Management Service's
// API operation GetNotificationChannel for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel
func (c *FMS) GetNotificationChannel(input *GetNotificationChannelInput) (*GetNotificationChannelOutput, error) {
req, out := c.GetNotificationChannelRequest(input)
return out, req.Send()
}
// GetNotificationChannelWithContext is the same as GetNotificationChannel with the addition of
// the ability to pass a context and additional request options.
//
// See GetNotificationChannel 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 *FMS) GetNotificationChannelWithContext(ctx aws.Context, input *GetNotificationChannelInput, opts ...request.Option) (*GetNotificationChannelOutput, error) {
req, out := c.GetNotificationChannelRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetPolicy = "GetPolicy"
// GetPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetPolicy 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 GetPolicy for more information on using the GetPolicy
// 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 GetPolicyRequest method.
// req, resp := client.GetPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy
func (c *FMS) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) {
op := &request.Operation{
Name: opGetPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetPolicyInput{}
}
output = &GetPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// GetPolicy API operation for Firewall Management Service.
//
// Returns information about the specified AWS Firewall Manager policy.
//
// 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 Firewall Management Service's
// API operation GetPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// * ErrCodeInvalidTypeException "InvalidTypeException"
// The value of the Type parameter is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy
func (c *FMS) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) {
req, out := c.GetPolicyRequest(input)
return out, req.Send()
}
// GetPolicyWithContext is the same as GetPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See GetPolicy 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 *FMS) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) {
req, out := c.GetPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListComplianceStatus = "ListComplianceStatus"
// ListComplianceStatusRequest generates a "aws/request.Request" representing the
// client's request for the ListComplianceStatus 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 ListComplianceStatus for more information on using the ListComplianceStatus
// 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 ListComplianceStatusRequest method.
// req, resp := client.ListComplianceStatusRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus
func (c *FMS) ListComplianceStatusRequest(input *ListComplianceStatusInput) (req *request.Request, output *ListComplianceStatusOutput) {
op := &request.Operation{
Name: opListComplianceStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListComplianceStatusInput{}
}
output = &ListComplianceStatusOutput{}
req = c.newRequest(op, input, output)
return
}
// ListComplianceStatus API operation for Firewall Management Service.
//
// Returns an array of PolicyComplianceStatus objects in the response. Use PolicyComplianceStatus
// to get a summary of which member accounts are protected by the specified
// policy.
//
// 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 Firewall Management Service's
// API operation ListComplianceStatus for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus
func (c *FMS) ListComplianceStatus(input *ListComplianceStatusInput) (*ListComplianceStatusOutput, error) {
req, out := c.ListComplianceStatusRequest(input)
return out, req.Send()
}
// ListComplianceStatusWithContext is the same as ListComplianceStatus with the addition of
// the ability to pass a context and additional request options.
//
// See ListComplianceStatus 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 *FMS) ListComplianceStatusWithContext(ctx aws.Context, input *ListComplianceStatusInput, opts ...request.Option) (*ListComplianceStatusOutput, error) {
req, out := c.ListComplianceStatusRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListMemberAccounts = "ListMemberAccounts"
// ListMemberAccountsRequest generates a "aws/request.Request" representing the
// client's request for the ListMemberAccounts 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 ListMemberAccounts for more information on using the ListMemberAccounts
// 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 ListMemberAccountsRequest method.
// req, resp := client.ListMemberAccountsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts
func (c *FMS) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) {
op := &request.Operation{
Name: opListMemberAccounts,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListMemberAccountsInput{}
}
output = &ListMemberAccountsOutput{}
req = c.newRequest(op, input, output)
return
}
// ListMemberAccounts API operation for Firewall Management Service.
//
// Returns a MemberAccounts object that lists the member accounts in the administrator's
// AWS organization.
//
// The ListMemberAccounts must be submitted by the account that is set as the
// AWS Firewall Manager administrator.
//
// 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 Firewall Management Service's
// API operation ListMemberAccounts for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts
func (c *FMS) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) {
req, out := c.ListMemberAccountsRequest(input)
return out, req.Send()
}
// ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of
// the ability to pass a context and additional request options.
//
// See ListMemberAccounts 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 *FMS) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) {
req, out := c.ListMemberAccountsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListPolicies = "ListPolicies"
// ListPoliciesRequest generates a "aws/request.Request" representing the
// client's request for the ListPolicies 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 ListPolicies for more information on using the ListPolicies
// 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 ListPoliciesRequest method.
// req, resp := client.ListPoliciesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies
func (c *FMS) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) {
op := &request.Operation{
Name: opListPolicies,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListPoliciesInput{}
}
output = &ListPoliciesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListPolicies API operation for Firewall Management Service.
//
// Returns an array of PolicySummary objects in the response.
//
// 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 Firewall Management Service's
// API operation ListPolicies for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// The operation exceeds a resource limit, for example, the maximum number of
// policy objects that you can create for an AWS account. For more information,
// see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html)
// in the AWS WAF Developer Guide.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies
func (c *FMS) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) {
req, out := c.ListPoliciesRequest(input)
return out, req.Send()
}
// ListPoliciesWithContext is the same as ListPolicies with the addition of
// the ability to pass a context and additional request options.
//
// See ListPolicies 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 *FMS) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) {
req, out := c.ListPoliciesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opPutNotificationChannel = "PutNotificationChannel"
// PutNotificationChannelRequest generates a "aws/request.Request" representing the
// client's request for the PutNotificationChannel 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 PutNotificationChannel for more information on using the PutNotificationChannel
// 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 PutNotificationChannelRequest method.
// req, resp := client.PutNotificationChannelRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel
func (c *FMS) PutNotificationChannelRequest(input *PutNotificationChannelInput) (req *request.Request, output *PutNotificationChannelOutput) {
op := &request.Operation{
Name: opPutNotificationChannel,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutNotificationChannelInput{}
}
output = &PutNotificationChannelOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// PutNotificationChannel API operation for Firewall Management Service.
//
// Designates the IAM role and Amazon Simple Notification Service (SNS) topic
// that AWS Firewall Manager uses to record SNS logs.
//
// 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 Firewall Management Service's
// API operation PutNotificationChannel for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel
func (c *FMS) PutNotificationChannel(input *PutNotificationChannelInput) (*PutNotificationChannelOutput, error) {
req, out := c.PutNotificationChannelRequest(input)
return out, req.Send()
}
// PutNotificationChannelWithContext is the same as PutNotificationChannel with the addition of
// the ability to pass a context and additional request options.
//
// See PutNotificationChannel 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 *FMS) PutNotificationChannelWithContext(ctx aws.Context, input *PutNotificationChannelInput, opts ...request.Option) (*PutNotificationChannelOutput, error) {
req, out := c.PutNotificationChannelRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opPutPolicy = "PutPolicy"
// PutPolicyRequest generates a "aws/request.Request" representing the
// client's request for the PutPolicy 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 PutPolicy for more information on using the PutPolicy
// 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 PutPolicyRequest method.
// req, resp := client.PutPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy
func (c *FMS) PutPolicyRequest(input *PutPolicyInput) (req *request.Request, output *PutPolicyOutput) {
op := &request.Operation{
Name: opPutPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutPolicyInput{}
}
output = &PutPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// PutPolicy API operation for Firewall Management Service.
//
// Creates an AWS Firewall Manager policy.
//
// 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 Firewall Management Service's
// API operation PutPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeResourceNotFoundException "ResourceNotFoundException"
// The specified resource was not found.
//
// * ErrCodeInvalidOperationException "InvalidOperationException"
// The operation failed because there was nothing to do. For example, you might
// have submitted an AssociateAdminAccount request, but the account ID that
// you submitted was already set as the AWS Firewall Manager administrator.
//
// * ErrCodeInvalidInputException "InvalidInputException"
// The parameters of the request were invalid.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// The operation exceeds a resource limit, for example, the maximum number of
// policy objects that you can create for an AWS account. For more information,
// see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html)
// in the AWS WAF Developer Guide.
//
// * ErrCodeInternalErrorException "InternalErrorException"
// The operation failed because of a system problem, even though the request
// was valid. Retry your request.
//
// * ErrCodeInvalidTypeException "InvalidTypeException"
// The value of the Type parameter is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy
func (c *FMS) PutPolicy(input *PutPolicyInput) (*PutPolicyOutput, error) {
req, out := c.PutPolicyRequest(input)
return out, req.Send()
}
// PutPolicyWithContext is the same as PutPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See PutPolicy 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 *FMS) PutPolicyWithContext(ctx aws.Context, input *PutPolicyInput, opts ...request.Option) (*PutPolicyOutput, error) {
req, out := c.PutPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
type AssociateAdminAccountInput struct {
_ struct{} `type:"structure"`
// The AWS account ID to associate with AWS Firewall Manager as the AWS Firewall
// Manager administrator account. This can be an AWS Organizations master account
// or a member account. For more information about AWS Organizations and master
// accounts, see Managing the AWS Accounts in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts.html).
//
// AdminAccount is a required field
AdminAccount *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s AssociateAdminAccountInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AssociateAdminAccountInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *AssociateAdminAccountInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "AssociateAdminAccountInput"}
if s.AdminAccount == nil {
invalidParams.Add(request.NewErrParamRequired("AdminAccount"))
}
if s.AdminAccount != nil && len(*s.AdminAccount) < 1 {
invalidParams.Add(request.NewErrParamMinLen("AdminAccount", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAdminAccount sets the AdminAccount field's value.
func (s *AssociateAdminAccountInput) SetAdminAccount(v string) *AssociateAdminAccountInput {
s.AdminAccount = &v
return s
}
type AssociateAdminAccountOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s AssociateAdminAccountOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AssociateAdminAccountOutput) GoString() string {
return s.String()
}
// Details of the resource that is not protected by the policy.
type ComplianceViolator struct {
_ struct{} `type:"structure"`
// The resource ID.
ResourceId *string `min:"1" type:"string"`
// The resource type. This is in the format shown in AWS Resource Types Reference
// (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
// Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.
ResourceType *string `min:"1" type:"string"`
// The reason that the resource is not protected by the policy.
ViolationReason *string `type:"string" enum:"ViolationReason"`
}
// String returns the string representation
func (s ComplianceViolator) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ComplianceViolator) GoString() string {
return s.String()
}
// SetResourceId sets the ResourceId field's value.
func (s *ComplianceViolator) SetResourceId(v string) *ComplianceViolator {
s.ResourceId = &v
return s
}
// SetResourceType sets the ResourceType field's value.
func (s *ComplianceViolator) SetResourceType(v string) *ComplianceViolator {
s.ResourceType = &v
return s
}
// SetViolationReason sets the ViolationReason field's value.
func (s *ComplianceViolator) SetViolationReason(v string) *ComplianceViolator {
s.ViolationReason = &v
return s
}
type DeleteNotificationChannelInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteNotificationChannelInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteNotificationChannelInput) GoString() string {
return s.String()
}
type DeleteNotificationChannelOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeleteNotificationChannelOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteNotificationChannelOutput) GoString() string {
return s.String()
}
type DeletePolicyInput struct {
_ struct{} `type:"structure"`
// The ID of the policy that you want to delete. PolicyId is returned by PutPolicy
// and by ListPolicies.
//
// PolicyId is a required field
PolicyId *string `min:"36" type:"string" required:"true"`
}
// String returns the string representation
func (s DeletePolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeletePolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeletePolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"}
if s.PolicyId == nil {
invalidParams.Add(request.NewErrParamRequired("PolicyId"))
}
if s.PolicyId != nil && len(*s.PolicyId) < 36 {
invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetPolicyId sets the PolicyId field's value.
func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput {
s.PolicyId = &v
return s
}
type DeletePolicyOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DeletePolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeletePolicyOutput) GoString() string {
return s.String()
}
type DisassociateAdminAccountInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DisassociateAdminAccountInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisassociateAdminAccountInput) GoString() string {
return s.String()
}
type DisassociateAdminAccountOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s DisassociateAdminAccountOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DisassociateAdminAccountOutput) GoString() string {
return s.String()
}
// Describes the compliance status for the account. An account is considered
// non-compliant if it includes resources that are not protected by the specified
// policy.
type EvaluationResult struct {
_ struct{} `type:"structure"`
// Describes an AWS account's compliance with the AWS Firewall Manager policy.
ComplianceStatus *string `type:"string" enum:"PolicyComplianceStatusType"`
// Indicates that over 100 resources are non-compliant with the AWS Firewall
// Manager policy.
EvaluationLimitExceeded *bool `type:"boolean"`
// Number of resources that are non-compliant with the specified policy. A resource
// is considered non-compliant if it is not associated with the specified policy.
ViolatorCount *int64 `type:"long"`
}
// String returns the string representation
func (s EvaluationResult) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s EvaluationResult) GoString() string {
return s.String()
}
// SetComplianceStatus sets the ComplianceStatus field's value.
func (s *EvaluationResult) SetComplianceStatus(v string) *EvaluationResult {
s.ComplianceStatus = &v
return s
}
// SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value.
func (s *EvaluationResult) SetEvaluationLimitExceeded(v bool) *EvaluationResult {
s.EvaluationLimitExceeded = &v
return s
}
// SetViolatorCount sets the ViolatorCount field's value.
func (s *EvaluationResult) SetViolatorCount(v int64) *EvaluationResult {
s.ViolatorCount = &v
return s
}
type GetAdminAccountInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s GetAdminAccountInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetAdminAccountInput) GoString() string {
return s.String()
}
type GetAdminAccountOutput struct {
_ struct{} `type:"structure"`
// The AWS account that is set as the AWS Firewall Manager administrator.
AdminAccount *string `min:"1" type:"string"`
// The status of the AWS account that you set as the AWS Firewall Manager administrator.
RoleStatus *string `type:"string" enum:"AccountRoleStatus"`
}
// String returns the string representation
func (s GetAdminAccountOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetAdminAccountOutput) GoString() string {
return s.String()
}
// SetAdminAccount sets the AdminAccount field's value.
func (s *GetAdminAccountOutput) SetAdminAccount(v string) *GetAdminAccountOutput {
s.AdminAccount = &v
return s
}
// SetRoleStatus sets the RoleStatus field's value.
func (s *GetAdminAccountOutput) SetRoleStatus(v string) *GetAdminAccountOutput {
s.RoleStatus = &v
return s
}
type GetComplianceDetailInput struct {
_ struct{} `type:"structure"`
// The AWS account that owns the resources that you want to get the details
// for.
//
// MemberAccount is a required field
MemberAccount *string `min:"1" type:"string" required:"true"`
// The ID of the policy that you want to get the details for. PolicyId is returned
// by PutPolicy and by ListPolicies.
//
// PolicyId is a required field
PolicyId *string `min:"36" type:"string" required:"true"`
}
// String returns the string representation
func (s GetComplianceDetailInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetComplianceDetailInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetComplianceDetailInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetComplianceDetailInput"}
if s.MemberAccount == nil {
invalidParams.Add(request.NewErrParamRequired("MemberAccount"))
}
if s.MemberAccount != nil && len(*s.MemberAccount) < 1 {
invalidParams.Add(request.NewErrParamMinLen("MemberAccount", 1))
}
if s.PolicyId == nil {
invalidParams.Add(request.NewErrParamRequired("PolicyId"))
}
if s.PolicyId != nil && len(*s.PolicyId) < 36 {
invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetMemberAccount sets the MemberAccount field's value.
func (s *GetComplianceDetailInput) SetMemberAccount(v string) *GetComplianceDetailInput {
s.MemberAccount = &v
return s
}
// SetPolicyId sets the PolicyId field's value.
func (s *GetComplianceDetailInput) SetPolicyId(v string) *GetComplianceDetailInput {
s.PolicyId = &v
return s
}
type GetComplianceDetailOutput struct {
_ struct{} `type:"structure"`
// Information about the resources and the policy that you specified in the
// GetComplianceDetail request.
PolicyComplianceDetail *PolicyComplianceDetail `type:"structure"`
}
// String returns the string representation
func (s GetComplianceDetailOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetComplianceDetailOutput) GoString() string {
return s.String()
}
// SetPolicyComplianceDetail sets the PolicyComplianceDetail field's value.
func (s *GetComplianceDetailOutput) SetPolicyComplianceDetail(v *PolicyComplianceDetail) *GetComplianceDetailOutput {
s.PolicyComplianceDetail = v
return s
}
type GetNotificationChannelInput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s GetNotificationChannelInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetNotificationChannelInput) GoString() string {
return s.String()
}
type GetNotificationChannelOutput struct {
_ struct{} `type:"structure"`
// The IAM role that is used by AWS Firewall Manager to record activity to SNS.
SnsRoleName *string `min:"1" type:"string"`
// The SNS topic that records AWS Firewall Manager activity.
SnsTopicArn *string `min:"1" type:"string"`
}
// String returns the string representation
func (s GetNotificationChannelOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetNotificationChannelOutput) GoString() string {
return s.String()
}
// SetSnsRoleName sets the SnsRoleName field's value.
func (s *GetNotificationChannelOutput) SetSnsRoleName(v string) *GetNotificationChannelOutput {
s.SnsRoleName = &v
return s
}
// SetSnsTopicArn sets the SnsTopicArn field's value.
func (s *GetNotificationChannelOutput) SetSnsTopicArn(v string) *GetNotificationChannelOutput {
s.SnsTopicArn = &v
return s
}
type GetPolicyInput struct {
_ struct{} `type:"structure"`
// The ID of the AWS Firewall Manager policy that you want the details for.
//
// PolicyId is a required field
PolicyId *string `min:"36" type:"string" required:"true"`
}
// String returns the string representation
func (s GetPolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetPolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *GetPolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"}
if s.PolicyId == nil {
invalidParams.Add(request.NewErrParamRequired("PolicyId"))
}
if s.PolicyId != nil && len(*s.PolicyId) < 36 {
invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetPolicyId sets the PolicyId field's value.
func (s *GetPolicyInput) SetPolicyId(v string) *GetPolicyInput {
s.PolicyId = &v
return s
}
type GetPolicyOutput struct {
_ struct{} `type:"structure"`
// Information about the specified AWS Firewall Manager policy.
Policy *Policy `type:"structure"`
// The Amazon Resource Name (ARN) of the specified policy.
PolicyArn *string `min:"1" type:"string"`
}
// String returns the string representation
func (s GetPolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s GetPolicyOutput) GoString() string {
return s.String()
}
// SetPolicy sets the Policy field's value.
func (s *GetPolicyOutput) SetPolicy(v *Policy) *GetPolicyOutput {
s.Policy = v
return s
}
// SetPolicyArn sets the PolicyArn field's value.
func (s *GetPolicyOutput) SetPolicyArn(v string) *GetPolicyOutput {
s.PolicyArn = &v
return s
}
type ListComplianceStatusInput struct {
_ struct{} `type:"structure"`
// Specifies the number of PolicyComplianceStatus objects that you want AWS
// Firewall Manager to return for this request. If you have more PolicyComplianceStatus
// objects than the number that you specify for MaxResults, the response includes
// a NextToken value that you can use to get another batch of PolicyComplianceStatus
// objects.
MaxResults *int64 `min:"1" type:"integer"`
// If you specify a value for MaxResults and you have more PolicyComplianceStatus
// objects than the number that you specify for MaxResults, AWS Firewall Manager
// returns a NextToken value in the response that allows you to list another
// group of PolicyComplianceStatus objects. For the second and subsequent ListComplianceStatus
// requests, specify the value of NextToken from the previous response to get
// information about another batch of PolicyComplianceStatus objects.
NextToken *string `min:"1" type:"string"`
// The ID of the AWS Firewall Manager policy that you want the details for.
//
// PolicyId is a required field
PolicyId *string `min:"36" type:"string" required:"true"`
}
// String returns the string representation
func (s ListComplianceStatusInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListComplianceStatusInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListComplianceStatusInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListComplianceStatusInput"}
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 s.PolicyId == nil {
invalidParams.Add(request.NewErrParamRequired("PolicyId"))
}
if s.PolicyId != nil && len(*s.PolicyId) < 36 {
invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetMaxResults sets the MaxResults field's value.
func (s *ListComplianceStatusInput) SetMaxResults(v int64) *ListComplianceStatusInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListComplianceStatusInput) SetNextToken(v string) *ListComplianceStatusInput {
s.NextToken = &v
return s
}
// SetPolicyId sets the PolicyId field's value.
func (s *ListComplianceStatusInput) SetPolicyId(v string) *ListComplianceStatusInput {
s.PolicyId = &v
return s
}
type ListComplianceStatusOutput struct {
_ struct{} `type:"structure"`
// If you have more PolicyComplianceStatus objects than the number that you
// specified for MaxResults in the request, the response includes a NextToken
// value. To list more PolicyComplianceStatus objects, submit another ListComplianceStatus
// request, and specify the NextToken value from the response in the NextToken
// value in the next request.
NextToken *string `min:"1" type:"string"`
// An array of PolicyComplianceStatus objects.
PolicyComplianceStatusList []*PolicyComplianceStatus `type:"list"`
}
// String returns the string representation
func (s ListComplianceStatusOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListComplianceStatusOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *ListComplianceStatusOutput) SetNextToken(v string) *ListComplianceStatusOutput {
s.NextToken = &v
return s
}
// SetPolicyComplianceStatusList sets the PolicyComplianceStatusList field's value.
func (s *ListComplianceStatusOutput) SetPolicyComplianceStatusList(v []*PolicyComplianceStatus) *ListComplianceStatusOutput {
s.PolicyComplianceStatusList = v
return s
}
type ListMemberAccountsInput struct {
_ struct{} `type:"structure"`
// Specifies the number of member account IDs that you want AWS Firewall Manager
// to return for this request. If you have more IDs than the number that you
// specify for MaxResults, the response includes a NextToken value that you
// can use to get another batch of member account IDs. The maximum value for
// MaxResults is 100.
MaxResults *int64 `min:"1" type:"integer"`
// If you specify a value for MaxResults and you have more account IDs than
// the number that you specify for MaxResults, AWS Firewall Manager returns
// a NextToken value in the response that allows you to list another group of
// IDs. For the second and subsequent ListMemberAccountsRequest requests, specify
// the value of NextToken from the previous response to get information about
// another batch of member account IDs.
NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListMemberAccountsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListMemberAccountsInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListMemberAccountsInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListMemberAccountsInput"}
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 *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput {
s.NextToken = &v
return s
}
type ListMemberAccountsOutput struct {
_ struct{} `type:"structure"`
// An array of account IDs.
MemberAccounts []*string `type:"list"`
// If you have more member account IDs than the number that you specified for
// MaxResults in the request, the response includes a NextToken value. To list
// more IDs, submit another ListMemberAccounts request, and specify the NextToken
// value from the response in the NextToken value in the next request.
NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListMemberAccountsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListMemberAccountsOutput) GoString() string {
return s.String()
}
// SetMemberAccounts sets the MemberAccounts field's value.
func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*string) *ListMemberAccountsOutput {
s.MemberAccounts = v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput {
s.NextToken = &v
return s
}
type ListPoliciesInput struct {
_ struct{} `type:"structure"`
// Specifies the number of PolicySummary objects that you want AWS Firewall
// Manager to return for this request. If you have more PolicySummary objects
// than the number that you specify for MaxResults, the response includes a
// NextToken value that you can use to get another batch of PolicySummary objects.
MaxResults *int64 `min:"1" type:"integer"`
// If you specify a value for MaxResults and you have more PolicySummary objects
// than the number that you specify for MaxResults, AWS Firewall Manager returns
// a NextToken value in the response that allows you to list another group of
// PolicySummary objects. For the second and subsequent ListPolicies requests,
// specify the value of NextToken from the previous response to get information
// about another batch of PolicySummary objects.
NextToken *string `min:"1" type:"string"`
}
// String returns the string representation
func (s ListPoliciesInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListPoliciesInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ListPoliciesInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"}
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 *ListPoliciesInput) SetMaxResults(v int64) *ListPoliciesInput {
s.MaxResults = &v
return s
}
// SetNextToken sets the NextToken field's value.
func (s *ListPoliciesInput) SetNextToken(v string) *ListPoliciesInput {
s.NextToken = &v
return s
}
type ListPoliciesOutput struct {
_ struct{} `type:"structure"`
// If you have more PolicySummary objects than the number that you specified
// for MaxResults in the request, the response includes a NextToken value. To
// list more PolicySummary objects, submit another ListPolicies request, and
// specify the NextToken value from the response in the NextToken value in the
// next request.
NextToken *string `min:"1" type:"string"`
// An array of PolicySummary objects.
PolicyList []*PolicySummary `type:"list"`
}
// String returns the string representation
func (s ListPoliciesOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ListPoliciesOutput) GoString() string {
return s.String()
}
// SetNextToken sets the NextToken field's value.
func (s *ListPoliciesOutput) SetNextToken(v string) *ListPoliciesOutput {
s.NextToken = &v
return s
}
// SetPolicyList sets the PolicyList field's value.
func (s *ListPoliciesOutput) SetPolicyList(v []*PolicySummary) *ListPoliciesOutput {
s.PolicyList = v
return s
}
// An AWS Firewall Manager policy.
type Policy struct {
_ struct{} `type:"structure"`
// Specifies the AWS account IDs to exclude from the policy. The IncludeMap
// values are evaluated first, with all of the appropriate account IDs added
// to the policy. Then the accounts listed in ExcludeMap are removed, resulting
// in the final list of accounts to add to the policy.
//
// The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT”
// : [“accountID1”, “accountID2”]}.
ExcludeMap map[string][]*string `type:"map"`
// If set to True, resources with the tags that are specified in the ResourceTag
// array are not protected by the policy. If set to False, and the ResourceTag
// array is not null, only resources with the specified tags are associated
// with the policy.
//
// ExcludeResourceTags is a required field
ExcludeResourceTags *bool `type:"boolean" required:"true"`
// Specifies the AWS account IDs to include in the policy. If IncludeMap is
// null, all accounts in the AWS Organization are included in the policy. If
// IncludeMap is not null, only values listed in IncludeMap will be included
// in the policy.
//
// The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT”
// : [“accountID1”, “accountID2”]}.
IncludeMap map[string][]*string `type:"map"`
// The ID of the AWS Firewall Manager policy.
PolicyId *string `min:"36" type:"string"`
// The friendly name of the AWS Firewall Manager policy.
//
// PolicyName is a required field
PolicyName *string `min:"1" type:"string" required:"true"`
// A unique identifier for each update to the policy. When issuing a PutPolicy
// request, the PolicyUpdateToken in the request must match the PolicyUpdateToken
// of the current policy version. To get the PolicyUpdateToken of the current
// policy version, use a GetPolicy request.
PolicyUpdateToken *string `min:"1" type:"string"`
// Indicates if the policy should be automatically applied to new resources.
//
// RemediationEnabled is a required field
RemediationEnabled *bool `type:"boolean" required:"true"`
// An array of ResourceTag objects.
ResourceTags []*ResourceTag `type:"list"`
// The type of resource to protect with the policy, either an Application Load
// Balancer or a CloudFront distribution. This is in the format shown in AWS
// Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
// Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.
//
// ResourceType is a required field
ResourceType *string `min:"1" type:"string" required:"true"`
// Details about the security service that is being used to protect the resources.
//
// SecurityServicePolicyData is a required field
SecurityServicePolicyData *SecurityServicePolicyData `type:"structure" required:"true"`
}
// String returns the string representation
func (s Policy) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s Policy) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Policy) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "Policy"}
if s.ExcludeResourceTags == nil {
invalidParams.Add(request.NewErrParamRequired("ExcludeResourceTags"))
}
if s.PolicyId != nil && len(*s.PolicyId) < 36 {
invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
}
if s.PolicyName == nil {
invalidParams.Add(request.NewErrParamRequired("PolicyName"))
}
if s.PolicyName != nil && len(*s.PolicyName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
}
if s.PolicyUpdateToken != nil && len(*s.PolicyUpdateToken) < 1 {
invalidParams.Add(request.NewErrParamMinLen("PolicyUpdateToken", 1))
}
if s.RemediationEnabled == nil {
invalidParams.Add(request.NewErrParamRequired("RemediationEnabled"))
}
if s.ResourceType == nil {
invalidParams.Add(request.NewErrParamRequired("ResourceType"))
}
if s.ResourceType != nil && len(*s.ResourceType) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1))
}
if s.SecurityServicePolicyData == nil {
invalidParams.Add(request.NewErrParamRequired("SecurityServicePolicyData"))
}
if s.ResourceTags != nil {
for i, v := range s.ResourceTags {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceTags", i), err.(request.ErrInvalidParams))
}
}
}
if s.SecurityServicePolicyData != nil {
if err := s.SecurityServicePolicyData.Validate(); err != nil {
invalidParams.AddNested("SecurityServicePolicyData", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetExcludeMap sets the ExcludeMap field's value.
func (s *Policy) SetExcludeMap(v map[string][]*string) *Policy {
s.ExcludeMap = v
return s
}
// SetExcludeResourceTags sets the ExcludeResourceTags field's value.
func (s *Policy) SetExcludeResourceTags(v bool) *Policy {
s.ExcludeResourceTags = &v
return s
}
// SetIncludeMap sets the IncludeMap field's value.
func (s *Policy) SetIncludeMap(v map[string][]*string) *Policy {
s.IncludeMap = v
return s
}
// SetPolicyId sets the PolicyId field's value.
func (s *Policy) SetPolicyId(v string) *Policy {
s.PolicyId = &v
return s
}
// SetPolicyName sets the PolicyName field's value.
func (s *Policy) SetPolicyName(v string) *Policy {
s.PolicyName = &v
return s
}
// SetPolicyUpdateToken sets the PolicyUpdateToken field's value.
func (s *Policy) SetPolicyUpdateToken(v string) *Policy {
s.PolicyUpdateToken = &v
return s
}
// SetRemediationEnabled sets the RemediationEnabled field's value.
func (s *Policy) SetRemediationEnabled(v bool) *Policy {
s.RemediationEnabled = &v
return s
}
// SetResourceTags sets the ResourceTags field's value.
func (s *Policy) SetResourceTags(v []*ResourceTag) *Policy {
s.ResourceTags = v
return s
}
// SetResourceType sets the ResourceType field's value.
func (s *Policy) SetResourceType(v string) *Policy {
s.ResourceType = &v
return s
}
// SetSecurityServicePolicyData sets the SecurityServicePolicyData field's value.
func (s *Policy) SetSecurityServicePolicyData(v *SecurityServicePolicyData) *Policy {
s.SecurityServicePolicyData = v
return s
}
// Describes the non-compliant resources in a member account for a specific
// AWS Firewall Manager policy. A maximum of 100 entries are displayed. If more
// than 100 resources are non-compliant, EvaluationLimitExceeded is set to True.
type PolicyComplianceDetail struct {
_ struct{} `type:"structure"`
// Indicates if over 100 resources are non-compliant with the AWS Firewall Manager
// policy.
EvaluationLimitExceeded *bool `type:"boolean"`
// A time stamp that indicates when the returned information should be considered
// out-of-date.
ExpiredAt *time.Time `type:"timestamp"`
// Details about problems with dependent services, such as AWS WAF or AWS Config,
// that are causing a resource to be non-compliant. The details include the
// name of the dependent service and the error message recieved indicating the
// problem with the service.
IssueInfoMap map[string]*string `type:"map"`
// The AWS account ID.
MemberAccount *string `min:"1" type:"string"`
// The ID of the AWS Firewall Manager policy.
PolicyId *string `min:"36" type:"string"`
// The AWS account that created the AWS Firewall Manager policy.
PolicyOwner *string `min:"1" type:"string"`
// An array of resources that are not protected by the policy.
Violators []*ComplianceViolator `type:"list"`
}
// String returns the string representation
func (s PolicyComplianceDetail) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PolicyComplianceDetail) GoString() string {
return s.String()
}
// SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value.
func (s *PolicyComplianceDetail) SetEvaluationLimitExceeded(v bool) *PolicyComplianceDetail {
s.EvaluationLimitExceeded = &v
return s
}
// SetExpiredAt sets the ExpiredAt field's value.
func (s *PolicyComplianceDetail) SetExpiredAt(v time.Time) *PolicyComplianceDetail {
s.ExpiredAt = &v
return s
}
// SetIssueInfoMap sets the IssueInfoMap field's value.
func (s *PolicyComplianceDetail) SetIssueInfoMap(v map[string]*string) *PolicyComplianceDetail {
s.IssueInfoMap = v
return s
}
// SetMemberAccount sets the MemberAccount field's value.
func (s *PolicyComplianceDetail) SetMemberAccount(v string) *PolicyComplianceDetail {
s.MemberAccount = &v
return s
}
// SetPolicyId sets the PolicyId field's value.
func (s *PolicyComplianceDetail) SetPolicyId(v string) *PolicyComplianceDetail {
s.PolicyId = &v
return s
}
// SetPolicyOwner sets the PolicyOwner field's value.
func (s *PolicyComplianceDetail) SetPolicyOwner(v string) *PolicyComplianceDetail {
s.PolicyOwner = &v
return s
}
// SetViolators sets the Violators field's value.
func (s *PolicyComplianceDetail) SetViolators(v []*ComplianceViolator) *PolicyComplianceDetail {
s.Violators = v
return s
}
// Indicates whether the account is compliant with the specified policy. An
// account is considered non-compliant if it includes resources that are not
// protected by the policy.
type PolicyComplianceStatus struct {
_ struct{} `type:"structure"`
// An array of EvaluationResult objects.
EvaluationResults []*EvaluationResult `type:"list"`
// Details about problems with dependent services, such as AWS WAF or AWS Config,
// that are causing a resource to be non-compliant. The details include the
// name of the dependent service and the error message recieved indicating the
// problem with the service.
IssueInfoMap map[string]*string `type:"map"`
// Time stamp of the last update to the EvaluationResult objects.
LastUpdated *time.Time `type:"timestamp"`
// The member account ID.
MemberAccount *string `min:"1" type:"string"`
// The ID of the AWS Firewall Manager policy.
PolicyId *string `min:"36" type:"string"`
// The friendly name of the AWS Firewall Manager policy.
PolicyName *string `min:"1" type:"string"`
// The AWS account that created the AWS Firewall Manager policy.
PolicyOwner *string `min:"1" type:"string"`
}
// String returns the string representation
func (s PolicyComplianceStatus) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PolicyComplianceStatus) GoString() string {
return s.String()
}
// SetEvaluationResults sets the EvaluationResults field's value.
func (s *PolicyComplianceStatus) SetEvaluationResults(v []*EvaluationResult) *PolicyComplianceStatus {
s.EvaluationResults = v
return s
}
// SetIssueInfoMap sets the IssueInfoMap field's value.
func (s *PolicyComplianceStatus) SetIssueInfoMap(v map[string]*string) *PolicyComplianceStatus {
s.IssueInfoMap = v
return s
}
// SetLastUpdated sets the LastUpdated field's value.
func (s *PolicyComplianceStatus) SetLastUpdated(v time.Time) *PolicyComplianceStatus {
s.LastUpdated = &v
return s
}
// SetMemberAccount sets the MemberAccount field's value.
func (s *PolicyComplianceStatus) SetMemberAccount(v string) *PolicyComplianceStatus {
s.MemberAccount = &v
return s
}
// SetPolicyId sets the PolicyId field's value.
func (s *PolicyComplianceStatus) SetPolicyId(v string) *PolicyComplianceStatus {
s.PolicyId = &v
return s
}
// SetPolicyName sets the PolicyName field's value.
func (s *PolicyComplianceStatus) SetPolicyName(v string) *PolicyComplianceStatus {
s.PolicyName = &v
return s
}
// SetPolicyOwner sets the PolicyOwner field's value.
func (s *PolicyComplianceStatus) SetPolicyOwner(v string) *PolicyComplianceStatus {
s.PolicyOwner = &v
return s
}
// Details of the AWS Firewall Manager policy.
type PolicySummary struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the specified policy.
PolicyArn *string `min:"1" type:"string"`
// The ID of the specified policy.
PolicyId *string `min:"36" type:"string"`
// The friendly name of the specified policy.
PolicyName *string `min:"1" type:"string"`
// Indicates if the policy should be automatically applied to new resources.
RemediationEnabled *bool `type:"boolean"`
// The type of resource to protect with the policy, either an Application Load
// Balancer or a CloudFront distribution. This is in the format shown in AWS
// Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
// Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.
ResourceType *string `min:"1" type:"string"`
// The service that the policy is using to protect the resources. This value
// is WAF.
SecurityServiceType *string `type:"string" enum:"SecurityServiceType"`
}
// String returns the string representation
func (s PolicySummary) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PolicySummary) GoString() string {
return s.String()
}
// SetPolicyArn sets the PolicyArn field's value.
func (s *PolicySummary) SetPolicyArn(v string) *PolicySummary {
s.PolicyArn = &v
return s
}
// SetPolicyId sets the PolicyId field's value.
func (s *PolicySummary) SetPolicyId(v string) *PolicySummary {
s.PolicyId = &v
return s
}
// SetPolicyName sets the PolicyName field's value.
func (s *PolicySummary) SetPolicyName(v string) *PolicySummary {
s.PolicyName = &v
return s
}
// SetRemediationEnabled sets the RemediationEnabled field's value.
func (s *PolicySummary) SetRemediationEnabled(v bool) *PolicySummary {
s.RemediationEnabled = &v
return s
}
// SetResourceType sets the ResourceType field's value.
func (s *PolicySummary) SetResourceType(v string) *PolicySummary {
s.ResourceType = &v
return s
}
// SetSecurityServiceType sets the SecurityServiceType field's value.
func (s *PolicySummary) SetSecurityServiceType(v string) *PolicySummary {
s.SecurityServiceType = &v
return s
}
type PutNotificationChannelInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the IAM role that allows Amazon SNS to
// record AWS Firewall Manager activity.
//
// SnsRoleName is a required field
SnsRoleName *string `min:"1" type:"string" required:"true"`
// The Amazon Resource Name (ARN) of the SNS topic that collects notifications
// from AWS Firewall Manager.
//
// SnsTopicArn is a required field
SnsTopicArn *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s PutNotificationChannelInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutNotificationChannelInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *PutNotificationChannelInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "PutNotificationChannelInput"}
if s.SnsRoleName == nil {
invalidParams.Add(request.NewErrParamRequired("SnsRoleName"))
}
if s.SnsRoleName != nil && len(*s.SnsRoleName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SnsRoleName", 1))
}
if s.SnsTopicArn == nil {
invalidParams.Add(request.NewErrParamRequired("SnsTopicArn"))
}
if s.SnsTopicArn != nil && len(*s.SnsTopicArn) < 1 {
invalidParams.Add(request.NewErrParamMinLen("SnsTopicArn", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetSnsRoleName sets the SnsRoleName field's value.
func (s *PutNotificationChannelInput) SetSnsRoleName(v string) *PutNotificationChannelInput {
s.SnsRoleName = &v
return s
}
// SetSnsTopicArn sets the SnsTopicArn field's value.
func (s *PutNotificationChannelInput) SetSnsTopicArn(v string) *PutNotificationChannelInput {
s.SnsTopicArn = &v
return s
}
type PutNotificationChannelOutput struct {
_ struct{} `type:"structure"`
}
// String returns the string representation
func (s PutNotificationChannelOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutNotificationChannelOutput) GoString() string {
return s.String()
}
type PutPolicyInput struct {
_ struct{} `type:"structure"`
// The details of the AWS Firewall Manager policy to be created.
//
// Policy is a required field
Policy *Policy `type:"structure" required:"true"`
}
// String returns the string representation
func (s PutPolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutPolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *PutPolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "PutPolicyInput"}
if s.Policy == nil {
invalidParams.Add(request.NewErrParamRequired("Policy"))
}
if s.Policy != nil {
if err := s.Policy.Validate(); err != nil {
invalidParams.AddNested("Policy", err.(request.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetPolicy sets the Policy field's value.
func (s *PutPolicyInput) SetPolicy(v *Policy) *PutPolicyInput {
s.Policy = v
return s
}
type PutPolicyOutput struct {
_ struct{} `type:"structure"`
// The details of the AWS Firewall Manager policy that was created.
Policy *Policy `type:"structure"`
// The Amazon Resource Name (ARN) of the policy that was created.
PolicyArn *string `min:"1" type:"string"`
}
// String returns the string representation
func (s PutPolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s PutPolicyOutput) GoString() string {
return s.String()
}
// SetPolicy sets the Policy field's value.
func (s *PutPolicyOutput) SetPolicy(v *Policy) *PutPolicyOutput {
s.Policy = v
return s
}
// SetPolicyArn sets the PolicyArn field's value.
func (s *PutPolicyOutput) SetPolicyArn(v string) *PutPolicyOutput {
s.PolicyArn = &v
return s
}
// The resource tags that AWS Firewall Manager uses to determine if a particular
// resource should be included or excluded from protection by the AWS Firewall
// Manager policy. Tags enable you to categorize your AWS resources in different
// ways, for example, by purpose, owner, or environment. Each tag consists of
// a key and an optional value, both of which you define. Tags are combined
// with an "OR." That is, if you add more than one tag, if any of the tags matches,
// the resource is considered a match for the include or exclude. Working with
// Tag Editor (https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/tag-editor.html).
type ResourceTag struct {
_ struct{} `type:"structure"`
// The resource tag key.
//
// Key is a required field
Key *string `min:"1" type:"string" required:"true"`
// The resource tag value.
Value *string `type:"string"`
}
// String returns the string representation
func (s ResourceTag) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s ResourceTag) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *ResourceTag) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "ResourceTag"}
if s.Key == nil {
invalidParams.Add(request.NewErrParamRequired("Key"))
}
if s.Key != nil && len(*s.Key) < 1 {
invalidParams.Add(request.NewErrParamMinLen("Key", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetKey sets the Key field's value.
func (s *ResourceTag) SetKey(v string) *ResourceTag {
s.Key = &v
return s
}
// SetValue sets the Value field's value.
func (s *ResourceTag) SetValue(v string) *ResourceTag {
s.Value = &v
return s
}
// Details about the security service that is being used to protect the resources.
type SecurityServicePolicyData struct {
_ struct{} `type:"structure"`
// Details about the service. This contains WAF data in JSON format, as shown
// in the following example:
//
// ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\": \"12345678-1bcd-9012-efga-0987654321ab\",
// \"overrideAction\" : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\":
// \"BLOCK\"}}
ManagedServiceData *string `min:"1" type:"string"`
// The service that the policy is using to protect the resources. This value
// is WAF.
//
// Type is a required field
Type *string `type:"string" required:"true" enum:"SecurityServiceType"`
}
// String returns the string representation
func (s SecurityServicePolicyData) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s SecurityServicePolicyData) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *SecurityServicePolicyData) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "SecurityServicePolicyData"}
if s.ManagedServiceData != nil && len(*s.ManagedServiceData) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ManagedServiceData", 1))
}
if s.Type == nil {
invalidParams.Add(request.NewErrParamRequired("Type"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetManagedServiceData sets the ManagedServiceData field's value.
func (s *SecurityServicePolicyData) SetManagedServiceData(v string) *SecurityServicePolicyData {
s.ManagedServiceData = &v
return s
}
// SetType sets the Type field's value.
func (s *SecurityServicePolicyData) SetType(v string) *SecurityServicePolicyData {
s.Type = &v
return s
}
const (
// AccountRoleStatusReady is a AccountRoleStatus enum value
AccountRoleStatusReady = "READY"
// AccountRoleStatusCreating is a AccountRoleStatus enum value
AccountRoleStatusCreating = "CREATING"
// AccountRoleStatusPendingDeletion is a AccountRoleStatus enum value
AccountRoleStatusPendingDeletion = "PENDING_DELETION"
// AccountRoleStatusDeleting is a AccountRoleStatus enum value
AccountRoleStatusDeleting = "DELETING"
// AccountRoleStatusDeleted is a AccountRoleStatus enum value
AccountRoleStatusDeleted = "DELETED"
)
const (
// CustomerPolicyScopeIdTypeAccount is a CustomerPolicyScopeIdType enum value
CustomerPolicyScopeIdTypeAccount = "ACCOUNT"
)
const (
// DependentServiceNameAwsconfig is a DependentServiceName enum value
DependentServiceNameAwsconfig = "AWSCONFIG"
// DependentServiceNameAwswaf is a DependentServiceName enum value
DependentServiceNameAwswaf = "AWSWAF"
)
const (
// PolicyComplianceStatusTypeCompliant is a PolicyComplianceStatusType enum value
PolicyComplianceStatusTypeCompliant = "COMPLIANT"
// PolicyComplianceStatusTypeNonCompliant is a PolicyComplianceStatusType enum value
PolicyComplianceStatusTypeNonCompliant = "NON_COMPLIANT"
)
const (
// SecurityServiceTypeWaf is a SecurityServiceType enum value
SecurityServiceTypeWaf = "WAF"
)
const (
// ViolationReasonWebAclMissingRuleGroup is a ViolationReason enum value
ViolationReasonWebAclMissingRuleGroup = "WEB_ACL_MISSING_RULE_GROUP"
// ViolationReasonResourceMissingWebAcl is a ViolationReason enum value
ViolationReasonResourceMissingWebAcl = "RESOURCE_MISSING_WEB_ACL"
// ViolationReasonResourceIncorrectWebAcl is a ViolationReason enum value
ViolationReasonResourceIncorrectWebAcl = "RESOURCE_INCORRECT_WEB_ACL"
)
|