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
|
# coding=utf-8
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
# 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 datetime
from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union
from .. import _serialization
if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from .. import models as _models
class AADAuthenticationSettings(_serialization.Model):
"""Enable AAD authentication for SQL VM.
:ivar client_id: The client Id of the Managed Identity to query Microsoft Graph API. An empty
string must be used for the system assigned Managed Identity.
:vartype client_id: str
"""
_attribute_map = {
"client_id": {"key": "clientId", "type": "str"},
}
def __init__(self, *, client_id: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword client_id: The client Id of the Managed Identity to query Microsoft Graph API. An
empty string must be used for the system assigned Managed Identity.
:paramtype client_id: str
"""
super().__init__(**kwargs)
self.client_id = client_id
class AdditionalFeaturesServerConfigurations(_serialization.Model):
"""Additional SQL Server feature settings.
:ivar is_r_services_enabled: Enable or disable R services (SQL 2016 onwards).
:vartype is_r_services_enabled: bool
"""
_attribute_map = {
"is_r_services_enabled": {"key": "isRServicesEnabled", "type": "bool"},
}
def __init__(self, *, is_r_services_enabled: Optional[bool] = None, **kwargs: Any) -> None:
"""
:keyword is_r_services_enabled: Enable or disable R services (SQL 2016 onwards).
:paramtype is_r_services_enabled: bool
"""
super().__init__(**kwargs)
self.is_r_services_enabled = is_r_services_enabled
class AgConfiguration(_serialization.Model):
"""Availability group configuration.
:ivar replicas: Replica configurations.
:vartype replicas: list[~azure.mgmt.sqlvirtualmachine.models.AgReplica]
"""
_attribute_map = {
"replicas": {"key": "replicas", "type": "[AgReplica]"},
}
def __init__(self, *, replicas: Optional[List["_models.AgReplica"]] = None, **kwargs: Any) -> None:
"""
:keyword replicas: Replica configurations.
:paramtype replicas: list[~azure.mgmt.sqlvirtualmachine.models.AgReplica]
"""
super().__init__(**kwargs)
self.replicas = replicas
class AgReplica(_serialization.Model):
"""Availability group replica configuration.
:ivar sql_virtual_machine_instance_id: Sql VirtualMachine Instance Id.
:vartype sql_virtual_machine_instance_id: str
:ivar role: Replica Role in availability group. Known values are: "PRIMARY" and "SECONDARY".
:vartype role: str or ~azure.mgmt.sqlvirtualmachine.models.Role
:ivar commit: Replica commit mode in availability group. Known values are: "SYNCHRONOUS_COMMIT"
and "ASYNCHRONOUS_COMMIT".
:vartype commit: str or ~azure.mgmt.sqlvirtualmachine.models.Commit
:ivar failover: Replica failover mode in availability group. Known values are: "AUTOMATIC" and
"MANUAL".
:vartype failover: str or ~azure.mgmt.sqlvirtualmachine.models.Failover
:ivar readable_secondary: Replica readable secondary mode in availability group. Known values
are: "NO", "ALL", and "READ_ONLY".
:vartype readable_secondary: str or ~azure.mgmt.sqlvirtualmachine.models.ReadableSecondary
"""
_attribute_map = {
"sql_virtual_machine_instance_id": {"key": "sqlVirtualMachineInstanceId", "type": "str"},
"role": {"key": "role", "type": "str"},
"commit": {"key": "commit", "type": "str"},
"failover": {"key": "failover", "type": "str"},
"readable_secondary": {"key": "readableSecondary", "type": "str"},
}
def __init__(
self,
*,
sql_virtual_machine_instance_id: Optional[str] = None,
role: Optional[Union[str, "_models.Role"]] = None,
commit: Optional[Union[str, "_models.Commit"]] = None,
failover: Optional[Union[str, "_models.Failover"]] = None,
readable_secondary: Optional[Union[str, "_models.ReadableSecondary"]] = None,
**kwargs: Any
) -> None:
"""
:keyword sql_virtual_machine_instance_id: Sql VirtualMachine Instance Id.
:paramtype sql_virtual_machine_instance_id: str
:keyword role: Replica Role in availability group. Known values are: "PRIMARY" and "SECONDARY".
:paramtype role: str or ~azure.mgmt.sqlvirtualmachine.models.Role
:keyword commit: Replica commit mode in availability group. Known values are:
"SYNCHRONOUS_COMMIT" and "ASYNCHRONOUS_COMMIT".
:paramtype commit: str or ~azure.mgmt.sqlvirtualmachine.models.Commit
:keyword failover: Replica failover mode in availability group. Known values are: "AUTOMATIC"
and "MANUAL".
:paramtype failover: str or ~azure.mgmt.sqlvirtualmachine.models.Failover
:keyword readable_secondary: Replica readable secondary mode in availability group. Known
values are: "NO", "ALL", and "READ_ONLY".
:paramtype readable_secondary: str or ~azure.mgmt.sqlvirtualmachine.models.ReadableSecondary
"""
super().__init__(**kwargs)
self.sql_virtual_machine_instance_id = sql_virtual_machine_instance_id
self.role = role
self.commit = commit
self.failover = failover
self.readable_secondary = readable_secondary
class AssessmentSettings(_serialization.Model):
"""Configure SQL best practices Assessment for databases in your SQL virtual machine.
:ivar enable: Enable or disable SQL best practices Assessment feature on SQL virtual machine.
:vartype enable: bool
:ivar run_immediately: Run SQL best practices Assessment immediately on SQL virtual machine.
:vartype run_immediately: bool
:ivar schedule: Schedule for SQL best practices Assessment.
:vartype schedule: ~azure.mgmt.sqlvirtualmachine.models.Schedule
"""
_attribute_map = {
"enable": {"key": "enable", "type": "bool"},
"run_immediately": {"key": "runImmediately", "type": "bool"},
"schedule": {"key": "schedule", "type": "Schedule"},
}
def __init__(
self,
*,
enable: Optional[bool] = None,
run_immediately: Optional[bool] = None,
schedule: Optional["_models.Schedule"] = None,
**kwargs: Any
) -> None:
"""
:keyword enable: Enable or disable SQL best practices Assessment feature on SQL virtual
machine.
:paramtype enable: bool
:keyword run_immediately: Run SQL best practices Assessment immediately on SQL virtual machine.
:paramtype run_immediately: bool
:keyword schedule: Schedule for SQL best practices Assessment.
:paramtype schedule: ~azure.mgmt.sqlvirtualmachine.models.Schedule
"""
super().__init__(**kwargs)
self.enable = enable
self.run_immediately = run_immediately
self.schedule = schedule
class AutoBackupSettings(_serialization.Model): # pylint: disable=too-many-instance-attributes
"""Configure backups for databases in your SQL virtual machine.
:ivar enable: Enable or disable autobackup on SQL virtual machine.
:vartype enable: bool
:ivar enable_encryption: Enable or disable encryption for backup on SQL virtual machine.
:vartype enable_encryption: bool
:ivar retention_period: Retention period of backup: 1-90 days.
:vartype retention_period: int
:ivar storage_account_url: Storage account url where backup will be taken to.
:vartype storage_account_url: str
:ivar storage_container_name: Storage container name where backup will be taken to.
:vartype storage_container_name: str
:ivar storage_access_key: Storage account key where backup will be taken to.
:vartype storage_access_key: str
:ivar password: Password for encryption on backup.
:vartype password: str
:ivar backup_system_dbs: Include or exclude system databases from auto backup.
:vartype backup_system_dbs: bool
:ivar backup_schedule_type: Backup schedule type. Known values are: "Manual" and "Automated".
:vartype backup_schedule_type: str or ~azure.mgmt.sqlvirtualmachine.models.BackupScheduleType
:ivar full_backup_frequency: Frequency of full backups. In both cases, full backups begin
during the next scheduled time window. Known values are: "Daily" and "Weekly".
:vartype full_backup_frequency: str or
~azure.mgmt.sqlvirtualmachine.models.FullBackupFrequencyType
:ivar days_of_week: Days of the week for the backups when FullBackupFrequency is set to Weekly.
:vartype days_of_week: list[str or ~azure.mgmt.sqlvirtualmachine.models.AutoBackupDaysOfWeek]
:ivar full_backup_start_time: Start time of a given day during which full backups can take
place. 0-23 hours.
:vartype full_backup_start_time: int
:ivar full_backup_window_hours: Duration of the time window of a given day during which full
backups can take place. 1-23 hours.
:vartype full_backup_window_hours: int
:ivar log_backup_frequency: Frequency of log backups. 5-60 minutes.
:vartype log_backup_frequency: int
"""
_attribute_map = {
"enable": {"key": "enable", "type": "bool"},
"enable_encryption": {"key": "enableEncryption", "type": "bool"},
"retention_period": {"key": "retentionPeriod", "type": "int"},
"storage_account_url": {"key": "storageAccountUrl", "type": "str"},
"storage_container_name": {"key": "storageContainerName", "type": "str"},
"storage_access_key": {"key": "storageAccessKey", "type": "str"},
"password": {"key": "password", "type": "str"},
"backup_system_dbs": {"key": "backupSystemDbs", "type": "bool"},
"backup_schedule_type": {"key": "backupScheduleType", "type": "str"},
"full_backup_frequency": {"key": "fullBackupFrequency", "type": "str"},
"days_of_week": {"key": "daysOfWeek", "type": "[str]"},
"full_backup_start_time": {"key": "fullBackupStartTime", "type": "int"},
"full_backup_window_hours": {"key": "fullBackupWindowHours", "type": "int"},
"log_backup_frequency": {"key": "logBackupFrequency", "type": "int"},
}
def __init__(
self,
*,
enable: Optional[bool] = None,
enable_encryption: Optional[bool] = None,
retention_period: Optional[int] = None,
storage_account_url: Optional[str] = None,
storage_container_name: Optional[str] = None,
storage_access_key: Optional[str] = None,
password: Optional[str] = None,
backup_system_dbs: Optional[bool] = None,
backup_schedule_type: Optional[Union[str, "_models.BackupScheduleType"]] = None,
full_backup_frequency: Optional[Union[str, "_models.FullBackupFrequencyType"]] = None,
days_of_week: Optional[List[Union[str, "_models.AutoBackupDaysOfWeek"]]] = None,
full_backup_start_time: Optional[int] = None,
full_backup_window_hours: Optional[int] = None,
log_backup_frequency: Optional[int] = None,
**kwargs: Any
) -> None:
"""
:keyword enable: Enable or disable autobackup on SQL virtual machine.
:paramtype enable: bool
:keyword enable_encryption: Enable or disable encryption for backup on SQL virtual machine.
:paramtype enable_encryption: bool
:keyword retention_period: Retention period of backup: 1-90 days.
:paramtype retention_period: int
:keyword storage_account_url: Storage account url where backup will be taken to.
:paramtype storage_account_url: str
:keyword storage_container_name: Storage container name where backup will be taken to.
:paramtype storage_container_name: str
:keyword storage_access_key: Storage account key where backup will be taken to.
:paramtype storage_access_key: str
:keyword password: Password for encryption on backup.
:paramtype password: str
:keyword backup_system_dbs: Include or exclude system databases from auto backup.
:paramtype backup_system_dbs: bool
:keyword backup_schedule_type: Backup schedule type. Known values are: "Manual" and
"Automated".
:paramtype backup_schedule_type: str or ~azure.mgmt.sqlvirtualmachine.models.BackupScheduleType
:keyword full_backup_frequency: Frequency of full backups. In both cases, full backups begin
during the next scheduled time window. Known values are: "Daily" and "Weekly".
:paramtype full_backup_frequency: str or
~azure.mgmt.sqlvirtualmachine.models.FullBackupFrequencyType
:keyword days_of_week: Days of the week for the backups when FullBackupFrequency is set to
Weekly.
:paramtype days_of_week: list[str or ~azure.mgmt.sqlvirtualmachine.models.AutoBackupDaysOfWeek]
:keyword full_backup_start_time: Start time of a given day during which full backups can take
place. 0-23 hours.
:paramtype full_backup_start_time: int
:keyword full_backup_window_hours: Duration of the time window of a given day during which full
backups can take place. 1-23 hours.
:paramtype full_backup_window_hours: int
:keyword log_backup_frequency: Frequency of log backups. 5-60 minutes.
:paramtype log_backup_frequency: int
"""
super().__init__(**kwargs)
self.enable = enable
self.enable_encryption = enable_encryption
self.retention_period = retention_period
self.storage_account_url = storage_account_url
self.storage_container_name = storage_container_name
self.storage_access_key = storage_access_key
self.password = password
self.backup_system_dbs = backup_system_dbs
self.backup_schedule_type = backup_schedule_type
self.full_backup_frequency = full_backup_frequency
self.days_of_week = days_of_week
self.full_backup_start_time = full_backup_start_time
self.full_backup_window_hours = full_backup_window_hours
self.log_backup_frequency = log_backup_frequency
class AutoPatchingSettings(_serialization.Model):
"""Set a patching window during which Windows and SQL patches will be applied.
:ivar enable: Enable or disable autopatching on SQL virtual machine.
:vartype enable: bool
:ivar day_of_week: Day of week to apply the patch on. Known values are: "Everyday", "Monday",
"Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
:vartype day_of_week: str or ~azure.mgmt.sqlvirtualmachine.models.DayOfWeek
:ivar maintenance_window_starting_hour: Hour of the day when patching is initiated. Local VM
time.
:vartype maintenance_window_starting_hour: int
:ivar maintenance_window_duration: Duration of patching.
:vartype maintenance_window_duration: int
"""
_attribute_map = {
"enable": {"key": "enable", "type": "bool"},
"day_of_week": {"key": "dayOfWeek", "type": "str"},
"maintenance_window_starting_hour": {"key": "maintenanceWindowStartingHour", "type": "int"},
"maintenance_window_duration": {"key": "maintenanceWindowDuration", "type": "int"},
}
def __init__(
self,
*,
enable: Optional[bool] = None,
day_of_week: Optional[Union[str, "_models.DayOfWeek"]] = None,
maintenance_window_starting_hour: Optional[int] = None,
maintenance_window_duration: Optional[int] = None,
**kwargs: Any
) -> None:
"""
:keyword enable: Enable or disable autopatching on SQL virtual machine.
:paramtype enable: bool
:keyword day_of_week: Day of week to apply the patch on. Known values are: "Everyday",
"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
:paramtype day_of_week: str or ~azure.mgmt.sqlvirtualmachine.models.DayOfWeek
:keyword maintenance_window_starting_hour: Hour of the day when patching is initiated. Local VM
time.
:paramtype maintenance_window_starting_hour: int
:keyword maintenance_window_duration: Duration of patching.
:paramtype maintenance_window_duration: int
"""
super().__init__(**kwargs)
self.enable = enable
self.day_of_week = day_of_week
self.maintenance_window_starting_hour = maintenance_window_starting_hour
self.maintenance_window_duration = maintenance_window_duration
class Resource(_serialization.Model):
"""ARM resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.id = None
self.name = None
self.type = None
class ProxyResource(Resource):
"""ARM proxy resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
class AvailabilityGroupListener(ProxyResource): # pylint: disable=too-many-instance-attributes
"""A SQL Server availability group listener.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.sqlvirtualmachine.models.SystemData
:ivar provisioning_state: Provisioning state to track the async operation status.
:vartype provisioning_state: str
:ivar availability_group_name: Name of the availability group.
:vartype availability_group_name: str
:ivar load_balancer_configurations: List of load balancer configurations for an availability
group listener.
:vartype load_balancer_configurations:
list[~azure.mgmt.sqlvirtualmachine.models.LoadBalancerConfiguration]
:ivar multi_subnet_ip_configurations: List of multi subnet IP configurations for an AG
listener.
:vartype multi_subnet_ip_configurations:
list[~azure.mgmt.sqlvirtualmachine.models.MultiSubnetIpConfiguration]
:ivar create_default_availability_group_if_not_exist: Create a default availability group if it
does not exist.
:vartype create_default_availability_group_if_not_exist: bool
:ivar port: Listener port.
:vartype port: int
:ivar availability_group_configuration: Availability Group configuration.
:vartype availability_group_configuration: ~azure.mgmt.sqlvirtualmachine.models.AgConfiguration
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
"system_data": {"readonly": True},
"provisioning_state": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"system_data": {"key": "systemData", "type": "SystemData"},
"provisioning_state": {"key": "properties.provisioningState", "type": "str"},
"availability_group_name": {"key": "properties.availabilityGroupName", "type": "str"},
"load_balancer_configurations": {
"key": "properties.loadBalancerConfigurations",
"type": "[LoadBalancerConfiguration]",
},
"multi_subnet_ip_configurations": {
"key": "properties.multiSubnetIpConfigurations",
"type": "[MultiSubnetIpConfiguration]",
},
"create_default_availability_group_if_not_exist": {
"key": "properties.createDefaultAvailabilityGroupIfNotExist",
"type": "bool",
},
"port": {"key": "properties.port", "type": "int"},
"availability_group_configuration": {
"key": "properties.availabilityGroupConfiguration",
"type": "AgConfiguration",
},
}
def __init__(
self,
*,
availability_group_name: Optional[str] = None,
load_balancer_configurations: Optional[List["_models.LoadBalancerConfiguration"]] = None,
multi_subnet_ip_configurations: Optional[List["_models.MultiSubnetIpConfiguration"]] = None,
create_default_availability_group_if_not_exist: Optional[bool] = None,
port: Optional[int] = None,
availability_group_configuration: Optional["_models.AgConfiguration"] = None,
**kwargs: Any
) -> None:
"""
:keyword availability_group_name: Name of the availability group.
:paramtype availability_group_name: str
:keyword load_balancer_configurations: List of load balancer configurations for an availability
group listener.
:paramtype load_balancer_configurations:
list[~azure.mgmt.sqlvirtualmachine.models.LoadBalancerConfiguration]
:keyword multi_subnet_ip_configurations: List of multi subnet IP configurations for an AG
listener.
:paramtype multi_subnet_ip_configurations:
list[~azure.mgmt.sqlvirtualmachine.models.MultiSubnetIpConfiguration]
:keyword create_default_availability_group_if_not_exist: Create a default availability group if
it does not exist.
:paramtype create_default_availability_group_if_not_exist: bool
:keyword port: Listener port.
:paramtype port: int
:keyword availability_group_configuration: Availability Group configuration.
:paramtype availability_group_configuration:
~azure.mgmt.sqlvirtualmachine.models.AgConfiguration
"""
super().__init__(**kwargs)
self.system_data = None
self.provisioning_state = None
self.availability_group_name = availability_group_name
self.load_balancer_configurations = load_balancer_configurations
self.multi_subnet_ip_configurations = multi_subnet_ip_configurations
self.create_default_availability_group_if_not_exist = create_default_availability_group_if_not_exist
self.port = port
self.availability_group_configuration = availability_group_configuration
class AvailabilityGroupListenerListResult(_serialization.Model):
"""A list of availability group listeners.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: Array of results.
:vartype value: list[~azure.mgmt.sqlvirtualmachine.models.AvailabilityGroupListener]
:ivar next_link: Link to retrieve next page of results.
:vartype next_link: str
"""
_validation = {
"value": {"readonly": True},
"next_link": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[AvailabilityGroupListener]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
self.next_link = None
class ErrorAdditionalInfo(_serialization.Model):
"""The resource management error additional info.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar type: The additional info type.
:vartype type: str
:ivar info: The additional info.
:vartype info: JSON
"""
_validation = {
"type": {"readonly": True},
"info": {"readonly": True},
}
_attribute_map = {
"type": {"key": "type", "type": "str"},
"info": {"key": "info", "type": "object"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.type = None
self.info = None
class ErrorDetail(_serialization.Model):
"""The error detail.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The error target.
:vartype target: str
:ivar details: The error details.
:vartype details: list[~azure.mgmt.sqlvirtualmachine.models.ErrorDetail]
:ivar additional_info: The error additional info.
:vartype additional_info: list[~azure.mgmt.sqlvirtualmachine.models.ErrorAdditionalInfo]
"""
_validation = {
"code": {"readonly": True},
"message": {"readonly": True},
"target": {"readonly": True},
"details": {"readonly": True},
"additional_info": {"readonly": True},
}
_attribute_map = {
"code": {"key": "code", "type": "str"},
"message": {"key": "message", "type": "str"},
"target": {"key": "target", "type": "str"},
"details": {"key": "details", "type": "[ErrorDetail]"},
"additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = None
self.additional_info = None
class ErrorResponse(_serialization.Model):
"""Common error response for all Azure Resource Manager APIs to return error details for failed
operations. (This also follows the OData error response format.).
:ivar error: The error object.
:vartype error: ~azure.mgmt.sqlvirtualmachine.models.ErrorDetail
"""
_attribute_map = {
"error": {"key": "error", "type": "ErrorDetail"},
}
def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None:
"""
:keyword error: The error object.
:paramtype error: ~azure.mgmt.sqlvirtualmachine.models.ErrorDetail
"""
super().__init__(**kwargs)
self.error = error
class KeyVaultCredentialSettings(_serialization.Model):
"""Configure your SQL virtual machine to be able to connect to the Azure Key Vault service.
:ivar enable: Enable or disable key vault credential setting.
:vartype enable: bool
:ivar credential_name: Credential name.
:vartype credential_name: str
:ivar azure_key_vault_url: Azure Key Vault url.
:vartype azure_key_vault_url: str
:ivar service_principal_name: Service principal name to access key vault.
:vartype service_principal_name: str
:ivar service_principal_secret: Service principal name secret to access key vault.
:vartype service_principal_secret: str
"""
_attribute_map = {
"enable": {"key": "enable", "type": "bool"},
"credential_name": {"key": "credentialName", "type": "str"},
"azure_key_vault_url": {"key": "azureKeyVaultUrl", "type": "str"},
"service_principal_name": {"key": "servicePrincipalName", "type": "str"},
"service_principal_secret": {"key": "servicePrincipalSecret", "type": "str"},
}
def __init__(
self,
*,
enable: Optional[bool] = None,
credential_name: Optional[str] = None,
azure_key_vault_url: Optional[str] = None,
service_principal_name: Optional[str] = None,
service_principal_secret: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword enable: Enable or disable key vault credential setting.
:paramtype enable: bool
:keyword credential_name: Credential name.
:paramtype credential_name: str
:keyword azure_key_vault_url: Azure Key Vault url.
:paramtype azure_key_vault_url: str
:keyword service_principal_name: Service principal name to access key vault.
:paramtype service_principal_name: str
:keyword service_principal_secret: Service principal name secret to access key vault.
:paramtype service_principal_secret: str
"""
super().__init__(**kwargs)
self.enable = enable
self.credential_name = credential_name
self.azure_key_vault_url = azure_key_vault_url
self.service_principal_name = service_principal_name
self.service_principal_secret = service_principal_secret
class LoadBalancerConfiguration(_serialization.Model):
"""A load balancer configuration for an availability group listener.
:ivar private_ip_address: Private IP address.
:vartype private_ip_address: ~azure.mgmt.sqlvirtualmachine.models.PrivateIPAddress
:ivar public_ip_address_resource_id: Resource id of the public IP.
:vartype public_ip_address_resource_id: str
:ivar load_balancer_resource_id: Resource id of the load balancer.
:vartype load_balancer_resource_id: str
:ivar probe_port: Probe port.
:vartype probe_port: int
:ivar sql_virtual_machine_instances: List of the SQL virtual machine instance resource id's
that are enrolled into the availability group listener.
:vartype sql_virtual_machine_instances: list[str]
"""
_attribute_map = {
"private_ip_address": {"key": "privateIpAddress", "type": "PrivateIPAddress"},
"public_ip_address_resource_id": {"key": "publicIpAddressResourceId", "type": "str"},
"load_balancer_resource_id": {"key": "loadBalancerResourceId", "type": "str"},
"probe_port": {"key": "probePort", "type": "int"},
"sql_virtual_machine_instances": {"key": "sqlVirtualMachineInstances", "type": "[str]"},
}
def __init__(
self,
*,
private_ip_address: Optional["_models.PrivateIPAddress"] = None,
public_ip_address_resource_id: Optional[str] = None,
load_balancer_resource_id: Optional[str] = None,
probe_port: Optional[int] = None,
sql_virtual_machine_instances: Optional[List[str]] = None,
**kwargs: Any
) -> None:
"""
:keyword private_ip_address: Private IP address.
:paramtype private_ip_address: ~azure.mgmt.sqlvirtualmachine.models.PrivateIPAddress
:keyword public_ip_address_resource_id: Resource id of the public IP.
:paramtype public_ip_address_resource_id: str
:keyword load_balancer_resource_id: Resource id of the load balancer.
:paramtype load_balancer_resource_id: str
:keyword probe_port: Probe port.
:paramtype probe_port: int
:keyword sql_virtual_machine_instances: List of the SQL virtual machine instance resource id's
that are enrolled into the availability group listener.
:paramtype sql_virtual_machine_instances: list[str]
"""
super().__init__(**kwargs)
self.private_ip_address = private_ip_address
self.public_ip_address_resource_id = public_ip_address_resource_id
self.load_balancer_resource_id = load_balancer_resource_id
self.probe_port = probe_port
self.sql_virtual_machine_instances = sql_virtual_machine_instances
class MultiSubnetIpConfiguration(_serialization.Model):
"""Multi subnet ip configuration for an availability group listener.
All required parameters must be populated in order to send to Azure.
:ivar private_ip_address: Private IP address. Required.
:vartype private_ip_address: ~azure.mgmt.sqlvirtualmachine.models.PrivateIPAddress
:ivar sql_virtual_machine_instance: SQL virtual machine instance resource id that are enrolled
into the availability group listener. Required.
:vartype sql_virtual_machine_instance: str
"""
_validation = {
"private_ip_address": {"required": True},
"sql_virtual_machine_instance": {"required": True},
}
_attribute_map = {
"private_ip_address": {"key": "privateIpAddress", "type": "PrivateIPAddress"},
"sql_virtual_machine_instance": {"key": "sqlVirtualMachineInstance", "type": "str"},
}
def __init__(
self, *, private_ip_address: "_models.PrivateIPAddress", sql_virtual_machine_instance: str, **kwargs: Any
) -> None:
"""
:keyword private_ip_address: Private IP address. Required.
:paramtype private_ip_address: ~azure.mgmt.sqlvirtualmachine.models.PrivateIPAddress
:keyword sql_virtual_machine_instance: SQL virtual machine instance resource id that are
enrolled into the availability group listener. Required.
:paramtype sql_virtual_machine_instance: str
"""
super().__init__(**kwargs)
self.private_ip_address = private_ip_address
self.sql_virtual_machine_instance = sql_virtual_machine_instance
class Operation(_serialization.Model):
"""SQL REST API operation definition.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar name: The name of the operation being performed on this particular object.
:vartype name: str
:ivar display: The localized display information for this particular operation / action.
:vartype display: ~azure.mgmt.sqlvirtualmachine.models.OperationDisplay
:ivar origin: The intended executor of the operation. Known values are: "user" and "system".
:vartype origin: str or ~azure.mgmt.sqlvirtualmachine.models.OperationOrigin
:ivar properties: Additional descriptions for the operation.
:vartype properties: dict[str, JSON]
"""
_validation = {
"name": {"readonly": True},
"display": {"readonly": True},
"origin": {"readonly": True},
"properties": {"readonly": True},
}
_attribute_map = {
"name": {"key": "name", "type": "str"},
"display": {"key": "display", "type": "OperationDisplay"},
"origin": {"key": "origin", "type": "str"},
"properties": {"key": "properties", "type": "{object}"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.name = None
self.display = None
self.origin = None
self.properties = None
class OperationDisplay(_serialization.Model):
"""Display metadata associated with the operation.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar provider: The localized friendly form of the resource provider name.
:vartype provider: str
:ivar resource: The localized friendly form of the resource type related to this
action/operation.
:vartype resource: str
:ivar operation: The localized friendly name for the operation.
:vartype operation: str
:ivar description: The localized friendly description for the operation.
:vartype description: str
"""
_validation = {
"provider": {"readonly": True},
"resource": {"readonly": True},
"operation": {"readonly": True},
"description": {"readonly": True},
}
_attribute_map = {
"provider": {"key": "provider", "type": "str"},
"resource": {"key": "resource", "type": "str"},
"operation": {"key": "operation", "type": "str"},
"description": {"key": "description", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.provider = None
self.resource = None
self.operation = None
self.description = None
class OperationListResult(_serialization.Model):
"""Result of the request to list SQL operations.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: Array of results.
:vartype value: list[~azure.mgmt.sqlvirtualmachine.models.Operation]
:ivar next_link: Link to retrieve next page of results.
:vartype next_link: str
"""
_validation = {
"value": {"readonly": True},
"next_link": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[Operation]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
self.next_link = None
class PrivateIPAddress(_serialization.Model):
"""A private IP address bound to the availability group listener.
:ivar ip_address: Private IP address bound to the availability group listener.
:vartype ip_address: str
:ivar subnet_resource_id: Subnet used to include private IP.
:vartype subnet_resource_id: str
"""
_attribute_map = {
"ip_address": {"key": "ipAddress", "type": "str"},
"subnet_resource_id": {"key": "subnetResourceId", "type": "str"},
}
def __init__(
self, *, ip_address: Optional[str] = None, subnet_resource_id: Optional[str] = None, **kwargs: Any
) -> None:
"""
:keyword ip_address: Private IP address bound to the availability group listener.
:paramtype ip_address: str
:keyword subnet_resource_id: Subnet used to include private IP.
:paramtype subnet_resource_id: str
"""
super().__init__(**kwargs)
self.ip_address = ip_address
self.subnet_resource_id = subnet_resource_id
class ResourceIdentity(_serialization.Model):
"""Azure Active Directory identity configuration for a resource.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar principal_id: The Azure Active Directory principal id.
:vartype principal_id: str
:ivar type: The identity type. Set this to 'SystemAssigned' in order to automatically create
and assign an Azure Active Directory principal for the resource. Known values are: "None" and
"SystemAssigned".
:vartype type: str or ~azure.mgmt.sqlvirtualmachine.models.IdentityType
:ivar tenant_id: The Azure Active Directory tenant id.
:vartype tenant_id: str
"""
_validation = {
"principal_id": {"readonly": True},
"tenant_id": {"readonly": True},
}
_attribute_map = {
"principal_id": {"key": "principalId", "type": "str"},
"type": {"key": "type", "type": "str"},
"tenant_id": {"key": "tenantId", "type": "str"},
}
def __init__(self, *, type: Optional[Union[str, "_models.IdentityType"]] = None, **kwargs: Any) -> None:
"""
:keyword type: The identity type. Set this to 'SystemAssigned' in order to automatically create
and assign an Azure Active Directory principal for the resource. Known values are: "None" and
"SystemAssigned".
:paramtype type: str or ~azure.mgmt.sqlvirtualmachine.models.IdentityType
"""
super().__init__(**kwargs)
self.principal_id = None
self.type = type
self.tenant_id = None
class Schedule(_serialization.Model):
"""Set assessment schedule for SQL Server.
:ivar enable: Enable or disable assessment schedule on SQL virtual machine.
:vartype enable: bool
:ivar weekly_interval: Number of weeks to schedule between 2 assessment runs. Takes value from
1-6.
:vartype weekly_interval: int
:ivar monthly_occurrence: Occurrence of the DayOfWeek day within a month to schedule
assessment. Takes values: 1,2,3,4 and -1. Use -1 for last DayOfWeek day of the month.
:vartype monthly_occurrence: int
:ivar day_of_week: Day of the week to run assessment. Known values are: "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
:vartype day_of_week: str or ~azure.mgmt.sqlvirtualmachine.models.AssessmentDayOfWeek
:ivar start_time: Time of the day in HH:mm format. Eg. 17:30.
:vartype start_time: str
"""
_attribute_map = {
"enable": {"key": "enable", "type": "bool"},
"weekly_interval": {"key": "weeklyInterval", "type": "int"},
"monthly_occurrence": {"key": "monthlyOccurrence", "type": "int"},
"day_of_week": {"key": "dayOfWeek", "type": "str"},
"start_time": {"key": "startTime", "type": "str"},
}
def __init__(
self,
*,
enable: Optional[bool] = None,
weekly_interval: Optional[int] = None,
monthly_occurrence: Optional[int] = None,
day_of_week: Optional[Union[str, "_models.AssessmentDayOfWeek"]] = None,
start_time: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword enable: Enable or disable assessment schedule on SQL virtual machine.
:paramtype enable: bool
:keyword weekly_interval: Number of weeks to schedule between 2 assessment runs. Takes value
from 1-6.
:paramtype weekly_interval: int
:keyword monthly_occurrence: Occurrence of the DayOfWeek day within a month to schedule
assessment. Takes values: 1,2,3,4 and -1. Use -1 for last DayOfWeek day of the month.
:paramtype monthly_occurrence: int
:keyword day_of_week: Day of the week to run assessment. Known values are: "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday", and "Sunday".
:paramtype day_of_week: str or ~azure.mgmt.sqlvirtualmachine.models.AssessmentDayOfWeek
:keyword start_time: Time of the day in HH:mm format. Eg. 17:30.
:paramtype start_time: str
"""
super().__init__(**kwargs)
self.enable = enable
self.weekly_interval = weekly_interval
self.monthly_occurrence = monthly_occurrence
self.day_of_week = day_of_week
self.start_time = start_time
class ServerConfigurationsManagementSettings(_serialization.Model):
"""Set the connectivity, storage and workload settings.
:ivar sql_connectivity_update_settings: SQL connectivity type settings.
:vartype sql_connectivity_update_settings:
~azure.mgmt.sqlvirtualmachine.models.SqlConnectivityUpdateSettings
:ivar sql_workload_type_update_settings: SQL workload type settings.
:vartype sql_workload_type_update_settings:
~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadTypeUpdateSettings
:ivar sql_storage_update_settings: SQL storage update settings.
:vartype sql_storage_update_settings:
~azure.mgmt.sqlvirtualmachine.models.SqlStorageUpdateSettings
:ivar additional_features_server_configurations: Additional SQL feature settings.
:vartype additional_features_server_configurations:
~azure.mgmt.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations
:ivar sql_instance_settings: SQL Instance settings.
:vartype sql_instance_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLInstanceSettings
:ivar azure_ad_authentication_settings: Azure AD authentication Settings.
:vartype azure_ad_authentication_settings:
~azure.mgmt.sqlvirtualmachine.models.AADAuthenticationSettings
"""
_attribute_map = {
"sql_connectivity_update_settings": {
"key": "sqlConnectivityUpdateSettings",
"type": "SqlConnectivityUpdateSettings",
},
"sql_workload_type_update_settings": {
"key": "sqlWorkloadTypeUpdateSettings",
"type": "SqlWorkloadTypeUpdateSettings",
},
"sql_storage_update_settings": {"key": "sqlStorageUpdateSettings", "type": "SqlStorageUpdateSettings"},
"additional_features_server_configurations": {
"key": "additionalFeaturesServerConfigurations",
"type": "AdditionalFeaturesServerConfigurations",
},
"sql_instance_settings": {"key": "sqlInstanceSettings", "type": "SQLInstanceSettings"},
"azure_ad_authentication_settings": {
"key": "azureAdAuthenticationSettings",
"type": "AADAuthenticationSettings",
},
}
def __init__(
self,
*,
sql_connectivity_update_settings: Optional["_models.SqlConnectivityUpdateSettings"] = None,
sql_workload_type_update_settings: Optional["_models.SqlWorkloadTypeUpdateSettings"] = None,
sql_storage_update_settings: Optional["_models.SqlStorageUpdateSettings"] = None,
additional_features_server_configurations: Optional["_models.AdditionalFeaturesServerConfigurations"] = None,
sql_instance_settings: Optional["_models.SQLInstanceSettings"] = None,
azure_ad_authentication_settings: Optional["_models.AADAuthenticationSettings"] = None,
**kwargs: Any
) -> None:
"""
:keyword sql_connectivity_update_settings: SQL connectivity type settings.
:paramtype sql_connectivity_update_settings:
~azure.mgmt.sqlvirtualmachine.models.SqlConnectivityUpdateSettings
:keyword sql_workload_type_update_settings: SQL workload type settings.
:paramtype sql_workload_type_update_settings:
~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadTypeUpdateSettings
:keyword sql_storage_update_settings: SQL storage update settings.
:paramtype sql_storage_update_settings:
~azure.mgmt.sqlvirtualmachine.models.SqlStorageUpdateSettings
:keyword additional_features_server_configurations: Additional SQL feature settings.
:paramtype additional_features_server_configurations:
~azure.mgmt.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations
:keyword sql_instance_settings: SQL Instance settings.
:paramtype sql_instance_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLInstanceSettings
:keyword azure_ad_authentication_settings: Azure AD authentication Settings.
:paramtype azure_ad_authentication_settings:
~azure.mgmt.sqlvirtualmachine.models.AADAuthenticationSettings
"""
super().__init__(**kwargs)
self.sql_connectivity_update_settings = sql_connectivity_update_settings
self.sql_workload_type_update_settings = sql_workload_type_update_settings
self.sql_storage_update_settings = sql_storage_update_settings
self.additional_features_server_configurations = additional_features_server_configurations
self.sql_instance_settings = sql_instance_settings
self.azure_ad_authentication_settings = azure_ad_authentication_settings
class SqlConnectivityUpdateSettings(_serialization.Model):
"""Set the access level and network port settings for SQL Server.
:ivar connectivity_type: SQL Server connectivity option. Known values are: "LOCAL", "PRIVATE",
and "PUBLIC".
:vartype connectivity_type: str or ~azure.mgmt.sqlvirtualmachine.models.ConnectivityType
:ivar port: SQL Server port.
:vartype port: int
:ivar sql_auth_update_user_name: SQL Server sysadmin login to create.
:vartype sql_auth_update_user_name: str
:ivar sql_auth_update_password: SQL Server sysadmin login password.
:vartype sql_auth_update_password: str
"""
_attribute_map = {
"connectivity_type": {"key": "connectivityType", "type": "str"},
"port": {"key": "port", "type": "int"},
"sql_auth_update_user_name": {"key": "sqlAuthUpdateUserName", "type": "str"},
"sql_auth_update_password": {"key": "sqlAuthUpdatePassword", "type": "str"},
}
def __init__(
self,
*,
connectivity_type: Optional[Union[str, "_models.ConnectivityType"]] = None,
port: Optional[int] = None,
sql_auth_update_user_name: Optional[str] = None,
sql_auth_update_password: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword connectivity_type: SQL Server connectivity option. Known values are: "LOCAL",
"PRIVATE", and "PUBLIC".
:paramtype connectivity_type: str or ~azure.mgmt.sqlvirtualmachine.models.ConnectivityType
:keyword port: SQL Server port.
:paramtype port: int
:keyword sql_auth_update_user_name: SQL Server sysadmin login to create.
:paramtype sql_auth_update_user_name: str
:keyword sql_auth_update_password: SQL Server sysadmin login password.
:paramtype sql_auth_update_password: str
"""
super().__init__(**kwargs)
self.connectivity_type = connectivity_type
self.port = port
self.sql_auth_update_user_name = sql_auth_update_user_name
self.sql_auth_update_password = sql_auth_update_password
class SQLInstanceSettings(_serialization.Model):
"""Set the server/instance-level settings for SQL Server.
:ivar collation: SQL Server Collation.
:vartype collation: str
:ivar max_dop: SQL Server MAXDOP.
:vartype max_dop: int
:ivar is_optimize_for_ad_hoc_workloads_enabled: SQL Server Optimize for Adhoc workloads.
:vartype is_optimize_for_ad_hoc_workloads_enabled: bool
:ivar min_server_memory_mb: SQL Server minimum memory.
:vartype min_server_memory_mb: int
:ivar max_server_memory_mb: SQL Server maximum memory.
:vartype max_server_memory_mb: int
:ivar is_lpim_enabled: SQL Server LPIM.
:vartype is_lpim_enabled: bool
:ivar is_ifi_enabled: SQL Server IFI.
:vartype is_ifi_enabled: bool
"""
_attribute_map = {
"collation": {"key": "collation", "type": "str"},
"max_dop": {"key": "maxDop", "type": "int"},
"is_optimize_for_ad_hoc_workloads_enabled": {"key": "isOptimizeForAdHocWorkloadsEnabled", "type": "bool"},
"min_server_memory_mb": {"key": "minServerMemoryMB", "type": "int"},
"max_server_memory_mb": {"key": "maxServerMemoryMB", "type": "int"},
"is_lpim_enabled": {"key": "isLpimEnabled", "type": "bool"},
"is_ifi_enabled": {"key": "isIfiEnabled", "type": "bool"},
}
def __init__(
self,
*,
collation: Optional[str] = None,
max_dop: Optional[int] = None,
is_optimize_for_ad_hoc_workloads_enabled: Optional[bool] = None,
min_server_memory_mb: Optional[int] = None,
max_server_memory_mb: Optional[int] = None,
is_lpim_enabled: Optional[bool] = None,
is_ifi_enabled: Optional[bool] = None,
**kwargs: Any
) -> None:
"""
:keyword collation: SQL Server Collation.
:paramtype collation: str
:keyword max_dop: SQL Server MAXDOP.
:paramtype max_dop: int
:keyword is_optimize_for_ad_hoc_workloads_enabled: SQL Server Optimize for Adhoc workloads.
:paramtype is_optimize_for_ad_hoc_workloads_enabled: bool
:keyword min_server_memory_mb: SQL Server minimum memory.
:paramtype min_server_memory_mb: int
:keyword max_server_memory_mb: SQL Server maximum memory.
:paramtype max_server_memory_mb: int
:keyword is_lpim_enabled: SQL Server LPIM.
:paramtype is_lpim_enabled: bool
:keyword is_ifi_enabled: SQL Server IFI.
:paramtype is_ifi_enabled: bool
"""
super().__init__(**kwargs)
self.collation = collation
self.max_dop = max_dop
self.is_optimize_for_ad_hoc_workloads_enabled = is_optimize_for_ad_hoc_workloads_enabled
self.min_server_memory_mb = min_server_memory_mb
self.max_server_memory_mb = max_server_memory_mb
self.is_lpim_enabled = is_lpim_enabled
self.is_ifi_enabled = is_ifi_enabled
class SQLStorageSettings(_serialization.Model):
"""Set disk storage settings for SQL Server.
:ivar luns: Logical Unit Numbers for the disks.
:vartype luns: list[int]
:ivar default_file_path: SQL Server default file path.
:vartype default_file_path: str
"""
_attribute_map = {
"luns": {"key": "luns", "type": "[int]"},
"default_file_path": {"key": "defaultFilePath", "type": "str"},
}
def __init__(
self, *, luns: Optional[List[int]] = None, default_file_path: Optional[str] = None, **kwargs: Any
) -> None:
"""
:keyword luns: Logical Unit Numbers for the disks.
:paramtype luns: list[int]
:keyword default_file_path: SQL Server default file path.
:paramtype default_file_path: str
"""
super().__init__(**kwargs)
self.luns = luns
self.default_file_path = default_file_path
class SqlStorageUpdateSettings(_serialization.Model):
"""Set disk storage settings for SQL Server.
:ivar disk_count: Virtual machine disk count.
:vartype disk_count: int
:ivar starting_device_id: Device id of the first disk to be updated.
:vartype starting_device_id: int
:ivar disk_configuration_type: Disk configuration to apply to SQL Server. Known values are:
"NEW", "EXTEND", and "ADD".
:vartype disk_configuration_type: str or
~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType
"""
_attribute_map = {
"disk_count": {"key": "diskCount", "type": "int"},
"starting_device_id": {"key": "startingDeviceId", "type": "int"},
"disk_configuration_type": {"key": "diskConfigurationType", "type": "str"},
}
def __init__(
self,
*,
disk_count: Optional[int] = None,
starting_device_id: Optional[int] = None,
disk_configuration_type: Optional[Union[str, "_models.DiskConfigurationType"]] = None,
**kwargs: Any
) -> None:
"""
:keyword disk_count: Virtual machine disk count.
:paramtype disk_count: int
:keyword starting_device_id: Device id of the first disk to be updated.
:paramtype starting_device_id: int
:keyword disk_configuration_type: Disk configuration to apply to SQL Server. Known values are:
"NEW", "EXTEND", and "ADD".
:paramtype disk_configuration_type: str or
~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType
"""
super().__init__(**kwargs)
self.disk_count = disk_count
self.starting_device_id = starting_device_id
self.disk_configuration_type = disk_configuration_type
class SQLTempDbSettings(_serialization.Model):
"""Set tempDb storage settings for SQL Server.
:ivar data_file_size: SQL Server tempdb data file size.
:vartype data_file_size: int
:ivar data_growth: SQL Server tempdb data file autoGrowth size.
:vartype data_growth: int
:ivar log_file_size: SQL Server tempdb log file size.
:vartype log_file_size: int
:ivar log_growth: SQL Server tempdb log file autoGrowth size.
:vartype log_growth: int
:ivar data_file_count: SQL Server tempdb data file count.
:vartype data_file_count: int
:ivar persist_folder: SQL Server tempdb persist folder choice.
:vartype persist_folder: bool
:ivar persist_folder_path: SQL Server tempdb persist folder location.
:vartype persist_folder_path: str
:ivar luns: Logical Unit Numbers for the disks.
:vartype luns: list[int]
:ivar default_file_path: SQL Server default file path.
:vartype default_file_path: str
"""
_attribute_map = {
"data_file_size": {"key": "dataFileSize", "type": "int"},
"data_growth": {"key": "dataGrowth", "type": "int"},
"log_file_size": {"key": "logFileSize", "type": "int"},
"log_growth": {"key": "logGrowth", "type": "int"},
"data_file_count": {"key": "dataFileCount", "type": "int"},
"persist_folder": {"key": "persistFolder", "type": "bool"},
"persist_folder_path": {"key": "persistFolderPath", "type": "str"},
"luns": {"key": "luns", "type": "[int]"},
"default_file_path": {"key": "defaultFilePath", "type": "str"},
}
def __init__(
self,
*,
data_file_size: Optional[int] = None,
data_growth: Optional[int] = None,
log_file_size: Optional[int] = None,
log_growth: Optional[int] = None,
data_file_count: Optional[int] = None,
persist_folder: Optional[bool] = None,
persist_folder_path: Optional[str] = None,
luns: Optional[List[int]] = None,
default_file_path: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword data_file_size: SQL Server tempdb data file size.
:paramtype data_file_size: int
:keyword data_growth: SQL Server tempdb data file autoGrowth size.
:paramtype data_growth: int
:keyword log_file_size: SQL Server tempdb log file size.
:paramtype log_file_size: int
:keyword log_growth: SQL Server tempdb log file autoGrowth size.
:paramtype log_growth: int
:keyword data_file_count: SQL Server tempdb data file count.
:paramtype data_file_count: int
:keyword persist_folder: SQL Server tempdb persist folder choice.
:paramtype persist_folder: bool
:keyword persist_folder_path: SQL Server tempdb persist folder location.
:paramtype persist_folder_path: str
:keyword luns: Logical Unit Numbers for the disks.
:paramtype luns: list[int]
:keyword default_file_path: SQL Server default file path.
:paramtype default_file_path: str
"""
super().__init__(**kwargs)
self.data_file_size = data_file_size
self.data_growth = data_growth
self.log_file_size = log_file_size
self.log_growth = log_growth
self.data_file_count = data_file_count
self.persist_folder = persist_folder
self.persist_folder_path = persist_folder_path
self.luns = luns
self.default_file_path = default_file_path
class TrackedResource(Resource):
"""ARM tracked top level resource.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar location: Resource location. Required.
:vartype location: str
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
"location": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
}
def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None:
"""
:keyword location: Resource location. Required.
:paramtype location: str
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
"""
super().__init__(**kwargs)
self.location = location
self.tags = tags
class SqlVirtualMachine(TrackedResource): # pylint: disable=too-many-instance-attributes
"""A SQL virtual machine.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar location: Resource location. Required.
:vartype location: str
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
:ivar identity: Azure Active Directory identity of the server.
:vartype identity: ~azure.mgmt.sqlvirtualmachine.models.ResourceIdentity
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.sqlvirtualmachine.models.SystemData
:ivar virtual_machine_resource_id: ARM Resource id of underlying virtual machine created from
SQL marketplace image.
:vartype virtual_machine_resource_id: str
:ivar provisioning_state: Provisioning state to track the async operation status.
:vartype provisioning_state: str
:ivar sql_image_offer: SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.
:vartype sql_image_offer: str
:ivar sql_server_license_type: SQL Server license type. Known values are: "PAYG", "AHUB", and
"DR".
:vartype sql_server_license_type: str or
~azure.mgmt.sqlvirtualmachine.models.SqlServerLicenseType
:ivar sql_management: SQL Server Management type. Known values are: "Full", "LightWeight", and
"NoAgent".
:vartype sql_management: str or ~azure.mgmt.sqlvirtualmachine.models.SqlManagementMode
:ivar least_privilege_mode: SQL IaaS Agent least privilege mode. Known values are: "Enabled"
and "NotSet".
:vartype least_privilege_mode: str or ~azure.mgmt.sqlvirtualmachine.models.LeastPrivilegeMode
:ivar sql_image_sku: SQL Server edition type. Known values are: "Developer", "Express",
"Standard", "Enterprise", and "Web".
:vartype sql_image_sku: str or ~azure.mgmt.sqlvirtualmachine.models.SqlImageSku
:ivar sql_virtual_machine_group_resource_id: ARM resource id of the SQL virtual machine group
this SQL virtual machine is or will be part of.
:vartype sql_virtual_machine_group_resource_id: str
:ivar wsfc_domain_credentials: Domain credentials for setting up Windows Server Failover
Cluster for SQL availability group.
:vartype wsfc_domain_credentials: ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainCredentials
:ivar wsfc_static_ip: Domain credentials for setting up Windows Server Failover Cluster for SQL
availability group.
:vartype wsfc_static_ip: str
:ivar auto_patching_settings: Auto patching settings for applying critical security updates to
SQL virtual machine.
:vartype auto_patching_settings: ~azure.mgmt.sqlvirtualmachine.models.AutoPatchingSettings
:ivar auto_backup_settings: Auto backup settings for SQL Server.
:vartype auto_backup_settings: ~azure.mgmt.sqlvirtualmachine.models.AutoBackupSettings
:ivar key_vault_credential_settings: Key vault credential settings.
:vartype key_vault_credential_settings:
~azure.mgmt.sqlvirtualmachine.models.KeyVaultCredentialSettings
:ivar server_configurations_management_settings: SQL Server configuration management settings.
:vartype server_configurations_management_settings:
~azure.mgmt.sqlvirtualmachine.models.ServerConfigurationsManagementSettings
:ivar storage_configuration_settings: Storage Configuration Settings.
:vartype storage_configuration_settings:
~azure.mgmt.sqlvirtualmachine.models.StorageConfigurationSettings
:ivar troubleshooting_status: Troubleshooting status.
:vartype troubleshooting_status: ~azure.mgmt.sqlvirtualmachine.models.TroubleshootingStatus
:ivar assessment_settings: SQL best practices Assessment Settings.
:vartype assessment_settings: ~azure.mgmt.sqlvirtualmachine.models.AssessmentSettings
:ivar enable_automatic_upgrade: Enable automatic upgrade of Sql IaaS extension Agent.
:vartype enable_automatic_upgrade: bool
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
"location": {"required": True},
"system_data": {"readonly": True},
"provisioning_state": {"readonly": True},
"troubleshooting_status": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"identity": {"key": "identity", "type": "ResourceIdentity"},
"system_data": {"key": "systemData", "type": "SystemData"},
"virtual_machine_resource_id": {"key": "properties.virtualMachineResourceId", "type": "str"},
"provisioning_state": {"key": "properties.provisioningState", "type": "str"},
"sql_image_offer": {"key": "properties.sqlImageOffer", "type": "str"},
"sql_server_license_type": {"key": "properties.sqlServerLicenseType", "type": "str"},
"sql_management": {"key": "properties.sqlManagement", "type": "str"},
"least_privilege_mode": {"key": "properties.leastPrivilegeMode", "type": "str"},
"sql_image_sku": {"key": "properties.sqlImageSku", "type": "str"},
"sql_virtual_machine_group_resource_id": {"key": "properties.sqlVirtualMachineGroupResourceId", "type": "str"},
"wsfc_domain_credentials": {"key": "properties.wsfcDomainCredentials", "type": "WsfcDomainCredentials"},
"wsfc_static_ip": {"key": "properties.wsfcStaticIp", "type": "str"},
"auto_patching_settings": {"key": "properties.autoPatchingSettings", "type": "AutoPatchingSettings"},
"auto_backup_settings": {"key": "properties.autoBackupSettings", "type": "AutoBackupSettings"},
"key_vault_credential_settings": {
"key": "properties.keyVaultCredentialSettings",
"type": "KeyVaultCredentialSettings",
},
"server_configurations_management_settings": {
"key": "properties.serverConfigurationsManagementSettings",
"type": "ServerConfigurationsManagementSettings",
},
"storage_configuration_settings": {
"key": "properties.storageConfigurationSettings",
"type": "StorageConfigurationSettings",
},
"troubleshooting_status": {"key": "properties.troubleshootingStatus", "type": "TroubleshootingStatus"},
"assessment_settings": {"key": "properties.assessmentSettings", "type": "AssessmentSettings"},
"enable_automatic_upgrade": {"key": "properties.enableAutomaticUpgrade", "type": "bool"},
}
def __init__( # pylint: disable=too-many-locals
self,
*,
location: str,
tags: Optional[Dict[str, str]] = None,
identity: Optional["_models.ResourceIdentity"] = None,
virtual_machine_resource_id: Optional[str] = None,
sql_image_offer: Optional[str] = None,
sql_server_license_type: Optional[Union[str, "_models.SqlServerLicenseType"]] = None,
sql_management: Optional[Union[str, "_models.SqlManagementMode"]] = None,
least_privilege_mode: Union[str, "_models.LeastPrivilegeMode"] = "NotSet",
sql_image_sku: Optional[Union[str, "_models.SqlImageSku"]] = None,
sql_virtual_machine_group_resource_id: Optional[str] = None,
wsfc_domain_credentials: Optional["_models.WsfcDomainCredentials"] = None,
wsfc_static_ip: Optional[str] = None,
auto_patching_settings: Optional["_models.AutoPatchingSettings"] = None,
auto_backup_settings: Optional["_models.AutoBackupSettings"] = None,
key_vault_credential_settings: Optional["_models.KeyVaultCredentialSettings"] = None,
server_configurations_management_settings: Optional["_models.ServerConfigurationsManagementSettings"] = None,
storage_configuration_settings: Optional["_models.StorageConfigurationSettings"] = None,
assessment_settings: Optional["_models.AssessmentSettings"] = None,
enable_automatic_upgrade: bool = False,
**kwargs: Any
) -> None:
"""
:keyword location: Resource location. Required.
:paramtype location: str
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
:keyword identity: Azure Active Directory identity of the server.
:paramtype identity: ~azure.mgmt.sqlvirtualmachine.models.ResourceIdentity
:keyword virtual_machine_resource_id: ARM Resource id of underlying virtual machine created
from SQL marketplace image.
:paramtype virtual_machine_resource_id: str
:keyword sql_image_offer: SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.
:paramtype sql_image_offer: str
:keyword sql_server_license_type: SQL Server license type. Known values are: "PAYG", "AHUB",
and "DR".
:paramtype sql_server_license_type: str or
~azure.mgmt.sqlvirtualmachine.models.SqlServerLicenseType
:keyword sql_management: SQL Server Management type. Known values are: "Full", "LightWeight",
and "NoAgent".
:paramtype sql_management: str or ~azure.mgmt.sqlvirtualmachine.models.SqlManagementMode
:keyword least_privilege_mode: SQL IaaS Agent least privilege mode. Known values are: "Enabled"
and "NotSet".
:paramtype least_privilege_mode: str or ~azure.mgmt.sqlvirtualmachine.models.LeastPrivilegeMode
:keyword sql_image_sku: SQL Server edition type. Known values are: "Developer", "Express",
"Standard", "Enterprise", and "Web".
:paramtype sql_image_sku: str or ~azure.mgmt.sqlvirtualmachine.models.SqlImageSku
:keyword sql_virtual_machine_group_resource_id: ARM resource id of the SQL virtual machine
group this SQL virtual machine is or will be part of.
:paramtype sql_virtual_machine_group_resource_id: str
:keyword wsfc_domain_credentials: Domain credentials for setting up Windows Server Failover
Cluster for SQL availability group.
:paramtype wsfc_domain_credentials: ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainCredentials
:keyword wsfc_static_ip: Domain credentials for setting up Windows Server Failover Cluster for
SQL availability group.
:paramtype wsfc_static_ip: str
:keyword auto_patching_settings: Auto patching settings for applying critical security updates
to SQL virtual machine.
:paramtype auto_patching_settings: ~azure.mgmt.sqlvirtualmachine.models.AutoPatchingSettings
:keyword auto_backup_settings: Auto backup settings for SQL Server.
:paramtype auto_backup_settings: ~azure.mgmt.sqlvirtualmachine.models.AutoBackupSettings
:keyword key_vault_credential_settings: Key vault credential settings.
:paramtype key_vault_credential_settings:
~azure.mgmt.sqlvirtualmachine.models.KeyVaultCredentialSettings
:keyword server_configurations_management_settings: SQL Server configuration management
settings.
:paramtype server_configurations_management_settings:
~azure.mgmt.sqlvirtualmachine.models.ServerConfigurationsManagementSettings
:keyword storage_configuration_settings: Storage Configuration Settings.
:paramtype storage_configuration_settings:
~azure.mgmt.sqlvirtualmachine.models.StorageConfigurationSettings
:keyword assessment_settings: SQL best practices Assessment Settings.
:paramtype assessment_settings: ~azure.mgmt.sqlvirtualmachine.models.AssessmentSettings
:keyword enable_automatic_upgrade: Enable automatic upgrade of Sql IaaS extension Agent.
:paramtype enable_automatic_upgrade: bool
"""
super().__init__(location=location, tags=tags, **kwargs)
self.identity = identity
self.system_data = None
self.virtual_machine_resource_id = virtual_machine_resource_id
self.provisioning_state = None
self.sql_image_offer = sql_image_offer
self.sql_server_license_type = sql_server_license_type
self.sql_management = sql_management
self.least_privilege_mode = least_privilege_mode
self.sql_image_sku = sql_image_sku
self.sql_virtual_machine_group_resource_id = sql_virtual_machine_group_resource_id
self.wsfc_domain_credentials = wsfc_domain_credentials
self.wsfc_static_ip = wsfc_static_ip
self.auto_patching_settings = auto_patching_settings
self.auto_backup_settings = auto_backup_settings
self.key_vault_credential_settings = key_vault_credential_settings
self.server_configurations_management_settings = server_configurations_management_settings
self.storage_configuration_settings = storage_configuration_settings
self.troubleshooting_status = None
self.assessment_settings = assessment_settings
self.enable_automatic_upgrade = enable_automatic_upgrade
class SqlVirtualMachineGroup(TrackedResource): # pylint: disable=too-many-instance-attributes
"""A SQL virtual machine group.
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to Azure.
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:ivar location: Resource location. Required.
:vartype location: str
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
:ivar system_data: Metadata pertaining to creation and last modification of the resource.
:vartype system_data: ~azure.mgmt.sqlvirtualmachine.models.SystemData
:ivar provisioning_state: Provisioning state to track the async operation status.
:vartype provisioning_state: str
:ivar sql_image_offer: SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
:vartype sql_image_offer: str
:ivar sql_image_sku: SQL image sku. Known values are: "Developer" and "Enterprise".
:vartype sql_image_sku: str or ~azure.mgmt.sqlvirtualmachine.models.SqlVmGroupImageSku
:ivar scale_type: Scale type. "HA"
:vartype scale_type: str or ~azure.mgmt.sqlvirtualmachine.models.ScaleType
:ivar cluster_manager_type: Type of cluster manager: Windows Server Failover Cluster (WSFC),
implied by the scale type of the group and the OS type. "WSFC"
:vartype cluster_manager_type: str or ~azure.mgmt.sqlvirtualmachine.models.ClusterManagerType
:ivar cluster_configuration: Cluster type. "Domainful"
:vartype cluster_configuration: str or
~azure.mgmt.sqlvirtualmachine.models.ClusterConfiguration
:ivar wsfc_domain_profile: Cluster Active Directory domain profile.
:vartype wsfc_domain_profile: ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainProfile
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
"location": {"required": True},
"system_data": {"readonly": True},
"provisioning_state": {"readonly": True},
"scale_type": {"readonly": True},
"cluster_manager_type": {"readonly": True},
"cluster_configuration": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"location": {"key": "location", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"system_data": {"key": "systemData", "type": "SystemData"},
"provisioning_state": {"key": "properties.provisioningState", "type": "str"},
"sql_image_offer": {"key": "properties.sqlImageOffer", "type": "str"},
"sql_image_sku": {"key": "properties.sqlImageSku", "type": "str"},
"scale_type": {"key": "properties.scaleType", "type": "str"},
"cluster_manager_type": {"key": "properties.clusterManagerType", "type": "str"},
"cluster_configuration": {"key": "properties.clusterConfiguration", "type": "str"},
"wsfc_domain_profile": {"key": "properties.wsfcDomainProfile", "type": "WsfcDomainProfile"},
}
def __init__(
self,
*,
location: str,
tags: Optional[Dict[str, str]] = None,
sql_image_offer: Optional[str] = None,
sql_image_sku: Optional[Union[str, "_models.SqlVmGroupImageSku"]] = None,
wsfc_domain_profile: Optional["_models.WsfcDomainProfile"] = None,
**kwargs: Any
) -> None:
"""
:keyword location: Resource location. Required.
:paramtype location: str
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
:keyword sql_image_offer: SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
:paramtype sql_image_offer: str
:keyword sql_image_sku: SQL image sku. Known values are: "Developer" and "Enterprise".
:paramtype sql_image_sku: str or ~azure.mgmt.sqlvirtualmachine.models.SqlVmGroupImageSku
:keyword wsfc_domain_profile: Cluster Active Directory domain profile.
:paramtype wsfc_domain_profile: ~azure.mgmt.sqlvirtualmachine.models.WsfcDomainProfile
"""
super().__init__(location=location, tags=tags, **kwargs)
self.system_data = None
self.provisioning_state = None
self.sql_image_offer = sql_image_offer
self.sql_image_sku = sql_image_sku
self.scale_type = None
self.cluster_manager_type = None
self.cluster_configuration = None
self.wsfc_domain_profile = wsfc_domain_profile
class SqlVirtualMachineGroupListResult(_serialization.Model):
"""A list of SQL virtual machine groups.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: Array of results.
:vartype value: list[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachineGroup]
:ivar next_link: Link to retrieve next page of results.
:vartype next_link: str
"""
_validation = {
"value": {"readonly": True},
"next_link": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[SqlVirtualMachineGroup]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
self.next_link = None
class SqlVirtualMachineGroupUpdate(_serialization.Model):
"""An update to a SQL virtual machine group.
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
"""
_attribute_map = {
"tags": {"key": "tags", "type": "{str}"},
}
def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None:
"""
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
"""
super().__init__(**kwargs)
self.tags = tags
class SqlVirtualMachineListResult(_serialization.Model):
"""A list of SQL virtual machines.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar value: Array of results.
:vartype value: list[~azure.mgmt.sqlvirtualmachine.models.SqlVirtualMachine]
:ivar next_link: Link to retrieve next page of results.
:vartype next_link: str
"""
_validation = {
"value": {"readonly": True},
"next_link": {"readonly": True},
}
_attribute_map = {
"value": {"key": "value", "type": "[SqlVirtualMachine]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.value = None
self.next_link = None
class SqlVirtualMachineUpdate(_serialization.Model):
"""An update to a SQL virtual machine.
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
"""
_attribute_map = {
"tags": {"key": "tags", "type": "{str}"},
}
def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None:
"""
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
"""
super().__init__(**kwargs)
self.tags = tags
class SqlVmTroubleshooting(_serialization.Model):
"""Details required for SQL VM troubleshooting.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar start_time_utc: Start time in UTC timezone.
:vartype start_time_utc: ~datetime.datetime
:ivar end_time_utc: End time in UTC timezone.
:vartype end_time_utc: ~datetime.datetime
:ivar troubleshooting_scenario: SQL VM troubleshooting scenario. "UnhealthyReplica"
:vartype troubleshooting_scenario: str or
~azure.mgmt.sqlvirtualmachine.models.TroubleshootingScenario
:ivar properties: Troubleshooting properties.
:vartype properties: ~azure.mgmt.sqlvirtualmachine.models.TroubleshootingAdditionalProperties
:ivar virtual_machine_resource_id: Virtual machine resource id for response.
:vartype virtual_machine_resource_id: str
"""
_validation = {
"virtual_machine_resource_id": {"readonly": True},
}
_attribute_map = {
"start_time_utc": {"key": "startTimeUtc", "type": "iso-8601"},
"end_time_utc": {"key": "endTimeUtc", "type": "iso-8601"},
"troubleshooting_scenario": {"key": "troubleshootingScenario", "type": "str"},
"properties": {"key": "properties", "type": "TroubleshootingAdditionalProperties"},
"virtual_machine_resource_id": {"key": "virtualMachineResourceId", "type": "str"},
}
def __init__(
self,
*,
start_time_utc: Optional[datetime.datetime] = None,
end_time_utc: Optional[datetime.datetime] = None,
troubleshooting_scenario: Optional[Union[str, "_models.TroubleshootingScenario"]] = None,
properties: Optional["_models.TroubleshootingAdditionalProperties"] = None,
**kwargs: Any
) -> None:
"""
:keyword start_time_utc: Start time in UTC timezone.
:paramtype start_time_utc: ~datetime.datetime
:keyword end_time_utc: End time in UTC timezone.
:paramtype end_time_utc: ~datetime.datetime
:keyword troubleshooting_scenario: SQL VM troubleshooting scenario. "UnhealthyReplica"
:paramtype troubleshooting_scenario: str or
~azure.mgmt.sqlvirtualmachine.models.TroubleshootingScenario
:keyword properties: Troubleshooting properties.
:paramtype properties: ~azure.mgmt.sqlvirtualmachine.models.TroubleshootingAdditionalProperties
"""
super().__init__(**kwargs)
self.start_time_utc = start_time_utc
self.end_time_utc = end_time_utc
self.troubleshooting_scenario = troubleshooting_scenario
self.properties = properties
self.virtual_machine_resource_id = None
class SqlWorkloadTypeUpdateSettings(_serialization.Model):
"""Set workload type to optimize storage for SQL Server.
:ivar sql_workload_type: SQL Server workload type. Known values are: "GENERAL", "OLTP", and
"DW".
:vartype sql_workload_type: str or ~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadType
"""
_attribute_map = {
"sql_workload_type": {"key": "sqlWorkloadType", "type": "str"},
}
def __init__(
self, *, sql_workload_type: Optional[Union[str, "_models.SqlWorkloadType"]] = None, **kwargs: Any
) -> None:
"""
:keyword sql_workload_type: SQL Server workload type. Known values are: "GENERAL", "OLTP", and
"DW".
:paramtype sql_workload_type: str or ~azure.mgmt.sqlvirtualmachine.models.SqlWorkloadType
"""
super().__init__(**kwargs)
self.sql_workload_type = sql_workload_type
class StorageConfigurationSettings(_serialization.Model):
"""Storage Configurations for SQL Data, Log and TempDb.
:ivar sql_data_settings: SQL Server Data Storage Settings.
:vartype sql_data_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings
:ivar sql_log_settings: SQL Server Log Storage Settings.
:vartype sql_log_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings
:ivar sql_temp_db_settings: SQL Server TempDb Storage Settings.
:vartype sql_temp_db_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLTempDbSettings
:ivar sql_system_db_on_data_disk: SQL Server SystemDb Storage on DataPool if true.
:vartype sql_system_db_on_data_disk: bool
:ivar disk_configuration_type: Disk configuration to apply to SQL Server. Known values are:
"NEW", "EXTEND", and "ADD".
:vartype disk_configuration_type: str or
~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType
:ivar storage_workload_type: Storage workload type. Known values are: "GENERAL", "OLTP", and
"DW".
:vartype storage_workload_type: str or ~azure.mgmt.sqlvirtualmachine.models.StorageWorkloadType
"""
_attribute_map = {
"sql_data_settings": {"key": "sqlDataSettings", "type": "SQLStorageSettings"},
"sql_log_settings": {"key": "sqlLogSettings", "type": "SQLStorageSettings"},
"sql_temp_db_settings": {"key": "sqlTempDbSettings", "type": "SQLTempDbSettings"},
"sql_system_db_on_data_disk": {"key": "sqlSystemDbOnDataDisk", "type": "bool"},
"disk_configuration_type": {"key": "diskConfigurationType", "type": "str"},
"storage_workload_type": {"key": "storageWorkloadType", "type": "str"},
}
def __init__(
self,
*,
sql_data_settings: Optional["_models.SQLStorageSettings"] = None,
sql_log_settings: Optional["_models.SQLStorageSettings"] = None,
sql_temp_db_settings: Optional["_models.SQLTempDbSettings"] = None,
sql_system_db_on_data_disk: Optional[bool] = None,
disk_configuration_type: Optional[Union[str, "_models.DiskConfigurationType"]] = None,
storage_workload_type: Optional[Union[str, "_models.StorageWorkloadType"]] = None,
**kwargs: Any
) -> None:
"""
:keyword sql_data_settings: SQL Server Data Storage Settings.
:paramtype sql_data_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings
:keyword sql_log_settings: SQL Server Log Storage Settings.
:paramtype sql_log_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLStorageSettings
:keyword sql_temp_db_settings: SQL Server TempDb Storage Settings.
:paramtype sql_temp_db_settings: ~azure.mgmt.sqlvirtualmachine.models.SQLTempDbSettings
:keyword sql_system_db_on_data_disk: SQL Server SystemDb Storage on DataPool if true.
:paramtype sql_system_db_on_data_disk: bool
:keyword disk_configuration_type: Disk configuration to apply to SQL Server. Known values are:
"NEW", "EXTEND", and "ADD".
:paramtype disk_configuration_type: str or
~azure.mgmt.sqlvirtualmachine.models.DiskConfigurationType
:keyword storage_workload_type: Storage workload type. Known values are: "GENERAL", "OLTP", and
"DW".
:paramtype storage_workload_type: str or
~azure.mgmt.sqlvirtualmachine.models.StorageWorkloadType
"""
super().__init__(**kwargs)
self.sql_data_settings = sql_data_settings
self.sql_log_settings = sql_log_settings
self.sql_temp_db_settings = sql_temp_db_settings
self.sql_system_db_on_data_disk = sql_system_db_on_data_disk
self.disk_configuration_type = disk_configuration_type
self.storage_workload_type = storage_workload_type
class SystemData(_serialization.Model):
"""Metadata pertaining to creation and last modification of the resource.
:ivar created_by: The identity that created the resource.
:vartype created_by: str
:ivar created_by_type: The type of identity that created the resource. Known values are:
"User", "Application", "ManagedIdentity", and "Key".
:vartype created_by_type: str or ~azure.mgmt.sqlvirtualmachine.models.CreatedByType
:ivar created_at: The timestamp of resource creation (UTC).
:vartype created_at: ~datetime.datetime
:ivar last_modified_by: The identity that last modified the resource.
:vartype last_modified_by: str
:ivar last_modified_by_type: The type of identity that last modified the resource. Known values
are: "User", "Application", "ManagedIdentity", and "Key".
:vartype last_modified_by_type: str or ~azure.mgmt.sqlvirtualmachine.models.CreatedByType
:ivar last_modified_at: The timestamp of resource last modification (UTC).
:vartype last_modified_at: ~datetime.datetime
"""
_attribute_map = {
"created_by": {"key": "createdBy", "type": "str"},
"created_by_type": {"key": "createdByType", "type": "str"},
"created_at": {"key": "createdAt", "type": "iso-8601"},
"last_modified_by": {"key": "lastModifiedBy", "type": "str"},
"last_modified_by_type": {"key": "lastModifiedByType", "type": "str"},
"last_modified_at": {"key": "lastModifiedAt", "type": "iso-8601"},
}
def __init__(
self,
*,
created_by: Optional[str] = None,
created_by_type: Optional[Union[str, "_models.CreatedByType"]] = None,
created_at: Optional[datetime.datetime] = None,
last_modified_by: Optional[str] = None,
last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None,
last_modified_at: Optional[datetime.datetime] = None,
**kwargs: Any
) -> None:
"""
:keyword created_by: The identity that created the resource.
:paramtype created_by: str
:keyword created_by_type: The type of identity that created the resource. Known values are:
"User", "Application", "ManagedIdentity", and "Key".
:paramtype created_by_type: str or ~azure.mgmt.sqlvirtualmachine.models.CreatedByType
:keyword created_at: The timestamp of resource creation (UTC).
:paramtype created_at: ~datetime.datetime
:keyword last_modified_by: The identity that last modified the resource.
:paramtype last_modified_by: str
:keyword last_modified_by_type: The type of identity that last modified the resource. Known
values are: "User", "Application", "ManagedIdentity", and "Key".
:paramtype last_modified_by_type: str or ~azure.mgmt.sqlvirtualmachine.models.CreatedByType
:keyword last_modified_at: The timestamp of resource last modification (UTC).
:paramtype last_modified_at: ~datetime.datetime
"""
super().__init__(**kwargs)
self.created_by = created_by
self.created_by_type = created_by_type
self.created_at = created_at
self.last_modified_by = last_modified_by
self.last_modified_by_type = last_modified_by_type
self.last_modified_at = last_modified_at
class TroubleshootingAdditionalProperties(_serialization.Model):
"""SQL VM Troubleshooting additional properties.
:ivar unhealthy_replica_info: The unhealthy replica information.
:vartype unhealthy_replica_info: ~azure.mgmt.sqlvirtualmachine.models.UnhealthyReplicaInfo
"""
_attribute_map = {
"unhealthy_replica_info": {"key": "unhealthyReplicaInfo", "type": "UnhealthyReplicaInfo"},
}
def __init__(
self, *, unhealthy_replica_info: Optional["_models.UnhealthyReplicaInfo"] = None, **kwargs: Any
) -> None:
"""
:keyword unhealthy_replica_info: The unhealthy replica information.
:paramtype unhealthy_replica_info: ~azure.mgmt.sqlvirtualmachine.models.UnhealthyReplicaInfo
"""
super().__init__(**kwargs)
self.unhealthy_replica_info = unhealthy_replica_info
class TroubleshootingStatus(_serialization.Model):
"""Status of last troubleshooting operation on this SQL VM.
Variables are only populated by the server, and will be ignored when sending a request.
:ivar root_cause: Root cause of the issue.
:vartype root_cause: str
:ivar last_trigger_time_utc: Last troubleshooting trigger time in UTC timezone.
:vartype last_trigger_time_utc: ~datetime.datetime
:ivar start_time_utc: Start time in UTC timezone.
:vartype start_time_utc: ~datetime.datetime
:ivar end_time_utc: End time in UTC timezone.
:vartype end_time_utc: ~datetime.datetime
:ivar troubleshooting_scenario: SQL VM troubleshooting scenario. "UnhealthyReplica"
:vartype troubleshooting_scenario: str or
~azure.mgmt.sqlvirtualmachine.models.TroubleshootingScenario
:ivar properties: Troubleshooting properties.
:vartype properties: ~azure.mgmt.sqlvirtualmachine.models.TroubleshootingAdditionalProperties
"""
_validation = {
"root_cause": {"readonly": True},
"last_trigger_time_utc": {"readonly": True},
"start_time_utc": {"readonly": True},
"end_time_utc": {"readonly": True},
"troubleshooting_scenario": {"readonly": True},
"properties": {"readonly": True},
}
_attribute_map = {
"root_cause": {"key": "rootCause", "type": "str"},
"last_trigger_time_utc": {"key": "lastTriggerTimeUtc", "type": "iso-8601"},
"start_time_utc": {"key": "startTimeUtc", "type": "iso-8601"},
"end_time_utc": {"key": "endTimeUtc", "type": "iso-8601"},
"troubleshooting_scenario": {"key": "troubleshootingScenario", "type": "str"},
"properties": {"key": "properties", "type": "TroubleshootingAdditionalProperties"},
}
def __init__(self, **kwargs: Any) -> None:
""" """
super().__init__(**kwargs)
self.root_cause = None
self.last_trigger_time_utc = None
self.start_time_utc = None
self.end_time_utc = None
self.troubleshooting_scenario = None
self.properties = None
class UnhealthyReplicaInfo(_serialization.Model):
"""SQL VM Troubleshoot UnhealthyReplica scenario information.
:ivar availability_group_name: The name of the availability group.
:vartype availability_group_name: str
"""
_attribute_map = {
"availability_group_name": {"key": "availabilityGroupName", "type": "str"},
}
def __init__(self, *, availability_group_name: Optional[str] = None, **kwargs: Any) -> None:
"""
:keyword availability_group_name: The name of the availability group.
:paramtype availability_group_name: str
"""
super().__init__(**kwargs)
self.availability_group_name = availability_group_name
class WsfcDomainCredentials(_serialization.Model):
"""Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.
:ivar cluster_bootstrap_account_password: Cluster bootstrap account password.
:vartype cluster_bootstrap_account_password: str
:ivar cluster_operator_account_password: Cluster operator account password.
:vartype cluster_operator_account_password: str
:ivar sql_service_account_password: SQL service account password.
:vartype sql_service_account_password: str
"""
_attribute_map = {
"cluster_bootstrap_account_password": {"key": "clusterBootstrapAccountPassword", "type": "str"},
"cluster_operator_account_password": {"key": "clusterOperatorAccountPassword", "type": "str"},
"sql_service_account_password": {"key": "sqlServiceAccountPassword", "type": "str"},
}
def __init__(
self,
*,
cluster_bootstrap_account_password: Optional[str] = None,
cluster_operator_account_password: Optional[str] = None,
sql_service_account_password: Optional[str] = None,
**kwargs: Any
) -> None:
"""
:keyword cluster_bootstrap_account_password: Cluster bootstrap account password.
:paramtype cluster_bootstrap_account_password: str
:keyword cluster_operator_account_password: Cluster operator account password.
:paramtype cluster_operator_account_password: str
:keyword sql_service_account_password: SQL service account password.
:paramtype sql_service_account_password: str
"""
super().__init__(**kwargs)
self.cluster_bootstrap_account_password = cluster_bootstrap_account_password
self.cluster_operator_account_password = cluster_operator_account_password
self.sql_service_account_password = sql_service_account_password
class WsfcDomainProfile(_serialization.Model):
"""Active Directory account details to operate Windows Server Failover Cluster.
:ivar domain_fqdn: Fully qualified name of the domain.
:vartype domain_fqdn: str
:ivar ou_path: Organizational Unit path in which the nodes and cluster will be present.
:vartype ou_path: str
:ivar cluster_bootstrap_account: Account name used for creating cluster (at minimum needs
permissions to 'Create Computer Objects' in domain).
:vartype cluster_bootstrap_account: str
:ivar cluster_operator_account: Account name used for operating cluster i.e. will be part of
administrators group on all the participating virtual machines in the cluster.
:vartype cluster_operator_account: str
:ivar sql_service_account: Account name under which SQL service will run on all participating
SQL virtual machines in the cluster.
:vartype sql_service_account: str
:ivar file_share_witness_path: Optional path for fileshare witness.
:vartype file_share_witness_path: str
:ivar storage_account_url: Fully qualified ARM resource id of the witness storage account.
:vartype storage_account_url: str
:ivar storage_account_primary_key: Primary key of the witness storage account.
:vartype storage_account_primary_key: str
:ivar cluster_subnet_type: Cluster subnet type. Known values are: "SingleSubnet" and
"MultiSubnet".
:vartype cluster_subnet_type: str or ~azure.mgmt.sqlvirtualmachine.models.ClusterSubnetType
"""
_attribute_map = {
"domain_fqdn": {"key": "domainFqdn", "type": "str"},
"ou_path": {"key": "ouPath", "type": "str"},
"cluster_bootstrap_account": {"key": "clusterBootstrapAccount", "type": "str"},
"cluster_operator_account": {"key": "clusterOperatorAccount", "type": "str"},
"sql_service_account": {"key": "sqlServiceAccount", "type": "str"},
"file_share_witness_path": {"key": "fileShareWitnessPath", "type": "str"},
"storage_account_url": {"key": "storageAccountUrl", "type": "str"},
"storage_account_primary_key": {"key": "storageAccountPrimaryKey", "type": "str"},
"cluster_subnet_type": {"key": "clusterSubnetType", "type": "str"},
}
def __init__(
self,
*,
domain_fqdn: Optional[str] = None,
ou_path: Optional[str] = None,
cluster_bootstrap_account: Optional[str] = None,
cluster_operator_account: Optional[str] = None,
sql_service_account: Optional[str] = None,
file_share_witness_path: Optional[str] = None,
storage_account_url: Optional[str] = None,
storage_account_primary_key: Optional[str] = None,
cluster_subnet_type: Optional[Union[str, "_models.ClusterSubnetType"]] = None,
**kwargs: Any
) -> None:
"""
:keyword domain_fqdn: Fully qualified name of the domain.
:paramtype domain_fqdn: str
:keyword ou_path: Organizational Unit path in which the nodes and cluster will be present.
:paramtype ou_path: str
:keyword cluster_bootstrap_account: Account name used for creating cluster (at minimum needs
permissions to 'Create Computer Objects' in domain).
:paramtype cluster_bootstrap_account: str
:keyword cluster_operator_account: Account name used for operating cluster i.e. will be part of
administrators group on all the participating virtual machines in the cluster.
:paramtype cluster_operator_account: str
:keyword sql_service_account: Account name under which SQL service will run on all
participating SQL virtual machines in the cluster.
:paramtype sql_service_account: str
:keyword file_share_witness_path: Optional path for fileshare witness.
:paramtype file_share_witness_path: str
:keyword storage_account_url: Fully qualified ARM resource id of the witness storage account.
:paramtype storage_account_url: str
:keyword storage_account_primary_key: Primary key of the witness storage account.
:paramtype storage_account_primary_key: str
:keyword cluster_subnet_type: Cluster subnet type. Known values are: "SingleSubnet" and
"MultiSubnet".
:paramtype cluster_subnet_type: str or ~azure.mgmt.sqlvirtualmachine.models.ClusterSubnetType
"""
super().__init__(**kwargs)
self.domain_fqdn = domain_fqdn
self.ou_path = ou_path
self.cluster_bootstrap_account = cluster_bootstrap_account
self.cluster_operator_account = cluster_operator_account
self.sql_service_account = sql_service_account
self.file_share_witness_path = file_share_witness_path
self.storage_account_url = storage_account_url
self.storage_account_primary_key = storage_account_primary_key
self.cluster_subnet_type = cluster_subnet_type
|