1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829
|
package diagnostics
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2021-05-01-preview/diagnostics"
// AccessModeSettings properties that define the scope private link mode settings.
type AccessModeSettings struct {
// QueryAccessMode - Specifies the default access mode of queries through associated private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. Possible values include: 'Open', 'PrivateOnly'
QueryAccessMode AccessMode `json:"queryAccessMode,omitempty"`
// IngestionAccessMode - Specifies the default access mode of ingestion through associated private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. Possible values include: 'Open', 'PrivateOnly'
IngestionAccessMode AccessMode `json:"ingestionAccessMode,omitempty"`
// Exclusions - List of exclusions that override the default access mode settings for specific private endpoint connections.
Exclusions *[]AccessModeSettingsExclusion `json:"exclusions,omitempty"`
}
// AccessModeSettingsExclusion properties that define the scope private link mode settings exclusion item.
// This setting applies to a specific private endpoint connection and overrides the default settings for
// that private endpoint connection.
type AccessModeSettingsExclusion struct {
// PrivateEndpointConnectionName - The private endpoint connection name associated to the private endpoint on which we want to apply the specific access mode settings.
PrivateEndpointConnectionName *string `json:"privateEndpointConnectionName,omitempty"`
// QueryAccessMode - Specifies the access mode of queries through the specified private endpoint connection in the exclusion. Possible values include: 'Open', 'PrivateOnly'
QueryAccessMode AccessMode `json:"queryAccessMode,omitempty"`
// IngestionAccessMode - Specifies the access mode of ingestion through the specified private endpoint connection in the exclusion. Possible values include: 'Open', 'PrivateOnly'
IngestionAccessMode AccessMode `json:"ingestionAccessMode,omitempty"`
}
// ActionDetail the action detail
type ActionDetail struct {
// MechanismType - The mechanism type
MechanismType *string `json:"MechanismType,omitempty"`
// Name - The name of the action
Name *string `json:"Name,omitempty"`
// Status - The status of the action
Status *string `json:"Status,omitempty"`
// SubState - The substatus of the action
SubState *string `json:"SubState,omitempty"`
// SendTime - The send time
SendTime *string `json:"SendTime,omitempty"`
// Detail - The detail of the friendly error message
Detail *string `json:"Detail,omitempty"`
}
// ActionGroup an Azure action group.
type ActionGroup struct {
// GroupShortName - The short name of the action group. This will be used in SMS messages.
GroupShortName *string `json:"groupShortName,omitempty"`
// Enabled - Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications.
Enabled *bool `json:"enabled,omitempty"`
// EmailReceivers - The list of email receivers that are part of this action group.
EmailReceivers *[]EmailReceiver `json:"emailReceivers,omitempty"`
// SmsReceivers - The list of SMS receivers that are part of this action group.
SmsReceivers *[]SmsReceiver `json:"smsReceivers,omitempty"`
// WebhookReceivers - The list of webhook receivers that are part of this action group.
WebhookReceivers *[]WebhookReceiver `json:"webhookReceivers,omitempty"`
// ItsmReceivers - The list of ITSM receivers that are part of this action group.
ItsmReceivers *[]ItsmReceiver `json:"itsmReceivers,omitempty"`
// AzureAppPushReceivers - The list of AzureAppPush receivers that are part of this action group.
AzureAppPushReceivers *[]AzureAppPushReceiver `json:"azureAppPushReceivers,omitempty"`
// AutomationRunbookReceivers - The list of AutomationRunbook receivers that are part of this action group.
AutomationRunbookReceivers *[]AutomationRunbookReceiver `json:"automationRunbookReceivers,omitempty"`
// VoiceReceivers - The list of voice receivers that are part of this action group.
VoiceReceivers *[]VoiceReceiver `json:"voiceReceivers,omitempty"`
// LogicAppReceivers - The list of logic app receivers that are part of this action group.
LogicAppReceivers *[]LogicAppReceiver `json:"logicAppReceivers,omitempty"`
// AzureFunctionReceivers - The list of azure function receivers that are part of this action group.
AzureFunctionReceivers *[]AzureFunctionReceiver `json:"azureFunctionReceivers,omitempty"`
// ArmRoleReceivers - The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported.
ArmRoleReceivers *[]ArmRoleReceiver `json:"armRoleReceivers,omitempty"`
// EventHubReceivers - The list of event hub receivers that are part of this action group.
EventHubReceivers *[]EventHubReceiver `json:"eventHubReceivers,omitempty"`
}
// ActionGroupList a list of action groups.
type ActionGroupList struct {
autorest.Response `json:"-"`
// Value - The list of action groups.
Value *[]ActionGroupResource `json:"value,omitempty"`
// NextLink - Provides the link to retrieve the next set of elements.
NextLink *string `json:"nextLink,omitempty"`
}
// ActionGroupPatch an Azure action group for patch operations.
type ActionGroupPatch struct {
// Enabled - Indicates whether this action group is enabled. If an action group is not enabled, then none of its actions will be activated.
Enabled *bool `json:"enabled,omitempty"`
}
// ActionGroupPatchBody an action group object for the body of patch operations.
type ActionGroupPatchBody struct {
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
// ActionGroupPatch - The action group settings for an update operation.
*ActionGroupPatch `json:"properties,omitempty"`
}
// MarshalJSON is the custom marshaler for ActionGroupPatchBody.
func (agpb ActionGroupPatchBody) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if agpb.Tags != nil {
objectMap["tags"] = agpb.Tags
}
if agpb.ActionGroupPatch != nil {
objectMap["properties"] = agpb.ActionGroupPatch
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ActionGroupPatchBody struct.
func (agpb *ActionGroupPatchBody) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
agpb.Tags = tags
}
case "properties":
if v != nil {
var actionGroupPatch ActionGroupPatch
err = json.Unmarshal(*v, &actionGroupPatch)
if err != nil {
return err
}
agpb.ActionGroupPatch = &actionGroupPatch
}
}
}
return nil
}
// ActionGroupResource an action group resource.
type ActionGroupResource struct {
autorest.Response `json:"-"`
// ActionGroup - The action groups properties of the resource.
*ActionGroup `json:"properties,omitempty"`
// ID - READ-ONLY; Azure resource Id
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Azure resource name
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Azure resource type
Type *string `json:"type,omitempty"`
// Location - Resource location
Location *string `json:"location,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for ActionGroupResource.
func (agr ActionGroupResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if agr.ActionGroup != nil {
objectMap["properties"] = agr.ActionGroup
}
if agr.Location != nil {
objectMap["location"] = agr.Location
}
if agr.Tags != nil {
objectMap["tags"] = agr.Tags
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ActionGroupResource struct.
func (agr *ActionGroupResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var actionGroup ActionGroup
err = json.Unmarshal(*v, &actionGroup)
if err != nil {
return err
}
agr.ActionGroup = &actionGroup
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
agr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
agr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
agr.Type = &typeVar
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
agr.Location = &location
}
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
agr.Tags = tags
}
}
}
return nil
}
// ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture an abstraction for monitoring and
// retrieving the results of a long-running operation.
type ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(ActionGroupsClient) (TestNotificationDetailsResponse, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture.Result.
func (future *ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture) result(client ActionGroupsClient) (tndr TestNotificationDetailsResponse, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
tndr.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("diagnostics.ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if tndr.Response.Response, err = future.GetResult(sender); err == nil && tndr.Response.Response.StatusCode != http.StatusNoContent {
tndr, err = client.CreateNotificationsAtActionGroupResourceLevelResponder(tndr.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsCreateNotificationsAtActionGroupResourceLevelFuture", "Result", tndr.Response.Response, "Failure responding to request")
}
}
return
}
// ActionGroupsCreateNotificationsAtResourceGroupLevelFuture an abstraction for monitoring and retrieving
// the results of a long-running operation.
type ActionGroupsCreateNotificationsAtResourceGroupLevelFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(ActionGroupsClient) (TestNotificationDetailsResponse, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *ActionGroupsCreateNotificationsAtResourceGroupLevelFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for ActionGroupsCreateNotificationsAtResourceGroupLevelFuture.Result.
func (future *ActionGroupsCreateNotificationsAtResourceGroupLevelFuture) result(client ActionGroupsClient) (tndr TestNotificationDetailsResponse, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsCreateNotificationsAtResourceGroupLevelFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
tndr.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("diagnostics.ActionGroupsCreateNotificationsAtResourceGroupLevelFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if tndr.Response.Response, err = future.GetResult(sender); err == nil && tndr.Response.Response.StatusCode != http.StatusNoContent {
tndr, err = client.CreateNotificationsAtResourceGroupLevelResponder(tndr.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsCreateNotificationsAtResourceGroupLevelFuture", "Result", tndr.Response.Response, "Failure responding to request")
}
}
return
}
// ActionGroupsPostTestNotificationsFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type ActionGroupsPostTestNotificationsFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(ActionGroupsClient) (TestNotificationDetailsResponse, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *ActionGroupsPostTestNotificationsFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for ActionGroupsPostTestNotificationsFuture.Result.
func (future *ActionGroupsPostTestNotificationsFuture) result(client ActionGroupsClient) (tndr TestNotificationDetailsResponse, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsPostTestNotificationsFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
tndr.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("diagnostics.ActionGroupsPostTestNotificationsFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if tndr.Response.Response, err = future.GetResult(sender); err == nil && tndr.Response.Response.StatusCode != http.StatusNoContent {
tndr, err = client.PostTestNotificationsResponder(tndr.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.ActionGroupsPostTestNotificationsFuture", "Result", tndr.Response.Response, "Failure responding to request")
}
}
return
}
// ArmRoleReceiver an arm role receiver.
type ArmRoleReceiver struct {
// Name - The name of the arm role receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// RoleID - The arm role id.
RoleID *string `json:"roleId,omitempty"`
// UseCommonAlertSchema - Indicates whether to use common alert schema.
UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
}
// AutomationRunbookReceiver the Azure Automation Runbook notification receiver.
type AutomationRunbookReceiver struct {
// AutomationAccountID - The Azure automation account Id which holds this runbook and authenticate to Azure resource.
AutomationAccountID *string `json:"automationAccountId,omitempty"`
// RunbookName - The name for this runbook.
RunbookName *string `json:"runbookName,omitempty"`
// WebhookResourceID - The resource id for webhook linked to this runbook.
WebhookResourceID *string `json:"webhookResourceId,omitempty"`
// IsGlobalRunbook - Indicates whether this instance is global runbook.
IsGlobalRunbook *bool `json:"isGlobalRunbook,omitempty"`
// Name - Indicates name of the webhook.
Name *string `json:"name,omitempty"`
// ServiceURI - The URI where webhooks should be sent.
ServiceURI *string `json:"serviceUri,omitempty"`
// UseCommonAlertSchema - Indicates whether to use common alert schema.
UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
}
// AutoscaleErrorResponse describes the format of Error response.
type AutoscaleErrorResponse struct {
// Error - The error object.
Error *AutoscaleErrorResponseError `json:"error,omitempty"`
// SystemData - READ-ONLY; The system metadata related to the response.
SystemData *SystemData `json:"systemData,omitempty"`
}
// MarshalJSON is the custom marshaler for AutoscaleErrorResponse.
func (aer AutoscaleErrorResponse) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if aer.Error != nil {
objectMap["error"] = aer.Error
}
return json.Marshal(objectMap)
}
// AutoscaleErrorResponseError the error object.
type AutoscaleErrorResponseError struct {
// Code - One of a server-defined set of error codes.
Code *string `json:"code,omitempty"`
// Message - A human-readable representation of the error.
Message *string `json:"message,omitempty"`
// Target - The target of the particular error.
Target *string `json:"target,omitempty"`
// Details - A human-readable representation of the error's details.
Details *string `json:"details,omitempty"`
}
// AutoscaleNotification autoscale notification.
type AutoscaleNotification struct {
// Operation - the operation associated with the notification and its value must be "scale"
Operation *string `json:"operation,omitempty"`
// Email - the email notification.
Email *EmailNotification `json:"email,omitempty"`
// Webhooks - the collection of webhook notifications.
Webhooks *[]WebhookNotification `json:"webhooks,omitempty"`
}
// AutoscaleProfile autoscale profile.
type AutoscaleProfile struct {
// Name - the name of the profile.
Name *string `json:"name,omitempty"`
// Capacity - the number of instances that can be used during this profile.
Capacity *ScaleCapacity `json:"capacity,omitempty"`
// Rules - the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified.
Rules *[]ScaleRule `json:"rules,omitempty"`
// FixedDate - the specific date-time for the profile. This element is not used if the Recurrence element is used.
FixedDate *TimeWindow `json:"fixedDate,omitempty"`
// Recurrence - the repeating times at which this profile begins. This element is not used if the FixedDate element is used.
Recurrence *Recurrence `json:"recurrence,omitempty"`
}
// AutoscaleSetting a setting that contains all of the configuration for the automatic scaling of a
// resource.
type AutoscaleSetting struct {
// Profiles - the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified.
Profiles *[]AutoscaleProfile `json:"profiles,omitempty"`
// Notifications - the collection of notifications.
Notifications *[]AutoscaleNotification `json:"notifications,omitempty"`
// Enabled - the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'.
Enabled *bool `json:"enabled,omitempty"`
// PredictiveAutoscalePolicy - the predictive autoscale policy mode.
PredictiveAutoscalePolicy *PredictiveAutoscalePolicy `json:"predictiveAutoscalePolicy,omitempty"`
// Name - the name of the autoscale setting.
Name *string `json:"name,omitempty"`
// TargetResourceURI - the resource identifier of the resource that the autoscale setting should be added to.
TargetResourceURI *string `json:"targetResourceUri,omitempty"`
// TargetResourceLocation - the location of the resource that the autoscale setting should be added to.
TargetResourceLocation *string `json:"targetResourceLocation,omitempty"`
}
// AutoscaleSettingResource the autoscale setting resource.
type AutoscaleSettingResource struct {
autorest.Response `json:"-"`
// ID - READ-ONLY; Azure resource Id
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Azure resource name
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Azure resource type
Type *string `json:"type,omitempty"`
// Location - Resource location
Location *string `json:"location,omitempty"`
// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters.
Tags map[string]*string `json:"tags"`
// AutoscaleSetting - The autoscale setting of the resource.
*AutoscaleSetting `json:"properties,omitempty"`
// SystemData - READ-ONLY; The system metadata related to the response.
SystemData *SystemData `json:"systemData,omitempty"`
}
// MarshalJSON is the custom marshaler for AutoscaleSettingResource.
func (asr AutoscaleSettingResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if asr.Location != nil {
objectMap["location"] = asr.Location
}
if asr.Tags != nil {
objectMap["tags"] = asr.Tags
}
if asr.AutoscaleSetting != nil {
objectMap["properties"] = asr.AutoscaleSetting
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for AutoscaleSettingResource struct.
func (asr *AutoscaleSettingResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
asr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
asr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
asr.Type = &typeVar
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
asr.Location = &location
}
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
asr.Tags = tags
}
case "properties":
if v != nil {
var autoscaleSetting AutoscaleSetting
err = json.Unmarshal(*v, &autoscaleSetting)
if err != nil {
return err
}
asr.AutoscaleSetting = &autoscaleSetting
}
case "systemData":
if v != nil {
var systemData SystemData
err = json.Unmarshal(*v, &systemData)
if err != nil {
return err
}
asr.SystemData = &systemData
}
}
}
return nil
}
// AutoscaleSettingResourceCollection represents a collection of autoscale setting resources.
type AutoscaleSettingResourceCollection struct {
autorest.Response `json:"-"`
// Value - the values for the autoscale setting resources.
Value *[]AutoscaleSettingResource `json:"value,omitempty"`
// NextLink - URL to get the next set of results.
NextLink *string `json:"nextLink,omitempty"`
}
// AutoscaleSettingResourceCollectionIterator provides access to a complete listing of
// AutoscaleSettingResource values.
type AutoscaleSettingResourceCollectionIterator struct {
i int
page AutoscaleSettingResourceCollectionPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *AutoscaleSettingResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingResourceCollectionIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *AutoscaleSettingResourceCollectionIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AutoscaleSettingResourceCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter AutoscaleSettingResourceCollectionIterator) Response() AutoscaleSettingResourceCollection {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter AutoscaleSettingResourceCollectionIterator) Value() AutoscaleSettingResource {
if !iter.page.NotDone() {
return AutoscaleSettingResource{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the AutoscaleSettingResourceCollectionIterator type.
func NewAutoscaleSettingResourceCollectionIterator(page AutoscaleSettingResourceCollectionPage) AutoscaleSettingResourceCollectionIterator {
return AutoscaleSettingResourceCollectionIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (asrc AutoscaleSettingResourceCollection) IsEmpty() bool {
return asrc.Value == nil || len(*asrc.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (asrc AutoscaleSettingResourceCollection) hasNextLink() bool {
return asrc.NextLink != nil && len(*asrc.NextLink) != 0
}
// autoscaleSettingResourceCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (asrc AutoscaleSettingResourceCollection) autoscaleSettingResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
if !asrc.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(asrc.NextLink)))
}
// AutoscaleSettingResourceCollectionPage contains a page of AutoscaleSettingResource values.
type AutoscaleSettingResourceCollectionPage struct {
fn func(context.Context, AutoscaleSettingResourceCollection) (AutoscaleSettingResourceCollection, error)
asrc AutoscaleSettingResourceCollection
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *AutoscaleSettingResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingResourceCollectionPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.asrc)
if err != nil {
return err
}
page.asrc = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *AutoscaleSettingResourceCollectionPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AutoscaleSettingResourceCollectionPage) NotDone() bool {
return !page.asrc.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page AutoscaleSettingResourceCollectionPage) Response() AutoscaleSettingResourceCollection {
return page.asrc
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page AutoscaleSettingResourceCollectionPage) Values() []AutoscaleSettingResource {
if page.asrc.IsEmpty() {
return nil
}
return *page.asrc.Value
}
// Creates a new instance of the AutoscaleSettingResourceCollectionPage type.
func NewAutoscaleSettingResourceCollectionPage(cur AutoscaleSettingResourceCollection, getNextPage func(context.Context, AutoscaleSettingResourceCollection) (AutoscaleSettingResourceCollection, error)) AutoscaleSettingResourceCollectionPage {
return AutoscaleSettingResourceCollectionPage{
fn: getNextPage,
asrc: cur,
}
}
// AutoscaleSettingResourcePatch the autoscale setting object for patch operations.
type AutoscaleSettingResourcePatch struct {
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
// AutoscaleSetting - The autoscale setting properties of the update operation.
*AutoscaleSetting `json:"properties,omitempty"`
}
// MarshalJSON is the custom marshaler for AutoscaleSettingResourcePatch.
func (asrp AutoscaleSettingResourcePatch) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if asrp.Tags != nil {
objectMap["tags"] = asrp.Tags
}
if asrp.AutoscaleSetting != nil {
objectMap["properties"] = asrp.AutoscaleSetting
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for AutoscaleSettingResourcePatch struct.
func (asrp *AutoscaleSettingResourcePatch) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
asrp.Tags = tags
}
case "properties":
if v != nil {
var autoscaleSetting AutoscaleSetting
err = json.Unmarshal(*v, &autoscaleSetting)
if err != nil {
return err
}
asrp.AutoscaleSetting = &autoscaleSetting
}
}
}
return nil
}
// AzureAppPushReceiver the Azure mobile App push notification receiver.
type AzureAppPushReceiver struct {
// Name - The name of the Azure mobile app push receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// EmailAddress - The email address registered for the Azure mobile app.
EmailAddress *string `json:"emailAddress,omitempty"`
}
// AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.
type AzureEntityResource struct {
// Etag - READ-ONLY; Resource Etag.
Etag *string `json:"etag,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureEntityResource.
func (aer AzureEntityResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// AzureFunctionReceiver an azure function receiver.
type AzureFunctionReceiver struct {
// Name - The name of the azure function receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// FunctionAppResourceID - The azure resource id of the function app.
FunctionAppResourceID *string `json:"functionAppResourceId,omitempty"`
// FunctionName - The function name in the function app.
FunctionName *string `json:"functionName,omitempty"`
// HTTPTriggerURL - The http trigger url where http request sent to.
HTTPTriggerURL *string `json:"httpTriggerUrl,omitempty"`
// UseCommonAlertSchema - Indicates whether to use common alert schema.
UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
}
// AzureMonitorPrivateLinkScope an Azure Monitor PrivateLinkScope definition.
type AzureMonitorPrivateLinkScope struct {
autorest.Response `json:"-"`
// AzureMonitorPrivateLinkScopeProperties - Properties that define a Azure Monitor PrivateLinkScope resource.
*AzureMonitorPrivateLinkScopeProperties `json:"properties,omitempty"`
// SystemData - READ-ONLY; System data
SystemData *SystemData `json:"systemData,omitempty"`
// Tags - Resource tags.
Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureMonitorPrivateLinkScope.
func (ampls AzureMonitorPrivateLinkScope) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ampls.AzureMonitorPrivateLinkScopeProperties != nil {
objectMap["properties"] = ampls.AzureMonitorPrivateLinkScopeProperties
}
if ampls.Tags != nil {
objectMap["tags"] = ampls.Tags
}
if ampls.Location != nil {
objectMap["location"] = ampls.Location
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for AzureMonitorPrivateLinkScope struct.
func (ampls *AzureMonitorPrivateLinkScope) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var azureMonitorPrivateLinkScopeProperties AzureMonitorPrivateLinkScopeProperties
err = json.Unmarshal(*v, &azureMonitorPrivateLinkScopeProperties)
if err != nil {
return err
}
ampls.AzureMonitorPrivateLinkScopeProperties = &azureMonitorPrivateLinkScopeProperties
}
case "systemData":
if v != nil {
var systemData SystemData
err = json.Unmarshal(*v, &systemData)
if err != nil {
return err
}
ampls.SystemData = &systemData
}
case "tags":
if v != nil {
var tags map[string]*string
err = json.Unmarshal(*v, &tags)
if err != nil {
return err
}
ampls.Tags = tags
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
ampls.Location = &location
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
ampls.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
ampls.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
ampls.Type = &typeVar
}
}
}
return nil
}
// AzureMonitorPrivateLinkScopeListResult describes the list of Azure Monitor PrivateLinkScope resources.
type AzureMonitorPrivateLinkScopeListResult struct {
autorest.Response `json:"-"`
// Value - List of Azure Monitor PrivateLinkScope definitions.
Value *[]AzureMonitorPrivateLinkScope `json:"value,omitempty"`
// NextLink - The URI to get the next set of Azure Monitor PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the result set.
NextLink *string `json:"nextLink,omitempty"`
}
// AzureMonitorPrivateLinkScopeListResultIterator provides access to a complete listing of
// AzureMonitorPrivateLinkScope values.
type AzureMonitorPrivateLinkScopeListResultIterator struct {
i int
page AzureMonitorPrivateLinkScopeListResultPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *AzureMonitorPrivateLinkScopeListResultIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AzureMonitorPrivateLinkScopeListResultIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *AzureMonitorPrivateLinkScopeListResultIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AzureMonitorPrivateLinkScopeListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter AzureMonitorPrivateLinkScopeListResultIterator) Response() AzureMonitorPrivateLinkScopeListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter AzureMonitorPrivateLinkScopeListResultIterator) Value() AzureMonitorPrivateLinkScope {
if !iter.page.NotDone() {
return AzureMonitorPrivateLinkScope{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the AzureMonitorPrivateLinkScopeListResultIterator type.
func NewAzureMonitorPrivateLinkScopeListResultIterator(page AzureMonitorPrivateLinkScopeListResultPage) AzureMonitorPrivateLinkScopeListResultIterator {
return AzureMonitorPrivateLinkScopeListResultIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (amplslr AzureMonitorPrivateLinkScopeListResult) IsEmpty() bool {
return amplslr.Value == nil || len(*amplslr.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (amplslr AzureMonitorPrivateLinkScopeListResult) hasNextLink() bool {
return amplslr.NextLink != nil && len(*amplslr.NextLink) != 0
}
// azureMonitorPrivateLinkScopeListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (amplslr AzureMonitorPrivateLinkScopeListResult) azureMonitorPrivateLinkScopeListResultPreparer(ctx context.Context) (*http.Request, error) {
if !amplslr.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(amplslr.NextLink)))
}
// AzureMonitorPrivateLinkScopeListResultPage contains a page of AzureMonitorPrivateLinkScope values.
type AzureMonitorPrivateLinkScopeListResultPage struct {
fn func(context.Context, AzureMonitorPrivateLinkScopeListResult) (AzureMonitorPrivateLinkScopeListResult, error)
amplslr AzureMonitorPrivateLinkScopeListResult
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *AzureMonitorPrivateLinkScopeListResultPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/AzureMonitorPrivateLinkScopeListResultPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.amplslr)
if err != nil {
return err
}
page.amplslr = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *AzureMonitorPrivateLinkScopeListResultPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AzureMonitorPrivateLinkScopeListResultPage) NotDone() bool {
return !page.amplslr.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page AzureMonitorPrivateLinkScopeListResultPage) Response() AzureMonitorPrivateLinkScopeListResult {
return page.amplslr
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page AzureMonitorPrivateLinkScopeListResultPage) Values() []AzureMonitorPrivateLinkScope {
if page.amplslr.IsEmpty() {
return nil
}
return *page.amplslr.Value
}
// Creates a new instance of the AzureMonitorPrivateLinkScopeListResultPage type.
func NewAzureMonitorPrivateLinkScopeListResultPage(cur AzureMonitorPrivateLinkScopeListResult, getNextPage func(context.Context, AzureMonitorPrivateLinkScopeListResult) (AzureMonitorPrivateLinkScopeListResult, error)) AzureMonitorPrivateLinkScopeListResultPage {
return AzureMonitorPrivateLinkScopeListResultPage{
fn: getNextPage,
amplslr: cur,
}
}
// AzureMonitorPrivateLinkScopeProperties properties that define a Azure Monitor PrivateLinkScope resource.
type AzureMonitorPrivateLinkScopeProperties struct {
// ProvisioningState - READ-ONLY; Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed.
ProvisioningState *string `json:"provisioningState,omitempty"`
// PrivateEndpointConnections - READ-ONLY; List of private endpoint connections.
PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
// AccessModeSettings - Access mode settings
AccessModeSettings *AccessModeSettings `json:"accessModeSettings,omitempty"`
}
// MarshalJSON is the custom marshaler for AzureMonitorPrivateLinkScopeProperties.
func (amplsp AzureMonitorPrivateLinkScopeProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if amplsp.AccessModeSettings != nil {
objectMap["accessModeSettings"] = amplsp.AccessModeSettings
}
return json.Marshal(objectMap)
}
// AzureResource an azure resource object
type AzureResource struct {
// ID - READ-ONLY; Azure resource Id
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Azure resource name
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Azure resource type
Type *string `json:"type,omitempty"`
// Location - Resource location
Location *string `json:"location,omitempty"`
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for AzureResource.
func (ar AzureResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ar.Location != nil {
objectMap["location"] = ar.Location
}
if ar.Tags != nil {
objectMap["tags"] = ar.Tags
}
return json.Marshal(objectMap)
}
// Context the context info
type Context struct {
// NotificationSource - The source of the notification request
NotificationSource *string `json:"notificationSource,omitempty"`
// ContextType - The context id type
ContextType *string `json:"contextType,omitempty"`
}
// DefaultErrorResponse common error response for all Azure Resource Manager APIs to return error details
// for failed operations. (This also follows the OData error response format.).
type DefaultErrorResponse struct {
// Error - The error object.
Error *ErrorDetail `json:"error,omitempty"`
}
// EmailNotification email notification of an autoscale event.
type EmailNotification struct {
// SendToSubscriptionAdministrator - a value indicating whether to send email to subscription administrator.
SendToSubscriptionAdministrator *bool `json:"sendToSubscriptionAdministrator,omitempty"`
// SendToSubscriptionCoAdministrators - a value indicating whether to send email to subscription co-administrators.
SendToSubscriptionCoAdministrators *bool `json:"sendToSubscriptionCoAdministrators,omitempty"`
// CustomEmails - the custom e-mails list. This value can be null or empty, in which case this attribute will be ignored.
CustomEmails *[]string `json:"customEmails,omitempty"`
}
// EmailReceiver an email receiver.
type EmailReceiver struct {
// Name - The name of the email receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// EmailAddress - The email address of this receiver.
EmailAddress *string `json:"emailAddress,omitempty"`
// UseCommonAlertSchema - Indicates whether to use common alert schema.
UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
// Status - READ-ONLY; The receiver status of the e-mail. Possible values include: 'ReceiverStatusNotSpecified', 'ReceiverStatusEnabled', 'ReceiverStatusDisabled'
Status ReceiverStatus `json:"status,omitempty"`
}
// MarshalJSON is the custom marshaler for EmailReceiver.
func (er EmailReceiver) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if er.Name != nil {
objectMap["name"] = er.Name
}
if er.EmailAddress != nil {
objectMap["emailAddress"] = er.EmailAddress
}
if er.UseCommonAlertSchema != nil {
objectMap["useCommonAlertSchema"] = er.UseCommonAlertSchema
}
return json.Marshal(objectMap)
}
// EnableRequest describes a receiver that should be resubscribed.
type EnableRequest struct {
// ReceiverName - The name of the receiver to resubscribe.
ReceiverName *string `json:"receiverName,omitempty"`
}
// ErrorAdditionalInfo the resource management error additional info.
type ErrorAdditionalInfo struct {
// Type - READ-ONLY; The additional info type.
Type *string `json:"type,omitempty"`
// Info - READ-ONLY; The additional info.
Info interface{} `json:"info,omitempty"`
}
// MarshalJSON is the custom marshaler for ErrorAdditionalInfo.
func (eai ErrorAdditionalInfo) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ErrorDetail the error detail.
type ErrorDetail struct {
// Code - READ-ONLY; The error code.
Code *string `json:"code,omitempty"`
// Message - READ-ONLY; The error message.
Message *string `json:"message,omitempty"`
// Target - READ-ONLY; The error target.
Target *string `json:"target,omitempty"`
// Details - READ-ONLY; The error details.
Details *[]ErrorDetail `json:"details,omitempty"`
// AdditionalInfo - READ-ONLY; The error additional info.
AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
}
// MarshalJSON is the custom marshaler for ErrorDetail.
func (ed ErrorDetail) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ErrorResponse describes the format of Error response.
type ErrorResponse struct {
// Code - Error code
Code *string `json:"code,omitempty"`
// Message - Error message indicating why the operation failed.
Message *string `json:"message,omitempty"`
}
// EventHubReceiver an Event hub receiver.
type EventHubReceiver struct {
// Name - The name of the Event hub receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// EventHubNameSpace - The Event Hub namespace
EventHubNameSpace *string `json:"eventHubNameSpace,omitempty"`
// EventHubName - The name of the specific Event Hub queue
EventHubName *string `json:"eventHubName,omitempty"`
// UseCommonAlertSchema - Indicates whether to use common alert schema.
UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
// TenantID - The tenant Id for the subscription containing this event hub
TenantID *string `json:"tenantId,omitempty"`
// SubscriptionID - The Id for the subscription containing this event hub
SubscriptionID *string `json:"subscriptionId,omitempty"`
}
// ItsmReceiver an Itsm receiver.
type ItsmReceiver struct {
// Name - The name of the Itsm receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// WorkspaceID - OMS LA instance identifier.
WorkspaceID *string `json:"workspaceId,omitempty"`
// ConnectionID - Unique identification of ITSM connection among multiple defined in above workspace.
ConnectionID *string `json:"connectionId,omitempty"`
// TicketConfiguration - JSON blob for the configurations of the ITSM action. CreateMultipleWorkItems option will be part of this blob as well.
TicketConfiguration *string `json:"ticketConfiguration,omitempty"`
// Region - Region in which workspace resides. Supported values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'
Region *string `json:"region,omitempty"`
}
// LogicAppReceiver a logic app receiver.
type LogicAppReceiver struct {
// Name - The name of the logic app receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// ResourceID - The azure resource id of the logic app receiver.
ResourceID *string `json:"resourceId,omitempty"`
// CallbackURL - The callback url where http request sent to.
CallbackURL *string `json:"callbackUrl,omitempty"`
// UseCommonAlertSchema - Indicates whether to use common alert schema.
UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
}
// LogSettings part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log.
type LogSettings struct {
// Category - Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
Category *string `json:"category,omitempty"`
// CategoryGroup - Name of a Diagnostic Log category group for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
CategoryGroup *string `json:"categoryGroup,omitempty"`
// Enabled - a value indicating whether this log is enabled.
Enabled *bool `json:"enabled,omitempty"`
// RetentionPolicy - the retention policy for this log.
RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`
}
// ManagementGroupDiagnosticSettings the management group diagnostic settings.
type ManagementGroupDiagnosticSettings struct {
// StorageAccountID - The resource ID of the storage account to which you would like to send Diagnostic Logs.
StorageAccountID *string `json:"storageAccountId,omitempty"`
// ServiceBusRuleID - The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"`
// EventHubAuthorizationRuleID - The resource Id for the event hub authorization rule.
EventHubAuthorizationRuleID *string `json:"eventHubAuthorizationRuleId,omitempty"`
// EventHubName - The name of the event hub. If none is specified, the default event hub will be selected.
EventHubName *string `json:"eventHubName,omitempty"`
// Logs - The list of logs settings.
Logs *[]ManagementGroupLogSettings `json:"logs,omitempty"`
// WorkspaceID - The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
WorkspaceID *string `json:"workspaceId,omitempty"`
// MarketplacePartnerID - The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
MarketplacePartnerID *string `json:"marketplacePartnerId,omitempty"`
}
// ManagementGroupDiagnosticSettingsResource the management group diagnostic setting resource.
type ManagementGroupDiagnosticSettingsResource struct {
autorest.Response `json:"-"`
// ManagementGroupDiagnosticSettings - Properties of a Management Group Diagnostic Settings Resource.
*ManagementGroupDiagnosticSettings `json:"properties,omitempty"`
// SystemData - READ-ONLY; The system metadata related to this resource.
SystemData *SystemData `json:"systemData,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for ManagementGroupDiagnosticSettingsResource.
func (mgdsr ManagementGroupDiagnosticSettingsResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if mgdsr.ManagementGroupDiagnosticSettings != nil {
objectMap["properties"] = mgdsr.ManagementGroupDiagnosticSettings
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ManagementGroupDiagnosticSettingsResource struct.
func (mgdsr *ManagementGroupDiagnosticSettingsResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var managementGroupDiagnosticSettings ManagementGroupDiagnosticSettings
err = json.Unmarshal(*v, &managementGroupDiagnosticSettings)
if err != nil {
return err
}
mgdsr.ManagementGroupDiagnosticSettings = &managementGroupDiagnosticSettings
}
case "systemData":
if v != nil {
var systemData SystemData
err = json.Unmarshal(*v, &systemData)
if err != nil {
return err
}
mgdsr.SystemData = &systemData
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
mgdsr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
mgdsr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
mgdsr.Type = &typeVar
}
}
}
return nil
}
// ManagementGroupDiagnosticSettingsResourceCollection represents a collection of management group
// diagnostic settings resources.
type ManagementGroupDiagnosticSettingsResourceCollection struct {
autorest.Response `json:"-"`
// Value - The collection of management group diagnostic settings resources.
Value *[]ManagementGroupDiagnosticSettingsResource `json:"value,omitempty"`
}
// ManagementGroupLogSettings part of Management Group diagnostic setting. Specifies the settings for a
// particular log.
type ManagementGroupLogSettings struct {
// Category - Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
Category *string `json:"category,omitempty"`
// CategoryGroup - Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
CategoryGroup *string `json:"categoryGroup,omitempty"`
// Enabled - a value indicating whether this log is enabled.
Enabled *bool `json:"enabled,omitempty"`
}
// MetricSettings part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric.
type MetricSettings struct {
// TimeGrain - the timegrain of the metric in ISO8601 format.
TimeGrain *string `json:"timeGrain,omitempty"`
// Category - Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
Category *string `json:"category,omitempty"`
// Enabled - a value indicating whether this category is enabled.
Enabled *bool `json:"enabled,omitempty"`
// RetentionPolicy - the retention policy for this category.
RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`
}
// MetricTrigger the trigger that results in a scaling action.
type MetricTrigger struct {
// MetricName - the name of the metric that defines what the rule monitors.
MetricName *string `json:"metricName,omitempty"`
// MetricNamespace - the namespace of the metric that defines what the rule monitors.
MetricNamespace *string `json:"metricNamespace,omitempty"`
// MetricResourceURI - the resource identifier of the resource the rule monitors.
MetricResourceURI *string `json:"metricResourceUri,omitempty"`
// MetricResourceLocation - the location of the resource the rule monitors.
MetricResourceLocation *string `json:"metricResourceLocation,omitempty"`
// TimeGrain - the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute.
TimeGrain *string `json:"timeGrain,omitempty"`
// Statistic - the metric statistic type. How the metrics from multiple instances are combined. Possible values include: 'Average', 'Min', 'Max', 'Sum', 'Count'
Statistic MetricStatisticType `json:"statistic,omitempty"`
// TimeWindow - the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes.
TimeWindow *string `json:"timeWindow,omitempty"`
// TimeAggregation - time aggregation type. How the data that is collected should be combined over time. The default value is Average. Possible values include: 'TimeAggregationTypeAverage', 'TimeAggregationTypeMinimum', 'TimeAggregationTypeMaximum', 'TimeAggregationTypeTotal', 'TimeAggregationTypeCount', 'TimeAggregationTypeLast'
TimeAggregation TimeAggregationType `json:"timeAggregation,omitempty"`
// Operator - the operator that is used to compare the metric data and the threshold. Possible values include: 'Equals', 'NotEquals', 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual'
Operator ComparisonOperationType `json:"operator,omitempty"`
// Threshold - the threshold of the metric that triggers the scale action.
Threshold *float64 `json:"threshold,omitempty"`
// Dimensions - List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}].
Dimensions *[]ScaleRuleMetricDimension `json:"dimensions,omitempty"`
// DividePerInstance - a value indicating whether metric should divide per instance.
DividePerInstance *bool `json:"dividePerInstance,omitempty"`
}
// NotificationRequestBody the request body which contain contact detail metadata
type NotificationRequestBody struct {
// AlertType - The name of the supported alert type.
AlertType *string `json:"alertType,omitempty"`
// EmailReceivers - The list of email receivers that are part of this action group.
EmailReceivers *[]EmailReceiver `json:"emailReceivers,omitempty"`
// SmsReceivers - The list of SMS receivers that are part of this action group.
SmsReceivers *[]SmsReceiver `json:"smsReceivers,omitempty"`
// WebhookReceivers - The list of webhook receivers that are part of this action group.
WebhookReceivers *[]WebhookReceiver `json:"webhookReceivers,omitempty"`
// ItsmReceivers - The list of ITSM receivers that are part of this action group.
ItsmReceivers *[]ItsmReceiver `json:"itsmReceivers,omitempty"`
// AzureAppPushReceivers - The list of AzureAppPush receivers that are part of this action group.
AzureAppPushReceivers *[]AzureAppPushReceiver `json:"azureAppPushReceivers,omitempty"`
// AutomationRunbookReceivers - The list of AutomationRunbook receivers that are part of this action group.
AutomationRunbookReceivers *[]AutomationRunbookReceiver `json:"automationRunbookReceivers,omitempty"`
// VoiceReceivers - The list of voice receivers that are part of this action group.
VoiceReceivers *[]VoiceReceiver `json:"voiceReceivers,omitempty"`
// LogicAppReceivers - The list of logic app receivers that are part of this action group.
LogicAppReceivers *[]LogicAppReceiver `json:"logicAppReceivers,omitempty"`
// AzureFunctionReceivers - The list of azure function receivers that are part of this action group.
AzureFunctionReceivers *[]AzureFunctionReceiver `json:"azureFunctionReceivers,omitempty"`
// ArmRoleReceivers - The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported.
ArmRoleReceivers *[]ArmRoleReceiver `json:"armRoleReceivers,omitempty"`
// EventHubReceivers - The list of event hub receivers that are part of this action group.
EventHubReceivers *[]EventHubReceiver `json:"eventHubReceivers,omitempty"`
}
// OperationStatus the status of operation.
type OperationStatus struct {
autorest.Response `json:"-"`
// ID - The operation Id.
ID *string `json:"id,omitempty"`
// Name - The operation name.
Name *string `json:"name,omitempty"`
// StartTime - Start time of the job in standard ISO8601 format.
StartTime *date.Time `json:"startTime,omitempty"`
// EndTime - End time of the job in standard ISO8601 format.
EndTime *date.Time `json:"endTime,omitempty"`
// Status - The status of the operation.
Status *string `json:"status,omitempty"`
// Error - The error detail of the operation if any.
Error *ErrorDetail `json:"error,omitempty"`
}
// PredictiveAutoscalePolicy the parameters for enabling predictive autoscale.
type PredictiveAutoscalePolicy struct {
// ScaleMode - the predictive autoscale mode. Possible values include: 'Disabled', 'ForecastOnly', 'Enabled'
ScaleMode PredictiveAutoscalePolicyScaleMode `json:"scaleMode,omitempty"`
// ScaleLookAheadTime - the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format.
ScaleLookAheadTime *string `json:"scaleLookAheadTime,omitempty"`
}
// PredictiveResponse the response to a metrics query.
type PredictiveResponse struct {
autorest.Response `json:"-"`
// Timespan - The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.
Timespan *string `json:"timespan,omitempty"`
// Interval - The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.
Interval *string `json:"interval,omitempty"`
// MetricName - The metrics being queried
MetricName *string `json:"metricName,omitempty"`
// TargetResourceID - resource of the predictive metric.
TargetResourceID *string `json:"targetResourceId,omitempty"`
// Data - the value of the collection.
Data *[]PredictiveValue `json:"data,omitempty"`
}
// PredictiveValue represents a predictive metric value in the given bucket.
type PredictiveValue struct {
// TimeStamp - the timestamp for the metric value in ISO 8601 format.
TimeStamp *date.Time `json:"timeStamp,omitempty"`
// Value - Predictive value in this time bucket.
Value *float64 `json:"value,omitempty"`
}
// PrivateEndpoint the Private Endpoint resource.
type PrivateEndpoint struct {
// ID - READ-ONLY; The ARM identifier for Private Endpoint
ID *string `json:"id,omitempty"`
}
// MarshalJSON is the custom marshaler for PrivateEndpoint.
func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// PrivateEndpointConnection the Private Endpoint Connection resource.
type PrivateEndpointConnection struct {
autorest.Response `json:"-"`
// PrivateEndpointConnectionProperties - Resource properties.
*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if pec.PrivateEndpointConnectionProperties != nil {
objectMap["properties"] = pec.PrivateEndpointConnectionProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
if err != nil {
return err
}
pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
pec.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
pec.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
pec.Type = &typeVar
}
}
}
return nil
}
// PrivateEndpointConnectionListResult list of private endpoint connection associated with the specified
// storage account
type PrivateEndpointConnectionListResult struct {
autorest.Response `json:"-"`
// Value - Array of private endpoint connections
Value *[]PrivateEndpointConnection `json:"value,omitempty"`
}
// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
type PrivateEndpointConnectionProperties struct {
// PrivateEndpoint - The resource of private end point.
PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed'
ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
}
// PrivateEndpointConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type PrivateEndpointConnectionsCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(PrivateEndpointConnectionsClient) (PrivateEndpointConnection, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for PrivateEndpointConnectionsCreateOrUpdateFuture.Result.
func (future *PrivateEndpointConnectionsCreateOrUpdateFuture) result(client PrivateEndpointConnectionsClient) (pec PrivateEndpointConnection, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
pec.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateEndpointConnectionsCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent {
pec, err = client.CreateOrUpdateResponder(pec.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.PrivateEndpointConnectionsCreateOrUpdateFuture", "Result", pec.Response.Response, "Failure responding to request")
}
}
return
}
// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type PrivateEndpointConnectionsDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(PrivateEndpointConnectionsClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result.
func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateEndpointConnectionsDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// PrivateLinkResource a private link resource
type PrivateLinkResource struct {
autorest.Response `json:"-"`
// PrivateLinkResourceProperties - Resource properties.
*PrivateLinkResourceProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for PrivateLinkResource.
func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if plr.PrivateLinkResourceProperties != nil {
objectMap["properties"] = plr.PrivateLinkResourceProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var privateLinkResourceProperties PrivateLinkResourceProperties
err = json.Unmarshal(*v, &privateLinkResourceProperties)
if err != nil {
return err
}
plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
plr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
plr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
plr.Type = &typeVar
}
}
}
return nil
}
// PrivateLinkResourceListResult a list of private link resources
type PrivateLinkResourceListResult struct {
autorest.Response `json:"-"`
// Value - Array of private link resources
Value *[]PrivateLinkResource `json:"value,omitempty"`
}
// PrivateLinkResourceProperties properties of a private link resource.
type PrivateLinkResourceProperties struct {
// GroupID - READ-ONLY; The private link resource group id.
GroupID *string `json:"groupId,omitempty"`
// RequiredMembers - READ-ONLY; The private link resource required member names.
RequiredMembers *[]string `json:"requiredMembers,omitempty"`
// RequiredZoneNames - The private link resource Private link DNS zone name.
RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
}
// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if plrp.RequiredZoneNames != nil {
objectMap["requiredZoneNames"] = plrp.RequiredZoneNames
}
return json.Marshal(objectMap)
}
// PrivateLinkScopedResourcesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
// of a long-running operation.
type PrivateLinkScopedResourcesCreateOrUpdateFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(PrivateLinkScopedResourcesClient) (ScopedResource, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *PrivateLinkScopedResourcesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for PrivateLinkScopedResourcesCreateOrUpdateFuture.Result.
func (future *PrivateLinkScopedResourcesCreateOrUpdateFuture) result(client PrivateLinkScopedResourcesClient) (sr ScopedResource, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.PrivateLinkScopedResourcesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
sr.Response.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateLinkScopedResourcesCreateOrUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if sr.Response.Response, err = future.GetResult(sender); err == nil && sr.Response.Response.StatusCode != http.StatusNoContent {
sr, err = client.CreateOrUpdateResponder(sr.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.PrivateLinkScopedResourcesCreateOrUpdateFuture", "Result", sr.Response.Response, "Failure responding to request")
}
}
return
}
// PrivateLinkScopedResourcesDeleteFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type PrivateLinkScopedResourcesDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(PrivateLinkScopedResourcesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *PrivateLinkScopedResourcesDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for PrivateLinkScopedResourcesDeleteFuture.Result.
func (future *PrivateLinkScopedResourcesDeleteFuture) result(client PrivateLinkScopedResourcesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.PrivateLinkScopedResourcesDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateLinkScopedResourcesDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// PrivateLinkScopesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type PrivateLinkScopesDeleteFuture struct {
azure.FutureAPI
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
Result func(PrivateLinkScopesClient) (autorest.Response, error)
}
// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *PrivateLinkScopesDeleteFuture) UnmarshalJSON(body []byte) error {
var azFuture azure.Future
if err := json.Unmarshal(body, &azFuture); err != nil {
return err
}
future.FutureAPI = &azFuture
future.Result = future.result
return nil
}
// result is the default implementation for PrivateLinkScopesDeleteFuture.Result.
func (future *PrivateLinkScopesDeleteFuture) result(client PrivateLinkScopesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "diagnostics.PrivateLinkScopesDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
ar.Response = future.Response()
err = azure.NewAsyncOpIncompleteError("diagnostics.PrivateLinkScopesDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
// service consumer and provider.
type PrivateLinkServiceConnectionState struct {
// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
// Description - The reason for approval/rejection of the connection.
Description *string `json:"description,omitempty"`
// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
ActionsRequired *string `json:"actionsRequired,omitempty"`
}
// ProxyResource the resource model definition for a Azure Resource Manager proxy resource. It will not
// have tags and a location
type ProxyResource struct {
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for ProxyResource.
func (pr ProxyResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// Recurrence the repeating times at which this profile begins. This element is not used if the FixedDate
// element is used.
type Recurrence struct {
// Frequency - the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning each week will have the same set of profiles. For example, to set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. Possible values include: 'None', 'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year'
Frequency RecurrenceFrequency `json:"frequency,omitempty"`
// Schedule - the scheduling constraints for when the profile begins.
Schedule *RecurrentSchedule `json:"schedule,omitempty"`
}
// RecurrentSchedule the scheduling constraints for when the profile begins.
type RecurrentSchedule struct {
// TimeZone - the timezone for the hours of the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time
TimeZone *string `json:"timeZone,omitempty"`
// Days - the collection of days that the profile takes effect on. Possible values are Sunday through Saturday.
Days *[]string `json:"days,omitempty"`
// Hours - A collection of hours that the profile takes effect on. Values supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported).
Hours *[]int32 `json:"hours,omitempty"`
// Minutes - A collection of minutes at which the profile takes effect at.
Minutes *[]int32 `json:"minutes,omitempty"`
}
// Resource common fields that are returned in the response for all Azure Resource Manager resources
type Resource struct {
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for Resource.
func (r Resource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// RetentionPolicy specifies the retention policy for the log.
type RetentionPolicy struct {
// Enabled - a value indicating whether the retention policy is enabled.
Enabled *bool `json:"enabled,omitempty"`
// Days - the number of days for the retention in days. A value of 0 will retain the events indefinitely.
Days *int32 `json:"days,omitempty"`
}
// ScaleAction the parameters for the scaling action.
type ScaleAction struct {
// Direction - the scale direction. Whether the scaling action increases or decreases the number of instances. Possible values include: 'ScaleDirectionNone', 'ScaleDirectionIncrease', 'ScaleDirectionDecrease'
Direction ScaleDirection `json:"direction,omitempty"`
// Type - the type of action that should occur when the scale rule fires. Possible values include: 'ChangeCount', 'PercentChangeCount', 'ExactCount', 'ServiceAllowedNextValue'
Type ScaleType `json:"type,omitempty"`
// Value - the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1.
Value *string `json:"value,omitempty"`
// Cooldown - the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format.
Cooldown *string `json:"cooldown,omitempty"`
}
// ScaleCapacity the number of instances that can be used during this profile.
type ScaleCapacity struct {
// Minimum - the minimum number of instances for the resource.
Minimum *string `json:"minimum,omitempty"`
// Maximum - the maximum number of instances for the resource. The actual maximum number of instances is limited by the cores that are available in the subscription.
Maximum *string `json:"maximum,omitempty"`
// Default - the number of instances that will be set if metrics are not available for evaluation. The default is only used if the current instance count is lower than the default.
Default *string `json:"default,omitempty"`
}
// ScaleRule a rule that provide the triggers and parameters for the scaling action.
type ScaleRule struct {
// MetricTrigger - the trigger that results in a scaling action.
MetricTrigger *MetricTrigger `json:"metricTrigger,omitempty"`
// ScaleAction - the parameters for the scaling action.
ScaleAction *ScaleAction `json:"scaleAction,omitempty"`
}
// ScaleRuleMetricDimension specifies an auto scale rule metric dimension.
type ScaleRuleMetricDimension struct {
// DimensionName - Name of the dimension.
DimensionName *string `json:"DimensionName,omitempty"`
// Operator - the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. Possible values include: 'ScaleRuleMetricDimensionOperationTypeEquals', 'ScaleRuleMetricDimensionOperationTypeNotEquals'
Operator ScaleRuleMetricDimensionOperationType `json:"Operator,omitempty"`
// Values - list of dimension values. For example: ["App1","App2"].
Values *[]string `json:"Values,omitempty"`
}
// ScopedResource a private link scoped resource
type ScopedResource struct {
autorest.Response `json:"-"`
// ScopedResourceProperties - Resource properties.
*ScopedResourceProperties `json:"properties,omitempty"`
// SystemData - READ-ONLY; System data
SystemData *SystemData `json:"systemData,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for ScopedResource.
func (sr ScopedResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if sr.ScopedResourceProperties != nil {
objectMap["properties"] = sr.ScopedResourceProperties
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ScopedResource struct.
func (sr *ScopedResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var scopedResourceProperties ScopedResourceProperties
err = json.Unmarshal(*v, &scopedResourceProperties)
if err != nil {
return err
}
sr.ScopedResourceProperties = &scopedResourceProperties
}
case "systemData":
if v != nil {
var systemData SystemData
err = json.Unmarshal(*v, &systemData)
if err != nil {
return err
}
sr.SystemData = &systemData
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
sr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
sr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
sr.Type = &typeVar
}
}
}
return nil
}
// ScopedResourceListResult a list of scoped resources in a private link scope.
type ScopedResourceListResult struct {
autorest.Response `json:"-"`
// Value - READ-ONLY; Array of results.
Value *[]ScopedResource `json:"value,omitempty"`
// NextLink - READ-ONLY; Link to retrieve next page of results.
NextLink *string `json:"nextLink,omitempty"`
}
// MarshalJSON is the custom marshaler for ScopedResourceListResult.
func (srlr ScopedResourceListResult) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
return json.Marshal(objectMap)
}
// ScopedResourceListResultIterator provides access to a complete listing of ScopedResource values.
type ScopedResourceListResultIterator struct {
i int
page ScopedResourceListResultPage
}
// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *ScopedResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ScopedResourceListResultIterator.NextWithContext")
defer func() {
sc := -1
if iter.Response().Response.Response != nil {
sc = iter.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *ScopedResourceListResultIterator) Next() error {
return iter.NextWithContext(context.Background())
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ScopedResourceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter ScopedResourceListResultIterator) Response() ScopedResourceListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter ScopedResourceListResultIterator) Value() ScopedResource {
if !iter.page.NotDone() {
return ScopedResource{}
}
return iter.page.Values()[iter.i]
}
// Creates a new instance of the ScopedResourceListResultIterator type.
func NewScopedResourceListResultIterator(page ScopedResourceListResultPage) ScopedResourceListResultIterator {
return ScopedResourceListResultIterator{page: page}
}
// IsEmpty returns true if the ListResult contains no values.
func (srlr ScopedResourceListResult) IsEmpty() bool {
return srlr.Value == nil || len(*srlr.Value) == 0
}
// hasNextLink returns true if the NextLink is not empty.
func (srlr ScopedResourceListResult) hasNextLink() bool {
return srlr.NextLink != nil && len(*srlr.NextLink) != 0
}
// scopedResourceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (srlr ScopedResourceListResult) scopedResourceListResultPreparer(ctx context.Context) (*http.Request, error) {
if !srlr.hasNextLink() {
return nil, nil
}
return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(srlr.NextLink)))
}
// ScopedResourceListResultPage contains a page of ScopedResource values.
type ScopedResourceListResultPage struct {
fn func(context.Context, ScopedResourceListResult) (ScopedResourceListResult, error)
srlr ScopedResourceListResult
}
// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *ScopedResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ScopedResourceListResultPage.NextWithContext")
defer func() {
sc := -1
if page.Response().Response.Response != nil {
sc = page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
for {
next, err := page.fn(ctx, page.srlr)
if err != nil {
return err
}
page.srlr = next
if !next.hasNextLink() || !next.IsEmpty() {
break
}
}
return nil
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *ScopedResourceListResultPage) Next() error {
return page.NextWithContext(context.Background())
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ScopedResourceListResultPage) NotDone() bool {
return !page.srlr.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page ScopedResourceListResultPage) Response() ScopedResourceListResult {
return page.srlr
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page ScopedResourceListResultPage) Values() []ScopedResource {
if page.srlr.IsEmpty() {
return nil
}
return *page.srlr.Value
}
// Creates a new instance of the ScopedResourceListResultPage type.
func NewScopedResourceListResultPage(cur ScopedResourceListResult, getNextPage func(context.Context, ScopedResourceListResult) (ScopedResourceListResult, error)) ScopedResourceListResultPage {
return ScopedResourceListResultPage{
fn: getNextPage,
srlr: cur,
}
}
// ScopedResourceProperties properties of a private link scoped resource.
type ScopedResourceProperties struct {
// LinkedResourceID - The resource id of the scoped Azure monitor resource.
LinkedResourceID *string `json:"linkedResourceId,omitempty"`
// ProvisioningState - READ-ONLY; State of the private endpoint connection.
ProvisioningState *string `json:"provisioningState,omitempty"`
}
// MarshalJSON is the custom marshaler for ScopedResourceProperties.
func (srp ScopedResourceProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if srp.LinkedResourceID != nil {
objectMap["linkedResourceId"] = srp.LinkedResourceID
}
return json.Marshal(objectMap)
}
// Settings the diagnostic settings.
type Settings struct {
// StorageAccountID - The resource ID of the storage account to which you would like to send Diagnostic Logs.
StorageAccountID *string `json:"storageAccountId,omitempty"`
// ServiceBusRuleID - The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"`
// EventHubAuthorizationRuleID - The resource Id for the event hub authorization rule.
EventHubAuthorizationRuleID *string `json:"eventHubAuthorizationRuleId,omitempty"`
// EventHubName - The name of the event hub. If none is specified, the default event hub will be selected.
EventHubName *string `json:"eventHubName,omitempty"`
// Metrics - The list of metric settings.
Metrics *[]MetricSettings `json:"metrics,omitempty"`
// Logs - The list of logs settings.
Logs *[]LogSettings `json:"logs,omitempty"`
// WorkspaceID - The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
WorkspaceID *string `json:"workspaceId,omitempty"`
// MarketplacePartnerID - The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
MarketplacePartnerID *string `json:"marketplacePartnerId,omitempty"`
// LogAnalyticsDestinationType - A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: <normalized service identity>_<normalized category name>. Possible values are: Dedicated and null (null is default.)
LogAnalyticsDestinationType *string `json:"logAnalyticsDestinationType,omitempty"`
}
// SettingsCategory the diagnostic settings Category.
type SettingsCategory struct {
// CategoryType - The type of the diagnostic settings category. Possible values include: 'Metrics', 'Logs'
CategoryType CategoryType `json:"categoryType,omitempty"`
// CategoryGroups - the collection of what category groups are supported.
CategoryGroups *[]string `json:"categoryGroups,omitempty"`
}
// SettingsCategoryResource the diagnostic settings category resource.
type SettingsCategoryResource struct {
autorest.Response `json:"-"`
// SettingsCategory - The properties of a Diagnostic Settings Category.
*SettingsCategory `json:"properties,omitempty"`
// SystemData - READ-ONLY; The system metadata related to this resource.
SystemData *SystemData `json:"systemData,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for SettingsCategoryResource.
func (scr SettingsCategoryResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if scr.SettingsCategory != nil {
objectMap["properties"] = scr.SettingsCategory
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for SettingsCategoryResource struct.
func (scr *SettingsCategoryResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var settingsCategory SettingsCategory
err = json.Unmarshal(*v, &settingsCategory)
if err != nil {
return err
}
scr.SettingsCategory = &settingsCategory
}
case "systemData":
if v != nil {
var systemData SystemData
err = json.Unmarshal(*v, &systemData)
if err != nil {
return err
}
scr.SystemData = &systemData
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
scr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
scr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
scr.Type = &typeVar
}
}
}
return nil
}
// SettingsCategoryResourceCollection represents a collection of diagnostic setting category resources.
type SettingsCategoryResourceCollection struct {
autorest.Response `json:"-"`
// Value - The collection of diagnostic settings category resources.
Value *[]SettingsCategoryResource `json:"value,omitempty"`
}
// SettingsResource the diagnostic setting resource.
type SettingsResource struct {
autorest.Response `json:"-"`
// Settings - Properties of a Diagnostic Settings Resource.
*Settings `json:"properties,omitempty"`
// SystemData - READ-ONLY; The system metadata related to this resource.
SystemData *SystemData `json:"systemData,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for SettingsResource.
func (sr SettingsResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if sr.Settings != nil {
objectMap["properties"] = sr.Settings
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for SettingsResource struct.
func (sr *SettingsResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var settings Settings
err = json.Unmarshal(*v, &settings)
if err != nil {
return err
}
sr.Settings = &settings
}
case "systemData":
if v != nil {
var systemData SystemData
err = json.Unmarshal(*v, &systemData)
if err != nil {
return err
}
sr.SystemData = &systemData
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
sr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
sr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
sr.Type = &typeVar
}
}
}
return nil
}
// SettingsResourceCollection represents a collection of alert rule resources.
type SettingsResourceCollection struct {
autorest.Response `json:"-"`
// Value - The collection of diagnostic settings resources;.
Value *[]SettingsResource `json:"value,omitempty"`
}
// SmsReceiver an SMS receiver.
type SmsReceiver struct {
// Name - The name of the SMS receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// CountryCode - The country code of the SMS receiver.
CountryCode *string `json:"countryCode,omitempty"`
// PhoneNumber - The phone number of the SMS receiver.
PhoneNumber *string `json:"phoneNumber,omitempty"`
// Status - READ-ONLY; The status of the receiver. Possible values include: 'ReceiverStatusNotSpecified', 'ReceiverStatusEnabled', 'ReceiverStatusDisabled'
Status ReceiverStatus `json:"status,omitempty"`
}
// MarshalJSON is the custom marshaler for SmsReceiver.
func (sr SmsReceiver) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if sr.Name != nil {
objectMap["name"] = sr.Name
}
if sr.CountryCode != nil {
objectMap["countryCode"] = sr.CountryCode
}
if sr.PhoneNumber != nil {
objectMap["phoneNumber"] = sr.PhoneNumber
}
return json.Marshal(objectMap)
}
// SubscriptionDiagnosticSettings the subscription diagnostic settings.
type SubscriptionDiagnosticSettings struct {
// StorageAccountID - The resource ID of the storage account to which you would like to send Diagnostic Logs.
StorageAccountID *string `json:"storageAccountId,omitempty"`
// ServiceBusRuleID - The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"`
// EventHubAuthorizationRuleID - The resource Id for the event hub authorization rule.
EventHubAuthorizationRuleID *string `json:"eventHubAuthorizationRuleId,omitempty"`
// EventHubName - The name of the event hub. If none is specified, the default event hub will be selected.
EventHubName *string `json:"eventHubName,omitempty"`
// Logs - The list of logs settings.
Logs *[]SubscriptionLogSettings `json:"logs,omitempty"`
// WorkspaceID - The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
WorkspaceID *string `json:"workspaceId,omitempty"`
// MarketplacePartnerID - The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
MarketplacePartnerID *string `json:"marketplacePartnerId,omitempty"`
}
// SubscriptionDiagnosticSettingsResource the subscription diagnostic setting resource.
type SubscriptionDiagnosticSettingsResource struct {
autorest.Response `json:"-"`
// SubscriptionDiagnosticSettings - Properties of a Subscription Diagnostic Settings Resource.
*SubscriptionDiagnosticSettings `json:"properties,omitempty"`
// SystemData - READ-ONLY; The system metadata related to this resource.
SystemData *SystemData `json:"systemData,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for SubscriptionDiagnosticSettingsResource.
func (sdsr SubscriptionDiagnosticSettingsResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if sdsr.SubscriptionDiagnosticSettings != nil {
objectMap["properties"] = sdsr.SubscriptionDiagnosticSettings
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for SubscriptionDiagnosticSettingsResource struct.
func (sdsr *SubscriptionDiagnosticSettingsResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var subscriptionDiagnosticSettings SubscriptionDiagnosticSettings
err = json.Unmarshal(*v, &subscriptionDiagnosticSettings)
if err != nil {
return err
}
sdsr.SubscriptionDiagnosticSettings = &subscriptionDiagnosticSettings
}
case "systemData":
if v != nil {
var systemData SystemData
err = json.Unmarshal(*v, &systemData)
if err != nil {
return err
}
sdsr.SystemData = &systemData
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
sdsr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
sdsr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
sdsr.Type = &typeVar
}
}
}
return nil
}
// SubscriptionDiagnosticSettingsResourceCollection represents a collection of subscription diagnostic
// settings resources.
type SubscriptionDiagnosticSettingsResourceCollection struct {
autorest.Response `json:"-"`
// Value - The collection of subscription diagnostic settings resources.
Value *[]SubscriptionDiagnosticSettingsResource `json:"value,omitempty"`
}
// SubscriptionLogSettings part of Subscription diagnostic setting. Specifies the settings for a particular
// log.
type SubscriptionLogSettings struct {
// Category - Name of a Subscription Diagnostic Log category for a resource type this setting is applied to.
Category *string `json:"category,omitempty"`
// CategoryGroup - Name of a Subscription Diagnostic Log category group for a resource type this setting is applied to.
CategoryGroup *string `json:"categoryGroup,omitempty"`
// Enabled - a value indicating whether this log is enabled.
Enabled *bool `json:"enabled,omitempty"`
}
// SystemData metadata pertaining to creation and last modification of the resource.
type SystemData struct {
// CreatedBy - The identity that created the resource.
CreatedBy *string `json:"createdBy,omitempty"`
// CreatedByType - The type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
CreatedByType CreatedByType `json:"createdByType,omitempty"`
// CreatedAt - The timestamp of resource creation (UTC).
CreatedAt *date.Time `json:"createdAt,omitempty"`
// LastModifiedBy - The identity that last modified the resource.
LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
// LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
// LastModifiedAt - The timestamp of resource last modification (UTC)
LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
}
// TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on a
// PrivateLinkScope instance.
type TagsResource struct {
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
}
// MarshalJSON is the custom marshaler for TagsResource.
func (tr TagsResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if tr.Tags != nil {
objectMap["tags"] = tr.Tags
}
return json.Marshal(objectMap)
}
// TestNotificationDetailsResponse the details of the test notification results.
type TestNotificationDetailsResponse struct {
autorest.Response `json:"-"`
Context *Context `json:"context,omitempty"`
// State - The overall state
State *string `json:"state,omitempty"`
// CompletedTime - The completed time
CompletedTime *string `json:"completedTime,omitempty"`
// CreatedTime - The created time
CreatedTime *string `json:"createdTime,omitempty"`
// ActionDetails - The list of action detail
ActionDetails *[]ActionDetail `json:"actionDetails,omitempty"`
}
// TimeWindow a specific date-time for the profile.
type TimeWindow struct {
// TimeZone - the timezone of the start and end times for the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time
TimeZone *string `json:"timeZone,omitempty"`
// Start - the start time for the profile in ISO 8601 format.
Start *date.Time `json:"start,omitempty"`
// End - the end time for the profile in ISO 8601 format.
End *date.Time `json:"end,omitempty"`
}
// TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource
// which has 'tags' and a 'location'
type TrackedResource struct {
// Tags - Resource tags.
Tags map[string]*string `json:"tags"`
// Location - The geo-location where the resource lives
Location *string `json:"location,omitempty"`
// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; The name of the resource
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Type *string `json:"type,omitempty"`
}
// MarshalJSON is the custom marshaler for TrackedResource.
func (tr TrackedResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if tr.Tags != nil {
objectMap["tags"] = tr.Tags
}
if tr.Location != nil {
objectMap["location"] = tr.Location
}
return json.Marshal(objectMap)
}
// VoiceReceiver a voice receiver.
type VoiceReceiver struct {
// Name - The name of the voice receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// CountryCode - The country code of the voice receiver.
CountryCode *string `json:"countryCode,omitempty"`
// PhoneNumber - The phone number of the voice receiver.
PhoneNumber *string `json:"phoneNumber,omitempty"`
}
// WebhookNotification webhook notification of an autoscale event.
type WebhookNotification struct {
// ServiceURI - the service address to receive the notification.
ServiceURI *string `json:"serviceUri,omitempty"`
// Properties - a property bag of settings. This value can be empty.
Properties map[string]*string `json:"properties"`
}
// MarshalJSON is the custom marshaler for WebhookNotification.
func (wn WebhookNotification) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if wn.ServiceURI != nil {
objectMap["serviceUri"] = wn.ServiceURI
}
if wn.Properties != nil {
objectMap["properties"] = wn.Properties
}
return json.Marshal(objectMap)
}
// WebhookReceiver a webhook receiver.
type WebhookReceiver struct {
// Name - The name of the webhook receiver. Names must be unique across all receivers within an action group.
Name *string `json:"name,omitempty"`
// ServiceURI - The URI where webhooks should be sent.
ServiceURI *string `json:"serviceUri,omitempty"`
// UseCommonAlertSchema - Indicates whether to use common alert schema.
UseCommonAlertSchema *bool `json:"useCommonAlertSchema,omitempty"`
// UseAadAuth - Indicates whether or not use AAD authentication.
UseAadAuth *bool `json:"useAadAuth,omitempty"`
// ObjectID - Indicates the webhook app object Id for aad auth.
ObjectID *string `json:"objectId,omitempty"`
// IdentifierURI - Indicates the identifier uri for aad auth.
IdentifierURI *string `json:"identifierUri,omitempty"`
// TenantID - Indicates the tenant id for aad auth.
TenantID *string `json:"tenantId,omitempty"`
}
|