1# coding=utf-8 2# -------------------------------------------------------------------------- 3# Copyright (c) Microsoft Corporation. All rights reserved. 4# Licensed under the MIT License. See License.txt in the project root for license information. 5# Code generated by Microsoft (R) AutoRest Code Generator. 6# Changes may cause incorrect behavior and will be lost if the code is regenerated. 7# -------------------------------------------------------------------------- 8 9import datetime 10from typing import Dict, List, Optional, Union 11 12import msrest.serialization 13 14from ._sql_management_client_enums import * 15 16 17class AdministratorListResult(msrest.serialization.Model): 18 """A list of active directory administrators. 19 20 Variables are only populated by the server, and will be ignored when sending a request. 21 22 :ivar value: Array of results. 23 :vartype value: list[~azure.mgmt.sql.models.ServerAzureADAdministrator] 24 :ivar next_link: Link to retrieve next page of results. 25 :vartype next_link: str 26 """ 27 28 _validation = { 29 'value': {'readonly': True}, 30 'next_link': {'readonly': True}, 31 } 32 33 _attribute_map = { 34 'value': {'key': 'value', 'type': '[ServerAzureADAdministrator]'}, 35 'next_link': {'key': 'nextLink', 'type': 'str'}, 36 } 37 38 def __init__( 39 self, 40 **kwargs 41 ): 42 super(AdministratorListResult, self).__init__(**kwargs) 43 self.value = None 44 self.next_link = None 45 46 47class Resource(msrest.serialization.Model): 48 """ARM resource. 49 50 Variables are only populated by the server, and will be ignored when sending a request. 51 52 :ivar id: Resource ID. 53 :vartype id: str 54 :ivar name: Resource name. 55 :vartype name: str 56 :ivar type: Resource type. 57 :vartype type: str 58 """ 59 60 _validation = { 61 'id': {'readonly': True}, 62 'name': {'readonly': True}, 63 'type': {'readonly': True}, 64 } 65 66 _attribute_map = { 67 'id': {'key': 'id', 'type': 'str'}, 68 'name': {'key': 'name', 'type': 'str'}, 69 'type': {'key': 'type', 'type': 'str'}, 70 } 71 72 def __init__( 73 self, 74 **kwargs 75 ): 76 super(Resource, self).__init__(**kwargs) 77 self.id = None 78 self.name = None 79 self.type = None 80 81 82class ProxyResource(Resource): 83 """ARM proxy resource. 84 85 Variables are only populated by the server, and will be ignored when sending a request. 86 87 :ivar id: Resource ID. 88 :vartype id: str 89 :ivar name: Resource name. 90 :vartype name: str 91 :ivar type: Resource type. 92 :vartype type: str 93 """ 94 95 _validation = { 96 'id': {'readonly': True}, 97 'name': {'readonly': True}, 98 'type': {'readonly': True}, 99 } 100 101 _attribute_map = { 102 'id': {'key': 'id', 'type': 'str'}, 103 'name': {'key': 'name', 'type': 'str'}, 104 'type': {'key': 'type', 'type': 'str'}, 105 } 106 107 def __init__( 108 self, 109 **kwargs 110 ): 111 super(ProxyResource, self).__init__(**kwargs) 112 113 114class Advisor(ProxyResource): 115 """Database, Server or Elastic Pool Advisor. 116 117 Variables are only populated by the server, and will be ignored when sending a request. 118 119 :ivar id: Resource ID. 120 :vartype id: str 121 :ivar name: Resource name. 122 :vartype name: str 123 :ivar type: Resource type. 124 :vartype type: str 125 :ivar kind: Resource kind. 126 :vartype kind: str 127 :ivar location: Resource location. 128 :vartype location: str 129 :ivar advisor_status: Gets the status of availability of this advisor to customers. Possible 130 values are 'GA', 'PublicPreview', 'LimitedPublicPreview' and 'PrivatePreview'. Possible values 131 include: "GA", "PublicPreview", "LimitedPublicPreview", "PrivatePreview". 132 :vartype advisor_status: str or ~azure.mgmt.sql.models.AdvisorStatus 133 :param auto_execute_status: Gets the auto-execute status (whether to let the system execute the 134 recommendations) of this advisor. Possible values are 'Enabled' and 'Disabled'. Possible values 135 include: "Enabled", "Disabled", "Default". 136 :type auto_execute_status: str or ~azure.mgmt.sql.models.AutoExecuteStatus 137 :ivar auto_execute_status_inherited_from: Gets the resource from which current value of 138 auto-execute status is inherited. Auto-execute status can be set on (and inherited from) 139 different levels in the resource hierarchy. Possible values are 'Subscription', 'Server', 140 'ElasticPool', 'Database' and 'Default' (when status is not explicitly set on any level). 141 Possible values include: "Default", "Subscription", "Server", "ElasticPool", "Database". 142 :vartype auto_execute_status_inherited_from: str or 143 ~azure.mgmt.sql.models.AutoExecuteStatusInheritedFrom 144 :ivar recommendations_status: Gets that status of recommendations for this advisor and reason 145 for not having any recommendations. Possible values include, but are not limited to, 'Ok' 146 (Recommendations available),LowActivity (not enough workload to analyze), 'DbSeemsTuned' 147 (Database is doing well), etc. 148 :vartype recommendations_status: str 149 :ivar last_checked: Gets the time when the current resource was analyzed for recommendations by 150 this advisor. 151 :vartype last_checked: ~datetime.datetime 152 :ivar recommended_actions: Gets the recommended actions for this advisor. 153 :vartype recommended_actions: list[~azure.mgmt.sql.models.RecommendedAction] 154 """ 155 156 _validation = { 157 'id': {'readonly': True}, 158 'name': {'readonly': True}, 159 'type': {'readonly': True}, 160 'kind': {'readonly': True}, 161 'location': {'readonly': True}, 162 'advisor_status': {'readonly': True}, 163 'auto_execute_status_inherited_from': {'readonly': True}, 164 'recommendations_status': {'readonly': True}, 165 'last_checked': {'readonly': True}, 166 'recommended_actions': {'readonly': True}, 167 } 168 169 _attribute_map = { 170 'id': {'key': 'id', 'type': 'str'}, 171 'name': {'key': 'name', 'type': 'str'}, 172 'type': {'key': 'type', 'type': 'str'}, 173 'kind': {'key': 'kind', 'type': 'str'}, 174 'location': {'key': 'location', 'type': 'str'}, 175 'advisor_status': {'key': 'properties.advisorStatus', 'type': 'str'}, 176 'auto_execute_status': {'key': 'properties.autoExecuteStatus', 'type': 'str'}, 177 'auto_execute_status_inherited_from': {'key': 'properties.autoExecuteStatusInheritedFrom', 'type': 'str'}, 178 'recommendations_status': {'key': 'properties.recommendationsStatus', 'type': 'str'}, 179 'last_checked': {'key': 'properties.lastChecked', 'type': 'iso-8601'}, 180 'recommended_actions': {'key': 'properties.recommendedActions', 'type': '[RecommendedAction]'}, 181 } 182 183 def __init__( 184 self, 185 *, 186 auto_execute_status: Optional[Union[str, "AutoExecuteStatus"]] = None, 187 **kwargs 188 ): 189 super(Advisor, self).__init__(**kwargs) 190 self.kind = None 191 self.location = None 192 self.advisor_status = None 193 self.auto_execute_status = auto_execute_status 194 self.auto_execute_status_inherited_from = None 195 self.recommendations_status = None 196 self.last_checked = None 197 self.recommended_actions = None 198 199 200class AutomaticTuningOptions(msrest.serialization.Model): 201 """Automatic tuning properties for individual advisors. 202 203 Variables are only populated by the server, and will be ignored when sending a request. 204 205 :param desired_state: Automatic tuning option desired state. Possible values include: "Off", 206 "On", "Default". 207 :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired 208 :ivar actual_state: Automatic tuning option actual state. Possible values include: "Off", "On". 209 :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual 210 :ivar reason_code: Reason code if desired and actual state are different. 211 :vartype reason_code: int 212 :ivar reason_desc: Reason description if desired and actual state are different. Possible 213 values include: "Default", "Disabled", "AutoConfigured", "InheritedFromServer", 214 "QueryStoreOff", "QueryStoreReadOnly", "NotSupported". 215 :vartype reason_desc: str or ~azure.mgmt.sql.models.AutomaticTuningDisabledReason 216 """ 217 218 _validation = { 219 'actual_state': {'readonly': True}, 220 'reason_code': {'readonly': True}, 221 'reason_desc': {'readonly': True}, 222 } 223 224 _attribute_map = { 225 'desired_state': {'key': 'desiredState', 'type': 'str'}, 226 'actual_state': {'key': 'actualState', 'type': 'str'}, 227 'reason_code': {'key': 'reasonCode', 'type': 'int'}, 228 'reason_desc': {'key': 'reasonDesc', 'type': 'str'}, 229 } 230 231 def __init__( 232 self, 233 *, 234 desired_state: Optional[Union[str, "AutomaticTuningOptionModeDesired"]] = None, 235 **kwargs 236 ): 237 super(AutomaticTuningOptions, self).__init__(**kwargs) 238 self.desired_state = desired_state 239 self.actual_state = None 240 self.reason_code = None 241 self.reason_desc = None 242 243 244class AutomaticTuningServerOptions(msrest.serialization.Model): 245 """Automatic tuning properties for individual advisors. 246 247 Variables are only populated by the server, and will be ignored when sending a request. 248 249 :param desired_state: Automatic tuning option desired state. Possible values include: "Off", 250 "On", "Default". 251 :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired 252 :ivar actual_state: Automatic tuning option actual state. Possible values include: "Off", "On". 253 :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual 254 :ivar reason_code: Reason code if desired and actual state are different. 255 :vartype reason_code: int 256 :ivar reason_desc: Reason description if desired and actual state are different. Possible 257 values include: "Default", "Disabled", "AutoConfigured". 258 :vartype reason_desc: str or ~azure.mgmt.sql.models.AutomaticTuningServerReason 259 """ 260 261 _validation = { 262 'actual_state': {'readonly': True}, 263 'reason_code': {'readonly': True}, 264 'reason_desc': {'readonly': True}, 265 } 266 267 _attribute_map = { 268 'desired_state': {'key': 'desiredState', 'type': 'str'}, 269 'actual_state': {'key': 'actualState', 'type': 'str'}, 270 'reason_code': {'key': 'reasonCode', 'type': 'int'}, 271 'reason_desc': {'key': 'reasonDesc', 'type': 'str'}, 272 } 273 274 def __init__( 275 self, 276 *, 277 desired_state: Optional[Union[str, "AutomaticTuningOptionModeDesired"]] = None, 278 **kwargs 279 ): 280 super(AutomaticTuningServerOptions, self).__init__(**kwargs) 281 self.desired_state = desired_state 282 self.actual_state = None 283 self.reason_code = None 284 self.reason_desc = None 285 286 287class AutoPauseDelayTimeRange(msrest.serialization.Model): 288 """Supported auto pause delay time range. 289 290 Variables are only populated by the server, and will be ignored when sending a request. 291 292 :ivar min_value: Minimum value. 293 :vartype min_value: int 294 :ivar max_value: Maximum value. 295 :vartype max_value: int 296 :ivar step_size: Step value for discrete values between the minimum value and the maximum 297 value. 298 :vartype step_size: int 299 :ivar default: Default value is no value is provided. 300 :vartype default: int 301 :ivar unit: Unit of time that delay is expressed in. Possible values include: "Minutes". 302 :vartype unit: str or ~azure.mgmt.sql.models.PauseDelayTimeUnit 303 :ivar do_not_pause_value: Value that is used to not pause (infinite delay before pause). 304 :vartype do_not_pause_value: int 305 """ 306 307 _validation = { 308 'min_value': {'readonly': True}, 309 'max_value': {'readonly': True}, 310 'step_size': {'readonly': True}, 311 'default': {'readonly': True}, 312 'unit': {'readonly': True}, 313 'do_not_pause_value': {'readonly': True}, 314 } 315 316 _attribute_map = { 317 'min_value': {'key': 'minValue', 'type': 'int'}, 318 'max_value': {'key': 'maxValue', 'type': 'int'}, 319 'step_size': {'key': 'stepSize', 'type': 'int'}, 320 'default': {'key': 'default', 'type': 'int'}, 321 'unit': {'key': 'unit', 'type': 'str'}, 322 'do_not_pause_value': {'key': 'doNotPauseValue', 'type': 'int'}, 323 } 324 325 def __init__( 326 self, 327 **kwargs 328 ): 329 super(AutoPauseDelayTimeRange, self).__init__(**kwargs) 330 self.min_value = None 331 self.max_value = None 332 self.step_size = None 333 self.default = None 334 self.unit = None 335 self.do_not_pause_value = None 336 337 338class AzureADOnlyAuthListResult(msrest.serialization.Model): 339 """A list of active directory only authentications. 340 341 Variables are only populated by the server, and will be ignored when sending a request. 342 343 :ivar value: Array of results. 344 :vartype value: list[~azure.mgmt.sql.models.ServerAzureADOnlyAuthentication] 345 :ivar next_link: Link to retrieve next page of results. 346 :vartype next_link: str 347 """ 348 349 _validation = { 350 'value': {'readonly': True}, 351 'next_link': {'readonly': True}, 352 } 353 354 _attribute_map = { 355 'value': {'key': 'value', 'type': '[ServerAzureADOnlyAuthentication]'}, 356 'next_link': {'key': 'nextLink', 'type': 'str'}, 357 } 358 359 def __init__( 360 self, 361 **kwargs 362 ): 363 super(AzureADOnlyAuthListResult, self).__init__(**kwargs) 364 self.value = None 365 self.next_link = None 366 367 368class BackupShortTermRetentionPolicy(ProxyResource): 369 """A short term retention policy. 370 371 Variables are only populated by the server, and will be ignored when sending a request. 372 373 :ivar id: Resource ID. 374 :vartype id: str 375 :ivar name: Resource name. 376 :vartype name: str 377 :ivar type: Resource type. 378 :vartype type: str 379 :param retention_days: The backup retention period in days. This is how many days Point-in-Time 380 Restore will be supported. 381 :type retention_days: int 382 :param diff_backup_interval_in_hours: The differential backup interval in hours. This is how 383 many interval hours between each differential backup will be supported. This is only applicable 384 to live databases but not dropped databases. Possible values include: 12, 24. 385 :type diff_backup_interval_in_hours: str or ~azure.mgmt.sql.models.DiffBackupIntervalInHours 386 """ 387 388 _validation = { 389 'id': {'readonly': True}, 390 'name': {'readonly': True}, 391 'type': {'readonly': True}, 392 } 393 394 _attribute_map = { 395 'id': {'key': 'id', 'type': 'str'}, 396 'name': {'key': 'name', 'type': 'str'}, 397 'type': {'key': 'type', 'type': 'str'}, 398 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 399 'diff_backup_interval_in_hours': {'key': 'properties.diffBackupIntervalInHours', 'type': 'int'}, 400 } 401 402 def __init__( 403 self, 404 *, 405 retention_days: Optional[int] = None, 406 diff_backup_interval_in_hours: Optional[Union[int, "DiffBackupIntervalInHours"]] = None, 407 **kwargs 408 ): 409 super(BackupShortTermRetentionPolicy, self).__init__(**kwargs) 410 self.retention_days = retention_days 411 self.diff_backup_interval_in_hours = diff_backup_interval_in_hours 412 413 414class BackupShortTermRetentionPolicyListResult(msrest.serialization.Model): 415 """A list of short term retention policies. 416 417 Variables are only populated by the server, and will be ignored when sending a request. 418 419 :ivar value: Array of results. 420 :vartype value: list[~azure.mgmt.sql.models.BackupShortTermRetentionPolicy] 421 :ivar next_link: Link to retrieve next page of results. 422 :vartype next_link: str 423 """ 424 425 _validation = { 426 'value': {'readonly': True}, 427 'next_link': {'readonly': True}, 428 } 429 430 _attribute_map = { 431 'value': {'key': 'value', 'type': '[BackupShortTermRetentionPolicy]'}, 432 'next_link': {'key': 'nextLink', 'type': 'str'}, 433 } 434 435 def __init__( 436 self, 437 **kwargs 438 ): 439 super(BackupShortTermRetentionPolicyListResult, self).__init__(**kwargs) 440 self.value = None 441 self.next_link = None 442 443 444class CheckNameAvailabilityRequest(msrest.serialization.Model): 445 """A request to check whether the specified name for a resource is available. 446 447 Variables are only populated by the server, and will be ignored when sending a request. 448 449 All required parameters must be populated in order to send to Azure. 450 451 :param name: Required. 452 :type name: str 453 :ivar type: Has constant value: "Microsoft.Sql/servers". 454 :vartype type: str 455 """ 456 457 _validation = { 458 'name': {'required': True}, 459 'type': {'required': True, 'constant': True}, 460 } 461 462 _attribute_map = { 463 'name': {'key': 'name', 'type': 'str'}, 464 'type': {'key': 'type', 'type': 'str'}, 465 } 466 467 type = "Microsoft.Sql/servers" 468 469 def __init__( 470 self, 471 *, 472 name: str, 473 **kwargs 474 ): 475 super(CheckNameAvailabilityRequest, self).__init__(**kwargs) 476 self.name = name 477 478 479class CheckNameAvailabilityResponse(msrest.serialization.Model): 480 """The result of a name availability check. 481 482 Variables are only populated by the server, and will be ignored when sending a request. 483 484 :ivar name: The name whose availability was checked. 485 :vartype name: str 486 :ivar available: True if the name is available, otherwise false. 487 :vartype available: bool 488 :ivar reason: The reason code explaining why the name is unavailable. Will be undefined if the 489 name is available. Possible values include: "Invalid", "AlreadyExists". 490 :vartype reason: str or ~azure.mgmt.sql.models.CheckNameAvailabilityReason 491 :ivar message: A message explaining why the name is unavailable. Will be undefined if the name 492 is available. 493 :vartype message: str 494 """ 495 496 _validation = { 497 'name': {'readonly': True}, 498 'available': {'readonly': True}, 499 'reason': {'readonly': True}, 500 'message': {'readonly': True}, 501 } 502 503 _attribute_map = { 504 'name': {'key': 'name', 'type': 'str'}, 505 'available': {'key': 'available', 'type': 'bool'}, 506 'reason': {'key': 'reason', 'type': 'str'}, 507 'message': {'key': 'message', 'type': 'str'}, 508 } 509 510 def __init__( 511 self, 512 **kwargs 513 ): 514 super(CheckNameAvailabilityResponse, self).__init__(**kwargs) 515 self.name = None 516 self.available = None 517 self.reason = None 518 self.message = None 519 520 521class CompleteDatabaseRestoreDefinition(msrest.serialization.Model): 522 """Contains the information necessary to perform a complete database restore operation. 523 524 All required parameters must be populated in order to send to Azure. 525 526 :param last_backup_name: Required. The last backup name to apply. 527 :type last_backup_name: str 528 """ 529 530 _validation = { 531 'last_backup_name': {'required': True}, 532 } 533 534 _attribute_map = { 535 'last_backup_name': {'key': 'lastBackupName', 'type': 'str'}, 536 } 537 538 def __init__( 539 self, 540 *, 541 last_backup_name: str, 542 **kwargs 543 ): 544 super(CompleteDatabaseRestoreDefinition, self).__init__(**kwargs) 545 self.last_backup_name = last_backup_name 546 547 548class CopyLongTermRetentionBackupParameters(msrest.serialization.Model): 549 """Contains the information necessary to perform long term retention backup copy operation. 550 551 :param target_subscription_id: The subscription that owns the target server. 552 :type target_subscription_id: str 553 :param target_resource_group: The resource group that owns the target server. 554 :type target_resource_group: str 555 :param target_server_resource_id: The resource Id of the target server that owns the database. 556 :type target_server_resource_id: str 557 :param target_server_fully_qualified_domain_name: The fully qualified domain name of the target 558 server. 559 :type target_server_fully_qualified_domain_name: str 560 :param target_database_name: The name of the database owns the copied backup. 561 :type target_database_name: str 562 :param target_backup_storage_redundancy: The storage redundancy type of the copied backup. 563 Possible values include: "Geo", "Local", "Zone". 564 :type target_backup_storage_redundancy: str or 565 ~azure.mgmt.sql.models.TargetBackupStorageRedundancy 566 """ 567 568 _attribute_map = { 569 'target_subscription_id': {'key': 'properties.targetSubscriptionId', 'type': 'str'}, 570 'target_resource_group': {'key': 'properties.targetResourceGroup', 'type': 'str'}, 571 'target_server_resource_id': {'key': 'properties.targetServerResourceId', 'type': 'str'}, 572 'target_server_fully_qualified_domain_name': {'key': 'properties.targetServerFullyQualifiedDomainName', 'type': 'str'}, 573 'target_database_name': {'key': 'properties.targetDatabaseName', 'type': 'str'}, 574 'target_backup_storage_redundancy': {'key': 'properties.targetBackupStorageRedundancy', 'type': 'str'}, 575 } 576 577 def __init__( 578 self, 579 *, 580 target_subscription_id: Optional[str] = None, 581 target_resource_group: Optional[str] = None, 582 target_server_resource_id: Optional[str] = None, 583 target_server_fully_qualified_domain_name: Optional[str] = None, 584 target_database_name: Optional[str] = None, 585 target_backup_storage_redundancy: Optional[Union[str, "TargetBackupStorageRedundancy"]] = None, 586 **kwargs 587 ): 588 super(CopyLongTermRetentionBackupParameters, self).__init__(**kwargs) 589 self.target_subscription_id = target_subscription_id 590 self.target_resource_group = target_resource_group 591 self.target_server_resource_id = target_server_resource_id 592 self.target_server_fully_qualified_domain_name = target_server_fully_qualified_domain_name 593 self.target_database_name = target_database_name 594 self.target_backup_storage_redundancy = target_backup_storage_redundancy 595 596 597class CreateDatabaseRestorePointDefinition(msrest.serialization.Model): 598 """Contains the information necessary to perform a create database restore point operation. 599 600 All required parameters must be populated in order to send to Azure. 601 602 :param restore_point_label: Required. The restore point label to apply. 603 :type restore_point_label: str 604 """ 605 606 _validation = { 607 'restore_point_label': {'required': True}, 608 } 609 610 _attribute_map = { 611 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, 612 } 613 614 def __init__( 615 self, 616 *, 617 restore_point_label: str, 618 **kwargs 619 ): 620 super(CreateDatabaseRestorePointDefinition, self).__init__(**kwargs) 621 self.restore_point_label = restore_point_label 622 623 624class TrackedResource(Resource): 625 """ARM tracked top level resource. 626 627 Variables are only populated by the server, and will be ignored when sending a request. 628 629 All required parameters must be populated in order to send to Azure. 630 631 :ivar id: Resource ID. 632 :vartype id: str 633 :ivar name: Resource name. 634 :vartype name: str 635 :ivar type: Resource type. 636 :vartype type: str 637 :param location: Required. Resource location. 638 :type location: str 639 :param tags: A set of tags. Resource tags. 640 :type tags: dict[str, str] 641 """ 642 643 _validation = { 644 'id': {'readonly': True}, 645 'name': {'readonly': True}, 646 'type': {'readonly': True}, 647 'location': {'required': True}, 648 } 649 650 _attribute_map = { 651 'id': {'key': 'id', 'type': 'str'}, 652 'name': {'key': 'name', 'type': 'str'}, 653 'type': {'key': 'type', 'type': 'str'}, 654 'location': {'key': 'location', 'type': 'str'}, 655 'tags': {'key': 'tags', 'type': '{str}'}, 656 } 657 658 def __init__( 659 self, 660 *, 661 location: str, 662 tags: Optional[Dict[str, str]] = None, 663 **kwargs 664 ): 665 super(TrackedResource, self).__init__(**kwargs) 666 self.location = location 667 self.tags = tags 668 669 670class Database(TrackedResource): 671 """A database resource. 672 673 Variables are only populated by the server, and will be ignored when sending a request. 674 675 All required parameters must be populated in order to send to Azure. 676 677 :ivar id: Resource ID. 678 :vartype id: str 679 :ivar name: Resource name. 680 :vartype name: str 681 :ivar type: Resource type. 682 :vartype type: str 683 :param location: Required. Resource location. 684 :type location: str 685 :param tags: A set of tags. Resource tags. 686 :type tags: dict[str, str] 687 :param sku: The database SKU. 688 689 The list of SKUs may vary by region and support offer. To determine the SKUs (including the 690 SKU name, tier/edition, family, and capacity) that are available to your subscription in an 691 Azure region, use the ``Capabilities_ListByLocation`` REST API or one of the following 692 commands: 693 694 .. code-block:: azurecli 695 696 az sql db list-editions -l <location> -o table 697 ` 698 699 .. code-block:: powershell 700 701 Get-AzSqlServerServiceObjective -Location <location> 702 `. 703 :type sku: ~azure.mgmt.sql.models.Sku 704 :ivar kind: Kind of database. This is metadata used for the Azure portal experience. 705 :vartype kind: str 706 :ivar managed_by: Resource that manages the database. 707 :vartype managed_by: str 708 :param create_mode: Specifies the mode of database creation. 709 710 Default: regular database creation. 711 712 Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified 713 as the resource ID of the source database. 714 715 Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId 716 must be specified as the resource ID of the existing primary database. 717 718 PointInTimeRestore: Creates a database by restoring a point in time backup of an existing 719 database. sourceDatabaseId must be specified as the resource ID of the existing database, and 720 restorePointInTime must be specified. 721 722 Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be 723 specified as the recoverable database resource ID to restore. 724 725 Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must 726 be specified. If sourceDatabaseId is the database's original resource ID, then 727 sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable 728 dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may 729 also be specified to restore from an earlier point in time. 730 731 RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention 732 vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource 733 ID. 734 735 Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse 736 edition. Possible values include: "Default", "Copy", "Secondary", "PointInTimeRestore", 737 "Restore", "Recovery", "RestoreExternalBackup", "RestoreExternalBackupSecondary", 738 "RestoreLongTermRetentionBackup", "OnlineSecondary". 739 :type create_mode: str or ~azure.mgmt.sql.models.CreateMode 740 :param collation: The collation of the database. 741 :type collation: str 742 :param max_size_bytes: The max size of the database expressed in bytes. 743 :type max_size_bytes: long 744 :param sample_name: The name of the sample schema to apply when creating this database. 745 Possible values include: "AdventureWorksLT", "WideWorldImportersStd", "WideWorldImportersFull". 746 :type sample_name: str or ~azure.mgmt.sql.models.SampleName 747 :param elastic_pool_id: The resource identifier of the elastic pool containing this database. 748 :type elastic_pool_id: str 749 :param source_database_id: The resource identifier of the source database associated with 750 create operation of this database. 751 :type source_database_id: str 752 :ivar status: The status of the database. Possible values include: "Online", "Restoring", 753 "RecoveryPending", "Recovering", "Suspect", "Offline", "Standby", "Shutdown", "EmergencyMode", 754 "AutoClosed", "Copying", "Creating", "Inaccessible", "OfflineSecondary", "Pausing", "Paused", 755 "Resuming", "Scaling", "OfflineChangingDwPerformanceTiers", "OnlineChangingDwPerformanceTiers", 756 "Disabled". 757 :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus 758 :ivar database_id: The ID of the database. 759 :vartype database_id: str 760 :ivar creation_date: The creation date of the database (ISO8601 format). 761 :vartype creation_date: ~datetime.datetime 762 :ivar current_service_objective_name: The current service level objective name of the database. 763 :vartype current_service_objective_name: str 764 :ivar requested_service_objective_name: The requested service level objective name of the 765 database. 766 :vartype requested_service_objective_name: str 767 :ivar default_secondary_location: The default secondary region for this database. 768 :vartype default_secondary_location: str 769 :ivar failover_group_id: Failover Group resource identifier that this database belongs to. 770 :vartype failover_group_id: str 771 :param restore_point_in_time: Specifies the point in time (ISO8601 format) of the source 772 database that will be restored to create the new database. 773 :type restore_point_in_time: ~datetime.datetime 774 :param source_database_deletion_date: Specifies the time that the database was deleted. 775 :type source_database_deletion_date: ~datetime.datetime 776 :param recovery_services_recovery_point_id: The resource identifier of the recovery point 777 associated with create operation of this database. 778 :type recovery_services_recovery_point_id: str 779 :param long_term_retention_backup_resource_id: The resource identifier of the long term 780 retention backup associated with create operation of this database. 781 :type long_term_retention_backup_resource_id: str 782 :param recoverable_database_id: The resource identifier of the recoverable database associated 783 with create operation of this database. 784 :type recoverable_database_id: str 785 :param restorable_dropped_database_id: The resource identifier of the restorable dropped 786 database associated with create operation of this database. 787 :type restorable_dropped_database_id: str 788 :param catalog_collation: Collation of the metadata catalog. Possible values include: 789 "DATABASE_DEFAULT", "SQL_Latin1_General_CP1_CI_AS". 790 :type catalog_collation: str or ~azure.mgmt.sql.models.CatalogCollationType 791 :param zone_redundant: Whether or not this database is zone redundant, which means the replicas 792 of this database will be spread across multiple availability zones. 793 :type zone_redundant: bool 794 :param license_type: The license type to apply for this database. ``LicenseIncluded`` if you 795 need a license, or ``BasePrice`` if you have a license and are eligible for the Azure Hybrid 796 Benefit. Possible values include: "LicenseIncluded", "BasePrice". 797 :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType 798 :ivar max_log_size_bytes: The max log size for this database. 799 :vartype max_log_size_bytes: long 800 :ivar earliest_restore_date: This records the earliest start date and time that restore is 801 available for this database (ISO8601 format). 802 :vartype earliest_restore_date: ~datetime.datetime 803 :param read_scale: The state of read-only routing. If enabled, connections that have 804 application intent set to readonly in their connection string may be routed to a readonly 805 secondary replica in the same region. Possible values include: "Enabled", "Disabled". 806 :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale 807 :param high_availability_replica_count: The number of secondary replicas associated with the 808 database that are used to provide high availability. 809 :type high_availability_replica_count: int 810 :param secondary_type: The secondary type of the database if it is a secondary. Valid values 811 are Geo and Named. Possible values include: "Geo", "Named". 812 :type secondary_type: str or ~azure.mgmt.sql.models.SecondaryType 813 :ivar current_sku: The name and tier of the SKU. 814 :vartype current_sku: ~azure.mgmt.sql.models.Sku 815 :param auto_pause_delay: Time in minutes after which database is automatically paused. A value 816 of -1 means that automatic pause is disabled. 817 :type auto_pause_delay: int 818 :ivar current_backup_storage_redundancy: The storage account type used to store backups for 819 this database. Possible values include: "Geo", "Local", "Zone". 820 :vartype current_backup_storage_redundancy: str or 821 ~azure.mgmt.sql.models.CurrentBackupStorageRedundancy 822 :param requested_backup_storage_redundancy: The storage account type to be used to store 823 backups for this database. Possible values include: "Geo", "Local", "Zone". 824 :type requested_backup_storage_redundancy: str or 825 ~azure.mgmt.sql.models.RequestedBackupStorageRedundancy 826 :param min_capacity: Minimal capacity that database will always have allocated, if not paused. 827 :type min_capacity: float 828 :ivar paused_date: The date when database was paused by user configuration or action(ISO8601 829 format). Null if the database is ready. 830 :vartype paused_date: ~datetime.datetime 831 :ivar resumed_date: The date when database was resumed by user action or database login 832 (ISO8601 format). Null if the database is paused. 833 :vartype resumed_date: ~datetime.datetime 834 :param maintenance_configuration_id: Maintenance configuration id assigned to the database. 835 This configuration defines the period when the maintenance updates will occur. 836 :type maintenance_configuration_id: str 837 :param is_ledger_on: Whether or not this database is a ledger database, which means all tables 838 in the database are ledger tables. Note: the value of this property cannot be changed after the 839 database has been created. 840 :type is_ledger_on: bool 841 :ivar is_infra_encryption_enabled: Infra encryption is enabled for this database. 842 :vartype is_infra_encryption_enabled: bool 843 """ 844 845 _validation = { 846 'id': {'readonly': True}, 847 'name': {'readonly': True}, 848 'type': {'readonly': True}, 849 'location': {'required': True}, 850 'kind': {'readonly': True}, 851 'managed_by': {'readonly': True}, 852 'status': {'readonly': True}, 853 'database_id': {'readonly': True}, 854 'creation_date': {'readonly': True}, 855 'current_service_objective_name': {'readonly': True}, 856 'requested_service_objective_name': {'readonly': True}, 857 'default_secondary_location': {'readonly': True}, 858 'failover_group_id': {'readonly': True}, 859 'max_log_size_bytes': {'readonly': True}, 860 'earliest_restore_date': {'readonly': True}, 861 'current_sku': {'readonly': True}, 862 'current_backup_storage_redundancy': {'readonly': True}, 863 'paused_date': {'readonly': True}, 864 'resumed_date': {'readonly': True}, 865 'is_infra_encryption_enabled': {'readonly': True}, 866 } 867 868 _attribute_map = { 869 'id': {'key': 'id', 'type': 'str'}, 870 'name': {'key': 'name', 'type': 'str'}, 871 'type': {'key': 'type', 'type': 'str'}, 872 'location': {'key': 'location', 'type': 'str'}, 873 'tags': {'key': 'tags', 'type': '{str}'}, 874 'sku': {'key': 'sku', 'type': 'Sku'}, 875 'kind': {'key': 'kind', 'type': 'str'}, 876 'managed_by': {'key': 'managedBy', 'type': 'str'}, 877 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 878 'collation': {'key': 'properties.collation', 'type': 'str'}, 879 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, 880 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, 881 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, 882 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, 883 'status': {'key': 'properties.status', 'type': 'str'}, 884 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, 885 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 886 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, 887 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, 888 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, 889 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, 890 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, 891 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, 892 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, 893 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, 894 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, 895 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, 896 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, 897 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, 898 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, 899 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, 900 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, 901 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, 902 'high_availability_replica_count': {'key': 'properties.highAvailabilityReplicaCount', 'type': 'int'}, 903 'secondary_type': {'key': 'properties.secondaryType', 'type': 'str'}, 904 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, 905 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, 906 'current_backup_storage_redundancy': {'key': 'properties.currentBackupStorageRedundancy', 'type': 'str'}, 907 'requested_backup_storage_redundancy': {'key': 'properties.requestedBackupStorageRedundancy', 'type': 'str'}, 908 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, 909 'paused_date': {'key': 'properties.pausedDate', 'type': 'iso-8601'}, 910 'resumed_date': {'key': 'properties.resumedDate', 'type': 'iso-8601'}, 911 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 912 'is_ledger_on': {'key': 'properties.isLedgerOn', 'type': 'bool'}, 913 'is_infra_encryption_enabled': {'key': 'properties.isInfraEncryptionEnabled', 'type': 'bool'}, 914 } 915 916 def __init__( 917 self, 918 *, 919 location: str, 920 tags: Optional[Dict[str, str]] = None, 921 sku: Optional["Sku"] = None, 922 create_mode: Optional[Union[str, "CreateMode"]] = None, 923 collation: Optional[str] = None, 924 max_size_bytes: Optional[int] = None, 925 sample_name: Optional[Union[str, "SampleName"]] = None, 926 elastic_pool_id: Optional[str] = None, 927 source_database_id: Optional[str] = None, 928 restore_point_in_time: Optional[datetime.datetime] = None, 929 source_database_deletion_date: Optional[datetime.datetime] = None, 930 recovery_services_recovery_point_id: Optional[str] = None, 931 long_term_retention_backup_resource_id: Optional[str] = None, 932 recoverable_database_id: Optional[str] = None, 933 restorable_dropped_database_id: Optional[str] = None, 934 catalog_collation: Optional[Union[str, "CatalogCollationType"]] = None, 935 zone_redundant: Optional[bool] = None, 936 license_type: Optional[Union[str, "DatabaseLicenseType"]] = None, 937 read_scale: Optional[Union[str, "DatabaseReadScale"]] = None, 938 high_availability_replica_count: Optional[int] = None, 939 secondary_type: Optional[Union[str, "SecondaryType"]] = None, 940 auto_pause_delay: Optional[int] = None, 941 requested_backup_storage_redundancy: Optional[Union[str, "RequestedBackupStorageRedundancy"]] = None, 942 min_capacity: Optional[float] = None, 943 maintenance_configuration_id: Optional[str] = None, 944 is_ledger_on: Optional[bool] = None, 945 **kwargs 946 ): 947 super(Database, self).__init__(location=location, tags=tags, **kwargs) 948 self.sku = sku 949 self.kind = None 950 self.managed_by = None 951 self.create_mode = create_mode 952 self.collation = collation 953 self.max_size_bytes = max_size_bytes 954 self.sample_name = sample_name 955 self.elastic_pool_id = elastic_pool_id 956 self.source_database_id = source_database_id 957 self.status = None 958 self.database_id = None 959 self.creation_date = None 960 self.current_service_objective_name = None 961 self.requested_service_objective_name = None 962 self.default_secondary_location = None 963 self.failover_group_id = None 964 self.restore_point_in_time = restore_point_in_time 965 self.source_database_deletion_date = source_database_deletion_date 966 self.recovery_services_recovery_point_id = recovery_services_recovery_point_id 967 self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id 968 self.recoverable_database_id = recoverable_database_id 969 self.restorable_dropped_database_id = restorable_dropped_database_id 970 self.catalog_collation = catalog_collation 971 self.zone_redundant = zone_redundant 972 self.license_type = license_type 973 self.max_log_size_bytes = None 974 self.earliest_restore_date = None 975 self.read_scale = read_scale 976 self.high_availability_replica_count = high_availability_replica_count 977 self.secondary_type = secondary_type 978 self.current_sku = None 979 self.auto_pause_delay = auto_pause_delay 980 self.current_backup_storage_redundancy = None 981 self.requested_backup_storage_redundancy = requested_backup_storage_redundancy 982 self.min_capacity = min_capacity 983 self.paused_date = None 984 self.resumed_date = None 985 self.maintenance_configuration_id = maintenance_configuration_id 986 self.is_ledger_on = is_ledger_on 987 self.is_infra_encryption_enabled = None 988 989 990class DatabaseAutomaticTuning(ProxyResource): 991 """Database-level Automatic Tuning. 992 993 Variables are only populated by the server, and will be ignored when sending a request. 994 995 :ivar id: Resource ID. 996 :vartype id: str 997 :ivar name: Resource name. 998 :vartype name: str 999 :ivar type: Resource type. 1000 :vartype type: str 1001 :param desired_state: Automatic tuning desired state. Possible values include: "Inherit", 1002 "Custom", "Auto", "Unspecified". 1003 :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode 1004 :ivar actual_state: Automatic tuning actual state. Possible values include: "Inherit", 1005 "Custom", "Auto", "Unspecified". 1006 :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode 1007 :param options: Automatic tuning options definition. 1008 :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] 1009 """ 1010 1011 _validation = { 1012 'id': {'readonly': True}, 1013 'name': {'readonly': True}, 1014 'type': {'readonly': True}, 1015 'actual_state': {'readonly': True}, 1016 } 1017 1018 _attribute_map = { 1019 'id': {'key': 'id', 'type': 'str'}, 1020 'name': {'key': 'name', 'type': 'str'}, 1021 'type': {'key': 'type', 'type': 'str'}, 1022 'desired_state': {'key': 'properties.desiredState', 'type': 'str'}, 1023 'actual_state': {'key': 'properties.actualState', 'type': 'str'}, 1024 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, 1025 } 1026 1027 def __init__( 1028 self, 1029 *, 1030 desired_state: Optional[Union[str, "AutomaticTuningMode"]] = None, 1031 options: Optional[Dict[str, "AutomaticTuningOptions"]] = None, 1032 **kwargs 1033 ): 1034 super(DatabaseAutomaticTuning, self).__init__(**kwargs) 1035 self.desired_state = desired_state 1036 self.actual_state = None 1037 self.options = options 1038 1039 1040class DatabaseBlobAuditingPolicy(ProxyResource): 1041 """A database blob auditing policy. 1042 1043 Variables are only populated by the server, and will be ignored when sending a request. 1044 1045 :ivar id: Resource ID. 1046 :vartype id: str 1047 :ivar name: Resource name. 1048 :vartype name: str 1049 :ivar type: Resource type. 1050 :vartype type: str 1051 :ivar kind: Resource kind. 1052 :vartype kind: str 1053 :param retention_days: Specifies the number of days to keep in the audit logs in the storage 1054 account. 1055 :type retention_days: int 1056 :param audit_actions_and_groups: Specifies the Actions-Groups and Actions to audit. 1057 1058 The recommended set of action groups to use is the following combination - this will audit all 1059 the queries and stored procedures executed against the database, as well as successful and 1060 failed logins: 1061 1062 BATCH_COMPLETED_GROUP, 1063 SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, 1064 FAILED_DATABASE_AUTHENTICATION_GROUP. 1065 1066 This above combination is also the set that is configured by default when enabling auditing 1067 from the Azure portal. 1068 1069 The supported action groups to audit are (note: choose only specific groups that cover your 1070 auditing needs. Using unnecessary groups could lead to very large quantities of audit records): 1071 1072 APPLICATION_ROLE_CHANGE_PASSWORD_GROUP 1073 BACKUP_RESTORE_GROUP 1074 DATABASE_LOGOUT_GROUP 1075 DATABASE_OBJECT_CHANGE_GROUP 1076 DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP 1077 DATABASE_OBJECT_PERMISSION_CHANGE_GROUP 1078 DATABASE_OPERATION_GROUP 1079 DATABASE_PERMISSION_CHANGE_GROUP 1080 DATABASE_PRINCIPAL_CHANGE_GROUP 1081 DATABASE_PRINCIPAL_IMPERSONATION_GROUP 1082 DATABASE_ROLE_MEMBER_CHANGE_GROUP 1083 FAILED_DATABASE_AUTHENTICATION_GROUP 1084 SCHEMA_OBJECT_ACCESS_GROUP 1085 SCHEMA_OBJECT_CHANGE_GROUP 1086 SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP 1087 SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP 1088 SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP 1089 USER_CHANGE_PASSWORD_GROUP 1090 BATCH_STARTED_GROUP 1091 BATCH_COMPLETED_GROUP 1092 1093 These are groups that cover all sql statements and stored procedures executed against the 1094 database, and should not be used in combination with other groups as this will result in 1095 duplicate audit logs. 1096 1097 For more information, see `Database-Level Audit Action Groups 1098 <https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups>`_. 1099 1100 For Database auditing policy, specific Actions can also be specified (note that Actions cannot 1101 be specified for Server auditing policy). The supported actions to audit are: 1102 SELECT 1103 UPDATE 1104 INSERT 1105 DELETE 1106 EXECUTE 1107 RECEIVE 1108 REFERENCES 1109 1110 The general form for defining an action to be audited is: 1111 {action} ON {object} BY {principal} 1112 1113 Note that :code:`<object>` in the above format can refer to an object like a table, view, or 1114 stored procedure, or an entire database or schema. For the latter cases, the forms 1115 DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. 1116 1117 For example: 1118 SELECT on dbo.myTable by public 1119 SELECT on DATABASE::myDatabase by public 1120 SELECT on SCHEMA::mySchema by public 1121 1122 For more information, see `Database-Level Audit Actions 1123 <https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions>`_. 1124 :type audit_actions_and_groups: list[str] 1125 :param is_storage_secondary_key_in_use: Specifies whether storageAccountAccessKey value is the 1126 storage's secondary key. 1127 :type is_storage_secondary_key_in_use: bool 1128 :param is_azure_monitor_target_enabled: Specifies whether audit events are sent to Azure 1129 Monitor. 1130 In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 1131 'IsAzureMonitorTargetEnabled' as true. 1132 1133 When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' 1134 diagnostic logs category on the database should be also created. 1135 Note that for server level audit you should use the 'master' database as {databaseName}. 1136 1137 Diagnostic Settings URI format: 1138 PUT 1139 https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 1140 1141 For more information, see `Diagnostic Settings REST API 1142 <https://go.microsoft.com/fwlink/?linkid=2033207>`_ 1143 or `Diagnostic Settings PowerShell <https://go.microsoft.com/fwlink/?linkid=2033043>`_. 1144 :type is_azure_monitor_target_enabled: bool 1145 :param queue_delay_ms: Specifies the amount of time in milliseconds that can elapse before 1146 audit actions are forced to be processed. 1147 The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. 1148 :type queue_delay_ms: int 1149 :param state: Specifies the state of the audit. If state is Enabled, storageEndpoint or 1150 isAzureMonitorTargetEnabled are required. Possible values include: "Enabled", "Disabled". 1151 :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState 1152 :param storage_endpoint: Specifies the blob storage endpoint (e.g. 1153 https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or 1154 isAzureMonitorTargetEnabled is required. 1155 :type storage_endpoint: str 1156 :param storage_account_access_key: Specifies the identifier key of the auditing storage 1157 account. 1158 If state is Enabled and storageEndpoint is specified, not specifying the 1159 storageAccountAccessKey will use SQL server system-assigned managed identity to access the 1160 storage. 1161 Prerequisites for using managed identity authentication: 1162 1163 1164 #. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 1165 #. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data 1166 Contributor' RBAC role to the server identity. 1167 For more information, see `Auditing to storage using Managed Identity authentication 1168 <https://go.microsoft.com/fwlink/?linkid=2114355>`_. 1169 :type storage_account_access_key: str 1170 :param storage_account_subscription_id: Specifies the blob storage subscription Id. 1171 :type storage_account_subscription_id: str 1172 """ 1173 1174 _validation = { 1175 'id': {'readonly': True}, 1176 'name': {'readonly': True}, 1177 'type': {'readonly': True}, 1178 'kind': {'readonly': True}, 1179 } 1180 1181 _attribute_map = { 1182 'id': {'key': 'id', 'type': 'str'}, 1183 'name': {'key': 'name', 'type': 'str'}, 1184 'type': {'key': 'type', 'type': 'str'}, 1185 'kind': {'key': 'kind', 'type': 'str'}, 1186 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 1187 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, 1188 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 1189 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, 1190 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, 1191 'state': {'key': 'properties.state', 'type': 'str'}, 1192 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, 1193 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 1194 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 1195 } 1196 1197 def __init__( 1198 self, 1199 *, 1200 retention_days: Optional[int] = None, 1201 audit_actions_and_groups: Optional[List[str]] = None, 1202 is_storage_secondary_key_in_use: Optional[bool] = None, 1203 is_azure_monitor_target_enabled: Optional[bool] = None, 1204 queue_delay_ms: Optional[int] = None, 1205 state: Optional[Union[str, "BlobAuditingPolicyState"]] = None, 1206 storage_endpoint: Optional[str] = None, 1207 storage_account_access_key: Optional[str] = None, 1208 storage_account_subscription_id: Optional[str] = None, 1209 **kwargs 1210 ): 1211 super(DatabaseBlobAuditingPolicy, self).__init__(**kwargs) 1212 self.kind = None 1213 self.retention_days = retention_days 1214 self.audit_actions_and_groups = audit_actions_and_groups 1215 self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use 1216 self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled 1217 self.queue_delay_ms = queue_delay_ms 1218 self.state = state 1219 self.storage_endpoint = storage_endpoint 1220 self.storage_account_access_key = storage_account_access_key 1221 self.storage_account_subscription_id = storage_account_subscription_id 1222 1223 1224class DatabaseBlobAuditingPolicyListResult(msrest.serialization.Model): 1225 """A list of database auditing settings. 1226 1227 Variables are only populated by the server, and will be ignored when sending a request. 1228 1229 :ivar value: Array of results. 1230 :vartype value: list[~azure.mgmt.sql.models.DatabaseBlobAuditingPolicy] 1231 :ivar next_link: Link to retrieve next page of results. 1232 :vartype next_link: str 1233 """ 1234 1235 _validation = { 1236 'value': {'readonly': True}, 1237 'next_link': {'readonly': True}, 1238 } 1239 1240 _attribute_map = { 1241 'value': {'key': 'value', 'type': '[DatabaseBlobAuditingPolicy]'}, 1242 'next_link': {'key': 'nextLink', 'type': 'str'}, 1243 } 1244 1245 def __init__( 1246 self, 1247 **kwargs 1248 ): 1249 super(DatabaseBlobAuditingPolicyListResult, self).__init__(**kwargs) 1250 self.value = None 1251 self.next_link = None 1252 1253 1254class DatabaseColumn(ProxyResource): 1255 """A database column resource. 1256 1257 Variables are only populated by the server, and will be ignored when sending a request. 1258 1259 :ivar id: Resource ID. 1260 :vartype id: str 1261 :ivar name: Resource name. 1262 :vartype name: str 1263 :ivar type: Resource type. 1264 :vartype type: str 1265 :param column_type: The column data type. Possible values include: "image", "text", 1266 "uniqueidentifier", "date", "time", "datetime2", "datetimeoffset", "tinyint", "smallint", 1267 "int", "smalldatetime", "real", "money", "datetime", "float", "sql_variant", "ntext", "bit", 1268 "decimal", "numeric", "smallmoney", "bigint", "hierarchyid", "geometry", "geography", 1269 "varbinary", "varchar", "binary", "char", "timestamp", "nvarchar", "nchar", "xml", "sysname". 1270 :type column_type: str or ~azure.mgmt.sql.models.ColumnDataType 1271 :param temporal_type: The table temporal type. Possible values include: "NonTemporalTable", 1272 "HistoryTable", "SystemVersionedTemporalTable". 1273 :type temporal_type: str or ~azure.mgmt.sql.models.TableTemporalType 1274 :param memory_optimized: Whether or not the column belongs to a memory optimized table. 1275 :type memory_optimized: bool 1276 :param is_computed: Whether or not the column is computed. 1277 :type is_computed: bool 1278 """ 1279 1280 _validation = { 1281 'id': {'readonly': True}, 1282 'name': {'readonly': True}, 1283 'type': {'readonly': True}, 1284 } 1285 1286 _attribute_map = { 1287 'id': {'key': 'id', 'type': 'str'}, 1288 'name': {'key': 'name', 'type': 'str'}, 1289 'type': {'key': 'type', 'type': 'str'}, 1290 'column_type': {'key': 'properties.columnType', 'type': 'str'}, 1291 'temporal_type': {'key': 'properties.temporalType', 'type': 'str'}, 1292 'memory_optimized': {'key': 'properties.memoryOptimized', 'type': 'bool'}, 1293 'is_computed': {'key': 'properties.isComputed', 'type': 'bool'}, 1294 } 1295 1296 def __init__( 1297 self, 1298 *, 1299 column_type: Optional[Union[str, "ColumnDataType"]] = None, 1300 temporal_type: Optional[Union[str, "TableTemporalType"]] = None, 1301 memory_optimized: Optional[bool] = None, 1302 is_computed: Optional[bool] = None, 1303 **kwargs 1304 ): 1305 super(DatabaseColumn, self).__init__(**kwargs) 1306 self.column_type = column_type 1307 self.temporal_type = temporal_type 1308 self.memory_optimized = memory_optimized 1309 self.is_computed = is_computed 1310 1311 1312class DatabaseColumnListResult(msrest.serialization.Model): 1313 """A list of database columns. 1314 1315 Variables are only populated by the server, and will be ignored when sending a request. 1316 1317 :ivar value: Array of results. 1318 :vartype value: list[~azure.mgmt.sql.models.DatabaseColumn] 1319 :ivar next_link: Link to retrieve next page of results. 1320 :vartype next_link: str 1321 """ 1322 1323 _validation = { 1324 'value': {'readonly': True}, 1325 'next_link': {'readonly': True}, 1326 } 1327 1328 _attribute_map = { 1329 'value': {'key': 'value', 'type': '[DatabaseColumn]'}, 1330 'next_link': {'key': 'nextLink', 'type': 'str'}, 1331 } 1332 1333 def __init__( 1334 self, 1335 **kwargs 1336 ): 1337 super(DatabaseColumnListResult, self).__init__(**kwargs) 1338 self.value = None 1339 self.next_link = None 1340 1341 1342class DatabaseExtensions(ProxyResource): 1343 """An export managed database operation result resource. 1344 1345 Variables are only populated by the server, and will be ignored when sending a request. 1346 1347 :ivar id: Resource ID. 1348 :vartype id: str 1349 :ivar name: Resource name. 1350 :vartype name: str 1351 :ivar type: Resource type. 1352 :vartype type: str 1353 :param operation_mode: Operation Mode. Possible values include: "PolybaseImport". 1354 :type operation_mode: str or ~azure.mgmt.sql.models.OperationMode 1355 :param storage_key_type: Storage key type. Possible values include: "SharedAccessKey", 1356 "StorageAccessKey". 1357 :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType 1358 :param storage_key: Storage key. 1359 :type storage_key: str 1360 :param storage_uri: Storage Uri. 1361 :type storage_uri: str 1362 """ 1363 1364 _validation = { 1365 'id': {'readonly': True}, 1366 'name': {'readonly': True}, 1367 'type': {'readonly': True}, 1368 } 1369 1370 _attribute_map = { 1371 'id': {'key': 'id', 'type': 'str'}, 1372 'name': {'key': 'name', 'type': 'str'}, 1373 'type': {'key': 'type', 'type': 'str'}, 1374 'operation_mode': {'key': 'properties.operationMode', 'type': 'str'}, 1375 'storage_key_type': {'key': 'properties.storageKeyType', 'type': 'str'}, 1376 'storage_key': {'key': 'properties.storageKey', 'type': 'str'}, 1377 'storage_uri': {'key': 'properties.storageUri', 'type': 'str'}, 1378 } 1379 1380 def __init__( 1381 self, 1382 *, 1383 operation_mode: Optional[Union[str, "OperationMode"]] = None, 1384 storage_key_type: Optional[Union[str, "StorageKeyType"]] = None, 1385 storage_key: Optional[str] = None, 1386 storage_uri: Optional[str] = None, 1387 **kwargs 1388 ): 1389 super(DatabaseExtensions, self).__init__(**kwargs) 1390 self.operation_mode = operation_mode 1391 self.storage_key_type = storage_key_type 1392 self.storage_key = storage_key 1393 self.storage_uri = storage_uri 1394 1395 1396class DatabaseListResult(msrest.serialization.Model): 1397 """A list of databases. 1398 1399 Variables are only populated by the server, and will be ignored when sending a request. 1400 1401 :ivar value: Array of results. 1402 :vartype value: list[~azure.mgmt.sql.models.Database] 1403 :ivar next_link: Link to retrieve next page of results. 1404 :vartype next_link: str 1405 """ 1406 1407 _validation = { 1408 'value': {'readonly': True}, 1409 'next_link': {'readonly': True}, 1410 } 1411 1412 _attribute_map = { 1413 'value': {'key': 'value', 'type': '[Database]'}, 1414 'next_link': {'key': 'nextLink', 'type': 'str'}, 1415 } 1416 1417 def __init__( 1418 self, 1419 **kwargs 1420 ): 1421 super(DatabaseListResult, self).__init__(**kwargs) 1422 self.value = None 1423 self.next_link = None 1424 1425 1426class DatabaseOperation(ProxyResource): 1427 """A database operation. 1428 1429 Variables are only populated by the server, and will be ignored when sending a request. 1430 1431 :ivar id: Resource ID. 1432 :vartype id: str 1433 :ivar name: Resource name. 1434 :vartype name: str 1435 :ivar type: Resource type. 1436 :vartype type: str 1437 :ivar database_name: The name of the database the operation is being performed on. 1438 :vartype database_name: str 1439 :ivar operation: The name of operation. 1440 :vartype operation: str 1441 :ivar operation_friendly_name: The friendly name of operation. 1442 :vartype operation_friendly_name: str 1443 :ivar percent_complete: The percentage of the operation completed. 1444 :vartype percent_complete: int 1445 :ivar server_name: The name of the server. 1446 :vartype server_name: str 1447 :ivar start_time: The operation start time. 1448 :vartype start_time: ~datetime.datetime 1449 :ivar state: The operation state. Possible values include: "Pending", "InProgress", 1450 "Succeeded", "Failed", "CancelInProgress", "Cancelled". 1451 :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState 1452 :ivar error_code: The operation error code. 1453 :vartype error_code: int 1454 :ivar error_description: The operation error description. 1455 :vartype error_description: str 1456 :ivar error_severity: The operation error severity. 1457 :vartype error_severity: int 1458 :ivar is_user_error: Whether or not the error is a user error. 1459 :vartype is_user_error: bool 1460 :ivar estimated_completion_time: The estimated completion time of the operation. 1461 :vartype estimated_completion_time: ~datetime.datetime 1462 :ivar description: The operation description. 1463 :vartype description: str 1464 :ivar is_cancellable: Whether the operation can be cancelled. 1465 :vartype is_cancellable: bool 1466 """ 1467 1468 _validation = { 1469 'id': {'readonly': True}, 1470 'name': {'readonly': True}, 1471 'type': {'readonly': True}, 1472 'database_name': {'readonly': True}, 1473 'operation': {'readonly': True}, 1474 'operation_friendly_name': {'readonly': True}, 1475 'percent_complete': {'readonly': True}, 1476 'server_name': {'readonly': True}, 1477 'start_time': {'readonly': True}, 1478 'state': {'readonly': True}, 1479 'error_code': {'readonly': True}, 1480 'error_description': {'readonly': True}, 1481 'error_severity': {'readonly': True}, 1482 'is_user_error': {'readonly': True}, 1483 'estimated_completion_time': {'readonly': True}, 1484 'description': {'readonly': True}, 1485 'is_cancellable': {'readonly': True}, 1486 } 1487 1488 _attribute_map = { 1489 'id': {'key': 'id', 'type': 'str'}, 1490 'name': {'key': 'name', 'type': 'str'}, 1491 'type': {'key': 'type', 'type': 'str'}, 1492 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 1493 'operation': {'key': 'properties.operation', 'type': 'str'}, 1494 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, 1495 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, 1496 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 1497 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 1498 'state': {'key': 'properties.state', 'type': 'str'}, 1499 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, 1500 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, 1501 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, 1502 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, 1503 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, 1504 'description': {'key': 'properties.description', 'type': 'str'}, 1505 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, 1506 } 1507 1508 def __init__( 1509 self, 1510 **kwargs 1511 ): 1512 super(DatabaseOperation, self).__init__(**kwargs) 1513 self.database_name = None 1514 self.operation = None 1515 self.operation_friendly_name = None 1516 self.percent_complete = None 1517 self.server_name = None 1518 self.start_time = None 1519 self.state = None 1520 self.error_code = None 1521 self.error_description = None 1522 self.error_severity = None 1523 self.is_user_error = None 1524 self.estimated_completion_time = None 1525 self.description = None 1526 self.is_cancellable = None 1527 1528 1529class DatabaseOperationListResult(msrest.serialization.Model): 1530 """The response to a list database operations request. 1531 1532 Variables are only populated by the server, and will be ignored when sending a request. 1533 1534 :ivar value: Array of results. 1535 :vartype value: list[~azure.mgmt.sql.models.DatabaseOperation] 1536 :ivar next_link: Link to retrieve next page of results. 1537 :vartype next_link: str 1538 """ 1539 1540 _validation = { 1541 'value': {'readonly': True}, 1542 'next_link': {'readonly': True}, 1543 } 1544 1545 _attribute_map = { 1546 'value': {'key': 'value', 'type': '[DatabaseOperation]'}, 1547 'next_link': {'key': 'nextLink', 'type': 'str'}, 1548 } 1549 1550 def __init__( 1551 self, 1552 **kwargs 1553 ): 1554 super(DatabaseOperationListResult, self).__init__(**kwargs) 1555 self.value = None 1556 self.next_link = None 1557 1558 1559class DatabaseSchema(ProxyResource): 1560 """A database schema resource. 1561 1562 Variables are only populated by the server, and will be ignored when sending a request. 1563 1564 :ivar id: Resource ID. 1565 :vartype id: str 1566 :ivar name: Resource name. 1567 :vartype name: str 1568 :ivar type: Resource type. 1569 :vartype type: str 1570 """ 1571 1572 _validation = { 1573 'id': {'readonly': True}, 1574 'name': {'readonly': True}, 1575 'type': {'readonly': True}, 1576 } 1577 1578 _attribute_map = { 1579 'id': {'key': 'id', 'type': 'str'}, 1580 'name': {'key': 'name', 'type': 'str'}, 1581 'type': {'key': 'type', 'type': 'str'}, 1582 } 1583 1584 def __init__( 1585 self, 1586 **kwargs 1587 ): 1588 super(DatabaseSchema, self).__init__(**kwargs) 1589 1590 1591class DatabaseSchemaListResult(msrest.serialization.Model): 1592 """A list of database schemas. 1593 1594 Variables are only populated by the server, and will be ignored when sending a request. 1595 1596 :ivar value: Array of results. 1597 :vartype value: list[~azure.mgmt.sql.models.DatabaseSchema] 1598 :ivar next_link: Link to retrieve next page of results. 1599 :vartype next_link: str 1600 """ 1601 1602 _validation = { 1603 'value': {'readonly': True}, 1604 'next_link': {'readonly': True}, 1605 } 1606 1607 _attribute_map = { 1608 'value': {'key': 'value', 'type': '[DatabaseSchema]'}, 1609 'next_link': {'key': 'nextLink', 'type': 'str'}, 1610 } 1611 1612 def __init__( 1613 self, 1614 **kwargs 1615 ): 1616 super(DatabaseSchemaListResult, self).__init__(**kwargs) 1617 self.value = None 1618 self.next_link = None 1619 1620 1621class DatabaseSecurityAlertListResult(msrest.serialization.Model): 1622 """A list of the database's security alert policies. 1623 1624 Variables are only populated by the server, and will be ignored when sending a request. 1625 1626 :ivar value: Array of results. 1627 :vartype value: list[~azure.mgmt.sql.models.DatabaseSecurityAlertPolicy] 1628 :ivar next_link: Link to retrieve next page of results. 1629 :vartype next_link: str 1630 """ 1631 1632 _validation = { 1633 'value': {'readonly': True}, 1634 'next_link': {'readonly': True}, 1635 } 1636 1637 _attribute_map = { 1638 'value': {'key': 'value', 'type': '[DatabaseSecurityAlertPolicy]'}, 1639 'next_link': {'key': 'nextLink', 'type': 'str'}, 1640 } 1641 1642 def __init__( 1643 self, 1644 **kwargs 1645 ): 1646 super(DatabaseSecurityAlertListResult, self).__init__(**kwargs) 1647 self.value = None 1648 self.next_link = None 1649 1650 1651class DatabaseSecurityAlertPolicy(ProxyResource): 1652 """A database security alert policy. 1653 1654 Variables are only populated by the server, and will be ignored when sending a request. 1655 1656 :ivar id: Resource ID. 1657 :vartype id: str 1658 :ivar name: Resource name. 1659 :vartype name: str 1660 :ivar type: Resource type. 1661 :vartype type: str 1662 :ivar system_data: SystemData of SecurityAlertPolicyResource. 1663 :vartype system_data: ~azure.mgmt.sql.models.SystemData 1664 :param state: Specifies the state of the policy, whether it is enabled or disabled or a policy 1665 has not been applied yet on the specific database. Possible values include: "Enabled", 1666 "Disabled". 1667 :type state: str or ~azure.mgmt.sql.models.SecurityAlertsPolicyState 1668 :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: 1669 Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, 1670 Brute_Force. 1671 :type disabled_alerts: list[str] 1672 :param email_addresses: Specifies an array of e-mail addresses to which the alert is sent. 1673 :type email_addresses: list[str] 1674 :param email_account_admins: Specifies that the alert is sent to the account administrators. 1675 :type email_account_admins: bool 1676 :param storage_endpoint: Specifies the blob storage endpoint (e.g. 1677 https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection 1678 audit logs. 1679 :type storage_endpoint: str 1680 :param storage_account_access_key: Specifies the identifier key of the Threat Detection audit 1681 storage account. 1682 :type storage_account_access_key: str 1683 :param retention_days: Specifies the number of days to keep in the Threat Detection audit logs. 1684 :type retention_days: int 1685 :ivar creation_time: Specifies the UTC creation time of the policy. 1686 :vartype creation_time: ~datetime.datetime 1687 """ 1688 1689 _validation = { 1690 'id': {'readonly': True}, 1691 'name': {'readonly': True}, 1692 'type': {'readonly': True}, 1693 'system_data': {'readonly': True}, 1694 'creation_time': {'readonly': True}, 1695 } 1696 1697 _attribute_map = { 1698 'id': {'key': 'id', 'type': 'str'}, 1699 'name': {'key': 'name', 'type': 'str'}, 1700 'type': {'key': 'type', 'type': 'str'}, 1701 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 1702 'state': {'key': 'properties.state', 'type': 'str'}, 1703 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, 1704 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, 1705 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, 1706 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, 1707 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 1708 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 1709 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 1710 } 1711 1712 def __init__( 1713 self, 1714 *, 1715 state: Optional[Union[str, "SecurityAlertsPolicyState"]] = None, 1716 disabled_alerts: Optional[List[str]] = None, 1717 email_addresses: Optional[List[str]] = None, 1718 email_account_admins: Optional[bool] = None, 1719 storage_endpoint: Optional[str] = None, 1720 storage_account_access_key: Optional[str] = None, 1721 retention_days: Optional[int] = None, 1722 **kwargs 1723 ): 1724 super(DatabaseSecurityAlertPolicy, self).__init__(**kwargs) 1725 self.system_data = None 1726 self.state = state 1727 self.disabled_alerts = disabled_alerts 1728 self.email_addresses = email_addresses 1729 self.email_account_admins = email_account_admins 1730 self.storage_endpoint = storage_endpoint 1731 self.storage_account_access_key = storage_account_access_key 1732 self.retention_days = retention_days 1733 self.creation_time = None 1734 1735 1736class DatabaseTable(ProxyResource): 1737 """A database table resource. 1738 1739 Variables are only populated by the server, and will be ignored when sending a request. 1740 1741 :ivar id: Resource ID. 1742 :vartype id: str 1743 :ivar name: Resource name. 1744 :vartype name: str 1745 :ivar type: Resource type. 1746 :vartype type: str 1747 :param temporal_type: The table temporal type. Possible values include: "NonTemporalTable", 1748 "HistoryTable", "SystemVersionedTemporalTable". 1749 :type temporal_type: str or ~azure.mgmt.sql.models.TableTemporalType 1750 :param memory_optimized: Whether or not the table is memory optimized. 1751 :type memory_optimized: bool 1752 """ 1753 1754 _validation = { 1755 'id': {'readonly': True}, 1756 'name': {'readonly': True}, 1757 'type': {'readonly': True}, 1758 } 1759 1760 _attribute_map = { 1761 'id': {'key': 'id', 'type': 'str'}, 1762 'name': {'key': 'name', 'type': 'str'}, 1763 'type': {'key': 'type', 'type': 'str'}, 1764 'temporal_type': {'key': 'properties.temporalType', 'type': 'str'}, 1765 'memory_optimized': {'key': 'properties.memoryOptimized', 'type': 'bool'}, 1766 } 1767 1768 def __init__( 1769 self, 1770 *, 1771 temporal_type: Optional[Union[str, "TableTemporalType"]] = None, 1772 memory_optimized: Optional[bool] = None, 1773 **kwargs 1774 ): 1775 super(DatabaseTable, self).__init__(**kwargs) 1776 self.temporal_type = temporal_type 1777 self.memory_optimized = memory_optimized 1778 1779 1780class DatabaseTableListResult(msrest.serialization.Model): 1781 """A list of database tables. 1782 1783 Variables are only populated by the server, and will be ignored when sending a request. 1784 1785 :ivar value: Array of results. 1786 :vartype value: list[~azure.mgmt.sql.models.DatabaseTable] 1787 :ivar next_link: Link to retrieve next page of results. 1788 :vartype next_link: str 1789 """ 1790 1791 _validation = { 1792 'value': {'readonly': True}, 1793 'next_link': {'readonly': True}, 1794 } 1795 1796 _attribute_map = { 1797 'value': {'key': 'value', 'type': '[DatabaseTable]'}, 1798 'next_link': {'key': 'nextLink', 'type': 'str'}, 1799 } 1800 1801 def __init__( 1802 self, 1803 **kwargs 1804 ): 1805 super(DatabaseTableListResult, self).__init__(**kwargs) 1806 self.value = None 1807 self.next_link = None 1808 1809 1810class DatabaseUpdate(msrest.serialization.Model): 1811 """A database resource. 1812 1813 Variables are only populated by the server, and will be ignored when sending a request. 1814 1815 :param sku: The name and tier of the SKU. 1816 :type sku: ~azure.mgmt.sql.models.Sku 1817 :param tags: A set of tags. Resource tags. 1818 :type tags: dict[str, str] 1819 :param create_mode: Specifies the mode of database creation. 1820 1821 Default: regular database creation. 1822 1823 Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified 1824 as the resource ID of the source database. 1825 1826 Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId 1827 must be specified as the resource ID of the existing primary database. 1828 1829 PointInTimeRestore: Creates a database by restoring a point in time backup of an existing 1830 database. sourceDatabaseId must be specified as the resource ID of the existing database, and 1831 restorePointInTime must be specified. 1832 1833 Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be 1834 specified as the recoverable database resource ID to restore. 1835 1836 Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must 1837 be specified. If sourceDatabaseId is the database's original resource ID, then 1838 sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable 1839 dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may 1840 also be specified to restore from an earlier point in time. 1841 1842 RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention 1843 vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource 1844 ID. 1845 1846 Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse 1847 edition. Possible values include: "Default", "Copy", "Secondary", "PointInTimeRestore", 1848 "Restore", "Recovery", "RestoreExternalBackup", "RestoreExternalBackupSecondary", 1849 "RestoreLongTermRetentionBackup", "OnlineSecondary". 1850 :type create_mode: str or ~azure.mgmt.sql.models.CreateMode 1851 :param collation: The collation of the database. 1852 :type collation: str 1853 :param max_size_bytes: The max size of the database expressed in bytes. 1854 :type max_size_bytes: long 1855 :param sample_name: The name of the sample schema to apply when creating this database. 1856 Possible values include: "AdventureWorksLT", "WideWorldImportersStd", "WideWorldImportersFull". 1857 :type sample_name: str or ~azure.mgmt.sql.models.SampleName 1858 :param elastic_pool_id: The resource identifier of the elastic pool containing this database. 1859 :type elastic_pool_id: str 1860 :param source_database_id: The resource identifier of the source database associated with 1861 create operation of this database. 1862 :type source_database_id: str 1863 :ivar status: The status of the database. Possible values include: "Online", "Restoring", 1864 "RecoveryPending", "Recovering", "Suspect", "Offline", "Standby", "Shutdown", "EmergencyMode", 1865 "AutoClosed", "Copying", "Creating", "Inaccessible", "OfflineSecondary", "Pausing", "Paused", 1866 "Resuming", "Scaling", "OfflineChangingDwPerformanceTiers", "OnlineChangingDwPerformanceTiers", 1867 "Disabled". 1868 :vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus 1869 :ivar database_id: The ID of the database. 1870 :vartype database_id: str 1871 :ivar creation_date: The creation date of the database (ISO8601 format). 1872 :vartype creation_date: ~datetime.datetime 1873 :ivar current_service_objective_name: The current service level objective name of the database. 1874 :vartype current_service_objective_name: str 1875 :ivar requested_service_objective_name: The requested service level objective name of the 1876 database. 1877 :vartype requested_service_objective_name: str 1878 :ivar default_secondary_location: The default secondary region for this database. 1879 :vartype default_secondary_location: str 1880 :ivar failover_group_id: Failover Group resource identifier that this database belongs to. 1881 :vartype failover_group_id: str 1882 :param restore_point_in_time: Specifies the point in time (ISO8601 format) of the source 1883 database that will be restored to create the new database. 1884 :type restore_point_in_time: ~datetime.datetime 1885 :param source_database_deletion_date: Specifies the time that the database was deleted. 1886 :type source_database_deletion_date: ~datetime.datetime 1887 :param recovery_services_recovery_point_id: The resource identifier of the recovery point 1888 associated with create operation of this database. 1889 :type recovery_services_recovery_point_id: str 1890 :param long_term_retention_backup_resource_id: The resource identifier of the long term 1891 retention backup associated with create operation of this database. 1892 :type long_term_retention_backup_resource_id: str 1893 :param recoverable_database_id: The resource identifier of the recoverable database associated 1894 with create operation of this database. 1895 :type recoverable_database_id: str 1896 :param restorable_dropped_database_id: The resource identifier of the restorable dropped 1897 database associated with create operation of this database. 1898 :type restorable_dropped_database_id: str 1899 :param catalog_collation: Collation of the metadata catalog. Possible values include: 1900 "DATABASE_DEFAULT", "SQL_Latin1_General_CP1_CI_AS". 1901 :type catalog_collation: str or ~azure.mgmt.sql.models.CatalogCollationType 1902 :param zone_redundant: Whether or not this database is zone redundant, which means the replicas 1903 of this database will be spread across multiple availability zones. 1904 :type zone_redundant: bool 1905 :param license_type: The license type to apply for this database. ``LicenseIncluded`` if you 1906 need a license, or ``BasePrice`` if you have a license and are eligible for the Azure Hybrid 1907 Benefit. Possible values include: "LicenseIncluded", "BasePrice". 1908 :type license_type: str or ~azure.mgmt.sql.models.DatabaseLicenseType 1909 :ivar max_log_size_bytes: The max log size for this database. 1910 :vartype max_log_size_bytes: long 1911 :ivar earliest_restore_date: This records the earliest start date and time that restore is 1912 available for this database (ISO8601 format). 1913 :vartype earliest_restore_date: ~datetime.datetime 1914 :param read_scale: The state of read-only routing. If enabled, connections that have 1915 application intent set to readonly in their connection string may be routed to a readonly 1916 secondary replica in the same region. Possible values include: "Enabled", "Disabled". 1917 :type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale 1918 :param high_availability_replica_count: The number of secondary replicas associated with the 1919 database that are used to provide high availability. 1920 :type high_availability_replica_count: int 1921 :param secondary_type: The secondary type of the database if it is a secondary. Valid values 1922 are Geo and Named. Possible values include: "Geo", "Named". 1923 :type secondary_type: str or ~azure.mgmt.sql.models.SecondaryType 1924 :ivar current_sku: The name and tier of the SKU. 1925 :vartype current_sku: ~azure.mgmt.sql.models.Sku 1926 :param auto_pause_delay: Time in minutes after which database is automatically paused. A value 1927 of -1 means that automatic pause is disabled. 1928 :type auto_pause_delay: int 1929 :ivar current_backup_storage_redundancy: The storage account type used to store backups for 1930 this database. Possible values include: "Geo", "Local", "Zone". 1931 :vartype current_backup_storage_redundancy: str or 1932 ~azure.mgmt.sql.models.CurrentBackupStorageRedundancy 1933 :param requested_backup_storage_redundancy: The storage account type to be used to store 1934 backups for this database. Possible values include: "Geo", "Local", "Zone". 1935 :type requested_backup_storage_redundancy: str or 1936 ~azure.mgmt.sql.models.RequestedBackupStorageRedundancy 1937 :param min_capacity: Minimal capacity that database will always have allocated, if not paused. 1938 :type min_capacity: float 1939 :ivar paused_date: The date when database was paused by user configuration or action(ISO8601 1940 format). Null if the database is ready. 1941 :vartype paused_date: ~datetime.datetime 1942 :ivar resumed_date: The date when database was resumed by user action or database login 1943 (ISO8601 format). Null if the database is paused. 1944 :vartype resumed_date: ~datetime.datetime 1945 :param maintenance_configuration_id: Maintenance configuration id assigned to the database. 1946 This configuration defines the period when the maintenance updates will occur. 1947 :type maintenance_configuration_id: str 1948 :param is_ledger_on: Whether or not this database is a ledger database, which means all tables 1949 in the database are ledger tables. Note: the value of this property cannot be changed after the 1950 database has been created. 1951 :type is_ledger_on: bool 1952 :ivar is_infra_encryption_enabled: Infra encryption is enabled for this database. 1953 :vartype is_infra_encryption_enabled: bool 1954 """ 1955 1956 _validation = { 1957 'status': {'readonly': True}, 1958 'database_id': {'readonly': True}, 1959 'creation_date': {'readonly': True}, 1960 'current_service_objective_name': {'readonly': True}, 1961 'requested_service_objective_name': {'readonly': True}, 1962 'default_secondary_location': {'readonly': True}, 1963 'failover_group_id': {'readonly': True}, 1964 'max_log_size_bytes': {'readonly': True}, 1965 'earliest_restore_date': {'readonly': True}, 1966 'current_sku': {'readonly': True}, 1967 'current_backup_storage_redundancy': {'readonly': True}, 1968 'paused_date': {'readonly': True}, 1969 'resumed_date': {'readonly': True}, 1970 'is_infra_encryption_enabled': {'readonly': True}, 1971 } 1972 1973 _attribute_map = { 1974 'sku': {'key': 'sku', 'type': 'Sku'}, 1975 'tags': {'key': 'tags', 'type': '{str}'}, 1976 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 1977 'collation': {'key': 'properties.collation', 'type': 'str'}, 1978 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, 1979 'sample_name': {'key': 'properties.sampleName', 'type': 'str'}, 1980 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, 1981 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, 1982 'status': {'key': 'properties.status', 'type': 'str'}, 1983 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, 1984 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 1985 'current_service_objective_name': {'key': 'properties.currentServiceObjectiveName', 'type': 'str'}, 1986 'requested_service_objective_name': {'key': 'properties.requestedServiceObjectiveName', 'type': 'str'}, 1987 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, 1988 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, 1989 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, 1990 'source_database_deletion_date': {'key': 'properties.sourceDatabaseDeletionDate', 'type': 'iso-8601'}, 1991 'recovery_services_recovery_point_id': {'key': 'properties.recoveryServicesRecoveryPointId', 'type': 'str'}, 1992 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, 1993 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, 1994 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, 1995 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, 1996 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, 1997 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, 1998 'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'}, 1999 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, 2000 'read_scale': {'key': 'properties.readScale', 'type': 'str'}, 2001 'high_availability_replica_count': {'key': 'properties.highAvailabilityReplicaCount', 'type': 'int'}, 2002 'secondary_type': {'key': 'properties.secondaryType', 'type': 'str'}, 2003 'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'}, 2004 'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'}, 2005 'current_backup_storage_redundancy': {'key': 'properties.currentBackupStorageRedundancy', 'type': 'str'}, 2006 'requested_backup_storage_redundancy': {'key': 'properties.requestedBackupStorageRedundancy', 'type': 'str'}, 2007 'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'}, 2008 'paused_date': {'key': 'properties.pausedDate', 'type': 'iso-8601'}, 2009 'resumed_date': {'key': 'properties.resumedDate', 'type': 'iso-8601'}, 2010 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 2011 'is_ledger_on': {'key': 'properties.isLedgerOn', 'type': 'bool'}, 2012 'is_infra_encryption_enabled': {'key': 'properties.isInfraEncryptionEnabled', 'type': 'bool'}, 2013 } 2014 2015 def __init__( 2016 self, 2017 *, 2018 sku: Optional["Sku"] = None, 2019 tags: Optional[Dict[str, str]] = None, 2020 create_mode: Optional[Union[str, "CreateMode"]] = None, 2021 collation: Optional[str] = None, 2022 max_size_bytes: Optional[int] = None, 2023 sample_name: Optional[Union[str, "SampleName"]] = None, 2024 elastic_pool_id: Optional[str] = None, 2025 source_database_id: Optional[str] = None, 2026 restore_point_in_time: Optional[datetime.datetime] = None, 2027 source_database_deletion_date: Optional[datetime.datetime] = None, 2028 recovery_services_recovery_point_id: Optional[str] = None, 2029 long_term_retention_backup_resource_id: Optional[str] = None, 2030 recoverable_database_id: Optional[str] = None, 2031 restorable_dropped_database_id: Optional[str] = None, 2032 catalog_collation: Optional[Union[str, "CatalogCollationType"]] = None, 2033 zone_redundant: Optional[bool] = None, 2034 license_type: Optional[Union[str, "DatabaseLicenseType"]] = None, 2035 read_scale: Optional[Union[str, "DatabaseReadScale"]] = None, 2036 high_availability_replica_count: Optional[int] = None, 2037 secondary_type: Optional[Union[str, "SecondaryType"]] = None, 2038 auto_pause_delay: Optional[int] = None, 2039 requested_backup_storage_redundancy: Optional[Union[str, "RequestedBackupStorageRedundancy"]] = None, 2040 min_capacity: Optional[float] = None, 2041 maintenance_configuration_id: Optional[str] = None, 2042 is_ledger_on: Optional[bool] = None, 2043 **kwargs 2044 ): 2045 super(DatabaseUpdate, self).__init__(**kwargs) 2046 self.sku = sku 2047 self.tags = tags 2048 self.create_mode = create_mode 2049 self.collation = collation 2050 self.max_size_bytes = max_size_bytes 2051 self.sample_name = sample_name 2052 self.elastic_pool_id = elastic_pool_id 2053 self.source_database_id = source_database_id 2054 self.status = None 2055 self.database_id = None 2056 self.creation_date = None 2057 self.current_service_objective_name = None 2058 self.requested_service_objective_name = None 2059 self.default_secondary_location = None 2060 self.failover_group_id = None 2061 self.restore_point_in_time = restore_point_in_time 2062 self.source_database_deletion_date = source_database_deletion_date 2063 self.recovery_services_recovery_point_id = recovery_services_recovery_point_id 2064 self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id 2065 self.recoverable_database_id = recoverable_database_id 2066 self.restorable_dropped_database_id = restorable_dropped_database_id 2067 self.catalog_collation = catalog_collation 2068 self.zone_redundant = zone_redundant 2069 self.license_type = license_type 2070 self.max_log_size_bytes = None 2071 self.earliest_restore_date = None 2072 self.read_scale = read_scale 2073 self.high_availability_replica_count = high_availability_replica_count 2074 self.secondary_type = secondary_type 2075 self.current_sku = None 2076 self.auto_pause_delay = auto_pause_delay 2077 self.current_backup_storage_redundancy = None 2078 self.requested_backup_storage_redundancy = requested_backup_storage_redundancy 2079 self.min_capacity = min_capacity 2080 self.paused_date = None 2081 self.resumed_date = None 2082 self.maintenance_configuration_id = maintenance_configuration_id 2083 self.is_ledger_on = is_ledger_on 2084 self.is_infra_encryption_enabled = None 2085 2086 2087class DatabaseUsage(ProxyResource): 2088 """Usage metric of a database. 2089 2090 Variables are only populated by the server, and will be ignored when sending a request. 2091 2092 :ivar id: Resource ID. 2093 :vartype id: str 2094 :ivar name: Resource name. 2095 :vartype name: str 2096 :ivar type: Resource type. 2097 :vartype type: str 2098 :ivar display_name: User-readable name of the metric. 2099 :vartype display_name: str 2100 :ivar current_value: Current value of the metric. 2101 :vartype current_value: float 2102 :ivar limit: Boundary value of the metric. 2103 :vartype limit: float 2104 :ivar unit: Unit of the metric. 2105 :vartype unit: str 2106 """ 2107 2108 _validation = { 2109 'id': {'readonly': True}, 2110 'name': {'readonly': True}, 2111 'type': {'readonly': True}, 2112 'display_name': {'readonly': True}, 2113 'current_value': {'readonly': True}, 2114 'limit': {'readonly': True}, 2115 'unit': {'readonly': True}, 2116 } 2117 2118 _attribute_map = { 2119 'id': {'key': 'id', 'type': 'str'}, 2120 'name': {'key': 'name', 'type': 'str'}, 2121 'type': {'key': 'type', 'type': 'str'}, 2122 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 2123 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, 2124 'limit': {'key': 'properties.limit', 'type': 'float'}, 2125 'unit': {'key': 'properties.unit', 'type': 'str'}, 2126 } 2127 2128 def __init__( 2129 self, 2130 **kwargs 2131 ): 2132 super(DatabaseUsage, self).__init__(**kwargs) 2133 self.display_name = None 2134 self.current_value = None 2135 self.limit = None 2136 self.unit = None 2137 2138 2139class DatabaseUsageListResult(msrest.serialization.Model): 2140 """A list of database usage metrics. 2141 2142 Variables are only populated by the server, and will be ignored when sending a request. 2143 2144 :ivar value: Array of results. 2145 :vartype value: list[~azure.mgmt.sql.models.DatabaseUsage] 2146 :ivar next_link: Link to retrieve next page of results. 2147 :vartype next_link: str 2148 """ 2149 2150 _validation = { 2151 'value': {'readonly': True}, 2152 'next_link': {'readonly': True}, 2153 } 2154 2155 _attribute_map = { 2156 'value': {'key': 'value', 'type': '[DatabaseUsage]'}, 2157 'next_link': {'key': 'nextLink', 'type': 'str'}, 2158 } 2159 2160 def __init__( 2161 self, 2162 **kwargs 2163 ): 2164 super(DatabaseUsageListResult, self).__init__(**kwargs) 2165 self.value = None 2166 self.next_link = None 2167 2168 2169class DatabaseVulnerabilityAssessment(ProxyResource): 2170 """A database vulnerability assessment. 2171 2172 Variables are only populated by the server, and will be ignored when sending a request. 2173 2174 :ivar id: Resource ID. 2175 :vartype id: str 2176 :ivar name: Resource name. 2177 :vartype name: str 2178 :ivar type: Resource type. 2179 :vartype type: str 2180 :param storage_container_path: A blob storage container path to hold the scan results (e.g. 2181 https://myStorage.blob.core.windows.net/VaScans/). It is required if server level 2182 vulnerability assessment policy doesn't set. 2183 :type storage_container_path: str 2184 :param storage_container_sas_key: A shared access signature (SAS Key) that has write access to 2185 the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' 2186 isn't specified, StorageContainerSasKey is required. 2187 :type storage_container_sas_key: str 2188 :param storage_account_access_key: Specifies the identifier key of the storage account for 2189 vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, 2190 storageAccountAccessKey is required. 2191 :type storage_account_access_key: str 2192 :param recurring_scans: The recurring scans settings. 2193 :type recurring_scans: ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties 2194 """ 2195 2196 _validation = { 2197 'id': {'readonly': True}, 2198 'name': {'readonly': True}, 2199 'type': {'readonly': True}, 2200 } 2201 2202 _attribute_map = { 2203 'id': {'key': 'id', 'type': 'str'}, 2204 'name': {'key': 'name', 'type': 'str'}, 2205 'type': {'key': 'type', 'type': 'str'}, 2206 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, 2207 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, 2208 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 2209 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, 2210 } 2211 2212 def __init__( 2213 self, 2214 *, 2215 storage_container_path: Optional[str] = None, 2216 storage_container_sas_key: Optional[str] = None, 2217 storage_account_access_key: Optional[str] = None, 2218 recurring_scans: Optional["VulnerabilityAssessmentRecurringScansProperties"] = None, 2219 **kwargs 2220 ): 2221 super(DatabaseVulnerabilityAssessment, self).__init__(**kwargs) 2222 self.storage_container_path = storage_container_path 2223 self.storage_container_sas_key = storage_container_sas_key 2224 self.storage_account_access_key = storage_account_access_key 2225 self.recurring_scans = recurring_scans 2226 2227 2228class DatabaseVulnerabilityAssessmentListResult(msrest.serialization.Model): 2229 """A list of the database's vulnerability assessments. 2230 2231 Variables are only populated by the server, and will be ignored when sending a request. 2232 2233 :ivar value: Array of results. 2234 :vartype value: list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessment] 2235 :ivar next_link: Link to retrieve next page of results. 2236 :vartype next_link: str 2237 """ 2238 2239 _validation = { 2240 'value': {'readonly': True}, 2241 'next_link': {'readonly': True}, 2242 } 2243 2244 _attribute_map = { 2245 'value': {'key': 'value', 'type': '[DatabaseVulnerabilityAssessment]'}, 2246 'next_link': {'key': 'nextLink', 'type': 'str'}, 2247 } 2248 2249 def __init__( 2250 self, 2251 **kwargs 2252 ): 2253 super(DatabaseVulnerabilityAssessmentListResult, self).__init__(**kwargs) 2254 self.value = None 2255 self.next_link = None 2256 2257 2258class DatabaseVulnerabilityAssessmentRuleBaseline(ProxyResource): 2259 """A database vulnerability assessment rule baseline. 2260 2261 Variables are only populated by the server, and will be ignored when sending a request. 2262 2263 :ivar id: Resource ID. 2264 :vartype id: str 2265 :ivar name: Resource name. 2266 :vartype name: str 2267 :ivar type: Resource type. 2268 :vartype type: str 2269 :param baseline_results: The rule baseline result. 2270 :type baseline_results: 2271 list[~azure.mgmt.sql.models.DatabaseVulnerabilityAssessmentRuleBaselineItem] 2272 """ 2273 2274 _validation = { 2275 'id': {'readonly': True}, 2276 'name': {'readonly': True}, 2277 'type': {'readonly': True}, 2278 } 2279 2280 _attribute_map = { 2281 'id': {'key': 'id', 'type': 'str'}, 2282 'name': {'key': 'name', 'type': 'str'}, 2283 'type': {'key': 'type', 'type': 'str'}, 2284 'baseline_results': {'key': 'properties.baselineResults', 'type': '[DatabaseVulnerabilityAssessmentRuleBaselineItem]'}, 2285 } 2286 2287 def __init__( 2288 self, 2289 *, 2290 baseline_results: Optional[List["DatabaseVulnerabilityAssessmentRuleBaselineItem"]] = None, 2291 **kwargs 2292 ): 2293 super(DatabaseVulnerabilityAssessmentRuleBaseline, self).__init__(**kwargs) 2294 self.baseline_results = baseline_results 2295 2296 2297class DatabaseVulnerabilityAssessmentRuleBaselineItem(msrest.serialization.Model): 2298 """Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result. 2299 2300 All required parameters must be populated in order to send to Azure. 2301 2302 :param result: Required. The rule baseline result. 2303 :type result: list[str] 2304 """ 2305 2306 _validation = { 2307 'result': {'required': True}, 2308 } 2309 2310 _attribute_map = { 2311 'result': {'key': 'result', 'type': '[str]'}, 2312 } 2313 2314 def __init__( 2315 self, 2316 *, 2317 result: List[str], 2318 **kwargs 2319 ): 2320 super(DatabaseVulnerabilityAssessmentRuleBaselineItem, self).__init__(**kwargs) 2321 self.result = result 2322 2323 2324class DatabaseVulnerabilityAssessmentScansExport(ProxyResource): 2325 """A database Vulnerability Assessment scan export resource. 2326 2327 Variables are only populated by the server, and will be ignored when sending a request. 2328 2329 :ivar id: Resource ID. 2330 :vartype id: str 2331 :ivar name: Resource name. 2332 :vartype name: str 2333 :ivar type: Resource type. 2334 :vartype type: str 2335 :ivar exported_report_location: Location of the exported report (e.g. 2336 https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). 2337 :vartype exported_report_location: str 2338 """ 2339 2340 _validation = { 2341 'id': {'readonly': True}, 2342 'name': {'readonly': True}, 2343 'type': {'readonly': True}, 2344 'exported_report_location': {'readonly': True}, 2345 } 2346 2347 _attribute_map = { 2348 'id': {'key': 'id', 'type': 'str'}, 2349 'name': {'key': 'name', 'type': 'str'}, 2350 'type': {'key': 'type', 'type': 'str'}, 2351 'exported_report_location': {'key': 'properties.exportedReportLocation', 'type': 'str'}, 2352 } 2353 2354 def __init__( 2355 self, 2356 **kwargs 2357 ): 2358 super(DatabaseVulnerabilityAssessmentScansExport, self).__init__(**kwargs) 2359 self.exported_report_location = None 2360 2361 2362class DataMaskingPolicy(ProxyResource): 2363 """Represents a database data masking policy. 2364 2365 Variables are only populated by the server, and will be ignored when sending a request. 2366 2367 :ivar id: Resource ID. 2368 :vartype id: str 2369 :ivar name: Resource name. 2370 :vartype name: str 2371 :ivar type: Resource type. 2372 :vartype type: str 2373 :ivar location: The location of the data masking policy. 2374 :vartype location: str 2375 :ivar kind: The kind of data masking policy. Metadata, used for Azure portal. 2376 :vartype kind: str 2377 :param data_masking_state: The state of the data masking policy. Possible values include: 2378 "Disabled", "Enabled". 2379 :type data_masking_state: str or ~azure.mgmt.sql.models.DataMaskingState 2380 :param exempt_principals: The list of the exempt principals. Specifies the semicolon-separated 2381 list of database users for which the data masking policy does not apply. The specified users 2382 receive data results without masking for all of the database queries. 2383 :type exempt_principals: str 2384 :ivar application_principals: The list of the application principals. This is a legacy 2385 parameter and is no longer used. 2386 :vartype application_principals: str 2387 :ivar masking_level: The masking level. This is a legacy parameter and is no longer used. 2388 :vartype masking_level: str 2389 """ 2390 2391 _validation = { 2392 'id': {'readonly': True}, 2393 'name': {'readonly': True}, 2394 'type': {'readonly': True}, 2395 'location': {'readonly': True}, 2396 'kind': {'readonly': True}, 2397 'application_principals': {'readonly': True}, 2398 'masking_level': {'readonly': True}, 2399 } 2400 2401 _attribute_map = { 2402 'id': {'key': 'id', 'type': 'str'}, 2403 'name': {'key': 'name', 'type': 'str'}, 2404 'type': {'key': 'type', 'type': 'str'}, 2405 'location': {'key': 'location', 'type': 'str'}, 2406 'kind': {'key': 'kind', 'type': 'str'}, 2407 'data_masking_state': {'key': 'properties.dataMaskingState', 'type': 'str'}, 2408 'exempt_principals': {'key': 'properties.exemptPrincipals', 'type': 'str'}, 2409 'application_principals': {'key': 'properties.applicationPrincipals', 'type': 'str'}, 2410 'masking_level': {'key': 'properties.maskingLevel', 'type': 'str'}, 2411 } 2412 2413 def __init__( 2414 self, 2415 *, 2416 data_masking_state: Optional[Union[str, "DataMaskingState"]] = None, 2417 exempt_principals: Optional[str] = None, 2418 **kwargs 2419 ): 2420 super(DataMaskingPolicy, self).__init__(**kwargs) 2421 self.location = None 2422 self.kind = None 2423 self.data_masking_state = data_masking_state 2424 self.exempt_principals = exempt_principals 2425 self.application_principals = None 2426 self.masking_level = None 2427 2428 2429class DataMaskingRule(ProxyResource): 2430 """Represents a database data masking rule. 2431 2432 Variables are only populated by the server, and will be ignored when sending a request. 2433 2434 :ivar id: Resource ID. 2435 :vartype id: str 2436 :ivar name: Resource name. 2437 :vartype name: str 2438 :ivar type: Resource type. 2439 :vartype type: str 2440 :ivar location: The location of the data masking rule. 2441 :vartype location: str 2442 :ivar kind: The kind of Data Masking Rule. Metadata, used for Azure portal. 2443 :vartype kind: str 2444 :ivar id_properties_id: The rule Id. 2445 :vartype id_properties_id: str 2446 :param alias_name: The alias name. This is a legacy parameter and is no longer used. 2447 :type alias_name: str 2448 :param rule_state: The rule state. Used to delete a rule. To delete an existing rule, specify 2449 the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. 2450 However, if the rule doesn't already exist, the rule will be created with ruleState set to 2451 enabled, regardless of the provided value of ruleState. Possible values include: "Disabled", 2452 "Enabled". 2453 :type rule_state: str or ~azure.mgmt.sql.models.DataMaskingRuleState 2454 :param schema_name: The schema name on which the data masking rule is applied. 2455 :type schema_name: str 2456 :param table_name: The table name on which the data masking rule is applied. 2457 :type table_name: str 2458 :param column_name: The column name on which the data masking rule is applied. 2459 :type column_name: str 2460 :param masking_function: The masking function that is used for the data masking rule. Possible 2461 values include: "Default", "CCN", "Email", "Number", "SSN", "Text". 2462 :type masking_function: str or ~azure.mgmt.sql.models.DataMaskingFunction 2463 :param number_from: The numberFrom property of the masking rule. Required if maskingFunction is 2464 set to Number, otherwise this parameter will be ignored. 2465 :type number_from: str 2466 :param number_to: The numberTo property of the data masking rule. Required if maskingFunction 2467 is set to Number, otherwise this parameter will be ignored. 2468 :type number_to: str 2469 :param prefix_size: If maskingFunction is set to Text, the number of characters to show 2470 unmasked in the beginning of the string. Otherwise, this parameter will be ignored. 2471 :type prefix_size: str 2472 :param suffix_size: If maskingFunction is set to Text, the number of characters to show 2473 unmasked at the end of the string. Otherwise, this parameter will be ignored. 2474 :type suffix_size: str 2475 :param replacement_string: If maskingFunction is set to Text, the character to use for masking 2476 the unexposed part of the string. Otherwise, this parameter will be ignored. 2477 :type replacement_string: str 2478 """ 2479 2480 _validation = { 2481 'id': {'readonly': True}, 2482 'name': {'readonly': True}, 2483 'type': {'readonly': True}, 2484 'location': {'readonly': True}, 2485 'kind': {'readonly': True}, 2486 'id_properties_id': {'readonly': True}, 2487 } 2488 2489 _attribute_map = { 2490 'id': {'key': 'id', 'type': 'str'}, 2491 'name': {'key': 'name', 'type': 'str'}, 2492 'type': {'key': 'type', 'type': 'str'}, 2493 'location': {'key': 'location', 'type': 'str'}, 2494 'kind': {'key': 'kind', 'type': 'str'}, 2495 'id_properties_id': {'key': 'properties.id', 'type': 'str'}, 2496 'alias_name': {'key': 'properties.aliasName', 'type': 'str'}, 2497 'rule_state': {'key': 'properties.ruleState', 'type': 'str'}, 2498 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 2499 'table_name': {'key': 'properties.tableName', 'type': 'str'}, 2500 'column_name': {'key': 'properties.columnName', 'type': 'str'}, 2501 'masking_function': {'key': 'properties.maskingFunction', 'type': 'str'}, 2502 'number_from': {'key': 'properties.numberFrom', 'type': 'str'}, 2503 'number_to': {'key': 'properties.numberTo', 'type': 'str'}, 2504 'prefix_size': {'key': 'properties.prefixSize', 'type': 'str'}, 2505 'suffix_size': {'key': 'properties.suffixSize', 'type': 'str'}, 2506 'replacement_string': {'key': 'properties.replacementString', 'type': 'str'}, 2507 } 2508 2509 def __init__( 2510 self, 2511 *, 2512 alias_name: Optional[str] = None, 2513 rule_state: Optional[Union[str, "DataMaskingRuleState"]] = None, 2514 schema_name: Optional[str] = None, 2515 table_name: Optional[str] = None, 2516 column_name: Optional[str] = None, 2517 masking_function: Optional[Union[str, "DataMaskingFunction"]] = None, 2518 number_from: Optional[str] = None, 2519 number_to: Optional[str] = None, 2520 prefix_size: Optional[str] = None, 2521 suffix_size: Optional[str] = None, 2522 replacement_string: Optional[str] = None, 2523 **kwargs 2524 ): 2525 super(DataMaskingRule, self).__init__(**kwargs) 2526 self.location = None 2527 self.kind = None 2528 self.id_properties_id = None 2529 self.alias_name = alias_name 2530 self.rule_state = rule_state 2531 self.schema_name = schema_name 2532 self.table_name = table_name 2533 self.column_name = column_name 2534 self.masking_function = masking_function 2535 self.number_from = number_from 2536 self.number_to = number_to 2537 self.prefix_size = prefix_size 2538 self.suffix_size = suffix_size 2539 self.replacement_string = replacement_string 2540 2541 2542class DataMaskingRuleListResult(msrest.serialization.Model): 2543 """The response to a list data masking rules request. 2544 2545 :param value: The list of database data masking rules. 2546 :type value: list[~azure.mgmt.sql.models.DataMaskingRule] 2547 """ 2548 2549 _attribute_map = { 2550 'value': {'key': 'value', 'type': '[DataMaskingRule]'}, 2551 } 2552 2553 def __init__( 2554 self, 2555 *, 2556 value: Optional[List["DataMaskingRule"]] = None, 2557 **kwargs 2558 ): 2559 super(DataMaskingRuleListResult, self).__init__(**kwargs) 2560 self.value = value 2561 2562 2563class DataWarehouseUserActivities(ProxyResource): 2564 """User activities of a data warehouse. 2565 2566 Variables are only populated by the server, and will be ignored when sending a request. 2567 2568 :ivar id: Resource ID. 2569 :vartype id: str 2570 :ivar name: Resource name. 2571 :vartype name: str 2572 :ivar type: Resource type. 2573 :vartype type: str 2574 :ivar active_queries_count: Count of running and suspended queries. 2575 :vartype active_queries_count: int 2576 """ 2577 2578 _validation = { 2579 'id': {'readonly': True}, 2580 'name': {'readonly': True}, 2581 'type': {'readonly': True}, 2582 'active_queries_count': {'readonly': True}, 2583 } 2584 2585 _attribute_map = { 2586 'id': {'key': 'id', 'type': 'str'}, 2587 'name': {'key': 'name', 'type': 'str'}, 2588 'type': {'key': 'type', 'type': 'str'}, 2589 'active_queries_count': {'key': 'properties.activeQueriesCount', 'type': 'int'}, 2590 } 2591 2592 def __init__( 2593 self, 2594 **kwargs 2595 ): 2596 super(DataWarehouseUserActivities, self).__init__(**kwargs) 2597 self.active_queries_count = None 2598 2599 2600class DataWarehouseUserActivitiesListResult(msrest.serialization.Model): 2601 """User activities of a data warehouse. 2602 2603 Variables are only populated by the server, and will be ignored when sending a request. 2604 2605 :ivar value: Array of results. 2606 :vartype value: list[~azure.mgmt.sql.models.DataWarehouseUserActivities] 2607 :ivar next_link: Link to retrieve next page of results. 2608 :vartype next_link: str 2609 """ 2610 2611 _validation = { 2612 'value': {'readonly': True}, 2613 'next_link': {'readonly': True}, 2614 } 2615 2616 _attribute_map = { 2617 'value': {'key': 'value', 'type': '[DataWarehouseUserActivities]'}, 2618 'next_link': {'key': 'nextLink', 'type': 'str'}, 2619 } 2620 2621 def __init__( 2622 self, 2623 **kwargs 2624 ): 2625 super(DataWarehouseUserActivitiesListResult, self).__init__(**kwargs) 2626 self.value = None 2627 self.next_link = None 2628 2629 2630class DeletedServer(ProxyResource): 2631 """A deleted server. 2632 2633 Variables are only populated by the server, and will be ignored when sending a request. 2634 2635 :ivar id: Resource ID. 2636 :vartype id: str 2637 :ivar name: Resource name. 2638 :vartype name: str 2639 :ivar type: Resource type. 2640 :vartype type: str 2641 :ivar version: The version of the deleted server. 2642 :vartype version: str 2643 :ivar deletion_time: The deletion time of the deleted server. 2644 :vartype deletion_time: ~datetime.datetime 2645 :ivar original_id: The original ID of the server before deletion. 2646 :vartype original_id: str 2647 :ivar fully_qualified_domain_name: The fully qualified domain name of the server. 2648 :vartype fully_qualified_domain_name: str 2649 """ 2650 2651 _validation = { 2652 'id': {'readonly': True}, 2653 'name': {'readonly': True}, 2654 'type': {'readonly': True}, 2655 'version': {'readonly': True}, 2656 'deletion_time': {'readonly': True}, 2657 'original_id': {'readonly': True}, 2658 'fully_qualified_domain_name': {'readonly': True}, 2659 } 2660 2661 _attribute_map = { 2662 'id': {'key': 'id', 'type': 'str'}, 2663 'name': {'key': 'name', 'type': 'str'}, 2664 'type': {'key': 'type', 'type': 'str'}, 2665 'version': {'key': 'properties.version', 'type': 'str'}, 2666 'deletion_time': {'key': 'properties.deletionTime', 'type': 'iso-8601'}, 2667 'original_id': {'key': 'properties.originalId', 'type': 'str'}, 2668 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, 2669 } 2670 2671 def __init__( 2672 self, 2673 **kwargs 2674 ): 2675 super(DeletedServer, self).__init__(**kwargs) 2676 self.version = None 2677 self.deletion_time = None 2678 self.original_id = None 2679 self.fully_qualified_domain_name = None 2680 2681 2682class DeletedServerListResult(msrest.serialization.Model): 2683 """A list of deleted servers. 2684 2685 Variables are only populated by the server, and will be ignored when sending a request. 2686 2687 :ivar value: Array of results. 2688 :vartype value: list[~azure.mgmt.sql.models.DeletedServer] 2689 :ivar next_link: Link to retrieve next page of results. 2690 :vartype next_link: str 2691 """ 2692 2693 _validation = { 2694 'value': {'readonly': True}, 2695 'next_link': {'readonly': True}, 2696 } 2697 2698 _attribute_map = { 2699 'value': {'key': 'value', 'type': '[DeletedServer]'}, 2700 'next_link': {'key': 'nextLink', 'type': 'str'}, 2701 } 2702 2703 def __init__( 2704 self, 2705 **kwargs 2706 ): 2707 super(DeletedServerListResult, self).__init__(**kwargs) 2708 self.value = None 2709 self.next_link = None 2710 2711 2712class EditionCapability(msrest.serialization.Model): 2713 """The edition capability. 2714 2715 Variables are only populated by the server, and will be ignored when sending a request. 2716 2717 :ivar name: The database edition name. 2718 :vartype name: str 2719 :ivar supported_service_level_objectives: The list of supported service objectives for the 2720 edition. 2721 :vartype supported_service_level_objectives: 2722 list[~azure.mgmt.sql.models.ServiceObjectiveCapability] 2723 :ivar zone_redundant: Whether or not zone redundancy is supported for the edition. 2724 :vartype zone_redundant: bool 2725 :ivar read_scale: The read scale capability for the edition. 2726 :vartype read_scale: ~azure.mgmt.sql.models.ReadScaleCapability 2727 :ivar supported_storage_capabilities: The list of supported storage capabilities for this 2728 edition. 2729 :vartype supported_storage_capabilities: list[~azure.mgmt.sql.models.StorageCapability] 2730 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 2731 "Default", "Disabled". 2732 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 2733 :param reason: The reason for the capability not being available. 2734 :type reason: str 2735 """ 2736 2737 _validation = { 2738 'name': {'readonly': True}, 2739 'supported_service_level_objectives': {'readonly': True}, 2740 'zone_redundant': {'readonly': True}, 2741 'read_scale': {'readonly': True}, 2742 'supported_storage_capabilities': {'readonly': True}, 2743 'status': {'readonly': True}, 2744 } 2745 2746 _attribute_map = { 2747 'name': {'key': 'name', 'type': 'str'}, 2748 'supported_service_level_objectives': {'key': 'supportedServiceLevelObjectives', 'type': '[ServiceObjectiveCapability]'}, 2749 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, 2750 'read_scale': {'key': 'readScale', 'type': 'ReadScaleCapability'}, 2751 'supported_storage_capabilities': {'key': 'supportedStorageCapabilities', 'type': '[StorageCapability]'}, 2752 'status': {'key': 'status', 'type': 'str'}, 2753 'reason': {'key': 'reason', 'type': 'str'}, 2754 } 2755 2756 def __init__( 2757 self, 2758 *, 2759 reason: Optional[str] = None, 2760 **kwargs 2761 ): 2762 super(EditionCapability, self).__init__(**kwargs) 2763 self.name = None 2764 self.supported_service_level_objectives = None 2765 self.zone_redundant = None 2766 self.read_scale = None 2767 self.supported_storage_capabilities = None 2768 self.status = None 2769 self.reason = reason 2770 2771 2772class ElasticPool(TrackedResource): 2773 """An elastic pool. 2774 2775 Variables are only populated by the server, and will be ignored when sending a request. 2776 2777 All required parameters must be populated in order to send to Azure. 2778 2779 :ivar id: Resource ID. 2780 :vartype id: str 2781 :ivar name: Resource name. 2782 :vartype name: str 2783 :ivar type: Resource type. 2784 :vartype type: str 2785 :param location: Required. Resource location. 2786 :type location: str 2787 :param tags: A set of tags. Resource tags. 2788 :type tags: dict[str, str] 2789 :param sku: The elastic pool SKU. 2790 2791 The list of SKUs may vary by region and support offer. To determine the SKUs (including the 2792 SKU name, tier/edition, family, and capacity) that are available to your subscription in an 2793 Azure region, use the ``Capabilities_ListByLocation`` REST API or the following command: 2794 2795 .. code-block:: azurecli 2796 2797 az sql elastic-pool list-editions -l <location> -o table 2798 `. 2799 :type sku: ~azure.mgmt.sql.models.Sku 2800 :ivar kind: Kind of elastic pool. This is metadata used for the Azure portal experience. 2801 :vartype kind: str 2802 :ivar state: The state of the elastic pool. Possible values include: "Creating", "Ready", 2803 "Disabled". 2804 :vartype state: str or ~azure.mgmt.sql.models.ElasticPoolState 2805 :ivar creation_date: The creation date of the elastic pool (ISO8601 format). 2806 :vartype creation_date: ~datetime.datetime 2807 :param max_size_bytes: The storage limit for the database elastic pool in bytes. 2808 :type max_size_bytes: long 2809 :param per_database_settings: The per database settings for the elastic pool. 2810 :type per_database_settings: ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings 2811 :param zone_redundant: Whether or not this elastic pool is zone redundant, which means the 2812 replicas of this elastic pool will be spread across multiple availability zones. 2813 :type zone_redundant: bool 2814 :param license_type: The license type to apply for this elastic pool. Possible values include: 2815 "LicenseIncluded", "BasePrice". 2816 :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType 2817 :param maintenance_configuration_id: Maintenance configuration id assigned to the elastic pool. 2818 This configuration defines the period when the maintenance updates will will occur. 2819 :type maintenance_configuration_id: str 2820 """ 2821 2822 _validation = { 2823 'id': {'readonly': True}, 2824 'name': {'readonly': True}, 2825 'type': {'readonly': True}, 2826 'location': {'required': True}, 2827 'kind': {'readonly': True}, 2828 'state': {'readonly': True}, 2829 'creation_date': {'readonly': True}, 2830 } 2831 2832 _attribute_map = { 2833 'id': {'key': 'id', 'type': 'str'}, 2834 'name': {'key': 'name', 'type': 'str'}, 2835 'type': {'key': 'type', 'type': 'str'}, 2836 'location': {'key': 'location', 'type': 'str'}, 2837 'tags': {'key': 'tags', 'type': '{str}'}, 2838 'sku': {'key': 'sku', 'type': 'Sku'}, 2839 'kind': {'key': 'kind', 'type': 'str'}, 2840 'state': {'key': 'properties.state', 'type': 'str'}, 2841 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 2842 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, 2843 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, 2844 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, 2845 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, 2846 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 2847 } 2848 2849 def __init__( 2850 self, 2851 *, 2852 location: str, 2853 tags: Optional[Dict[str, str]] = None, 2854 sku: Optional["Sku"] = None, 2855 max_size_bytes: Optional[int] = None, 2856 per_database_settings: Optional["ElasticPoolPerDatabaseSettings"] = None, 2857 zone_redundant: Optional[bool] = None, 2858 license_type: Optional[Union[str, "ElasticPoolLicenseType"]] = None, 2859 maintenance_configuration_id: Optional[str] = None, 2860 **kwargs 2861 ): 2862 super(ElasticPool, self).__init__(location=location, tags=tags, **kwargs) 2863 self.sku = sku 2864 self.kind = None 2865 self.state = None 2866 self.creation_date = None 2867 self.max_size_bytes = max_size_bytes 2868 self.per_database_settings = per_database_settings 2869 self.zone_redundant = zone_redundant 2870 self.license_type = license_type 2871 self.maintenance_configuration_id = maintenance_configuration_id 2872 2873 2874class ElasticPoolActivity(ProxyResource): 2875 """Represents the activity on an elastic pool. 2876 2877 Variables are only populated by the server, and will be ignored when sending a request. 2878 2879 :ivar id: Resource ID. 2880 :vartype id: str 2881 :ivar name: Resource name. 2882 :vartype name: str 2883 :ivar type: Resource type. 2884 :vartype type: str 2885 :param location: The geo-location where the resource lives. 2886 :type location: str 2887 :ivar end_time: The time the operation finished (ISO8601 format). 2888 :vartype end_time: ~datetime.datetime 2889 :ivar error_code: The error code if available. 2890 :vartype error_code: int 2891 :ivar error_message: The error message if available. 2892 :vartype error_message: str 2893 :ivar error_severity: The error severity if available. 2894 :vartype error_severity: int 2895 :ivar operation: The operation name. 2896 :vartype operation: str 2897 :ivar operation_id: The unique operation ID. 2898 :vartype operation_id: str 2899 :ivar percent_complete: The percentage complete if available. 2900 :vartype percent_complete: int 2901 :ivar requested_database_dtu_max: The requested max DTU per database if available. 2902 :vartype requested_database_dtu_max: int 2903 :ivar requested_database_dtu_min: The requested min DTU per database if available. 2904 :vartype requested_database_dtu_min: int 2905 :ivar requested_dtu: The requested DTU for the pool if available. 2906 :vartype requested_dtu: int 2907 :ivar requested_elastic_pool_name: The requested name for the elastic pool if available. 2908 :vartype requested_elastic_pool_name: str 2909 :ivar requested_storage_limit_in_gb: The requested storage limit for the pool in GB if 2910 available. 2911 :vartype requested_storage_limit_in_gb: long 2912 :ivar elastic_pool_name: The name of the elastic pool. 2913 :vartype elastic_pool_name: str 2914 :ivar server_name: The name of the server the elastic pool is in. 2915 :vartype server_name: str 2916 :ivar start_time: The time the operation started (ISO8601 format). 2917 :vartype start_time: ~datetime.datetime 2918 :ivar state: The current state of the operation. 2919 :vartype state: str 2920 :ivar requested_storage_limit_in_mb: The requested storage limit in MB. 2921 :vartype requested_storage_limit_in_mb: int 2922 :ivar requested_database_dtu_guarantee: The requested per database DTU guarantee. 2923 :vartype requested_database_dtu_guarantee: int 2924 :ivar requested_database_dtu_cap: The requested per database DTU cap. 2925 :vartype requested_database_dtu_cap: int 2926 :ivar requested_dtu_guarantee: The requested DTU guarantee. 2927 :vartype requested_dtu_guarantee: int 2928 """ 2929 2930 _validation = { 2931 'id': {'readonly': True}, 2932 'name': {'readonly': True}, 2933 'type': {'readonly': True}, 2934 'end_time': {'readonly': True}, 2935 'error_code': {'readonly': True}, 2936 'error_message': {'readonly': True}, 2937 'error_severity': {'readonly': True}, 2938 'operation': {'readonly': True}, 2939 'operation_id': {'readonly': True}, 2940 'percent_complete': {'readonly': True}, 2941 'requested_database_dtu_max': {'readonly': True}, 2942 'requested_database_dtu_min': {'readonly': True}, 2943 'requested_dtu': {'readonly': True}, 2944 'requested_elastic_pool_name': {'readonly': True}, 2945 'requested_storage_limit_in_gb': {'readonly': True}, 2946 'elastic_pool_name': {'readonly': True}, 2947 'server_name': {'readonly': True}, 2948 'start_time': {'readonly': True}, 2949 'state': {'readonly': True}, 2950 'requested_storage_limit_in_mb': {'readonly': True}, 2951 'requested_database_dtu_guarantee': {'readonly': True}, 2952 'requested_database_dtu_cap': {'readonly': True}, 2953 'requested_dtu_guarantee': {'readonly': True}, 2954 } 2955 2956 _attribute_map = { 2957 'id': {'key': 'id', 'type': 'str'}, 2958 'name': {'key': 'name', 'type': 'str'}, 2959 'type': {'key': 'type', 'type': 'str'}, 2960 'location': {'key': 'location', 'type': 'str'}, 2961 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, 2962 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, 2963 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, 2964 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, 2965 'operation': {'key': 'properties.operation', 'type': 'str'}, 2966 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, 2967 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, 2968 'requested_database_dtu_max': {'key': 'properties.requestedDatabaseDtuMax', 'type': 'int'}, 2969 'requested_database_dtu_min': {'key': 'properties.requestedDatabaseDtuMin', 'type': 'int'}, 2970 'requested_dtu': {'key': 'properties.requestedDtu', 'type': 'int'}, 2971 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, 2972 'requested_storage_limit_in_gb': {'key': 'properties.requestedStorageLimitInGB', 'type': 'long'}, 2973 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, 2974 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 2975 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 2976 'state': {'key': 'properties.state', 'type': 'str'}, 2977 'requested_storage_limit_in_mb': {'key': 'properties.requestedStorageLimitInMB', 'type': 'int'}, 2978 'requested_database_dtu_guarantee': {'key': 'properties.requestedDatabaseDtuGuarantee', 'type': 'int'}, 2979 'requested_database_dtu_cap': {'key': 'properties.requestedDatabaseDtuCap', 'type': 'int'}, 2980 'requested_dtu_guarantee': {'key': 'properties.requestedDtuGuarantee', 'type': 'int'}, 2981 } 2982 2983 def __init__( 2984 self, 2985 *, 2986 location: Optional[str] = None, 2987 **kwargs 2988 ): 2989 super(ElasticPoolActivity, self).__init__(**kwargs) 2990 self.location = location 2991 self.end_time = None 2992 self.error_code = None 2993 self.error_message = None 2994 self.error_severity = None 2995 self.operation = None 2996 self.operation_id = None 2997 self.percent_complete = None 2998 self.requested_database_dtu_max = None 2999 self.requested_database_dtu_min = None 3000 self.requested_dtu = None 3001 self.requested_elastic_pool_name = None 3002 self.requested_storage_limit_in_gb = None 3003 self.elastic_pool_name = None 3004 self.server_name = None 3005 self.start_time = None 3006 self.state = None 3007 self.requested_storage_limit_in_mb = None 3008 self.requested_database_dtu_guarantee = None 3009 self.requested_database_dtu_cap = None 3010 self.requested_dtu_guarantee = None 3011 3012 3013class ElasticPoolActivityListResult(msrest.serialization.Model): 3014 """Represents the response to a list elastic pool activity request. 3015 3016 All required parameters must be populated in order to send to Azure. 3017 3018 :param value: Required. The list of elastic pool activities. 3019 :type value: list[~azure.mgmt.sql.models.ElasticPoolActivity] 3020 """ 3021 3022 _validation = { 3023 'value': {'required': True}, 3024 } 3025 3026 _attribute_map = { 3027 'value': {'key': 'value', 'type': '[ElasticPoolActivity]'}, 3028 } 3029 3030 def __init__( 3031 self, 3032 *, 3033 value: List["ElasticPoolActivity"], 3034 **kwargs 3035 ): 3036 super(ElasticPoolActivityListResult, self).__init__(**kwargs) 3037 self.value = value 3038 3039 3040class ElasticPoolDatabaseActivity(ProxyResource): 3041 """Represents the activity on an elastic pool. 3042 3043 Variables are only populated by the server, and will be ignored when sending a request. 3044 3045 :ivar id: Resource ID. 3046 :vartype id: str 3047 :ivar name: Resource name. 3048 :vartype name: str 3049 :ivar type: Resource type. 3050 :vartype type: str 3051 :param location: The geo-location where the resource lives. 3052 :type location: str 3053 :ivar database_name: The database name. 3054 :vartype database_name: str 3055 :ivar end_time: The time the operation finished (ISO8601 format). 3056 :vartype end_time: ~datetime.datetime 3057 :ivar error_code: The error code if available. 3058 :vartype error_code: int 3059 :ivar error_message: The error message if available. 3060 :vartype error_message: str 3061 :ivar error_severity: The error severity if available. 3062 :vartype error_severity: int 3063 :ivar operation: The operation name. 3064 :vartype operation: str 3065 :ivar operation_id: The unique operation ID. 3066 :vartype operation_id: str 3067 :ivar percent_complete: The percentage complete if available. 3068 :vartype percent_complete: int 3069 :ivar requested_elastic_pool_name: The name for the elastic pool the database is moving into if 3070 available. 3071 :vartype requested_elastic_pool_name: str 3072 :ivar current_elastic_pool_name: The name of the current elastic pool the database is in if 3073 available. 3074 :vartype current_elastic_pool_name: str 3075 :ivar current_service_objective: The name of the current service objective if available. 3076 :vartype current_service_objective: str 3077 :ivar requested_service_objective: The name of the requested service objective if available. 3078 :vartype requested_service_objective: str 3079 :ivar server_name: The name of the server the elastic pool is in. 3080 :vartype server_name: str 3081 :ivar start_time: The time the operation started (ISO8601 format). 3082 :vartype start_time: ~datetime.datetime 3083 :ivar state: The current state of the operation. 3084 :vartype state: str 3085 """ 3086 3087 _validation = { 3088 'id': {'readonly': True}, 3089 'name': {'readonly': True}, 3090 'type': {'readonly': True}, 3091 'database_name': {'readonly': True}, 3092 'end_time': {'readonly': True}, 3093 'error_code': {'readonly': True}, 3094 'error_message': {'readonly': True}, 3095 'error_severity': {'readonly': True}, 3096 'operation': {'readonly': True}, 3097 'operation_id': {'readonly': True}, 3098 'percent_complete': {'readonly': True}, 3099 'requested_elastic_pool_name': {'readonly': True}, 3100 'current_elastic_pool_name': {'readonly': True}, 3101 'current_service_objective': {'readonly': True}, 3102 'requested_service_objective': {'readonly': True}, 3103 'server_name': {'readonly': True}, 3104 'start_time': {'readonly': True}, 3105 'state': {'readonly': True}, 3106 } 3107 3108 _attribute_map = { 3109 'id': {'key': 'id', 'type': 'str'}, 3110 'name': {'key': 'name', 'type': 'str'}, 3111 'type': {'key': 'type', 'type': 'str'}, 3112 'location': {'key': 'location', 'type': 'str'}, 3113 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 3114 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, 3115 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, 3116 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, 3117 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, 3118 'operation': {'key': 'properties.operation', 'type': 'str'}, 3119 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, 3120 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, 3121 'requested_elastic_pool_name': {'key': 'properties.requestedElasticPoolName', 'type': 'str'}, 3122 'current_elastic_pool_name': {'key': 'properties.currentElasticPoolName', 'type': 'str'}, 3123 'current_service_objective': {'key': 'properties.currentServiceObjective', 'type': 'str'}, 3124 'requested_service_objective': {'key': 'properties.requestedServiceObjective', 'type': 'str'}, 3125 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 3126 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 3127 'state': {'key': 'properties.state', 'type': 'str'}, 3128 } 3129 3130 def __init__( 3131 self, 3132 *, 3133 location: Optional[str] = None, 3134 **kwargs 3135 ): 3136 super(ElasticPoolDatabaseActivity, self).__init__(**kwargs) 3137 self.location = location 3138 self.database_name = None 3139 self.end_time = None 3140 self.error_code = None 3141 self.error_message = None 3142 self.error_severity = None 3143 self.operation = None 3144 self.operation_id = None 3145 self.percent_complete = None 3146 self.requested_elastic_pool_name = None 3147 self.current_elastic_pool_name = None 3148 self.current_service_objective = None 3149 self.requested_service_objective = None 3150 self.server_name = None 3151 self.start_time = None 3152 self.state = None 3153 3154 3155class ElasticPoolDatabaseActivityListResult(msrest.serialization.Model): 3156 """Represents the response to a list elastic pool database activity request. 3157 3158 All required parameters must be populated in order to send to Azure. 3159 3160 :param value: Required. The list of elastic pool database activities. 3161 :type value: list[~azure.mgmt.sql.models.ElasticPoolDatabaseActivity] 3162 """ 3163 3164 _validation = { 3165 'value': {'required': True}, 3166 } 3167 3168 _attribute_map = { 3169 'value': {'key': 'value', 'type': '[ElasticPoolDatabaseActivity]'}, 3170 } 3171 3172 def __init__( 3173 self, 3174 *, 3175 value: List["ElasticPoolDatabaseActivity"], 3176 **kwargs 3177 ): 3178 super(ElasticPoolDatabaseActivityListResult, self).__init__(**kwargs) 3179 self.value = value 3180 3181 3182class ElasticPoolEditionCapability(msrest.serialization.Model): 3183 """The elastic pool edition capability. 3184 3185 Variables are only populated by the server, and will be ignored when sending a request. 3186 3187 :ivar name: The elastic pool edition name. 3188 :vartype name: str 3189 :ivar supported_elastic_pool_performance_levels: The list of supported elastic pool DTU levels 3190 for the edition. 3191 :vartype supported_elastic_pool_performance_levels: 3192 list[~azure.mgmt.sql.models.ElasticPoolPerformanceLevelCapability] 3193 :ivar zone_redundant: Whether or not zone redundancy is supported for the edition. 3194 :vartype zone_redundant: bool 3195 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 3196 "Default", "Disabled". 3197 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 3198 :param reason: The reason for the capability not being available. 3199 :type reason: str 3200 """ 3201 3202 _validation = { 3203 'name': {'readonly': True}, 3204 'supported_elastic_pool_performance_levels': {'readonly': True}, 3205 'zone_redundant': {'readonly': True}, 3206 'status': {'readonly': True}, 3207 } 3208 3209 _attribute_map = { 3210 'name': {'key': 'name', 'type': 'str'}, 3211 'supported_elastic_pool_performance_levels': {'key': 'supportedElasticPoolPerformanceLevels', 'type': '[ElasticPoolPerformanceLevelCapability]'}, 3212 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, 3213 'status': {'key': 'status', 'type': 'str'}, 3214 'reason': {'key': 'reason', 'type': 'str'}, 3215 } 3216 3217 def __init__( 3218 self, 3219 *, 3220 reason: Optional[str] = None, 3221 **kwargs 3222 ): 3223 super(ElasticPoolEditionCapability, self).__init__(**kwargs) 3224 self.name = None 3225 self.supported_elastic_pool_performance_levels = None 3226 self.zone_redundant = None 3227 self.status = None 3228 self.reason = reason 3229 3230 3231class ElasticPoolListResult(msrest.serialization.Model): 3232 """The result of an elastic pool list request. 3233 3234 Variables are only populated by the server, and will be ignored when sending a request. 3235 3236 :ivar value: Array of results. 3237 :vartype value: list[~azure.mgmt.sql.models.ElasticPool] 3238 :ivar next_link: Link to retrieve next page of results. 3239 :vartype next_link: str 3240 """ 3241 3242 _validation = { 3243 'value': {'readonly': True}, 3244 'next_link': {'readonly': True}, 3245 } 3246 3247 _attribute_map = { 3248 'value': {'key': 'value', 'type': '[ElasticPool]'}, 3249 'next_link': {'key': 'nextLink', 'type': 'str'}, 3250 } 3251 3252 def __init__( 3253 self, 3254 **kwargs 3255 ): 3256 super(ElasticPoolListResult, self).__init__(**kwargs) 3257 self.value = None 3258 self.next_link = None 3259 3260 3261class ElasticPoolOperation(ProxyResource): 3262 """A elastic pool operation. 3263 3264 Variables are only populated by the server, and will be ignored when sending a request. 3265 3266 :ivar id: Resource ID. 3267 :vartype id: str 3268 :ivar name: Resource name. 3269 :vartype name: str 3270 :ivar type: Resource type. 3271 :vartype type: str 3272 :ivar elastic_pool_name: The name of the elastic pool the operation is being performed on. 3273 :vartype elastic_pool_name: str 3274 :ivar operation: The name of operation. 3275 :vartype operation: str 3276 :ivar operation_friendly_name: The friendly name of operation. 3277 :vartype operation_friendly_name: str 3278 :ivar percent_complete: The percentage of the operation completed. 3279 :vartype percent_complete: int 3280 :ivar server_name: The name of the server. 3281 :vartype server_name: str 3282 :ivar start_time: The operation start time. 3283 :vartype start_time: ~datetime.datetime 3284 :ivar state: The operation state. 3285 :vartype state: str 3286 :ivar error_code: The operation error code. 3287 :vartype error_code: int 3288 :ivar error_description: The operation error description. 3289 :vartype error_description: str 3290 :ivar error_severity: The operation error severity. 3291 :vartype error_severity: int 3292 :ivar is_user_error: Whether or not the error is a user error. 3293 :vartype is_user_error: bool 3294 :ivar estimated_completion_time: The estimated completion time of the operation. 3295 :vartype estimated_completion_time: ~datetime.datetime 3296 :ivar description: The operation description. 3297 :vartype description: str 3298 :ivar is_cancellable: Whether the operation can be cancelled. 3299 :vartype is_cancellable: bool 3300 """ 3301 3302 _validation = { 3303 'id': {'readonly': True}, 3304 'name': {'readonly': True}, 3305 'type': {'readonly': True}, 3306 'elastic_pool_name': {'readonly': True}, 3307 'operation': {'readonly': True}, 3308 'operation_friendly_name': {'readonly': True}, 3309 'percent_complete': {'readonly': True}, 3310 'server_name': {'readonly': True}, 3311 'start_time': {'readonly': True}, 3312 'state': {'readonly': True}, 3313 'error_code': {'readonly': True}, 3314 'error_description': {'readonly': True}, 3315 'error_severity': {'readonly': True}, 3316 'is_user_error': {'readonly': True}, 3317 'estimated_completion_time': {'readonly': True}, 3318 'description': {'readonly': True}, 3319 'is_cancellable': {'readonly': True}, 3320 } 3321 3322 _attribute_map = { 3323 'id': {'key': 'id', 'type': 'str'}, 3324 'name': {'key': 'name', 'type': 'str'}, 3325 'type': {'key': 'type', 'type': 'str'}, 3326 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, 3327 'operation': {'key': 'properties.operation', 'type': 'str'}, 3328 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, 3329 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, 3330 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 3331 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 3332 'state': {'key': 'properties.state', 'type': 'str'}, 3333 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, 3334 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, 3335 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, 3336 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, 3337 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, 3338 'description': {'key': 'properties.description', 'type': 'str'}, 3339 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, 3340 } 3341 3342 def __init__( 3343 self, 3344 **kwargs 3345 ): 3346 super(ElasticPoolOperation, self).__init__(**kwargs) 3347 self.elastic_pool_name = None 3348 self.operation = None 3349 self.operation_friendly_name = None 3350 self.percent_complete = None 3351 self.server_name = None 3352 self.start_time = None 3353 self.state = None 3354 self.error_code = None 3355 self.error_description = None 3356 self.error_severity = None 3357 self.is_user_error = None 3358 self.estimated_completion_time = None 3359 self.description = None 3360 self.is_cancellable = None 3361 3362 3363class ElasticPoolOperationListResult(msrest.serialization.Model): 3364 """The response to a list elastic pool operations request. 3365 3366 Variables are only populated by the server, and will be ignored when sending a request. 3367 3368 :ivar value: Array of results. 3369 :vartype value: list[~azure.mgmt.sql.models.ElasticPoolOperation] 3370 :ivar next_link: Link to retrieve next page of results. 3371 :vartype next_link: str 3372 """ 3373 3374 _validation = { 3375 'value': {'readonly': True}, 3376 'next_link': {'readonly': True}, 3377 } 3378 3379 _attribute_map = { 3380 'value': {'key': 'value', 'type': '[ElasticPoolOperation]'}, 3381 'next_link': {'key': 'nextLink', 'type': 'str'}, 3382 } 3383 3384 def __init__( 3385 self, 3386 **kwargs 3387 ): 3388 super(ElasticPoolOperationListResult, self).__init__(**kwargs) 3389 self.value = None 3390 self.next_link = None 3391 3392 3393class ElasticPoolPerDatabaseMaxPerformanceLevelCapability(msrest.serialization.Model): 3394 """The max per-database performance level capability. 3395 3396 Variables are only populated by the server, and will be ignored when sending a request. 3397 3398 :ivar limit: The maximum performance level per database. 3399 :vartype limit: float 3400 :ivar unit: Unit type used to measure performance level. Possible values include: "DTU", 3401 "VCores". 3402 :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit 3403 :ivar supported_per_database_min_performance_levels: The list of supported min database 3404 performance levels. 3405 :vartype supported_per_database_min_performance_levels: 3406 list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMinPerformanceLevelCapability] 3407 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 3408 "Default", "Disabled". 3409 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 3410 :param reason: The reason for the capability not being available. 3411 :type reason: str 3412 """ 3413 3414 _validation = { 3415 'limit': {'readonly': True}, 3416 'unit': {'readonly': True}, 3417 'supported_per_database_min_performance_levels': {'readonly': True}, 3418 'status': {'readonly': True}, 3419 } 3420 3421 _attribute_map = { 3422 'limit': {'key': 'limit', 'type': 'float'}, 3423 'unit': {'key': 'unit', 'type': 'str'}, 3424 'supported_per_database_min_performance_levels': {'key': 'supportedPerDatabaseMinPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMinPerformanceLevelCapability]'}, 3425 'status': {'key': 'status', 'type': 'str'}, 3426 'reason': {'key': 'reason', 'type': 'str'}, 3427 } 3428 3429 def __init__( 3430 self, 3431 *, 3432 reason: Optional[str] = None, 3433 **kwargs 3434 ): 3435 super(ElasticPoolPerDatabaseMaxPerformanceLevelCapability, self).__init__(**kwargs) 3436 self.limit = None 3437 self.unit = None 3438 self.supported_per_database_min_performance_levels = None 3439 self.status = None 3440 self.reason = reason 3441 3442 3443class ElasticPoolPerDatabaseMinPerformanceLevelCapability(msrest.serialization.Model): 3444 """The minimum per-database performance level capability. 3445 3446 Variables are only populated by the server, and will be ignored when sending a request. 3447 3448 :ivar limit: The minimum performance level per database. 3449 :vartype limit: float 3450 :ivar unit: Unit type used to measure performance level. Possible values include: "DTU", 3451 "VCores". 3452 :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit 3453 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 3454 "Default", "Disabled". 3455 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 3456 :param reason: The reason for the capability not being available. 3457 :type reason: str 3458 """ 3459 3460 _validation = { 3461 'limit': {'readonly': True}, 3462 'unit': {'readonly': True}, 3463 'status': {'readonly': True}, 3464 } 3465 3466 _attribute_map = { 3467 'limit': {'key': 'limit', 'type': 'float'}, 3468 'unit': {'key': 'unit', 'type': 'str'}, 3469 'status': {'key': 'status', 'type': 'str'}, 3470 'reason': {'key': 'reason', 'type': 'str'}, 3471 } 3472 3473 def __init__( 3474 self, 3475 *, 3476 reason: Optional[str] = None, 3477 **kwargs 3478 ): 3479 super(ElasticPoolPerDatabaseMinPerformanceLevelCapability, self).__init__(**kwargs) 3480 self.limit = None 3481 self.unit = None 3482 self.status = None 3483 self.reason = reason 3484 3485 3486class ElasticPoolPerDatabaseSettings(msrest.serialization.Model): 3487 """Per database settings of an elastic pool. 3488 3489 :param min_capacity: The minimum capacity all databases are guaranteed. 3490 :type min_capacity: float 3491 :param max_capacity: The maximum capacity any one database can consume. 3492 :type max_capacity: float 3493 """ 3494 3495 _attribute_map = { 3496 'min_capacity': {'key': 'minCapacity', 'type': 'float'}, 3497 'max_capacity': {'key': 'maxCapacity', 'type': 'float'}, 3498 } 3499 3500 def __init__( 3501 self, 3502 *, 3503 min_capacity: Optional[float] = None, 3504 max_capacity: Optional[float] = None, 3505 **kwargs 3506 ): 3507 super(ElasticPoolPerDatabaseSettings, self).__init__(**kwargs) 3508 self.min_capacity = min_capacity 3509 self.max_capacity = max_capacity 3510 3511 3512class ElasticPoolPerformanceLevelCapability(msrest.serialization.Model): 3513 """The Elastic Pool performance level capability. 3514 3515 Variables are only populated by the server, and will be ignored when sending a request. 3516 3517 :ivar performance_level: The performance level for the pool. 3518 :vartype performance_level: ~azure.mgmt.sql.models.PerformanceLevelCapability 3519 :ivar sku: The sku. 3520 :vartype sku: ~azure.mgmt.sql.models.Sku 3521 :ivar supported_license_types: List of supported license types. 3522 :vartype supported_license_types: list[~azure.mgmt.sql.models.LicenseTypeCapability] 3523 :ivar max_database_count: The maximum number of databases supported. 3524 :vartype max_database_count: int 3525 :ivar included_max_size: The included (free) max size for this performance level. 3526 :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability 3527 :ivar supported_max_sizes: The list of supported max sizes. 3528 :vartype supported_max_sizes: list[~azure.mgmt.sql.models.MaxSizeRangeCapability] 3529 :ivar supported_per_database_max_sizes: The list of supported per database max sizes. 3530 :vartype supported_per_database_max_sizes: list[~azure.mgmt.sql.models.MaxSizeRangeCapability] 3531 :ivar supported_per_database_max_performance_levels: The list of supported per database max 3532 performance levels. 3533 :vartype supported_per_database_max_performance_levels: 3534 list[~azure.mgmt.sql.models.ElasticPoolPerDatabaseMaxPerformanceLevelCapability] 3535 :ivar zone_redundant: Whether or not zone redundancy is supported for the performance level. 3536 :vartype zone_redundant: bool 3537 :ivar supported_maintenance_configurations: List of supported maintenance configurations. 3538 :vartype supported_maintenance_configurations: 3539 list[~azure.mgmt.sql.models.MaintenanceConfigurationCapability] 3540 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 3541 "Default", "Disabled". 3542 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 3543 :param reason: The reason for the capability not being available. 3544 :type reason: str 3545 """ 3546 3547 _validation = { 3548 'performance_level': {'readonly': True}, 3549 'sku': {'readonly': True}, 3550 'supported_license_types': {'readonly': True}, 3551 'max_database_count': {'readonly': True}, 3552 'included_max_size': {'readonly': True}, 3553 'supported_max_sizes': {'readonly': True}, 3554 'supported_per_database_max_sizes': {'readonly': True}, 3555 'supported_per_database_max_performance_levels': {'readonly': True}, 3556 'zone_redundant': {'readonly': True}, 3557 'supported_maintenance_configurations': {'readonly': True}, 3558 'status': {'readonly': True}, 3559 } 3560 3561 _attribute_map = { 3562 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, 3563 'sku': {'key': 'sku', 'type': 'Sku'}, 3564 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, 3565 'max_database_count': {'key': 'maxDatabaseCount', 'type': 'int'}, 3566 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, 3567 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, 3568 'supported_per_database_max_sizes': {'key': 'supportedPerDatabaseMaxSizes', 'type': '[MaxSizeRangeCapability]'}, 3569 'supported_per_database_max_performance_levels': {'key': 'supportedPerDatabaseMaxPerformanceLevels', 'type': '[ElasticPoolPerDatabaseMaxPerformanceLevelCapability]'}, 3570 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, 3571 'supported_maintenance_configurations': {'key': 'supportedMaintenanceConfigurations', 'type': '[MaintenanceConfigurationCapability]'}, 3572 'status': {'key': 'status', 'type': 'str'}, 3573 'reason': {'key': 'reason', 'type': 'str'}, 3574 } 3575 3576 def __init__( 3577 self, 3578 *, 3579 reason: Optional[str] = None, 3580 **kwargs 3581 ): 3582 super(ElasticPoolPerformanceLevelCapability, self).__init__(**kwargs) 3583 self.performance_level = None 3584 self.sku = None 3585 self.supported_license_types = None 3586 self.max_database_count = None 3587 self.included_max_size = None 3588 self.supported_max_sizes = None 3589 self.supported_per_database_max_sizes = None 3590 self.supported_per_database_max_performance_levels = None 3591 self.zone_redundant = None 3592 self.supported_maintenance_configurations = None 3593 self.status = None 3594 self.reason = reason 3595 3596 3597class ElasticPoolUpdate(msrest.serialization.Model): 3598 """An elastic pool update. 3599 3600 :param sku: An ARM Resource SKU. 3601 :type sku: ~azure.mgmt.sql.models.Sku 3602 :param tags: A set of tags. Resource tags. 3603 :type tags: dict[str, str] 3604 :param max_size_bytes: The storage limit for the database elastic pool in bytes. 3605 :type max_size_bytes: long 3606 :param per_database_settings: The per database settings for the elastic pool. 3607 :type per_database_settings: ~azure.mgmt.sql.models.ElasticPoolPerDatabaseSettings 3608 :param zone_redundant: Whether or not this elastic pool is zone redundant, which means the 3609 replicas of this elastic pool will be spread across multiple availability zones. 3610 :type zone_redundant: bool 3611 :param license_type: The license type to apply for this elastic pool. Possible values include: 3612 "LicenseIncluded", "BasePrice". 3613 :type license_type: str or ~azure.mgmt.sql.models.ElasticPoolLicenseType 3614 :param maintenance_configuration_id: Maintenance configuration id assigned to the elastic pool. 3615 This configuration defines the period when the maintenance updates will will occur. 3616 :type maintenance_configuration_id: str 3617 """ 3618 3619 _attribute_map = { 3620 'sku': {'key': 'sku', 'type': 'Sku'}, 3621 'tags': {'key': 'tags', 'type': '{str}'}, 3622 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, 3623 'per_database_settings': {'key': 'properties.perDatabaseSettings', 'type': 'ElasticPoolPerDatabaseSettings'}, 3624 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, 3625 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, 3626 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 3627 } 3628 3629 def __init__( 3630 self, 3631 *, 3632 sku: Optional["Sku"] = None, 3633 tags: Optional[Dict[str, str]] = None, 3634 max_size_bytes: Optional[int] = None, 3635 per_database_settings: Optional["ElasticPoolPerDatabaseSettings"] = None, 3636 zone_redundant: Optional[bool] = None, 3637 license_type: Optional[Union[str, "ElasticPoolLicenseType"]] = None, 3638 maintenance_configuration_id: Optional[str] = None, 3639 **kwargs 3640 ): 3641 super(ElasticPoolUpdate, self).__init__(**kwargs) 3642 self.sku = sku 3643 self.tags = tags 3644 self.max_size_bytes = max_size_bytes 3645 self.per_database_settings = per_database_settings 3646 self.zone_redundant = zone_redundant 3647 self.license_type = license_type 3648 self.maintenance_configuration_id = maintenance_configuration_id 3649 3650 3651class EncryptionProtector(ProxyResource): 3652 """The server encryption protector. 3653 3654 Variables are only populated by the server, and will be ignored when sending a request. 3655 3656 :ivar id: Resource ID. 3657 :vartype id: str 3658 :ivar name: Resource name. 3659 :vartype name: str 3660 :ivar type: Resource type. 3661 :vartype type: str 3662 :ivar kind: Kind of encryption protector. This is metadata used for the Azure portal 3663 experience. 3664 :vartype kind: str 3665 :ivar location: Resource location. 3666 :vartype location: str 3667 :ivar subregion: Subregion of the encryption protector. 3668 :vartype subregion: str 3669 :param server_key_name: The name of the server key. 3670 :type server_key_name: str 3671 :param server_key_type: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. 3672 Possible values include: "ServiceManaged", "AzureKeyVault". 3673 :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType 3674 :ivar uri: The URI of the server key. 3675 :vartype uri: str 3676 :ivar thumbprint: Thumbprint of the server key. 3677 :vartype thumbprint: str 3678 :param auto_rotation_enabled: Key auto rotation opt-in flag. Either true or false. 3679 :type auto_rotation_enabled: bool 3680 """ 3681 3682 _validation = { 3683 'id': {'readonly': True}, 3684 'name': {'readonly': True}, 3685 'type': {'readonly': True}, 3686 'kind': {'readonly': True}, 3687 'location': {'readonly': True}, 3688 'subregion': {'readonly': True}, 3689 'uri': {'readonly': True}, 3690 'thumbprint': {'readonly': True}, 3691 } 3692 3693 _attribute_map = { 3694 'id': {'key': 'id', 'type': 'str'}, 3695 'name': {'key': 'name', 'type': 'str'}, 3696 'type': {'key': 'type', 'type': 'str'}, 3697 'kind': {'key': 'kind', 'type': 'str'}, 3698 'location': {'key': 'location', 'type': 'str'}, 3699 'subregion': {'key': 'properties.subregion', 'type': 'str'}, 3700 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, 3701 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, 3702 'uri': {'key': 'properties.uri', 'type': 'str'}, 3703 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, 3704 'auto_rotation_enabled': {'key': 'properties.autoRotationEnabled', 'type': 'bool'}, 3705 } 3706 3707 def __init__( 3708 self, 3709 *, 3710 server_key_name: Optional[str] = None, 3711 server_key_type: Optional[Union[str, "ServerKeyType"]] = None, 3712 auto_rotation_enabled: Optional[bool] = None, 3713 **kwargs 3714 ): 3715 super(EncryptionProtector, self).__init__(**kwargs) 3716 self.kind = None 3717 self.location = None 3718 self.subregion = None 3719 self.server_key_name = server_key_name 3720 self.server_key_type = server_key_type 3721 self.uri = None 3722 self.thumbprint = None 3723 self.auto_rotation_enabled = auto_rotation_enabled 3724 3725 3726class EncryptionProtectorListResult(msrest.serialization.Model): 3727 """A list of server encryption protectors. 3728 3729 Variables are only populated by the server, and will be ignored when sending a request. 3730 3731 :ivar value: Array of results. 3732 :vartype value: list[~azure.mgmt.sql.models.EncryptionProtector] 3733 :ivar next_link: Link to retrieve next page of results. 3734 :vartype next_link: str 3735 """ 3736 3737 _validation = { 3738 'value': {'readonly': True}, 3739 'next_link': {'readonly': True}, 3740 } 3741 3742 _attribute_map = { 3743 'value': {'key': 'value', 'type': '[EncryptionProtector]'}, 3744 'next_link': {'key': 'nextLink', 'type': 'str'}, 3745 } 3746 3747 def __init__( 3748 self, 3749 **kwargs 3750 ): 3751 super(EncryptionProtectorListResult, self).__init__(**kwargs) 3752 self.value = None 3753 self.next_link = None 3754 3755 3756class ExportDatabaseDefinition(msrest.serialization.Model): 3757 """Contains the information necessary to perform export database operation. 3758 3759 All required parameters must be populated in order to send to Azure. 3760 3761 :param storage_key_type: Required. Storage key type. Possible values include: 3762 "SharedAccessKey", "StorageAccessKey". 3763 :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType 3764 :param storage_key: Required. Storage key. 3765 :type storage_key: str 3766 :param storage_uri: Required. Storage Uri. 3767 :type storage_uri: str 3768 :param administrator_login: Required. Administrator login name. 3769 :type administrator_login: str 3770 :param administrator_login_password: Required. Administrator login password. 3771 :type administrator_login_password: str 3772 :param authentication_type: Authentication type. 3773 :type authentication_type: str 3774 :param network_isolation: Optional resource information to enable network isolation for 3775 request. 3776 :type network_isolation: ~azure.mgmt.sql.models.NetworkIsolationSettings 3777 """ 3778 3779 _validation = { 3780 'storage_key_type': {'required': True}, 3781 'storage_key': {'required': True}, 3782 'storage_uri': {'required': True}, 3783 'administrator_login': {'required': True}, 3784 'administrator_login_password': {'required': True}, 3785 } 3786 3787 _attribute_map = { 3788 'storage_key_type': {'key': 'storageKeyType', 'type': 'str'}, 3789 'storage_key': {'key': 'storageKey', 'type': 'str'}, 3790 'storage_uri': {'key': 'storageUri', 'type': 'str'}, 3791 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, 3792 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, 3793 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, 3794 'network_isolation': {'key': 'networkIsolation', 'type': 'NetworkIsolationSettings'}, 3795 } 3796 3797 def __init__( 3798 self, 3799 *, 3800 storage_key_type: Union[str, "StorageKeyType"], 3801 storage_key: str, 3802 storage_uri: str, 3803 administrator_login: str, 3804 administrator_login_password: str, 3805 authentication_type: Optional[str] = None, 3806 network_isolation: Optional["NetworkIsolationSettings"] = None, 3807 **kwargs 3808 ): 3809 super(ExportDatabaseDefinition, self).__init__(**kwargs) 3810 self.storage_key_type = storage_key_type 3811 self.storage_key = storage_key 3812 self.storage_uri = storage_uri 3813 self.administrator_login = administrator_login 3814 self.administrator_login_password = administrator_login_password 3815 self.authentication_type = authentication_type 3816 self.network_isolation = network_isolation 3817 3818 3819class ExtendedDatabaseBlobAuditingPolicy(ProxyResource): 3820 """An extended database blob auditing policy. 3821 3822 Variables are only populated by the server, and will be ignored when sending a request. 3823 3824 :ivar id: Resource ID. 3825 :vartype id: str 3826 :ivar name: Resource name. 3827 :vartype name: str 3828 :ivar type: Resource type. 3829 :vartype type: str 3830 :param predicate_expression: Specifies condition of where clause when creating an audit. 3831 :type predicate_expression: str 3832 :param retention_days: Specifies the number of days to keep in the audit logs in the storage 3833 account. 3834 :type retention_days: int 3835 :param audit_actions_and_groups: Specifies the Actions-Groups and Actions to audit. 3836 3837 The recommended set of action groups to use is the following combination - this will audit all 3838 the queries and stored procedures executed against the database, as well as successful and 3839 failed logins: 3840 3841 BATCH_COMPLETED_GROUP, 3842 SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, 3843 FAILED_DATABASE_AUTHENTICATION_GROUP. 3844 3845 This above combination is also the set that is configured by default when enabling auditing 3846 from the Azure portal. 3847 3848 The supported action groups to audit are (note: choose only specific groups that cover your 3849 auditing needs. Using unnecessary groups could lead to very large quantities of audit records): 3850 3851 APPLICATION_ROLE_CHANGE_PASSWORD_GROUP 3852 BACKUP_RESTORE_GROUP 3853 DATABASE_LOGOUT_GROUP 3854 DATABASE_OBJECT_CHANGE_GROUP 3855 DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP 3856 DATABASE_OBJECT_PERMISSION_CHANGE_GROUP 3857 DATABASE_OPERATION_GROUP 3858 DATABASE_PERMISSION_CHANGE_GROUP 3859 DATABASE_PRINCIPAL_CHANGE_GROUP 3860 DATABASE_PRINCIPAL_IMPERSONATION_GROUP 3861 DATABASE_ROLE_MEMBER_CHANGE_GROUP 3862 FAILED_DATABASE_AUTHENTICATION_GROUP 3863 SCHEMA_OBJECT_ACCESS_GROUP 3864 SCHEMA_OBJECT_CHANGE_GROUP 3865 SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP 3866 SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP 3867 SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP 3868 USER_CHANGE_PASSWORD_GROUP 3869 BATCH_STARTED_GROUP 3870 BATCH_COMPLETED_GROUP 3871 3872 These are groups that cover all sql statements and stored procedures executed against the 3873 database, and should not be used in combination with other groups as this will result in 3874 duplicate audit logs. 3875 3876 For more information, see `Database-Level Audit Action Groups 3877 <https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups>`_. 3878 3879 For Database auditing policy, specific Actions can also be specified (note that Actions cannot 3880 be specified for Server auditing policy). The supported actions to audit are: 3881 SELECT 3882 UPDATE 3883 INSERT 3884 DELETE 3885 EXECUTE 3886 RECEIVE 3887 REFERENCES 3888 3889 The general form for defining an action to be audited is: 3890 {action} ON {object} BY {principal} 3891 3892 Note that :code:`<object>` in the above format can refer to an object like a table, view, or 3893 stored procedure, or an entire database or schema. For the latter cases, the forms 3894 DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. 3895 3896 For example: 3897 SELECT on dbo.myTable by public 3898 SELECT on DATABASE::myDatabase by public 3899 SELECT on SCHEMA::mySchema by public 3900 3901 For more information, see `Database-Level Audit Actions 3902 <https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions>`_. 3903 :type audit_actions_and_groups: list[str] 3904 :param is_storage_secondary_key_in_use: Specifies whether storageAccountAccessKey value is the 3905 storage's secondary key. 3906 :type is_storage_secondary_key_in_use: bool 3907 :param is_azure_monitor_target_enabled: Specifies whether audit events are sent to Azure 3908 Monitor. 3909 In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 3910 'IsAzureMonitorTargetEnabled' as true. 3911 3912 When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' 3913 diagnostic logs category on the database should be also created. 3914 Note that for server level audit you should use the 'master' database as {databaseName}. 3915 3916 Diagnostic Settings URI format: 3917 PUT 3918 https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 3919 3920 For more information, see `Diagnostic Settings REST API 3921 <https://go.microsoft.com/fwlink/?linkid=2033207>`_ 3922 or `Diagnostic Settings PowerShell <https://go.microsoft.com/fwlink/?linkid=2033043>`_. 3923 :type is_azure_monitor_target_enabled: bool 3924 :param queue_delay_ms: Specifies the amount of time in milliseconds that can elapse before 3925 audit actions are forced to be processed. 3926 The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. 3927 :type queue_delay_ms: int 3928 :param state: Specifies the state of the audit. If state is Enabled, storageEndpoint or 3929 isAzureMonitorTargetEnabled are required. Possible values include: "Enabled", "Disabled". 3930 :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState 3931 :param storage_endpoint: Specifies the blob storage endpoint (e.g. 3932 https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or 3933 isAzureMonitorTargetEnabled is required. 3934 :type storage_endpoint: str 3935 :param storage_account_access_key: Specifies the identifier key of the auditing storage 3936 account. 3937 If state is Enabled and storageEndpoint is specified, not specifying the 3938 storageAccountAccessKey will use SQL server system-assigned managed identity to access the 3939 storage. 3940 Prerequisites for using managed identity authentication: 3941 3942 3943 #. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 3944 #. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data 3945 Contributor' RBAC role to the server identity. 3946 For more information, see `Auditing to storage using Managed Identity authentication 3947 <https://go.microsoft.com/fwlink/?linkid=2114355>`_. 3948 :type storage_account_access_key: str 3949 :param storage_account_subscription_id: Specifies the blob storage subscription Id. 3950 :type storage_account_subscription_id: str 3951 """ 3952 3953 _validation = { 3954 'id': {'readonly': True}, 3955 'name': {'readonly': True}, 3956 'type': {'readonly': True}, 3957 } 3958 3959 _attribute_map = { 3960 'id': {'key': 'id', 'type': 'str'}, 3961 'name': {'key': 'name', 'type': 'str'}, 3962 'type': {'key': 'type', 'type': 'str'}, 3963 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, 3964 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 3965 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, 3966 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 3967 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, 3968 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, 3969 'state': {'key': 'properties.state', 'type': 'str'}, 3970 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, 3971 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 3972 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 3973 } 3974 3975 def __init__( 3976 self, 3977 *, 3978 predicate_expression: Optional[str] = None, 3979 retention_days: Optional[int] = None, 3980 audit_actions_and_groups: Optional[List[str]] = None, 3981 is_storage_secondary_key_in_use: Optional[bool] = None, 3982 is_azure_monitor_target_enabled: Optional[bool] = None, 3983 queue_delay_ms: Optional[int] = None, 3984 state: Optional[Union[str, "BlobAuditingPolicyState"]] = None, 3985 storage_endpoint: Optional[str] = None, 3986 storage_account_access_key: Optional[str] = None, 3987 storage_account_subscription_id: Optional[str] = None, 3988 **kwargs 3989 ): 3990 super(ExtendedDatabaseBlobAuditingPolicy, self).__init__(**kwargs) 3991 self.predicate_expression = predicate_expression 3992 self.retention_days = retention_days 3993 self.audit_actions_and_groups = audit_actions_and_groups 3994 self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use 3995 self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled 3996 self.queue_delay_ms = queue_delay_ms 3997 self.state = state 3998 self.storage_endpoint = storage_endpoint 3999 self.storage_account_access_key = storage_account_access_key 4000 self.storage_account_subscription_id = storage_account_subscription_id 4001 4002 4003class ExtendedDatabaseBlobAuditingPolicyListResult(msrest.serialization.Model): 4004 """A list of database extended auditing settings. 4005 4006 Variables are only populated by the server, and will be ignored when sending a request. 4007 4008 :ivar value: Array of results. 4009 :vartype value: list[~azure.mgmt.sql.models.ExtendedDatabaseBlobAuditingPolicy] 4010 :ivar next_link: Link to retrieve next page of results. 4011 :vartype next_link: str 4012 """ 4013 4014 _validation = { 4015 'value': {'readonly': True}, 4016 'next_link': {'readonly': True}, 4017 } 4018 4019 _attribute_map = { 4020 'value': {'key': 'value', 'type': '[ExtendedDatabaseBlobAuditingPolicy]'}, 4021 'next_link': {'key': 'nextLink', 'type': 'str'}, 4022 } 4023 4024 def __init__( 4025 self, 4026 **kwargs 4027 ): 4028 super(ExtendedDatabaseBlobAuditingPolicyListResult, self).__init__(**kwargs) 4029 self.value = None 4030 self.next_link = None 4031 4032 4033class ExtendedServerBlobAuditingPolicy(ProxyResource): 4034 """An extended server blob auditing policy. 4035 4036 Variables are only populated by the server, and will be ignored when sending a request. 4037 4038 :ivar id: Resource ID. 4039 :vartype id: str 4040 :ivar name: Resource name. 4041 :vartype name: str 4042 :ivar type: Resource type. 4043 :vartype type: str 4044 :param is_devops_audit_enabled: Specifies the state of devops audit. If state is Enabled, 4045 devops logs will be sent to Azure Monitor. 4046 In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 4047 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true 4048 4049 When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' 4050 diagnostic logs category on the master database should also be created. 4051 4052 Diagnostic Settings URI format: 4053 PUT 4054 https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 4055 4056 For more information, see `Diagnostic Settings REST API 4057 <https://go.microsoft.com/fwlink/?linkid=2033207>`_ 4058 or `Diagnostic Settings PowerShell <https://go.microsoft.com/fwlink/?linkid=2033043>`_. 4059 :type is_devops_audit_enabled: bool 4060 :param predicate_expression: Specifies condition of where clause when creating an audit. 4061 :type predicate_expression: str 4062 :param retention_days: Specifies the number of days to keep in the audit logs in the storage 4063 account. 4064 :type retention_days: int 4065 :param audit_actions_and_groups: Specifies the Actions-Groups and Actions to audit. 4066 4067 The recommended set of action groups to use is the following combination - this will audit all 4068 the queries and stored procedures executed against the database, as well as successful and 4069 failed logins: 4070 4071 BATCH_COMPLETED_GROUP, 4072 SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, 4073 FAILED_DATABASE_AUTHENTICATION_GROUP. 4074 4075 This above combination is also the set that is configured by default when enabling auditing 4076 from the Azure portal. 4077 4078 The supported action groups to audit are (note: choose only specific groups that cover your 4079 auditing needs. Using unnecessary groups could lead to very large quantities of audit records): 4080 4081 APPLICATION_ROLE_CHANGE_PASSWORD_GROUP 4082 BACKUP_RESTORE_GROUP 4083 DATABASE_LOGOUT_GROUP 4084 DATABASE_OBJECT_CHANGE_GROUP 4085 DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP 4086 DATABASE_OBJECT_PERMISSION_CHANGE_GROUP 4087 DATABASE_OPERATION_GROUP 4088 DATABASE_PERMISSION_CHANGE_GROUP 4089 DATABASE_PRINCIPAL_CHANGE_GROUP 4090 DATABASE_PRINCIPAL_IMPERSONATION_GROUP 4091 DATABASE_ROLE_MEMBER_CHANGE_GROUP 4092 FAILED_DATABASE_AUTHENTICATION_GROUP 4093 SCHEMA_OBJECT_ACCESS_GROUP 4094 SCHEMA_OBJECT_CHANGE_GROUP 4095 SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP 4096 SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP 4097 SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP 4098 USER_CHANGE_PASSWORD_GROUP 4099 BATCH_STARTED_GROUP 4100 BATCH_COMPLETED_GROUP 4101 4102 These are groups that cover all sql statements and stored procedures executed against the 4103 database, and should not be used in combination with other groups as this will result in 4104 duplicate audit logs. 4105 4106 For more information, see `Database-Level Audit Action Groups 4107 <https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups>`_. 4108 4109 For Database auditing policy, specific Actions can also be specified (note that Actions cannot 4110 be specified for Server auditing policy). The supported actions to audit are: 4111 SELECT 4112 UPDATE 4113 INSERT 4114 DELETE 4115 EXECUTE 4116 RECEIVE 4117 REFERENCES 4118 4119 The general form for defining an action to be audited is: 4120 {action} ON {object} BY {principal} 4121 4122 Note that :code:`<object>` in the above format can refer to an object like a table, view, or 4123 stored procedure, or an entire database or schema. For the latter cases, the forms 4124 DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. 4125 4126 For example: 4127 SELECT on dbo.myTable by public 4128 SELECT on DATABASE::myDatabase by public 4129 SELECT on SCHEMA::mySchema by public 4130 4131 For more information, see `Database-Level Audit Actions 4132 <https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions>`_. 4133 :type audit_actions_and_groups: list[str] 4134 :param is_storage_secondary_key_in_use: Specifies whether storageAccountAccessKey value is the 4135 storage's secondary key. 4136 :type is_storage_secondary_key_in_use: bool 4137 :param is_azure_monitor_target_enabled: Specifies whether audit events are sent to Azure 4138 Monitor. 4139 In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 4140 'IsAzureMonitorTargetEnabled' as true. 4141 4142 When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' 4143 diagnostic logs category on the database should be also created. 4144 Note that for server level audit you should use the 'master' database as {databaseName}. 4145 4146 Diagnostic Settings URI format: 4147 PUT 4148 https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 4149 4150 For more information, see `Diagnostic Settings REST API 4151 <https://go.microsoft.com/fwlink/?linkid=2033207>`_ 4152 or `Diagnostic Settings PowerShell <https://go.microsoft.com/fwlink/?linkid=2033043>`_. 4153 :type is_azure_monitor_target_enabled: bool 4154 :param queue_delay_ms: Specifies the amount of time in milliseconds that can elapse before 4155 audit actions are forced to be processed. 4156 The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. 4157 :type queue_delay_ms: int 4158 :param state: Specifies the state of the audit. If state is Enabled, storageEndpoint or 4159 isAzureMonitorTargetEnabled are required. Possible values include: "Enabled", "Disabled". 4160 :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState 4161 :param storage_endpoint: Specifies the blob storage endpoint (e.g. 4162 https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or 4163 isAzureMonitorTargetEnabled is required. 4164 :type storage_endpoint: str 4165 :param storage_account_access_key: Specifies the identifier key of the auditing storage 4166 account. 4167 If state is Enabled and storageEndpoint is specified, not specifying the 4168 storageAccountAccessKey will use SQL server system-assigned managed identity to access the 4169 storage. 4170 Prerequisites for using managed identity authentication: 4171 4172 4173 #. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 4174 #. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data 4175 Contributor' RBAC role to the server identity. 4176 For more information, see `Auditing to storage using Managed Identity authentication 4177 <https://go.microsoft.com/fwlink/?linkid=2114355>`_. 4178 :type storage_account_access_key: str 4179 :param storage_account_subscription_id: Specifies the blob storage subscription Id. 4180 :type storage_account_subscription_id: str 4181 """ 4182 4183 _validation = { 4184 'id': {'readonly': True}, 4185 'name': {'readonly': True}, 4186 'type': {'readonly': True}, 4187 } 4188 4189 _attribute_map = { 4190 'id': {'key': 'id', 'type': 'str'}, 4191 'name': {'key': 'name', 'type': 'str'}, 4192 'type': {'key': 'type', 'type': 'str'}, 4193 'is_devops_audit_enabled': {'key': 'properties.isDevopsAuditEnabled', 'type': 'bool'}, 4194 'predicate_expression': {'key': 'properties.predicateExpression', 'type': 'str'}, 4195 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 4196 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, 4197 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 4198 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, 4199 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, 4200 'state': {'key': 'properties.state', 'type': 'str'}, 4201 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, 4202 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 4203 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 4204 } 4205 4206 def __init__( 4207 self, 4208 *, 4209 is_devops_audit_enabled: Optional[bool] = None, 4210 predicate_expression: Optional[str] = None, 4211 retention_days: Optional[int] = None, 4212 audit_actions_and_groups: Optional[List[str]] = None, 4213 is_storage_secondary_key_in_use: Optional[bool] = None, 4214 is_azure_monitor_target_enabled: Optional[bool] = None, 4215 queue_delay_ms: Optional[int] = None, 4216 state: Optional[Union[str, "BlobAuditingPolicyState"]] = None, 4217 storage_endpoint: Optional[str] = None, 4218 storage_account_access_key: Optional[str] = None, 4219 storage_account_subscription_id: Optional[str] = None, 4220 **kwargs 4221 ): 4222 super(ExtendedServerBlobAuditingPolicy, self).__init__(**kwargs) 4223 self.is_devops_audit_enabled = is_devops_audit_enabled 4224 self.predicate_expression = predicate_expression 4225 self.retention_days = retention_days 4226 self.audit_actions_and_groups = audit_actions_and_groups 4227 self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use 4228 self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled 4229 self.queue_delay_ms = queue_delay_ms 4230 self.state = state 4231 self.storage_endpoint = storage_endpoint 4232 self.storage_account_access_key = storage_account_access_key 4233 self.storage_account_subscription_id = storage_account_subscription_id 4234 4235 4236class ExtendedServerBlobAuditingPolicyListResult(msrest.serialization.Model): 4237 """A list of server extended auditing settings. 4238 4239 Variables are only populated by the server, and will be ignored when sending a request. 4240 4241 :ivar value: Array of results. 4242 :vartype value: list[~azure.mgmt.sql.models.ExtendedServerBlobAuditingPolicy] 4243 :ivar next_link: Link to retrieve next page of results. 4244 :vartype next_link: str 4245 """ 4246 4247 _validation = { 4248 'value': {'readonly': True}, 4249 'next_link': {'readonly': True}, 4250 } 4251 4252 _attribute_map = { 4253 'value': {'key': 'value', 'type': '[ExtendedServerBlobAuditingPolicy]'}, 4254 'next_link': {'key': 'nextLink', 'type': 'str'}, 4255 } 4256 4257 def __init__( 4258 self, 4259 **kwargs 4260 ): 4261 super(ExtendedServerBlobAuditingPolicyListResult, self).__init__(**kwargs) 4262 self.value = None 4263 self.next_link = None 4264 4265 4266class FailoverGroup(ProxyResource): 4267 """A failover group. 4268 4269 Variables are only populated by the server, and will be ignored when sending a request. 4270 4271 :ivar id: Resource ID. 4272 :vartype id: str 4273 :ivar name: Resource name. 4274 :vartype name: str 4275 :ivar type: Resource type. 4276 :vartype type: str 4277 :ivar location: Resource location. 4278 :vartype location: str 4279 :param tags: A set of tags. Resource tags. 4280 :type tags: dict[str, str] 4281 :param read_write_endpoint: Read-write endpoint of the failover group instance. 4282 :type read_write_endpoint: ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint 4283 :param read_only_endpoint: Read-only endpoint of the failover group instance. 4284 :type read_only_endpoint: ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint 4285 :ivar replication_role: Local replication role of the failover group instance. Possible values 4286 include: "Primary", "Secondary". 4287 :vartype replication_role: str or ~azure.mgmt.sql.models.FailoverGroupReplicationRole 4288 :ivar replication_state: Replication state of the failover group instance. 4289 :vartype replication_state: str 4290 :param partner_servers: List of partner server information for the failover group. 4291 :type partner_servers: list[~azure.mgmt.sql.models.PartnerInfo] 4292 :param databases: List of databases in the failover group. 4293 :type databases: list[str] 4294 """ 4295 4296 _validation = { 4297 'id': {'readonly': True}, 4298 'name': {'readonly': True}, 4299 'type': {'readonly': True}, 4300 'location': {'readonly': True}, 4301 'replication_role': {'readonly': True}, 4302 'replication_state': {'readonly': True}, 4303 } 4304 4305 _attribute_map = { 4306 'id': {'key': 'id', 'type': 'str'}, 4307 'name': {'key': 'name', 'type': 'str'}, 4308 'type': {'key': 'type', 'type': 'str'}, 4309 'location': {'key': 'location', 'type': 'str'}, 4310 'tags': {'key': 'tags', 'type': '{str}'}, 4311 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, 4312 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, 4313 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, 4314 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, 4315 'partner_servers': {'key': 'properties.partnerServers', 'type': '[PartnerInfo]'}, 4316 'databases': {'key': 'properties.databases', 'type': '[str]'}, 4317 } 4318 4319 def __init__( 4320 self, 4321 *, 4322 tags: Optional[Dict[str, str]] = None, 4323 read_write_endpoint: Optional["FailoverGroupReadWriteEndpoint"] = None, 4324 read_only_endpoint: Optional["FailoverGroupReadOnlyEndpoint"] = None, 4325 partner_servers: Optional[List["PartnerInfo"]] = None, 4326 databases: Optional[List[str]] = None, 4327 **kwargs 4328 ): 4329 super(FailoverGroup, self).__init__(**kwargs) 4330 self.location = None 4331 self.tags = tags 4332 self.read_write_endpoint = read_write_endpoint 4333 self.read_only_endpoint = read_only_endpoint 4334 self.replication_role = None 4335 self.replication_state = None 4336 self.partner_servers = partner_servers 4337 self.databases = databases 4338 4339 4340class FailoverGroupListResult(msrest.serialization.Model): 4341 """A list of failover groups. 4342 4343 Variables are only populated by the server, and will be ignored when sending a request. 4344 4345 :ivar value: Array of results. 4346 :vartype value: list[~azure.mgmt.sql.models.FailoverGroup] 4347 :ivar next_link: Link to retrieve next page of results. 4348 :vartype next_link: str 4349 """ 4350 4351 _validation = { 4352 'value': {'readonly': True}, 4353 'next_link': {'readonly': True}, 4354 } 4355 4356 _attribute_map = { 4357 'value': {'key': 'value', 'type': '[FailoverGroup]'}, 4358 'next_link': {'key': 'nextLink', 'type': 'str'}, 4359 } 4360 4361 def __init__( 4362 self, 4363 **kwargs 4364 ): 4365 super(FailoverGroupListResult, self).__init__(**kwargs) 4366 self.value = None 4367 self.next_link = None 4368 4369 4370class FailoverGroupReadOnlyEndpoint(msrest.serialization.Model): 4371 """Read-only endpoint of the failover group instance. 4372 4373 :param failover_policy: Failover policy of the read-only endpoint for the failover group. 4374 Possible values include: "Disabled", "Enabled". 4375 :type failover_policy: str or ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy 4376 """ 4377 4378 _attribute_map = { 4379 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, 4380 } 4381 4382 def __init__( 4383 self, 4384 *, 4385 failover_policy: Optional[Union[str, "ReadOnlyEndpointFailoverPolicy"]] = None, 4386 **kwargs 4387 ): 4388 super(FailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) 4389 self.failover_policy = failover_policy 4390 4391 4392class FailoverGroupReadWriteEndpoint(msrest.serialization.Model): 4393 """Read-write endpoint of the failover group instance. 4394 4395 All required parameters must be populated in order to send to Azure. 4396 4397 :param failover_policy: Required. Failover policy of the read-write endpoint for the failover 4398 group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. 4399 Possible values include: "Manual", "Automatic". 4400 :type failover_policy: str or ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy 4401 :param failover_with_data_loss_grace_period_minutes: Grace period before failover with data 4402 loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then 4403 failoverWithDataLossGracePeriodMinutes is required. 4404 :type failover_with_data_loss_grace_period_minutes: int 4405 """ 4406 4407 _validation = { 4408 'failover_policy': {'required': True}, 4409 } 4410 4411 _attribute_map = { 4412 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, 4413 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, 4414 } 4415 4416 def __init__( 4417 self, 4418 *, 4419 failover_policy: Union[str, "ReadWriteEndpointFailoverPolicy"], 4420 failover_with_data_loss_grace_period_minutes: Optional[int] = None, 4421 **kwargs 4422 ): 4423 super(FailoverGroupReadWriteEndpoint, self).__init__(**kwargs) 4424 self.failover_policy = failover_policy 4425 self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes 4426 4427 4428class FailoverGroupUpdate(msrest.serialization.Model): 4429 """A failover group update request. 4430 4431 :param tags: A set of tags. Resource tags. 4432 :type tags: dict[str, str] 4433 :param read_write_endpoint: Read-write endpoint of the failover group instance. 4434 :type read_write_endpoint: ~azure.mgmt.sql.models.FailoverGroupReadWriteEndpoint 4435 :param read_only_endpoint: Read-only endpoint of the failover group instance. 4436 :type read_only_endpoint: ~azure.mgmt.sql.models.FailoverGroupReadOnlyEndpoint 4437 :param databases: List of databases in the failover group. 4438 :type databases: list[str] 4439 """ 4440 4441 _attribute_map = { 4442 'tags': {'key': 'tags', 'type': '{str}'}, 4443 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'FailoverGroupReadWriteEndpoint'}, 4444 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'FailoverGroupReadOnlyEndpoint'}, 4445 'databases': {'key': 'properties.databases', 'type': '[str]'}, 4446 } 4447 4448 def __init__( 4449 self, 4450 *, 4451 tags: Optional[Dict[str, str]] = None, 4452 read_write_endpoint: Optional["FailoverGroupReadWriteEndpoint"] = None, 4453 read_only_endpoint: Optional["FailoverGroupReadOnlyEndpoint"] = None, 4454 databases: Optional[List[str]] = None, 4455 **kwargs 4456 ): 4457 super(FailoverGroupUpdate, self).__init__(**kwargs) 4458 self.tags = tags 4459 self.read_write_endpoint = read_write_endpoint 4460 self.read_only_endpoint = read_only_endpoint 4461 self.databases = databases 4462 4463 4464class ResourceWithWritableName(msrest.serialization.Model): 4465 """ARM resource. 4466 4467 Variables are only populated by the server, and will be ignored when sending a request. 4468 4469 :ivar id: Resource ID. 4470 :vartype id: str 4471 :param name: Resource name. 4472 :type name: str 4473 :ivar type: Resource type. 4474 :vartype type: str 4475 """ 4476 4477 _validation = { 4478 'id': {'readonly': True}, 4479 'type': {'readonly': True}, 4480 } 4481 4482 _attribute_map = { 4483 'id': {'key': 'id', 'type': 'str'}, 4484 'name': {'key': 'name', 'type': 'str'}, 4485 'type': {'key': 'type', 'type': 'str'}, 4486 } 4487 4488 def __init__( 4489 self, 4490 *, 4491 name: Optional[str] = None, 4492 **kwargs 4493 ): 4494 super(ResourceWithWritableName, self).__init__(**kwargs) 4495 self.id = None 4496 self.name = name 4497 self.type = None 4498 4499 4500class ProxyResourceWithWritableName(ResourceWithWritableName): 4501 """ARM proxy resource. 4502 4503 Variables are only populated by the server, and will be ignored when sending a request. 4504 4505 :ivar id: Resource ID. 4506 :vartype id: str 4507 :param name: Resource name. 4508 :type name: str 4509 :ivar type: Resource type. 4510 :vartype type: str 4511 """ 4512 4513 _validation = { 4514 'id': {'readonly': True}, 4515 'type': {'readonly': True}, 4516 } 4517 4518 _attribute_map = { 4519 'id': {'key': 'id', 'type': 'str'}, 4520 'name': {'key': 'name', 'type': 'str'}, 4521 'type': {'key': 'type', 'type': 'str'}, 4522 } 4523 4524 def __init__( 4525 self, 4526 *, 4527 name: Optional[str] = None, 4528 **kwargs 4529 ): 4530 super(ProxyResourceWithWritableName, self).__init__(name=name, **kwargs) 4531 4532 4533class FirewallRule(ProxyResourceWithWritableName): 4534 """A server firewall rule. 4535 4536 Variables are only populated by the server, and will be ignored when sending a request. 4537 4538 :ivar id: Resource ID. 4539 :vartype id: str 4540 :param name: Resource name. 4541 :type name: str 4542 :ivar type: Resource type. 4543 :vartype type: str 4544 :param start_ip_address: The start IP address of the firewall rule. Must be IPv4 format. Use 4545 value '0.0.0.0' for all Azure-internal IP addresses. 4546 :type start_ip_address: str 4547 :param end_ip_address: The end IP address of the firewall rule. Must be IPv4 format. Must be 4548 greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP 4549 addresses. 4550 :type end_ip_address: str 4551 """ 4552 4553 _validation = { 4554 'id': {'readonly': True}, 4555 'type': {'readonly': True}, 4556 } 4557 4558 _attribute_map = { 4559 'id': {'key': 'id', 'type': 'str'}, 4560 'name': {'key': 'name', 'type': 'str'}, 4561 'type': {'key': 'type', 'type': 'str'}, 4562 'start_ip_address': {'key': 'properties.startIpAddress', 'type': 'str'}, 4563 'end_ip_address': {'key': 'properties.endIpAddress', 'type': 'str'}, 4564 } 4565 4566 def __init__( 4567 self, 4568 *, 4569 name: Optional[str] = None, 4570 start_ip_address: Optional[str] = None, 4571 end_ip_address: Optional[str] = None, 4572 **kwargs 4573 ): 4574 super(FirewallRule, self).__init__(name=name, **kwargs) 4575 self.start_ip_address = start_ip_address 4576 self.end_ip_address = end_ip_address 4577 4578 4579class FirewallRuleList(msrest.serialization.Model): 4580 """A list of server firewall rules. 4581 4582 :param values: 4583 :type values: list[~azure.mgmt.sql.models.FirewallRule] 4584 """ 4585 4586 _attribute_map = { 4587 'values': {'key': 'values', 'type': '[FirewallRule]'}, 4588 } 4589 4590 def __init__( 4591 self, 4592 *, 4593 values: Optional[List["FirewallRule"]] = None, 4594 **kwargs 4595 ): 4596 super(FirewallRuleList, self).__init__(**kwargs) 4597 self.values = values 4598 4599 4600class FirewallRuleListResult(msrest.serialization.Model): 4601 """The response to a list firewall rules request. 4602 4603 Variables are only populated by the server, and will be ignored when sending a request. 4604 4605 :ivar value: Array of results. 4606 :vartype value: list[~azure.mgmt.sql.models.FirewallRule] 4607 :ivar next_link: Link to retrieve next page of results. 4608 :vartype next_link: str 4609 """ 4610 4611 _validation = { 4612 'value': {'readonly': True}, 4613 'next_link': {'readonly': True}, 4614 } 4615 4616 _attribute_map = { 4617 'value': {'key': 'value', 'type': '[FirewallRule]'}, 4618 'next_link': {'key': 'nextLink', 'type': 'str'}, 4619 } 4620 4621 def __init__( 4622 self, 4623 **kwargs 4624 ): 4625 super(FirewallRuleListResult, self).__init__(**kwargs) 4626 self.value = None 4627 self.next_link = None 4628 4629 4630class GeoBackupPolicy(ProxyResource): 4631 """A database geo backup policy. 4632 4633 Variables are only populated by the server, and will be ignored when sending a request. 4634 4635 All required parameters must be populated in order to send to Azure. 4636 4637 :ivar id: Resource ID. 4638 :vartype id: str 4639 :ivar name: Resource name. 4640 :vartype name: str 4641 :ivar type: Resource type. 4642 :vartype type: str 4643 :ivar kind: Kind of geo backup policy. This is metadata used for the Azure portal experience. 4644 :vartype kind: str 4645 :ivar location: Backup policy location. 4646 :vartype location: str 4647 :param state: Required. The state of the geo backup policy. Possible values include: 4648 "Disabled", "Enabled". 4649 :type state: str or ~azure.mgmt.sql.models.GeoBackupPolicyState 4650 :ivar storage_type: The storage type of the geo backup policy. 4651 :vartype storage_type: str 4652 """ 4653 4654 _validation = { 4655 'id': {'readonly': True}, 4656 'name': {'readonly': True}, 4657 'type': {'readonly': True}, 4658 'kind': {'readonly': True}, 4659 'location': {'readonly': True}, 4660 'state': {'required': True}, 4661 'storage_type': {'readonly': True}, 4662 } 4663 4664 _attribute_map = { 4665 'id': {'key': 'id', 'type': 'str'}, 4666 'name': {'key': 'name', 'type': 'str'}, 4667 'type': {'key': 'type', 'type': 'str'}, 4668 'kind': {'key': 'kind', 'type': 'str'}, 4669 'location': {'key': 'location', 'type': 'str'}, 4670 'state': {'key': 'properties.state', 'type': 'str'}, 4671 'storage_type': {'key': 'properties.storageType', 'type': 'str'}, 4672 } 4673 4674 def __init__( 4675 self, 4676 *, 4677 state: Union[str, "GeoBackupPolicyState"], 4678 **kwargs 4679 ): 4680 super(GeoBackupPolicy, self).__init__(**kwargs) 4681 self.kind = None 4682 self.location = None 4683 self.state = state 4684 self.storage_type = None 4685 4686 4687class GeoBackupPolicyListResult(msrest.serialization.Model): 4688 """The response to a list geo backup policies request. 4689 4690 :param value: The list of geo backup policies. 4691 :type value: list[~azure.mgmt.sql.models.GeoBackupPolicy] 4692 """ 4693 4694 _attribute_map = { 4695 'value': {'key': 'value', 'type': '[GeoBackupPolicy]'}, 4696 } 4697 4698 def __init__( 4699 self, 4700 *, 4701 value: Optional[List["GeoBackupPolicy"]] = None, 4702 **kwargs 4703 ): 4704 super(GeoBackupPolicyListResult, self).__init__(**kwargs) 4705 self.value = value 4706 4707 4708class ImportExistingDatabaseDefinition(msrest.serialization.Model): 4709 """Contains the information necessary to perform import operation for existing database. 4710 4711 All required parameters must be populated in order to send to Azure. 4712 4713 :param storage_key_type: Required. Storage key type. Possible values include: 4714 "SharedAccessKey", "StorageAccessKey". 4715 :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType 4716 :param storage_key: Required. Storage key. 4717 :type storage_key: str 4718 :param storage_uri: Required. Storage Uri. 4719 :type storage_uri: str 4720 :param administrator_login: Required. Administrator login name. 4721 :type administrator_login: str 4722 :param administrator_login_password: Required. Administrator login password. 4723 :type administrator_login_password: str 4724 :param authentication_type: Authentication type. 4725 :type authentication_type: str 4726 :param network_isolation: Optional resource information to enable network isolation for 4727 request. 4728 :type network_isolation: ~azure.mgmt.sql.models.NetworkIsolationSettings 4729 """ 4730 4731 _validation = { 4732 'storage_key_type': {'required': True}, 4733 'storage_key': {'required': True}, 4734 'storage_uri': {'required': True}, 4735 'administrator_login': {'required': True}, 4736 'administrator_login_password': {'required': True}, 4737 } 4738 4739 _attribute_map = { 4740 'storage_key_type': {'key': 'storageKeyType', 'type': 'str'}, 4741 'storage_key': {'key': 'storageKey', 'type': 'str'}, 4742 'storage_uri': {'key': 'storageUri', 'type': 'str'}, 4743 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, 4744 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, 4745 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, 4746 'network_isolation': {'key': 'networkIsolation', 'type': 'NetworkIsolationSettings'}, 4747 } 4748 4749 def __init__( 4750 self, 4751 *, 4752 storage_key_type: Union[str, "StorageKeyType"], 4753 storage_key: str, 4754 storage_uri: str, 4755 administrator_login: str, 4756 administrator_login_password: str, 4757 authentication_type: Optional[str] = None, 4758 network_isolation: Optional["NetworkIsolationSettings"] = None, 4759 **kwargs 4760 ): 4761 super(ImportExistingDatabaseDefinition, self).__init__(**kwargs) 4762 self.storage_key_type = storage_key_type 4763 self.storage_key = storage_key 4764 self.storage_uri = storage_uri 4765 self.administrator_login = administrator_login 4766 self.administrator_login_password = administrator_login_password 4767 self.authentication_type = authentication_type 4768 self.network_isolation = network_isolation 4769 4770 4771class ImportExportExtensionsOperationListResult(msrest.serialization.Model): 4772 """Import export operation extensions list. 4773 4774 Variables are only populated by the server, and will be ignored when sending a request. 4775 4776 :ivar value: Array of results. 4777 :vartype value: list[~azure.mgmt.sql.models.ImportExportExtensionsOperationResult] 4778 :ivar next_link: Link to retrieve next page of results. 4779 :vartype next_link: str 4780 """ 4781 4782 _validation = { 4783 'value': {'readonly': True}, 4784 'next_link': {'readonly': True}, 4785 } 4786 4787 _attribute_map = { 4788 'value': {'key': 'value', 'type': '[ImportExportExtensionsOperationResult]'}, 4789 'next_link': {'key': 'nextLink', 'type': 'str'}, 4790 } 4791 4792 def __init__( 4793 self, 4794 **kwargs 4795 ): 4796 super(ImportExportExtensionsOperationListResult, self).__init__(**kwargs) 4797 self.value = None 4798 self.next_link = None 4799 4800 4801class ImportExportExtensionsOperationResult(ProxyResource): 4802 """An Extension operation result resource. 4803 4804 Variables are only populated by the server, and will be ignored when sending a request. 4805 4806 :ivar id: Resource ID. 4807 :vartype id: str 4808 :ivar name: Resource name. 4809 :vartype name: str 4810 :ivar type: Resource type. 4811 :vartype type: str 4812 :ivar request_id: Request Id. 4813 :vartype request_id: str 4814 :ivar request_type: Request type. 4815 :vartype request_type: str 4816 :ivar last_modified_time: Last modified time. 4817 :vartype last_modified_time: str 4818 :ivar server_name: Server name. 4819 :vartype server_name: str 4820 :ivar database_name: Database name. 4821 :vartype database_name: str 4822 :ivar status: Operation status. 4823 :vartype status: str 4824 :ivar error_message: Error message. 4825 :vartype error_message: str 4826 """ 4827 4828 _validation = { 4829 'id': {'readonly': True}, 4830 'name': {'readonly': True}, 4831 'type': {'readonly': True}, 4832 'request_id': {'readonly': True}, 4833 'request_type': {'readonly': True}, 4834 'last_modified_time': {'readonly': True}, 4835 'server_name': {'readonly': True}, 4836 'database_name': {'readonly': True}, 4837 'status': {'readonly': True}, 4838 'error_message': {'readonly': True}, 4839 } 4840 4841 _attribute_map = { 4842 'id': {'key': 'id', 'type': 'str'}, 4843 'name': {'key': 'name', 'type': 'str'}, 4844 'type': {'key': 'type', 'type': 'str'}, 4845 'request_id': {'key': 'properties.requestId', 'type': 'str'}, 4846 'request_type': {'key': 'properties.requestType', 'type': 'str'}, 4847 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, 4848 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 4849 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 4850 'status': {'key': 'properties.status', 'type': 'str'}, 4851 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, 4852 } 4853 4854 def __init__( 4855 self, 4856 **kwargs 4857 ): 4858 super(ImportExportExtensionsOperationResult, self).__init__(**kwargs) 4859 self.request_id = None 4860 self.request_type = None 4861 self.last_modified_time = None 4862 self.server_name = None 4863 self.database_name = None 4864 self.status = None 4865 self.error_message = None 4866 4867 4868class ImportExportOperationResult(ProxyResource): 4869 """An ImportExport operation result resource. 4870 4871 Variables are only populated by the server, and will be ignored when sending a request. 4872 4873 :ivar id: Resource ID. 4874 :vartype id: str 4875 :ivar name: Resource name. 4876 :vartype name: str 4877 :ivar type: Resource type. 4878 :vartype type: str 4879 :ivar request_id: Request Id. 4880 :vartype request_id: str 4881 :ivar request_type: Request type. 4882 :vartype request_type: str 4883 :ivar queued_time: Queued time. 4884 :vartype queued_time: str 4885 :ivar last_modified_time: Last modified time. 4886 :vartype last_modified_time: str 4887 :ivar blob_uri: Blob Uri. 4888 :vartype blob_uri: str 4889 :ivar server_name: Server name. 4890 :vartype server_name: str 4891 :ivar database_name: Database name. 4892 :vartype database_name: str 4893 :ivar status: Operation status. 4894 :vartype status: str 4895 :ivar error_message: Error message. 4896 :vartype error_message: str 4897 :ivar private_endpoint_connections: Gets the status of private endpoints associated with this 4898 request. 4899 :vartype private_endpoint_connections: 4900 list[~azure.mgmt.sql.models.PrivateEndpointConnectionRequestStatus] 4901 """ 4902 4903 _validation = { 4904 'id': {'readonly': True}, 4905 'name': {'readonly': True}, 4906 'type': {'readonly': True}, 4907 'request_id': {'readonly': True}, 4908 'request_type': {'readonly': True}, 4909 'queued_time': {'readonly': True}, 4910 'last_modified_time': {'readonly': True}, 4911 'blob_uri': {'readonly': True}, 4912 'server_name': {'readonly': True}, 4913 'database_name': {'readonly': True}, 4914 'status': {'readonly': True}, 4915 'error_message': {'readonly': True}, 4916 'private_endpoint_connections': {'readonly': True}, 4917 } 4918 4919 _attribute_map = { 4920 'id': {'key': 'id', 'type': 'str'}, 4921 'name': {'key': 'name', 'type': 'str'}, 4922 'type': {'key': 'type', 'type': 'str'}, 4923 'request_id': {'key': 'properties.requestId', 'type': 'str'}, 4924 'request_type': {'key': 'properties.requestType', 'type': 'str'}, 4925 'queued_time': {'key': 'properties.queuedTime', 'type': 'str'}, 4926 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'str'}, 4927 'blob_uri': {'key': 'properties.blobUri', 'type': 'str'}, 4928 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 4929 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 4930 'status': {'key': 'properties.status', 'type': 'str'}, 4931 'error_message': {'key': 'properties.errorMessage', 'type': 'str'}, 4932 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnectionRequestStatus]'}, 4933 } 4934 4935 def __init__( 4936 self, 4937 **kwargs 4938 ): 4939 super(ImportExportOperationResult, self).__init__(**kwargs) 4940 self.request_id = None 4941 self.request_type = None 4942 self.queued_time = None 4943 self.last_modified_time = None 4944 self.blob_uri = None 4945 self.server_name = None 4946 self.database_name = None 4947 self.status = None 4948 self.error_message = None 4949 self.private_endpoint_connections = None 4950 4951 4952class ImportNewDatabaseDefinition(msrest.serialization.Model): 4953 """Contains the information necessary to perform import operation for new database. 4954 4955 All required parameters must be populated in order to send to Azure. 4956 4957 :param database_name: Name of the import database. 4958 :type database_name: str 4959 :param edition: Edition of the import database. 4960 :type edition: str 4961 :param service_objective_name: Service level objective name of the import database. 4962 :type service_objective_name: str 4963 :param max_size_bytes: Max size in bytes for the import database. 4964 :type max_size_bytes: str 4965 :param storage_key_type: Required. Storage key type. Possible values include: 4966 "SharedAccessKey", "StorageAccessKey". 4967 :type storage_key_type: str or ~azure.mgmt.sql.models.StorageKeyType 4968 :param storage_key: Required. Storage key. 4969 :type storage_key: str 4970 :param storage_uri: Required. Storage Uri. 4971 :type storage_uri: str 4972 :param administrator_login: Required. Administrator login name. 4973 :type administrator_login: str 4974 :param administrator_login_password: Required. Administrator login password. 4975 :type administrator_login_password: str 4976 :param authentication_type: Authentication type. 4977 :type authentication_type: str 4978 :param network_isolation: Optional resource information to enable network isolation for 4979 request. 4980 :type network_isolation: ~azure.mgmt.sql.models.NetworkIsolationSettings 4981 """ 4982 4983 _validation = { 4984 'storage_key_type': {'required': True}, 4985 'storage_key': {'required': True}, 4986 'storage_uri': {'required': True}, 4987 'administrator_login': {'required': True}, 4988 'administrator_login_password': {'required': True}, 4989 } 4990 4991 _attribute_map = { 4992 'database_name': {'key': 'databaseName', 'type': 'str'}, 4993 'edition': {'key': 'edition', 'type': 'str'}, 4994 'service_objective_name': {'key': 'serviceObjectiveName', 'type': 'str'}, 4995 'max_size_bytes': {'key': 'maxSizeBytes', 'type': 'str'}, 4996 'storage_key_type': {'key': 'storageKeyType', 'type': 'str'}, 4997 'storage_key': {'key': 'storageKey', 'type': 'str'}, 4998 'storage_uri': {'key': 'storageUri', 'type': 'str'}, 4999 'administrator_login': {'key': 'administratorLogin', 'type': 'str'}, 5000 'administrator_login_password': {'key': 'administratorLoginPassword', 'type': 'str'}, 5001 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, 5002 'network_isolation': {'key': 'networkIsolation', 'type': 'NetworkIsolationSettings'}, 5003 } 5004 5005 def __init__( 5006 self, 5007 *, 5008 storage_key_type: Union[str, "StorageKeyType"], 5009 storage_key: str, 5010 storage_uri: str, 5011 administrator_login: str, 5012 administrator_login_password: str, 5013 database_name: Optional[str] = None, 5014 edition: Optional[str] = None, 5015 service_objective_name: Optional[str] = None, 5016 max_size_bytes: Optional[str] = None, 5017 authentication_type: Optional[str] = None, 5018 network_isolation: Optional["NetworkIsolationSettings"] = None, 5019 **kwargs 5020 ): 5021 super(ImportNewDatabaseDefinition, self).__init__(**kwargs) 5022 self.database_name = database_name 5023 self.edition = edition 5024 self.service_objective_name = service_objective_name 5025 self.max_size_bytes = max_size_bytes 5026 self.storage_key_type = storage_key_type 5027 self.storage_key = storage_key 5028 self.storage_uri = storage_uri 5029 self.administrator_login = administrator_login 5030 self.administrator_login_password = administrator_login_password 5031 self.authentication_type = authentication_type 5032 self.network_isolation = network_isolation 5033 5034 5035class InstanceFailoverGroup(ProxyResource): 5036 """An instance failover group. 5037 5038 Variables are only populated by the server, and will be ignored when sending a request. 5039 5040 :ivar id: Resource ID. 5041 :vartype id: str 5042 :ivar name: Resource name. 5043 :vartype name: str 5044 :ivar type: Resource type. 5045 :vartype type: str 5046 :param read_write_endpoint: Read-write endpoint of the failover group instance. 5047 :type read_write_endpoint: ~azure.mgmt.sql.models.InstanceFailoverGroupReadWriteEndpoint 5048 :param read_only_endpoint: Read-only endpoint of the failover group instance. 5049 :type read_only_endpoint: ~azure.mgmt.sql.models.InstanceFailoverGroupReadOnlyEndpoint 5050 :ivar replication_role: Local replication role of the failover group instance. Possible values 5051 include: "Primary", "Secondary". 5052 :vartype replication_role: str or ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole 5053 :ivar replication_state: Replication state of the failover group instance. 5054 :vartype replication_state: str 5055 :param partner_regions: Partner region information for the failover group. 5056 :type partner_regions: list[~azure.mgmt.sql.models.PartnerRegionInfo] 5057 :param managed_instance_pairs: List of managed instance pairs in the failover group. 5058 :type managed_instance_pairs: list[~azure.mgmt.sql.models.ManagedInstancePairInfo] 5059 """ 5060 5061 _validation = { 5062 'id': {'readonly': True}, 5063 'name': {'readonly': True}, 5064 'type': {'readonly': True}, 5065 'replication_role': {'readonly': True}, 5066 'replication_state': {'readonly': True}, 5067 } 5068 5069 _attribute_map = { 5070 'id': {'key': 'id', 'type': 'str'}, 5071 'name': {'key': 'name', 'type': 'str'}, 5072 'type': {'key': 'type', 'type': 'str'}, 5073 'read_write_endpoint': {'key': 'properties.readWriteEndpoint', 'type': 'InstanceFailoverGroupReadWriteEndpoint'}, 5074 'read_only_endpoint': {'key': 'properties.readOnlyEndpoint', 'type': 'InstanceFailoverGroupReadOnlyEndpoint'}, 5075 'replication_role': {'key': 'properties.replicationRole', 'type': 'str'}, 5076 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, 5077 'partner_regions': {'key': 'properties.partnerRegions', 'type': '[PartnerRegionInfo]'}, 5078 'managed_instance_pairs': {'key': 'properties.managedInstancePairs', 'type': '[ManagedInstancePairInfo]'}, 5079 } 5080 5081 def __init__( 5082 self, 5083 *, 5084 read_write_endpoint: Optional["InstanceFailoverGroupReadWriteEndpoint"] = None, 5085 read_only_endpoint: Optional["InstanceFailoverGroupReadOnlyEndpoint"] = None, 5086 partner_regions: Optional[List["PartnerRegionInfo"]] = None, 5087 managed_instance_pairs: Optional[List["ManagedInstancePairInfo"]] = None, 5088 **kwargs 5089 ): 5090 super(InstanceFailoverGroup, self).__init__(**kwargs) 5091 self.read_write_endpoint = read_write_endpoint 5092 self.read_only_endpoint = read_only_endpoint 5093 self.replication_role = None 5094 self.replication_state = None 5095 self.partner_regions = partner_regions 5096 self.managed_instance_pairs = managed_instance_pairs 5097 5098 5099class InstanceFailoverGroupListResult(msrest.serialization.Model): 5100 """A list of instance failover groups. 5101 5102 Variables are only populated by the server, and will be ignored when sending a request. 5103 5104 :ivar value: Array of results. 5105 :vartype value: list[~azure.mgmt.sql.models.InstanceFailoverGroup] 5106 :ivar next_link: Link to retrieve next page of results. 5107 :vartype next_link: str 5108 """ 5109 5110 _validation = { 5111 'value': {'readonly': True}, 5112 'next_link': {'readonly': True}, 5113 } 5114 5115 _attribute_map = { 5116 'value': {'key': 'value', 'type': '[InstanceFailoverGroup]'}, 5117 'next_link': {'key': 'nextLink', 'type': 'str'}, 5118 } 5119 5120 def __init__( 5121 self, 5122 **kwargs 5123 ): 5124 super(InstanceFailoverGroupListResult, self).__init__(**kwargs) 5125 self.value = None 5126 self.next_link = None 5127 5128 5129class InstanceFailoverGroupReadOnlyEndpoint(msrest.serialization.Model): 5130 """Read-only endpoint of the failover group instance. 5131 5132 :param failover_policy: Failover policy of the read-only endpoint for the failover group. 5133 Possible values include: "Disabled", "Enabled". 5134 :type failover_policy: str or ~azure.mgmt.sql.models.ReadOnlyEndpointFailoverPolicy 5135 """ 5136 5137 _attribute_map = { 5138 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, 5139 } 5140 5141 def __init__( 5142 self, 5143 *, 5144 failover_policy: Optional[Union[str, "ReadOnlyEndpointFailoverPolicy"]] = None, 5145 **kwargs 5146 ): 5147 super(InstanceFailoverGroupReadOnlyEndpoint, self).__init__(**kwargs) 5148 self.failover_policy = failover_policy 5149 5150 5151class InstanceFailoverGroupReadWriteEndpoint(msrest.serialization.Model): 5152 """Read-write endpoint of the failover group instance. 5153 5154 All required parameters must be populated in order to send to Azure. 5155 5156 :param failover_policy: Required. Failover policy of the read-write endpoint for the failover 5157 group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. 5158 Possible values include: "Manual", "Automatic". 5159 :type failover_policy: str or ~azure.mgmt.sql.models.ReadWriteEndpointFailoverPolicy 5160 :param failover_with_data_loss_grace_period_minutes: Grace period before failover with data 5161 loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then 5162 failoverWithDataLossGracePeriodMinutes is required. 5163 :type failover_with_data_loss_grace_period_minutes: int 5164 """ 5165 5166 _validation = { 5167 'failover_policy': {'required': True}, 5168 } 5169 5170 _attribute_map = { 5171 'failover_policy': {'key': 'failoverPolicy', 'type': 'str'}, 5172 'failover_with_data_loss_grace_period_minutes': {'key': 'failoverWithDataLossGracePeriodMinutes', 'type': 'int'}, 5173 } 5174 5175 def __init__( 5176 self, 5177 *, 5178 failover_policy: Union[str, "ReadWriteEndpointFailoverPolicy"], 5179 failover_with_data_loss_grace_period_minutes: Optional[int] = None, 5180 **kwargs 5181 ): 5182 super(InstanceFailoverGroupReadWriteEndpoint, self).__init__(**kwargs) 5183 self.failover_policy = failover_policy 5184 self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes 5185 5186 5187class InstancePool(TrackedResource): 5188 """An Azure SQL instance pool. 5189 5190 Variables are only populated by the server, and will be ignored when sending a request. 5191 5192 All required parameters must be populated in order to send to Azure. 5193 5194 :ivar id: Resource ID. 5195 :vartype id: str 5196 :ivar name: Resource name. 5197 :vartype name: str 5198 :ivar type: Resource type. 5199 :vartype type: str 5200 :param location: Required. Resource location. 5201 :type location: str 5202 :param tags: A set of tags. Resource tags. 5203 :type tags: dict[str, str] 5204 :param sku: The name and tier of the SKU. 5205 :type sku: ~azure.mgmt.sql.models.Sku 5206 :param subnet_id: Resource ID of the subnet to place this instance pool in. 5207 :type subnet_id: str 5208 :param v_cores: Count of vCores belonging to this instance pool. 5209 :type v_cores: int 5210 :param license_type: The license type. Possible values are 'LicenseIncluded' (price for SQL 5211 license is included) and 'BasePrice' (without SQL license price). Possible values include: 5212 "LicenseIncluded", "BasePrice". 5213 :type license_type: str or ~azure.mgmt.sql.models.InstancePoolLicenseType 5214 """ 5215 5216 _validation = { 5217 'id': {'readonly': True}, 5218 'name': {'readonly': True}, 5219 'type': {'readonly': True}, 5220 'location': {'required': True}, 5221 } 5222 5223 _attribute_map = { 5224 'id': {'key': 'id', 'type': 'str'}, 5225 'name': {'key': 'name', 'type': 'str'}, 5226 'type': {'key': 'type', 'type': 'str'}, 5227 'location': {'key': 'location', 'type': 'str'}, 5228 'tags': {'key': 'tags', 'type': '{str}'}, 5229 'sku': {'key': 'sku', 'type': 'Sku'}, 5230 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, 5231 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, 5232 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, 5233 } 5234 5235 def __init__( 5236 self, 5237 *, 5238 location: str, 5239 tags: Optional[Dict[str, str]] = None, 5240 sku: Optional["Sku"] = None, 5241 subnet_id: Optional[str] = None, 5242 v_cores: Optional[int] = None, 5243 license_type: Optional[Union[str, "InstancePoolLicenseType"]] = None, 5244 **kwargs 5245 ): 5246 super(InstancePool, self).__init__(location=location, tags=tags, **kwargs) 5247 self.sku = sku 5248 self.subnet_id = subnet_id 5249 self.v_cores = v_cores 5250 self.license_type = license_type 5251 5252 5253class InstancePoolEditionCapability(msrest.serialization.Model): 5254 """The instance pool capability. 5255 5256 Variables are only populated by the server, and will be ignored when sending a request. 5257 5258 :ivar name: The instance pool version name. 5259 :vartype name: str 5260 :ivar supported_families: The supported families. 5261 :vartype supported_families: list[~azure.mgmt.sql.models.InstancePoolFamilyCapability] 5262 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 5263 "Default", "Disabled". 5264 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 5265 :param reason: The reason for the capability not being available. 5266 :type reason: str 5267 """ 5268 5269 _validation = { 5270 'name': {'readonly': True}, 5271 'supported_families': {'readonly': True}, 5272 'status': {'readonly': True}, 5273 } 5274 5275 _attribute_map = { 5276 'name': {'key': 'name', 'type': 'str'}, 5277 'supported_families': {'key': 'supportedFamilies', 'type': '[InstancePoolFamilyCapability]'}, 5278 'status': {'key': 'status', 'type': 'str'}, 5279 'reason': {'key': 'reason', 'type': 'str'}, 5280 } 5281 5282 def __init__( 5283 self, 5284 *, 5285 reason: Optional[str] = None, 5286 **kwargs 5287 ): 5288 super(InstancePoolEditionCapability, self).__init__(**kwargs) 5289 self.name = None 5290 self.supported_families = None 5291 self.status = None 5292 self.reason = reason 5293 5294 5295class InstancePoolFamilyCapability(msrest.serialization.Model): 5296 """The instance pool family capability. 5297 5298 Variables are only populated by the server, and will be ignored when sending a request. 5299 5300 :ivar name: Family name. 5301 :vartype name: str 5302 :ivar supported_license_types: List of supported license types. 5303 :vartype supported_license_types: list[~azure.mgmt.sql.models.LicenseTypeCapability] 5304 :ivar supported_vcores_values: List of supported virtual cores values. 5305 :vartype supported_vcores_values: list[~azure.mgmt.sql.models.InstancePoolVcoresCapability] 5306 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 5307 "Default", "Disabled". 5308 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 5309 :param reason: The reason for the capability not being available. 5310 :type reason: str 5311 """ 5312 5313 _validation = { 5314 'name': {'readonly': True}, 5315 'supported_license_types': {'readonly': True}, 5316 'supported_vcores_values': {'readonly': True}, 5317 'status': {'readonly': True}, 5318 } 5319 5320 _attribute_map = { 5321 'name': {'key': 'name', 'type': 'str'}, 5322 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, 5323 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[InstancePoolVcoresCapability]'}, 5324 'status': {'key': 'status', 'type': 'str'}, 5325 'reason': {'key': 'reason', 'type': 'str'}, 5326 } 5327 5328 def __init__( 5329 self, 5330 *, 5331 reason: Optional[str] = None, 5332 **kwargs 5333 ): 5334 super(InstancePoolFamilyCapability, self).__init__(**kwargs) 5335 self.name = None 5336 self.supported_license_types = None 5337 self.supported_vcores_values = None 5338 self.status = None 5339 self.reason = reason 5340 5341 5342class InstancePoolListResult(msrest.serialization.Model): 5343 """A list of Azure SQL instance pools. 5344 5345 Variables are only populated by the server, and will be ignored when sending a request. 5346 5347 :ivar value: Array of results. 5348 :vartype value: list[~azure.mgmt.sql.models.InstancePool] 5349 :ivar next_link: Link to retrieve next page of results. 5350 :vartype next_link: str 5351 """ 5352 5353 _validation = { 5354 'value': {'readonly': True}, 5355 'next_link': {'readonly': True}, 5356 } 5357 5358 _attribute_map = { 5359 'value': {'key': 'value', 'type': '[InstancePool]'}, 5360 'next_link': {'key': 'nextLink', 'type': 'str'}, 5361 } 5362 5363 def __init__( 5364 self, 5365 **kwargs 5366 ): 5367 super(InstancePoolListResult, self).__init__(**kwargs) 5368 self.value = None 5369 self.next_link = None 5370 5371 5372class InstancePoolUpdate(msrest.serialization.Model): 5373 """An update to an Instance pool. 5374 5375 :param tags: A set of tags. Resource tags. 5376 :type tags: dict[str, str] 5377 """ 5378 5379 _attribute_map = { 5380 'tags': {'key': 'tags', 'type': '{str}'}, 5381 } 5382 5383 def __init__( 5384 self, 5385 *, 5386 tags: Optional[Dict[str, str]] = None, 5387 **kwargs 5388 ): 5389 super(InstancePoolUpdate, self).__init__(**kwargs) 5390 self.tags = tags 5391 5392 5393class InstancePoolVcoresCapability(msrest.serialization.Model): 5394 """The managed instance virtual cores capability. 5395 5396 Variables are only populated by the server, and will be ignored when sending a request. 5397 5398 :ivar name: The virtual cores identifier. 5399 :vartype name: str 5400 :ivar value: The virtual cores value. 5401 :vartype value: int 5402 :ivar storage_limit: Storage limit. 5403 :vartype storage_limit: ~azure.mgmt.sql.models.MaxSizeCapability 5404 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 5405 "Default", "Disabled". 5406 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 5407 :param reason: The reason for the capability not being available. 5408 :type reason: str 5409 """ 5410 5411 _validation = { 5412 'name': {'readonly': True}, 5413 'value': {'readonly': True}, 5414 'storage_limit': {'readonly': True}, 5415 'status': {'readonly': True}, 5416 } 5417 5418 _attribute_map = { 5419 'name': {'key': 'name', 'type': 'str'}, 5420 'value': {'key': 'value', 'type': 'int'}, 5421 'storage_limit': {'key': 'storageLimit', 'type': 'MaxSizeCapability'}, 5422 'status': {'key': 'status', 'type': 'str'}, 5423 'reason': {'key': 'reason', 'type': 'str'}, 5424 } 5425 5426 def __init__( 5427 self, 5428 *, 5429 reason: Optional[str] = None, 5430 **kwargs 5431 ): 5432 super(InstancePoolVcoresCapability, self).__init__(**kwargs) 5433 self.name = None 5434 self.value = None 5435 self.storage_limit = None 5436 self.status = None 5437 self.reason = reason 5438 5439 5440class Job(ProxyResource): 5441 """A job. 5442 5443 Variables are only populated by the server, and will be ignored when sending a request. 5444 5445 :ivar id: Resource ID. 5446 :vartype id: str 5447 :ivar name: Resource name. 5448 :vartype name: str 5449 :ivar type: Resource type. 5450 :vartype type: str 5451 :param description: User-defined description of the job. 5452 :type description: str 5453 :ivar version: The job version number. 5454 :vartype version: int 5455 :param schedule: Schedule properties of the job. 5456 :type schedule: ~azure.mgmt.sql.models.JobSchedule 5457 """ 5458 5459 _validation = { 5460 'id': {'readonly': True}, 5461 'name': {'readonly': True}, 5462 'type': {'readonly': True}, 5463 'version': {'readonly': True}, 5464 } 5465 5466 _attribute_map = { 5467 'id': {'key': 'id', 'type': 'str'}, 5468 'name': {'key': 'name', 'type': 'str'}, 5469 'type': {'key': 'type', 'type': 'str'}, 5470 'description': {'key': 'properties.description', 'type': 'str'}, 5471 'version': {'key': 'properties.version', 'type': 'int'}, 5472 'schedule': {'key': 'properties.schedule', 'type': 'JobSchedule'}, 5473 } 5474 5475 def __init__( 5476 self, 5477 *, 5478 description: Optional[str] = "", 5479 schedule: Optional["JobSchedule"] = None, 5480 **kwargs 5481 ): 5482 super(Job, self).__init__(**kwargs) 5483 self.description = description 5484 self.version = None 5485 self.schedule = schedule 5486 5487 5488class JobAgent(TrackedResource): 5489 """An Azure SQL job agent. 5490 5491 Variables are only populated by the server, and will be ignored when sending a request. 5492 5493 All required parameters must be populated in order to send to Azure. 5494 5495 :ivar id: Resource ID. 5496 :vartype id: str 5497 :ivar name: Resource name. 5498 :vartype name: str 5499 :ivar type: Resource type. 5500 :vartype type: str 5501 :param location: Required. Resource location. 5502 :type location: str 5503 :param tags: A set of tags. Resource tags. 5504 :type tags: dict[str, str] 5505 :param sku: The name and tier of the SKU. 5506 :type sku: ~azure.mgmt.sql.models.Sku 5507 :param database_id: Resource ID of the database to store job metadata in. 5508 :type database_id: str 5509 :ivar state: The state of the job agent. Possible values include: "Creating", "Ready", 5510 "Updating", "Deleting", "Disabled". 5511 :vartype state: str or ~azure.mgmt.sql.models.JobAgentState 5512 """ 5513 5514 _validation = { 5515 'id': {'readonly': True}, 5516 'name': {'readonly': True}, 5517 'type': {'readonly': True}, 5518 'location': {'required': True}, 5519 'state': {'readonly': True}, 5520 } 5521 5522 _attribute_map = { 5523 'id': {'key': 'id', 'type': 'str'}, 5524 'name': {'key': 'name', 'type': 'str'}, 5525 'type': {'key': 'type', 'type': 'str'}, 5526 'location': {'key': 'location', 'type': 'str'}, 5527 'tags': {'key': 'tags', 'type': '{str}'}, 5528 'sku': {'key': 'sku', 'type': 'Sku'}, 5529 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, 5530 'state': {'key': 'properties.state', 'type': 'str'}, 5531 } 5532 5533 def __init__( 5534 self, 5535 *, 5536 location: str, 5537 tags: Optional[Dict[str, str]] = None, 5538 sku: Optional["Sku"] = None, 5539 database_id: Optional[str] = None, 5540 **kwargs 5541 ): 5542 super(JobAgent, self).__init__(location=location, tags=tags, **kwargs) 5543 self.sku = sku 5544 self.database_id = database_id 5545 self.state = None 5546 5547 5548class JobAgentListResult(msrest.serialization.Model): 5549 """A list of Azure SQL job agents. 5550 5551 Variables are only populated by the server, and will be ignored when sending a request. 5552 5553 :ivar value: Array of results. 5554 :vartype value: list[~azure.mgmt.sql.models.JobAgent] 5555 :ivar next_link: Link to retrieve next page of results. 5556 :vartype next_link: str 5557 """ 5558 5559 _validation = { 5560 'value': {'readonly': True}, 5561 'next_link': {'readonly': True}, 5562 } 5563 5564 _attribute_map = { 5565 'value': {'key': 'value', 'type': '[JobAgent]'}, 5566 'next_link': {'key': 'nextLink', 'type': 'str'}, 5567 } 5568 5569 def __init__( 5570 self, 5571 **kwargs 5572 ): 5573 super(JobAgentListResult, self).__init__(**kwargs) 5574 self.value = None 5575 self.next_link = None 5576 5577 5578class JobAgentUpdate(msrest.serialization.Model): 5579 """An update to an Azure SQL job agent. 5580 5581 :param tags: A set of tags. Resource tags. 5582 :type tags: dict[str, str] 5583 """ 5584 5585 _attribute_map = { 5586 'tags': {'key': 'tags', 'type': '{str}'}, 5587 } 5588 5589 def __init__( 5590 self, 5591 *, 5592 tags: Optional[Dict[str, str]] = None, 5593 **kwargs 5594 ): 5595 super(JobAgentUpdate, self).__init__(**kwargs) 5596 self.tags = tags 5597 5598 5599class JobCredential(ProxyResource): 5600 """A stored credential that can be used by a job to connect to target databases. 5601 5602 Variables are only populated by the server, and will be ignored when sending a request. 5603 5604 :ivar id: Resource ID. 5605 :vartype id: str 5606 :ivar name: Resource name. 5607 :vartype name: str 5608 :ivar type: Resource type. 5609 :vartype type: str 5610 :param username: The credential user name. 5611 :type username: str 5612 :param password: The credential password. 5613 :type password: str 5614 """ 5615 5616 _validation = { 5617 'id': {'readonly': True}, 5618 'name': {'readonly': True}, 5619 'type': {'readonly': True}, 5620 } 5621 5622 _attribute_map = { 5623 'id': {'key': 'id', 'type': 'str'}, 5624 'name': {'key': 'name', 'type': 'str'}, 5625 'type': {'key': 'type', 'type': 'str'}, 5626 'username': {'key': 'properties.username', 'type': 'str'}, 5627 'password': {'key': 'properties.password', 'type': 'str'}, 5628 } 5629 5630 def __init__( 5631 self, 5632 *, 5633 username: Optional[str] = None, 5634 password: Optional[str] = None, 5635 **kwargs 5636 ): 5637 super(JobCredential, self).__init__(**kwargs) 5638 self.username = username 5639 self.password = password 5640 5641 5642class JobCredentialListResult(msrest.serialization.Model): 5643 """A list of job credentials. 5644 5645 Variables are only populated by the server, and will be ignored when sending a request. 5646 5647 :ivar value: Array of results. 5648 :vartype value: list[~azure.mgmt.sql.models.JobCredential] 5649 :ivar next_link: Link to retrieve next page of results. 5650 :vartype next_link: str 5651 """ 5652 5653 _validation = { 5654 'value': {'readonly': True}, 5655 'next_link': {'readonly': True}, 5656 } 5657 5658 _attribute_map = { 5659 'value': {'key': 'value', 'type': '[JobCredential]'}, 5660 'next_link': {'key': 'nextLink', 'type': 'str'}, 5661 } 5662 5663 def __init__( 5664 self, 5665 **kwargs 5666 ): 5667 super(JobCredentialListResult, self).__init__(**kwargs) 5668 self.value = None 5669 self.next_link = None 5670 5671 5672class JobExecution(ProxyResource): 5673 """An execution of a job. 5674 5675 Variables are only populated by the server, and will be ignored when sending a request. 5676 5677 :ivar id: Resource ID. 5678 :vartype id: str 5679 :ivar name: Resource name. 5680 :vartype name: str 5681 :ivar type: Resource type. 5682 :vartype type: str 5683 :ivar job_version: The job version number. 5684 :vartype job_version: int 5685 :ivar step_name: The job step name. 5686 :vartype step_name: str 5687 :ivar step_id: The job step id. 5688 :vartype step_id: int 5689 :ivar job_execution_id: The unique identifier of the job execution. 5690 :vartype job_execution_id: str 5691 :ivar lifecycle: The detailed state of the job execution. Possible values include: "Created", 5692 "InProgress", "WaitingForChildJobExecutions", "WaitingForRetry", "Succeeded", 5693 "SucceededWithSkipped", "Failed", "TimedOut", "Canceled", "Skipped". 5694 :vartype lifecycle: str or ~azure.mgmt.sql.models.JobExecutionLifecycle 5695 :ivar provisioning_state: The ARM provisioning state of the job execution. Possible values 5696 include: "Created", "InProgress", "Succeeded", "Failed", "Canceled". 5697 :vartype provisioning_state: str or ~azure.mgmt.sql.models.ProvisioningState 5698 :ivar create_time: The time that the job execution was created. 5699 :vartype create_time: ~datetime.datetime 5700 :ivar start_time: The time that the job execution started. 5701 :vartype start_time: ~datetime.datetime 5702 :ivar end_time: The time that the job execution completed. 5703 :vartype end_time: ~datetime.datetime 5704 :param current_attempts: Number of times the job execution has been attempted. 5705 :type current_attempts: int 5706 :ivar current_attempt_start_time: Start time of the current attempt. 5707 :vartype current_attempt_start_time: ~datetime.datetime 5708 :ivar last_message: The last status or error message. 5709 :vartype last_message: str 5710 :ivar target: The target that this execution is executed on. 5711 :vartype target: ~azure.mgmt.sql.models.JobExecutionTarget 5712 """ 5713 5714 _validation = { 5715 'id': {'readonly': True}, 5716 'name': {'readonly': True}, 5717 'type': {'readonly': True}, 5718 'job_version': {'readonly': True}, 5719 'step_name': {'readonly': True}, 5720 'step_id': {'readonly': True}, 5721 'job_execution_id': {'readonly': True}, 5722 'lifecycle': {'readonly': True}, 5723 'provisioning_state': {'readonly': True}, 5724 'create_time': {'readonly': True}, 5725 'start_time': {'readonly': True}, 5726 'end_time': {'readonly': True}, 5727 'current_attempt_start_time': {'readonly': True}, 5728 'last_message': {'readonly': True}, 5729 'target': {'readonly': True}, 5730 } 5731 5732 _attribute_map = { 5733 'id': {'key': 'id', 'type': 'str'}, 5734 'name': {'key': 'name', 'type': 'str'}, 5735 'type': {'key': 'type', 'type': 'str'}, 5736 'job_version': {'key': 'properties.jobVersion', 'type': 'int'}, 5737 'step_name': {'key': 'properties.stepName', 'type': 'str'}, 5738 'step_id': {'key': 'properties.stepId', 'type': 'int'}, 5739 'job_execution_id': {'key': 'properties.jobExecutionId', 'type': 'str'}, 5740 'lifecycle': {'key': 'properties.lifecycle', 'type': 'str'}, 5741 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 5742 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, 5743 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 5744 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, 5745 'current_attempts': {'key': 'properties.currentAttempts', 'type': 'int'}, 5746 'current_attempt_start_time': {'key': 'properties.currentAttemptStartTime', 'type': 'iso-8601'}, 5747 'last_message': {'key': 'properties.lastMessage', 'type': 'str'}, 5748 'target': {'key': 'properties.target', 'type': 'JobExecutionTarget'}, 5749 } 5750 5751 def __init__( 5752 self, 5753 *, 5754 current_attempts: Optional[int] = None, 5755 **kwargs 5756 ): 5757 super(JobExecution, self).__init__(**kwargs) 5758 self.job_version = None 5759 self.step_name = None 5760 self.step_id = None 5761 self.job_execution_id = None 5762 self.lifecycle = None 5763 self.provisioning_state = None 5764 self.create_time = None 5765 self.start_time = None 5766 self.end_time = None 5767 self.current_attempts = current_attempts 5768 self.current_attempt_start_time = None 5769 self.last_message = None 5770 self.target = None 5771 5772 5773class JobExecutionListResult(msrest.serialization.Model): 5774 """A list of job executions. 5775 5776 Variables are only populated by the server, and will be ignored when sending a request. 5777 5778 :ivar value: Array of results. 5779 :vartype value: list[~azure.mgmt.sql.models.JobExecution] 5780 :ivar next_link: Link to retrieve next page of results. 5781 :vartype next_link: str 5782 """ 5783 5784 _validation = { 5785 'value': {'readonly': True}, 5786 'next_link': {'readonly': True}, 5787 } 5788 5789 _attribute_map = { 5790 'value': {'key': 'value', 'type': '[JobExecution]'}, 5791 'next_link': {'key': 'nextLink', 'type': 'str'}, 5792 } 5793 5794 def __init__( 5795 self, 5796 **kwargs 5797 ): 5798 super(JobExecutionListResult, self).__init__(**kwargs) 5799 self.value = None 5800 self.next_link = None 5801 5802 5803class JobExecutionTarget(msrest.serialization.Model): 5804 """The target that a job execution is executed on. 5805 5806 Variables are only populated by the server, and will be ignored when sending a request. 5807 5808 :ivar type: The type of the target. Possible values include: "TargetGroup", "SqlDatabase", 5809 "SqlElasticPool", "SqlShardMap", "SqlServer". 5810 :vartype type: str or ~azure.mgmt.sql.models.JobTargetType 5811 :ivar server_name: The server name. 5812 :vartype server_name: str 5813 :ivar database_name: The database name. 5814 :vartype database_name: str 5815 """ 5816 5817 _validation = { 5818 'type': {'readonly': True}, 5819 'server_name': {'readonly': True}, 5820 'database_name': {'readonly': True}, 5821 } 5822 5823 _attribute_map = { 5824 'type': {'key': 'type', 'type': 'str'}, 5825 'server_name': {'key': 'serverName', 'type': 'str'}, 5826 'database_name': {'key': 'databaseName', 'type': 'str'}, 5827 } 5828 5829 def __init__( 5830 self, 5831 **kwargs 5832 ): 5833 super(JobExecutionTarget, self).__init__(**kwargs) 5834 self.type = None 5835 self.server_name = None 5836 self.database_name = None 5837 5838 5839class JobListResult(msrest.serialization.Model): 5840 """A list of jobs. 5841 5842 Variables are only populated by the server, and will be ignored when sending a request. 5843 5844 :ivar value: Array of results. 5845 :vartype value: list[~azure.mgmt.sql.models.Job] 5846 :ivar next_link: Link to retrieve next page of results. 5847 :vartype next_link: str 5848 """ 5849 5850 _validation = { 5851 'value': {'readonly': True}, 5852 'next_link': {'readonly': True}, 5853 } 5854 5855 _attribute_map = { 5856 'value': {'key': 'value', 'type': '[Job]'}, 5857 'next_link': {'key': 'nextLink', 'type': 'str'}, 5858 } 5859 5860 def __init__( 5861 self, 5862 **kwargs 5863 ): 5864 super(JobListResult, self).__init__(**kwargs) 5865 self.value = None 5866 self.next_link = None 5867 5868 5869class JobSchedule(msrest.serialization.Model): 5870 """Scheduling properties of a job. 5871 5872 :param start_time: Schedule start time. 5873 :type start_time: ~datetime.datetime 5874 :param end_time: Schedule end time. 5875 :type end_time: ~datetime.datetime 5876 :param type: Schedule interval type. Possible values include: "Once", "Recurring". Default 5877 value: "Once". 5878 :type type: str or ~azure.mgmt.sql.models.JobScheduleType 5879 :param enabled: Whether or not the schedule is enabled. 5880 :type enabled: bool 5881 :param interval: Value of the schedule's recurring interval, if the ScheduleType is recurring. 5882 ISO8601 duration format. 5883 :type interval: str 5884 """ 5885 5886 _attribute_map = { 5887 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 5888 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, 5889 'type': {'key': 'type', 'type': 'str'}, 5890 'enabled': {'key': 'enabled', 'type': 'bool'}, 5891 'interval': {'key': 'interval', 'type': 'str'}, 5892 } 5893 5894 def __init__( 5895 self, 5896 *, 5897 start_time: Optional[datetime.datetime] = "0001-01-01T00:00:00+00:00", 5898 end_time: Optional[datetime.datetime] = "9999-12-31T11:59:59+00:00", 5899 type: Optional[Union[str, "JobScheduleType"]] = "Once", 5900 enabled: Optional[bool] = None, 5901 interval: Optional[str] = None, 5902 **kwargs 5903 ): 5904 super(JobSchedule, self).__init__(**kwargs) 5905 self.start_time = start_time 5906 self.end_time = end_time 5907 self.type = type 5908 self.enabled = enabled 5909 self.interval = interval 5910 5911 5912class JobStep(ProxyResource): 5913 """A job step. 5914 5915 Variables are only populated by the server, and will be ignored when sending a request. 5916 5917 :ivar id: Resource ID. 5918 :vartype id: str 5919 :ivar name: Resource name. 5920 :vartype name: str 5921 :ivar type: Resource type. 5922 :vartype type: str 5923 :param step_id: The job step's index within the job. If not specified when creating the job 5924 step, it will be created as the last step. If not specified when updating the job step, the 5925 step id is not modified. 5926 :type step_id: int 5927 :param target_group: The resource ID of the target group that the job step will be executed on. 5928 :type target_group: str 5929 :param credential: The resource ID of the job credential that will be used to connect to the 5930 targets. 5931 :type credential: str 5932 :param action: The action payload of the job step. 5933 :type action: ~azure.mgmt.sql.models.JobStepAction 5934 :param output: Output destination properties of the job step. 5935 :type output: ~azure.mgmt.sql.models.JobStepOutput 5936 :param execution_options: Execution options for the job step. 5937 :type execution_options: ~azure.mgmt.sql.models.JobStepExecutionOptions 5938 """ 5939 5940 _validation = { 5941 'id': {'readonly': True}, 5942 'name': {'readonly': True}, 5943 'type': {'readonly': True}, 5944 } 5945 5946 _attribute_map = { 5947 'id': {'key': 'id', 'type': 'str'}, 5948 'name': {'key': 'name', 'type': 'str'}, 5949 'type': {'key': 'type', 'type': 'str'}, 5950 'step_id': {'key': 'properties.stepId', 'type': 'int'}, 5951 'target_group': {'key': 'properties.targetGroup', 'type': 'str'}, 5952 'credential': {'key': 'properties.credential', 'type': 'str'}, 5953 'action': {'key': 'properties.action', 'type': 'JobStepAction'}, 5954 'output': {'key': 'properties.output', 'type': 'JobStepOutput'}, 5955 'execution_options': {'key': 'properties.executionOptions', 'type': 'JobStepExecutionOptions'}, 5956 } 5957 5958 def __init__( 5959 self, 5960 *, 5961 step_id: Optional[int] = None, 5962 target_group: Optional[str] = None, 5963 credential: Optional[str] = None, 5964 action: Optional["JobStepAction"] = None, 5965 output: Optional["JobStepOutput"] = None, 5966 execution_options: Optional["JobStepExecutionOptions"] = None, 5967 **kwargs 5968 ): 5969 super(JobStep, self).__init__(**kwargs) 5970 self.step_id = step_id 5971 self.target_group = target_group 5972 self.credential = credential 5973 self.action = action 5974 self.output = output 5975 self.execution_options = execution_options 5976 5977 5978class JobStepAction(msrest.serialization.Model): 5979 """The action to be executed by a job step. 5980 5981 All required parameters must be populated in order to send to Azure. 5982 5983 :param type: Type of action being executed by the job step. Possible values include: "TSql". 5984 Default value: "TSql". 5985 :type type: str or ~azure.mgmt.sql.models.JobStepActionType 5986 :param source: The source of the action to execute. Possible values include: "Inline". Default 5987 value: "Inline". 5988 :type source: str or ~azure.mgmt.sql.models.JobStepActionSource 5989 :param value: Required. The action value, for example the text of the T-SQL script to execute. 5990 :type value: str 5991 """ 5992 5993 _validation = { 5994 'value': {'required': True}, 5995 } 5996 5997 _attribute_map = { 5998 'type': {'key': 'type', 'type': 'str'}, 5999 'source': {'key': 'source', 'type': 'str'}, 6000 'value': {'key': 'value', 'type': 'str'}, 6001 } 6002 6003 def __init__( 6004 self, 6005 *, 6006 value: str, 6007 type: Optional[Union[str, "JobStepActionType"]] = "TSql", 6008 source: Optional[Union[str, "JobStepActionSource"]] = "Inline", 6009 **kwargs 6010 ): 6011 super(JobStepAction, self).__init__(**kwargs) 6012 self.type = type 6013 self.source = source 6014 self.value = value 6015 6016 6017class JobStepExecutionOptions(msrest.serialization.Model): 6018 """The execution options of a job step. 6019 6020 :param timeout_seconds: Execution timeout for the job step. 6021 :type timeout_seconds: int 6022 :param retry_attempts: Maximum number of times the job step will be reattempted if the first 6023 attempt fails. 6024 :type retry_attempts: int 6025 :param initial_retry_interval_seconds: Initial delay between retries for job step execution. 6026 :type initial_retry_interval_seconds: int 6027 :param maximum_retry_interval_seconds: The maximum amount of time to wait between retries for 6028 job step execution. 6029 :type maximum_retry_interval_seconds: int 6030 :param retry_interval_backoff_multiplier: The backoff multiplier for the time between retries. 6031 :type retry_interval_backoff_multiplier: float 6032 """ 6033 6034 _attribute_map = { 6035 'timeout_seconds': {'key': 'timeoutSeconds', 'type': 'int'}, 6036 'retry_attempts': {'key': 'retryAttempts', 'type': 'int'}, 6037 'initial_retry_interval_seconds': {'key': 'initialRetryIntervalSeconds', 'type': 'int'}, 6038 'maximum_retry_interval_seconds': {'key': 'maximumRetryIntervalSeconds', 'type': 'int'}, 6039 'retry_interval_backoff_multiplier': {'key': 'retryIntervalBackoffMultiplier', 'type': 'float'}, 6040 } 6041 6042 def __init__( 6043 self, 6044 *, 6045 timeout_seconds: Optional[int] = 43200, 6046 retry_attempts: Optional[int] = 10, 6047 initial_retry_interval_seconds: Optional[int] = 1, 6048 maximum_retry_interval_seconds: Optional[int] = 120, 6049 retry_interval_backoff_multiplier: Optional[float] = 2, 6050 **kwargs 6051 ): 6052 super(JobStepExecutionOptions, self).__init__(**kwargs) 6053 self.timeout_seconds = timeout_seconds 6054 self.retry_attempts = retry_attempts 6055 self.initial_retry_interval_seconds = initial_retry_interval_seconds 6056 self.maximum_retry_interval_seconds = maximum_retry_interval_seconds 6057 self.retry_interval_backoff_multiplier = retry_interval_backoff_multiplier 6058 6059 6060class JobStepListResult(msrest.serialization.Model): 6061 """A list of job steps. 6062 6063 Variables are only populated by the server, and will be ignored when sending a request. 6064 6065 :ivar value: Array of results. 6066 :vartype value: list[~azure.mgmt.sql.models.JobStep] 6067 :ivar next_link: Link to retrieve next page of results. 6068 :vartype next_link: str 6069 """ 6070 6071 _validation = { 6072 'value': {'readonly': True}, 6073 'next_link': {'readonly': True}, 6074 } 6075 6076 _attribute_map = { 6077 'value': {'key': 'value', 'type': '[JobStep]'}, 6078 'next_link': {'key': 'nextLink', 'type': 'str'}, 6079 } 6080 6081 def __init__( 6082 self, 6083 **kwargs 6084 ): 6085 super(JobStepListResult, self).__init__(**kwargs) 6086 self.value = None 6087 self.next_link = None 6088 6089 6090class JobStepOutput(msrest.serialization.Model): 6091 """The output configuration of a job step. 6092 6093 All required parameters must be populated in order to send to Azure. 6094 6095 :param type: The output destination type. Possible values include: "SqlDatabase". Default 6096 value: "SqlDatabase". 6097 :type type: str or ~azure.mgmt.sql.models.JobStepOutputType 6098 :param subscription_id: The output destination subscription id. 6099 :type subscription_id: str 6100 :param resource_group_name: The output destination resource group. 6101 :type resource_group_name: str 6102 :param server_name: Required. The output destination server name. 6103 :type server_name: str 6104 :param database_name: Required. The output destination database. 6105 :type database_name: str 6106 :param schema_name: The output destination schema. 6107 :type schema_name: str 6108 :param table_name: Required. The output destination table. 6109 :type table_name: str 6110 :param credential: Required. The resource ID of the credential to use to connect to the output 6111 destination. 6112 :type credential: str 6113 """ 6114 6115 _validation = { 6116 'server_name': {'required': True}, 6117 'database_name': {'required': True}, 6118 'table_name': {'required': True}, 6119 'credential': {'required': True}, 6120 } 6121 6122 _attribute_map = { 6123 'type': {'key': 'type', 'type': 'str'}, 6124 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, 6125 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, 6126 'server_name': {'key': 'serverName', 'type': 'str'}, 6127 'database_name': {'key': 'databaseName', 'type': 'str'}, 6128 'schema_name': {'key': 'schemaName', 'type': 'str'}, 6129 'table_name': {'key': 'tableName', 'type': 'str'}, 6130 'credential': {'key': 'credential', 'type': 'str'}, 6131 } 6132 6133 def __init__( 6134 self, 6135 *, 6136 server_name: str, 6137 database_name: str, 6138 table_name: str, 6139 credential: str, 6140 type: Optional[Union[str, "JobStepOutputType"]] = "SqlDatabase", 6141 subscription_id: Optional[str] = None, 6142 resource_group_name: Optional[str] = None, 6143 schema_name: Optional[str] = "dbo", 6144 **kwargs 6145 ): 6146 super(JobStepOutput, self).__init__(**kwargs) 6147 self.type = type 6148 self.subscription_id = subscription_id 6149 self.resource_group_name = resource_group_name 6150 self.server_name = server_name 6151 self.database_name = database_name 6152 self.schema_name = schema_name 6153 self.table_name = table_name 6154 self.credential = credential 6155 6156 6157class JobTarget(msrest.serialization.Model): 6158 """A job target, for example a specific database or a container of databases that is evaluated during job execution. 6159 6160 All required parameters must be populated in order to send to Azure. 6161 6162 :param membership_type: Whether the target is included or excluded from the group. Possible 6163 values include: "Include", "Exclude". Default value: "Include". 6164 :type membership_type: str or ~azure.mgmt.sql.models.JobTargetGroupMembershipType 6165 :param type: Required. The target type. Possible values include: "TargetGroup", "SqlDatabase", 6166 "SqlElasticPool", "SqlShardMap", "SqlServer". 6167 :type type: str or ~azure.mgmt.sql.models.JobTargetType 6168 :param server_name: The target server name. 6169 :type server_name: str 6170 :param database_name: The target database name. 6171 :type database_name: str 6172 :param elastic_pool_name: The target elastic pool name. 6173 :type elastic_pool_name: str 6174 :param shard_map_name: The target shard map. 6175 :type shard_map_name: str 6176 :param refresh_credential: The resource ID of the credential that is used during job execution 6177 to connect to the target and determine the list of databases inside the target. 6178 :type refresh_credential: str 6179 """ 6180 6181 _validation = { 6182 'type': {'required': True}, 6183 } 6184 6185 _attribute_map = { 6186 'membership_type': {'key': 'membershipType', 'type': 'str'}, 6187 'type': {'key': 'type', 'type': 'str'}, 6188 'server_name': {'key': 'serverName', 'type': 'str'}, 6189 'database_name': {'key': 'databaseName', 'type': 'str'}, 6190 'elastic_pool_name': {'key': 'elasticPoolName', 'type': 'str'}, 6191 'shard_map_name': {'key': 'shardMapName', 'type': 'str'}, 6192 'refresh_credential': {'key': 'refreshCredential', 'type': 'str'}, 6193 } 6194 6195 def __init__( 6196 self, 6197 *, 6198 type: Union[str, "JobTargetType"], 6199 membership_type: Optional[Union[str, "JobTargetGroupMembershipType"]] = "Include", 6200 server_name: Optional[str] = None, 6201 database_name: Optional[str] = None, 6202 elastic_pool_name: Optional[str] = None, 6203 shard_map_name: Optional[str] = None, 6204 refresh_credential: Optional[str] = None, 6205 **kwargs 6206 ): 6207 super(JobTarget, self).__init__(**kwargs) 6208 self.membership_type = membership_type 6209 self.type = type 6210 self.server_name = server_name 6211 self.database_name = database_name 6212 self.elastic_pool_name = elastic_pool_name 6213 self.shard_map_name = shard_map_name 6214 self.refresh_credential = refresh_credential 6215 6216 6217class JobTargetGroup(ProxyResource): 6218 """A group of job targets. 6219 6220 Variables are only populated by the server, and will be ignored when sending a request. 6221 6222 :ivar id: Resource ID. 6223 :vartype id: str 6224 :ivar name: Resource name. 6225 :vartype name: str 6226 :ivar type: Resource type. 6227 :vartype type: str 6228 :param members: Members of the target group. 6229 :type members: list[~azure.mgmt.sql.models.JobTarget] 6230 """ 6231 6232 _validation = { 6233 'id': {'readonly': True}, 6234 'name': {'readonly': True}, 6235 'type': {'readonly': True}, 6236 } 6237 6238 _attribute_map = { 6239 'id': {'key': 'id', 'type': 'str'}, 6240 'name': {'key': 'name', 'type': 'str'}, 6241 'type': {'key': 'type', 'type': 'str'}, 6242 'members': {'key': 'properties.members', 'type': '[JobTarget]'}, 6243 } 6244 6245 def __init__( 6246 self, 6247 *, 6248 members: Optional[List["JobTarget"]] = None, 6249 **kwargs 6250 ): 6251 super(JobTargetGroup, self).__init__(**kwargs) 6252 self.members = members 6253 6254 6255class JobTargetGroupListResult(msrest.serialization.Model): 6256 """A list of target groups. 6257 6258 Variables are only populated by the server, and will be ignored when sending a request. 6259 6260 :ivar value: Array of results. 6261 :vartype value: list[~azure.mgmt.sql.models.JobTargetGroup] 6262 :ivar next_link: Link to retrieve next page of results. 6263 :vartype next_link: str 6264 """ 6265 6266 _validation = { 6267 'value': {'readonly': True}, 6268 'next_link': {'readonly': True}, 6269 } 6270 6271 _attribute_map = { 6272 'value': {'key': 'value', 'type': '[JobTargetGroup]'}, 6273 'next_link': {'key': 'nextLink', 'type': 'str'}, 6274 } 6275 6276 def __init__( 6277 self, 6278 **kwargs 6279 ): 6280 super(JobTargetGroupListResult, self).__init__(**kwargs) 6281 self.value = None 6282 self.next_link = None 6283 6284 6285class JobVersion(ProxyResource): 6286 """A job version. 6287 6288 Variables are only populated by the server, and will be ignored when sending a request. 6289 6290 :ivar id: Resource ID. 6291 :vartype id: str 6292 :ivar name: Resource name. 6293 :vartype name: str 6294 :ivar type: Resource type. 6295 :vartype type: str 6296 """ 6297 6298 _validation = { 6299 'id': {'readonly': True}, 6300 'name': {'readonly': True}, 6301 'type': {'readonly': True}, 6302 } 6303 6304 _attribute_map = { 6305 'id': {'key': 'id', 'type': 'str'}, 6306 'name': {'key': 'name', 'type': 'str'}, 6307 'type': {'key': 'type', 'type': 'str'}, 6308 } 6309 6310 def __init__( 6311 self, 6312 **kwargs 6313 ): 6314 super(JobVersion, self).__init__(**kwargs) 6315 6316 6317class JobVersionListResult(msrest.serialization.Model): 6318 """A list of job versions. 6319 6320 Variables are only populated by the server, and will be ignored when sending a request. 6321 6322 :ivar value: Array of results. 6323 :vartype value: list[~azure.mgmt.sql.models.JobVersion] 6324 :ivar next_link: Link to retrieve next page of results. 6325 :vartype next_link: str 6326 """ 6327 6328 _validation = { 6329 'value': {'readonly': True}, 6330 'next_link': {'readonly': True}, 6331 } 6332 6333 _attribute_map = { 6334 'value': {'key': 'value', 'type': '[JobVersion]'}, 6335 'next_link': {'key': 'nextLink', 'type': 'str'}, 6336 } 6337 6338 def __init__( 6339 self, 6340 **kwargs 6341 ): 6342 super(JobVersionListResult, self).__init__(**kwargs) 6343 self.value = None 6344 self.next_link = None 6345 6346 6347class LedgerDigestUploads(ProxyResource): 6348 """Azure SQL Database ledger digest upload settings. 6349 6350 Variables are only populated by the server, and will be ignored when sending a request. 6351 6352 :ivar id: Resource ID. 6353 :vartype id: str 6354 :ivar name: Resource name. 6355 :vartype name: str 6356 :ivar type: Resource type. 6357 :vartype type: str 6358 :param digest_storage_endpoint: The digest storage endpoint, which must be either an Azure blob 6359 storage endpoint or an URI for Azure Confidential Ledger. 6360 :type digest_storage_endpoint: str 6361 :ivar state: Specifies the state of ledger digest upload. Possible values include: "Enabled", 6362 "Disabled". 6363 :vartype state: str or ~azure.mgmt.sql.models.LedgerDigestUploadsState 6364 """ 6365 6366 _validation = { 6367 'id': {'readonly': True}, 6368 'name': {'readonly': True}, 6369 'type': {'readonly': True}, 6370 'state': {'readonly': True}, 6371 } 6372 6373 _attribute_map = { 6374 'id': {'key': 'id', 'type': 'str'}, 6375 'name': {'key': 'name', 'type': 'str'}, 6376 'type': {'key': 'type', 'type': 'str'}, 6377 'digest_storage_endpoint': {'key': 'properties.digestStorageEndpoint', 'type': 'str'}, 6378 'state': {'key': 'properties.state', 'type': 'str'}, 6379 } 6380 6381 def __init__( 6382 self, 6383 *, 6384 digest_storage_endpoint: Optional[str] = None, 6385 **kwargs 6386 ): 6387 super(LedgerDigestUploads, self).__init__(**kwargs) 6388 self.digest_storage_endpoint = digest_storage_endpoint 6389 self.state = None 6390 6391 6392class LedgerDigestUploadsListResult(msrest.serialization.Model): 6393 """A list of ledger digest upload settings. 6394 6395 Variables are only populated by the server, and will be ignored when sending a request. 6396 6397 :ivar value: Array of results. 6398 :vartype value: list[~azure.mgmt.sql.models.LedgerDigestUploads] 6399 :ivar next_link: Link to retrieve next page of results. 6400 :vartype next_link: str 6401 """ 6402 6403 _validation = { 6404 'value': {'readonly': True}, 6405 'next_link': {'readonly': True}, 6406 } 6407 6408 _attribute_map = { 6409 'value': {'key': 'value', 'type': '[LedgerDigestUploads]'}, 6410 'next_link': {'key': 'nextLink', 'type': 'str'}, 6411 } 6412 6413 def __init__( 6414 self, 6415 **kwargs 6416 ): 6417 super(LedgerDigestUploadsListResult, self).__init__(**kwargs) 6418 self.value = None 6419 self.next_link = None 6420 6421 6422class LicenseTypeCapability(msrest.serialization.Model): 6423 """The license type capability. 6424 6425 Variables are only populated by the server, and will be ignored when sending a request. 6426 6427 :ivar name: License type identifier. 6428 :vartype name: str 6429 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 6430 "Default", "Disabled". 6431 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 6432 :param reason: The reason for the capability not being available. 6433 :type reason: str 6434 """ 6435 6436 _validation = { 6437 'name': {'readonly': True}, 6438 'status': {'readonly': True}, 6439 } 6440 6441 _attribute_map = { 6442 'name': {'key': 'name', 'type': 'str'}, 6443 'status': {'key': 'status', 'type': 'str'}, 6444 'reason': {'key': 'reason', 'type': 'str'}, 6445 } 6446 6447 def __init__( 6448 self, 6449 *, 6450 reason: Optional[str] = None, 6451 **kwargs 6452 ): 6453 super(LicenseTypeCapability, self).__init__(**kwargs) 6454 self.name = None 6455 self.status = None 6456 self.reason = reason 6457 6458 6459class LocationCapabilities(msrest.serialization.Model): 6460 """The location capability. 6461 6462 Variables are only populated by the server, and will be ignored when sending a request. 6463 6464 :ivar name: The location name. 6465 :vartype name: str 6466 :ivar supported_server_versions: The list of supported server versions. 6467 :vartype supported_server_versions: list[~azure.mgmt.sql.models.ServerVersionCapability] 6468 :ivar supported_managed_instance_versions: The list of supported managed instance versions. 6469 :vartype supported_managed_instance_versions: 6470 list[~azure.mgmt.sql.models.ManagedInstanceVersionCapability] 6471 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 6472 "Default", "Disabled". 6473 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 6474 :param reason: The reason for the capability not being available. 6475 :type reason: str 6476 """ 6477 6478 _validation = { 6479 'name': {'readonly': True}, 6480 'supported_server_versions': {'readonly': True}, 6481 'supported_managed_instance_versions': {'readonly': True}, 6482 'status': {'readonly': True}, 6483 } 6484 6485 _attribute_map = { 6486 'name': {'key': 'name', 'type': 'str'}, 6487 'supported_server_versions': {'key': 'supportedServerVersions', 'type': '[ServerVersionCapability]'}, 6488 'supported_managed_instance_versions': {'key': 'supportedManagedInstanceVersions', 'type': '[ManagedInstanceVersionCapability]'}, 6489 'status': {'key': 'status', 'type': 'str'}, 6490 'reason': {'key': 'reason', 'type': 'str'}, 6491 } 6492 6493 def __init__( 6494 self, 6495 *, 6496 reason: Optional[str] = None, 6497 **kwargs 6498 ): 6499 super(LocationCapabilities, self).__init__(**kwargs) 6500 self.name = None 6501 self.supported_server_versions = None 6502 self.supported_managed_instance_versions = None 6503 self.status = None 6504 self.reason = reason 6505 6506 6507class LogicalServerSecurityAlertPolicyListResult(msrest.serialization.Model): 6508 """A list of the server's security alert policies. 6509 6510 Variables are only populated by the server, and will be ignored when sending a request. 6511 6512 :ivar value: Array of results. 6513 :vartype value: list[~azure.mgmt.sql.models.ServerSecurityAlertPolicy] 6514 :ivar next_link: Link to retrieve next page of results. 6515 :vartype next_link: str 6516 """ 6517 6518 _validation = { 6519 'value': {'readonly': True}, 6520 'next_link': {'readonly': True}, 6521 } 6522 6523 _attribute_map = { 6524 'value': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'}, 6525 'next_link': {'key': 'nextLink', 'type': 'str'}, 6526 } 6527 6528 def __init__( 6529 self, 6530 **kwargs 6531 ): 6532 super(LogicalServerSecurityAlertPolicyListResult, self).__init__(**kwargs) 6533 self.value = None 6534 self.next_link = None 6535 6536 6537class LogSizeCapability(msrest.serialization.Model): 6538 """The log size capability. 6539 6540 Variables are only populated by the server, and will be ignored when sending a request. 6541 6542 :ivar limit: The log size limit (see 'unit' for the units). 6543 :vartype limit: int 6544 :ivar unit: The units that the limit is expressed in. Possible values include: "Megabytes", 6545 "Gigabytes", "Terabytes", "Petabytes", "Percent". 6546 :vartype unit: str or ~azure.mgmt.sql.models.LogSizeUnit 6547 """ 6548 6549 _validation = { 6550 'limit': {'readonly': True}, 6551 'unit': {'readonly': True}, 6552 } 6553 6554 _attribute_map = { 6555 'limit': {'key': 'limit', 'type': 'int'}, 6556 'unit': {'key': 'unit', 'type': 'str'}, 6557 } 6558 6559 def __init__( 6560 self, 6561 **kwargs 6562 ): 6563 super(LogSizeCapability, self).__init__(**kwargs) 6564 self.limit = None 6565 self.unit = None 6566 6567 6568class LongTermRetentionBackup(ProxyResource): 6569 """A long term retention backup. 6570 6571 Variables are only populated by the server, and will be ignored when sending a request. 6572 6573 :ivar id: Resource ID. 6574 :vartype id: str 6575 :ivar name: Resource name. 6576 :vartype name: str 6577 :ivar type: Resource type. 6578 :vartype type: str 6579 :ivar server_name: The server name that the backup database belong to. 6580 :vartype server_name: str 6581 :ivar server_create_time: The create time of the server. 6582 :vartype server_create_time: ~datetime.datetime 6583 :ivar database_name: The name of the database the backup belong to. 6584 :vartype database_name: str 6585 :ivar database_deletion_time: The delete time of the database. 6586 :vartype database_deletion_time: ~datetime.datetime 6587 :ivar backup_time: The time the backup was taken. 6588 :vartype backup_time: ~datetime.datetime 6589 :ivar backup_expiration_time: The time the long term retention backup will expire. 6590 :vartype backup_expiration_time: ~datetime.datetime 6591 :ivar backup_storage_redundancy: The storage redundancy type of the backup. Possible values 6592 include: "Geo", "Local", "Zone". 6593 :vartype backup_storage_redundancy: str or ~azure.mgmt.sql.models.BackupStorageRedundancy 6594 :param requested_backup_storage_redundancy: The storage redundancy type of the backup. Possible 6595 values include: "Geo", "Local", "Zone". 6596 :type requested_backup_storage_redundancy: str or 6597 ~azure.mgmt.sql.models.BackupStorageRedundancy 6598 """ 6599 6600 _validation = { 6601 'id': {'readonly': True}, 6602 'name': {'readonly': True}, 6603 'type': {'readonly': True}, 6604 'server_name': {'readonly': True}, 6605 'server_create_time': {'readonly': True}, 6606 'database_name': {'readonly': True}, 6607 'database_deletion_time': {'readonly': True}, 6608 'backup_time': {'readonly': True}, 6609 'backup_expiration_time': {'readonly': True}, 6610 'backup_storage_redundancy': {'readonly': True}, 6611 } 6612 6613 _attribute_map = { 6614 'id': {'key': 'id', 'type': 'str'}, 6615 'name': {'key': 'name', 'type': 'str'}, 6616 'type': {'key': 'type', 'type': 'str'}, 6617 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 6618 'server_create_time': {'key': 'properties.serverCreateTime', 'type': 'iso-8601'}, 6619 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 6620 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, 6621 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, 6622 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, 6623 'backup_storage_redundancy': {'key': 'properties.backupStorageRedundancy', 'type': 'str'}, 6624 'requested_backup_storage_redundancy': {'key': 'properties.requestedBackupStorageRedundancy', 'type': 'str'}, 6625 } 6626 6627 def __init__( 6628 self, 6629 *, 6630 requested_backup_storage_redundancy: Optional[Union[str, "BackupStorageRedundancy"]] = None, 6631 **kwargs 6632 ): 6633 super(LongTermRetentionBackup, self).__init__(**kwargs) 6634 self.server_name = None 6635 self.server_create_time = None 6636 self.database_name = None 6637 self.database_deletion_time = None 6638 self.backup_time = None 6639 self.backup_expiration_time = None 6640 self.backup_storage_redundancy = None 6641 self.requested_backup_storage_redundancy = requested_backup_storage_redundancy 6642 6643 6644class LongTermRetentionBackupListResult(msrest.serialization.Model): 6645 """A list of long term retention backups. 6646 6647 Variables are only populated by the server, and will be ignored when sending a request. 6648 6649 :ivar value: Array of results. 6650 :vartype value: list[~azure.mgmt.sql.models.LongTermRetentionBackup] 6651 :ivar next_link: Link to retrieve next page of results. 6652 :vartype next_link: str 6653 """ 6654 6655 _validation = { 6656 'value': {'readonly': True}, 6657 'next_link': {'readonly': True}, 6658 } 6659 6660 _attribute_map = { 6661 'value': {'key': 'value', 'type': '[LongTermRetentionBackup]'}, 6662 'next_link': {'key': 'nextLink', 'type': 'str'}, 6663 } 6664 6665 def __init__( 6666 self, 6667 **kwargs 6668 ): 6669 super(LongTermRetentionBackupListResult, self).__init__(**kwargs) 6670 self.value = None 6671 self.next_link = None 6672 6673 6674class LongTermRetentionBackupOperationResult(ProxyResource): 6675 """A LongTermRetentionBackup operation result resource. 6676 6677 Variables are only populated by the server, and will be ignored when sending a request. 6678 6679 :ivar id: Resource ID. 6680 :vartype id: str 6681 :ivar name: Resource name. 6682 :vartype name: str 6683 :ivar type: Resource type. 6684 :vartype type: str 6685 :ivar request_id: Request Id. 6686 :vartype request_id: str 6687 :ivar operation_type: Operation type. 6688 :vartype operation_type: str 6689 :ivar from_backup_resource_id: Source backup resource id. 6690 :vartype from_backup_resource_id: str 6691 :ivar to_backup_resource_id: Target backup resource id. 6692 :vartype to_backup_resource_id: str 6693 :ivar target_backup_storage_redundancy: The storage redundancy type of the copied backup. 6694 Possible values include: "Geo", "Local", "Zone". 6695 :vartype target_backup_storage_redundancy: str or 6696 ~azure.mgmt.sql.models.BackupStorageRedundancy 6697 :ivar status: Operation status. 6698 :vartype status: str 6699 :ivar message: Progress message. 6700 :vartype message: str 6701 """ 6702 6703 _validation = { 6704 'id': {'readonly': True}, 6705 'name': {'readonly': True}, 6706 'type': {'readonly': True}, 6707 'request_id': {'readonly': True}, 6708 'operation_type': {'readonly': True}, 6709 'from_backup_resource_id': {'readonly': True}, 6710 'to_backup_resource_id': {'readonly': True}, 6711 'target_backup_storage_redundancy': {'readonly': True}, 6712 'status': {'readonly': True}, 6713 'message': {'readonly': True}, 6714 } 6715 6716 _attribute_map = { 6717 'id': {'key': 'id', 'type': 'str'}, 6718 'name': {'key': 'name', 'type': 'str'}, 6719 'type': {'key': 'type', 'type': 'str'}, 6720 'request_id': {'key': 'properties.requestId', 'type': 'str'}, 6721 'operation_type': {'key': 'properties.operationType', 'type': 'str'}, 6722 'from_backup_resource_id': {'key': 'properties.fromBackupResourceId', 'type': 'str'}, 6723 'to_backup_resource_id': {'key': 'properties.toBackupResourceId', 'type': 'str'}, 6724 'target_backup_storage_redundancy': {'key': 'properties.targetBackupStorageRedundancy', 'type': 'str'}, 6725 'status': {'key': 'properties.status', 'type': 'str'}, 6726 'message': {'key': 'properties.message', 'type': 'str'}, 6727 } 6728 6729 def __init__( 6730 self, 6731 **kwargs 6732 ): 6733 super(LongTermRetentionBackupOperationResult, self).__init__(**kwargs) 6734 self.request_id = None 6735 self.operation_type = None 6736 self.from_backup_resource_id = None 6737 self.to_backup_resource_id = None 6738 self.target_backup_storage_redundancy = None 6739 self.status = None 6740 self.message = None 6741 6742 6743class LongTermRetentionPolicy(ProxyResource): 6744 """A long term retention policy. 6745 6746 Variables are only populated by the server, and will be ignored when sending a request. 6747 6748 :ivar id: Resource ID. 6749 :vartype id: str 6750 :ivar name: Resource name. 6751 :vartype name: str 6752 :ivar type: Resource type. 6753 :vartype type: str 6754 :param weekly_retention: The weekly retention policy for an LTR backup in an ISO 8601 format. 6755 :type weekly_retention: str 6756 :param monthly_retention: The monthly retention policy for an LTR backup in an ISO 8601 format. 6757 :type monthly_retention: str 6758 :param yearly_retention: The yearly retention policy for an LTR backup in an ISO 8601 format. 6759 :type yearly_retention: str 6760 :param week_of_year: The week of year to take the yearly backup in an ISO 8601 format. 6761 :type week_of_year: int 6762 """ 6763 6764 _validation = { 6765 'id': {'readonly': True}, 6766 'name': {'readonly': True}, 6767 'type': {'readonly': True}, 6768 } 6769 6770 _attribute_map = { 6771 'id': {'key': 'id', 'type': 'str'}, 6772 'name': {'key': 'name', 'type': 'str'}, 6773 'type': {'key': 'type', 'type': 'str'}, 6774 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, 6775 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, 6776 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, 6777 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, 6778 } 6779 6780 def __init__( 6781 self, 6782 *, 6783 weekly_retention: Optional[str] = None, 6784 monthly_retention: Optional[str] = None, 6785 yearly_retention: Optional[str] = None, 6786 week_of_year: Optional[int] = None, 6787 **kwargs 6788 ): 6789 super(LongTermRetentionPolicy, self).__init__(**kwargs) 6790 self.weekly_retention = weekly_retention 6791 self.monthly_retention = monthly_retention 6792 self.yearly_retention = yearly_retention 6793 self.week_of_year = week_of_year 6794 6795 6796class LongTermRetentionPolicyListResult(msrest.serialization.Model): 6797 """A list of long term retention policies. 6798 6799 Variables are only populated by the server, and will be ignored when sending a request. 6800 6801 :ivar value: Array of results. 6802 :vartype value: list[~azure.mgmt.sql.models.LongTermRetentionPolicy] 6803 :ivar next_link: Link to retrieve next page of results. 6804 :vartype next_link: str 6805 """ 6806 6807 _validation = { 6808 'value': {'readonly': True}, 6809 'next_link': {'readonly': True}, 6810 } 6811 6812 _attribute_map = { 6813 'value': {'key': 'value', 'type': '[LongTermRetentionPolicy]'}, 6814 'next_link': {'key': 'nextLink', 'type': 'str'}, 6815 } 6816 6817 def __init__( 6818 self, 6819 **kwargs 6820 ): 6821 super(LongTermRetentionPolicyListResult, self).__init__(**kwargs) 6822 self.value = None 6823 self.next_link = None 6824 6825 6826class MaintenanceConfigurationCapability(msrest.serialization.Model): 6827 """The maintenance configuration capability. 6828 6829 Variables are only populated by the server, and will be ignored when sending a request. 6830 6831 :ivar name: Maintenance configuration name. 6832 :vartype name: str 6833 :ivar zone_redundant: Whether or not zone redundancy is supported for the maintenance 6834 configuration. 6835 :vartype zone_redundant: bool 6836 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 6837 "Default", "Disabled". 6838 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 6839 :param reason: The reason for the capability not being available. 6840 :type reason: str 6841 """ 6842 6843 _validation = { 6844 'name': {'readonly': True}, 6845 'zone_redundant': {'readonly': True}, 6846 'status': {'readonly': True}, 6847 } 6848 6849 _attribute_map = { 6850 'name': {'key': 'name', 'type': 'str'}, 6851 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, 6852 'status': {'key': 'status', 'type': 'str'}, 6853 'reason': {'key': 'reason', 'type': 'str'}, 6854 } 6855 6856 def __init__( 6857 self, 6858 *, 6859 reason: Optional[str] = None, 6860 **kwargs 6861 ): 6862 super(MaintenanceConfigurationCapability, self).__init__(**kwargs) 6863 self.name = None 6864 self.zone_redundant = None 6865 self.status = None 6866 self.reason = reason 6867 6868 6869class MaintenanceWindowOptions(ProxyResource): 6870 """Maintenance window options. 6871 6872 Variables are only populated by the server, and will be ignored when sending a request. 6873 6874 :ivar id: Resource ID. 6875 :vartype id: str 6876 :ivar name: Resource name. 6877 :vartype name: str 6878 :ivar type: Resource type. 6879 :vartype type: str 6880 :param is_enabled: Whether maintenance windows are enabled for the database. 6881 :type is_enabled: bool 6882 :param maintenance_window_cycles: Available maintenance cycles e.g. {Saturday, 0, 48\ *60}, 6883 {Wednesday, 0, 24*\ 60}. 6884 :type maintenance_window_cycles: list[~azure.mgmt.sql.models.MaintenanceWindowTimeRange] 6885 :param min_duration_in_minutes: Minimum duration of maintenance window. 6886 :type min_duration_in_minutes: int 6887 :param default_duration_in_minutes: Default duration for maintenance window. 6888 :type default_duration_in_minutes: int 6889 :param min_cycles: Minimum number of maintenance windows cycles to be set on the database. 6890 :type min_cycles: int 6891 :param time_granularity_in_minutes: Time granularity in minutes for maintenance windows. 6892 :type time_granularity_in_minutes: int 6893 :param allow_multiple_maintenance_windows_per_cycle: Whether we allow multiple maintenance 6894 windows per cycle. 6895 :type allow_multiple_maintenance_windows_per_cycle: bool 6896 """ 6897 6898 _validation = { 6899 'id': {'readonly': True}, 6900 'name': {'readonly': True}, 6901 'type': {'readonly': True}, 6902 } 6903 6904 _attribute_map = { 6905 'id': {'key': 'id', 'type': 'str'}, 6906 'name': {'key': 'name', 'type': 'str'}, 6907 'type': {'key': 'type', 'type': 'str'}, 6908 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, 6909 'maintenance_window_cycles': {'key': 'properties.maintenanceWindowCycles', 'type': '[MaintenanceWindowTimeRange]'}, 6910 'min_duration_in_minutes': {'key': 'properties.minDurationInMinutes', 'type': 'int'}, 6911 'default_duration_in_minutes': {'key': 'properties.defaultDurationInMinutes', 'type': 'int'}, 6912 'min_cycles': {'key': 'properties.minCycles', 'type': 'int'}, 6913 'time_granularity_in_minutes': {'key': 'properties.timeGranularityInMinutes', 'type': 'int'}, 6914 'allow_multiple_maintenance_windows_per_cycle': {'key': 'properties.allowMultipleMaintenanceWindowsPerCycle', 'type': 'bool'}, 6915 } 6916 6917 def __init__( 6918 self, 6919 *, 6920 is_enabled: Optional[bool] = None, 6921 maintenance_window_cycles: Optional[List["MaintenanceWindowTimeRange"]] = None, 6922 min_duration_in_minutes: Optional[int] = None, 6923 default_duration_in_minutes: Optional[int] = None, 6924 min_cycles: Optional[int] = None, 6925 time_granularity_in_minutes: Optional[int] = None, 6926 allow_multiple_maintenance_windows_per_cycle: Optional[bool] = None, 6927 **kwargs 6928 ): 6929 super(MaintenanceWindowOptions, self).__init__(**kwargs) 6930 self.is_enabled = is_enabled 6931 self.maintenance_window_cycles = maintenance_window_cycles 6932 self.min_duration_in_minutes = min_duration_in_minutes 6933 self.default_duration_in_minutes = default_duration_in_minutes 6934 self.min_cycles = min_cycles 6935 self.time_granularity_in_minutes = time_granularity_in_minutes 6936 self.allow_multiple_maintenance_windows_per_cycle = allow_multiple_maintenance_windows_per_cycle 6937 6938 6939class MaintenanceWindows(ProxyResource): 6940 """Maintenance windows. 6941 6942 Variables are only populated by the server, and will be ignored when sending a request. 6943 6944 :ivar id: Resource ID. 6945 :vartype id: str 6946 :ivar name: Resource name. 6947 :vartype name: str 6948 :ivar type: Resource type. 6949 :vartype type: str 6950 :param time_ranges: 6951 :type time_ranges: list[~azure.mgmt.sql.models.MaintenanceWindowTimeRange] 6952 """ 6953 6954 _validation = { 6955 'id': {'readonly': True}, 6956 'name': {'readonly': True}, 6957 'type': {'readonly': True}, 6958 } 6959 6960 _attribute_map = { 6961 'id': {'key': 'id', 'type': 'str'}, 6962 'name': {'key': 'name', 'type': 'str'}, 6963 'type': {'key': 'type', 'type': 'str'}, 6964 'time_ranges': {'key': 'properties.timeRanges', 'type': '[MaintenanceWindowTimeRange]'}, 6965 } 6966 6967 def __init__( 6968 self, 6969 *, 6970 time_ranges: Optional[List["MaintenanceWindowTimeRange"]] = None, 6971 **kwargs 6972 ): 6973 super(MaintenanceWindows, self).__init__(**kwargs) 6974 self.time_ranges = time_ranges 6975 6976 6977class MaintenanceWindowTimeRange(msrest.serialization.Model): 6978 """Maintenance window time range. 6979 6980 :param day_of_week: Day of maintenance window. Possible values include: "Sunday", "Monday", 6981 "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday". 6982 :type day_of_week: str or ~azure.mgmt.sql.models.DayOfWeek 6983 :param start_time: Start time minutes offset from 12am. 6984 :type start_time: str 6985 :param duration: Duration of maintenance window in minutes. 6986 :type duration: str 6987 """ 6988 6989 _attribute_map = { 6990 'day_of_week': {'key': 'dayOfWeek', 'type': 'str'}, 6991 'start_time': {'key': 'startTime', 'type': 'str'}, 6992 'duration': {'key': 'duration', 'type': 'str'}, 6993 } 6994 6995 def __init__( 6996 self, 6997 *, 6998 day_of_week: Optional[Union[str, "DayOfWeek"]] = None, 6999 start_time: Optional[str] = None, 7000 duration: Optional[str] = None, 7001 **kwargs 7002 ): 7003 super(MaintenanceWindowTimeRange, self).__init__(**kwargs) 7004 self.day_of_week = day_of_week 7005 self.start_time = start_time 7006 self.duration = duration 7007 7008 7009class ManagedBackupShortTermRetentionPolicy(ProxyResource): 7010 """A short term retention policy. 7011 7012 Variables are only populated by the server, and will be ignored when sending a request. 7013 7014 :ivar id: Resource ID. 7015 :vartype id: str 7016 :ivar name: Resource name. 7017 :vartype name: str 7018 :ivar type: Resource type. 7019 :vartype type: str 7020 :param retention_days: The backup retention period in days. This is how many days Point-in-Time 7021 Restore will be supported. 7022 :type retention_days: int 7023 """ 7024 7025 _validation = { 7026 'id': {'readonly': True}, 7027 'name': {'readonly': True}, 7028 'type': {'readonly': True}, 7029 } 7030 7031 _attribute_map = { 7032 'id': {'key': 'id', 'type': 'str'}, 7033 'name': {'key': 'name', 'type': 'str'}, 7034 'type': {'key': 'type', 'type': 'str'}, 7035 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 7036 } 7037 7038 def __init__( 7039 self, 7040 *, 7041 retention_days: Optional[int] = None, 7042 **kwargs 7043 ): 7044 super(ManagedBackupShortTermRetentionPolicy, self).__init__(**kwargs) 7045 self.retention_days = retention_days 7046 7047 7048class ManagedBackupShortTermRetentionPolicyListResult(msrest.serialization.Model): 7049 """A list of short term retention policies. 7050 7051 Variables are only populated by the server, and will be ignored when sending a request. 7052 7053 :ivar value: Array of results. 7054 :vartype value: list[~azure.mgmt.sql.models.ManagedBackupShortTermRetentionPolicy] 7055 :ivar next_link: Link to retrieve next page of results. 7056 :vartype next_link: str 7057 """ 7058 7059 _validation = { 7060 'value': {'readonly': True}, 7061 'next_link': {'readonly': True}, 7062 } 7063 7064 _attribute_map = { 7065 'value': {'key': 'value', 'type': '[ManagedBackupShortTermRetentionPolicy]'}, 7066 'next_link': {'key': 'nextLink', 'type': 'str'}, 7067 } 7068 7069 def __init__( 7070 self, 7071 **kwargs 7072 ): 7073 super(ManagedBackupShortTermRetentionPolicyListResult, self).__init__(**kwargs) 7074 self.value = None 7075 self.next_link = None 7076 7077 7078class ManagedDatabase(TrackedResource): 7079 """A managed database resource. 7080 7081 Variables are only populated by the server, and will be ignored when sending a request. 7082 7083 All required parameters must be populated in order to send to Azure. 7084 7085 :ivar id: Resource ID. 7086 :vartype id: str 7087 :ivar name: Resource name. 7088 :vartype name: str 7089 :ivar type: Resource type. 7090 :vartype type: str 7091 :param location: Required. Resource location. 7092 :type location: str 7093 :param tags: A set of tags. Resource tags. 7094 :type tags: dict[str, str] 7095 :param collation: Collation of the managed database. 7096 :type collation: str 7097 :ivar status: Status of the database. Possible values include: "Online", "Offline", "Shutdown", 7098 "Creating", "Inaccessible", "Restoring", "Updating". 7099 :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus 7100 :ivar creation_date: Creation date of the database. 7101 :vartype creation_date: ~datetime.datetime 7102 :ivar earliest_restore_point: Earliest restore point in time for point in time restore. 7103 :vartype earliest_restore_point: ~datetime.datetime 7104 :param restore_point_in_time: Conditional. If createMode is PointInTimeRestore, this value is 7105 required. Specifies the point in time (ISO8601 format) of the source database that will be 7106 restored to create the new database. 7107 :type restore_point_in_time: ~datetime.datetime 7108 :ivar default_secondary_location: Geo paired region. 7109 :vartype default_secondary_location: str 7110 :param catalog_collation: Collation of the metadata catalog. Possible values include: 7111 "DATABASE_DEFAULT", "SQL_Latin1_General_CP1_CI_AS". 7112 :type catalog_collation: str or ~azure.mgmt.sql.models.CatalogCollationType 7113 :param create_mode: Managed database create mode. PointInTimeRestore: Create a database by 7114 restoring a point in time backup of an existing database. SourceDatabaseName, 7115 SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a 7116 database by restoring from external backup files. Collation, StorageContainerUri and 7117 StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a 7118 geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database 7119 resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a 7120 long term retention backup (longTermRetentionBackupResourceId required). Possible values 7121 include: "Default", "RestoreExternalBackup", "PointInTimeRestore", "Recovery", 7122 "RestoreLongTermRetentionBackup". 7123 :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode 7124 :param storage_container_uri: Conditional. If createMode is RestoreExternalBackup, this value 7125 is required. Specifies the uri of the storage container where backups for this restore are 7126 stored. 7127 :type storage_container_uri: str 7128 :param source_database_id: The resource identifier of the source database associated with 7129 create operation of this database. 7130 :type source_database_id: str 7131 :param restorable_dropped_database_id: The restorable dropped database resource id to restore 7132 when creating this database. 7133 :type restorable_dropped_database_id: str 7134 :param storage_container_sas_token: Conditional. If createMode is RestoreExternalBackup, this 7135 value is required. Specifies the storage container sas token. 7136 :type storage_container_sas_token: str 7137 :ivar failover_group_id: Instance Failover Group resource identifier that this managed database 7138 belongs to. 7139 :vartype failover_group_id: str 7140 :param recoverable_database_id: The resource identifier of the recoverable database associated 7141 with create operation of this database. 7142 :type recoverable_database_id: str 7143 :param long_term_retention_backup_resource_id: The name of the Long Term Retention backup to be 7144 used for restore of this managed database. 7145 :type long_term_retention_backup_resource_id: str 7146 :param auto_complete_restore: Whether to auto complete restore of this managed database. 7147 :type auto_complete_restore: bool 7148 :param last_backup_name: Last backup file name for restore of this managed database. 7149 :type last_backup_name: str 7150 """ 7151 7152 _validation = { 7153 'id': {'readonly': True}, 7154 'name': {'readonly': True}, 7155 'type': {'readonly': True}, 7156 'location': {'required': True}, 7157 'status': {'readonly': True}, 7158 'creation_date': {'readonly': True}, 7159 'earliest_restore_point': {'readonly': True}, 7160 'default_secondary_location': {'readonly': True}, 7161 'failover_group_id': {'readonly': True}, 7162 } 7163 7164 _attribute_map = { 7165 'id': {'key': 'id', 'type': 'str'}, 7166 'name': {'key': 'name', 'type': 'str'}, 7167 'type': {'key': 'type', 'type': 'str'}, 7168 'location': {'key': 'location', 'type': 'str'}, 7169 'tags': {'key': 'tags', 'type': '{str}'}, 7170 'collation': {'key': 'properties.collation', 'type': 'str'}, 7171 'status': {'key': 'properties.status', 'type': 'str'}, 7172 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 7173 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, 7174 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, 7175 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, 7176 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, 7177 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 7178 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, 7179 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, 7180 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, 7181 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, 7182 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, 7183 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, 7184 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, 7185 'auto_complete_restore': {'key': 'properties.autoCompleteRestore', 'type': 'bool'}, 7186 'last_backup_name': {'key': 'properties.lastBackupName', 'type': 'str'}, 7187 } 7188 7189 def __init__( 7190 self, 7191 *, 7192 location: str, 7193 tags: Optional[Dict[str, str]] = None, 7194 collation: Optional[str] = None, 7195 restore_point_in_time: Optional[datetime.datetime] = None, 7196 catalog_collation: Optional[Union[str, "CatalogCollationType"]] = None, 7197 create_mode: Optional[Union[str, "ManagedDatabaseCreateMode"]] = None, 7198 storage_container_uri: Optional[str] = None, 7199 source_database_id: Optional[str] = None, 7200 restorable_dropped_database_id: Optional[str] = None, 7201 storage_container_sas_token: Optional[str] = None, 7202 recoverable_database_id: Optional[str] = None, 7203 long_term_retention_backup_resource_id: Optional[str] = None, 7204 auto_complete_restore: Optional[bool] = None, 7205 last_backup_name: Optional[str] = None, 7206 **kwargs 7207 ): 7208 super(ManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) 7209 self.collation = collation 7210 self.status = None 7211 self.creation_date = None 7212 self.earliest_restore_point = None 7213 self.restore_point_in_time = restore_point_in_time 7214 self.default_secondary_location = None 7215 self.catalog_collation = catalog_collation 7216 self.create_mode = create_mode 7217 self.storage_container_uri = storage_container_uri 7218 self.source_database_id = source_database_id 7219 self.restorable_dropped_database_id = restorable_dropped_database_id 7220 self.storage_container_sas_token = storage_container_sas_token 7221 self.failover_group_id = None 7222 self.recoverable_database_id = recoverable_database_id 7223 self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id 7224 self.auto_complete_restore = auto_complete_restore 7225 self.last_backup_name = last_backup_name 7226 7227 7228class ManagedDatabaseListResult(msrest.serialization.Model): 7229 """A list of managed databases. 7230 7231 Variables are only populated by the server, and will be ignored when sending a request. 7232 7233 :ivar value: Array of results. 7234 :vartype value: list[~azure.mgmt.sql.models.ManagedDatabase] 7235 :ivar next_link: Link to retrieve next page of results. 7236 :vartype next_link: str 7237 """ 7238 7239 _validation = { 7240 'value': {'readonly': True}, 7241 'next_link': {'readonly': True}, 7242 } 7243 7244 _attribute_map = { 7245 'value': {'key': 'value', 'type': '[ManagedDatabase]'}, 7246 'next_link': {'key': 'nextLink', 'type': 'str'}, 7247 } 7248 7249 def __init__( 7250 self, 7251 **kwargs 7252 ): 7253 super(ManagedDatabaseListResult, self).__init__(**kwargs) 7254 self.value = None 7255 self.next_link = None 7256 7257 7258class ManagedDatabaseRestoreDetailsResult(ProxyResource): 7259 """A managed database restore details. 7260 7261 Variables are only populated by the server, and will be ignored when sending a request. 7262 7263 :ivar id: Resource ID. 7264 :vartype id: str 7265 :ivar name: Resource name. 7266 :vartype name: str 7267 :ivar type: Resource type. 7268 :vartype type: str 7269 :ivar status: Restore status. 7270 :vartype status: str 7271 :ivar current_restoring_file_name: Current restoring file name. 7272 :vartype current_restoring_file_name: str 7273 :ivar last_restored_file_name: Last restored file name. 7274 :vartype last_restored_file_name: str 7275 :ivar last_restored_file_time: Last restored file time. 7276 :vartype last_restored_file_time: ~datetime.datetime 7277 :ivar percent_completed: Percent completed. 7278 :vartype percent_completed: float 7279 :ivar unrestorable_files: List of unrestorable files. 7280 :vartype unrestorable_files: list[str] 7281 :ivar number_of_files_detected: Number of files detected. 7282 :vartype number_of_files_detected: long 7283 :ivar last_uploaded_file_name: Last uploaded file name. 7284 :vartype last_uploaded_file_name: str 7285 :ivar last_uploaded_file_time: Last uploaded file time. 7286 :vartype last_uploaded_file_time: ~datetime.datetime 7287 :ivar block_reason: The reason why restore is in Blocked state. 7288 :vartype block_reason: str 7289 """ 7290 7291 _validation = { 7292 'id': {'readonly': True}, 7293 'name': {'readonly': True}, 7294 'type': {'readonly': True}, 7295 'status': {'readonly': True}, 7296 'current_restoring_file_name': {'readonly': True}, 7297 'last_restored_file_name': {'readonly': True}, 7298 'last_restored_file_time': {'readonly': True}, 7299 'percent_completed': {'readonly': True}, 7300 'unrestorable_files': {'readonly': True}, 7301 'number_of_files_detected': {'readonly': True}, 7302 'last_uploaded_file_name': {'readonly': True}, 7303 'last_uploaded_file_time': {'readonly': True}, 7304 'block_reason': {'readonly': True}, 7305 } 7306 7307 _attribute_map = { 7308 'id': {'key': 'id', 'type': 'str'}, 7309 'name': {'key': 'name', 'type': 'str'}, 7310 'type': {'key': 'type', 'type': 'str'}, 7311 'status': {'key': 'properties.status', 'type': 'str'}, 7312 'current_restoring_file_name': {'key': 'properties.currentRestoringFileName', 'type': 'str'}, 7313 'last_restored_file_name': {'key': 'properties.lastRestoredFileName', 'type': 'str'}, 7314 'last_restored_file_time': {'key': 'properties.lastRestoredFileTime', 'type': 'iso-8601'}, 7315 'percent_completed': {'key': 'properties.percentCompleted', 'type': 'float'}, 7316 'unrestorable_files': {'key': 'properties.unrestorableFiles', 'type': '[str]'}, 7317 'number_of_files_detected': {'key': 'properties.numberOfFilesDetected', 'type': 'long'}, 7318 'last_uploaded_file_name': {'key': 'properties.lastUploadedFileName', 'type': 'str'}, 7319 'last_uploaded_file_time': {'key': 'properties.lastUploadedFileTime', 'type': 'iso-8601'}, 7320 'block_reason': {'key': 'properties.blockReason', 'type': 'str'}, 7321 } 7322 7323 def __init__( 7324 self, 7325 **kwargs 7326 ): 7327 super(ManagedDatabaseRestoreDetailsResult, self).__init__(**kwargs) 7328 self.status = None 7329 self.current_restoring_file_name = None 7330 self.last_restored_file_name = None 7331 self.last_restored_file_time = None 7332 self.percent_completed = None 7333 self.unrestorable_files = None 7334 self.number_of_files_detected = None 7335 self.last_uploaded_file_name = None 7336 self.last_uploaded_file_time = None 7337 self.block_reason = None 7338 7339 7340class ManagedDatabaseSecurityAlertPolicy(ProxyResource): 7341 """A managed database security alert policy. 7342 7343 Variables are only populated by the server, and will be ignored when sending a request. 7344 7345 :ivar id: Resource ID. 7346 :vartype id: str 7347 :ivar name: Resource name. 7348 :vartype name: str 7349 :ivar type: Resource type. 7350 :vartype type: str 7351 :param state: Specifies the state of the policy, whether it is enabled or disabled or a policy 7352 has not been applied yet on the specific database. Possible values include: "New", "Enabled", 7353 "Disabled". 7354 :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState 7355 :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: 7356 Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, 7357 Brute_Force. 7358 :type disabled_alerts: list[str] 7359 :param email_addresses: Specifies an array of e-mail addresses to which the alert is sent. 7360 :type email_addresses: list[str] 7361 :param email_account_admins: Specifies that the alert is sent to the account administrators. 7362 :type email_account_admins: bool 7363 :param storage_endpoint: Specifies the blob storage endpoint (e.g. 7364 https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection 7365 audit logs. 7366 :type storage_endpoint: str 7367 :param storage_account_access_key: Specifies the identifier key of the Threat Detection audit 7368 storage account. 7369 :type storage_account_access_key: str 7370 :param retention_days: Specifies the number of days to keep in the Threat Detection audit logs. 7371 :type retention_days: int 7372 :ivar creation_time: Specifies the UTC creation time of the policy. 7373 :vartype creation_time: ~datetime.datetime 7374 """ 7375 7376 _validation = { 7377 'id': {'readonly': True}, 7378 'name': {'readonly': True}, 7379 'type': {'readonly': True}, 7380 'creation_time': {'readonly': True}, 7381 } 7382 7383 _attribute_map = { 7384 'id': {'key': 'id', 'type': 'str'}, 7385 'name': {'key': 'name', 'type': 'str'}, 7386 'type': {'key': 'type', 'type': 'str'}, 7387 'state': {'key': 'properties.state', 'type': 'str'}, 7388 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, 7389 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, 7390 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, 7391 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, 7392 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 7393 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 7394 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 7395 } 7396 7397 def __init__( 7398 self, 7399 *, 7400 state: Optional[Union[str, "SecurityAlertPolicyState"]] = None, 7401 disabled_alerts: Optional[List[str]] = None, 7402 email_addresses: Optional[List[str]] = None, 7403 email_account_admins: Optional[bool] = None, 7404 storage_endpoint: Optional[str] = None, 7405 storage_account_access_key: Optional[str] = None, 7406 retention_days: Optional[int] = None, 7407 **kwargs 7408 ): 7409 super(ManagedDatabaseSecurityAlertPolicy, self).__init__(**kwargs) 7410 self.state = state 7411 self.disabled_alerts = disabled_alerts 7412 self.email_addresses = email_addresses 7413 self.email_account_admins = email_account_admins 7414 self.storage_endpoint = storage_endpoint 7415 self.storage_account_access_key = storage_account_access_key 7416 self.retention_days = retention_days 7417 self.creation_time = None 7418 7419 7420class ManagedDatabaseSecurityAlertPolicyListResult(msrest.serialization.Model): 7421 """A list of the managed database's security alert policies. 7422 7423 Variables are only populated by the server, and will be ignored when sending a request. 7424 7425 :ivar value: Array of results. 7426 :vartype value: list[~azure.mgmt.sql.models.ManagedDatabaseSecurityAlertPolicy] 7427 :ivar next_link: Link to retrieve next page of results. 7428 :vartype next_link: str 7429 """ 7430 7431 _validation = { 7432 'value': {'readonly': True}, 7433 'next_link': {'readonly': True}, 7434 } 7435 7436 _attribute_map = { 7437 'value': {'key': 'value', 'type': '[ManagedDatabaseSecurityAlertPolicy]'}, 7438 'next_link': {'key': 'nextLink', 'type': 'str'}, 7439 } 7440 7441 def __init__( 7442 self, 7443 **kwargs 7444 ): 7445 super(ManagedDatabaseSecurityAlertPolicyListResult, self).__init__(**kwargs) 7446 self.value = None 7447 self.next_link = None 7448 7449 7450class ManagedDatabaseUpdate(msrest.serialization.Model): 7451 """An managed database update. 7452 7453 Variables are only populated by the server, and will be ignored when sending a request. 7454 7455 :param tags: A set of tags. Resource tags. 7456 :type tags: dict[str, str] 7457 :param collation: Collation of the managed database. 7458 :type collation: str 7459 :ivar status: Status of the database. Possible values include: "Online", "Offline", "Shutdown", 7460 "Creating", "Inaccessible", "Restoring", "Updating". 7461 :vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus 7462 :ivar creation_date: Creation date of the database. 7463 :vartype creation_date: ~datetime.datetime 7464 :ivar earliest_restore_point: Earliest restore point in time for point in time restore. 7465 :vartype earliest_restore_point: ~datetime.datetime 7466 :param restore_point_in_time: Conditional. If createMode is PointInTimeRestore, this value is 7467 required. Specifies the point in time (ISO8601 format) of the source database that will be 7468 restored to create the new database. 7469 :type restore_point_in_time: ~datetime.datetime 7470 :ivar default_secondary_location: Geo paired region. 7471 :vartype default_secondary_location: str 7472 :param catalog_collation: Collation of the metadata catalog. Possible values include: 7473 "DATABASE_DEFAULT", "SQL_Latin1_General_CP1_CI_AS". 7474 :type catalog_collation: str or ~azure.mgmt.sql.models.CatalogCollationType 7475 :param create_mode: Managed database create mode. PointInTimeRestore: Create a database by 7476 restoring a point in time backup of an existing database. SourceDatabaseName, 7477 SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a 7478 database by restoring from external backup files. Collation, StorageContainerUri and 7479 StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a 7480 geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database 7481 resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a 7482 long term retention backup (longTermRetentionBackupResourceId required). Possible values 7483 include: "Default", "RestoreExternalBackup", "PointInTimeRestore", "Recovery", 7484 "RestoreLongTermRetentionBackup". 7485 :type create_mode: str or ~azure.mgmt.sql.models.ManagedDatabaseCreateMode 7486 :param storage_container_uri: Conditional. If createMode is RestoreExternalBackup, this value 7487 is required. Specifies the uri of the storage container where backups for this restore are 7488 stored. 7489 :type storage_container_uri: str 7490 :param source_database_id: The resource identifier of the source database associated with 7491 create operation of this database. 7492 :type source_database_id: str 7493 :param restorable_dropped_database_id: The restorable dropped database resource id to restore 7494 when creating this database. 7495 :type restorable_dropped_database_id: str 7496 :param storage_container_sas_token: Conditional. If createMode is RestoreExternalBackup, this 7497 value is required. Specifies the storage container sas token. 7498 :type storage_container_sas_token: str 7499 :ivar failover_group_id: Instance Failover Group resource identifier that this managed database 7500 belongs to. 7501 :vartype failover_group_id: str 7502 :param recoverable_database_id: The resource identifier of the recoverable database associated 7503 with create operation of this database. 7504 :type recoverable_database_id: str 7505 :param long_term_retention_backup_resource_id: The name of the Long Term Retention backup to be 7506 used for restore of this managed database. 7507 :type long_term_retention_backup_resource_id: str 7508 :param auto_complete_restore: Whether to auto complete restore of this managed database. 7509 :type auto_complete_restore: bool 7510 :param last_backup_name: Last backup file name for restore of this managed database. 7511 :type last_backup_name: str 7512 """ 7513 7514 _validation = { 7515 'status': {'readonly': True}, 7516 'creation_date': {'readonly': True}, 7517 'earliest_restore_point': {'readonly': True}, 7518 'default_secondary_location': {'readonly': True}, 7519 'failover_group_id': {'readonly': True}, 7520 } 7521 7522 _attribute_map = { 7523 'tags': {'key': 'tags', 'type': '{str}'}, 7524 'collation': {'key': 'properties.collation', 'type': 'str'}, 7525 'status': {'key': 'properties.status', 'type': 'str'}, 7526 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 7527 'earliest_restore_point': {'key': 'properties.earliestRestorePoint', 'type': 'iso-8601'}, 7528 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, 7529 'default_secondary_location': {'key': 'properties.defaultSecondaryLocation', 'type': 'str'}, 7530 'catalog_collation': {'key': 'properties.catalogCollation', 'type': 'str'}, 7531 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, 7532 'storage_container_uri': {'key': 'properties.storageContainerUri', 'type': 'str'}, 7533 'source_database_id': {'key': 'properties.sourceDatabaseId', 'type': 'str'}, 7534 'restorable_dropped_database_id': {'key': 'properties.restorableDroppedDatabaseId', 'type': 'str'}, 7535 'storage_container_sas_token': {'key': 'properties.storageContainerSasToken', 'type': 'str'}, 7536 'failover_group_id': {'key': 'properties.failoverGroupId', 'type': 'str'}, 7537 'recoverable_database_id': {'key': 'properties.recoverableDatabaseId', 'type': 'str'}, 7538 'long_term_retention_backup_resource_id': {'key': 'properties.longTermRetentionBackupResourceId', 'type': 'str'}, 7539 'auto_complete_restore': {'key': 'properties.autoCompleteRestore', 'type': 'bool'}, 7540 'last_backup_name': {'key': 'properties.lastBackupName', 'type': 'str'}, 7541 } 7542 7543 def __init__( 7544 self, 7545 *, 7546 tags: Optional[Dict[str, str]] = None, 7547 collation: Optional[str] = None, 7548 restore_point_in_time: Optional[datetime.datetime] = None, 7549 catalog_collation: Optional[Union[str, "CatalogCollationType"]] = None, 7550 create_mode: Optional[Union[str, "ManagedDatabaseCreateMode"]] = None, 7551 storage_container_uri: Optional[str] = None, 7552 source_database_id: Optional[str] = None, 7553 restorable_dropped_database_id: Optional[str] = None, 7554 storage_container_sas_token: Optional[str] = None, 7555 recoverable_database_id: Optional[str] = None, 7556 long_term_retention_backup_resource_id: Optional[str] = None, 7557 auto_complete_restore: Optional[bool] = None, 7558 last_backup_name: Optional[str] = None, 7559 **kwargs 7560 ): 7561 super(ManagedDatabaseUpdate, self).__init__(**kwargs) 7562 self.tags = tags 7563 self.collation = collation 7564 self.status = None 7565 self.creation_date = None 7566 self.earliest_restore_point = None 7567 self.restore_point_in_time = restore_point_in_time 7568 self.default_secondary_location = None 7569 self.catalog_collation = catalog_collation 7570 self.create_mode = create_mode 7571 self.storage_container_uri = storage_container_uri 7572 self.source_database_id = source_database_id 7573 self.restorable_dropped_database_id = restorable_dropped_database_id 7574 self.storage_container_sas_token = storage_container_sas_token 7575 self.failover_group_id = None 7576 self.recoverable_database_id = recoverable_database_id 7577 self.long_term_retention_backup_resource_id = long_term_retention_backup_resource_id 7578 self.auto_complete_restore = auto_complete_restore 7579 self.last_backup_name = last_backup_name 7580 7581 7582class ManagedInstance(TrackedResource): 7583 """An Azure SQL managed instance. 7584 7585 Variables are only populated by the server, and will be ignored when sending a request. 7586 7587 All required parameters must be populated in order to send to Azure. 7588 7589 :ivar id: Resource ID. 7590 :vartype id: str 7591 :ivar name: Resource name. 7592 :vartype name: str 7593 :ivar type: Resource type. 7594 :vartype type: str 7595 :param location: Required. Resource location. 7596 :type location: str 7597 :param tags: A set of tags. Resource tags. 7598 :type tags: dict[str, str] 7599 :param identity: The Azure Active Directory identity of the managed instance. 7600 :type identity: ~azure.mgmt.sql.models.ResourceIdentity 7601 :param sku: Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, 7602 BC_Gen5. 7603 :type sku: ~azure.mgmt.sql.models.Sku 7604 :ivar provisioning_state: Possible values include: "Creating", "Deleting", "Updating", 7605 "Unknown", "Succeeded", "Failed". 7606 :vartype provisioning_state: str or 7607 ~azure.mgmt.sql.models.ManagedInstancePropertiesProvisioningState 7608 :param managed_instance_create_mode: Specifies the mode of database creation. 7609 7610 Default: Regular instance creation. 7611 7612 Restore: Creates an instance by restoring a set of backups to specific point in time. 7613 RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: 7614 "Default", "PointInTimeRestore". 7615 :type managed_instance_create_mode: str or ~azure.mgmt.sql.models.ManagedServerCreateMode 7616 :ivar fully_qualified_domain_name: The fully qualified domain name of the managed instance. 7617 :vartype fully_qualified_domain_name: str 7618 :param administrator_login: Administrator username for the managed instance. Can only be 7619 specified when the managed instance is being created (and is required for creation). 7620 :type administrator_login: str 7621 :param administrator_login_password: The administrator login password (required for managed 7622 instance creation). 7623 :type administrator_login_password: str 7624 :param subnet_id: Subnet resource ID for the managed instance. 7625 :type subnet_id: str 7626 :ivar state: The state of the managed instance. 7627 :vartype state: str 7628 :param license_type: The license type. Possible values are 'LicenseIncluded' (regular price 7629 inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL 7630 licenses). Possible values include: "LicenseIncluded", "BasePrice". 7631 :type license_type: str or ~azure.mgmt.sql.models.ManagedInstanceLicenseType 7632 :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. 7633 :type v_cores: int 7634 :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum value: 8192. 7635 Increments of 32 GB allowed only. 7636 :type storage_size_in_gb: int 7637 :param collation: Collation of the managed instance. 7638 :type collation: str 7639 :ivar dns_zone: The Dns Zone that the managed instance is in. 7640 :vartype dns_zone: str 7641 :param dns_zone_partner: The resource id of another managed instance whose DNS zone this 7642 managed instance will share after creation. 7643 :type dns_zone_partner: str 7644 :param public_data_endpoint_enabled: Whether or not the public data endpoint is enabled. 7645 :type public_data_endpoint_enabled: bool 7646 :param source_managed_instance_id: The resource identifier of the source managed instance 7647 associated with create operation of this instance. 7648 :type source_managed_instance_id: str 7649 :param restore_point_in_time: Specifies the point in time (ISO8601 format) of the source 7650 database that will be restored to create the new database. 7651 :type restore_point_in_time: ~datetime.datetime 7652 :param proxy_override: Connection type used for connecting to the instance. Possible values 7653 include: "Proxy", "Redirect", "Default". 7654 :type proxy_override: str or ~azure.mgmt.sql.models.ManagedInstanceProxyOverride 7655 :param timezone_id: Id of the timezone. Allowed values are timezones supported by Windows. 7656 Windows keeps details on supported timezones, including the id, in registry under 7657 KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. 7658 You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM 7659 sys.time_zone_info. 7660 List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in 7661 PowerShell. 7662 An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". 7663 :type timezone_id: str 7664 :param instance_pool_id: The Id of the instance pool this managed server belongs to. 7665 :type instance_pool_id: str 7666 :param maintenance_configuration_id: Specifies maintenance configuration id to apply to this 7667 managed instance. 7668 :type maintenance_configuration_id: str 7669 :ivar private_endpoint_connections: List of private endpoint connections on a managed instance. 7670 :vartype private_endpoint_connections: list[~azure.mgmt.sql.models.ManagedInstancePecProperty] 7671 :param minimal_tls_version: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. 7672 :type minimal_tls_version: str 7673 :param storage_account_type: The storage account type used to store backups for this instance. 7674 The options are LRS (LocallyRedundantStorage), ZRS (ZoneRedundantStorage) and GRS 7675 (GeoRedundantStorage). Possible values include: "GRS", "LRS", "ZRS". 7676 :type storage_account_type: str or ~azure.mgmt.sql.models.StorageAccountType 7677 :param zone_redundant: Whether or not the multi-az is enabled. 7678 :type zone_redundant: bool 7679 :param primary_user_assigned_identity_id: The resource id of a user assigned identity to be 7680 used by default. 7681 :type primary_user_assigned_identity_id: str 7682 :param key_id: A CMK URI of the key to use for encryption. 7683 :type key_id: str 7684 :param administrators: The Azure Active Directory administrator of the server. 7685 :type administrators: ~azure.mgmt.sql.models.ManagedInstanceExternalAdministrator 7686 """ 7687 7688 _validation = { 7689 'id': {'readonly': True}, 7690 'name': {'readonly': True}, 7691 'type': {'readonly': True}, 7692 'location': {'required': True}, 7693 'provisioning_state': {'readonly': True}, 7694 'fully_qualified_domain_name': {'readonly': True}, 7695 'state': {'readonly': True}, 7696 'dns_zone': {'readonly': True}, 7697 'private_endpoint_connections': {'readonly': True}, 7698 } 7699 7700 _attribute_map = { 7701 'id': {'key': 'id', 'type': 'str'}, 7702 'name': {'key': 'name', 'type': 'str'}, 7703 'type': {'key': 'type', 'type': 'str'}, 7704 'location': {'key': 'location', 'type': 'str'}, 7705 'tags': {'key': 'tags', 'type': '{str}'}, 7706 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 7707 'sku': {'key': 'sku', 'type': 'Sku'}, 7708 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 7709 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, 7710 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, 7711 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, 7712 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, 7713 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, 7714 'state': {'key': 'properties.state', 'type': 'str'}, 7715 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, 7716 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, 7717 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, 7718 'collation': {'key': 'properties.collation', 'type': 'str'}, 7719 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, 7720 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, 7721 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, 7722 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, 7723 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, 7724 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, 7725 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, 7726 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, 7727 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 7728 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ManagedInstancePecProperty]'}, 7729 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, 7730 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, 7731 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, 7732 'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'}, 7733 'key_id': {'key': 'properties.keyId', 'type': 'str'}, 7734 'administrators': {'key': 'properties.administrators', 'type': 'ManagedInstanceExternalAdministrator'}, 7735 } 7736 7737 def __init__( 7738 self, 7739 *, 7740 location: str, 7741 tags: Optional[Dict[str, str]] = None, 7742 identity: Optional["ResourceIdentity"] = None, 7743 sku: Optional["Sku"] = None, 7744 managed_instance_create_mode: Optional[Union[str, "ManagedServerCreateMode"]] = None, 7745 administrator_login: Optional[str] = None, 7746 administrator_login_password: Optional[str] = None, 7747 subnet_id: Optional[str] = None, 7748 license_type: Optional[Union[str, "ManagedInstanceLicenseType"]] = None, 7749 v_cores: Optional[int] = None, 7750 storage_size_in_gb: Optional[int] = None, 7751 collation: Optional[str] = None, 7752 dns_zone_partner: Optional[str] = None, 7753 public_data_endpoint_enabled: Optional[bool] = None, 7754 source_managed_instance_id: Optional[str] = None, 7755 restore_point_in_time: Optional[datetime.datetime] = None, 7756 proxy_override: Optional[Union[str, "ManagedInstanceProxyOverride"]] = None, 7757 timezone_id: Optional[str] = None, 7758 instance_pool_id: Optional[str] = None, 7759 maintenance_configuration_id: Optional[str] = None, 7760 minimal_tls_version: Optional[str] = None, 7761 storage_account_type: Optional[Union[str, "StorageAccountType"]] = None, 7762 zone_redundant: Optional[bool] = None, 7763 primary_user_assigned_identity_id: Optional[str] = None, 7764 key_id: Optional[str] = None, 7765 administrators: Optional["ManagedInstanceExternalAdministrator"] = None, 7766 **kwargs 7767 ): 7768 super(ManagedInstance, self).__init__(location=location, tags=tags, **kwargs) 7769 self.identity = identity 7770 self.sku = sku 7771 self.provisioning_state = None 7772 self.managed_instance_create_mode = managed_instance_create_mode 7773 self.fully_qualified_domain_name = None 7774 self.administrator_login = administrator_login 7775 self.administrator_login_password = administrator_login_password 7776 self.subnet_id = subnet_id 7777 self.state = None 7778 self.license_type = license_type 7779 self.v_cores = v_cores 7780 self.storage_size_in_gb = storage_size_in_gb 7781 self.collation = collation 7782 self.dns_zone = None 7783 self.dns_zone_partner = dns_zone_partner 7784 self.public_data_endpoint_enabled = public_data_endpoint_enabled 7785 self.source_managed_instance_id = source_managed_instance_id 7786 self.restore_point_in_time = restore_point_in_time 7787 self.proxy_override = proxy_override 7788 self.timezone_id = timezone_id 7789 self.instance_pool_id = instance_pool_id 7790 self.maintenance_configuration_id = maintenance_configuration_id 7791 self.private_endpoint_connections = None 7792 self.minimal_tls_version = minimal_tls_version 7793 self.storage_account_type = storage_account_type 7794 self.zone_redundant = zone_redundant 7795 self.primary_user_assigned_identity_id = primary_user_assigned_identity_id 7796 self.key_id = key_id 7797 self.administrators = administrators 7798 7799 7800class ManagedInstanceAdministrator(ProxyResource): 7801 """An Azure SQL managed instance administrator. 7802 7803 Variables are only populated by the server, and will be ignored when sending a request. 7804 7805 :ivar id: Resource ID. 7806 :vartype id: str 7807 :ivar name: Resource name. 7808 :vartype name: str 7809 :ivar type: Resource type. 7810 :vartype type: str 7811 :param administrator_type: Type of the managed instance administrator. Possible values include: 7812 "ActiveDirectory". 7813 :type administrator_type: str or ~azure.mgmt.sql.models.ManagedInstanceAdministratorType 7814 :param login: Login name of the managed instance administrator. 7815 :type login: str 7816 :param sid: SID (object ID) of the managed instance administrator. 7817 :type sid: str 7818 :param tenant_id: Tenant ID of the managed instance administrator. 7819 :type tenant_id: str 7820 """ 7821 7822 _validation = { 7823 'id': {'readonly': True}, 7824 'name': {'readonly': True}, 7825 'type': {'readonly': True}, 7826 } 7827 7828 _attribute_map = { 7829 'id': {'key': 'id', 'type': 'str'}, 7830 'name': {'key': 'name', 'type': 'str'}, 7831 'type': {'key': 'type', 'type': 'str'}, 7832 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, 7833 'login': {'key': 'properties.login', 'type': 'str'}, 7834 'sid': {'key': 'properties.sid', 'type': 'str'}, 7835 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 7836 } 7837 7838 def __init__( 7839 self, 7840 *, 7841 administrator_type: Optional[Union[str, "ManagedInstanceAdministratorType"]] = None, 7842 login: Optional[str] = None, 7843 sid: Optional[str] = None, 7844 tenant_id: Optional[str] = None, 7845 **kwargs 7846 ): 7847 super(ManagedInstanceAdministrator, self).__init__(**kwargs) 7848 self.administrator_type = administrator_type 7849 self.login = login 7850 self.sid = sid 7851 self.tenant_id = tenant_id 7852 7853 7854class ManagedInstanceAdministratorListResult(msrest.serialization.Model): 7855 """A list of managed instance administrators. 7856 7857 Variables are only populated by the server, and will be ignored when sending a request. 7858 7859 :ivar value: Array of results. 7860 :vartype value: list[~azure.mgmt.sql.models.ManagedInstanceAdministrator] 7861 :ivar next_link: Link to retrieve next page of results. 7862 :vartype next_link: str 7863 """ 7864 7865 _validation = { 7866 'value': {'readonly': True}, 7867 'next_link': {'readonly': True}, 7868 } 7869 7870 _attribute_map = { 7871 'value': {'key': 'value', 'type': '[ManagedInstanceAdministrator]'}, 7872 'next_link': {'key': 'nextLink', 'type': 'str'}, 7873 } 7874 7875 def __init__( 7876 self, 7877 **kwargs 7878 ): 7879 super(ManagedInstanceAdministratorListResult, self).__init__(**kwargs) 7880 self.value = None 7881 self.next_link = None 7882 7883 7884class ManagedInstanceAzureADOnlyAuthentication(ProxyResource): 7885 """Azure Active Directory only authentication. 7886 7887 Variables are only populated by the server, and will be ignored when sending a request. 7888 7889 :ivar id: Resource ID. 7890 :vartype id: str 7891 :ivar name: Resource name. 7892 :vartype name: str 7893 :ivar type: Resource type. 7894 :vartype type: str 7895 :param azure_ad_only_authentication: Azure Active Directory only Authentication enabled. 7896 :type azure_ad_only_authentication: bool 7897 """ 7898 7899 _validation = { 7900 'id': {'readonly': True}, 7901 'name': {'readonly': True}, 7902 'type': {'readonly': True}, 7903 } 7904 7905 _attribute_map = { 7906 'id': {'key': 'id', 'type': 'str'}, 7907 'name': {'key': 'name', 'type': 'str'}, 7908 'type': {'key': 'type', 'type': 'str'}, 7909 'azure_ad_only_authentication': {'key': 'properties.azureADOnlyAuthentication', 'type': 'bool'}, 7910 } 7911 7912 def __init__( 7913 self, 7914 *, 7915 azure_ad_only_authentication: Optional[bool] = None, 7916 **kwargs 7917 ): 7918 super(ManagedInstanceAzureADOnlyAuthentication, self).__init__(**kwargs) 7919 self.azure_ad_only_authentication = azure_ad_only_authentication 7920 7921 7922class ManagedInstanceAzureADOnlyAuthListResult(msrest.serialization.Model): 7923 """A list of active directory only authentications. 7924 7925 Variables are only populated by the server, and will be ignored when sending a request. 7926 7927 :ivar value: Array of results. 7928 :vartype value: list[~azure.mgmt.sql.models.ManagedInstanceAzureADOnlyAuthentication] 7929 :ivar next_link: Link to retrieve next page of results. 7930 :vartype next_link: str 7931 """ 7932 7933 _validation = { 7934 'value': {'readonly': True}, 7935 'next_link': {'readonly': True}, 7936 } 7937 7938 _attribute_map = { 7939 'value': {'key': 'value', 'type': '[ManagedInstanceAzureADOnlyAuthentication]'}, 7940 'next_link': {'key': 'nextLink', 'type': 'str'}, 7941 } 7942 7943 def __init__( 7944 self, 7945 **kwargs 7946 ): 7947 super(ManagedInstanceAzureADOnlyAuthListResult, self).__init__(**kwargs) 7948 self.value = None 7949 self.next_link = None 7950 7951 7952class ManagedInstanceEditionCapability(msrest.serialization.Model): 7953 """The managed server capability. 7954 7955 Variables are only populated by the server, and will be ignored when sending a request. 7956 7957 :ivar name: The managed server version name. 7958 :vartype name: str 7959 :ivar supported_families: The supported families. 7960 :vartype supported_families: list[~azure.mgmt.sql.models.ManagedInstanceFamilyCapability] 7961 :ivar supported_storage_capabilities: The list of supported storage capabilities for this 7962 edition. 7963 :vartype supported_storage_capabilities: list[~azure.mgmt.sql.models.StorageCapability] 7964 :ivar zone_redundant: Whether or not zone redundancy is supported for the edition. 7965 :vartype zone_redundant: bool 7966 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 7967 "Default", "Disabled". 7968 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 7969 :param reason: The reason for the capability not being available. 7970 :type reason: str 7971 """ 7972 7973 _validation = { 7974 'name': {'readonly': True}, 7975 'supported_families': {'readonly': True}, 7976 'supported_storage_capabilities': {'readonly': True}, 7977 'zone_redundant': {'readonly': True}, 7978 'status': {'readonly': True}, 7979 } 7980 7981 _attribute_map = { 7982 'name': {'key': 'name', 'type': 'str'}, 7983 'supported_families': {'key': 'supportedFamilies', 'type': '[ManagedInstanceFamilyCapability]'}, 7984 'supported_storage_capabilities': {'key': 'supportedStorageCapabilities', 'type': '[StorageCapability]'}, 7985 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, 7986 'status': {'key': 'status', 'type': 'str'}, 7987 'reason': {'key': 'reason', 'type': 'str'}, 7988 } 7989 7990 def __init__( 7991 self, 7992 *, 7993 reason: Optional[str] = None, 7994 **kwargs 7995 ): 7996 super(ManagedInstanceEditionCapability, self).__init__(**kwargs) 7997 self.name = None 7998 self.supported_families = None 7999 self.supported_storage_capabilities = None 8000 self.zone_redundant = None 8001 self.status = None 8002 self.reason = reason 8003 8004 8005class ManagedInstanceEncryptionProtector(ProxyResource): 8006 """The managed instance encryption protector. 8007 8008 Variables are only populated by the server, and will be ignored when sending a request. 8009 8010 :ivar id: Resource ID. 8011 :vartype id: str 8012 :ivar name: Resource name. 8013 :vartype name: str 8014 :ivar type: Resource type. 8015 :vartype type: str 8016 :ivar kind: Kind of encryption protector. This is metadata used for the Azure portal 8017 experience. 8018 :vartype kind: str 8019 :param server_key_name: The name of the managed instance key. 8020 :type server_key_name: str 8021 :param server_key_type: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. 8022 Possible values include: "ServiceManaged", "AzureKeyVault". 8023 :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType 8024 :ivar uri: The URI of the server key. 8025 :vartype uri: str 8026 :ivar thumbprint: Thumbprint of the server key. 8027 :vartype thumbprint: str 8028 :param auto_rotation_enabled: Key auto rotation opt-in flag. Either true or false. 8029 :type auto_rotation_enabled: bool 8030 """ 8031 8032 _validation = { 8033 'id': {'readonly': True}, 8034 'name': {'readonly': True}, 8035 'type': {'readonly': True}, 8036 'kind': {'readonly': True}, 8037 'uri': {'readonly': True}, 8038 'thumbprint': {'readonly': True}, 8039 } 8040 8041 _attribute_map = { 8042 'id': {'key': 'id', 'type': 'str'}, 8043 'name': {'key': 'name', 'type': 'str'}, 8044 'type': {'key': 'type', 'type': 'str'}, 8045 'kind': {'key': 'kind', 'type': 'str'}, 8046 'server_key_name': {'key': 'properties.serverKeyName', 'type': 'str'}, 8047 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, 8048 'uri': {'key': 'properties.uri', 'type': 'str'}, 8049 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, 8050 'auto_rotation_enabled': {'key': 'properties.autoRotationEnabled', 'type': 'bool'}, 8051 } 8052 8053 def __init__( 8054 self, 8055 *, 8056 server_key_name: Optional[str] = None, 8057 server_key_type: Optional[Union[str, "ServerKeyType"]] = None, 8058 auto_rotation_enabled: Optional[bool] = None, 8059 **kwargs 8060 ): 8061 super(ManagedInstanceEncryptionProtector, self).__init__(**kwargs) 8062 self.kind = None 8063 self.server_key_name = server_key_name 8064 self.server_key_type = server_key_type 8065 self.uri = None 8066 self.thumbprint = None 8067 self.auto_rotation_enabled = auto_rotation_enabled 8068 8069 8070class ManagedInstanceEncryptionProtectorListResult(msrest.serialization.Model): 8071 """A list of managed instance encryption protectors. 8072 8073 Variables are only populated by the server, and will be ignored when sending a request. 8074 8075 :ivar value: Array of results. 8076 :vartype value: list[~azure.mgmt.sql.models.ManagedInstanceEncryptionProtector] 8077 :ivar next_link: Link to retrieve next page of results. 8078 :vartype next_link: str 8079 """ 8080 8081 _validation = { 8082 'value': {'readonly': True}, 8083 'next_link': {'readonly': True}, 8084 } 8085 8086 _attribute_map = { 8087 'value': {'key': 'value', 'type': '[ManagedInstanceEncryptionProtector]'}, 8088 'next_link': {'key': 'nextLink', 'type': 'str'}, 8089 } 8090 8091 def __init__( 8092 self, 8093 **kwargs 8094 ): 8095 super(ManagedInstanceEncryptionProtectorListResult, self).__init__(**kwargs) 8096 self.value = None 8097 self.next_link = None 8098 8099 8100class ManagedInstanceExternalAdministrator(msrest.serialization.Model): 8101 """Properties of a active directory administrator. 8102 8103 :param administrator_type: Type of the sever administrator. Possible values include: 8104 "ActiveDirectory". 8105 :type administrator_type: str or ~azure.mgmt.sql.models.AdministratorType 8106 :param principal_type: Principal Type of the sever administrator. Possible values include: 8107 "User", "Group", "Application". 8108 :type principal_type: str or ~azure.mgmt.sql.models.PrincipalType 8109 :param login: Login name of the server administrator. 8110 :type login: str 8111 :param sid: SID (object ID) of the server administrator. 8112 :type sid: str 8113 :param tenant_id: Tenant ID of the administrator. 8114 :type tenant_id: str 8115 :param azure_ad_only_authentication: Azure Active Directory only Authentication enabled. 8116 :type azure_ad_only_authentication: bool 8117 """ 8118 8119 _attribute_map = { 8120 'administrator_type': {'key': 'administratorType', 'type': 'str'}, 8121 'principal_type': {'key': 'principalType', 'type': 'str'}, 8122 'login': {'key': 'login', 'type': 'str'}, 8123 'sid': {'key': 'sid', 'type': 'str'}, 8124 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 8125 'azure_ad_only_authentication': {'key': 'azureADOnlyAuthentication', 'type': 'bool'}, 8126 } 8127 8128 def __init__( 8129 self, 8130 *, 8131 administrator_type: Optional[Union[str, "AdministratorType"]] = None, 8132 principal_type: Optional[Union[str, "PrincipalType"]] = None, 8133 login: Optional[str] = None, 8134 sid: Optional[str] = None, 8135 tenant_id: Optional[str] = None, 8136 azure_ad_only_authentication: Optional[bool] = None, 8137 **kwargs 8138 ): 8139 super(ManagedInstanceExternalAdministrator, self).__init__(**kwargs) 8140 self.administrator_type = administrator_type 8141 self.principal_type = principal_type 8142 self.login = login 8143 self.sid = sid 8144 self.tenant_id = tenant_id 8145 self.azure_ad_only_authentication = azure_ad_only_authentication 8146 8147 8148class ManagedInstanceFamilyCapability(msrest.serialization.Model): 8149 """The managed server family capability. 8150 8151 Variables are only populated by the server, and will be ignored when sending a request. 8152 8153 :ivar name: Family name. 8154 :vartype name: str 8155 :ivar sku: SKU name. 8156 :vartype sku: str 8157 :ivar supported_license_types: List of supported license types. 8158 :vartype supported_license_types: list[~azure.mgmt.sql.models.LicenseTypeCapability] 8159 :ivar supported_vcores_values: List of supported virtual cores values. 8160 :vartype supported_vcores_values: list[~azure.mgmt.sql.models.ManagedInstanceVcoresCapability] 8161 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 8162 "Default", "Disabled". 8163 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 8164 :param reason: The reason for the capability not being available. 8165 :type reason: str 8166 """ 8167 8168 _validation = { 8169 'name': {'readonly': True}, 8170 'sku': {'readonly': True}, 8171 'supported_license_types': {'readonly': True}, 8172 'supported_vcores_values': {'readonly': True}, 8173 'status': {'readonly': True}, 8174 } 8175 8176 _attribute_map = { 8177 'name': {'key': 'name', 'type': 'str'}, 8178 'sku': {'key': 'sku', 'type': 'str'}, 8179 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, 8180 'supported_vcores_values': {'key': 'supportedVcoresValues', 'type': '[ManagedInstanceVcoresCapability]'}, 8181 'status': {'key': 'status', 'type': 'str'}, 8182 'reason': {'key': 'reason', 'type': 'str'}, 8183 } 8184 8185 def __init__( 8186 self, 8187 *, 8188 reason: Optional[str] = None, 8189 **kwargs 8190 ): 8191 super(ManagedInstanceFamilyCapability, self).__init__(**kwargs) 8192 self.name = None 8193 self.sku = None 8194 self.supported_license_types = None 8195 self.supported_vcores_values = None 8196 self.status = None 8197 self.reason = reason 8198 8199 8200class ManagedInstanceKey(ProxyResource): 8201 """A managed instance key. 8202 8203 Variables are only populated by the server, and will be ignored when sending a request. 8204 8205 :ivar id: Resource ID. 8206 :vartype id: str 8207 :ivar name: Resource name. 8208 :vartype name: str 8209 :ivar type: Resource type. 8210 :vartype type: str 8211 :ivar kind: Kind of encryption protector. This is metadata used for the Azure portal 8212 experience. 8213 :vartype kind: str 8214 :param server_key_type: The key type like 'ServiceManaged', 'AzureKeyVault'. Possible values 8215 include: "ServiceManaged", "AzureKeyVault". 8216 :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType 8217 :param uri: The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is 8218 required. 8219 :type uri: str 8220 :ivar thumbprint: Thumbprint of the key. 8221 :vartype thumbprint: str 8222 :ivar creation_date: The key creation date. 8223 :vartype creation_date: ~datetime.datetime 8224 :ivar auto_rotation_enabled: Key auto rotation opt-in flag. Either true or false. 8225 :vartype auto_rotation_enabled: bool 8226 """ 8227 8228 _validation = { 8229 'id': {'readonly': True}, 8230 'name': {'readonly': True}, 8231 'type': {'readonly': True}, 8232 'kind': {'readonly': True}, 8233 'thumbprint': {'readonly': True}, 8234 'creation_date': {'readonly': True}, 8235 'auto_rotation_enabled': {'readonly': True}, 8236 } 8237 8238 _attribute_map = { 8239 'id': {'key': 'id', 'type': 'str'}, 8240 'name': {'key': 'name', 'type': 'str'}, 8241 'type': {'key': 'type', 'type': 'str'}, 8242 'kind': {'key': 'kind', 'type': 'str'}, 8243 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, 8244 'uri': {'key': 'properties.uri', 'type': 'str'}, 8245 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, 8246 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 8247 'auto_rotation_enabled': {'key': 'properties.autoRotationEnabled', 'type': 'bool'}, 8248 } 8249 8250 def __init__( 8251 self, 8252 *, 8253 server_key_type: Optional[Union[str, "ServerKeyType"]] = None, 8254 uri: Optional[str] = None, 8255 **kwargs 8256 ): 8257 super(ManagedInstanceKey, self).__init__(**kwargs) 8258 self.kind = None 8259 self.server_key_type = server_key_type 8260 self.uri = uri 8261 self.thumbprint = None 8262 self.creation_date = None 8263 self.auto_rotation_enabled = None 8264 8265 8266class ManagedInstanceKeyListResult(msrest.serialization.Model): 8267 """A list of managed instance keys. 8268 8269 Variables are only populated by the server, and will be ignored when sending a request. 8270 8271 :ivar value: Array of results. 8272 :vartype value: list[~azure.mgmt.sql.models.ManagedInstanceKey] 8273 :ivar next_link: Link to retrieve next page of results. 8274 :vartype next_link: str 8275 """ 8276 8277 _validation = { 8278 'value': {'readonly': True}, 8279 'next_link': {'readonly': True}, 8280 } 8281 8282 _attribute_map = { 8283 'value': {'key': 'value', 'type': '[ManagedInstanceKey]'}, 8284 'next_link': {'key': 'nextLink', 'type': 'str'}, 8285 } 8286 8287 def __init__( 8288 self, 8289 **kwargs 8290 ): 8291 super(ManagedInstanceKeyListResult, self).__init__(**kwargs) 8292 self.value = None 8293 self.next_link = None 8294 8295 8296class ManagedInstanceListResult(msrest.serialization.Model): 8297 """A list of managed instances. 8298 8299 Variables are only populated by the server, and will be ignored when sending a request. 8300 8301 :ivar value: Array of results. 8302 :vartype value: list[~azure.mgmt.sql.models.ManagedInstance] 8303 :ivar next_link: Link to retrieve next page of results. 8304 :vartype next_link: str 8305 """ 8306 8307 _validation = { 8308 'value': {'readonly': True}, 8309 'next_link': {'readonly': True}, 8310 } 8311 8312 _attribute_map = { 8313 'value': {'key': 'value', 'type': '[ManagedInstance]'}, 8314 'next_link': {'key': 'nextLink', 'type': 'str'}, 8315 } 8316 8317 def __init__( 8318 self, 8319 **kwargs 8320 ): 8321 super(ManagedInstanceListResult, self).__init__(**kwargs) 8322 self.value = None 8323 self.next_link = None 8324 8325 8326class ManagedInstanceLongTermRetentionBackup(ProxyResource): 8327 """A long term retention backup for a managed database. 8328 8329 Variables are only populated by the server, and will be ignored when sending a request. 8330 8331 :ivar id: Resource ID. 8332 :vartype id: str 8333 :ivar name: Resource name. 8334 :vartype name: str 8335 :ivar type: Resource type. 8336 :vartype type: str 8337 :ivar managed_instance_name: The managed instance that the backup database belongs to. 8338 :vartype managed_instance_name: str 8339 :ivar managed_instance_create_time: The create time of the instance. 8340 :vartype managed_instance_create_time: ~datetime.datetime 8341 :ivar database_name: The name of the database the backup belong to. 8342 :vartype database_name: str 8343 :ivar database_deletion_time: The delete time of the database. 8344 :vartype database_deletion_time: ~datetime.datetime 8345 :ivar backup_time: The time the backup was taken. 8346 :vartype backup_time: ~datetime.datetime 8347 :ivar backup_expiration_time: The time the long term retention backup will expire. 8348 :vartype backup_expiration_time: ~datetime.datetime 8349 :ivar backup_storage_redundancy: The storage redundancy type of the backup. Possible values 8350 include: "Geo", "Local", "Zone". 8351 :vartype backup_storage_redundancy: str or ~azure.mgmt.sql.models.BackupStorageRedundancy 8352 """ 8353 8354 _validation = { 8355 'id': {'readonly': True}, 8356 'name': {'readonly': True}, 8357 'type': {'readonly': True}, 8358 'managed_instance_name': {'readonly': True}, 8359 'managed_instance_create_time': {'readonly': True}, 8360 'database_name': {'readonly': True}, 8361 'database_deletion_time': {'readonly': True}, 8362 'backup_time': {'readonly': True}, 8363 'backup_expiration_time': {'readonly': True}, 8364 'backup_storage_redundancy': {'readonly': True}, 8365 } 8366 8367 _attribute_map = { 8368 'id': {'key': 'id', 'type': 'str'}, 8369 'name': {'key': 'name', 'type': 'str'}, 8370 'type': {'key': 'type', 'type': 'str'}, 8371 'managed_instance_name': {'key': 'properties.managedInstanceName', 'type': 'str'}, 8372 'managed_instance_create_time': {'key': 'properties.managedInstanceCreateTime', 'type': 'iso-8601'}, 8373 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 8374 'database_deletion_time': {'key': 'properties.databaseDeletionTime', 'type': 'iso-8601'}, 8375 'backup_time': {'key': 'properties.backupTime', 'type': 'iso-8601'}, 8376 'backup_expiration_time': {'key': 'properties.backupExpirationTime', 'type': 'iso-8601'}, 8377 'backup_storage_redundancy': {'key': 'properties.backupStorageRedundancy', 'type': 'str'}, 8378 } 8379 8380 def __init__( 8381 self, 8382 **kwargs 8383 ): 8384 super(ManagedInstanceLongTermRetentionBackup, self).__init__(**kwargs) 8385 self.managed_instance_name = None 8386 self.managed_instance_create_time = None 8387 self.database_name = None 8388 self.database_deletion_time = None 8389 self.backup_time = None 8390 self.backup_expiration_time = None 8391 self.backup_storage_redundancy = None 8392 8393 8394class ManagedInstanceLongTermRetentionBackupListResult(msrest.serialization.Model): 8395 """A list of long term retention backups for managed database(s). 8396 8397 Variables are only populated by the server, and will be ignored when sending a request. 8398 8399 :ivar value: Array of results. 8400 :vartype value: list[~azure.mgmt.sql.models.ManagedInstanceLongTermRetentionBackup] 8401 :ivar next_link: Link to retrieve next page of results. 8402 :vartype next_link: str 8403 """ 8404 8405 _validation = { 8406 'value': {'readonly': True}, 8407 'next_link': {'readonly': True}, 8408 } 8409 8410 _attribute_map = { 8411 'value': {'key': 'value', 'type': '[ManagedInstanceLongTermRetentionBackup]'}, 8412 'next_link': {'key': 'nextLink', 'type': 'str'}, 8413 } 8414 8415 def __init__( 8416 self, 8417 **kwargs 8418 ): 8419 super(ManagedInstanceLongTermRetentionBackupListResult, self).__init__(**kwargs) 8420 self.value = None 8421 self.next_link = None 8422 8423 8424class ManagedInstanceLongTermRetentionPolicy(ProxyResource): 8425 """A long term retention policy. 8426 8427 Variables are only populated by the server, and will be ignored when sending a request. 8428 8429 :ivar id: Resource ID. 8430 :vartype id: str 8431 :ivar name: Resource name. 8432 :vartype name: str 8433 :ivar type: Resource type. 8434 :vartype type: str 8435 :param weekly_retention: The weekly retention policy for an LTR backup in an ISO 8601 format. 8436 :type weekly_retention: str 8437 :param monthly_retention: The monthly retention policy for an LTR backup in an ISO 8601 format. 8438 :type monthly_retention: str 8439 :param yearly_retention: The yearly retention policy for an LTR backup in an ISO 8601 format. 8440 :type yearly_retention: str 8441 :param week_of_year: The week of year to take the yearly backup in an ISO 8601 format. 8442 :type week_of_year: int 8443 """ 8444 8445 _validation = { 8446 'id': {'readonly': True}, 8447 'name': {'readonly': True}, 8448 'type': {'readonly': True}, 8449 } 8450 8451 _attribute_map = { 8452 'id': {'key': 'id', 'type': 'str'}, 8453 'name': {'key': 'name', 'type': 'str'}, 8454 'type': {'key': 'type', 'type': 'str'}, 8455 'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'}, 8456 'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'}, 8457 'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'}, 8458 'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'}, 8459 } 8460 8461 def __init__( 8462 self, 8463 *, 8464 weekly_retention: Optional[str] = None, 8465 monthly_retention: Optional[str] = None, 8466 yearly_retention: Optional[str] = None, 8467 week_of_year: Optional[int] = None, 8468 **kwargs 8469 ): 8470 super(ManagedInstanceLongTermRetentionPolicy, self).__init__(**kwargs) 8471 self.weekly_retention = weekly_retention 8472 self.monthly_retention = monthly_retention 8473 self.yearly_retention = yearly_retention 8474 self.week_of_year = week_of_year 8475 8476 8477class ManagedInstanceLongTermRetentionPolicyListResult(msrest.serialization.Model): 8478 """A list of long term retention policies. 8479 8480 Variables are only populated by the server, and will be ignored when sending a request. 8481 8482 :ivar value: Array of results. 8483 :vartype value: list[~azure.mgmt.sql.models.ManagedInstanceLongTermRetentionPolicy] 8484 :ivar next_link: Link to retrieve next page of results. 8485 :vartype next_link: str 8486 """ 8487 8488 _validation = { 8489 'value': {'readonly': True}, 8490 'next_link': {'readonly': True}, 8491 } 8492 8493 _attribute_map = { 8494 'value': {'key': 'value', 'type': '[ManagedInstanceLongTermRetentionPolicy]'}, 8495 'next_link': {'key': 'nextLink', 'type': 'str'}, 8496 } 8497 8498 def __init__( 8499 self, 8500 **kwargs 8501 ): 8502 super(ManagedInstanceLongTermRetentionPolicyListResult, self).__init__(**kwargs) 8503 self.value = None 8504 self.next_link = None 8505 8506 8507class ManagedInstanceMaintenanceConfigurationCapability(msrest.serialization.Model): 8508 """The maintenance configuration capability. 8509 8510 Variables are only populated by the server, and will be ignored when sending a request. 8511 8512 :ivar name: Maintenance configuration name. 8513 :vartype name: str 8514 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 8515 "Default", "Disabled". 8516 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 8517 :param reason: The reason for the capability not being available. 8518 :type reason: str 8519 """ 8520 8521 _validation = { 8522 'name': {'readonly': True}, 8523 'status': {'readonly': True}, 8524 } 8525 8526 _attribute_map = { 8527 'name': {'key': 'name', 'type': 'str'}, 8528 'status': {'key': 'status', 'type': 'str'}, 8529 'reason': {'key': 'reason', 'type': 'str'}, 8530 } 8531 8532 def __init__( 8533 self, 8534 *, 8535 reason: Optional[str] = None, 8536 **kwargs 8537 ): 8538 super(ManagedInstanceMaintenanceConfigurationCapability, self).__init__(**kwargs) 8539 self.name = None 8540 self.status = None 8541 self.reason = reason 8542 8543 8544class ManagedInstanceOperation(ProxyResource): 8545 """A managed instance operation. 8546 8547 Variables are only populated by the server, and will be ignored when sending a request. 8548 8549 :ivar id: Resource ID. 8550 :vartype id: str 8551 :ivar name: Resource name. 8552 :vartype name: str 8553 :ivar type: Resource type. 8554 :vartype type: str 8555 :ivar managed_instance_name: The name of the managed instance the operation is being performed 8556 on. 8557 :vartype managed_instance_name: str 8558 :ivar operation: The name of operation. 8559 :vartype operation: str 8560 :ivar operation_friendly_name: The friendly name of operation. 8561 :vartype operation_friendly_name: str 8562 :ivar percent_complete: The percentage of the operation completed. 8563 :vartype percent_complete: int 8564 :ivar start_time: The operation start time. 8565 :vartype start_time: ~datetime.datetime 8566 :ivar state: The operation state. Possible values include: "Pending", "InProgress", 8567 "Succeeded", "Failed", "CancelInProgress", "Cancelled". 8568 :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState 8569 :ivar error_code: The operation error code. 8570 :vartype error_code: int 8571 :ivar error_description: The operation error description. 8572 :vartype error_description: str 8573 :ivar error_severity: The operation error severity. 8574 :vartype error_severity: int 8575 :ivar is_user_error: Whether or not the error is a user error. 8576 :vartype is_user_error: bool 8577 :ivar estimated_completion_time: The estimated completion time of the operation. 8578 :vartype estimated_completion_time: ~datetime.datetime 8579 :ivar description: The operation description. 8580 :vartype description: str 8581 :ivar is_cancellable: Whether the operation can be cancelled. 8582 :vartype is_cancellable: bool 8583 :ivar operation_parameters: The operation parameters. 8584 :vartype operation_parameters: ~azure.mgmt.sql.models.ManagedInstanceOperationParametersPair 8585 :ivar operation_steps: The operation steps. 8586 :vartype operation_steps: ~azure.mgmt.sql.models.ManagedInstanceOperationSteps 8587 """ 8588 8589 _validation = { 8590 'id': {'readonly': True}, 8591 'name': {'readonly': True}, 8592 'type': {'readonly': True}, 8593 'managed_instance_name': {'readonly': True}, 8594 'operation': {'readonly': True}, 8595 'operation_friendly_name': {'readonly': True}, 8596 'percent_complete': {'readonly': True}, 8597 'start_time': {'readonly': True}, 8598 'state': {'readonly': True}, 8599 'error_code': {'readonly': True}, 8600 'error_description': {'readonly': True}, 8601 'error_severity': {'readonly': True}, 8602 'is_user_error': {'readonly': True}, 8603 'estimated_completion_time': {'readonly': True}, 8604 'description': {'readonly': True}, 8605 'is_cancellable': {'readonly': True}, 8606 'operation_parameters': {'readonly': True}, 8607 'operation_steps': {'readonly': True}, 8608 } 8609 8610 _attribute_map = { 8611 'id': {'key': 'id', 'type': 'str'}, 8612 'name': {'key': 'name', 'type': 'str'}, 8613 'type': {'key': 'type', 'type': 'str'}, 8614 'managed_instance_name': {'key': 'properties.managedInstanceName', 'type': 'str'}, 8615 'operation': {'key': 'properties.operation', 'type': 'str'}, 8616 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, 8617 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, 8618 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 8619 'state': {'key': 'properties.state', 'type': 'str'}, 8620 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, 8621 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, 8622 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, 8623 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, 8624 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, 8625 'description': {'key': 'properties.description', 'type': 'str'}, 8626 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, 8627 'operation_parameters': {'key': 'properties.operationParameters', 'type': 'ManagedInstanceOperationParametersPair'}, 8628 'operation_steps': {'key': 'properties.operationSteps', 'type': 'ManagedInstanceOperationSteps'}, 8629 } 8630 8631 def __init__( 8632 self, 8633 **kwargs 8634 ): 8635 super(ManagedInstanceOperation, self).__init__(**kwargs) 8636 self.managed_instance_name = None 8637 self.operation = None 8638 self.operation_friendly_name = None 8639 self.percent_complete = None 8640 self.start_time = None 8641 self.state = None 8642 self.error_code = None 8643 self.error_description = None 8644 self.error_severity = None 8645 self.is_user_error = None 8646 self.estimated_completion_time = None 8647 self.description = None 8648 self.is_cancellable = None 8649 self.operation_parameters = None 8650 self.operation_steps = None 8651 8652 8653class ManagedInstanceOperationListResult(msrest.serialization.Model): 8654 """The response to a list managed instance operations request. 8655 8656 Variables are only populated by the server, and will be ignored when sending a request. 8657 8658 :ivar value: Array of results. 8659 :vartype value: list[~azure.mgmt.sql.models.ManagedInstanceOperation] 8660 :ivar next_link: Link to retrieve next page of results. 8661 :vartype next_link: str 8662 """ 8663 8664 _validation = { 8665 'value': {'readonly': True}, 8666 'next_link': {'readonly': True}, 8667 } 8668 8669 _attribute_map = { 8670 'value': {'key': 'value', 'type': '[ManagedInstanceOperation]'}, 8671 'next_link': {'key': 'nextLink', 'type': 'str'}, 8672 } 8673 8674 def __init__( 8675 self, 8676 **kwargs 8677 ): 8678 super(ManagedInstanceOperationListResult, self).__init__(**kwargs) 8679 self.value = None 8680 self.next_link = None 8681 8682 8683class ManagedInstanceOperationParametersPair(msrest.serialization.Model): 8684 """The parameters of a managed instance operation. 8685 8686 Variables are only populated by the server, and will be ignored when sending a request. 8687 8688 :ivar current_parameters: The current parameters. 8689 :vartype current_parameters: ~azure.mgmt.sql.models.UpsertManagedServerOperationParameters 8690 :ivar requested_parameters: The requested parameters. 8691 :vartype requested_parameters: ~azure.mgmt.sql.models.UpsertManagedServerOperationParameters 8692 """ 8693 8694 _validation = { 8695 'current_parameters': {'readonly': True}, 8696 'requested_parameters': {'readonly': True}, 8697 } 8698 8699 _attribute_map = { 8700 'current_parameters': {'key': 'currentParameters', 'type': 'UpsertManagedServerOperationParameters'}, 8701 'requested_parameters': {'key': 'requestedParameters', 'type': 'UpsertManagedServerOperationParameters'}, 8702 } 8703 8704 def __init__( 8705 self, 8706 **kwargs 8707 ): 8708 super(ManagedInstanceOperationParametersPair, self).__init__(**kwargs) 8709 self.current_parameters = None 8710 self.requested_parameters = None 8711 8712 8713class ManagedInstanceOperationSteps(msrest.serialization.Model): 8714 """The steps of a managed instance operation. 8715 8716 Variables are only populated by the server, and will be ignored when sending a request. 8717 8718 :ivar total_steps: The total number of operation steps. 8719 :vartype total_steps: str 8720 :ivar current_step: The number of current operation steps. 8721 :vartype current_step: int 8722 :ivar steps_list: The operation steps list. 8723 :vartype steps_list: list[~azure.mgmt.sql.models.UpsertManagedServerOperationStep] 8724 """ 8725 8726 _validation = { 8727 'total_steps': {'readonly': True}, 8728 'current_step': {'readonly': True}, 8729 'steps_list': {'readonly': True}, 8730 } 8731 8732 _attribute_map = { 8733 'total_steps': {'key': 'totalSteps', 'type': 'str'}, 8734 'current_step': {'key': 'currentStep', 'type': 'int'}, 8735 'steps_list': {'key': 'stepsList', 'type': '[UpsertManagedServerOperationStep]'}, 8736 } 8737 8738 def __init__( 8739 self, 8740 **kwargs 8741 ): 8742 super(ManagedInstanceOperationSteps, self).__init__(**kwargs) 8743 self.total_steps = None 8744 self.current_step = None 8745 self.steps_list = None 8746 8747 8748class ManagedInstancePairInfo(msrest.serialization.Model): 8749 """Pairs of Managed Instances in the failover group. 8750 8751 :param primary_managed_instance_id: Id of Primary Managed Instance in pair. 8752 :type primary_managed_instance_id: str 8753 :param partner_managed_instance_id: Id of Partner Managed Instance in pair. 8754 :type partner_managed_instance_id: str 8755 """ 8756 8757 _attribute_map = { 8758 'primary_managed_instance_id': {'key': 'primaryManagedInstanceId', 'type': 'str'}, 8759 'partner_managed_instance_id': {'key': 'partnerManagedInstanceId', 'type': 'str'}, 8760 } 8761 8762 def __init__( 8763 self, 8764 *, 8765 primary_managed_instance_id: Optional[str] = None, 8766 partner_managed_instance_id: Optional[str] = None, 8767 **kwargs 8768 ): 8769 super(ManagedInstancePairInfo, self).__init__(**kwargs) 8770 self.primary_managed_instance_id = primary_managed_instance_id 8771 self.partner_managed_instance_id = partner_managed_instance_id 8772 8773 8774class ManagedInstancePecProperty(msrest.serialization.Model): 8775 """A private endpoint connection under a managed instance. 8776 8777 Variables are only populated by the server, and will be ignored when sending a request. 8778 8779 :ivar id: Resource ID. 8780 :vartype id: str 8781 :ivar properties: Private endpoint connection properties. 8782 :vartype properties: ~azure.mgmt.sql.models.ManagedInstancePrivateEndpointConnectionProperties 8783 """ 8784 8785 _validation = { 8786 'id': {'readonly': True}, 8787 'properties': {'readonly': True}, 8788 } 8789 8790 _attribute_map = { 8791 'id': {'key': 'id', 'type': 'str'}, 8792 'properties': {'key': 'properties', 'type': 'ManagedInstancePrivateEndpointConnectionProperties'}, 8793 } 8794 8795 def __init__( 8796 self, 8797 **kwargs 8798 ): 8799 super(ManagedInstancePecProperty, self).__init__(**kwargs) 8800 self.id = None 8801 self.properties = None 8802 8803 8804class ManagedInstancePrivateEndpointConnection(ProxyResource): 8805 """A private endpoint connection. 8806 8807 Variables are only populated by the server, and will be ignored when sending a request. 8808 8809 :ivar id: Resource ID. 8810 :vartype id: str 8811 :ivar name: Resource name. 8812 :vartype name: str 8813 :ivar type: Resource type. 8814 :vartype type: str 8815 :param private_endpoint: Private endpoint which the connection belongs to. 8816 :type private_endpoint: ~azure.mgmt.sql.models.ManagedInstancePrivateEndpointProperty 8817 :param private_link_service_connection_state: Connection State of the Private Endpoint 8818 Connection. 8819 :type private_link_service_connection_state: 8820 ~azure.mgmt.sql.models.ManagedInstancePrivateLinkServiceConnectionStateProperty 8821 :ivar provisioning_state: State of the Private Endpoint Connection. 8822 :vartype provisioning_state: str 8823 """ 8824 8825 _validation = { 8826 'id': {'readonly': True}, 8827 'name': {'readonly': True}, 8828 'type': {'readonly': True}, 8829 'provisioning_state': {'readonly': True}, 8830 } 8831 8832 _attribute_map = { 8833 'id': {'key': 'id', 'type': 'str'}, 8834 'name': {'key': 'name', 'type': 'str'}, 8835 'type': {'key': 'type', 'type': 'str'}, 8836 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'ManagedInstancePrivateEndpointProperty'}, 8837 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'ManagedInstancePrivateLinkServiceConnectionStateProperty'}, 8838 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 8839 } 8840 8841 def __init__( 8842 self, 8843 *, 8844 private_endpoint: Optional["ManagedInstancePrivateEndpointProperty"] = None, 8845 private_link_service_connection_state: Optional["ManagedInstancePrivateLinkServiceConnectionStateProperty"] = None, 8846 **kwargs 8847 ): 8848 super(ManagedInstancePrivateEndpointConnection, self).__init__(**kwargs) 8849 self.private_endpoint = private_endpoint 8850 self.private_link_service_connection_state = private_link_service_connection_state 8851 self.provisioning_state = None 8852 8853 8854class ManagedInstancePrivateEndpointConnectionListResult(msrest.serialization.Model): 8855 """A list of private endpoint connections. 8856 8857 Variables are only populated by the server, and will be ignored when sending a request. 8858 8859 :ivar value: Array of results. 8860 :vartype value: list[~azure.mgmt.sql.models.ManagedInstancePrivateEndpointConnection] 8861 :ivar next_link: Link to retrieve next page of results. 8862 :vartype next_link: str 8863 """ 8864 8865 _validation = { 8866 'value': {'readonly': True}, 8867 'next_link': {'readonly': True}, 8868 } 8869 8870 _attribute_map = { 8871 'value': {'key': 'value', 'type': '[ManagedInstancePrivateEndpointConnection]'}, 8872 'next_link': {'key': 'nextLink', 'type': 'str'}, 8873 } 8874 8875 def __init__( 8876 self, 8877 **kwargs 8878 ): 8879 super(ManagedInstancePrivateEndpointConnectionListResult, self).__init__(**kwargs) 8880 self.value = None 8881 self.next_link = None 8882 8883 8884class ManagedInstancePrivateEndpointConnectionProperties(msrest.serialization.Model): 8885 """Properties of a private endpoint connection. 8886 8887 Variables are only populated by the server, and will be ignored when sending a request. 8888 8889 :param private_endpoint: Private endpoint which the connection belongs to. 8890 :type private_endpoint: ~azure.mgmt.sql.models.ManagedInstancePrivateEndpointProperty 8891 :param private_link_service_connection_state: Connection State of the Private Endpoint 8892 Connection. 8893 :type private_link_service_connection_state: 8894 ~azure.mgmt.sql.models.ManagedInstancePrivateLinkServiceConnectionStateProperty 8895 :ivar provisioning_state: State of the Private Endpoint Connection. 8896 :vartype provisioning_state: str 8897 """ 8898 8899 _validation = { 8900 'provisioning_state': {'readonly': True}, 8901 } 8902 8903 _attribute_map = { 8904 'private_endpoint': {'key': 'privateEndpoint', 'type': 'ManagedInstancePrivateEndpointProperty'}, 8905 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'ManagedInstancePrivateLinkServiceConnectionStateProperty'}, 8906 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 8907 } 8908 8909 def __init__( 8910 self, 8911 *, 8912 private_endpoint: Optional["ManagedInstancePrivateEndpointProperty"] = None, 8913 private_link_service_connection_state: Optional["ManagedInstancePrivateLinkServiceConnectionStateProperty"] = None, 8914 **kwargs 8915 ): 8916 super(ManagedInstancePrivateEndpointConnectionProperties, self).__init__(**kwargs) 8917 self.private_endpoint = private_endpoint 8918 self.private_link_service_connection_state = private_link_service_connection_state 8919 self.provisioning_state = None 8920 8921 8922class ManagedInstancePrivateEndpointProperty(msrest.serialization.Model): 8923 """ManagedInstancePrivateEndpointProperty. 8924 8925 :param id: Resource id of the private endpoint. 8926 :type id: str 8927 """ 8928 8929 _attribute_map = { 8930 'id': {'key': 'id', 'type': 'str'}, 8931 } 8932 8933 def __init__( 8934 self, 8935 *, 8936 id: Optional[str] = None, 8937 **kwargs 8938 ): 8939 super(ManagedInstancePrivateEndpointProperty, self).__init__(**kwargs) 8940 self.id = id 8941 8942 8943class ManagedInstancePrivateLink(ProxyResource): 8944 """A private link resource. 8945 8946 Variables are only populated by the server, and will be ignored when sending a request. 8947 8948 :ivar id: Resource ID. 8949 :vartype id: str 8950 :ivar name: Resource name. 8951 :vartype name: str 8952 :ivar type: Resource type. 8953 :vartype type: str 8954 :ivar properties: The private link resource group id. 8955 :vartype properties: ~azure.mgmt.sql.models.ManagedInstancePrivateLinkProperties 8956 """ 8957 8958 _validation = { 8959 'id': {'readonly': True}, 8960 'name': {'readonly': True}, 8961 'type': {'readonly': True}, 8962 'properties': {'readonly': True}, 8963 } 8964 8965 _attribute_map = { 8966 'id': {'key': 'id', 'type': 'str'}, 8967 'name': {'key': 'name', 'type': 'str'}, 8968 'type': {'key': 'type', 'type': 'str'}, 8969 'properties': {'key': 'properties', 'type': 'ManagedInstancePrivateLinkProperties'}, 8970 } 8971 8972 def __init__( 8973 self, 8974 **kwargs 8975 ): 8976 super(ManagedInstancePrivateLink, self).__init__(**kwargs) 8977 self.properties = None 8978 8979 8980class ManagedInstancePrivateLinkListResult(msrest.serialization.Model): 8981 """A list of private link resources. 8982 8983 Variables are only populated by the server, and will be ignored when sending a request. 8984 8985 :ivar value: Array of results. 8986 :vartype value: list[~azure.mgmt.sql.models.ManagedInstancePrivateLink] 8987 :ivar next_link: Link to retrieve next page of results. 8988 :vartype next_link: str 8989 """ 8990 8991 _validation = { 8992 'value': {'readonly': True}, 8993 'next_link': {'readonly': True}, 8994 } 8995 8996 _attribute_map = { 8997 'value': {'key': 'value', 'type': '[ManagedInstancePrivateLink]'}, 8998 'next_link': {'key': 'nextLink', 'type': 'str'}, 8999 } 9000 9001 def __init__( 9002 self, 9003 **kwargs 9004 ): 9005 super(ManagedInstancePrivateLinkListResult, self).__init__(**kwargs) 9006 self.value = None 9007 self.next_link = None 9008 9009 9010class ManagedInstancePrivateLinkProperties(msrest.serialization.Model): 9011 """Properties of a private link resource. 9012 9013 Variables are only populated by the server, and will be ignored when sending a request. 9014 9015 :ivar group_id: The private link resource group id. 9016 :vartype group_id: str 9017 :ivar required_members: The private link resource required member names. 9018 :vartype required_members: list[str] 9019 """ 9020 9021 _validation = { 9022 'group_id': {'readonly': True}, 9023 'required_members': {'readonly': True}, 9024 } 9025 9026 _attribute_map = { 9027 'group_id': {'key': 'groupId', 'type': 'str'}, 9028 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, 9029 } 9030 9031 def __init__( 9032 self, 9033 **kwargs 9034 ): 9035 super(ManagedInstancePrivateLinkProperties, self).__init__(**kwargs) 9036 self.group_id = None 9037 self.required_members = None 9038 9039 9040class ManagedInstancePrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): 9041 """ManagedInstancePrivateLinkServiceConnectionStateProperty. 9042 9043 Variables are only populated by the server, and will be ignored when sending a request. 9044 9045 All required parameters must be populated in order to send to Azure. 9046 9047 :param status: Required. The private link service connection status. 9048 :type status: str 9049 :param description: Required. The private link service connection description. 9050 :type description: str 9051 :ivar actions_required: The private link service connection description. 9052 :vartype actions_required: str 9053 """ 9054 9055 _validation = { 9056 'status': {'required': True}, 9057 'description': {'required': True}, 9058 'actions_required': {'readonly': True}, 9059 } 9060 9061 _attribute_map = { 9062 'status': {'key': 'status', 'type': 'str'}, 9063 'description': {'key': 'description', 'type': 'str'}, 9064 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, 9065 } 9066 9067 def __init__( 9068 self, 9069 *, 9070 status: str, 9071 description: str, 9072 **kwargs 9073 ): 9074 super(ManagedInstancePrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) 9075 self.status = status 9076 self.description = description 9077 self.actions_required = None 9078 9079 9080class ManagedInstanceQuery(ProxyResource): 9081 """Database query. 9082 9083 Variables are only populated by the server, and will be ignored when sending a request. 9084 9085 :ivar id: Resource ID. 9086 :vartype id: str 9087 :ivar name: Resource name. 9088 :vartype name: str 9089 :ivar type: Resource type. 9090 :vartype type: str 9091 :param query_text: Query text. 9092 :type query_text: str 9093 """ 9094 9095 _validation = { 9096 'id': {'readonly': True}, 9097 'name': {'readonly': True}, 9098 'type': {'readonly': True}, 9099 } 9100 9101 _attribute_map = { 9102 'id': {'key': 'id', 'type': 'str'}, 9103 'name': {'key': 'name', 'type': 'str'}, 9104 'type': {'key': 'type', 'type': 'str'}, 9105 'query_text': {'key': 'properties.queryText', 'type': 'str'}, 9106 } 9107 9108 def __init__( 9109 self, 9110 *, 9111 query_text: Optional[str] = None, 9112 **kwargs 9113 ): 9114 super(ManagedInstanceQuery, self).__init__(**kwargs) 9115 self.query_text = query_text 9116 9117 9118class ManagedInstanceQueryStatistics(msrest.serialization.Model): 9119 """Execution statistics for one particular query. 9120 9121 Variables are only populated by the server, and will be ignored when sending a request. 9122 9123 :ivar value: Array of results. 9124 :vartype value: list[~azure.mgmt.sql.models.QueryStatistics] 9125 :ivar next_link: Link to retrieve next page of results. 9126 :vartype next_link: str 9127 """ 9128 9129 _validation = { 9130 'value': {'readonly': True}, 9131 'next_link': {'readonly': True}, 9132 } 9133 9134 _attribute_map = { 9135 'value': {'key': 'value', 'type': '[QueryStatistics]'}, 9136 'next_link': {'key': 'nextLink', 'type': 'str'}, 9137 } 9138 9139 def __init__( 9140 self, 9141 **kwargs 9142 ): 9143 super(ManagedInstanceQueryStatistics, self).__init__(**kwargs) 9144 self.value = None 9145 self.next_link = None 9146 9147 9148class ManagedInstanceUpdate(msrest.serialization.Model): 9149 """An update request for an Azure SQL Database managed instance. 9150 9151 Variables are only populated by the server, and will be ignored when sending a request. 9152 9153 :param sku: Managed instance sku. 9154 :type sku: ~azure.mgmt.sql.models.Sku 9155 :param identity: Managed instance identity. 9156 :type identity: ~azure.mgmt.sql.models.ResourceIdentity 9157 :param tags: A set of tags. Resource tags. 9158 :type tags: dict[str, str] 9159 :ivar provisioning_state: Possible values include: "Creating", "Deleting", "Updating", 9160 "Unknown", "Succeeded", "Failed". 9161 :vartype provisioning_state: str or 9162 ~azure.mgmt.sql.models.ManagedInstancePropertiesProvisioningState 9163 :param managed_instance_create_mode: Specifies the mode of database creation. 9164 9165 Default: Regular instance creation. 9166 9167 Restore: Creates an instance by restoring a set of backups to specific point in time. 9168 RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: 9169 "Default", "PointInTimeRestore". 9170 :type managed_instance_create_mode: str or ~azure.mgmt.sql.models.ManagedServerCreateMode 9171 :ivar fully_qualified_domain_name: The fully qualified domain name of the managed instance. 9172 :vartype fully_qualified_domain_name: str 9173 :param administrator_login: Administrator username for the managed instance. Can only be 9174 specified when the managed instance is being created (and is required for creation). 9175 :type administrator_login: str 9176 :param administrator_login_password: The administrator login password (required for managed 9177 instance creation). 9178 :type administrator_login_password: str 9179 :param subnet_id: Subnet resource ID for the managed instance. 9180 :type subnet_id: str 9181 :ivar state: The state of the managed instance. 9182 :vartype state: str 9183 :param license_type: The license type. Possible values are 'LicenseIncluded' (regular price 9184 inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL 9185 licenses). Possible values include: "LicenseIncluded", "BasePrice". 9186 :type license_type: str or ~azure.mgmt.sql.models.ManagedInstanceLicenseType 9187 :param v_cores: The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. 9188 :type v_cores: int 9189 :param storage_size_in_gb: Storage size in GB. Minimum value: 32. Maximum value: 8192. 9190 Increments of 32 GB allowed only. 9191 :type storage_size_in_gb: int 9192 :param collation: Collation of the managed instance. 9193 :type collation: str 9194 :ivar dns_zone: The Dns Zone that the managed instance is in. 9195 :vartype dns_zone: str 9196 :param dns_zone_partner: The resource id of another managed instance whose DNS zone this 9197 managed instance will share after creation. 9198 :type dns_zone_partner: str 9199 :param public_data_endpoint_enabled: Whether or not the public data endpoint is enabled. 9200 :type public_data_endpoint_enabled: bool 9201 :param source_managed_instance_id: The resource identifier of the source managed instance 9202 associated with create operation of this instance. 9203 :type source_managed_instance_id: str 9204 :param restore_point_in_time: Specifies the point in time (ISO8601 format) of the source 9205 database that will be restored to create the new database. 9206 :type restore_point_in_time: ~datetime.datetime 9207 :param proxy_override: Connection type used for connecting to the instance. Possible values 9208 include: "Proxy", "Redirect", "Default". 9209 :type proxy_override: str or ~azure.mgmt.sql.models.ManagedInstanceProxyOverride 9210 :param timezone_id: Id of the timezone. Allowed values are timezones supported by Windows. 9211 Windows keeps details on supported timezones, including the id, in registry under 9212 KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. 9213 You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM 9214 sys.time_zone_info. 9215 List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in 9216 PowerShell. 9217 An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". 9218 :type timezone_id: str 9219 :param instance_pool_id: The Id of the instance pool this managed server belongs to. 9220 :type instance_pool_id: str 9221 :param maintenance_configuration_id: Specifies maintenance configuration id to apply to this 9222 managed instance. 9223 :type maintenance_configuration_id: str 9224 :ivar private_endpoint_connections: List of private endpoint connections on a managed instance. 9225 :vartype private_endpoint_connections: list[~azure.mgmt.sql.models.ManagedInstancePecProperty] 9226 :param minimal_tls_version: Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. 9227 :type minimal_tls_version: str 9228 :param storage_account_type: The storage account type used to store backups for this instance. 9229 The options are LRS (LocallyRedundantStorage), ZRS (ZoneRedundantStorage) and GRS 9230 (GeoRedundantStorage). Possible values include: "GRS", "LRS", "ZRS". 9231 :type storage_account_type: str or ~azure.mgmt.sql.models.StorageAccountType 9232 :param zone_redundant: Whether or not the multi-az is enabled. 9233 :type zone_redundant: bool 9234 :param primary_user_assigned_identity_id: The resource id of a user assigned identity to be 9235 used by default. 9236 :type primary_user_assigned_identity_id: str 9237 :param key_id: A CMK URI of the key to use for encryption. 9238 :type key_id: str 9239 :param administrators: The Azure Active Directory administrator of the server. 9240 :type administrators: ~azure.mgmt.sql.models.ManagedInstanceExternalAdministrator 9241 """ 9242 9243 _validation = { 9244 'provisioning_state': {'readonly': True}, 9245 'fully_qualified_domain_name': {'readonly': True}, 9246 'state': {'readonly': True}, 9247 'dns_zone': {'readonly': True}, 9248 'private_endpoint_connections': {'readonly': True}, 9249 } 9250 9251 _attribute_map = { 9252 'sku': {'key': 'sku', 'type': 'Sku'}, 9253 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 9254 'tags': {'key': 'tags', 'type': '{str}'}, 9255 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 9256 'managed_instance_create_mode': {'key': 'properties.managedInstanceCreateMode', 'type': 'str'}, 9257 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, 9258 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, 9259 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, 9260 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, 9261 'state': {'key': 'properties.state', 'type': 'str'}, 9262 'license_type': {'key': 'properties.licenseType', 'type': 'str'}, 9263 'v_cores': {'key': 'properties.vCores', 'type': 'int'}, 9264 'storage_size_in_gb': {'key': 'properties.storageSizeInGB', 'type': 'int'}, 9265 'collation': {'key': 'properties.collation', 'type': 'str'}, 9266 'dns_zone': {'key': 'properties.dnsZone', 'type': 'str'}, 9267 'dns_zone_partner': {'key': 'properties.dnsZonePartner', 'type': 'str'}, 9268 'public_data_endpoint_enabled': {'key': 'properties.publicDataEndpointEnabled', 'type': 'bool'}, 9269 'source_managed_instance_id': {'key': 'properties.sourceManagedInstanceId', 'type': 'str'}, 9270 'restore_point_in_time': {'key': 'properties.restorePointInTime', 'type': 'iso-8601'}, 9271 'proxy_override': {'key': 'properties.proxyOverride', 'type': 'str'}, 9272 'timezone_id': {'key': 'properties.timezoneId', 'type': 'str'}, 9273 'instance_pool_id': {'key': 'properties.instancePoolId', 'type': 'str'}, 9274 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 9275 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ManagedInstancePecProperty]'}, 9276 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, 9277 'storage_account_type': {'key': 'properties.storageAccountType', 'type': 'str'}, 9278 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, 9279 'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'}, 9280 'key_id': {'key': 'properties.keyId', 'type': 'str'}, 9281 'administrators': {'key': 'properties.administrators', 'type': 'ManagedInstanceExternalAdministrator'}, 9282 } 9283 9284 def __init__( 9285 self, 9286 *, 9287 sku: Optional["Sku"] = None, 9288 identity: Optional["ResourceIdentity"] = None, 9289 tags: Optional[Dict[str, str]] = None, 9290 managed_instance_create_mode: Optional[Union[str, "ManagedServerCreateMode"]] = None, 9291 administrator_login: Optional[str] = None, 9292 administrator_login_password: Optional[str] = None, 9293 subnet_id: Optional[str] = None, 9294 license_type: Optional[Union[str, "ManagedInstanceLicenseType"]] = None, 9295 v_cores: Optional[int] = None, 9296 storage_size_in_gb: Optional[int] = None, 9297 collation: Optional[str] = None, 9298 dns_zone_partner: Optional[str] = None, 9299 public_data_endpoint_enabled: Optional[bool] = None, 9300 source_managed_instance_id: Optional[str] = None, 9301 restore_point_in_time: Optional[datetime.datetime] = None, 9302 proxy_override: Optional[Union[str, "ManagedInstanceProxyOverride"]] = None, 9303 timezone_id: Optional[str] = None, 9304 instance_pool_id: Optional[str] = None, 9305 maintenance_configuration_id: Optional[str] = None, 9306 minimal_tls_version: Optional[str] = None, 9307 storage_account_type: Optional[Union[str, "StorageAccountType"]] = None, 9308 zone_redundant: Optional[bool] = None, 9309 primary_user_assigned_identity_id: Optional[str] = None, 9310 key_id: Optional[str] = None, 9311 administrators: Optional["ManagedInstanceExternalAdministrator"] = None, 9312 **kwargs 9313 ): 9314 super(ManagedInstanceUpdate, self).__init__(**kwargs) 9315 self.sku = sku 9316 self.identity = identity 9317 self.tags = tags 9318 self.provisioning_state = None 9319 self.managed_instance_create_mode = managed_instance_create_mode 9320 self.fully_qualified_domain_name = None 9321 self.administrator_login = administrator_login 9322 self.administrator_login_password = administrator_login_password 9323 self.subnet_id = subnet_id 9324 self.state = None 9325 self.license_type = license_type 9326 self.v_cores = v_cores 9327 self.storage_size_in_gb = storage_size_in_gb 9328 self.collation = collation 9329 self.dns_zone = None 9330 self.dns_zone_partner = dns_zone_partner 9331 self.public_data_endpoint_enabled = public_data_endpoint_enabled 9332 self.source_managed_instance_id = source_managed_instance_id 9333 self.restore_point_in_time = restore_point_in_time 9334 self.proxy_override = proxy_override 9335 self.timezone_id = timezone_id 9336 self.instance_pool_id = instance_pool_id 9337 self.maintenance_configuration_id = maintenance_configuration_id 9338 self.private_endpoint_connections = None 9339 self.minimal_tls_version = minimal_tls_version 9340 self.storage_account_type = storage_account_type 9341 self.zone_redundant = zone_redundant 9342 self.primary_user_assigned_identity_id = primary_user_assigned_identity_id 9343 self.key_id = key_id 9344 self.administrators = administrators 9345 9346 9347class ManagedInstanceVcoresCapability(msrest.serialization.Model): 9348 """The managed instance virtual cores capability. 9349 9350 Variables are only populated by the server, and will be ignored when sending a request. 9351 9352 :ivar name: The virtual cores identifier. 9353 :vartype name: str 9354 :ivar value: The virtual cores value. 9355 :vartype value: int 9356 :ivar included_max_size: Included size. 9357 :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability 9358 :ivar supported_storage_sizes: Storage size ranges. 9359 :vartype supported_storage_sizes: list[~azure.mgmt.sql.models.MaxSizeRangeCapability] 9360 :ivar instance_pool_supported: True if this service objective is supported for managed 9361 instances in an instance pool. 9362 :vartype instance_pool_supported: bool 9363 :ivar standalone_supported: True if this service objective is supported for standalone managed 9364 instances. 9365 :vartype standalone_supported: bool 9366 :ivar supported_maintenance_configurations: List of supported maintenance configurations. 9367 :vartype supported_maintenance_configurations: 9368 list[~azure.mgmt.sql.models.ManagedInstanceMaintenanceConfigurationCapability] 9369 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 9370 "Default", "Disabled". 9371 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 9372 :param reason: The reason for the capability not being available. 9373 :type reason: str 9374 """ 9375 9376 _validation = { 9377 'name': {'readonly': True}, 9378 'value': {'readonly': True}, 9379 'included_max_size': {'readonly': True}, 9380 'supported_storage_sizes': {'readonly': True}, 9381 'instance_pool_supported': {'readonly': True}, 9382 'standalone_supported': {'readonly': True}, 9383 'supported_maintenance_configurations': {'readonly': True}, 9384 'status': {'readonly': True}, 9385 } 9386 9387 _attribute_map = { 9388 'name': {'key': 'name', 'type': 'str'}, 9389 'value': {'key': 'value', 'type': 'int'}, 9390 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, 9391 'supported_storage_sizes': {'key': 'supportedStorageSizes', 'type': '[MaxSizeRangeCapability]'}, 9392 'instance_pool_supported': {'key': 'instancePoolSupported', 'type': 'bool'}, 9393 'standalone_supported': {'key': 'standaloneSupported', 'type': 'bool'}, 9394 'supported_maintenance_configurations': {'key': 'supportedMaintenanceConfigurations', 'type': '[ManagedInstanceMaintenanceConfigurationCapability]'}, 9395 'status': {'key': 'status', 'type': 'str'}, 9396 'reason': {'key': 'reason', 'type': 'str'}, 9397 } 9398 9399 def __init__( 9400 self, 9401 *, 9402 reason: Optional[str] = None, 9403 **kwargs 9404 ): 9405 super(ManagedInstanceVcoresCapability, self).__init__(**kwargs) 9406 self.name = None 9407 self.value = None 9408 self.included_max_size = None 9409 self.supported_storage_sizes = None 9410 self.instance_pool_supported = None 9411 self.standalone_supported = None 9412 self.supported_maintenance_configurations = None 9413 self.status = None 9414 self.reason = reason 9415 9416 9417class ManagedInstanceVersionCapability(msrest.serialization.Model): 9418 """The managed instance capability. 9419 9420 Variables are only populated by the server, and will be ignored when sending a request. 9421 9422 :ivar name: The server version name. 9423 :vartype name: str 9424 :ivar supported_editions: The list of supported managed instance editions. 9425 :vartype supported_editions: list[~azure.mgmt.sql.models.ManagedInstanceEditionCapability] 9426 :ivar supported_instance_pool_editions: The list of supported instance pool editions. 9427 :vartype supported_instance_pool_editions: 9428 list[~azure.mgmt.sql.models.InstancePoolEditionCapability] 9429 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 9430 "Default", "Disabled". 9431 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 9432 :param reason: The reason for the capability not being available. 9433 :type reason: str 9434 """ 9435 9436 _validation = { 9437 'name': {'readonly': True}, 9438 'supported_editions': {'readonly': True}, 9439 'supported_instance_pool_editions': {'readonly': True}, 9440 'status': {'readonly': True}, 9441 } 9442 9443 _attribute_map = { 9444 'name': {'key': 'name', 'type': 'str'}, 9445 'supported_editions': {'key': 'supportedEditions', 'type': '[ManagedInstanceEditionCapability]'}, 9446 'supported_instance_pool_editions': {'key': 'supportedInstancePoolEditions', 'type': '[InstancePoolEditionCapability]'}, 9447 'status': {'key': 'status', 'type': 'str'}, 9448 'reason': {'key': 'reason', 'type': 'str'}, 9449 } 9450 9451 def __init__( 9452 self, 9453 *, 9454 reason: Optional[str] = None, 9455 **kwargs 9456 ): 9457 super(ManagedInstanceVersionCapability, self).__init__(**kwargs) 9458 self.name = None 9459 self.supported_editions = None 9460 self.supported_instance_pool_editions = None 9461 self.status = None 9462 self.reason = reason 9463 9464 9465class ManagedInstanceVulnerabilityAssessment(ProxyResource): 9466 """A managed instance vulnerability assessment. 9467 9468 Variables are only populated by the server, and will be ignored when sending a request. 9469 9470 :ivar id: Resource ID. 9471 :vartype id: str 9472 :ivar name: Resource name. 9473 :vartype name: str 9474 :ivar type: Resource type. 9475 :vartype type: str 9476 :param storage_container_path: A blob storage container path to hold the scan results (e.g. 9477 https://myStorage.blob.core.windows.net/VaScans/). 9478 :type storage_container_path: str 9479 :param storage_container_sas_key: A shared access signature (SAS Key) that has write access to 9480 the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' 9481 isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not 9482 behind a Vnet or a firewall. 9483 :type storage_container_sas_key: str 9484 :param storage_account_access_key: Specifies the identifier key of the storage account for 9485 vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, 9486 storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet 9487 or a firewall. 9488 :type storage_account_access_key: str 9489 :param recurring_scans: The recurring scans settings. 9490 :type recurring_scans: ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties 9491 """ 9492 9493 _validation = { 9494 'id': {'readonly': True}, 9495 'name': {'readonly': True}, 9496 'type': {'readonly': True}, 9497 } 9498 9499 _attribute_map = { 9500 'id': {'key': 'id', 'type': 'str'}, 9501 'name': {'key': 'name', 'type': 'str'}, 9502 'type': {'key': 'type', 'type': 'str'}, 9503 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, 9504 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, 9505 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 9506 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, 9507 } 9508 9509 def __init__( 9510 self, 9511 *, 9512 storage_container_path: Optional[str] = None, 9513 storage_container_sas_key: Optional[str] = None, 9514 storage_account_access_key: Optional[str] = None, 9515 recurring_scans: Optional["VulnerabilityAssessmentRecurringScansProperties"] = None, 9516 **kwargs 9517 ): 9518 super(ManagedInstanceVulnerabilityAssessment, self).__init__(**kwargs) 9519 self.storage_container_path = storage_container_path 9520 self.storage_container_sas_key = storage_container_sas_key 9521 self.storage_account_access_key = storage_account_access_key 9522 self.recurring_scans = recurring_scans 9523 9524 9525class ManagedInstanceVulnerabilityAssessmentListResult(msrest.serialization.Model): 9526 """A list of the ManagedInstance's vulnerability assessments. 9527 9528 Variables are only populated by the server, and will be ignored when sending a request. 9529 9530 :ivar value: Array of results. 9531 :vartype value: list[~azure.mgmt.sql.models.ManagedInstanceVulnerabilityAssessment] 9532 :ivar next_link: Link to retrieve next page of results. 9533 :vartype next_link: str 9534 """ 9535 9536 _validation = { 9537 'value': {'readonly': True}, 9538 'next_link': {'readonly': True}, 9539 } 9540 9541 _attribute_map = { 9542 'value': {'key': 'value', 'type': '[ManagedInstanceVulnerabilityAssessment]'}, 9543 'next_link': {'key': 'nextLink', 'type': 'str'}, 9544 } 9545 9546 def __init__( 9547 self, 9548 **kwargs 9549 ): 9550 super(ManagedInstanceVulnerabilityAssessmentListResult, self).__init__(**kwargs) 9551 self.value = None 9552 self.next_link = None 9553 9554 9555class ManagedServerSecurityAlertPolicy(ProxyResource): 9556 """A managed server security alert policy. 9557 9558 Variables are only populated by the server, and will be ignored when sending a request. 9559 9560 :ivar id: Resource ID. 9561 :vartype id: str 9562 :ivar name: Resource name. 9563 :vartype name: str 9564 :ivar type: Resource type. 9565 :vartype type: str 9566 :ivar system_data: SystemData of SecurityAlertPolicyResource. 9567 :vartype system_data: ~azure.mgmt.sql.models.SystemData 9568 :param state: Specifies the state of the policy, whether it is enabled or disabled or a policy 9569 has not been applied yet on the specific database. Possible values include: "Enabled", 9570 "Disabled". 9571 :type state: str or ~azure.mgmt.sql.models.SecurityAlertsPolicyState 9572 :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: 9573 Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, 9574 Brute_Force. 9575 :type disabled_alerts: list[str] 9576 :param email_addresses: Specifies an array of e-mail addresses to which the alert is sent. 9577 :type email_addresses: list[str] 9578 :param email_account_admins: Specifies that the alert is sent to the account administrators. 9579 :type email_account_admins: bool 9580 :param storage_endpoint: Specifies the blob storage endpoint (e.g. 9581 https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection 9582 audit logs. 9583 :type storage_endpoint: str 9584 :param storage_account_access_key: Specifies the identifier key of the Threat Detection audit 9585 storage account. 9586 :type storage_account_access_key: str 9587 :param retention_days: Specifies the number of days to keep in the Threat Detection audit logs. 9588 :type retention_days: int 9589 :ivar creation_time: Specifies the UTC creation time of the policy. 9590 :vartype creation_time: ~datetime.datetime 9591 """ 9592 9593 _validation = { 9594 'id': {'readonly': True}, 9595 'name': {'readonly': True}, 9596 'type': {'readonly': True}, 9597 'system_data': {'readonly': True}, 9598 'creation_time': {'readonly': True}, 9599 } 9600 9601 _attribute_map = { 9602 'id': {'key': 'id', 'type': 'str'}, 9603 'name': {'key': 'name', 'type': 'str'}, 9604 'type': {'key': 'type', 'type': 'str'}, 9605 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 9606 'state': {'key': 'properties.state', 'type': 'str'}, 9607 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, 9608 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, 9609 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, 9610 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, 9611 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 9612 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 9613 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 9614 } 9615 9616 def __init__( 9617 self, 9618 *, 9619 state: Optional[Union[str, "SecurityAlertsPolicyState"]] = None, 9620 disabled_alerts: Optional[List[str]] = None, 9621 email_addresses: Optional[List[str]] = None, 9622 email_account_admins: Optional[bool] = None, 9623 storage_endpoint: Optional[str] = None, 9624 storage_account_access_key: Optional[str] = None, 9625 retention_days: Optional[int] = None, 9626 **kwargs 9627 ): 9628 super(ManagedServerSecurityAlertPolicy, self).__init__(**kwargs) 9629 self.system_data = None 9630 self.state = state 9631 self.disabled_alerts = disabled_alerts 9632 self.email_addresses = email_addresses 9633 self.email_account_admins = email_account_admins 9634 self.storage_endpoint = storage_endpoint 9635 self.storage_account_access_key = storage_account_access_key 9636 self.retention_days = retention_days 9637 self.creation_time = None 9638 9639 9640class ManagedServerSecurityAlertPolicyListResult(msrest.serialization.Model): 9641 """A list of the managed Server's security alert policies. 9642 9643 Variables are only populated by the server, and will be ignored when sending a request. 9644 9645 :ivar value: Array of results. 9646 :vartype value: list[~azure.mgmt.sql.models.ManagedServerSecurityAlertPolicy] 9647 :ivar next_link: Link to retrieve next page of results. 9648 :vartype next_link: str 9649 """ 9650 9651 _validation = { 9652 'value': {'readonly': True}, 9653 'next_link': {'readonly': True}, 9654 } 9655 9656 _attribute_map = { 9657 'value': {'key': 'value', 'type': '[ManagedServerSecurityAlertPolicy]'}, 9658 'next_link': {'key': 'nextLink', 'type': 'str'}, 9659 } 9660 9661 def __init__( 9662 self, 9663 **kwargs 9664 ): 9665 super(ManagedServerSecurityAlertPolicyListResult, self).__init__(**kwargs) 9666 self.value = None 9667 self.next_link = None 9668 9669 9670class ManagedTransparentDataEncryption(ProxyResource): 9671 """A managed database transparent data encryption state. 9672 9673 Variables are only populated by the server, and will be ignored when sending a request. 9674 9675 :ivar id: Resource ID. 9676 :vartype id: str 9677 :ivar name: Resource name. 9678 :vartype name: str 9679 :ivar type: Resource type. 9680 :vartype type: str 9681 :param state: Specifies the state of the transparent data encryption. Possible values include: 9682 "Enabled", "Disabled". 9683 :type state: str or ~azure.mgmt.sql.models.TransparentDataEncryptionState 9684 """ 9685 9686 _validation = { 9687 'id': {'readonly': True}, 9688 'name': {'readonly': True}, 9689 'type': {'readonly': True}, 9690 } 9691 9692 _attribute_map = { 9693 'id': {'key': 'id', 'type': 'str'}, 9694 'name': {'key': 'name', 'type': 'str'}, 9695 'type': {'key': 'type', 'type': 'str'}, 9696 'state': {'key': 'properties.state', 'type': 'str'}, 9697 } 9698 9699 def __init__( 9700 self, 9701 *, 9702 state: Optional[Union[str, "TransparentDataEncryptionState"]] = None, 9703 **kwargs 9704 ): 9705 super(ManagedTransparentDataEncryption, self).__init__(**kwargs) 9706 self.state = state 9707 9708 9709class ManagedTransparentDataEncryptionListResult(msrest.serialization.Model): 9710 """A list of managed transparent data encryptions. 9711 9712 Variables are only populated by the server, and will be ignored when sending a request. 9713 9714 :ivar value: Array of results. 9715 :vartype value: list[~azure.mgmt.sql.models.ManagedTransparentDataEncryption] 9716 :ivar next_link: Link to retrieve next page of results. 9717 :vartype next_link: str 9718 """ 9719 9720 _validation = { 9721 'value': {'readonly': True}, 9722 'next_link': {'readonly': True}, 9723 } 9724 9725 _attribute_map = { 9726 'value': {'key': 'value', 'type': '[ManagedTransparentDataEncryption]'}, 9727 'next_link': {'key': 'nextLink', 'type': 'str'}, 9728 } 9729 9730 def __init__( 9731 self, 9732 **kwargs 9733 ): 9734 super(ManagedTransparentDataEncryptionListResult, self).__init__(**kwargs) 9735 self.value = None 9736 self.next_link = None 9737 9738 9739class MaxSizeCapability(msrest.serialization.Model): 9740 """The maximum size capability. 9741 9742 Variables are only populated by the server, and will be ignored when sending a request. 9743 9744 :ivar limit: The maximum size limit (see 'unit' for the units). 9745 :vartype limit: int 9746 :ivar unit: The units that the limit is expressed in. Possible values include: "Megabytes", 9747 "Gigabytes", "Terabytes", "Petabytes". 9748 :vartype unit: str or ~azure.mgmt.sql.models.MaxSizeUnit 9749 """ 9750 9751 _validation = { 9752 'limit': {'readonly': True}, 9753 'unit': {'readonly': True}, 9754 } 9755 9756 _attribute_map = { 9757 'limit': {'key': 'limit', 'type': 'int'}, 9758 'unit': {'key': 'unit', 'type': 'str'}, 9759 } 9760 9761 def __init__( 9762 self, 9763 **kwargs 9764 ): 9765 super(MaxSizeCapability, self).__init__(**kwargs) 9766 self.limit = None 9767 self.unit = None 9768 9769 9770class MaxSizeRangeCapability(msrest.serialization.Model): 9771 """The maximum size range capability. 9772 9773 Variables are only populated by the server, and will be ignored when sending a request. 9774 9775 :ivar min_value: Minimum value. 9776 :vartype min_value: ~azure.mgmt.sql.models.MaxSizeCapability 9777 :ivar max_value: Maximum value. 9778 :vartype max_value: ~azure.mgmt.sql.models.MaxSizeCapability 9779 :ivar scale_size: Scale/step size for discrete values between the minimum value and the maximum 9780 value. 9781 :vartype scale_size: ~azure.mgmt.sql.models.MaxSizeCapability 9782 :ivar log_size: Size of transaction log. 9783 :vartype log_size: ~azure.mgmt.sql.models.LogSizeCapability 9784 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 9785 "Default", "Disabled". 9786 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 9787 :param reason: The reason for the capability not being available. 9788 :type reason: str 9789 """ 9790 9791 _validation = { 9792 'min_value': {'readonly': True}, 9793 'max_value': {'readonly': True}, 9794 'scale_size': {'readonly': True}, 9795 'log_size': {'readonly': True}, 9796 'status': {'readonly': True}, 9797 } 9798 9799 _attribute_map = { 9800 'min_value': {'key': 'minValue', 'type': 'MaxSizeCapability'}, 9801 'max_value': {'key': 'maxValue', 'type': 'MaxSizeCapability'}, 9802 'scale_size': {'key': 'scaleSize', 'type': 'MaxSizeCapability'}, 9803 'log_size': {'key': 'logSize', 'type': 'LogSizeCapability'}, 9804 'status': {'key': 'status', 'type': 'str'}, 9805 'reason': {'key': 'reason', 'type': 'str'}, 9806 } 9807 9808 def __init__( 9809 self, 9810 *, 9811 reason: Optional[str] = None, 9812 **kwargs 9813 ): 9814 super(MaxSizeRangeCapability, self).__init__(**kwargs) 9815 self.min_value = None 9816 self.max_value = None 9817 self.scale_size = None 9818 self.log_size = None 9819 self.status = None 9820 self.reason = reason 9821 9822 9823class Metric(msrest.serialization.Model): 9824 """Database metrics. 9825 9826 Variables are only populated by the server, and will be ignored when sending a request. 9827 9828 :ivar start_time: The start time for the metric (ISO-8601 format). 9829 :vartype start_time: ~datetime.datetime 9830 :ivar end_time: The end time for the metric (ISO-8601 format). 9831 :vartype end_time: ~datetime.datetime 9832 :ivar time_grain: The time step to be used to summarize the metric values. 9833 :vartype time_grain: str 9834 :ivar unit: The unit of the metric. Possible values include: "count", "bytes", "seconds", 9835 "percent", "countPerSecond", "bytesPerSecond". 9836 :vartype unit: str or ~azure.mgmt.sql.models.UnitType 9837 :ivar name: The name information for the metric. 9838 :vartype name: ~azure.mgmt.sql.models.MetricName 9839 :ivar metric_values: The metric values for the specified time window and timestep. 9840 :vartype metric_values: list[~azure.mgmt.sql.models.MetricValue] 9841 """ 9842 9843 _validation = { 9844 'start_time': {'readonly': True}, 9845 'end_time': {'readonly': True}, 9846 'time_grain': {'readonly': True}, 9847 'unit': {'readonly': True}, 9848 'name': {'readonly': True}, 9849 'metric_values': {'readonly': True}, 9850 } 9851 9852 _attribute_map = { 9853 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 9854 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, 9855 'time_grain': {'key': 'timeGrain', 'type': 'str'}, 9856 'unit': {'key': 'unit', 'type': 'str'}, 9857 'name': {'key': 'name', 'type': 'MetricName'}, 9858 'metric_values': {'key': 'metricValues', 'type': '[MetricValue]'}, 9859 } 9860 9861 def __init__( 9862 self, 9863 **kwargs 9864 ): 9865 super(Metric, self).__init__(**kwargs) 9866 self.start_time = None 9867 self.end_time = None 9868 self.time_grain = None 9869 self.unit = None 9870 self.name = None 9871 self.metric_values = None 9872 9873 9874class MetricAvailability(msrest.serialization.Model): 9875 """A metric availability value. 9876 9877 Variables are only populated by the server, and will be ignored when sending a request. 9878 9879 :ivar retention: The length of retention for the database metric. 9880 :vartype retention: str 9881 :ivar time_grain: The granularity of the database metric. 9882 :vartype time_grain: str 9883 """ 9884 9885 _validation = { 9886 'retention': {'readonly': True}, 9887 'time_grain': {'readonly': True}, 9888 } 9889 9890 _attribute_map = { 9891 'retention': {'key': 'retention', 'type': 'str'}, 9892 'time_grain': {'key': 'timeGrain', 'type': 'str'}, 9893 } 9894 9895 def __init__( 9896 self, 9897 **kwargs 9898 ): 9899 super(MetricAvailability, self).__init__(**kwargs) 9900 self.retention = None 9901 self.time_grain = None 9902 9903 9904class MetricDefinition(msrest.serialization.Model): 9905 """A database metric definition. 9906 9907 Variables are only populated by the server, and will be ignored when sending a request. 9908 9909 :ivar name: The name information for the metric. 9910 :vartype name: ~azure.mgmt.sql.models.MetricName 9911 :ivar primary_aggregation_type: The primary aggregation type defining how metric values are 9912 displayed. Possible values include: "None", "Average", "Count", "Minimum", "Maximum", "Total". 9913 :vartype primary_aggregation_type: str or ~azure.mgmt.sql.models.PrimaryAggregationType 9914 :ivar resource_uri: The resource uri of the database. 9915 :vartype resource_uri: str 9916 :ivar unit: The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", 9917 "Percent", "CountPerSecond", "BytesPerSecond". 9918 :vartype unit: str or ~azure.mgmt.sql.models.UnitDefinitionType 9919 :ivar metric_availabilities: The list of database metric availabilities for the metric. 9920 :vartype metric_availabilities: list[~azure.mgmt.sql.models.MetricAvailability] 9921 """ 9922 9923 _validation = { 9924 'name': {'readonly': True}, 9925 'primary_aggregation_type': {'readonly': True}, 9926 'resource_uri': {'readonly': True}, 9927 'unit': {'readonly': True}, 9928 'metric_availabilities': {'readonly': True}, 9929 } 9930 9931 _attribute_map = { 9932 'name': {'key': 'name', 'type': 'MetricName'}, 9933 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, 9934 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, 9935 'unit': {'key': 'unit', 'type': 'str'}, 9936 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, 9937 } 9938 9939 def __init__( 9940 self, 9941 **kwargs 9942 ): 9943 super(MetricDefinition, self).__init__(**kwargs) 9944 self.name = None 9945 self.primary_aggregation_type = None 9946 self.resource_uri = None 9947 self.unit = None 9948 self.metric_availabilities = None 9949 9950 9951class MetricDefinitionListResult(msrest.serialization.Model): 9952 """The response to a list database metric definitions request. 9953 9954 All required parameters must be populated in order to send to Azure. 9955 9956 :param value: Required. The list of metric definitions for the database. 9957 :type value: list[~azure.mgmt.sql.models.MetricDefinition] 9958 """ 9959 9960 _validation = { 9961 'value': {'required': True}, 9962 } 9963 9964 _attribute_map = { 9965 'value': {'key': 'value', 'type': '[MetricDefinition]'}, 9966 } 9967 9968 def __init__( 9969 self, 9970 *, 9971 value: List["MetricDefinition"], 9972 **kwargs 9973 ): 9974 super(MetricDefinitionListResult, self).__init__(**kwargs) 9975 self.value = value 9976 9977 9978class MetricListResult(msrest.serialization.Model): 9979 """The response to a list database metrics request. 9980 9981 All required parameters must be populated in order to send to Azure. 9982 9983 :param value: Required. The list of metrics for the database. 9984 :type value: list[~azure.mgmt.sql.models.Metric] 9985 """ 9986 9987 _validation = { 9988 'value': {'required': True}, 9989 } 9990 9991 _attribute_map = { 9992 'value': {'key': 'value', 'type': '[Metric]'}, 9993 } 9994 9995 def __init__( 9996 self, 9997 *, 9998 value: List["Metric"], 9999 **kwargs 10000 ): 10001 super(MetricListResult, self).__init__(**kwargs) 10002 self.value = value 10003 10004 10005class MetricName(msrest.serialization.Model): 10006 """A database metric name. 10007 10008 Variables are only populated by the server, and will be ignored when sending a request. 10009 10010 :ivar value: The name of the database metric. 10011 :vartype value: str 10012 :ivar localized_value: The friendly name of the database metric. 10013 :vartype localized_value: str 10014 """ 10015 10016 _validation = { 10017 'value': {'readonly': True}, 10018 'localized_value': {'readonly': True}, 10019 } 10020 10021 _attribute_map = { 10022 'value': {'key': 'value', 'type': 'str'}, 10023 'localized_value': {'key': 'localizedValue', 'type': 'str'}, 10024 } 10025 10026 def __init__( 10027 self, 10028 **kwargs 10029 ): 10030 super(MetricName, self).__init__(**kwargs) 10031 self.value = None 10032 self.localized_value = None 10033 10034 10035class MetricValue(msrest.serialization.Model): 10036 """Represents database metrics. 10037 10038 Variables are only populated by the server, and will be ignored when sending a request. 10039 10040 :ivar count: The number of values for the metric. 10041 :vartype count: int 10042 :ivar average: The average value of the metric. 10043 :vartype average: float 10044 :ivar maximum: The max value of the metric. 10045 :vartype maximum: float 10046 :ivar minimum: The min value of the metric. 10047 :vartype minimum: float 10048 :ivar timestamp: The metric timestamp (ISO-8601 format). 10049 :vartype timestamp: ~datetime.datetime 10050 :ivar total: The total value of the metric. 10051 :vartype total: float 10052 """ 10053 10054 _validation = { 10055 'count': {'readonly': True}, 10056 'average': {'readonly': True}, 10057 'maximum': {'readonly': True}, 10058 'minimum': {'readonly': True}, 10059 'timestamp': {'readonly': True}, 10060 'total': {'readonly': True}, 10061 } 10062 10063 _attribute_map = { 10064 'count': {'key': 'count', 'type': 'int'}, 10065 'average': {'key': 'average', 'type': 'float'}, 10066 'maximum': {'key': 'maximum', 'type': 'float'}, 10067 'minimum': {'key': 'minimum', 'type': 'float'}, 10068 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, 10069 'total': {'key': 'total', 'type': 'float'}, 10070 } 10071 10072 def __init__( 10073 self, 10074 **kwargs 10075 ): 10076 super(MetricValue, self).__init__(**kwargs) 10077 self.count = None 10078 self.average = None 10079 self.maximum = None 10080 self.minimum = None 10081 self.timestamp = None 10082 self.total = None 10083 10084 10085class MinCapacityCapability(msrest.serialization.Model): 10086 """The min capacity capability. 10087 10088 Variables are only populated by the server, and will be ignored when sending a request. 10089 10090 :ivar value: Min capacity value. 10091 :vartype value: float 10092 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 10093 "Default", "Disabled". 10094 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 10095 :param reason: The reason for the capability not being available. 10096 :type reason: str 10097 """ 10098 10099 _validation = { 10100 'value': {'readonly': True}, 10101 'status': {'readonly': True}, 10102 } 10103 10104 _attribute_map = { 10105 'value': {'key': 'value', 'type': 'float'}, 10106 'status': {'key': 'status', 'type': 'str'}, 10107 'reason': {'key': 'reason', 'type': 'str'}, 10108 } 10109 10110 def __init__( 10111 self, 10112 *, 10113 reason: Optional[str] = None, 10114 **kwargs 10115 ): 10116 super(MinCapacityCapability, self).__init__(**kwargs) 10117 self.value = None 10118 self.status = None 10119 self.reason = reason 10120 10121 10122class Name(msrest.serialization.Model): 10123 """ARM Usage Name. 10124 10125 :param value: Usage name value. 10126 :type value: str 10127 :param localized_value: Usage name localized value. 10128 :type localized_value: str 10129 """ 10130 10131 _attribute_map = { 10132 'value': {'key': 'value', 'type': 'str'}, 10133 'localized_value': {'key': 'localizedValue', 'type': 'str'}, 10134 } 10135 10136 def __init__( 10137 self, 10138 *, 10139 value: Optional[str] = None, 10140 localized_value: Optional[str] = None, 10141 **kwargs 10142 ): 10143 super(Name, self).__init__(**kwargs) 10144 self.value = value 10145 self.localized_value = localized_value 10146 10147 10148class NetworkIsolationSettings(msrest.serialization.Model): 10149 """Contains the ARM resources for which to create private endpoint connection. 10150 10151 :param storage_account_resource_id: The resource id for the storage account used to store 10152 BACPAC file. If set, private endpoint connection will be created for the storage account. Must 10153 match storage account used for StorageUri parameter. 10154 :type storage_account_resource_id: str 10155 :param sql_server_resource_id: The resource id for the SQL server which is the target of this 10156 request. If set, private endpoint connection will be created for the SQL server. Must match 10157 server which is target of the operation. 10158 :type sql_server_resource_id: str 10159 """ 10160 10161 _attribute_map = { 10162 'storage_account_resource_id': {'key': 'storageAccountResourceId', 'type': 'str'}, 10163 'sql_server_resource_id': {'key': 'sqlServerResourceId', 'type': 'str'}, 10164 } 10165 10166 def __init__( 10167 self, 10168 *, 10169 storage_account_resource_id: Optional[str] = None, 10170 sql_server_resource_id: Optional[str] = None, 10171 **kwargs 10172 ): 10173 super(NetworkIsolationSettings, self).__init__(**kwargs) 10174 self.storage_account_resource_id = storage_account_resource_id 10175 self.sql_server_resource_id = sql_server_resource_id 10176 10177 10178class Operation(msrest.serialization.Model): 10179 """SQL REST API operation definition. 10180 10181 Variables are only populated by the server, and will be ignored when sending a request. 10182 10183 :ivar name: The name of the operation being performed on this particular object. 10184 :vartype name: str 10185 :ivar display: The localized display information for this particular operation / action. 10186 :vartype display: ~azure.mgmt.sql.models.OperationDisplay 10187 :ivar origin: The intended executor of the operation. Possible values include: "user", 10188 "system". 10189 :vartype origin: str or ~azure.mgmt.sql.models.OperationOrigin 10190 :ivar properties: Additional descriptions for the operation. 10191 :vartype properties: dict[str, any] 10192 """ 10193 10194 _validation = { 10195 'name': {'readonly': True}, 10196 'display': {'readonly': True}, 10197 'origin': {'readonly': True}, 10198 'properties': {'readonly': True}, 10199 } 10200 10201 _attribute_map = { 10202 'name': {'key': 'name', 'type': 'str'}, 10203 'display': {'key': 'display', 'type': 'OperationDisplay'}, 10204 'origin': {'key': 'origin', 'type': 'str'}, 10205 'properties': {'key': 'properties', 'type': '{object}'}, 10206 } 10207 10208 def __init__( 10209 self, 10210 **kwargs 10211 ): 10212 super(Operation, self).__init__(**kwargs) 10213 self.name = None 10214 self.display = None 10215 self.origin = None 10216 self.properties = None 10217 10218 10219class OperationDisplay(msrest.serialization.Model): 10220 """Display metadata associated with the operation. 10221 10222 Variables are only populated by the server, and will be ignored when sending a request. 10223 10224 :ivar provider: The localized friendly form of the resource provider name. 10225 :vartype provider: str 10226 :ivar resource: The localized friendly form of the resource type related to this 10227 action/operation. 10228 :vartype resource: str 10229 :ivar operation: The localized friendly name for the operation. 10230 :vartype operation: str 10231 :ivar description: The localized friendly description for the operation. 10232 :vartype description: str 10233 """ 10234 10235 _validation = { 10236 'provider': {'readonly': True}, 10237 'resource': {'readonly': True}, 10238 'operation': {'readonly': True}, 10239 'description': {'readonly': True}, 10240 } 10241 10242 _attribute_map = { 10243 'provider': {'key': 'provider', 'type': 'str'}, 10244 'resource': {'key': 'resource', 'type': 'str'}, 10245 'operation': {'key': 'operation', 'type': 'str'}, 10246 'description': {'key': 'description', 'type': 'str'}, 10247 } 10248 10249 def __init__( 10250 self, 10251 **kwargs 10252 ): 10253 super(OperationDisplay, self).__init__(**kwargs) 10254 self.provider = None 10255 self.resource = None 10256 self.operation = None 10257 self.description = None 10258 10259 10260class OperationImpact(msrest.serialization.Model): 10261 """The impact of an operation, both in absolute and relative terms. 10262 10263 Variables are only populated by the server, and will be ignored when sending a request. 10264 10265 :ivar name: The name of the impact dimension. 10266 :vartype name: str 10267 :ivar unit: The unit in which estimated impact to dimension is measured. 10268 :vartype unit: str 10269 :ivar change_value_absolute: The absolute impact to dimension. 10270 :vartype change_value_absolute: float 10271 :ivar change_value_relative: The relative impact to dimension (null if not applicable). 10272 :vartype change_value_relative: float 10273 """ 10274 10275 _validation = { 10276 'name': {'readonly': True}, 10277 'unit': {'readonly': True}, 10278 'change_value_absolute': {'readonly': True}, 10279 'change_value_relative': {'readonly': True}, 10280 } 10281 10282 _attribute_map = { 10283 'name': {'key': 'name', 'type': 'str'}, 10284 'unit': {'key': 'unit', 'type': 'str'}, 10285 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, 10286 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, 10287 } 10288 10289 def __init__( 10290 self, 10291 **kwargs 10292 ): 10293 super(OperationImpact, self).__init__(**kwargs) 10294 self.name = None 10295 self.unit = None 10296 self.change_value_absolute = None 10297 self.change_value_relative = None 10298 10299 10300class OperationListResult(msrest.serialization.Model): 10301 """Result of the request to list SQL operations. 10302 10303 Variables are only populated by the server, and will be ignored when sending a request. 10304 10305 :ivar value: Array of results. 10306 :vartype value: list[~azure.mgmt.sql.models.Operation] 10307 :ivar next_link: Link to retrieve next page of results. 10308 :vartype next_link: str 10309 """ 10310 10311 _validation = { 10312 'value': {'readonly': True}, 10313 'next_link': {'readonly': True}, 10314 } 10315 10316 _attribute_map = { 10317 'value': {'key': 'value', 'type': '[Operation]'}, 10318 'next_link': {'key': 'nextLink', 'type': 'str'}, 10319 } 10320 10321 def __init__( 10322 self, 10323 **kwargs 10324 ): 10325 super(OperationListResult, self).__init__(**kwargs) 10326 self.value = None 10327 self.next_link = None 10328 10329 10330class OperationsHealth(ProxyResource): 10331 """Operations health status in a location. 10332 10333 Variables are only populated by the server, and will be ignored when sending a request. 10334 10335 :ivar id: Resource ID. 10336 :vartype id: str 10337 :ivar name: Resource name. 10338 :vartype name: str 10339 :ivar type: Resource type. 10340 :vartype type: str 10341 :ivar name_properties_name: Operation name for the service. 10342 :vartype name_properties_name: str 10343 :ivar health: Operation health status of the service. 10344 :vartype health: str 10345 :ivar description: Health status description. 10346 :vartype description: str 10347 """ 10348 10349 _validation = { 10350 'id': {'readonly': True}, 10351 'name': {'readonly': True}, 10352 'type': {'readonly': True}, 10353 'name_properties_name': {'readonly': True}, 10354 'health': {'readonly': True}, 10355 'description': {'readonly': True}, 10356 } 10357 10358 _attribute_map = { 10359 'id': {'key': 'id', 'type': 'str'}, 10360 'name': {'key': 'name', 'type': 'str'}, 10361 'type': {'key': 'type', 'type': 'str'}, 10362 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 10363 'health': {'key': 'properties.health', 'type': 'str'}, 10364 'description': {'key': 'properties.description', 'type': 'str'}, 10365 } 10366 10367 def __init__( 10368 self, 10369 **kwargs 10370 ): 10371 super(OperationsHealth, self).__init__(**kwargs) 10372 self.name_properties_name = None 10373 self.health = None 10374 self.description = None 10375 10376 10377class OperationsHealthListResult(msrest.serialization.Model): 10378 """A list of service health statuses in a location. 10379 10380 Variables are only populated by the server, and will be ignored when sending a request. 10381 10382 :ivar value: Array of results. 10383 :vartype value: list[~azure.mgmt.sql.models.OperationsHealth] 10384 :ivar next_link: Link to retrieve next page of results. 10385 :vartype next_link: str 10386 """ 10387 10388 _validation = { 10389 'value': {'readonly': True}, 10390 'next_link': {'readonly': True}, 10391 } 10392 10393 _attribute_map = { 10394 'value': {'key': 'value', 'type': '[OperationsHealth]'}, 10395 'next_link': {'key': 'nextLink', 'type': 'str'}, 10396 } 10397 10398 def __init__( 10399 self, 10400 **kwargs 10401 ): 10402 super(OperationsHealthListResult, self).__init__(**kwargs) 10403 self.value = None 10404 self.next_link = None 10405 10406 10407class OutboundFirewallRule(ProxyResource): 10408 """An Azure SQL DB Server Outbound Firewall Rule. 10409 10410 Variables are only populated by the server, and will be ignored when sending a request. 10411 10412 :ivar id: Resource ID. 10413 :vartype id: str 10414 :ivar name: Resource name. 10415 :vartype name: str 10416 :ivar type: Resource type. 10417 :vartype type: str 10418 :ivar provisioning_state: The state of the outbound rule. 10419 :vartype provisioning_state: str 10420 """ 10421 10422 _validation = { 10423 'id': {'readonly': True}, 10424 'name': {'readonly': True}, 10425 'type': {'readonly': True}, 10426 'provisioning_state': {'readonly': True}, 10427 } 10428 10429 _attribute_map = { 10430 'id': {'key': 'id', 'type': 'str'}, 10431 'name': {'key': 'name', 'type': 'str'}, 10432 'type': {'key': 'type', 'type': 'str'}, 10433 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 10434 } 10435 10436 def __init__( 10437 self, 10438 **kwargs 10439 ): 10440 super(OutboundFirewallRule, self).__init__(**kwargs) 10441 self.provisioning_state = None 10442 10443 10444class OutboundFirewallRuleListResult(msrest.serialization.Model): 10445 """A list of outbound rules. 10446 10447 Variables are only populated by the server, and will be ignored when sending a request. 10448 10449 :ivar value: Array of results. 10450 :vartype value: list[~azure.mgmt.sql.models.OutboundFirewallRule] 10451 :ivar next_link: Link to retrieve next page of results. 10452 :vartype next_link: str 10453 """ 10454 10455 _validation = { 10456 'value': {'readonly': True}, 10457 'next_link': {'readonly': True}, 10458 } 10459 10460 _attribute_map = { 10461 'value': {'key': 'value', 'type': '[OutboundFirewallRule]'}, 10462 'next_link': {'key': 'nextLink', 'type': 'str'}, 10463 } 10464 10465 def __init__( 10466 self, 10467 **kwargs 10468 ): 10469 super(OutboundFirewallRuleListResult, self).__init__(**kwargs) 10470 self.value = None 10471 self.next_link = None 10472 10473 10474class PartnerInfo(msrest.serialization.Model): 10475 """Partner server information for the failover group. 10476 10477 Variables are only populated by the server, and will be ignored when sending a request. 10478 10479 All required parameters must be populated in order to send to Azure. 10480 10481 :param id: Required. Resource identifier of the partner server. 10482 :type id: str 10483 :ivar location: Geo location of the partner server. 10484 :vartype location: str 10485 :ivar replication_role: Replication role of the partner server. Possible values include: 10486 "Primary", "Secondary". 10487 :vartype replication_role: str or ~azure.mgmt.sql.models.FailoverGroupReplicationRole 10488 """ 10489 10490 _validation = { 10491 'id': {'required': True}, 10492 'location': {'readonly': True}, 10493 'replication_role': {'readonly': True}, 10494 } 10495 10496 _attribute_map = { 10497 'id': {'key': 'id', 'type': 'str'}, 10498 'location': {'key': 'location', 'type': 'str'}, 10499 'replication_role': {'key': 'replicationRole', 'type': 'str'}, 10500 } 10501 10502 def __init__( 10503 self, 10504 *, 10505 id: str, 10506 **kwargs 10507 ): 10508 super(PartnerInfo, self).__init__(**kwargs) 10509 self.id = id 10510 self.location = None 10511 self.replication_role = None 10512 10513 10514class PartnerRegionInfo(msrest.serialization.Model): 10515 """Partner region information for the failover group. 10516 10517 Variables are only populated by the server, and will be ignored when sending a request. 10518 10519 :param location: Geo location of the partner managed instances. 10520 :type location: str 10521 :ivar replication_role: Replication role of the partner managed instances. Possible values 10522 include: "Primary", "Secondary". 10523 :vartype replication_role: str or ~azure.mgmt.sql.models.InstanceFailoverGroupReplicationRole 10524 """ 10525 10526 _validation = { 10527 'replication_role': {'readonly': True}, 10528 } 10529 10530 _attribute_map = { 10531 'location': {'key': 'location', 'type': 'str'}, 10532 'replication_role': {'key': 'replicationRole', 'type': 'str'}, 10533 } 10534 10535 def __init__( 10536 self, 10537 *, 10538 location: Optional[str] = None, 10539 **kwargs 10540 ): 10541 super(PartnerRegionInfo, self).__init__(**kwargs) 10542 self.location = location 10543 self.replication_role = None 10544 10545 10546class PerformanceLevelCapability(msrest.serialization.Model): 10547 """The performance level capability. 10548 10549 Variables are only populated by the server, and will be ignored when sending a request. 10550 10551 :ivar value: Performance level value. 10552 :vartype value: float 10553 :ivar unit: Unit type used to measure performance level. Possible values include: "DTU", 10554 "VCores". 10555 :vartype unit: str or ~azure.mgmt.sql.models.PerformanceLevelUnit 10556 """ 10557 10558 _validation = { 10559 'value': {'readonly': True}, 10560 'unit': {'readonly': True}, 10561 } 10562 10563 _attribute_map = { 10564 'value': {'key': 'value', 'type': 'float'}, 10565 'unit': {'key': 'unit', 'type': 'str'}, 10566 } 10567 10568 def __init__( 10569 self, 10570 **kwargs 10571 ): 10572 super(PerformanceLevelCapability, self).__init__(**kwargs) 10573 self.value = None 10574 self.unit = None 10575 10576 10577class PrivateEndpointConnection(ProxyResource): 10578 """A private endpoint connection. 10579 10580 Variables are only populated by the server, and will be ignored when sending a request. 10581 10582 :ivar id: Resource ID. 10583 :vartype id: str 10584 :ivar name: Resource name. 10585 :vartype name: str 10586 :ivar type: Resource type. 10587 :vartype type: str 10588 :param private_endpoint: Private endpoint which the connection belongs to. 10589 :type private_endpoint: ~azure.mgmt.sql.models.PrivateEndpointProperty 10590 :param private_link_service_connection_state: Connection state of the private endpoint 10591 connection. 10592 :type private_link_service_connection_state: 10593 ~azure.mgmt.sql.models.PrivateLinkServiceConnectionStateProperty 10594 :ivar provisioning_state: State of the private endpoint connection. Possible values include: 10595 "Approving", "Ready", "Dropping", "Failed", "Rejecting". 10596 :vartype provisioning_state: str or ~azure.mgmt.sql.models.PrivateEndpointProvisioningState 10597 """ 10598 10599 _validation = { 10600 'id': {'readonly': True}, 10601 'name': {'readonly': True}, 10602 'type': {'readonly': True}, 10603 'provisioning_state': {'readonly': True}, 10604 } 10605 10606 _attribute_map = { 10607 'id': {'key': 'id', 'type': 'str'}, 10608 'name': {'key': 'name', 'type': 'str'}, 10609 'type': {'key': 'type', 'type': 'str'}, 10610 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, 10611 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, 10612 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 10613 } 10614 10615 def __init__( 10616 self, 10617 *, 10618 private_endpoint: Optional["PrivateEndpointProperty"] = None, 10619 private_link_service_connection_state: Optional["PrivateLinkServiceConnectionStateProperty"] = None, 10620 **kwargs 10621 ): 10622 super(PrivateEndpointConnection, self).__init__(**kwargs) 10623 self.private_endpoint = private_endpoint 10624 self.private_link_service_connection_state = private_link_service_connection_state 10625 self.provisioning_state = None 10626 10627 10628class PrivateEndpointConnectionListResult(msrest.serialization.Model): 10629 """A list of private endpoint connections. 10630 10631 Variables are only populated by the server, and will be ignored when sending a request. 10632 10633 :ivar value: Array of results. 10634 :vartype value: list[~azure.mgmt.sql.models.PrivateEndpointConnection] 10635 :ivar next_link: Link to retrieve next page of results. 10636 :vartype next_link: str 10637 """ 10638 10639 _validation = { 10640 'value': {'readonly': True}, 10641 'next_link': {'readonly': True}, 10642 } 10643 10644 _attribute_map = { 10645 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, 10646 'next_link': {'key': 'nextLink', 'type': 'str'}, 10647 } 10648 10649 def __init__( 10650 self, 10651 **kwargs 10652 ): 10653 super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) 10654 self.value = None 10655 self.next_link = None 10656 10657 10658class PrivateEndpointConnectionProperties(msrest.serialization.Model): 10659 """Properties of a private endpoint connection. 10660 10661 Variables are only populated by the server, and will be ignored when sending a request. 10662 10663 :param private_endpoint: Private endpoint which the connection belongs to. 10664 :type private_endpoint: ~azure.mgmt.sql.models.PrivateEndpointProperty 10665 :param private_link_service_connection_state: Connection state of the private endpoint 10666 connection. 10667 :type private_link_service_connection_state: 10668 ~azure.mgmt.sql.models.PrivateLinkServiceConnectionStateProperty 10669 :ivar provisioning_state: State of the private endpoint connection. Possible values include: 10670 "Approving", "Ready", "Dropping", "Failed", "Rejecting". 10671 :vartype provisioning_state: str or ~azure.mgmt.sql.models.PrivateEndpointProvisioningState 10672 """ 10673 10674 _validation = { 10675 'provisioning_state': {'readonly': True}, 10676 } 10677 10678 _attribute_map = { 10679 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointProperty'}, 10680 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, 10681 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 10682 } 10683 10684 def __init__( 10685 self, 10686 *, 10687 private_endpoint: Optional["PrivateEndpointProperty"] = None, 10688 private_link_service_connection_state: Optional["PrivateLinkServiceConnectionStateProperty"] = None, 10689 **kwargs 10690 ): 10691 super(PrivateEndpointConnectionProperties, self).__init__(**kwargs) 10692 self.private_endpoint = private_endpoint 10693 self.private_link_service_connection_state = private_link_service_connection_state 10694 self.provisioning_state = None 10695 10696 10697class PrivateEndpointConnectionRequestStatus(msrest.serialization.Model): 10698 """Contains the private endpoint connection requests status. 10699 10700 Variables are only populated by the server, and will be ignored when sending a request. 10701 10702 :ivar private_link_service_id: Resource id for which the private endpoint is created. 10703 :vartype private_link_service_id: str 10704 :ivar private_endpoint_connection_name: The connection name for the private endpoint. 10705 :vartype private_endpoint_connection_name: str 10706 :ivar status: Status of this private endpoint connection. 10707 :vartype status: str 10708 """ 10709 10710 _validation = { 10711 'private_link_service_id': {'readonly': True}, 10712 'private_endpoint_connection_name': {'readonly': True}, 10713 'status': {'readonly': True}, 10714 } 10715 10716 _attribute_map = { 10717 'private_link_service_id': {'key': 'privateLinkServiceId', 'type': 'str'}, 10718 'private_endpoint_connection_name': {'key': 'privateEndpointConnectionName', 'type': 'str'}, 10719 'status': {'key': 'status', 'type': 'str'}, 10720 } 10721 10722 def __init__( 10723 self, 10724 **kwargs 10725 ): 10726 super(PrivateEndpointConnectionRequestStatus, self).__init__(**kwargs) 10727 self.private_link_service_id = None 10728 self.private_endpoint_connection_name = None 10729 self.status = None 10730 10731 10732class PrivateEndpointProperty(msrest.serialization.Model): 10733 """PrivateEndpointProperty. 10734 10735 :param id: Resource id of the private endpoint. 10736 :type id: str 10737 """ 10738 10739 _attribute_map = { 10740 'id': {'key': 'id', 'type': 'str'}, 10741 } 10742 10743 def __init__( 10744 self, 10745 *, 10746 id: Optional[str] = None, 10747 **kwargs 10748 ): 10749 super(PrivateEndpointProperty, self).__init__(**kwargs) 10750 self.id = id 10751 10752 10753class PrivateLinkResource(ProxyResource): 10754 """A private link resource. 10755 10756 Variables are only populated by the server, and will be ignored when sending a request. 10757 10758 :ivar id: Resource ID. 10759 :vartype id: str 10760 :ivar name: Resource name. 10761 :vartype name: str 10762 :ivar type: Resource type. 10763 :vartype type: str 10764 :ivar properties: The private link resource group id. 10765 :vartype properties: ~azure.mgmt.sql.models.PrivateLinkResourceProperties 10766 """ 10767 10768 _validation = { 10769 'id': {'readonly': True}, 10770 'name': {'readonly': True}, 10771 'type': {'readonly': True}, 10772 'properties': {'readonly': True}, 10773 } 10774 10775 _attribute_map = { 10776 'id': {'key': 'id', 'type': 'str'}, 10777 'name': {'key': 'name', 'type': 'str'}, 10778 'type': {'key': 'type', 'type': 'str'}, 10779 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, 10780 } 10781 10782 def __init__( 10783 self, 10784 **kwargs 10785 ): 10786 super(PrivateLinkResource, self).__init__(**kwargs) 10787 self.properties = None 10788 10789 10790class PrivateLinkResourceListResult(msrest.serialization.Model): 10791 """A list of private link resources. 10792 10793 Variables are only populated by the server, and will be ignored when sending a request. 10794 10795 :ivar value: Array of results. 10796 :vartype value: list[~azure.mgmt.sql.models.PrivateLinkResource] 10797 :ivar next_link: Link to retrieve next page of results. 10798 :vartype next_link: str 10799 """ 10800 10801 _validation = { 10802 'value': {'readonly': True}, 10803 'next_link': {'readonly': True}, 10804 } 10805 10806 _attribute_map = { 10807 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, 10808 'next_link': {'key': 'nextLink', 'type': 'str'}, 10809 } 10810 10811 def __init__( 10812 self, 10813 **kwargs 10814 ): 10815 super(PrivateLinkResourceListResult, self).__init__(**kwargs) 10816 self.value = None 10817 self.next_link = None 10818 10819 10820class PrivateLinkResourceProperties(msrest.serialization.Model): 10821 """Properties of a private link resource. 10822 10823 Variables are only populated by the server, and will be ignored when sending a request. 10824 10825 :ivar group_id: The private link resource group id. 10826 :vartype group_id: str 10827 :ivar required_members: The private link resource required member names. 10828 :vartype required_members: list[str] 10829 :ivar required_zone_names: The private link resource required zone names. 10830 :vartype required_zone_names: list[str] 10831 """ 10832 10833 _validation = { 10834 'group_id': {'readonly': True}, 10835 'required_members': {'readonly': True}, 10836 'required_zone_names': {'readonly': True}, 10837 } 10838 10839 _attribute_map = { 10840 'group_id': {'key': 'groupId', 'type': 'str'}, 10841 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, 10842 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, 10843 } 10844 10845 def __init__( 10846 self, 10847 **kwargs 10848 ): 10849 super(PrivateLinkResourceProperties, self).__init__(**kwargs) 10850 self.group_id = None 10851 self.required_members = None 10852 self.required_zone_names = None 10853 10854 10855class PrivateLinkServiceConnectionStateProperty(msrest.serialization.Model): 10856 """PrivateLinkServiceConnectionStateProperty. 10857 10858 Variables are only populated by the server, and will be ignored when sending a request. 10859 10860 All required parameters must be populated in order to send to Azure. 10861 10862 :param status: Required. The private link service connection status. Possible values include: 10863 "Approved", "Pending", "Rejected", "Disconnected". 10864 :type status: str or ~azure.mgmt.sql.models.PrivateLinkServiceConnectionStateStatus 10865 :param description: Required. The private link service connection description. 10866 :type description: str 10867 :ivar actions_required: The actions required for private link service connection. Possible 10868 values include: "None". 10869 :vartype actions_required: str or 10870 ~azure.mgmt.sql.models.PrivateLinkServiceConnectionStateActionsRequire 10871 """ 10872 10873 _validation = { 10874 'status': {'required': True}, 10875 'description': {'required': True}, 10876 'actions_required': {'readonly': True}, 10877 } 10878 10879 _attribute_map = { 10880 'status': {'key': 'status', 'type': 'str'}, 10881 'description': {'key': 'description', 'type': 'str'}, 10882 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, 10883 } 10884 10885 def __init__( 10886 self, 10887 *, 10888 status: Union[str, "PrivateLinkServiceConnectionStateStatus"], 10889 description: str, 10890 **kwargs 10891 ): 10892 super(PrivateLinkServiceConnectionStateProperty, self).__init__(**kwargs) 10893 self.status = status 10894 self.description = description 10895 self.actions_required = None 10896 10897 10898class QueryMetricInterval(msrest.serialization.Model): 10899 """Properties of a query metrics interval. 10900 10901 Variables are only populated by the server, and will be ignored when sending a request. 10902 10903 :ivar interval_start_time: The start time for the metric interval (ISO-8601 format). 10904 :vartype interval_start_time: str 10905 :ivar interval_type: Interval type (length). Possible values include: "PT1H", "P1D". 10906 :vartype interval_type: str or ~azure.mgmt.sql.models.QueryTimeGrainType 10907 :ivar execution_count: Execution count of a query in this interval. 10908 :vartype execution_count: long 10909 :param metrics: List of metric objects for this interval. 10910 :type metrics: list[~azure.mgmt.sql.models.QueryMetricProperties] 10911 """ 10912 10913 _validation = { 10914 'interval_start_time': {'readonly': True}, 10915 'interval_type': {'readonly': True}, 10916 'execution_count': {'readonly': True}, 10917 } 10918 10919 _attribute_map = { 10920 'interval_start_time': {'key': 'intervalStartTime', 'type': 'str'}, 10921 'interval_type': {'key': 'intervalType', 'type': 'str'}, 10922 'execution_count': {'key': 'executionCount', 'type': 'long'}, 10923 'metrics': {'key': 'metrics', 'type': '[QueryMetricProperties]'}, 10924 } 10925 10926 def __init__( 10927 self, 10928 *, 10929 metrics: Optional[List["QueryMetricProperties"]] = None, 10930 **kwargs 10931 ): 10932 super(QueryMetricInterval, self).__init__(**kwargs) 10933 self.interval_start_time = None 10934 self.interval_type = None 10935 self.execution_count = None 10936 self.metrics = metrics 10937 10938 10939class QueryMetricProperties(msrest.serialization.Model): 10940 """Properties of a topquery metric in one interval. 10941 10942 Variables are only populated by the server, and will be ignored when sending a request. 10943 10944 :ivar name: The name information for the metric. 10945 :vartype name: str 10946 :ivar display_name: The UI appropriate name for the metric. 10947 :vartype display_name: str 10948 :ivar unit: The unit of the metric. Possible values include: "percentage", "KB", 10949 "microseconds", "count". 10950 :vartype unit: str or ~azure.mgmt.sql.models.QueryMetricUnitType 10951 :ivar value: The value of the metric. 10952 :vartype value: float 10953 :ivar min: Metric value when min() aggregate function is used over the interval. 10954 :vartype min: float 10955 :ivar max: Metric value when max() aggregate function is used over the interval. 10956 :vartype max: float 10957 :ivar avg: Metric value when avg() aggregate function is used over the interval. 10958 :vartype avg: float 10959 :ivar sum: Metric value when sum() aggregate function is used over the interval. 10960 :vartype sum: float 10961 :ivar stdev: Metric value when stdev aggregate function is used over the interval. 10962 :vartype stdev: float 10963 """ 10964 10965 _validation = { 10966 'name': {'readonly': True}, 10967 'display_name': {'readonly': True}, 10968 'unit': {'readonly': True}, 10969 'value': {'readonly': True}, 10970 'min': {'readonly': True}, 10971 'max': {'readonly': True}, 10972 'avg': {'readonly': True}, 10973 'sum': {'readonly': True}, 10974 'stdev': {'readonly': True}, 10975 } 10976 10977 _attribute_map = { 10978 'name': {'key': 'name', 'type': 'str'}, 10979 'display_name': {'key': 'displayName', 'type': 'str'}, 10980 'unit': {'key': 'unit', 'type': 'str'}, 10981 'value': {'key': 'value', 'type': 'float'}, 10982 'min': {'key': 'min', 'type': 'float'}, 10983 'max': {'key': 'max', 'type': 'float'}, 10984 'avg': {'key': 'avg', 'type': 'float'}, 10985 'sum': {'key': 'sum', 'type': 'float'}, 10986 'stdev': {'key': 'stdev', 'type': 'float'}, 10987 } 10988 10989 def __init__( 10990 self, 10991 **kwargs 10992 ): 10993 super(QueryMetricProperties, self).__init__(**kwargs) 10994 self.name = None 10995 self.display_name = None 10996 self.unit = None 10997 self.value = None 10998 self.min = None 10999 self.max = None 11000 self.avg = None 11001 self.sum = None 11002 self.stdev = None 11003 11004 11005class QueryStatistics(ProxyResource): 11006 """QueryStatistics. 11007 11008 Variables are only populated by the server, and will be ignored when sending a request. 11009 11010 :ivar id: Resource ID. 11011 :vartype id: str 11012 :ivar name: Resource name. 11013 :vartype name: str 11014 :ivar type: Resource type. 11015 :vartype type: str 11016 :ivar database_name: Database name of the database in which this query was executed. 11017 :vartype database_name: str 11018 :ivar query_id: Unique query id (unique within one database). 11019 :vartype query_id: str 11020 :ivar start_time: The start time for the metric (ISO-8601 format). 11021 :vartype start_time: str 11022 :ivar end_time: The end time for the metric (ISO-8601 format). 11023 :vartype end_time: str 11024 :param intervals: List of intervals with appropriate metric data. 11025 :type intervals: list[~azure.mgmt.sql.models.QueryMetricInterval] 11026 """ 11027 11028 _validation = { 11029 'id': {'readonly': True}, 11030 'name': {'readonly': True}, 11031 'type': {'readonly': True}, 11032 'database_name': {'readonly': True}, 11033 'query_id': {'readonly': True}, 11034 'start_time': {'readonly': True}, 11035 'end_time': {'readonly': True}, 11036 } 11037 11038 _attribute_map = { 11039 'id': {'key': 'id', 'type': 'str'}, 11040 'name': {'key': 'name', 'type': 'str'}, 11041 'type': {'key': 'type', 'type': 'str'}, 11042 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 11043 'query_id': {'key': 'properties.queryId', 'type': 'str'}, 11044 'start_time': {'key': 'properties.startTime', 'type': 'str'}, 11045 'end_time': {'key': 'properties.endTime', 'type': 'str'}, 11046 'intervals': {'key': 'properties.intervals', 'type': '[QueryMetricInterval]'}, 11047 } 11048 11049 def __init__( 11050 self, 11051 *, 11052 intervals: Optional[List["QueryMetricInterval"]] = None, 11053 **kwargs 11054 ): 11055 super(QueryStatistics, self).__init__(**kwargs) 11056 self.database_name = None 11057 self.query_id = None 11058 self.start_time = None 11059 self.end_time = None 11060 self.intervals = intervals 11061 11062 11063class QueryStatisticsProperties(msrest.serialization.Model): 11064 """Properties of a query execution statistics. 11065 11066 Variables are only populated by the server, and will be ignored when sending a request. 11067 11068 :ivar database_name: Database name of the database in which this query was executed. 11069 :vartype database_name: str 11070 :ivar query_id: Unique query id (unique within one database). 11071 :vartype query_id: str 11072 :ivar start_time: The start time for the metric (ISO-8601 format). 11073 :vartype start_time: str 11074 :ivar end_time: The end time for the metric (ISO-8601 format). 11075 :vartype end_time: str 11076 :param intervals: List of intervals with appropriate metric data. 11077 :type intervals: list[~azure.mgmt.sql.models.QueryMetricInterval] 11078 """ 11079 11080 _validation = { 11081 'database_name': {'readonly': True}, 11082 'query_id': {'readonly': True}, 11083 'start_time': {'readonly': True}, 11084 'end_time': {'readonly': True}, 11085 } 11086 11087 _attribute_map = { 11088 'database_name': {'key': 'databaseName', 'type': 'str'}, 11089 'query_id': {'key': 'queryId', 'type': 'str'}, 11090 'start_time': {'key': 'startTime', 'type': 'str'}, 11091 'end_time': {'key': 'endTime', 'type': 'str'}, 11092 'intervals': {'key': 'intervals', 'type': '[QueryMetricInterval]'}, 11093 } 11094 11095 def __init__( 11096 self, 11097 *, 11098 intervals: Optional[List["QueryMetricInterval"]] = None, 11099 **kwargs 11100 ): 11101 super(QueryStatisticsProperties, self).__init__(**kwargs) 11102 self.database_name = None 11103 self.query_id = None 11104 self.start_time = None 11105 self.end_time = None 11106 self.intervals = intervals 11107 11108 11109class ReadScaleCapability(msrest.serialization.Model): 11110 """The read scale capability. 11111 11112 Variables are only populated by the server, and will be ignored when sending a request. 11113 11114 :ivar max_number_of_replicas: The maximum number of read scale replicas. 11115 :vartype max_number_of_replicas: int 11116 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 11117 "Default", "Disabled". 11118 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 11119 :param reason: The reason for the capability not being available. 11120 :type reason: str 11121 """ 11122 11123 _validation = { 11124 'max_number_of_replicas': {'readonly': True}, 11125 'status': {'readonly': True}, 11126 } 11127 11128 _attribute_map = { 11129 'max_number_of_replicas': {'key': 'maxNumberOfReplicas', 'type': 'int'}, 11130 'status': {'key': 'status', 'type': 'str'}, 11131 'reason': {'key': 'reason', 'type': 'str'}, 11132 } 11133 11134 def __init__( 11135 self, 11136 *, 11137 reason: Optional[str] = None, 11138 **kwargs 11139 ): 11140 super(ReadScaleCapability, self).__init__(**kwargs) 11141 self.max_number_of_replicas = None 11142 self.status = None 11143 self.reason = reason 11144 11145 11146class RecommendedAction(ProxyResource): 11147 """Database, Server or Elastic Pool Recommended Action. 11148 11149 Variables are only populated by the server, and will be ignored when sending a request. 11150 11151 :ivar id: Resource ID. 11152 :vartype id: str 11153 :ivar name: Resource name. 11154 :vartype name: str 11155 :ivar type: Resource type. 11156 :vartype type: str 11157 :ivar kind: Resource kind. 11158 :vartype kind: str 11159 :ivar location: Resource location. 11160 :vartype location: str 11161 :ivar recommendation_reason: Gets the reason for recommending this action. e.g., 11162 DuplicateIndex. 11163 :vartype recommendation_reason: str 11164 :ivar valid_since: Gets the time since when this recommended action is valid. 11165 :vartype valid_since: ~datetime.datetime 11166 :ivar last_refresh: Gets time when this recommended action was last refreshed. 11167 :vartype last_refresh: ~datetime.datetime 11168 :param state: Gets the info of the current state the recommended action is in. 11169 :type state: ~azure.mgmt.sql.models.RecommendedActionStateInfo 11170 :ivar is_executable_action: Gets if this recommended action is actionable by user. 11171 :vartype is_executable_action: bool 11172 :ivar is_revertable_action: Gets if changes applied by this recommended action can be reverted 11173 by user. 11174 :vartype is_revertable_action: bool 11175 :ivar is_archived_action: Gets if this recommended action was suggested some time ago but user 11176 chose to ignore this and system added a new recommended action again. 11177 :vartype is_archived_action: bool 11178 :ivar execute_action_start_time: Gets the time when system started applying this recommended 11179 action on the user resource. e.g., index creation start time. 11180 :vartype execute_action_start_time: ~datetime.datetime 11181 :ivar execute_action_duration: Gets the time taken for applying this recommended action on user 11182 resource. e.g., time taken for index creation. 11183 :vartype execute_action_duration: str 11184 :ivar revert_action_start_time: Gets the time when system started reverting changes of this 11185 recommended action on user resource. e.g., time when index drop is executed. 11186 :vartype revert_action_start_time: ~datetime.datetime 11187 :ivar revert_action_duration: Gets the time taken for reverting changes of this recommended 11188 action on user resource. e.g., time taken for dropping the created index. 11189 :vartype revert_action_duration: str 11190 :ivar execute_action_initiated_by: Gets if approval for applying this recommended action was 11191 given by user/system. Possible values include: "User", "System". 11192 :vartype execute_action_initiated_by: str or 11193 ~azure.mgmt.sql.models.RecommendedActionInitiatedBy 11194 :ivar execute_action_initiated_time: Gets the time when this recommended action was approved 11195 for execution. 11196 :vartype execute_action_initiated_time: ~datetime.datetime 11197 :ivar revert_action_initiated_by: Gets if approval for reverting this recommended action was 11198 given by user/system. Possible values include: "User", "System". 11199 :vartype revert_action_initiated_by: str or ~azure.mgmt.sql.models.RecommendedActionInitiatedBy 11200 :ivar revert_action_initiated_time: Gets the time when this recommended action was approved for 11201 revert. 11202 :vartype revert_action_initiated_time: ~datetime.datetime 11203 :ivar score: Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 11204 - Medium Impact and 3 - High Impact. 11205 :vartype score: int 11206 :ivar implementation_details: Gets the implementation details of this recommended action for 11207 user to apply it manually. 11208 :vartype implementation_details: ~azure.mgmt.sql.models.RecommendedActionImplementationInfo 11209 :ivar error_details: Gets the error details if and why this recommended action is put to error 11210 state. 11211 :vartype error_details: ~azure.mgmt.sql.models.RecommendedActionErrorInfo 11212 :ivar estimated_impact: Gets the estimated impact info for this recommended action e.g., 11213 Estimated CPU gain, Estimated Disk Space change. 11214 :vartype estimated_impact: list[~azure.mgmt.sql.models.RecommendedActionImpactRecord] 11215 :ivar observed_impact: Gets the observed/actual impact info for this recommended action e.g., 11216 Actual CPU gain, Actual Disk Space change. 11217 :vartype observed_impact: list[~azure.mgmt.sql.models.RecommendedActionImpactRecord] 11218 :ivar time_series: Gets the time series info of metrics for this recommended action e.g., CPU 11219 consumption time series. 11220 :vartype time_series: list[~azure.mgmt.sql.models.RecommendedActionMetricInfo] 11221 :ivar linked_objects: Gets the linked objects, if any. 11222 :vartype linked_objects: list[str] 11223 :ivar details: Gets additional details specific to this recommended action. 11224 :vartype details: dict[str, any] 11225 """ 11226 11227 _validation = { 11228 'id': {'readonly': True}, 11229 'name': {'readonly': True}, 11230 'type': {'readonly': True}, 11231 'kind': {'readonly': True}, 11232 'location': {'readonly': True}, 11233 'recommendation_reason': {'readonly': True}, 11234 'valid_since': {'readonly': True}, 11235 'last_refresh': {'readonly': True}, 11236 'is_executable_action': {'readonly': True}, 11237 'is_revertable_action': {'readonly': True}, 11238 'is_archived_action': {'readonly': True}, 11239 'execute_action_start_time': {'readonly': True}, 11240 'execute_action_duration': {'readonly': True}, 11241 'revert_action_start_time': {'readonly': True}, 11242 'revert_action_duration': {'readonly': True}, 11243 'execute_action_initiated_by': {'readonly': True}, 11244 'execute_action_initiated_time': {'readonly': True}, 11245 'revert_action_initiated_by': {'readonly': True}, 11246 'revert_action_initiated_time': {'readonly': True}, 11247 'score': {'readonly': True}, 11248 'implementation_details': {'readonly': True}, 11249 'error_details': {'readonly': True}, 11250 'estimated_impact': {'readonly': True}, 11251 'observed_impact': {'readonly': True}, 11252 'time_series': {'readonly': True}, 11253 'linked_objects': {'readonly': True}, 11254 'details': {'readonly': True}, 11255 } 11256 11257 _attribute_map = { 11258 'id': {'key': 'id', 'type': 'str'}, 11259 'name': {'key': 'name', 'type': 'str'}, 11260 'type': {'key': 'type', 'type': 'str'}, 11261 'kind': {'key': 'kind', 'type': 'str'}, 11262 'location': {'key': 'location', 'type': 'str'}, 11263 'recommendation_reason': {'key': 'properties.recommendationReason', 'type': 'str'}, 11264 'valid_since': {'key': 'properties.validSince', 'type': 'iso-8601'}, 11265 'last_refresh': {'key': 'properties.lastRefresh', 'type': 'iso-8601'}, 11266 'state': {'key': 'properties.state', 'type': 'RecommendedActionStateInfo'}, 11267 'is_executable_action': {'key': 'properties.isExecutableAction', 'type': 'bool'}, 11268 'is_revertable_action': {'key': 'properties.isRevertableAction', 'type': 'bool'}, 11269 'is_archived_action': {'key': 'properties.isArchivedAction', 'type': 'bool'}, 11270 'execute_action_start_time': {'key': 'properties.executeActionStartTime', 'type': 'iso-8601'}, 11271 'execute_action_duration': {'key': 'properties.executeActionDuration', 'type': 'str'}, 11272 'revert_action_start_time': {'key': 'properties.revertActionStartTime', 'type': 'iso-8601'}, 11273 'revert_action_duration': {'key': 'properties.revertActionDuration', 'type': 'str'}, 11274 'execute_action_initiated_by': {'key': 'properties.executeActionInitiatedBy', 'type': 'str'}, 11275 'execute_action_initiated_time': {'key': 'properties.executeActionInitiatedTime', 'type': 'iso-8601'}, 11276 'revert_action_initiated_by': {'key': 'properties.revertActionInitiatedBy', 'type': 'str'}, 11277 'revert_action_initiated_time': {'key': 'properties.revertActionInitiatedTime', 'type': 'iso-8601'}, 11278 'score': {'key': 'properties.score', 'type': 'int'}, 11279 'implementation_details': {'key': 'properties.implementationDetails', 'type': 'RecommendedActionImplementationInfo'}, 11280 'error_details': {'key': 'properties.errorDetails', 'type': 'RecommendedActionErrorInfo'}, 11281 'estimated_impact': {'key': 'properties.estimatedImpact', 'type': '[RecommendedActionImpactRecord]'}, 11282 'observed_impact': {'key': 'properties.observedImpact', 'type': '[RecommendedActionImpactRecord]'}, 11283 'time_series': {'key': 'properties.timeSeries', 'type': '[RecommendedActionMetricInfo]'}, 11284 'linked_objects': {'key': 'properties.linkedObjects', 'type': '[str]'}, 11285 'details': {'key': 'properties.details', 'type': '{object}'}, 11286 } 11287 11288 def __init__( 11289 self, 11290 *, 11291 state: Optional["RecommendedActionStateInfo"] = None, 11292 **kwargs 11293 ): 11294 super(RecommendedAction, self).__init__(**kwargs) 11295 self.kind = None 11296 self.location = None 11297 self.recommendation_reason = None 11298 self.valid_since = None 11299 self.last_refresh = None 11300 self.state = state 11301 self.is_executable_action = None 11302 self.is_revertable_action = None 11303 self.is_archived_action = None 11304 self.execute_action_start_time = None 11305 self.execute_action_duration = None 11306 self.revert_action_start_time = None 11307 self.revert_action_duration = None 11308 self.execute_action_initiated_by = None 11309 self.execute_action_initiated_time = None 11310 self.revert_action_initiated_by = None 11311 self.revert_action_initiated_time = None 11312 self.score = None 11313 self.implementation_details = None 11314 self.error_details = None 11315 self.estimated_impact = None 11316 self.observed_impact = None 11317 self.time_series = None 11318 self.linked_objects = None 11319 self.details = None 11320 11321 11322class RecommendedActionErrorInfo(msrest.serialization.Model): 11323 """Contains error information for an Azure SQL Database, Server or Elastic Pool Recommended Action. 11324 11325 Variables are only populated by the server, and will be ignored when sending a request. 11326 11327 :ivar error_code: Gets the reason why the recommended action was put to error state. e.g., 11328 DatabaseHasQdsOff, IndexAlreadyExists. 11329 :vartype error_code: str 11330 :ivar is_retryable: Gets whether the error could be ignored and recommended action could be 11331 retried. Possible values are: Yes/No. Possible values include: "Yes", "No". 11332 :vartype is_retryable: str or ~azure.mgmt.sql.models.IsRetryable 11333 """ 11334 11335 _validation = { 11336 'error_code': {'readonly': True}, 11337 'is_retryable': {'readonly': True}, 11338 } 11339 11340 _attribute_map = { 11341 'error_code': {'key': 'errorCode', 'type': 'str'}, 11342 'is_retryable': {'key': 'isRetryable', 'type': 'str'}, 11343 } 11344 11345 def __init__( 11346 self, 11347 **kwargs 11348 ): 11349 super(RecommendedActionErrorInfo, self).__init__(**kwargs) 11350 self.error_code = None 11351 self.is_retryable = None 11352 11353 11354class RecommendedActionImpactRecord(msrest.serialization.Model): 11355 """Contains information of estimated or observed impact on various metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action. 11356 11357 Variables are only populated by the server, and will be ignored when sending a request. 11358 11359 :ivar dimension_name: Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, 11360 NumberOfQueriesAffected. 11361 :vartype dimension_name: str 11362 :ivar unit: Gets the name of the impact dimension. e.g., CPUChange, DiskSpaceChange, 11363 NumberOfQueriesAffected. 11364 :vartype unit: str 11365 :ivar absolute_value: Gets the absolute value of this dimension if applicable. e.g., Number of 11366 Queries affected. 11367 :vartype absolute_value: float 11368 :ivar change_value_absolute: Gets the absolute change in the value of this dimension. e.g., 11369 Absolute Disk space change in Megabytes. 11370 :vartype change_value_absolute: float 11371 :ivar change_value_relative: Gets the relative change in the value of this dimension. e.g., 11372 Relative Disk space change in Percentage. 11373 :vartype change_value_relative: float 11374 """ 11375 11376 _validation = { 11377 'dimension_name': {'readonly': True}, 11378 'unit': {'readonly': True}, 11379 'absolute_value': {'readonly': True}, 11380 'change_value_absolute': {'readonly': True}, 11381 'change_value_relative': {'readonly': True}, 11382 } 11383 11384 _attribute_map = { 11385 'dimension_name': {'key': 'dimensionName', 'type': 'str'}, 11386 'unit': {'key': 'unit', 'type': 'str'}, 11387 'absolute_value': {'key': 'absoluteValue', 'type': 'float'}, 11388 'change_value_absolute': {'key': 'changeValueAbsolute', 'type': 'float'}, 11389 'change_value_relative': {'key': 'changeValueRelative', 'type': 'float'}, 11390 } 11391 11392 def __init__( 11393 self, 11394 **kwargs 11395 ): 11396 super(RecommendedActionImpactRecord, self).__init__(**kwargs) 11397 self.dimension_name = None 11398 self.unit = None 11399 self.absolute_value = None 11400 self.change_value_absolute = None 11401 self.change_value_relative = None 11402 11403 11404class RecommendedActionImplementationInfo(msrest.serialization.Model): 11405 """Contains information for manual implementation for an Azure SQL Database, Server or Elastic Pool Recommended Action. 11406 11407 Variables are only populated by the server, and will be ignored when sending a request. 11408 11409 :ivar method: Gets the method in which this recommended action can be manually implemented. 11410 e.g., TSql, AzurePowerShell. Possible values include: "TSql", "AzurePowerShell". 11411 :vartype method: str or ~azure.mgmt.sql.models.ImplementationMethod 11412 :ivar script: Gets the manual implementation script. e.g., T-SQL script that could be executed 11413 on the database. 11414 :vartype script: str 11415 """ 11416 11417 _validation = { 11418 'method': {'readonly': True}, 11419 'script': {'readonly': True}, 11420 } 11421 11422 _attribute_map = { 11423 'method': {'key': 'method', 'type': 'str'}, 11424 'script': {'key': 'script', 'type': 'str'}, 11425 } 11426 11427 def __init__( 11428 self, 11429 **kwargs 11430 ): 11431 super(RecommendedActionImplementationInfo, self).__init__(**kwargs) 11432 self.method = None 11433 self.script = None 11434 11435 11436class RecommendedActionMetricInfo(msrest.serialization.Model): 11437 """Contains time series of various impacted metrics for an Azure SQL Database, Server or Elastic Pool Recommended Action. 11438 11439 Variables are only populated by the server, and will be ignored when sending a request. 11440 11441 :ivar metric_name: Gets the name of the metric. e.g., CPU, Number of Queries. 11442 :vartype metric_name: str 11443 :ivar unit: Gets the unit in which metric is measured. e.g., DTU, Frequency. 11444 :vartype unit: str 11445 :ivar time_grain: Gets the duration of time interval for the value given by this MetricInfo. 11446 e.g., PT1H (1 hour). 11447 :vartype time_grain: str 11448 :ivar start_time: Gets the start time of time interval given by this MetricInfo. 11449 :vartype start_time: ~datetime.datetime 11450 :ivar value: Gets the value of the metric in the time interval given by this MetricInfo. 11451 :vartype value: float 11452 """ 11453 11454 _validation = { 11455 'metric_name': {'readonly': True}, 11456 'unit': {'readonly': True}, 11457 'time_grain': {'readonly': True}, 11458 'start_time': {'readonly': True}, 11459 'value': {'readonly': True}, 11460 } 11461 11462 _attribute_map = { 11463 'metric_name': {'key': 'metricName', 'type': 'str'}, 11464 'unit': {'key': 'unit', 'type': 'str'}, 11465 'time_grain': {'key': 'timeGrain', 'type': 'str'}, 11466 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 11467 'value': {'key': 'value', 'type': 'float'}, 11468 } 11469 11470 def __init__( 11471 self, 11472 **kwargs 11473 ): 11474 super(RecommendedActionMetricInfo, self).__init__(**kwargs) 11475 self.metric_name = None 11476 self.unit = None 11477 self.time_grain = None 11478 self.start_time = None 11479 self.value = None 11480 11481 11482class RecommendedActionStateInfo(msrest.serialization.Model): 11483 """Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action. 11484 11485 Variables are only populated by the server, and will be ignored when sending a request. 11486 11487 All required parameters must be populated in order to send to Azure. 11488 11489 :param current_value: Required. Current state the recommended action is in. Some commonly used 11490 states are: Active -> recommended action is active and no action has been taken yet. 11491 Pending -> recommended action is approved for and is awaiting execution. Executing -> 11492 recommended action is being applied on the user database. Verifying -> recommended action was 11493 applied and is being verified of its usefulness by the system. Success -> recommended 11494 action was applied and improvement found during verification. Pending Revert -> verification 11495 found little or no improvement so recommended action is queued for revert or user has manually 11496 reverted. Reverting -> changes made while applying recommended action are being reverted on 11497 the user database. Reverted -> successfully reverted the changes made by recommended action 11498 on user database. Ignored -> user explicitly ignored/discarded the recommended action. 11499 Possible values include: "Active", "Pending", "Executing", "Verifying", "PendingRevert", 11500 "RevertCancelled", "Reverting", "Reverted", "Ignored", "Expired", "Monitoring", "Resolved", 11501 "Success", "Error". 11502 :type current_value: str or ~azure.mgmt.sql.models.RecommendedActionCurrentState 11503 :ivar action_initiated_by: Gets who initiated the execution of this recommended action. 11504 Possible Value are: User -> When user explicity notified system to apply the recommended 11505 action. System -> When auto-execute status of this advisor was set to 'Enabled', in which case 11506 the system applied it. Possible values include: "User", "System". 11507 :vartype action_initiated_by: str or ~azure.mgmt.sql.models.RecommendedActionInitiatedBy 11508 :ivar last_modified: Gets the time when the state was last modified. 11509 :vartype last_modified: ~datetime.datetime 11510 """ 11511 11512 _validation = { 11513 'current_value': {'required': True}, 11514 'action_initiated_by': {'readonly': True}, 11515 'last_modified': {'readonly': True}, 11516 } 11517 11518 _attribute_map = { 11519 'current_value': {'key': 'currentValue', 'type': 'str'}, 11520 'action_initiated_by': {'key': 'actionInitiatedBy', 'type': 'str'}, 11521 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, 11522 } 11523 11524 def __init__( 11525 self, 11526 *, 11527 current_value: Union[str, "RecommendedActionCurrentState"], 11528 **kwargs 11529 ): 11530 super(RecommendedActionStateInfo, self).__init__(**kwargs) 11531 self.current_value = current_value 11532 self.action_initiated_by = None 11533 self.last_modified = None 11534 11535 11536class RecommendedSensitivityLabelUpdate(ProxyResource): 11537 """A recommended sensitivity label update operation. 11538 11539 Variables are only populated by the server, and will be ignored when sending a request. 11540 11541 :ivar id: Resource ID. 11542 :vartype id: str 11543 :ivar name: Resource name. 11544 :vartype name: str 11545 :ivar type: Resource type. 11546 :vartype type: str 11547 :param op: Possible values include: "enable", "disable". 11548 :type op: str or ~azure.mgmt.sql.models.RecommendedSensitivityLabelUpdateKind 11549 :param schema: Schema name of the column to update. 11550 :type schema: str 11551 :param table: Table name of the column to update. 11552 :type table: str 11553 :param column: Column name to update. 11554 :type column: str 11555 """ 11556 11557 _validation = { 11558 'id': {'readonly': True}, 11559 'name': {'readonly': True}, 11560 'type': {'readonly': True}, 11561 } 11562 11563 _attribute_map = { 11564 'id': {'key': 'id', 'type': 'str'}, 11565 'name': {'key': 'name', 'type': 'str'}, 11566 'type': {'key': 'type', 'type': 'str'}, 11567 'op': {'key': 'properties.op', 'type': 'str'}, 11568 'schema': {'key': 'properties.schema', 'type': 'str'}, 11569 'table': {'key': 'properties.table', 'type': 'str'}, 11570 'column': {'key': 'properties.column', 'type': 'str'}, 11571 } 11572 11573 def __init__( 11574 self, 11575 *, 11576 op: Optional[Union[str, "RecommendedSensitivityLabelUpdateKind"]] = None, 11577 schema: Optional[str] = None, 11578 table: Optional[str] = None, 11579 column: Optional[str] = None, 11580 **kwargs 11581 ): 11582 super(RecommendedSensitivityLabelUpdate, self).__init__(**kwargs) 11583 self.op = op 11584 self.schema = schema 11585 self.table = table 11586 self.column = column 11587 11588 11589class RecommendedSensitivityLabelUpdateList(msrest.serialization.Model): 11590 """A list of recommended sensitivity label update operations. 11591 11592 :param operations: 11593 :type operations: list[~azure.mgmt.sql.models.RecommendedSensitivityLabelUpdate] 11594 """ 11595 11596 _attribute_map = { 11597 'operations': {'key': 'operations', 'type': '[RecommendedSensitivityLabelUpdate]'}, 11598 } 11599 11600 def __init__( 11601 self, 11602 *, 11603 operations: Optional[List["RecommendedSensitivityLabelUpdate"]] = None, 11604 **kwargs 11605 ): 11606 super(RecommendedSensitivityLabelUpdateList, self).__init__(**kwargs) 11607 self.operations = operations 11608 11609 11610class RecoverableDatabase(ProxyResource): 11611 """A recoverable database. 11612 11613 Variables are only populated by the server, and will be ignored when sending a request. 11614 11615 :ivar id: Resource ID. 11616 :vartype id: str 11617 :ivar name: Resource name. 11618 :vartype name: str 11619 :ivar type: Resource type. 11620 :vartype type: str 11621 :ivar edition: The edition of the database. 11622 :vartype edition: str 11623 :ivar service_level_objective: The service level objective name of the database. 11624 :vartype service_level_objective: str 11625 :ivar elastic_pool_name: The elastic pool name of the database. 11626 :vartype elastic_pool_name: str 11627 :ivar last_available_backup_date: The last available backup date of the database (ISO8601 11628 format). 11629 :vartype last_available_backup_date: ~datetime.datetime 11630 """ 11631 11632 _validation = { 11633 'id': {'readonly': True}, 11634 'name': {'readonly': True}, 11635 'type': {'readonly': True}, 11636 'edition': {'readonly': True}, 11637 'service_level_objective': {'readonly': True}, 11638 'elastic_pool_name': {'readonly': True}, 11639 'last_available_backup_date': {'readonly': True}, 11640 } 11641 11642 _attribute_map = { 11643 'id': {'key': 'id', 'type': 'str'}, 11644 'name': {'key': 'name', 'type': 'str'}, 11645 'type': {'key': 'type', 'type': 'str'}, 11646 'edition': {'key': 'properties.edition', 'type': 'str'}, 11647 'service_level_objective': {'key': 'properties.serviceLevelObjective', 'type': 'str'}, 11648 'elastic_pool_name': {'key': 'properties.elasticPoolName', 'type': 'str'}, 11649 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'iso-8601'}, 11650 } 11651 11652 def __init__( 11653 self, 11654 **kwargs 11655 ): 11656 super(RecoverableDatabase, self).__init__(**kwargs) 11657 self.edition = None 11658 self.service_level_objective = None 11659 self.elastic_pool_name = None 11660 self.last_available_backup_date = None 11661 11662 11663class RecoverableDatabaseListResult(msrest.serialization.Model): 11664 """The response to a list recoverable databases request. 11665 11666 All required parameters must be populated in order to send to Azure. 11667 11668 :param value: Required. A list of recoverable databases. 11669 :type value: list[~azure.mgmt.sql.models.RecoverableDatabase] 11670 """ 11671 11672 _validation = { 11673 'value': {'required': True}, 11674 } 11675 11676 _attribute_map = { 11677 'value': {'key': 'value', 'type': '[RecoverableDatabase]'}, 11678 } 11679 11680 def __init__( 11681 self, 11682 *, 11683 value: List["RecoverableDatabase"], 11684 **kwargs 11685 ): 11686 super(RecoverableDatabaseListResult, self).__init__(**kwargs) 11687 self.value = value 11688 11689 11690class RecoverableManagedDatabase(ProxyResource): 11691 """A recoverable managed database resource. 11692 11693 Variables are only populated by the server, and will be ignored when sending a request. 11694 11695 :ivar id: Resource ID. 11696 :vartype id: str 11697 :ivar name: Resource name. 11698 :vartype name: str 11699 :ivar type: Resource type. 11700 :vartype type: str 11701 :ivar last_available_backup_date: The last available backup date. 11702 :vartype last_available_backup_date: str 11703 """ 11704 11705 _validation = { 11706 'id': {'readonly': True}, 11707 'name': {'readonly': True}, 11708 'type': {'readonly': True}, 11709 'last_available_backup_date': {'readonly': True}, 11710 } 11711 11712 _attribute_map = { 11713 'id': {'key': 'id', 'type': 'str'}, 11714 'name': {'key': 'name', 'type': 'str'}, 11715 'type': {'key': 'type', 'type': 'str'}, 11716 'last_available_backup_date': {'key': 'properties.lastAvailableBackupDate', 'type': 'str'}, 11717 } 11718 11719 def __init__( 11720 self, 11721 **kwargs 11722 ): 11723 super(RecoverableManagedDatabase, self).__init__(**kwargs) 11724 self.last_available_backup_date = None 11725 11726 11727class RecoverableManagedDatabaseListResult(msrest.serialization.Model): 11728 """A list of recoverable managed databases. 11729 11730 Variables are only populated by the server, and will be ignored when sending a request. 11731 11732 :ivar value: Array of results. 11733 :vartype value: list[~azure.mgmt.sql.models.RecoverableManagedDatabase] 11734 :ivar next_link: Link to retrieve next page of results. 11735 :vartype next_link: str 11736 """ 11737 11738 _validation = { 11739 'value': {'readonly': True}, 11740 'next_link': {'readonly': True}, 11741 } 11742 11743 _attribute_map = { 11744 'value': {'key': 'value', 'type': '[RecoverableManagedDatabase]'}, 11745 'next_link': {'key': 'nextLink', 'type': 'str'}, 11746 } 11747 11748 def __init__( 11749 self, 11750 **kwargs 11751 ): 11752 super(RecoverableManagedDatabaseListResult, self).__init__(**kwargs) 11753 self.value = None 11754 self.next_link = None 11755 11756 11757class ReplicationLink(ProxyResource): 11758 """A replication link. 11759 11760 Variables are only populated by the server, and will be ignored when sending a request. 11761 11762 :ivar id: Resource ID. 11763 :vartype id: str 11764 :ivar name: Resource name. 11765 :vartype name: str 11766 :ivar type: Resource type. 11767 :vartype type: str 11768 :ivar partner_server: Resource partner server. 11769 :vartype partner_server: str 11770 :ivar partner_database: Resource partner database. 11771 :vartype partner_database: str 11772 :ivar partner_location: Resource partner location. 11773 :vartype partner_location: str 11774 :ivar role: Local replication role. Possible values include: "Primary", "Secondary", 11775 "NonReadableSecondary", "Source", "Copy". 11776 :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole 11777 :ivar partner_role: Partner replication role. Possible values include: "Primary", "Secondary", 11778 "NonReadableSecondary", "Source", "Copy". 11779 :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole 11780 :ivar replication_mode: Replication mode. 11781 :vartype replication_mode: str 11782 :ivar start_time: Time at which the link was created. 11783 :vartype start_time: ~datetime.datetime 11784 :ivar percent_complete: Seeding completion percentage for the link. 11785 :vartype percent_complete: int 11786 :ivar replication_state: Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). Possible 11787 values include: "PENDING", "SEEDING", "CATCH_UP", "SUSPENDED". 11788 :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState 11789 :ivar is_termination_allowed: Whether the user is currently allowed to terminate the link. 11790 :vartype is_termination_allowed: bool 11791 :ivar link_type: Link type (GEO, NAMED). Possible values include: "GEO", "NAMED". 11792 :vartype link_type: str or ~azure.mgmt.sql.models.ReplicationLinkType 11793 """ 11794 11795 _validation = { 11796 'id': {'readonly': True}, 11797 'name': {'readonly': True}, 11798 'type': {'readonly': True}, 11799 'partner_server': {'readonly': True}, 11800 'partner_database': {'readonly': True}, 11801 'partner_location': {'readonly': True}, 11802 'role': {'readonly': True}, 11803 'partner_role': {'readonly': True}, 11804 'replication_mode': {'readonly': True}, 11805 'start_time': {'readonly': True}, 11806 'percent_complete': {'readonly': True}, 11807 'replication_state': {'readonly': True}, 11808 'is_termination_allowed': {'readonly': True}, 11809 'link_type': {'readonly': True}, 11810 } 11811 11812 _attribute_map = { 11813 'id': {'key': 'id', 'type': 'str'}, 11814 'name': {'key': 'name', 'type': 'str'}, 11815 'type': {'key': 'type', 'type': 'str'}, 11816 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, 11817 'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'}, 11818 'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'}, 11819 'role': {'key': 'properties.role', 'type': 'str'}, 11820 'partner_role': {'key': 'properties.partnerRole', 'type': 'str'}, 11821 'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'}, 11822 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 11823 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, 11824 'replication_state': {'key': 'properties.replicationState', 'type': 'str'}, 11825 'is_termination_allowed': {'key': 'properties.isTerminationAllowed', 'type': 'bool'}, 11826 'link_type': {'key': 'properties.linkType', 'type': 'str'}, 11827 } 11828 11829 def __init__( 11830 self, 11831 **kwargs 11832 ): 11833 super(ReplicationLink, self).__init__(**kwargs) 11834 self.partner_server = None 11835 self.partner_database = None 11836 self.partner_location = None 11837 self.role = None 11838 self.partner_role = None 11839 self.replication_mode = None 11840 self.start_time = None 11841 self.percent_complete = None 11842 self.replication_state = None 11843 self.is_termination_allowed = None 11844 self.link_type = None 11845 11846 11847class ReplicationLinkListResult(msrest.serialization.Model): 11848 """A list of replication links. 11849 11850 Variables are only populated by the server, and will be ignored when sending a request. 11851 11852 :ivar value: Array of results. 11853 :vartype value: list[~azure.mgmt.sql.models.ReplicationLink] 11854 :ivar next_link: Link to retrieve next page of results. 11855 :vartype next_link: str 11856 """ 11857 11858 _validation = { 11859 'value': {'readonly': True}, 11860 'next_link': {'readonly': True}, 11861 } 11862 11863 _attribute_map = { 11864 'value': {'key': 'value', 'type': '[ReplicationLink]'}, 11865 'next_link': {'key': 'nextLink', 'type': 'str'}, 11866 } 11867 11868 def __init__( 11869 self, 11870 **kwargs 11871 ): 11872 super(ReplicationLinkListResult, self).__init__(**kwargs) 11873 self.value = None 11874 self.next_link = None 11875 11876 11877class ResourceIdentity(msrest.serialization.Model): 11878 """Azure Active Directory identity configuration for a resource. 11879 11880 Variables are only populated by the server, and will be ignored when sending a request. 11881 11882 :param user_assigned_identities: The resource ids of the user assigned identities to use. 11883 :type user_assigned_identities: dict[str, ~azure.mgmt.sql.models.UserIdentity] 11884 :ivar principal_id: The Azure Active Directory principal id. 11885 :vartype principal_id: str 11886 :param type: The identity type. Set this to 'SystemAssigned' in order to automatically create 11887 and assign an Azure Active Directory principal for the resource. Possible values include: 11888 "None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned". 11889 :type type: str or ~azure.mgmt.sql.models.IdentityType 11890 :ivar tenant_id: The Azure Active Directory tenant id. 11891 :vartype tenant_id: str 11892 """ 11893 11894 _validation = { 11895 'principal_id': {'readonly': True}, 11896 'tenant_id': {'readonly': True}, 11897 } 11898 11899 _attribute_map = { 11900 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentity}'}, 11901 'principal_id': {'key': 'principalId', 'type': 'str'}, 11902 'type': {'key': 'type', 'type': 'str'}, 11903 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 11904 } 11905 11906 def __init__( 11907 self, 11908 *, 11909 user_assigned_identities: Optional[Dict[str, "UserIdentity"]] = None, 11910 type: Optional[Union[str, "IdentityType"]] = None, 11911 **kwargs 11912 ): 11913 super(ResourceIdentity, self).__init__(**kwargs) 11914 self.user_assigned_identities = user_assigned_identities 11915 self.principal_id = None 11916 self.type = type 11917 self.tenant_id = None 11918 11919 11920class ResourceMoveDefinition(msrest.serialization.Model): 11921 """Contains the information necessary to perform a resource move (rename). 11922 11923 All required parameters must be populated in order to send to Azure. 11924 11925 :param id: Required. The target ID for the resource. 11926 :type id: str 11927 """ 11928 11929 _validation = { 11930 'id': {'required': True}, 11931 } 11932 11933 _attribute_map = { 11934 'id': {'key': 'id', 'type': 'str'}, 11935 } 11936 11937 def __init__( 11938 self, 11939 *, 11940 id: str, 11941 **kwargs 11942 ): 11943 super(ResourceMoveDefinition, self).__init__(**kwargs) 11944 self.id = id 11945 11946 11947class RestorableDroppedDatabase(ProxyResource): 11948 """A restorable dropped database resource. 11949 11950 Variables are only populated by the server, and will be ignored when sending a request. 11951 11952 :ivar id: Resource ID. 11953 :vartype id: str 11954 :ivar name: Resource name. 11955 :vartype name: str 11956 :ivar type: Resource type. 11957 :vartype type: str 11958 :param sku: The name and tier of the SKU. 11959 :type sku: ~azure.mgmt.sql.models.Sku 11960 :param location: Resource location. 11961 :type location: str 11962 :param tags: A set of tags. Resource tags. 11963 :type tags: dict[str, str] 11964 :ivar database_name: The name of the database. 11965 :vartype database_name: str 11966 :ivar max_size_bytes: The max size of the database expressed in bytes. 11967 :vartype max_size_bytes: long 11968 :ivar elastic_pool_id: DEPRECATED: The resource name of the elastic pool containing this 11969 database. This property is deprecated and the value will always be null. 11970 :vartype elastic_pool_id: str 11971 :ivar creation_date: The creation date of the database (ISO8601 format). 11972 :vartype creation_date: ~datetime.datetime 11973 :ivar deletion_date: The deletion date of the database (ISO8601 format). 11974 :vartype deletion_date: ~datetime.datetime 11975 :ivar earliest_restore_date: The earliest restore date of the database (ISO8601 format). 11976 :vartype earliest_restore_date: ~datetime.datetime 11977 :ivar backup_storage_redundancy: The storage account type used to store backups for this 11978 database. Possible values include: "Geo", "Local", "Zone". 11979 :vartype backup_storage_redundancy: str or 11980 ~azure.mgmt.sql.models.RestorableDroppedDatabasePropertiesBackupStorageRedundancy 11981 """ 11982 11983 _validation = { 11984 'id': {'readonly': True}, 11985 'name': {'readonly': True}, 11986 'type': {'readonly': True}, 11987 'database_name': {'readonly': True}, 11988 'max_size_bytes': {'readonly': True}, 11989 'elastic_pool_id': {'readonly': True}, 11990 'creation_date': {'readonly': True}, 11991 'deletion_date': {'readonly': True}, 11992 'earliest_restore_date': {'readonly': True}, 11993 'backup_storage_redundancy': {'readonly': True}, 11994 } 11995 11996 _attribute_map = { 11997 'id': {'key': 'id', 'type': 'str'}, 11998 'name': {'key': 'name', 'type': 'str'}, 11999 'type': {'key': 'type', 'type': 'str'}, 12000 'sku': {'key': 'sku', 'type': 'Sku'}, 12001 'location': {'key': 'location', 'type': 'str'}, 12002 'tags': {'key': 'tags', 'type': '{str}'}, 12003 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 12004 'max_size_bytes': {'key': 'properties.maxSizeBytes', 'type': 'long'}, 12005 'elastic_pool_id': {'key': 'properties.elasticPoolId', 'type': 'str'}, 12006 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 12007 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, 12008 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, 12009 'backup_storage_redundancy': {'key': 'properties.backupStorageRedundancy', 'type': 'str'}, 12010 } 12011 12012 def __init__( 12013 self, 12014 *, 12015 sku: Optional["Sku"] = None, 12016 location: Optional[str] = None, 12017 tags: Optional[Dict[str, str]] = None, 12018 **kwargs 12019 ): 12020 super(RestorableDroppedDatabase, self).__init__(**kwargs) 12021 self.sku = sku 12022 self.location = location 12023 self.tags = tags 12024 self.database_name = None 12025 self.max_size_bytes = None 12026 self.elastic_pool_id = None 12027 self.creation_date = None 12028 self.deletion_date = None 12029 self.earliest_restore_date = None 12030 self.backup_storage_redundancy = None 12031 12032 12033class RestorableDroppedDatabaseListResult(msrest.serialization.Model): 12034 """A list of restorable dropped databases. 12035 12036 Variables are only populated by the server, and will be ignored when sending a request. 12037 12038 :ivar value: Array of results. 12039 :vartype value: list[~azure.mgmt.sql.models.RestorableDroppedDatabase] 12040 :ivar next_link: Link to retrieve next page of results. 12041 :vartype next_link: str 12042 """ 12043 12044 _validation = { 12045 'value': {'readonly': True}, 12046 'next_link': {'readonly': True}, 12047 } 12048 12049 _attribute_map = { 12050 'value': {'key': 'value', 'type': '[RestorableDroppedDatabase]'}, 12051 'next_link': {'key': 'nextLink', 'type': 'str'}, 12052 } 12053 12054 def __init__( 12055 self, 12056 **kwargs 12057 ): 12058 super(RestorableDroppedDatabaseListResult, self).__init__(**kwargs) 12059 self.value = None 12060 self.next_link = None 12061 12062 12063class RestorableDroppedManagedDatabase(TrackedResource): 12064 """A restorable dropped managed database resource. 12065 12066 Variables are only populated by the server, and will be ignored when sending a request. 12067 12068 All required parameters must be populated in order to send to Azure. 12069 12070 :ivar id: Resource ID. 12071 :vartype id: str 12072 :ivar name: Resource name. 12073 :vartype name: str 12074 :ivar type: Resource type. 12075 :vartype type: str 12076 :param location: Required. Resource location. 12077 :type location: str 12078 :param tags: A set of tags. Resource tags. 12079 :type tags: dict[str, str] 12080 :ivar database_name: The name of the database. 12081 :vartype database_name: str 12082 :ivar creation_date: The creation date of the database (ISO8601 format). 12083 :vartype creation_date: ~datetime.datetime 12084 :ivar deletion_date: The deletion date of the database (ISO8601 format). 12085 :vartype deletion_date: ~datetime.datetime 12086 :ivar earliest_restore_date: The earliest restore date of the database (ISO8601 format). 12087 :vartype earliest_restore_date: ~datetime.datetime 12088 """ 12089 12090 _validation = { 12091 'id': {'readonly': True}, 12092 'name': {'readonly': True}, 12093 'type': {'readonly': True}, 12094 'location': {'required': True}, 12095 'database_name': {'readonly': True}, 12096 'creation_date': {'readonly': True}, 12097 'deletion_date': {'readonly': True}, 12098 'earliest_restore_date': {'readonly': True}, 12099 } 12100 12101 _attribute_map = { 12102 'id': {'key': 'id', 'type': 'str'}, 12103 'name': {'key': 'name', 'type': 'str'}, 12104 'type': {'key': 'type', 'type': 'str'}, 12105 'location': {'key': 'location', 'type': 'str'}, 12106 'tags': {'key': 'tags', 'type': '{str}'}, 12107 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 12108 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 12109 'deletion_date': {'key': 'properties.deletionDate', 'type': 'iso-8601'}, 12110 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, 12111 } 12112 12113 def __init__( 12114 self, 12115 *, 12116 location: str, 12117 tags: Optional[Dict[str, str]] = None, 12118 **kwargs 12119 ): 12120 super(RestorableDroppedManagedDatabase, self).__init__(location=location, tags=tags, **kwargs) 12121 self.database_name = None 12122 self.creation_date = None 12123 self.deletion_date = None 12124 self.earliest_restore_date = None 12125 12126 12127class RestorableDroppedManagedDatabaseListResult(msrest.serialization.Model): 12128 """A list of restorable dropped managed databases. 12129 12130 Variables are only populated by the server, and will be ignored when sending a request. 12131 12132 :ivar value: Array of results. 12133 :vartype value: list[~azure.mgmt.sql.models.RestorableDroppedManagedDatabase] 12134 :ivar next_link: Link to retrieve next page of results. 12135 :vartype next_link: str 12136 """ 12137 12138 _validation = { 12139 'value': {'readonly': True}, 12140 'next_link': {'readonly': True}, 12141 } 12142 12143 _attribute_map = { 12144 'value': {'key': 'value', 'type': '[RestorableDroppedManagedDatabase]'}, 12145 'next_link': {'key': 'nextLink', 'type': 'str'}, 12146 } 12147 12148 def __init__( 12149 self, 12150 **kwargs 12151 ): 12152 super(RestorableDroppedManagedDatabaseListResult, self).__init__(**kwargs) 12153 self.value = None 12154 self.next_link = None 12155 12156 12157class RestorePoint(ProxyResource): 12158 """Database restore points. 12159 12160 Variables are only populated by the server, and will be ignored when sending a request. 12161 12162 :ivar id: Resource ID. 12163 :vartype id: str 12164 :ivar name: Resource name. 12165 :vartype name: str 12166 :ivar type: Resource type. 12167 :vartype type: str 12168 :ivar location: Resource location. 12169 :vartype location: str 12170 :ivar restore_point_type: The type of restore point. Possible values include: "CONTINUOUS", 12171 "DISCRETE". 12172 :vartype restore_point_type: str or ~azure.mgmt.sql.models.RestorePointType 12173 :ivar earliest_restore_date: The earliest time to which this database can be restored. 12174 :vartype earliest_restore_date: ~datetime.datetime 12175 :ivar restore_point_creation_date: The time the backup was taken. 12176 :vartype restore_point_creation_date: ~datetime.datetime 12177 :ivar restore_point_label: The label of restore point for backup request by user. 12178 :vartype restore_point_label: str 12179 """ 12180 12181 _validation = { 12182 'id': {'readonly': True}, 12183 'name': {'readonly': True}, 12184 'type': {'readonly': True}, 12185 'location': {'readonly': True}, 12186 'restore_point_type': {'readonly': True}, 12187 'earliest_restore_date': {'readonly': True}, 12188 'restore_point_creation_date': {'readonly': True}, 12189 'restore_point_label': {'readonly': True}, 12190 } 12191 12192 _attribute_map = { 12193 'id': {'key': 'id', 'type': 'str'}, 12194 'name': {'key': 'name', 'type': 'str'}, 12195 'type': {'key': 'type', 'type': 'str'}, 12196 'location': {'key': 'location', 'type': 'str'}, 12197 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'str'}, 12198 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, 12199 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, 12200 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, 12201 } 12202 12203 def __init__( 12204 self, 12205 **kwargs 12206 ): 12207 super(RestorePoint, self).__init__(**kwargs) 12208 self.location = None 12209 self.restore_point_type = None 12210 self.earliest_restore_date = None 12211 self.restore_point_creation_date = None 12212 self.restore_point_label = None 12213 12214 12215class RestorePointListResult(msrest.serialization.Model): 12216 """A list of long term retention backups. 12217 12218 Variables are only populated by the server, and will be ignored when sending a request. 12219 12220 :ivar value: Array of results. 12221 :vartype value: list[~azure.mgmt.sql.models.RestorePoint] 12222 :ivar next_link: Link to retrieve next page of results. 12223 :vartype next_link: str 12224 """ 12225 12226 _validation = { 12227 'value': {'readonly': True}, 12228 'next_link': {'readonly': True}, 12229 } 12230 12231 _attribute_map = { 12232 'value': {'key': 'value', 'type': '[RestorePoint]'}, 12233 'next_link': {'key': 'nextLink', 'type': 'str'}, 12234 } 12235 12236 def __init__( 12237 self, 12238 **kwargs 12239 ): 12240 super(RestorePointListResult, self).__init__(**kwargs) 12241 self.value = None 12242 self.next_link = None 12243 12244 12245class SecurityEvent(ProxyResource): 12246 """A security event. 12247 12248 Variables are only populated by the server, and will be ignored when sending a request. 12249 12250 :ivar id: Resource ID. 12251 :vartype id: str 12252 :ivar name: Resource name. 12253 :vartype name: str 12254 :ivar type: Resource type. 12255 :vartype type: str 12256 :ivar event_time: The time when the security event occurred. 12257 :vartype event_time: ~datetime.datetime 12258 :ivar security_event_type: The type of the security event. Possible values include: 12259 "Undefined", "SqlInjectionVulnerability", "SqlInjectionExploit". 12260 :vartype security_event_type: str or ~azure.mgmt.sql.models.SecurityEventType 12261 :ivar subscription: The subscription name. 12262 :vartype subscription: str 12263 :ivar server: The server name. 12264 :vartype server: str 12265 :ivar database: The database name. 12266 :vartype database: str 12267 :ivar client_ip: The IP address of the client who executed the statement. 12268 :vartype client_ip: str 12269 :ivar application_name: The application used to execute the statement. 12270 :vartype application_name: str 12271 :ivar principal_name: The principal user who executed the statement. 12272 :vartype principal_name: str 12273 :ivar security_event_sql_injection_additional_properties: The sql injection additional 12274 properties, populated only if the type of the security event is sql injection. 12275 :vartype security_event_sql_injection_additional_properties: 12276 ~azure.mgmt.sql.models.SecurityEventSqlInjectionAdditionalProperties 12277 """ 12278 12279 _validation = { 12280 'id': {'readonly': True}, 12281 'name': {'readonly': True}, 12282 'type': {'readonly': True}, 12283 'event_time': {'readonly': True}, 12284 'security_event_type': {'readonly': True}, 12285 'subscription': {'readonly': True}, 12286 'server': {'readonly': True}, 12287 'database': {'readonly': True}, 12288 'client_ip': {'readonly': True}, 12289 'application_name': {'readonly': True}, 12290 'principal_name': {'readonly': True}, 12291 'security_event_sql_injection_additional_properties': {'readonly': True}, 12292 } 12293 12294 _attribute_map = { 12295 'id': {'key': 'id', 'type': 'str'}, 12296 'name': {'key': 'name', 'type': 'str'}, 12297 'type': {'key': 'type', 'type': 'str'}, 12298 'event_time': {'key': 'properties.eventTime', 'type': 'iso-8601'}, 12299 'security_event_type': {'key': 'properties.securityEventType', 'type': 'str'}, 12300 'subscription': {'key': 'properties.subscription', 'type': 'str'}, 12301 'server': {'key': 'properties.server', 'type': 'str'}, 12302 'database': {'key': 'properties.database', 'type': 'str'}, 12303 'client_ip': {'key': 'properties.clientIp', 'type': 'str'}, 12304 'application_name': {'key': 'properties.applicationName', 'type': 'str'}, 12305 'principal_name': {'key': 'properties.principalName', 'type': 'str'}, 12306 'security_event_sql_injection_additional_properties': {'key': 'properties.securityEventSqlInjectionAdditionalProperties', 'type': 'SecurityEventSqlInjectionAdditionalProperties'}, 12307 } 12308 12309 def __init__( 12310 self, 12311 **kwargs 12312 ): 12313 super(SecurityEvent, self).__init__(**kwargs) 12314 self.event_time = None 12315 self.security_event_type = None 12316 self.subscription = None 12317 self.server = None 12318 self.database = None 12319 self.client_ip = None 12320 self.application_name = None 12321 self.principal_name = None 12322 self.security_event_sql_injection_additional_properties = None 12323 12324 12325class SecurityEventCollection(msrest.serialization.Model): 12326 """A list of security events. 12327 12328 Variables are only populated by the server, and will be ignored when sending a request. 12329 12330 :ivar value: Array of results. 12331 :vartype value: list[~azure.mgmt.sql.models.SecurityEvent] 12332 :ivar next_link: Link to retrieve next page of results. 12333 :vartype next_link: str 12334 """ 12335 12336 _validation = { 12337 'value': {'readonly': True}, 12338 'next_link': {'readonly': True}, 12339 } 12340 12341 _attribute_map = { 12342 'value': {'key': 'value', 'type': '[SecurityEvent]'}, 12343 'next_link': {'key': 'nextLink', 'type': 'str'}, 12344 } 12345 12346 def __init__( 12347 self, 12348 **kwargs 12349 ): 12350 super(SecurityEventCollection, self).__init__(**kwargs) 12351 self.value = None 12352 self.next_link = None 12353 12354 12355class SecurityEventsFilterParameters(msrest.serialization.Model): 12356 """The properties that are supported in the $filter operation. 12357 12358 :param event_time: Filter on the event time. 12359 :type event_time: ~datetime.datetime 12360 :param show_server_records: Whether to show server records or not. 12361 :type show_server_records: bool 12362 """ 12363 12364 _attribute_map = { 12365 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, 12366 'show_server_records': {'key': 'showServerRecords', 'type': 'bool'}, 12367 } 12368 12369 def __init__( 12370 self, 12371 *, 12372 event_time: Optional[datetime.datetime] = None, 12373 show_server_records: Optional[bool] = None, 12374 **kwargs 12375 ): 12376 super(SecurityEventsFilterParameters, self).__init__(**kwargs) 12377 self.event_time = event_time 12378 self.show_server_records = show_server_records 12379 12380 12381class SecurityEventSqlInjectionAdditionalProperties(msrest.serialization.Model): 12382 """The properties of a security event sql injection additional properties. 12383 12384 Variables are only populated by the server, and will be ignored when sending a request. 12385 12386 :ivar threat_id: The threat ID. 12387 :vartype threat_id: str 12388 :ivar statement: The statement. 12389 :vartype statement: str 12390 :ivar statement_highlight_offset: The statement highlight offset. 12391 :vartype statement_highlight_offset: int 12392 :ivar statement_highlight_length: The statement highlight length. 12393 :vartype statement_highlight_length: int 12394 :ivar error_code: The sql error code. 12395 :vartype error_code: int 12396 :ivar error_severity: The sql error severity. 12397 :vartype error_severity: int 12398 :ivar error_message: The sql error message. 12399 :vartype error_message: str 12400 """ 12401 12402 _validation = { 12403 'threat_id': {'readonly': True}, 12404 'statement': {'readonly': True}, 12405 'statement_highlight_offset': {'readonly': True}, 12406 'statement_highlight_length': {'readonly': True}, 12407 'error_code': {'readonly': True}, 12408 'error_severity': {'readonly': True}, 12409 'error_message': {'readonly': True}, 12410 } 12411 12412 _attribute_map = { 12413 'threat_id': {'key': 'threatId', 'type': 'str'}, 12414 'statement': {'key': 'statement', 'type': 'str'}, 12415 'statement_highlight_offset': {'key': 'statementHighlightOffset', 'type': 'int'}, 12416 'statement_highlight_length': {'key': 'statementHighlightLength', 'type': 'int'}, 12417 'error_code': {'key': 'errorCode', 'type': 'int'}, 12418 'error_severity': {'key': 'errorSeverity', 'type': 'int'}, 12419 'error_message': {'key': 'errorMessage', 'type': 'str'}, 12420 } 12421 12422 def __init__( 12423 self, 12424 **kwargs 12425 ): 12426 super(SecurityEventSqlInjectionAdditionalProperties, self).__init__(**kwargs) 12427 self.threat_id = None 12428 self.statement = None 12429 self.statement_highlight_offset = None 12430 self.statement_highlight_length = None 12431 self.error_code = None 12432 self.error_severity = None 12433 self.error_message = None 12434 12435 12436class SensitivityLabel(ProxyResource): 12437 """A sensitivity label. 12438 12439 Variables are only populated by the server, and will be ignored when sending a request. 12440 12441 :ivar id: Resource ID. 12442 :vartype id: str 12443 :ivar name: Resource name. 12444 :vartype name: str 12445 :ivar type: Resource type. 12446 :vartype type: str 12447 :ivar managed_by: Resource that manages the sensitivity label. 12448 :vartype managed_by: str 12449 :ivar schema_name: The schema name. 12450 :vartype schema_name: str 12451 :ivar table_name: The table name. 12452 :vartype table_name: str 12453 :ivar column_name: The column name. 12454 :vartype column_name: str 12455 :param label_name: The label name. 12456 :type label_name: str 12457 :param label_id: The label ID. 12458 :type label_id: str 12459 :param information_type: The information type. 12460 :type information_type: str 12461 :param information_type_id: The information type ID. 12462 :type information_type_id: str 12463 :ivar is_disabled: Is sensitivity recommendation disabled. Applicable for recommended 12464 sensitivity label only. Specifies whether the sensitivity recommendation on this column is 12465 disabled (dismissed) or not. 12466 :vartype is_disabled: bool 12467 :param rank: Possible values include: "None", "Low", "Medium", "High", "Critical". 12468 :type rank: str or ~azure.mgmt.sql.models.SensitivityLabelRank 12469 """ 12470 12471 _validation = { 12472 'id': {'readonly': True}, 12473 'name': {'readonly': True}, 12474 'type': {'readonly': True}, 12475 'managed_by': {'readonly': True}, 12476 'schema_name': {'readonly': True}, 12477 'table_name': {'readonly': True}, 12478 'column_name': {'readonly': True}, 12479 'is_disabled': {'readonly': True}, 12480 } 12481 12482 _attribute_map = { 12483 'id': {'key': 'id', 'type': 'str'}, 12484 'name': {'key': 'name', 'type': 'str'}, 12485 'type': {'key': 'type', 'type': 'str'}, 12486 'managed_by': {'key': 'managedBy', 'type': 'str'}, 12487 'schema_name': {'key': 'properties.schemaName', 'type': 'str'}, 12488 'table_name': {'key': 'properties.tableName', 'type': 'str'}, 12489 'column_name': {'key': 'properties.columnName', 'type': 'str'}, 12490 'label_name': {'key': 'properties.labelName', 'type': 'str'}, 12491 'label_id': {'key': 'properties.labelId', 'type': 'str'}, 12492 'information_type': {'key': 'properties.informationType', 'type': 'str'}, 12493 'information_type_id': {'key': 'properties.informationTypeId', 'type': 'str'}, 12494 'is_disabled': {'key': 'properties.isDisabled', 'type': 'bool'}, 12495 'rank': {'key': 'properties.rank', 'type': 'str'}, 12496 } 12497 12498 def __init__( 12499 self, 12500 *, 12501 label_name: Optional[str] = None, 12502 label_id: Optional[str] = None, 12503 information_type: Optional[str] = None, 12504 information_type_id: Optional[str] = None, 12505 rank: Optional[Union[str, "SensitivityLabelRank"]] = None, 12506 **kwargs 12507 ): 12508 super(SensitivityLabel, self).__init__(**kwargs) 12509 self.managed_by = None 12510 self.schema_name = None 12511 self.table_name = None 12512 self.column_name = None 12513 self.label_name = label_name 12514 self.label_id = label_id 12515 self.information_type = information_type 12516 self.information_type_id = information_type_id 12517 self.is_disabled = None 12518 self.rank = rank 12519 12520 12521class SensitivityLabelListResult(msrest.serialization.Model): 12522 """A list of sensitivity labels. 12523 12524 Variables are only populated by the server, and will be ignored when sending a request. 12525 12526 :ivar value: Array of results. 12527 :vartype value: list[~azure.mgmt.sql.models.SensitivityLabel] 12528 :ivar next_link: Link to retrieve next page of results. 12529 :vartype next_link: str 12530 """ 12531 12532 _validation = { 12533 'value': {'readonly': True}, 12534 'next_link': {'readonly': True}, 12535 } 12536 12537 _attribute_map = { 12538 'value': {'key': 'value', 'type': '[SensitivityLabel]'}, 12539 'next_link': {'key': 'nextLink', 'type': 'str'}, 12540 } 12541 12542 def __init__( 12543 self, 12544 **kwargs 12545 ): 12546 super(SensitivityLabelListResult, self).__init__(**kwargs) 12547 self.value = None 12548 self.next_link = None 12549 12550 12551class SensitivityLabelUpdate(ProxyResource): 12552 """A sensitivity label update operation. 12553 12554 Variables are only populated by the server, and will be ignored when sending a request. 12555 12556 :ivar id: Resource ID. 12557 :vartype id: str 12558 :ivar name: Resource name. 12559 :vartype name: str 12560 :ivar type: Resource type. 12561 :vartype type: str 12562 :param op: Possible values include: "set", "remove". 12563 :type op: str or ~azure.mgmt.sql.models.SensitivityLabelUpdateKind 12564 :param schema: Schema name of the column to update. 12565 :type schema: str 12566 :param table: Table name of the column to update. 12567 :type table: str 12568 :param column: Column name to update. 12569 :type column: str 12570 :param sensitivity_label: The sensitivity label information to apply on a column. 12571 :type sensitivity_label: ~azure.mgmt.sql.models.SensitivityLabel 12572 """ 12573 12574 _validation = { 12575 'id': {'readonly': True}, 12576 'name': {'readonly': True}, 12577 'type': {'readonly': True}, 12578 } 12579 12580 _attribute_map = { 12581 'id': {'key': 'id', 'type': 'str'}, 12582 'name': {'key': 'name', 'type': 'str'}, 12583 'type': {'key': 'type', 'type': 'str'}, 12584 'op': {'key': 'properties.op', 'type': 'str'}, 12585 'schema': {'key': 'properties.schema', 'type': 'str'}, 12586 'table': {'key': 'properties.table', 'type': 'str'}, 12587 'column': {'key': 'properties.column', 'type': 'str'}, 12588 'sensitivity_label': {'key': 'properties.sensitivityLabel', 'type': 'SensitivityLabel'}, 12589 } 12590 12591 def __init__( 12592 self, 12593 *, 12594 op: Optional[Union[str, "SensitivityLabelUpdateKind"]] = None, 12595 schema: Optional[str] = None, 12596 table: Optional[str] = None, 12597 column: Optional[str] = None, 12598 sensitivity_label: Optional["SensitivityLabel"] = None, 12599 **kwargs 12600 ): 12601 super(SensitivityLabelUpdate, self).__init__(**kwargs) 12602 self.op = op 12603 self.schema = schema 12604 self.table = table 12605 self.column = column 12606 self.sensitivity_label = sensitivity_label 12607 12608 12609class SensitivityLabelUpdateList(msrest.serialization.Model): 12610 """A list of sensitivity label update operations. 12611 12612 :param operations: 12613 :type operations: list[~azure.mgmt.sql.models.SensitivityLabelUpdate] 12614 """ 12615 12616 _attribute_map = { 12617 'operations': {'key': 'operations', 'type': '[SensitivityLabelUpdate]'}, 12618 } 12619 12620 def __init__( 12621 self, 12622 *, 12623 operations: Optional[List["SensitivityLabelUpdate"]] = None, 12624 **kwargs 12625 ): 12626 super(SensitivityLabelUpdateList, self).__init__(**kwargs) 12627 self.operations = operations 12628 12629 12630class Server(TrackedResource): 12631 """An Azure SQL Database server. 12632 12633 Variables are only populated by the server, and will be ignored when sending a request. 12634 12635 All required parameters must be populated in order to send to Azure. 12636 12637 :ivar id: Resource ID. 12638 :vartype id: str 12639 :ivar name: Resource name. 12640 :vartype name: str 12641 :ivar type: Resource type. 12642 :vartype type: str 12643 :param location: Required. Resource location. 12644 :type location: str 12645 :param tags: A set of tags. Resource tags. 12646 :type tags: dict[str, str] 12647 :param identity: The Azure Active Directory identity of the server. 12648 :type identity: ~azure.mgmt.sql.models.ResourceIdentity 12649 :ivar kind: Kind of sql server. This is metadata used for the Azure portal experience. 12650 :vartype kind: str 12651 :param administrator_login: Administrator username for the server. Once created it cannot be 12652 changed. 12653 :type administrator_login: str 12654 :param administrator_login_password: The administrator login password (required for server 12655 creation). 12656 :type administrator_login_password: str 12657 :param version: The version of the server. 12658 :type version: str 12659 :ivar state: The state of the server. 12660 :vartype state: str 12661 :ivar fully_qualified_domain_name: The fully qualified domain name of the server. 12662 :vartype fully_qualified_domain_name: str 12663 :ivar private_endpoint_connections: List of private endpoint connections on a server. 12664 :vartype private_endpoint_connections: 12665 list[~azure.mgmt.sql.models.ServerPrivateEndpointConnection] 12666 :param minimal_tls_version: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. 12667 :type minimal_tls_version: str 12668 :param public_network_access: Whether or not public endpoint access is allowed for this server. 12669 Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 12670 "Enabled", "Disabled". 12671 :type public_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag 12672 :ivar workspace_feature: Whether or not existing server has a workspace created and if it 12673 allows connection from workspace. Possible values include: "Connected", "Disconnected". 12674 :vartype workspace_feature: str or ~azure.mgmt.sql.models.ServerWorkspaceFeature 12675 :param primary_user_assigned_identity_id: The resource id of a user assigned identity to be 12676 used by default. 12677 :type primary_user_assigned_identity_id: str 12678 :param federated_client_id: The Client id used for cross tenant CMK scenario. 12679 :type federated_client_id: str 12680 :param key_id: A CMK URI of the key to use for encryption. 12681 :type key_id: str 12682 :param administrators: The Azure Active Directory identity of the server. 12683 :type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator 12684 :param restrict_outbound_network_access: Whether or not to restrict outbound network access for 12685 this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible 12686 values include: "Enabled", "Disabled". 12687 :type restrict_outbound_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag 12688 """ 12689 12690 _validation = { 12691 'id': {'readonly': True}, 12692 'name': {'readonly': True}, 12693 'type': {'readonly': True}, 12694 'location': {'required': True}, 12695 'kind': {'readonly': True}, 12696 'state': {'readonly': True}, 12697 'fully_qualified_domain_name': {'readonly': True}, 12698 'private_endpoint_connections': {'readonly': True}, 12699 'workspace_feature': {'readonly': True}, 12700 } 12701 12702 _attribute_map = { 12703 'id': {'key': 'id', 'type': 'str'}, 12704 'name': {'key': 'name', 'type': 'str'}, 12705 'type': {'key': 'type', 'type': 'str'}, 12706 'location': {'key': 'location', 'type': 'str'}, 12707 'tags': {'key': 'tags', 'type': '{str}'}, 12708 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 12709 'kind': {'key': 'kind', 'type': 'str'}, 12710 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, 12711 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, 12712 'version': {'key': 'properties.version', 'type': 'str'}, 12713 'state': {'key': 'properties.state', 'type': 'str'}, 12714 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, 12715 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, 12716 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, 12717 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 12718 'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'}, 12719 'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'}, 12720 'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'}, 12721 'key_id': {'key': 'properties.keyId', 'type': 'str'}, 12722 'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'}, 12723 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, 12724 } 12725 12726 def __init__( 12727 self, 12728 *, 12729 location: str, 12730 tags: Optional[Dict[str, str]] = None, 12731 identity: Optional["ResourceIdentity"] = None, 12732 administrator_login: Optional[str] = None, 12733 administrator_login_password: Optional[str] = None, 12734 version: Optional[str] = None, 12735 minimal_tls_version: Optional[str] = None, 12736 public_network_access: Optional[Union[str, "ServerNetworkAccessFlag"]] = None, 12737 primary_user_assigned_identity_id: Optional[str] = None, 12738 federated_client_id: Optional[str] = None, 12739 key_id: Optional[str] = None, 12740 administrators: Optional["ServerExternalAdministrator"] = None, 12741 restrict_outbound_network_access: Optional[Union[str, "ServerNetworkAccessFlag"]] = None, 12742 **kwargs 12743 ): 12744 super(Server, self).__init__(location=location, tags=tags, **kwargs) 12745 self.identity = identity 12746 self.kind = None 12747 self.administrator_login = administrator_login 12748 self.administrator_login_password = administrator_login_password 12749 self.version = version 12750 self.state = None 12751 self.fully_qualified_domain_name = None 12752 self.private_endpoint_connections = None 12753 self.minimal_tls_version = minimal_tls_version 12754 self.public_network_access = public_network_access 12755 self.workspace_feature = None 12756 self.primary_user_assigned_identity_id = primary_user_assigned_identity_id 12757 self.federated_client_id = federated_client_id 12758 self.key_id = key_id 12759 self.administrators = administrators 12760 self.restrict_outbound_network_access = restrict_outbound_network_access 12761 12762 12763class ServerAutomaticTuning(ProxyResource): 12764 """Server-level Automatic Tuning. 12765 12766 Variables are only populated by the server, and will be ignored when sending a request. 12767 12768 :ivar id: Resource ID. 12769 :vartype id: str 12770 :ivar name: Resource name. 12771 :vartype name: str 12772 :ivar type: Resource type. 12773 :vartype type: str 12774 :param desired_state: Automatic tuning desired state. Possible values include: "Custom", 12775 "Auto", "Unspecified". 12776 :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningServerMode 12777 :ivar actual_state: Automatic tuning actual state. Possible values include: "Custom", "Auto", 12778 "Unspecified". 12779 :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningServerMode 12780 :param options: Automatic tuning options definition. 12781 :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningServerOptions] 12782 """ 12783 12784 _validation = { 12785 'id': {'readonly': True}, 12786 'name': {'readonly': True}, 12787 'type': {'readonly': True}, 12788 'actual_state': {'readonly': True}, 12789 } 12790 12791 _attribute_map = { 12792 'id': {'key': 'id', 'type': 'str'}, 12793 'name': {'key': 'name', 'type': 'str'}, 12794 'type': {'key': 'type', 'type': 'str'}, 12795 'desired_state': {'key': 'properties.desiredState', 'type': 'str'}, 12796 'actual_state': {'key': 'properties.actualState', 'type': 'str'}, 12797 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, 12798 } 12799 12800 def __init__( 12801 self, 12802 *, 12803 desired_state: Optional[Union[str, "AutomaticTuningServerMode"]] = None, 12804 options: Optional[Dict[str, "AutomaticTuningServerOptions"]] = None, 12805 **kwargs 12806 ): 12807 super(ServerAutomaticTuning, self).__init__(**kwargs) 12808 self.desired_state = desired_state 12809 self.actual_state = None 12810 self.options = options 12811 12812 12813class ServerAzureADAdministrator(ProxyResource): 12814 """Azure Active Directory administrator. 12815 12816 Variables are only populated by the server, and will be ignored when sending a request. 12817 12818 :ivar id: Resource ID. 12819 :vartype id: str 12820 :ivar name: Resource name. 12821 :vartype name: str 12822 :ivar type: Resource type. 12823 :vartype type: str 12824 :param administrator_type: Type of the sever administrator. Possible values include: 12825 "ActiveDirectory". 12826 :type administrator_type: str or ~azure.mgmt.sql.models.AdministratorType 12827 :param login: Login name of the server administrator. 12828 :type login: str 12829 :param sid: SID (object ID) of the server administrator. 12830 :type sid: str 12831 :param tenant_id: Tenant ID of the administrator. 12832 :type tenant_id: str 12833 :ivar azure_ad_only_authentication: Azure Active Directory only Authentication enabled. 12834 :vartype azure_ad_only_authentication: bool 12835 """ 12836 12837 _validation = { 12838 'id': {'readonly': True}, 12839 'name': {'readonly': True}, 12840 'type': {'readonly': True}, 12841 'azure_ad_only_authentication': {'readonly': True}, 12842 } 12843 12844 _attribute_map = { 12845 'id': {'key': 'id', 'type': 'str'}, 12846 'name': {'key': 'name', 'type': 'str'}, 12847 'type': {'key': 'type', 'type': 'str'}, 12848 'administrator_type': {'key': 'properties.administratorType', 'type': 'str'}, 12849 'login': {'key': 'properties.login', 'type': 'str'}, 12850 'sid': {'key': 'properties.sid', 'type': 'str'}, 12851 'tenant_id': {'key': 'properties.tenantId', 'type': 'str'}, 12852 'azure_ad_only_authentication': {'key': 'properties.azureADOnlyAuthentication', 'type': 'bool'}, 12853 } 12854 12855 def __init__( 12856 self, 12857 *, 12858 administrator_type: Optional[Union[str, "AdministratorType"]] = None, 12859 login: Optional[str] = None, 12860 sid: Optional[str] = None, 12861 tenant_id: Optional[str] = None, 12862 **kwargs 12863 ): 12864 super(ServerAzureADAdministrator, self).__init__(**kwargs) 12865 self.administrator_type = administrator_type 12866 self.login = login 12867 self.sid = sid 12868 self.tenant_id = tenant_id 12869 self.azure_ad_only_authentication = None 12870 12871 12872class ServerAzureADOnlyAuthentication(ProxyResource): 12873 """Azure Active Directory only authentication. 12874 12875 Variables are only populated by the server, and will be ignored when sending a request. 12876 12877 :ivar id: Resource ID. 12878 :vartype id: str 12879 :ivar name: Resource name. 12880 :vartype name: str 12881 :ivar type: Resource type. 12882 :vartype type: str 12883 :param azure_ad_only_authentication: Azure Active Directory only Authentication enabled. 12884 :type azure_ad_only_authentication: bool 12885 """ 12886 12887 _validation = { 12888 'id': {'readonly': True}, 12889 'name': {'readonly': True}, 12890 'type': {'readonly': True}, 12891 } 12892 12893 _attribute_map = { 12894 'id': {'key': 'id', 'type': 'str'}, 12895 'name': {'key': 'name', 'type': 'str'}, 12896 'type': {'key': 'type', 'type': 'str'}, 12897 'azure_ad_only_authentication': {'key': 'properties.azureADOnlyAuthentication', 'type': 'bool'}, 12898 } 12899 12900 def __init__( 12901 self, 12902 *, 12903 azure_ad_only_authentication: Optional[bool] = None, 12904 **kwargs 12905 ): 12906 super(ServerAzureADOnlyAuthentication, self).__init__(**kwargs) 12907 self.azure_ad_only_authentication = azure_ad_only_authentication 12908 12909 12910class ServerBlobAuditingPolicy(ProxyResource): 12911 """A server blob auditing policy. 12912 12913 Variables are only populated by the server, and will be ignored when sending a request. 12914 12915 :ivar id: Resource ID. 12916 :vartype id: str 12917 :ivar name: Resource name. 12918 :vartype name: str 12919 :ivar type: Resource type. 12920 :vartype type: str 12921 :param is_devops_audit_enabled: Specifies the state of devops audit. If state is Enabled, 12922 devops logs will be sent to Azure Monitor. 12923 In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 12924 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true 12925 12926 When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' 12927 diagnostic logs category on the master database should also be created. 12928 12929 Diagnostic Settings URI format: 12930 PUT 12931 https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 12932 12933 For more information, see `Diagnostic Settings REST API 12934 <https://go.microsoft.com/fwlink/?linkid=2033207>`_ 12935 or `Diagnostic Settings PowerShell <https://go.microsoft.com/fwlink/?linkid=2033043>`_. 12936 :type is_devops_audit_enabled: bool 12937 :param retention_days: Specifies the number of days to keep in the audit logs in the storage 12938 account. 12939 :type retention_days: int 12940 :param audit_actions_and_groups: Specifies the Actions-Groups and Actions to audit. 12941 12942 The recommended set of action groups to use is the following combination - this will audit all 12943 the queries and stored procedures executed against the database, as well as successful and 12944 failed logins: 12945 12946 BATCH_COMPLETED_GROUP, 12947 SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, 12948 FAILED_DATABASE_AUTHENTICATION_GROUP. 12949 12950 This above combination is also the set that is configured by default when enabling auditing 12951 from the Azure portal. 12952 12953 The supported action groups to audit are (note: choose only specific groups that cover your 12954 auditing needs. Using unnecessary groups could lead to very large quantities of audit records): 12955 12956 APPLICATION_ROLE_CHANGE_PASSWORD_GROUP 12957 BACKUP_RESTORE_GROUP 12958 DATABASE_LOGOUT_GROUP 12959 DATABASE_OBJECT_CHANGE_GROUP 12960 DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP 12961 DATABASE_OBJECT_PERMISSION_CHANGE_GROUP 12962 DATABASE_OPERATION_GROUP 12963 DATABASE_PERMISSION_CHANGE_GROUP 12964 DATABASE_PRINCIPAL_CHANGE_GROUP 12965 DATABASE_PRINCIPAL_IMPERSONATION_GROUP 12966 DATABASE_ROLE_MEMBER_CHANGE_GROUP 12967 FAILED_DATABASE_AUTHENTICATION_GROUP 12968 SCHEMA_OBJECT_ACCESS_GROUP 12969 SCHEMA_OBJECT_CHANGE_GROUP 12970 SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP 12971 SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP 12972 SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP 12973 USER_CHANGE_PASSWORD_GROUP 12974 BATCH_STARTED_GROUP 12975 BATCH_COMPLETED_GROUP 12976 12977 These are groups that cover all sql statements and stored procedures executed against the 12978 database, and should not be used in combination with other groups as this will result in 12979 duplicate audit logs. 12980 12981 For more information, see `Database-Level Audit Action Groups 12982 <https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups>`_. 12983 12984 For Database auditing policy, specific Actions can also be specified (note that Actions cannot 12985 be specified for Server auditing policy). The supported actions to audit are: 12986 SELECT 12987 UPDATE 12988 INSERT 12989 DELETE 12990 EXECUTE 12991 RECEIVE 12992 REFERENCES 12993 12994 The general form for defining an action to be audited is: 12995 {action} ON {object} BY {principal} 12996 12997 Note that :code:`<object>` in the above format can refer to an object like a table, view, or 12998 stored procedure, or an entire database or schema. For the latter cases, the forms 12999 DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. 13000 13001 For example: 13002 SELECT on dbo.myTable by public 13003 SELECT on DATABASE::myDatabase by public 13004 SELECT on SCHEMA::mySchema by public 13005 13006 For more information, see `Database-Level Audit Actions 13007 <https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions>`_. 13008 :type audit_actions_and_groups: list[str] 13009 :param is_storage_secondary_key_in_use: Specifies whether storageAccountAccessKey value is the 13010 storage's secondary key. 13011 :type is_storage_secondary_key_in_use: bool 13012 :param is_azure_monitor_target_enabled: Specifies whether audit events are sent to Azure 13013 Monitor. 13014 In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 13015 'IsAzureMonitorTargetEnabled' as true. 13016 13017 When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' 13018 diagnostic logs category on the database should be also created. 13019 Note that for server level audit you should use the 'master' database as {databaseName}. 13020 13021 Diagnostic Settings URI format: 13022 PUT 13023 https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 13024 13025 For more information, see `Diagnostic Settings REST API 13026 <https://go.microsoft.com/fwlink/?linkid=2033207>`_ 13027 or `Diagnostic Settings PowerShell <https://go.microsoft.com/fwlink/?linkid=2033043>`_. 13028 :type is_azure_monitor_target_enabled: bool 13029 :param queue_delay_ms: Specifies the amount of time in milliseconds that can elapse before 13030 audit actions are forced to be processed. 13031 The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. 13032 :type queue_delay_ms: int 13033 :param state: Specifies the state of the audit. If state is Enabled, storageEndpoint or 13034 isAzureMonitorTargetEnabled are required. Possible values include: "Enabled", "Disabled". 13035 :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState 13036 :param storage_endpoint: Specifies the blob storage endpoint (e.g. 13037 https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or 13038 isAzureMonitorTargetEnabled is required. 13039 :type storage_endpoint: str 13040 :param storage_account_access_key: Specifies the identifier key of the auditing storage 13041 account. 13042 If state is Enabled and storageEndpoint is specified, not specifying the 13043 storageAccountAccessKey will use SQL server system-assigned managed identity to access the 13044 storage. 13045 Prerequisites for using managed identity authentication: 13046 13047 13048 #. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 13049 #. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data 13050 Contributor' RBAC role to the server identity. 13051 For more information, see `Auditing to storage using Managed Identity authentication 13052 <https://go.microsoft.com/fwlink/?linkid=2114355>`_. 13053 :type storage_account_access_key: str 13054 :param storage_account_subscription_id: Specifies the blob storage subscription Id. 13055 :type storage_account_subscription_id: str 13056 """ 13057 13058 _validation = { 13059 'id': {'readonly': True}, 13060 'name': {'readonly': True}, 13061 'type': {'readonly': True}, 13062 } 13063 13064 _attribute_map = { 13065 'id': {'key': 'id', 'type': 'str'}, 13066 'name': {'key': 'name', 'type': 'str'}, 13067 'type': {'key': 'type', 'type': 'str'}, 13068 'is_devops_audit_enabled': {'key': 'properties.isDevopsAuditEnabled', 'type': 'bool'}, 13069 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 13070 'audit_actions_and_groups': {'key': 'properties.auditActionsAndGroups', 'type': '[str]'}, 13071 'is_storage_secondary_key_in_use': {'key': 'properties.isStorageSecondaryKeyInUse', 'type': 'bool'}, 13072 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, 13073 'queue_delay_ms': {'key': 'properties.queueDelayMs', 'type': 'int'}, 13074 'state': {'key': 'properties.state', 'type': 'str'}, 13075 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, 13076 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 13077 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 13078 } 13079 13080 def __init__( 13081 self, 13082 *, 13083 is_devops_audit_enabled: Optional[bool] = None, 13084 retention_days: Optional[int] = None, 13085 audit_actions_and_groups: Optional[List[str]] = None, 13086 is_storage_secondary_key_in_use: Optional[bool] = None, 13087 is_azure_monitor_target_enabled: Optional[bool] = None, 13088 queue_delay_ms: Optional[int] = None, 13089 state: Optional[Union[str, "BlobAuditingPolicyState"]] = None, 13090 storage_endpoint: Optional[str] = None, 13091 storage_account_access_key: Optional[str] = None, 13092 storage_account_subscription_id: Optional[str] = None, 13093 **kwargs 13094 ): 13095 super(ServerBlobAuditingPolicy, self).__init__(**kwargs) 13096 self.is_devops_audit_enabled = is_devops_audit_enabled 13097 self.retention_days = retention_days 13098 self.audit_actions_and_groups = audit_actions_and_groups 13099 self.is_storage_secondary_key_in_use = is_storage_secondary_key_in_use 13100 self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled 13101 self.queue_delay_ms = queue_delay_ms 13102 self.state = state 13103 self.storage_endpoint = storage_endpoint 13104 self.storage_account_access_key = storage_account_access_key 13105 self.storage_account_subscription_id = storage_account_subscription_id 13106 13107 13108class ServerBlobAuditingPolicyListResult(msrest.serialization.Model): 13109 """A list of server auditing settings. 13110 13111 Variables are only populated by the server, and will be ignored when sending a request. 13112 13113 :ivar value: Array of results. 13114 :vartype value: list[~azure.mgmt.sql.models.ServerBlobAuditingPolicy] 13115 :ivar next_link: Link to retrieve next page of results. 13116 :vartype next_link: str 13117 """ 13118 13119 _validation = { 13120 'value': {'readonly': True}, 13121 'next_link': {'readonly': True}, 13122 } 13123 13124 _attribute_map = { 13125 'value': {'key': 'value', 'type': '[ServerBlobAuditingPolicy]'}, 13126 'next_link': {'key': 'nextLink', 'type': 'str'}, 13127 } 13128 13129 def __init__( 13130 self, 13131 **kwargs 13132 ): 13133 super(ServerBlobAuditingPolicyListResult, self).__init__(**kwargs) 13134 self.value = None 13135 self.next_link = None 13136 13137 13138class ServerCommunicationLink(ProxyResource): 13139 """Server communication link. 13140 13141 Variables are only populated by the server, and will be ignored when sending a request. 13142 13143 :ivar id: Resource ID. 13144 :vartype id: str 13145 :ivar name: Resource name. 13146 :vartype name: str 13147 :ivar type: Resource type. 13148 :vartype type: str 13149 :ivar location: Communication link location. 13150 :vartype location: str 13151 :ivar kind: Communication link kind. This property is used for Azure Portal metadata. 13152 :vartype kind: str 13153 :ivar state: The state. 13154 :vartype state: str 13155 :param partner_server: The name of the partner server. 13156 :type partner_server: str 13157 """ 13158 13159 _validation = { 13160 'id': {'readonly': True}, 13161 'name': {'readonly': True}, 13162 'type': {'readonly': True}, 13163 'location': {'readonly': True}, 13164 'kind': {'readonly': True}, 13165 'state': {'readonly': True}, 13166 } 13167 13168 _attribute_map = { 13169 'id': {'key': 'id', 'type': 'str'}, 13170 'name': {'key': 'name', 'type': 'str'}, 13171 'type': {'key': 'type', 'type': 'str'}, 13172 'location': {'key': 'location', 'type': 'str'}, 13173 'kind': {'key': 'kind', 'type': 'str'}, 13174 'state': {'key': 'properties.state', 'type': 'str'}, 13175 'partner_server': {'key': 'properties.partnerServer', 'type': 'str'}, 13176 } 13177 13178 def __init__( 13179 self, 13180 *, 13181 partner_server: Optional[str] = None, 13182 **kwargs 13183 ): 13184 super(ServerCommunicationLink, self).__init__(**kwargs) 13185 self.location = None 13186 self.kind = None 13187 self.state = None 13188 self.partner_server = partner_server 13189 13190 13191class ServerCommunicationLinkListResult(msrest.serialization.Model): 13192 """A list of server communication links. 13193 13194 :param value: The list of server communication links. 13195 :type value: list[~azure.mgmt.sql.models.ServerCommunicationLink] 13196 """ 13197 13198 _attribute_map = { 13199 'value': {'key': 'value', 'type': '[ServerCommunicationLink]'}, 13200 } 13201 13202 def __init__( 13203 self, 13204 *, 13205 value: Optional[List["ServerCommunicationLink"]] = None, 13206 **kwargs 13207 ): 13208 super(ServerCommunicationLinkListResult, self).__init__(**kwargs) 13209 self.value = value 13210 13211 13212class ServerConnectionPolicy(ProxyResource): 13213 """A server secure connection policy. 13214 13215 Variables are only populated by the server, and will be ignored when sending a request. 13216 13217 :ivar id: Resource ID. 13218 :vartype id: str 13219 :ivar name: Resource name. 13220 :vartype name: str 13221 :ivar type: Resource type. 13222 :vartype type: str 13223 :ivar kind: Metadata used for the Azure portal experience. 13224 :vartype kind: str 13225 :ivar location: Resource location. 13226 :vartype location: str 13227 :param connection_type: The server connection type. Possible values include: "Default", 13228 "Proxy", "Redirect". 13229 :type connection_type: str or ~azure.mgmt.sql.models.ServerConnectionType 13230 """ 13231 13232 _validation = { 13233 'id': {'readonly': True}, 13234 'name': {'readonly': True}, 13235 'type': {'readonly': True}, 13236 'kind': {'readonly': True}, 13237 'location': {'readonly': True}, 13238 } 13239 13240 _attribute_map = { 13241 'id': {'key': 'id', 'type': 'str'}, 13242 'name': {'key': 'name', 'type': 'str'}, 13243 'type': {'key': 'type', 'type': 'str'}, 13244 'kind': {'key': 'kind', 'type': 'str'}, 13245 'location': {'key': 'location', 'type': 'str'}, 13246 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, 13247 } 13248 13249 def __init__( 13250 self, 13251 *, 13252 connection_type: Optional[Union[str, "ServerConnectionType"]] = None, 13253 **kwargs 13254 ): 13255 super(ServerConnectionPolicy, self).__init__(**kwargs) 13256 self.kind = None 13257 self.location = None 13258 self.connection_type = connection_type 13259 13260 13261class ServerDevOpsAuditingSettings(ProxyResource): 13262 """A server DevOps auditing settings. 13263 13264 Variables are only populated by the server, and will be ignored when sending a request. 13265 13266 :ivar id: Resource ID. 13267 :vartype id: str 13268 :ivar name: Resource name. 13269 :vartype name: str 13270 :ivar type: Resource type. 13271 :vartype type: str 13272 :ivar system_data: SystemData of ServerDevOpsAuditSettingsResource. 13273 :vartype system_data: ~azure.mgmt.sql.models.SystemData 13274 :param is_azure_monitor_target_enabled: Specifies whether DevOps audit events are sent to Azure 13275 Monitor. 13276 In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 13277 'IsAzureMonitorTargetEnabled' as true. 13278 13279 When using REST API to configure DevOps audit, Diagnostic Settings with 13280 'DevOpsOperationsAudit' diagnostic logs category on the master database should be also created. 13281 13282 Diagnostic Settings URI format: 13283 PUT 13284 https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview 13285 13286 For more information, see `Diagnostic Settings REST API 13287 <https://go.microsoft.com/fwlink/?linkid=2033207>`_ 13288 or `Diagnostic Settings PowerShell <https://go.microsoft.com/fwlink/?linkid=2033043>`_. 13289 :type is_azure_monitor_target_enabled: bool 13290 :param state: Specifies the state of the audit. If state is Enabled, storageEndpoint or 13291 isAzureMonitorTargetEnabled are required. Possible values include: "Enabled", "Disabled". 13292 :type state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState 13293 :param storage_endpoint: Specifies the blob storage endpoint (e.g. 13294 https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or 13295 isAzureMonitorTargetEnabled is required. 13296 :type storage_endpoint: str 13297 :param storage_account_access_key: Specifies the identifier key of the auditing storage 13298 account. 13299 If state is Enabled and storageEndpoint is specified, not specifying the 13300 storageAccountAccessKey will use SQL server system-assigned managed identity to access the 13301 storage. 13302 Prerequisites for using managed identity authentication: 13303 13304 13305 #. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). 13306 #. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data 13307 Contributor' RBAC role to the server identity. 13308 For more information, see `Auditing to storage using Managed Identity authentication 13309 <https://go.microsoft.com/fwlink/?linkid=2114355>`_. 13310 :type storage_account_access_key: str 13311 :param storage_account_subscription_id: Specifies the blob storage subscription Id. 13312 :type storage_account_subscription_id: str 13313 """ 13314 13315 _validation = { 13316 'id': {'readonly': True}, 13317 'name': {'readonly': True}, 13318 'type': {'readonly': True}, 13319 'system_data': {'readonly': True}, 13320 } 13321 13322 _attribute_map = { 13323 'id': {'key': 'id', 'type': 'str'}, 13324 'name': {'key': 'name', 'type': 'str'}, 13325 'type': {'key': 'type', 'type': 'str'}, 13326 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 13327 'is_azure_monitor_target_enabled': {'key': 'properties.isAzureMonitorTargetEnabled', 'type': 'bool'}, 13328 'state': {'key': 'properties.state', 'type': 'str'}, 13329 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, 13330 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 13331 'storage_account_subscription_id': {'key': 'properties.storageAccountSubscriptionId', 'type': 'str'}, 13332 } 13333 13334 def __init__( 13335 self, 13336 *, 13337 is_azure_monitor_target_enabled: Optional[bool] = None, 13338 state: Optional[Union[str, "BlobAuditingPolicyState"]] = None, 13339 storage_endpoint: Optional[str] = None, 13340 storage_account_access_key: Optional[str] = None, 13341 storage_account_subscription_id: Optional[str] = None, 13342 **kwargs 13343 ): 13344 super(ServerDevOpsAuditingSettings, self).__init__(**kwargs) 13345 self.system_data = None 13346 self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled 13347 self.state = state 13348 self.storage_endpoint = storage_endpoint 13349 self.storage_account_access_key = storage_account_access_key 13350 self.storage_account_subscription_id = storage_account_subscription_id 13351 13352 13353class ServerDevOpsAuditSettingsListResult(msrest.serialization.Model): 13354 """A list of server DevOps audit settings. 13355 13356 Variables are only populated by the server, and will be ignored when sending a request. 13357 13358 :ivar value: Array of results. 13359 :vartype value: list[~azure.mgmt.sql.models.ServerDevOpsAuditingSettings] 13360 :ivar next_link: Link to retrieve next page of results. 13361 :vartype next_link: str 13362 """ 13363 13364 _validation = { 13365 'value': {'readonly': True}, 13366 'next_link': {'readonly': True}, 13367 } 13368 13369 _attribute_map = { 13370 'value': {'key': 'value', 'type': '[ServerDevOpsAuditingSettings]'}, 13371 'next_link': {'key': 'nextLink', 'type': 'str'}, 13372 } 13373 13374 def __init__( 13375 self, 13376 **kwargs 13377 ): 13378 super(ServerDevOpsAuditSettingsListResult, self).__init__(**kwargs) 13379 self.value = None 13380 self.next_link = None 13381 13382 13383class ServerDnsAlias(ProxyResource): 13384 """A server DNS alias. 13385 13386 Variables are only populated by the server, and will be ignored when sending a request. 13387 13388 :ivar id: Resource ID. 13389 :vartype id: str 13390 :ivar name: Resource name. 13391 :vartype name: str 13392 :ivar type: Resource type. 13393 :vartype type: str 13394 :ivar azure_dns_record: The fully qualified DNS record for alias. 13395 :vartype azure_dns_record: str 13396 """ 13397 13398 _validation = { 13399 'id': {'readonly': True}, 13400 'name': {'readonly': True}, 13401 'type': {'readonly': True}, 13402 'azure_dns_record': {'readonly': True}, 13403 } 13404 13405 _attribute_map = { 13406 'id': {'key': 'id', 'type': 'str'}, 13407 'name': {'key': 'name', 'type': 'str'}, 13408 'type': {'key': 'type', 'type': 'str'}, 13409 'azure_dns_record': {'key': 'properties.azureDnsRecord', 'type': 'str'}, 13410 } 13411 13412 def __init__( 13413 self, 13414 **kwargs 13415 ): 13416 super(ServerDnsAlias, self).__init__(**kwargs) 13417 self.azure_dns_record = None 13418 13419 13420class ServerDnsAliasAcquisition(msrest.serialization.Model): 13421 """A server dns alias acquisition request. 13422 13423 All required parameters must be populated in order to send to Azure. 13424 13425 :param old_server_dns_alias_id: Required. The id of the server alias that will be acquired to 13426 point to this server instead. 13427 :type old_server_dns_alias_id: str 13428 """ 13429 13430 _validation = { 13431 'old_server_dns_alias_id': {'required': True}, 13432 } 13433 13434 _attribute_map = { 13435 'old_server_dns_alias_id': {'key': 'oldServerDnsAliasId', 'type': 'str'}, 13436 } 13437 13438 def __init__( 13439 self, 13440 *, 13441 old_server_dns_alias_id: str, 13442 **kwargs 13443 ): 13444 super(ServerDnsAliasAcquisition, self).__init__(**kwargs) 13445 self.old_server_dns_alias_id = old_server_dns_alias_id 13446 13447 13448class ServerDnsAliasListResult(msrest.serialization.Model): 13449 """A list of server DNS aliases. 13450 13451 Variables are only populated by the server, and will be ignored when sending a request. 13452 13453 :ivar value: Array of results. 13454 :vartype value: list[~azure.mgmt.sql.models.ServerDnsAlias] 13455 :ivar next_link: Link to retrieve next page of results. 13456 :vartype next_link: str 13457 """ 13458 13459 _validation = { 13460 'value': {'readonly': True}, 13461 'next_link': {'readonly': True}, 13462 } 13463 13464 _attribute_map = { 13465 'value': {'key': 'value', 'type': '[ServerDnsAlias]'}, 13466 'next_link': {'key': 'nextLink', 'type': 'str'}, 13467 } 13468 13469 def __init__( 13470 self, 13471 **kwargs 13472 ): 13473 super(ServerDnsAliasListResult, self).__init__(**kwargs) 13474 self.value = None 13475 self.next_link = None 13476 13477 13478class ServerExternalAdministrator(msrest.serialization.Model): 13479 """Properties of a active directory administrator. 13480 13481 :param administrator_type: Type of the sever administrator. Possible values include: 13482 "ActiveDirectory". 13483 :type administrator_type: str or ~azure.mgmt.sql.models.AdministratorType 13484 :param principal_type: Principal Type of the sever administrator. Possible values include: 13485 "User", "Group", "Application". 13486 :type principal_type: str or ~azure.mgmt.sql.models.PrincipalType 13487 :param login: Login name of the server administrator. 13488 :type login: str 13489 :param sid: SID (object ID) of the server administrator. 13490 :type sid: str 13491 :param tenant_id: Tenant ID of the administrator. 13492 :type tenant_id: str 13493 :param azure_ad_only_authentication: Azure Active Directory only Authentication enabled. 13494 :type azure_ad_only_authentication: bool 13495 """ 13496 13497 _attribute_map = { 13498 'administrator_type': {'key': 'administratorType', 'type': 'str'}, 13499 'principal_type': {'key': 'principalType', 'type': 'str'}, 13500 'login': {'key': 'login', 'type': 'str'}, 13501 'sid': {'key': 'sid', 'type': 'str'}, 13502 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 13503 'azure_ad_only_authentication': {'key': 'azureADOnlyAuthentication', 'type': 'bool'}, 13504 } 13505 13506 def __init__( 13507 self, 13508 *, 13509 administrator_type: Optional[Union[str, "AdministratorType"]] = None, 13510 principal_type: Optional[Union[str, "PrincipalType"]] = None, 13511 login: Optional[str] = None, 13512 sid: Optional[str] = None, 13513 tenant_id: Optional[str] = None, 13514 azure_ad_only_authentication: Optional[bool] = None, 13515 **kwargs 13516 ): 13517 super(ServerExternalAdministrator, self).__init__(**kwargs) 13518 self.administrator_type = administrator_type 13519 self.principal_type = principal_type 13520 self.login = login 13521 self.sid = sid 13522 self.tenant_id = tenant_id 13523 self.azure_ad_only_authentication = azure_ad_only_authentication 13524 13525 13526class ServerInfo(msrest.serialization.Model): 13527 """Server info for the server trust group. 13528 13529 All required parameters must be populated in order to send to Azure. 13530 13531 :param server_id: Required. Server Id. 13532 :type server_id: str 13533 """ 13534 13535 _validation = { 13536 'server_id': {'required': True}, 13537 } 13538 13539 _attribute_map = { 13540 'server_id': {'key': 'serverId', 'type': 'str'}, 13541 } 13542 13543 def __init__( 13544 self, 13545 *, 13546 server_id: str, 13547 **kwargs 13548 ): 13549 super(ServerInfo, self).__init__(**kwargs) 13550 self.server_id = server_id 13551 13552 13553class ServerKey(ProxyResource): 13554 """A server key. 13555 13556 Variables are only populated by the server, and will be ignored when sending a request. 13557 13558 :ivar id: Resource ID. 13559 :vartype id: str 13560 :ivar name: Resource name. 13561 :vartype name: str 13562 :ivar type: Resource type. 13563 :vartype type: str 13564 :ivar kind: Kind of encryption protector. This is metadata used for the Azure portal 13565 experience. 13566 :vartype kind: str 13567 :ivar location: Resource location. 13568 :vartype location: str 13569 :ivar subregion: Subregion of the server key. 13570 :vartype subregion: str 13571 :param server_key_type: The server key type like 'ServiceManaged', 'AzureKeyVault'. Possible 13572 values include: "ServiceManaged", "AzureKeyVault". 13573 :type server_key_type: str or ~azure.mgmt.sql.models.ServerKeyType 13574 :param uri: The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is 13575 required. 13576 :type uri: str 13577 :ivar thumbprint: Thumbprint of the server key. 13578 :vartype thumbprint: str 13579 :ivar creation_date: The server key creation date. 13580 :vartype creation_date: ~datetime.datetime 13581 :ivar auto_rotation_enabled: Key auto rotation opt-in flag. Either true or false. 13582 :vartype auto_rotation_enabled: bool 13583 """ 13584 13585 _validation = { 13586 'id': {'readonly': True}, 13587 'name': {'readonly': True}, 13588 'type': {'readonly': True}, 13589 'kind': {'readonly': True}, 13590 'location': {'readonly': True}, 13591 'subregion': {'readonly': True}, 13592 'thumbprint': {'readonly': True}, 13593 'creation_date': {'readonly': True}, 13594 'auto_rotation_enabled': {'readonly': True}, 13595 } 13596 13597 _attribute_map = { 13598 'id': {'key': 'id', 'type': 'str'}, 13599 'name': {'key': 'name', 'type': 'str'}, 13600 'type': {'key': 'type', 'type': 'str'}, 13601 'kind': {'key': 'kind', 'type': 'str'}, 13602 'location': {'key': 'location', 'type': 'str'}, 13603 'subregion': {'key': 'properties.subregion', 'type': 'str'}, 13604 'server_key_type': {'key': 'properties.serverKeyType', 'type': 'str'}, 13605 'uri': {'key': 'properties.uri', 'type': 'str'}, 13606 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, 13607 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, 13608 'auto_rotation_enabled': {'key': 'properties.autoRotationEnabled', 'type': 'bool'}, 13609 } 13610 13611 def __init__( 13612 self, 13613 *, 13614 server_key_type: Optional[Union[str, "ServerKeyType"]] = None, 13615 uri: Optional[str] = None, 13616 **kwargs 13617 ): 13618 super(ServerKey, self).__init__(**kwargs) 13619 self.kind = None 13620 self.location = None 13621 self.subregion = None 13622 self.server_key_type = server_key_type 13623 self.uri = uri 13624 self.thumbprint = None 13625 self.creation_date = None 13626 self.auto_rotation_enabled = None 13627 13628 13629class ServerKeyListResult(msrest.serialization.Model): 13630 """A list of server keys. 13631 13632 Variables are only populated by the server, and will be ignored when sending a request. 13633 13634 :ivar value: Array of results. 13635 :vartype value: list[~azure.mgmt.sql.models.ServerKey] 13636 :ivar next_link: Link to retrieve next page of results. 13637 :vartype next_link: str 13638 """ 13639 13640 _validation = { 13641 'value': {'readonly': True}, 13642 'next_link': {'readonly': True}, 13643 } 13644 13645 _attribute_map = { 13646 'value': {'key': 'value', 'type': '[ServerKey]'}, 13647 'next_link': {'key': 'nextLink', 'type': 'str'}, 13648 } 13649 13650 def __init__( 13651 self, 13652 **kwargs 13653 ): 13654 super(ServerKeyListResult, self).__init__(**kwargs) 13655 self.value = None 13656 self.next_link = None 13657 13658 13659class ServerListResult(msrest.serialization.Model): 13660 """A list of servers. 13661 13662 Variables are only populated by the server, and will be ignored when sending a request. 13663 13664 :ivar value: Array of results. 13665 :vartype value: list[~azure.mgmt.sql.models.Server] 13666 :ivar next_link: Link to retrieve next page of results. 13667 :vartype next_link: str 13668 """ 13669 13670 _validation = { 13671 'value': {'readonly': True}, 13672 'next_link': {'readonly': True}, 13673 } 13674 13675 _attribute_map = { 13676 'value': {'key': 'value', 'type': '[Server]'}, 13677 'next_link': {'key': 'nextLink', 'type': 'str'}, 13678 } 13679 13680 def __init__( 13681 self, 13682 **kwargs 13683 ): 13684 super(ServerListResult, self).__init__(**kwargs) 13685 self.value = None 13686 self.next_link = None 13687 13688 13689class ServerOperation(ProxyResource): 13690 """A server operation. 13691 13692 Variables are only populated by the server, and will be ignored when sending a request. 13693 13694 :ivar id: Resource ID. 13695 :vartype id: str 13696 :ivar name: Resource name. 13697 :vartype name: str 13698 :ivar type: Resource type. 13699 :vartype type: str 13700 :ivar operation: The name of operation. 13701 :vartype operation: str 13702 :ivar operation_friendly_name: The friendly name of operation. 13703 :vartype operation_friendly_name: str 13704 :ivar percent_complete: The percentage of the operation completed. 13705 :vartype percent_complete: int 13706 :ivar server_name: The name of the server. 13707 :vartype server_name: str 13708 :ivar start_time: The operation start time. 13709 :vartype start_time: ~datetime.datetime 13710 :ivar state: The operation state. Possible values include: "Pending", "InProgress", 13711 "Succeeded", "Failed", "CancelInProgress", "Cancelled". 13712 :vartype state: str or ~azure.mgmt.sql.models.ManagementOperationState 13713 :ivar error_code: The operation error code. 13714 :vartype error_code: int 13715 :ivar error_description: The operation error description. 13716 :vartype error_description: str 13717 :ivar error_severity: The operation error severity. 13718 :vartype error_severity: int 13719 :ivar is_user_error: Whether or not the error is a user error. 13720 :vartype is_user_error: bool 13721 :ivar estimated_completion_time: The estimated completion time of the operation. 13722 :vartype estimated_completion_time: ~datetime.datetime 13723 :ivar description: The operation description. 13724 :vartype description: str 13725 :ivar is_cancellable: Whether the operation can be cancelled. 13726 :vartype is_cancellable: bool 13727 """ 13728 13729 _validation = { 13730 'id': {'readonly': True}, 13731 'name': {'readonly': True}, 13732 'type': {'readonly': True}, 13733 'operation': {'readonly': True}, 13734 'operation_friendly_name': {'readonly': True}, 13735 'percent_complete': {'readonly': True}, 13736 'server_name': {'readonly': True}, 13737 'start_time': {'readonly': True}, 13738 'state': {'readonly': True}, 13739 'error_code': {'readonly': True}, 13740 'error_description': {'readonly': True}, 13741 'error_severity': {'readonly': True}, 13742 'is_user_error': {'readonly': True}, 13743 'estimated_completion_time': {'readonly': True}, 13744 'description': {'readonly': True}, 13745 'is_cancellable': {'readonly': True}, 13746 } 13747 13748 _attribute_map = { 13749 'id': {'key': 'id', 'type': 'str'}, 13750 'name': {'key': 'name', 'type': 'str'}, 13751 'type': {'key': 'type', 'type': 'str'}, 13752 'operation': {'key': 'properties.operation', 'type': 'str'}, 13753 'operation_friendly_name': {'key': 'properties.operationFriendlyName', 'type': 'str'}, 13754 'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'}, 13755 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 13756 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 13757 'state': {'key': 'properties.state', 'type': 'str'}, 13758 'error_code': {'key': 'properties.errorCode', 'type': 'int'}, 13759 'error_description': {'key': 'properties.errorDescription', 'type': 'str'}, 13760 'error_severity': {'key': 'properties.errorSeverity', 'type': 'int'}, 13761 'is_user_error': {'key': 'properties.isUserError', 'type': 'bool'}, 13762 'estimated_completion_time': {'key': 'properties.estimatedCompletionTime', 'type': 'iso-8601'}, 13763 'description': {'key': 'properties.description', 'type': 'str'}, 13764 'is_cancellable': {'key': 'properties.isCancellable', 'type': 'bool'}, 13765 } 13766 13767 def __init__( 13768 self, 13769 **kwargs 13770 ): 13771 super(ServerOperation, self).__init__(**kwargs) 13772 self.operation = None 13773 self.operation_friendly_name = None 13774 self.percent_complete = None 13775 self.server_name = None 13776 self.start_time = None 13777 self.state = None 13778 self.error_code = None 13779 self.error_description = None 13780 self.error_severity = None 13781 self.is_user_error = None 13782 self.estimated_completion_time = None 13783 self.description = None 13784 self.is_cancellable = None 13785 13786 13787class ServerOperationListResult(msrest.serialization.Model): 13788 """The response to a list server operations request. 13789 13790 Variables are only populated by the server, and will be ignored when sending a request. 13791 13792 :ivar value: Array of results. 13793 :vartype value: list[~azure.mgmt.sql.models.ServerOperation] 13794 :ivar next_link: Link to retrieve next page of results. 13795 :vartype next_link: str 13796 """ 13797 13798 _validation = { 13799 'value': {'readonly': True}, 13800 'next_link': {'readonly': True}, 13801 } 13802 13803 _attribute_map = { 13804 'value': {'key': 'value', 'type': '[ServerOperation]'}, 13805 'next_link': {'key': 'nextLink', 'type': 'str'}, 13806 } 13807 13808 def __init__( 13809 self, 13810 **kwargs 13811 ): 13812 super(ServerOperationListResult, self).__init__(**kwargs) 13813 self.value = None 13814 self.next_link = None 13815 13816 13817class ServerPrivateEndpointConnection(msrest.serialization.Model): 13818 """A private endpoint connection under a server. 13819 13820 Variables are only populated by the server, and will be ignored when sending a request. 13821 13822 :ivar id: Resource ID. 13823 :vartype id: str 13824 :ivar properties: Private endpoint connection properties. 13825 :vartype properties: ~azure.mgmt.sql.models.PrivateEndpointConnectionProperties 13826 """ 13827 13828 _validation = { 13829 'id': {'readonly': True}, 13830 'properties': {'readonly': True}, 13831 } 13832 13833 _attribute_map = { 13834 'id': {'key': 'id', 'type': 'str'}, 13835 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, 13836 } 13837 13838 def __init__( 13839 self, 13840 **kwargs 13841 ): 13842 super(ServerPrivateEndpointConnection, self).__init__(**kwargs) 13843 self.id = None 13844 self.properties = None 13845 13846 13847class ServerSecurityAlertPolicy(ProxyResource): 13848 """A server security alert policy. 13849 13850 Variables are only populated by the server, and will be ignored when sending a request. 13851 13852 :ivar id: Resource ID. 13853 :vartype id: str 13854 :ivar name: Resource name. 13855 :vartype name: str 13856 :ivar type: Resource type. 13857 :vartype type: str 13858 :ivar system_data: SystemData of SecurityAlertPolicyResource. 13859 :vartype system_data: ~azure.mgmt.sql.models.SystemData 13860 :param state: Specifies the state of the policy, whether it is enabled or disabled or a policy 13861 has not been applied yet on the specific database. Possible values include: "Enabled", 13862 "Disabled". 13863 :type state: str or ~azure.mgmt.sql.models.SecurityAlertsPolicyState 13864 :param disabled_alerts: Specifies an array of alerts that are disabled. Allowed values are: 13865 Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, 13866 Brute_Force. 13867 :type disabled_alerts: list[str] 13868 :param email_addresses: Specifies an array of e-mail addresses to which the alert is sent. 13869 :type email_addresses: list[str] 13870 :param email_account_admins: Specifies that the alert is sent to the account administrators. 13871 :type email_account_admins: bool 13872 :param storage_endpoint: Specifies the blob storage endpoint (e.g. 13873 https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection 13874 audit logs. 13875 :type storage_endpoint: str 13876 :param storage_account_access_key: Specifies the identifier key of the Threat Detection audit 13877 storage account. 13878 :type storage_account_access_key: str 13879 :param retention_days: Specifies the number of days to keep in the Threat Detection audit logs. 13880 :type retention_days: int 13881 :ivar creation_time: Specifies the UTC creation time of the policy. 13882 :vartype creation_time: ~datetime.datetime 13883 """ 13884 13885 _validation = { 13886 'id': {'readonly': True}, 13887 'name': {'readonly': True}, 13888 'type': {'readonly': True}, 13889 'system_data': {'readonly': True}, 13890 'creation_time': {'readonly': True}, 13891 } 13892 13893 _attribute_map = { 13894 'id': {'key': 'id', 'type': 'str'}, 13895 'name': {'key': 'name', 'type': 'str'}, 13896 'type': {'key': 'type', 'type': 'str'}, 13897 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 13898 'state': {'key': 'properties.state', 'type': 'str'}, 13899 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, 13900 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, 13901 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, 13902 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, 13903 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 13904 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, 13905 'creation_time': {'key': 'properties.creationTime', 'type': 'iso-8601'}, 13906 } 13907 13908 def __init__( 13909 self, 13910 *, 13911 state: Optional[Union[str, "SecurityAlertsPolicyState"]] = None, 13912 disabled_alerts: Optional[List[str]] = None, 13913 email_addresses: Optional[List[str]] = None, 13914 email_account_admins: Optional[bool] = None, 13915 storage_endpoint: Optional[str] = None, 13916 storage_account_access_key: Optional[str] = None, 13917 retention_days: Optional[int] = None, 13918 **kwargs 13919 ): 13920 super(ServerSecurityAlertPolicy, self).__init__(**kwargs) 13921 self.system_data = None 13922 self.state = state 13923 self.disabled_alerts = disabled_alerts 13924 self.email_addresses = email_addresses 13925 self.email_account_admins = email_account_admins 13926 self.storage_endpoint = storage_endpoint 13927 self.storage_account_access_key = storage_account_access_key 13928 self.retention_days = retention_days 13929 self.creation_time = None 13930 13931 13932class ServerTrustGroup(ProxyResource): 13933 """A server trust group. 13934 13935 Variables are only populated by the server, and will be ignored when sending a request. 13936 13937 :ivar id: Resource ID. 13938 :vartype id: str 13939 :ivar name: Resource name. 13940 :vartype name: str 13941 :ivar type: Resource type. 13942 :vartype type: str 13943 :param group_members: Group members information for the server trust group. 13944 :type group_members: list[~azure.mgmt.sql.models.ServerInfo] 13945 :param trust_scopes: Trust scope of the server trust group. 13946 :type trust_scopes: list[str or 13947 ~azure.mgmt.sql.models.ServerTrustGroupPropertiesTrustScopesItem] 13948 """ 13949 13950 _validation = { 13951 'id': {'readonly': True}, 13952 'name': {'readonly': True}, 13953 'type': {'readonly': True}, 13954 } 13955 13956 _attribute_map = { 13957 'id': {'key': 'id', 'type': 'str'}, 13958 'name': {'key': 'name', 'type': 'str'}, 13959 'type': {'key': 'type', 'type': 'str'}, 13960 'group_members': {'key': 'properties.groupMembers', 'type': '[ServerInfo]'}, 13961 'trust_scopes': {'key': 'properties.trustScopes', 'type': '[str]'}, 13962 } 13963 13964 def __init__( 13965 self, 13966 *, 13967 group_members: Optional[List["ServerInfo"]] = None, 13968 trust_scopes: Optional[List[Union[str, "ServerTrustGroupPropertiesTrustScopesItem"]]] = None, 13969 **kwargs 13970 ): 13971 super(ServerTrustGroup, self).__init__(**kwargs) 13972 self.group_members = group_members 13973 self.trust_scopes = trust_scopes 13974 13975 13976class ServerTrustGroupListResult(msrest.serialization.Model): 13977 """A list of server trust groups. 13978 13979 Variables are only populated by the server, and will be ignored when sending a request. 13980 13981 :ivar value: Array of results. 13982 :vartype value: list[~azure.mgmt.sql.models.ServerTrustGroup] 13983 :ivar next_link: Link to retrieve next page of results. 13984 :vartype next_link: str 13985 """ 13986 13987 _validation = { 13988 'value': {'readonly': True}, 13989 'next_link': {'readonly': True}, 13990 } 13991 13992 _attribute_map = { 13993 'value': {'key': 'value', 'type': '[ServerTrustGroup]'}, 13994 'next_link': {'key': 'nextLink', 'type': 'str'}, 13995 } 13996 13997 def __init__( 13998 self, 13999 **kwargs 14000 ): 14001 super(ServerTrustGroupListResult, self).__init__(**kwargs) 14002 self.value = None 14003 self.next_link = None 14004 14005 14006class ServerUpdate(msrest.serialization.Model): 14007 """An update request for an Azure SQL Database server. 14008 14009 Variables are only populated by the server, and will be ignored when sending a request. 14010 14011 :param identity: Server identity. 14012 :type identity: ~azure.mgmt.sql.models.ResourceIdentity 14013 :param tags: A set of tags. Resource tags. 14014 :type tags: dict[str, str] 14015 :param administrator_login: Administrator username for the server. Once created it cannot be 14016 changed. 14017 :type administrator_login: str 14018 :param administrator_login_password: The administrator login password (required for server 14019 creation). 14020 :type administrator_login_password: str 14021 :param version: The version of the server. 14022 :type version: str 14023 :ivar state: The state of the server. 14024 :vartype state: str 14025 :ivar fully_qualified_domain_name: The fully qualified domain name of the server. 14026 :vartype fully_qualified_domain_name: str 14027 :ivar private_endpoint_connections: List of private endpoint connections on a server. 14028 :vartype private_endpoint_connections: 14029 list[~azure.mgmt.sql.models.ServerPrivateEndpointConnection] 14030 :param minimal_tls_version: Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'. 14031 :type minimal_tls_version: str 14032 :param public_network_access: Whether or not public endpoint access is allowed for this server. 14033 Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 14034 "Enabled", "Disabled". 14035 :type public_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag 14036 :ivar workspace_feature: Whether or not existing server has a workspace created and if it 14037 allows connection from workspace. Possible values include: "Connected", "Disconnected". 14038 :vartype workspace_feature: str or ~azure.mgmt.sql.models.ServerWorkspaceFeature 14039 :param primary_user_assigned_identity_id: The resource id of a user assigned identity to be 14040 used by default. 14041 :type primary_user_assigned_identity_id: str 14042 :param federated_client_id: The Client id used for cross tenant CMK scenario. 14043 :type federated_client_id: str 14044 :param key_id: A CMK URI of the key to use for encryption. 14045 :type key_id: str 14046 :param administrators: The Azure Active Directory identity of the server. 14047 :type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator 14048 :param restrict_outbound_network_access: Whether or not to restrict outbound network access for 14049 this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible 14050 values include: "Enabled", "Disabled". 14051 :type restrict_outbound_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag 14052 """ 14053 14054 _validation = { 14055 'state': {'readonly': True}, 14056 'fully_qualified_domain_name': {'readonly': True}, 14057 'private_endpoint_connections': {'readonly': True}, 14058 'workspace_feature': {'readonly': True}, 14059 } 14060 14061 _attribute_map = { 14062 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, 14063 'tags': {'key': 'tags', 'type': '{str}'}, 14064 'administrator_login': {'key': 'properties.administratorLogin', 'type': 'str'}, 14065 'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'}, 14066 'version': {'key': 'properties.version', 'type': 'str'}, 14067 'state': {'key': 'properties.state', 'type': 'str'}, 14068 'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'}, 14069 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ServerPrivateEndpointConnection]'}, 14070 'minimal_tls_version': {'key': 'properties.minimalTlsVersion', 'type': 'str'}, 14071 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 14072 'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'}, 14073 'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'}, 14074 'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'}, 14075 'key_id': {'key': 'properties.keyId', 'type': 'str'}, 14076 'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'}, 14077 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, 14078 } 14079 14080 def __init__( 14081 self, 14082 *, 14083 identity: Optional["ResourceIdentity"] = None, 14084 tags: Optional[Dict[str, str]] = None, 14085 administrator_login: Optional[str] = None, 14086 administrator_login_password: Optional[str] = None, 14087 version: Optional[str] = None, 14088 minimal_tls_version: Optional[str] = None, 14089 public_network_access: Optional[Union[str, "ServerNetworkAccessFlag"]] = None, 14090 primary_user_assigned_identity_id: Optional[str] = None, 14091 federated_client_id: Optional[str] = None, 14092 key_id: Optional[str] = None, 14093 administrators: Optional["ServerExternalAdministrator"] = None, 14094 restrict_outbound_network_access: Optional[Union[str, "ServerNetworkAccessFlag"]] = None, 14095 **kwargs 14096 ): 14097 super(ServerUpdate, self).__init__(**kwargs) 14098 self.identity = identity 14099 self.tags = tags 14100 self.administrator_login = administrator_login 14101 self.administrator_login_password = administrator_login_password 14102 self.version = version 14103 self.state = None 14104 self.fully_qualified_domain_name = None 14105 self.private_endpoint_connections = None 14106 self.minimal_tls_version = minimal_tls_version 14107 self.public_network_access = public_network_access 14108 self.workspace_feature = None 14109 self.primary_user_assigned_identity_id = primary_user_assigned_identity_id 14110 self.federated_client_id = federated_client_id 14111 self.key_id = key_id 14112 self.administrators = administrators 14113 self.restrict_outbound_network_access = restrict_outbound_network_access 14114 14115 14116class ServerUsage(msrest.serialization.Model): 14117 """Represents server metrics. 14118 14119 Variables are only populated by the server, and will be ignored when sending a request. 14120 14121 :ivar name: Name of the server usage metric. 14122 :vartype name: str 14123 :ivar resource_name: The name of the resource. 14124 :vartype resource_name: str 14125 :ivar display_name: The metric display name. 14126 :vartype display_name: str 14127 :ivar current_value: The current value of the metric. 14128 :vartype current_value: float 14129 :ivar limit: The current limit of the metric. 14130 :vartype limit: float 14131 :ivar unit: The units of the metric. 14132 :vartype unit: str 14133 :ivar next_reset_time: The next reset time for the metric (ISO8601 format). 14134 :vartype next_reset_time: ~datetime.datetime 14135 """ 14136 14137 _validation = { 14138 'name': {'readonly': True}, 14139 'resource_name': {'readonly': True}, 14140 'display_name': {'readonly': True}, 14141 'current_value': {'readonly': True}, 14142 'limit': {'readonly': True}, 14143 'unit': {'readonly': True}, 14144 'next_reset_time': {'readonly': True}, 14145 } 14146 14147 _attribute_map = { 14148 'name': {'key': 'name', 'type': 'str'}, 14149 'resource_name': {'key': 'resourceName', 'type': 'str'}, 14150 'display_name': {'key': 'displayName', 'type': 'str'}, 14151 'current_value': {'key': 'currentValue', 'type': 'float'}, 14152 'limit': {'key': 'limit', 'type': 'float'}, 14153 'unit': {'key': 'unit', 'type': 'str'}, 14154 'next_reset_time': {'key': 'nextResetTime', 'type': 'iso-8601'}, 14155 } 14156 14157 def __init__( 14158 self, 14159 **kwargs 14160 ): 14161 super(ServerUsage, self).__init__(**kwargs) 14162 self.name = None 14163 self.resource_name = None 14164 self.display_name = None 14165 self.current_value = None 14166 self.limit = None 14167 self.unit = None 14168 self.next_reset_time = None 14169 14170 14171class ServerUsageListResult(msrest.serialization.Model): 14172 """Represents the response to a list server metrics request. 14173 14174 All required parameters must be populated in order to send to Azure. 14175 14176 :param value: Required. The list of server metrics for the server. 14177 :type value: list[~azure.mgmt.sql.models.ServerUsage] 14178 """ 14179 14180 _validation = { 14181 'value': {'required': True}, 14182 } 14183 14184 _attribute_map = { 14185 'value': {'key': 'value', 'type': '[ServerUsage]'}, 14186 } 14187 14188 def __init__( 14189 self, 14190 *, 14191 value: List["ServerUsage"], 14192 **kwargs 14193 ): 14194 super(ServerUsageListResult, self).__init__(**kwargs) 14195 self.value = value 14196 14197 14198class ServerVersionCapability(msrest.serialization.Model): 14199 """The server capability. 14200 14201 Variables are only populated by the server, and will be ignored when sending a request. 14202 14203 :ivar name: The server version name. 14204 :vartype name: str 14205 :ivar supported_editions: The list of supported database editions. 14206 :vartype supported_editions: list[~azure.mgmt.sql.models.EditionCapability] 14207 :ivar supported_elastic_pool_editions: The list of supported elastic pool editions. 14208 :vartype supported_elastic_pool_editions: 14209 list[~azure.mgmt.sql.models.ElasticPoolEditionCapability] 14210 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 14211 "Default", "Disabled". 14212 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 14213 :param reason: The reason for the capability not being available. 14214 :type reason: str 14215 """ 14216 14217 _validation = { 14218 'name': {'readonly': True}, 14219 'supported_editions': {'readonly': True}, 14220 'supported_elastic_pool_editions': {'readonly': True}, 14221 'status': {'readonly': True}, 14222 } 14223 14224 _attribute_map = { 14225 'name': {'key': 'name', 'type': 'str'}, 14226 'supported_editions': {'key': 'supportedEditions', 'type': '[EditionCapability]'}, 14227 'supported_elastic_pool_editions': {'key': 'supportedElasticPoolEditions', 'type': '[ElasticPoolEditionCapability]'}, 14228 'status': {'key': 'status', 'type': 'str'}, 14229 'reason': {'key': 'reason', 'type': 'str'}, 14230 } 14231 14232 def __init__( 14233 self, 14234 *, 14235 reason: Optional[str] = None, 14236 **kwargs 14237 ): 14238 super(ServerVersionCapability, self).__init__(**kwargs) 14239 self.name = None 14240 self.supported_editions = None 14241 self.supported_elastic_pool_editions = None 14242 self.status = None 14243 self.reason = reason 14244 14245 14246class ServerVulnerabilityAssessment(ProxyResource): 14247 """A server vulnerability assessment. 14248 14249 Variables are only populated by the server, and will be ignored when sending a request. 14250 14251 :ivar id: Resource ID. 14252 :vartype id: str 14253 :ivar name: Resource name. 14254 :vartype name: str 14255 :ivar type: Resource type. 14256 :vartype type: str 14257 :param storage_container_path: A blob storage container path to hold the scan results (e.g. 14258 https://myStorage.blob.core.windows.net/VaScans/). 14259 :type storage_container_path: str 14260 :param storage_container_sas_key: A shared access signature (SAS Key) that has write access to 14261 the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' 14262 isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not 14263 behind a Vnet or a firewall. 14264 :type storage_container_sas_key: str 14265 :param storage_account_access_key: Specifies the identifier key of the storage account for 14266 vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, 14267 storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet 14268 or a firewall. 14269 :type storage_account_access_key: str 14270 :param recurring_scans: The recurring scans settings. 14271 :type recurring_scans: ~azure.mgmt.sql.models.VulnerabilityAssessmentRecurringScansProperties 14272 """ 14273 14274 _validation = { 14275 'id': {'readonly': True}, 14276 'name': {'readonly': True}, 14277 'type': {'readonly': True}, 14278 } 14279 14280 _attribute_map = { 14281 'id': {'key': 'id', 'type': 'str'}, 14282 'name': {'key': 'name', 'type': 'str'}, 14283 'type': {'key': 'type', 'type': 'str'}, 14284 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, 14285 'storage_container_sas_key': {'key': 'properties.storageContainerSasKey', 'type': 'str'}, 14286 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, 14287 'recurring_scans': {'key': 'properties.recurringScans', 'type': 'VulnerabilityAssessmentRecurringScansProperties'}, 14288 } 14289 14290 def __init__( 14291 self, 14292 *, 14293 storage_container_path: Optional[str] = None, 14294 storage_container_sas_key: Optional[str] = None, 14295 storage_account_access_key: Optional[str] = None, 14296 recurring_scans: Optional["VulnerabilityAssessmentRecurringScansProperties"] = None, 14297 **kwargs 14298 ): 14299 super(ServerVulnerabilityAssessment, self).__init__(**kwargs) 14300 self.storage_container_path = storage_container_path 14301 self.storage_container_sas_key = storage_container_sas_key 14302 self.storage_account_access_key = storage_account_access_key 14303 self.recurring_scans = recurring_scans 14304 14305 14306class ServerVulnerabilityAssessmentListResult(msrest.serialization.Model): 14307 """A list of the server's vulnerability assessments. 14308 14309 Variables are only populated by the server, and will be ignored when sending a request. 14310 14311 :ivar value: Array of results. 14312 :vartype value: list[~azure.mgmt.sql.models.ServerVulnerabilityAssessment] 14313 :ivar next_link: Link to retrieve next page of results. 14314 :vartype next_link: str 14315 """ 14316 14317 _validation = { 14318 'value': {'readonly': True}, 14319 'next_link': {'readonly': True}, 14320 } 14321 14322 _attribute_map = { 14323 'value': {'key': 'value', 'type': '[ServerVulnerabilityAssessment]'}, 14324 'next_link': {'key': 'nextLink', 'type': 'str'}, 14325 } 14326 14327 def __init__( 14328 self, 14329 **kwargs 14330 ): 14331 super(ServerVulnerabilityAssessmentListResult, self).__init__(**kwargs) 14332 self.value = None 14333 self.next_link = None 14334 14335 14336class ServiceObjective(ProxyResource): 14337 """Represents a database service objective. 14338 14339 Variables are only populated by the server, and will be ignored when sending a request. 14340 14341 :ivar id: Resource ID. 14342 :vartype id: str 14343 :ivar name: Resource name. 14344 :vartype name: str 14345 :ivar type: Resource type. 14346 :vartype type: str 14347 :ivar service_objective_name: The name for the service objective. 14348 :vartype service_objective_name: str 14349 :ivar is_default: Gets whether the service level objective is the default service objective. 14350 :vartype is_default: bool 14351 :ivar is_system: Gets whether the service level objective is a system service objective. 14352 :vartype is_system: bool 14353 :ivar description: The description for the service level objective. 14354 :vartype description: str 14355 :ivar enabled: Gets whether the service level objective is enabled. 14356 :vartype enabled: bool 14357 """ 14358 14359 _validation = { 14360 'id': {'readonly': True}, 14361 'name': {'readonly': True}, 14362 'type': {'readonly': True}, 14363 'service_objective_name': {'readonly': True}, 14364 'is_default': {'readonly': True}, 14365 'is_system': {'readonly': True}, 14366 'description': {'readonly': True}, 14367 'enabled': {'readonly': True}, 14368 } 14369 14370 _attribute_map = { 14371 'id': {'key': 'id', 'type': 'str'}, 14372 'name': {'key': 'name', 'type': 'str'}, 14373 'type': {'key': 'type', 'type': 'str'}, 14374 'service_objective_name': {'key': 'properties.serviceObjectiveName', 'type': 'str'}, 14375 'is_default': {'key': 'properties.isDefault', 'type': 'bool'}, 14376 'is_system': {'key': 'properties.isSystem', 'type': 'bool'}, 14377 'description': {'key': 'properties.description', 'type': 'str'}, 14378 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 14379 } 14380 14381 def __init__( 14382 self, 14383 **kwargs 14384 ): 14385 super(ServiceObjective, self).__init__(**kwargs) 14386 self.service_objective_name = None 14387 self.is_default = None 14388 self.is_system = None 14389 self.description = None 14390 self.enabled = None 14391 14392 14393class ServiceObjectiveCapability(msrest.serialization.Model): 14394 """The service objectives capability. 14395 14396 Variables are only populated by the server, and will be ignored when sending a request. 14397 14398 :ivar id: The unique ID of the service objective. 14399 :vartype id: str 14400 :ivar name: The service objective name. 14401 :vartype name: str 14402 :ivar supported_max_sizes: The list of supported maximum database sizes. 14403 :vartype supported_max_sizes: list[~azure.mgmt.sql.models.MaxSizeRangeCapability] 14404 :ivar performance_level: The performance level. 14405 :vartype performance_level: ~azure.mgmt.sql.models.PerformanceLevelCapability 14406 :ivar sku: The sku. 14407 :vartype sku: ~azure.mgmt.sql.models.Sku 14408 :ivar supported_license_types: List of supported license types. 14409 :vartype supported_license_types: list[~azure.mgmt.sql.models.LicenseTypeCapability] 14410 :ivar included_max_size: The included (free) max size. 14411 :vartype included_max_size: ~azure.mgmt.sql.models.MaxSizeCapability 14412 :ivar zone_redundant: Whether or not zone redundancy is supported for the service objective. 14413 :vartype zone_redundant: bool 14414 :ivar supported_auto_pause_delay: Supported time range for auto pause delay. 14415 :vartype supported_auto_pause_delay: ~azure.mgmt.sql.models.AutoPauseDelayTimeRange 14416 :ivar supported_min_capacities: List of supported min capacities. 14417 :vartype supported_min_capacities: list[~azure.mgmt.sql.models.MinCapacityCapability] 14418 :ivar compute_model: The compute model. 14419 :vartype compute_model: str 14420 :ivar supported_maintenance_configurations: List of supported maintenance configurations. 14421 :vartype supported_maintenance_configurations: 14422 list[~azure.mgmt.sql.models.MaintenanceConfigurationCapability] 14423 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 14424 "Default", "Disabled". 14425 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 14426 :param reason: The reason for the capability not being available. 14427 :type reason: str 14428 """ 14429 14430 _validation = { 14431 'id': {'readonly': True}, 14432 'name': {'readonly': True}, 14433 'supported_max_sizes': {'readonly': True}, 14434 'performance_level': {'readonly': True}, 14435 'sku': {'readonly': True}, 14436 'supported_license_types': {'readonly': True}, 14437 'included_max_size': {'readonly': True}, 14438 'zone_redundant': {'readonly': True}, 14439 'supported_auto_pause_delay': {'readonly': True}, 14440 'supported_min_capacities': {'readonly': True}, 14441 'compute_model': {'readonly': True}, 14442 'supported_maintenance_configurations': {'readonly': True}, 14443 'status': {'readonly': True}, 14444 } 14445 14446 _attribute_map = { 14447 'id': {'key': 'id', 'type': 'str'}, 14448 'name': {'key': 'name', 'type': 'str'}, 14449 'supported_max_sizes': {'key': 'supportedMaxSizes', 'type': '[MaxSizeRangeCapability]'}, 14450 'performance_level': {'key': 'performanceLevel', 'type': 'PerformanceLevelCapability'}, 14451 'sku': {'key': 'sku', 'type': 'Sku'}, 14452 'supported_license_types': {'key': 'supportedLicenseTypes', 'type': '[LicenseTypeCapability]'}, 14453 'included_max_size': {'key': 'includedMaxSize', 'type': 'MaxSizeCapability'}, 14454 'zone_redundant': {'key': 'zoneRedundant', 'type': 'bool'}, 14455 'supported_auto_pause_delay': {'key': 'supportedAutoPauseDelay', 'type': 'AutoPauseDelayTimeRange'}, 14456 'supported_min_capacities': {'key': 'supportedMinCapacities', 'type': '[MinCapacityCapability]'}, 14457 'compute_model': {'key': 'computeModel', 'type': 'str'}, 14458 'supported_maintenance_configurations': {'key': 'supportedMaintenanceConfigurations', 'type': '[MaintenanceConfigurationCapability]'}, 14459 'status': {'key': 'status', 'type': 'str'}, 14460 'reason': {'key': 'reason', 'type': 'str'}, 14461 } 14462 14463 def __init__( 14464 self, 14465 *, 14466 reason: Optional[str] = None, 14467 **kwargs 14468 ): 14469 super(ServiceObjectiveCapability, self).__init__(**kwargs) 14470 self.id = None 14471 self.name = None 14472 self.supported_max_sizes = None 14473 self.performance_level = None 14474 self.sku = None 14475 self.supported_license_types = None 14476 self.included_max_size = None 14477 self.zone_redundant = None 14478 self.supported_auto_pause_delay = None 14479 self.supported_min_capacities = None 14480 self.compute_model = None 14481 self.supported_maintenance_configurations = None 14482 self.status = None 14483 self.reason = reason 14484 14485 14486class ServiceObjectiveListResult(msrest.serialization.Model): 14487 """Represents the response to a get database service objectives request. 14488 14489 All required parameters must be populated in order to send to Azure. 14490 14491 :param value: Required. The list of database service objectives. 14492 :type value: list[~azure.mgmt.sql.models.ServiceObjective] 14493 """ 14494 14495 _validation = { 14496 'value': {'required': True}, 14497 } 14498 14499 _attribute_map = { 14500 'value': {'key': 'value', 'type': '[ServiceObjective]'}, 14501 } 14502 14503 def __init__( 14504 self, 14505 *, 14506 value: List["ServiceObjective"], 14507 **kwargs 14508 ): 14509 super(ServiceObjectiveListResult, self).__init__(**kwargs) 14510 self.value = value 14511 14512 14513class Sku(msrest.serialization.Model): 14514 """An ARM Resource SKU. 14515 14516 All required parameters must be populated in order to send to Azure. 14517 14518 :param name: Required. The name of the SKU, typically, a letter + Number code, e.g. P3. 14519 :type name: str 14520 :param tier: The tier or edition of the particular SKU, e.g. Basic, Premium. 14521 :type tier: str 14522 :param size: Size of the particular SKU. 14523 :type size: str 14524 :param family: If the service has different generations of hardware, for the same SKU, then 14525 that can be captured here. 14526 :type family: str 14527 :param capacity: Capacity of the particular SKU. 14528 :type capacity: int 14529 """ 14530 14531 _validation = { 14532 'name': {'required': True}, 14533 } 14534 14535 _attribute_map = { 14536 'name': {'key': 'name', 'type': 'str'}, 14537 'tier': {'key': 'tier', 'type': 'str'}, 14538 'size': {'key': 'size', 'type': 'str'}, 14539 'family': {'key': 'family', 'type': 'str'}, 14540 'capacity': {'key': 'capacity', 'type': 'int'}, 14541 } 14542 14543 def __init__( 14544 self, 14545 *, 14546 name: str, 14547 tier: Optional[str] = None, 14548 size: Optional[str] = None, 14549 family: Optional[str] = None, 14550 capacity: Optional[int] = None, 14551 **kwargs 14552 ): 14553 super(Sku, self).__init__(**kwargs) 14554 self.name = name 14555 self.tier = tier 14556 self.size = size 14557 self.family = family 14558 self.capacity = capacity 14559 14560 14561class SloUsageMetric(msrest.serialization.Model): 14562 """A Slo Usage Metric. 14563 14564 Variables are only populated by the server, and will be ignored when sending a request. 14565 14566 :ivar service_level_objective: The serviceLevelObjective for SLO usage metric. Possible values 14567 include: "System", "System0", "System1", "System2", "System3", "System4", "System2L", 14568 "System3L", "System4L", "Free", "Basic", "S0", "S1", "S2", "S3", "S4", "S6", "S7", "S9", "S12", 14569 "P1", "P2", "P3", "P4", "P6", "P11", "P15", "PRS1", "PRS2", "PRS4", "PRS6", "DW100", "DW200", 14570 "DW300", "DW400", "DW500", "DW600", "DW1000", "DW1200", "DW1000c", "DW1500", "DW1500c", 14571 "DW2000", "DW2000c", "DW3000", "DW2500c", "DW3000c", "DW6000", "DW5000c", "DW6000c", "DW7500c", 14572 "DW10000c", "DW15000c", "DW30000c", "DS100", "DS200", "DS300", "DS400", "DS500", "DS600", 14573 "DS1000", "DS1200", "DS1500", "DS2000", "ElasticPool". 14574 :vartype service_level_objective: str or ~azure.mgmt.sql.models.ServiceObjectiveName 14575 :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO usage metric. 14576 :vartype service_level_objective_id: str 14577 :ivar in_range_time_ratio: Gets or sets inRangeTimeRatio for SLO usage metric. 14578 :vartype in_range_time_ratio: float 14579 """ 14580 14581 _validation = { 14582 'service_level_objective': {'readonly': True}, 14583 'service_level_objective_id': {'readonly': True}, 14584 'in_range_time_ratio': {'readonly': True}, 14585 } 14586 14587 _attribute_map = { 14588 'service_level_objective': {'key': 'serviceLevelObjective', 'type': 'str'}, 14589 'service_level_objective_id': {'key': 'serviceLevelObjectiveId', 'type': 'str'}, 14590 'in_range_time_ratio': {'key': 'inRangeTimeRatio', 'type': 'float'}, 14591 } 14592 14593 def __init__( 14594 self, 14595 **kwargs 14596 ): 14597 super(SloUsageMetric, self).__init__(**kwargs) 14598 self.service_level_objective = None 14599 self.service_level_objective_id = None 14600 self.in_range_time_ratio = None 14601 14602 14603class SqlAgentConfiguration(ProxyResource): 14604 """A recoverable managed database resource. 14605 14606 Variables are only populated by the server, and will be ignored when sending a request. 14607 14608 :ivar id: Resource ID. 14609 :vartype id: str 14610 :ivar name: Resource name. 14611 :vartype name: str 14612 :ivar type: Resource type. 14613 :vartype type: str 14614 :param state: The state of Sql Agent. Possible values include: "Enabled", "Disabled". 14615 :type state: str or ~azure.mgmt.sql.models.SqlAgentConfigurationPropertiesState 14616 """ 14617 14618 _validation = { 14619 'id': {'readonly': True}, 14620 'name': {'readonly': True}, 14621 'type': {'readonly': True}, 14622 } 14623 14624 _attribute_map = { 14625 'id': {'key': 'id', 'type': 'str'}, 14626 'name': {'key': 'name', 'type': 'str'}, 14627 'type': {'key': 'type', 'type': 'str'}, 14628 'state': {'key': 'properties.state', 'type': 'str'}, 14629 } 14630 14631 def __init__( 14632 self, 14633 *, 14634 state: Optional[Union[str, "SqlAgentConfigurationPropertiesState"]] = None, 14635 **kwargs 14636 ): 14637 super(SqlAgentConfiguration, self).__init__(**kwargs) 14638 self.state = state 14639 14640 14641class StorageCapability(msrest.serialization.Model): 14642 """The storage account type capability. 14643 14644 Variables are only populated by the server, and will be ignored when sending a request. 14645 14646 :ivar storage_account_type: The storage account type for the database's backups. Possible 14647 values include: "GRS", "LRS", "ZRS". 14648 :vartype storage_account_type: str or 14649 ~azure.mgmt.sql.models.StorageCapabilityStorageAccountType 14650 :ivar status: The status of the capability. Possible values include: "Visible", "Available", 14651 "Default", "Disabled". 14652 :vartype status: str or ~azure.mgmt.sql.models.CapabilityStatus 14653 :param reason: The reason for the capability not being available. 14654 :type reason: str 14655 """ 14656 14657 _validation = { 14658 'storage_account_type': {'readonly': True}, 14659 'status': {'readonly': True}, 14660 } 14661 14662 _attribute_map = { 14663 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, 14664 'status': {'key': 'status', 'type': 'str'}, 14665 'reason': {'key': 'reason', 'type': 'str'}, 14666 } 14667 14668 def __init__( 14669 self, 14670 *, 14671 reason: Optional[str] = None, 14672 **kwargs 14673 ): 14674 super(StorageCapability, self).__init__(**kwargs) 14675 self.storage_account_type = None 14676 self.status = None 14677 self.reason = reason 14678 14679 14680class SubscriptionUsage(ProxyResource): 14681 """Usage Metric of a Subscription in a Location. 14682 14683 Variables are only populated by the server, and will be ignored when sending a request. 14684 14685 :ivar id: Resource ID. 14686 :vartype id: str 14687 :ivar name: Resource name. 14688 :vartype name: str 14689 :ivar type: Resource type. 14690 :vartype type: str 14691 :ivar display_name: User-readable name of the metric. 14692 :vartype display_name: str 14693 :ivar current_value: Current value of the metric. 14694 :vartype current_value: float 14695 :ivar limit: Boundary value of the metric. 14696 :vartype limit: float 14697 :ivar unit: Unit of the metric. 14698 :vartype unit: str 14699 """ 14700 14701 _validation = { 14702 'id': {'readonly': True}, 14703 'name': {'readonly': True}, 14704 'type': {'readonly': True}, 14705 'display_name': {'readonly': True}, 14706 'current_value': {'readonly': True}, 14707 'limit': {'readonly': True}, 14708 'unit': {'readonly': True}, 14709 } 14710 14711 _attribute_map = { 14712 'id': {'key': 'id', 'type': 'str'}, 14713 'name': {'key': 'name', 'type': 'str'}, 14714 'type': {'key': 'type', 'type': 'str'}, 14715 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 14716 'current_value': {'key': 'properties.currentValue', 'type': 'float'}, 14717 'limit': {'key': 'properties.limit', 'type': 'float'}, 14718 'unit': {'key': 'properties.unit', 'type': 'str'}, 14719 } 14720 14721 def __init__( 14722 self, 14723 **kwargs 14724 ): 14725 super(SubscriptionUsage, self).__init__(**kwargs) 14726 self.display_name = None 14727 self.current_value = None 14728 self.limit = None 14729 self.unit = None 14730 14731 14732class SubscriptionUsageListResult(msrest.serialization.Model): 14733 """A list of subscription usage metrics in a location. 14734 14735 Variables are only populated by the server, and will be ignored when sending a request. 14736 14737 :ivar value: Array of results. 14738 :vartype value: list[~azure.mgmt.sql.models.SubscriptionUsage] 14739 :ivar next_link: Link to retrieve next page of results. 14740 :vartype next_link: str 14741 """ 14742 14743 _validation = { 14744 'value': {'readonly': True}, 14745 'next_link': {'readonly': True}, 14746 } 14747 14748 _attribute_map = { 14749 'value': {'key': 'value', 'type': '[SubscriptionUsage]'}, 14750 'next_link': {'key': 'nextLink', 'type': 'str'}, 14751 } 14752 14753 def __init__( 14754 self, 14755 **kwargs 14756 ): 14757 super(SubscriptionUsageListResult, self).__init__(**kwargs) 14758 self.value = None 14759 self.next_link = None 14760 14761 14762class SyncAgent(ProxyResource): 14763 """An Azure SQL Database sync agent. 14764 14765 Variables are only populated by the server, and will be ignored when sending a request. 14766 14767 :ivar id: Resource ID. 14768 :vartype id: str 14769 :ivar name: Resource name. 14770 :vartype name: str 14771 :ivar type: Resource type. 14772 :vartype type: str 14773 :ivar name_properties_name: Name of the sync agent. 14774 :vartype name_properties_name: str 14775 :param sync_database_id: ARM resource id of the sync database in the sync agent. 14776 :type sync_database_id: str 14777 :ivar last_alive_time: Last alive time of the sync agent. 14778 :vartype last_alive_time: ~datetime.datetime 14779 :ivar state: State of the sync agent. Possible values include: "Online", "Offline", 14780 "NeverConnected". 14781 :vartype state: str or ~azure.mgmt.sql.models.SyncAgentState 14782 :ivar is_up_to_date: If the sync agent version is up to date. 14783 :vartype is_up_to_date: bool 14784 :ivar expiry_time: Expiration time of the sync agent version. 14785 :vartype expiry_time: ~datetime.datetime 14786 :ivar version: Version of the sync agent. 14787 :vartype version: str 14788 """ 14789 14790 _validation = { 14791 'id': {'readonly': True}, 14792 'name': {'readonly': True}, 14793 'type': {'readonly': True}, 14794 'name_properties_name': {'readonly': True}, 14795 'last_alive_time': {'readonly': True}, 14796 'state': {'readonly': True}, 14797 'is_up_to_date': {'readonly': True}, 14798 'expiry_time': {'readonly': True}, 14799 'version': {'readonly': True}, 14800 } 14801 14802 _attribute_map = { 14803 'id': {'key': 'id', 'type': 'str'}, 14804 'name': {'key': 'name', 'type': 'str'}, 14805 'type': {'key': 'type', 'type': 'str'}, 14806 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 14807 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, 14808 'last_alive_time': {'key': 'properties.lastAliveTime', 'type': 'iso-8601'}, 14809 'state': {'key': 'properties.state', 'type': 'str'}, 14810 'is_up_to_date': {'key': 'properties.isUpToDate', 'type': 'bool'}, 14811 'expiry_time': {'key': 'properties.expiryTime', 'type': 'iso-8601'}, 14812 'version': {'key': 'properties.version', 'type': 'str'}, 14813 } 14814 14815 def __init__( 14816 self, 14817 *, 14818 sync_database_id: Optional[str] = None, 14819 **kwargs 14820 ): 14821 super(SyncAgent, self).__init__(**kwargs) 14822 self.name_properties_name = None 14823 self.sync_database_id = sync_database_id 14824 self.last_alive_time = None 14825 self.state = None 14826 self.is_up_to_date = None 14827 self.expiry_time = None 14828 self.version = None 14829 14830 14831class SyncAgentKeyProperties(msrest.serialization.Model): 14832 """Properties of an Azure SQL Database sync agent key. 14833 14834 Variables are only populated by the server, and will be ignored when sending a request. 14835 14836 :ivar sync_agent_key: Key of sync agent. 14837 :vartype sync_agent_key: str 14838 """ 14839 14840 _validation = { 14841 'sync_agent_key': {'readonly': True}, 14842 } 14843 14844 _attribute_map = { 14845 'sync_agent_key': {'key': 'syncAgentKey', 'type': 'str'}, 14846 } 14847 14848 def __init__( 14849 self, 14850 **kwargs 14851 ): 14852 super(SyncAgentKeyProperties, self).__init__(**kwargs) 14853 self.sync_agent_key = None 14854 14855 14856class SyncAgentLinkedDatabase(ProxyResource): 14857 """An Azure SQL Database sync agent linked database. 14858 14859 Variables are only populated by the server, and will be ignored when sending a request. 14860 14861 :ivar id: Resource ID. 14862 :vartype id: str 14863 :ivar name: Resource name. 14864 :vartype name: str 14865 :ivar type: Resource type. 14866 :vartype type: str 14867 :ivar database_type: Type of the sync agent linked database. Possible values include: 14868 "AzureSqlDatabase", "SqlServerDatabase". 14869 :vartype database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType 14870 :ivar database_id: Id of the sync agent linked database. 14871 :vartype database_id: str 14872 :ivar description: Description of the sync agent linked database. 14873 :vartype description: str 14874 :ivar server_name: Server name of the sync agent linked database. 14875 :vartype server_name: str 14876 :ivar database_name: Database name of the sync agent linked database. 14877 :vartype database_name: str 14878 :ivar user_name: User name of the sync agent linked database. 14879 :vartype user_name: str 14880 """ 14881 14882 _validation = { 14883 'id': {'readonly': True}, 14884 'name': {'readonly': True}, 14885 'type': {'readonly': True}, 14886 'database_type': {'readonly': True}, 14887 'database_id': {'readonly': True}, 14888 'description': {'readonly': True}, 14889 'server_name': {'readonly': True}, 14890 'database_name': {'readonly': True}, 14891 'user_name': {'readonly': True}, 14892 } 14893 14894 _attribute_map = { 14895 'id': {'key': 'id', 'type': 'str'}, 14896 'name': {'key': 'name', 'type': 'str'}, 14897 'type': {'key': 'type', 'type': 'str'}, 14898 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, 14899 'database_id': {'key': 'properties.databaseId', 'type': 'str'}, 14900 'description': {'key': 'properties.description', 'type': 'str'}, 14901 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 14902 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 14903 'user_name': {'key': 'properties.userName', 'type': 'str'}, 14904 } 14905 14906 def __init__( 14907 self, 14908 **kwargs 14909 ): 14910 super(SyncAgentLinkedDatabase, self).__init__(**kwargs) 14911 self.database_type = None 14912 self.database_id = None 14913 self.description = None 14914 self.server_name = None 14915 self.database_name = None 14916 self.user_name = None 14917 14918 14919class SyncAgentLinkedDatabaseListResult(msrest.serialization.Model): 14920 """A list of sync agent linked databases. 14921 14922 Variables are only populated by the server, and will be ignored when sending a request. 14923 14924 :ivar value: Array of results. 14925 :vartype value: list[~azure.mgmt.sql.models.SyncAgentLinkedDatabase] 14926 :ivar next_link: Link to retrieve next page of results. 14927 :vartype next_link: str 14928 """ 14929 14930 _validation = { 14931 'value': {'readonly': True}, 14932 'next_link': {'readonly': True}, 14933 } 14934 14935 _attribute_map = { 14936 'value': {'key': 'value', 'type': '[SyncAgentLinkedDatabase]'}, 14937 'next_link': {'key': 'nextLink', 'type': 'str'}, 14938 } 14939 14940 def __init__( 14941 self, 14942 **kwargs 14943 ): 14944 super(SyncAgentLinkedDatabaseListResult, self).__init__(**kwargs) 14945 self.value = None 14946 self.next_link = None 14947 14948 14949class SyncAgentListResult(msrest.serialization.Model): 14950 """A list of sync agents. 14951 14952 Variables are only populated by the server, and will be ignored when sending a request. 14953 14954 :ivar value: Array of results. 14955 :vartype value: list[~azure.mgmt.sql.models.SyncAgent] 14956 :ivar next_link: Link to retrieve next page of results. 14957 :vartype next_link: str 14958 """ 14959 14960 _validation = { 14961 'value': {'readonly': True}, 14962 'next_link': {'readonly': True}, 14963 } 14964 14965 _attribute_map = { 14966 'value': {'key': 'value', 'type': '[SyncAgent]'}, 14967 'next_link': {'key': 'nextLink', 'type': 'str'}, 14968 } 14969 14970 def __init__( 14971 self, 14972 **kwargs 14973 ): 14974 super(SyncAgentListResult, self).__init__(**kwargs) 14975 self.value = None 14976 self.next_link = None 14977 14978 14979class SyncDatabaseIdListResult(msrest.serialization.Model): 14980 """A list of sync database ID properties. 14981 14982 Variables are only populated by the server, and will be ignored when sending a request. 14983 14984 :ivar value: Array of results. 14985 :vartype value: list[~azure.mgmt.sql.models.SyncDatabaseIdProperties] 14986 :ivar next_link: Link to retrieve next page of results. 14987 :vartype next_link: str 14988 """ 14989 14990 _validation = { 14991 'value': {'readonly': True}, 14992 'next_link': {'readonly': True}, 14993 } 14994 14995 _attribute_map = { 14996 'value': {'key': 'value', 'type': '[SyncDatabaseIdProperties]'}, 14997 'next_link': {'key': 'nextLink', 'type': 'str'}, 14998 } 14999 15000 def __init__( 15001 self, 15002 **kwargs 15003 ): 15004 super(SyncDatabaseIdListResult, self).__init__(**kwargs) 15005 self.value = None 15006 self.next_link = None 15007 15008 15009class SyncDatabaseIdProperties(msrest.serialization.Model): 15010 """Properties of the sync database id. 15011 15012 Variables are only populated by the server, and will be ignored when sending a request. 15013 15014 :ivar id: ARM resource id of sync database. 15015 :vartype id: str 15016 """ 15017 15018 _validation = { 15019 'id': {'readonly': True}, 15020 } 15021 15022 _attribute_map = { 15023 'id': {'key': 'id', 'type': 'str'}, 15024 } 15025 15026 def __init__( 15027 self, 15028 **kwargs 15029 ): 15030 super(SyncDatabaseIdProperties, self).__init__(**kwargs) 15031 self.id = None 15032 15033 15034class SyncFullSchemaProperties(msrest.serialization.Model): 15035 """Properties of the database full schema. 15036 15037 Variables are only populated by the server, and will be ignored when sending a request. 15038 15039 :ivar tables: List of tables in the database full schema. 15040 :vartype tables: list[~azure.mgmt.sql.models.SyncFullSchemaTable] 15041 :ivar last_update_time: Last update time of the database schema. 15042 :vartype last_update_time: ~datetime.datetime 15043 """ 15044 15045 _validation = { 15046 'tables': {'readonly': True}, 15047 'last_update_time': {'readonly': True}, 15048 } 15049 15050 _attribute_map = { 15051 'tables': {'key': 'tables', 'type': '[SyncFullSchemaTable]'}, 15052 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, 15053 } 15054 15055 def __init__( 15056 self, 15057 **kwargs 15058 ): 15059 super(SyncFullSchemaProperties, self).__init__(**kwargs) 15060 self.tables = None 15061 self.last_update_time = None 15062 15063 15064class SyncFullSchemaPropertiesListResult(msrest.serialization.Model): 15065 """A list of sync schema properties. 15066 15067 Variables are only populated by the server, and will be ignored when sending a request. 15068 15069 :ivar value: Array of results. 15070 :vartype value: list[~azure.mgmt.sql.models.SyncFullSchemaProperties] 15071 :ivar next_link: Link to retrieve next page of results. 15072 :vartype next_link: str 15073 """ 15074 15075 _validation = { 15076 'value': {'readonly': True}, 15077 'next_link': {'readonly': True}, 15078 } 15079 15080 _attribute_map = { 15081 'value': {'key': 'value', 'type': '[SyncFullSchemaProperties]'}, 15082 'next_link': {'key': 'nextLink', 'type': 'str'}, 15083 } 15084 15085 def __init__( 15086 self, 15087 **kwargs 15088 ): 15089 super(SyncFullSchemaPropertiesListResult, self).__init__(**kwargs) 15090 self.value = None 15091 self.next_link = None 15092 15093 15094class SyncFullSchemaTable(msrest.serialization.Model): 15095 """Properties of the table in the database full schema. 15096 15097 Variables are only populated by the server, and will be ignored when sending a request. 15098 15099 :ivar columns: List of columns in the table of database full schema. 15100 :vartype columns: list[~azure.mgmt.sql.models.SyncFullSchemaTableColumn] 15101 :ivar error_id: Error id of the table. 15102 :vartype error_id: str 15103 :ivar has_error: If there is error in the table. 15104 :vartype has_error: bool 15105 :ivar name: Name of the table. 15106 :vartype name: str 15107 :ivar quoted_name: Quoted name of the table. 15108 :vartype quoted_name: str 15109 """ 15110 15111 _validation = { 15112 'columns': {'readonly': True}, 15113 'error_id': {'readonly': True}, 15114 'has_error': {'readonly': True}, 15115 'name': {'readonly': True}, 15116 'quoted_name': {'readonly': True}, 15117 } 15118 15119 _attribute_map = { 15120 'columns': {'key': 'columns', 'type': '[SyncFullSchemaTableColumn]'}, 15121 'error_id': {'key': 'errorId', 'type': 'str'}, 15122 'has_error': {'key': 'hasError', 'type': 'bool'}, 15123 'name': {'key': 'name', 'type': 'str'}, 15124 'quoted_name': {'key': 'quotedName', 'type': 'str'}, 15125 } 15126 15127 def __init__( 15128 self, 15129 **kwargs 15130 ): 15131 super(SyncFullSchemaTable, self).__init__(**kwargs) 15132 self.columns = None 15133 self.error_id = None 15134 self.has_error = None 15135 self.name = None 15136 self.quoted_name = None 15137 15138 15139class SyncFullSchemaTableColumn(msrest.serialization.Model): 15140 """Properties of the column in the table of database full schema. 15141 15142 Variables are only populated by the server, and will be ignored when sending a request. 15143 15144 :ivar data_size: Data size of the column. 15145 :vartype data_size: str 15146 :ivar data_type: Data type of the column. 15147 :vartype data_type: str 15148 :ivar error_id: Error id of the column. 15149 :vartype error_id: str 15150 :ivar has_error: If there is error in the table. 15151 :vartype has_error: bool 15152 :ivar is_primary_key: If it is the primary key of the table. 15153 :vartype is_primary_key: bool 15154 :ivar name: Name of the column. 15155 :vartype name: str 15156 :ivar quoted_name: Quoted name of the column. 15157 :vartype quoted_name: str 15158 """ 15159 15160 _validation = { 15161 'data_size': {'readonly': True}, 15162 'data_type': {'readonly': True}, 15163 'error_id': {'readonly': True}, 15164 'has_error': {'readonly': True}, 15165 'is_primary_key': {'readonly': True}, 15166 'name': {'readonly': True}, 15167 'quoted_name': {'readonly': True}, 15168 } 15169 15170 _attribute_map = { 15171 'data_size': {'key': 'dataSize', 'type': 'str'}, 15172 'data_type': {'key': 'dataType', 'type': 'str'}, 15173 'error_id': {'key': 'errorId', 'type': 'str'}, 15174 'has_error': {'key': 'hasError', 'type': 'bool'}, 15175 'is_primary_key': {'key': 'isPrimaryKey', 'type': 'bool'}, 15176 'name': {'key': 'name', 'type': 'str'}, 15177 'quoted_name': {'key': 'quotedName', 'type': 'str'}, 15178 } 15179 15180 def __init__( 15181 self, 15182 **kwargs 15183 ): 15184 super(SyncFullSchemaTableColumn, self).__init__(**kwargs) 15185 self.data_size = None 15186 self.data_type = None 15187 self.error_id = None 15188 self.has_error = None 15189 self.is_primary_key = None 15190 self.name = None 15191 self.quoted_name = None 15192 15193 15194class SyncGroup(ProxyResource): 15195 """An Azure SQL Database sync group. 15196 15197 Variables are only populated by the server, and will be ignored when sending a request. 15198 15199 :ivar id: Resource ID. 15200 :vartype id: str 15201 :ivar name: Resource name. 15202 :vartype name: str 15203 :ivar type: Resource type. 15204 :vartype type: str 15205 :param sku: The name and capacity of the SKU. 15206 :type sku: ~azure.mgmt.sql.models.Sku 15207 :param interval: Sync interval of the sync group. 15208 :type interval: int 15209 :ivar last_sync_time: Last sync time of the sync group. 15210 :vartype last_sync_time: ~datetime.datetime 15211 :param conflict_resolution_policy: Conflict resolution policy of the sync group. Possible 15212 values include: "HubWin", "MemberWin". 15213 :type conflict_resolution_policy: str or ~azure.mgmt.sql.models.SyncConflictResolutionPolicy 15214 :param sync_database_id: ARM resource id of the sync database in the sync group. 15215 :type sync_database_id: str 15216 :param hub_database_user_name: User name for the sync group hub database credential. 15217 :type hub_database_user_name: str 15218 :param hub_database_password: Password for the sync group hub database credential. 15219 :type hub_database_password: str 15220 :ivar sync_state: Sync state of the sync group. Possible values include: "NotReady", "Error", 15221 "Warning", "Progressing", "Good". 15222 :vartype sync_state: str or ~azure.mgmt.sql.models.SyncGroupState 15223 :param schema: Sync schema of the sync group. 15224 :type schema: ~azure.mgmt.sql.models.SyncGroupSchema 15225 :param enable_conflict_logging: If conflict logging is enabled. 15226 :type enable_conflict_logging: bool 15227 :param conflict_logging_retention_in_days: Conflict logging retention period. 15228 :type conflict_logging_retention_in_days: int 15229 :param use_private_link_connection: If use private link connection is enabled. 15230 :type use_private_link_connection: bool 15231 :ivar private_endpoint_name: Private endpoint name of the sync group if use private link 15232 connection is enabled. 15233 :vartype private_endpoint_name: str 15234 """ 15235 15236 _validation = { 15237 'id': {'readonly': True}, 15238 'name': {'readonly': True}, 15239 'type': {'readonly': True}, 15240 'last_sync_time': {'readonly': True}, 15241 'sync_state': {'readonly': True}, 15242 'private_endpoint_name': {'readonly': True}, 15243 } 15244 15245 _attribute_map = { 15246 'id': {'key': 'id', 'type': 'str'}, 15247 'name': {'key': 'name', 'type': 'str'}, 15248 'type': {'key': 'type', 'type': 'str'}, 15249 'sku': {'key': 'sku', 'type': 'Sku'}, 15250 'interval': {'key': 'properties.interval', 'type': 'int'}, 15251 'last_sync_time': {'key': 'properties.lastSyncTime', 'type': 'iso-8601'}, 15252 'conflict_resolution_policy': {'key': 'properties.conflictResolutionPolicy', 'type': 'str'}, 15253 'sync_database_id': {'key': 'properties.syncDatabaseId', 'type': 'str'}, 15254 'hub_database_user_name': {'key': 'properties.hubDatabaseUserName', 'type': 'str'}, 15255 'hub_database_password': {'key': 'properties.hubDatabasePassword', 'type': 'str'}, 15256 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, 15257 'schema': {'key': 'properties.schema', 'type': 'SyncGroupSchema'}, 15258 'enable_conflict_logging': {'key': 'properties.enableConflictLogging', 'type': 'bool'}, 15259 'conflict_logging_retention_in_days': {'key': 'properties.conflictLoggingRetentionInDays', 'type': 'int'}, 15260 'use_private_link_connection': {'key': 'properties.usePrivateLinkConnection', 'type': 'bool'}, 15261 'private_endpoint_name': {'key': 'properties.privateEndpointName', 'type': 'str'}, 15262 } 15263 15264 def __init__( 15265 self, 15266 *, 15267 sku: Optional["Sku"] = None, 15268 interval: Optional[int] = None, 15269 conflict_resolution_policy: Optional[Union[str, "SyncConflictResolutionPolicy"]] = None, 15270 sync_database_id: Optional[str] = None, 15271 hub_database_user_name: Optional[str] = None, 15272 hub_database_password: Optional[str] = None, 15273 schema: Optional["SyncGroupSchema"] = None, 15274 enable_conflict_logging: Optional[bool] = None, 15275 conflict_logging_retention_in_days: Optional[int] = None, 15276 use_private_link_connection: Optional[bool] = None, 15277 **kwargs 15278 ): 15279 super(SyncGroup, self).__init__(**kwargs) 15280 self.sku = sku 15281 self.interval = interval 15282 self.last_sync_time = None 15283 self.conflict_resolution_policy = conflict_resolution_policy 15284 self.sync_database_id = sync_database_id 15285 self.hub_database_user_name = hub_database_user_name 15286 self.hub_database_password = hub_database_password 15287 self.sync_state = None 15288 self.schema = schema 15289 self.enable_conflict_logging = enable_conflict_logging 15290 self.conflict_logging_retention_in_days = conflict_logging_retention_in_days 15291 self.use_private_link_connection = use_private_link_connection 15292 self.private_endpoint_name = None 15293 15294 15295class SyncGroupListResult(msrest.serialization.Model): 15296 """A list of sync groups. 15297 15298 Variables are only populated by the server, and will be ignored when sending a request. 15299 15300 :ivar value: Array of results. 15301 :vartype value: list[~azure.mgmt.sql.models.SyncGroup] 15302 :ivar next_link: Link to retrieve next page of results. 15303 :vartype next_link: str 15304 """ 15305 15306 _validation = { 15307 'value': {'readonly': True}, 15308 'next_link': {'readonly': True}, 15309 } 15310 15311 _attribute_map = { 15312 'value': {'key': 'value', 'type': '[SyncGroup]'}, 15313 'next_link': {'key': 'nextLink', 'type': 'str'}, 15314 } 15315 15316 def __init__( 15317 self, 15318 **kwargs 15319 ): 15320 super(SyncGroupListResult, self).__init__(**kwargs) 15321 self.value = None 15322 self.next_link = None 15323 15324 15325class SyncGroupLogListResult(msrest.serialization.Model): 15326 """A list of sync group log properties. 15327 15328 Variables are only populated by the server, and will be ignored when sending a request. 15329 15330 :ivar value: Array of results. 15331 :vartype value: list[~azure.mgmt.sql.models.SyncGroupLogProperties] 15332 :ivar next_link: Link to retrieve next page of results. 15333 :vartype next_link: str 15334 """ 15335 15336 _validation = { 15337 'value': {'readonly': True}, 15338 'next_link': {'readonly': True}, 15339 } 15340 15341 _attribute_map = { 15342 'value': {'key': 'value', 'type': '[SyncGroupLogProperties]'}, 15343 'next_link': {'key': 'nextLink', 'type': 'str'}, 15344 } 15345 15346 def __init__( 15347 self, 15348 **kwargs 15349 ): 15350 super(SyncGroupLogListResult, self).__init__(**kwargs) 15351 self.value = None 15352 self.next_link = None 15353 15354 15355class SyncGroupLogProperties(msrest.serialization.Model): 15356 """Properties of an Azure SQL Database sync group log. 15357 15358 Variables are only populated by the server, and will be ignored when sending a request. 15359 15360 :ivar timestamp: Timestamp of the sync group log. 15361 :vartype timestamp: ~datetime.datetime 15362 :ivar type: Type of the sync group log. Possible values include: "All", "Error", "Warning", 15363 "Success". 15364 :vartype type: str or ~azure.mgmt.sql.models.SyncGroupLogType 15365 :ivar source: Source of the sync group log. 15366 :vartype source: str 15367 :ivar details: Details of the sync group log. 15368 :vartype details: str 15369 :ivar tracing_id: TracingId of the sync group log. 15370 :vartype tracing_id: str 15371 :ivar operation_status: OperationStatus of the sync group log. 15372 :vartype operation_status: str 15373 """ 15374 15375 _validation = { 15376 'timestamp': {'readonly': True}, 15377 'type': {'readonly': True}, 15378 'source': {'readonly': True}, 15379 'details': {'readonly': True}, 15380 'tracing_id': {'readonly': True}, 15381 'operation_status': {'readonly': True}, 15382 } 15383 15384 _attribute_map = { 15385 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, 15386 'type': {'key': 'type', 'type': 'str'}, 15387 'source': {'key': 'source', 'type': 'str'}, 15388 'details': {'key': 'details', 'type': 'str'}, 15389 'tracing_id': {'key': 'tracingId', 'type': 'str'}, 15390 'operation_status': {'key': 'operationStatus', 'type': 'str'}, 15391 } 15392 15393 def __init__( 15394 self, 15395 **kwargs 15396 ): 15397 super(SyncGroupLogProperties, self).__init__(**kwargs) 15398 self.timestamp = None 15399 self.type = None 15400 self.source = None 15401 self.details = None 15402 self.tracing_id = None 15403 self.operation_status = None 15404 15405 15406class SyncGroupSchema(msrest.serialization.Model): 15407 """Properties of sync group schema. 15408 15409 :param tables: List of tables in sync group schema. 15410 :type tables: list[~azure.mgmt.sql.models.SyncGroupSchemaTable] 15411 :param master_sync_member_name: Name of master sync member where the schema is from. 15412 :type master_sync_member_name: str 15413 """ 15414 15415 _attribute_map = { 15416 'tables': {'key': 'tables', 'type': '[SyncGroupSchemaTable]'}, 15417 'master_sync_member_name': {'key': 'masterSyncMemberName', 'type': 'str'}, 15418 } 15419 15420 def __init__( 15421 self, 15422 *, 15423 tables: Optional[List["SyncGroupSchemaTable"]] = None, 15424 master_sync_member_name: Optional[str] = None, 15425 **kwargs 15426 ): 15427 super(SyncGroupSchema, self).__init__(**kwargs) 15428 self.tables = tables 15429 self.master_sync_member_name = master_sync_member_name 15430 15431 15432class SyncGroupSchemaTable(msrest.serialization.Model): 15433 """Properties of table in sync group schema. 15434 15435 :param columns: List of columns in sync group schema. 15436 :type columns: list[~azure.mgmt.sql.models.SyncGroupSchemaTableColumn] 15437 :param quoted_name: Quoted name of sync group schema table. 15438 :type quoted_name: str 15439 """ 15440 15441 _attribute_map = { 15442 'columns': {'key': 'columns', 'type': '[SyncGroupSchemaTableColumn]'}, 15443 'quoted_name': {'key': 'quotedName', 'type': 'str'}, 15444 } 15445 15446 def __init__( 15447 self, 15448 *, 15449 columns: Optional[List["SyncGroupSchemaTableColumn"]] = None, 15450 quoted_name: Optional[str] = None, 15451 **kwargs 15452 ): 15453 super(SyncGroupSchemaTable, self).__init__(**kwargs) 15454 self.columns = columns 15455 self.quoted_name = quoted_name 15456 15457 15458class SyncGroupSchemaTableColumn(msrest.serialization.Model): 15459 """Properties of column in sync group table. 15460 15461 :param quoted_name: Quoted name of sync group table column. 15462 :type quoted_name: str 15463 :param data_size: Data size of the column. 15464 :type data_size: str 15465 :param data_type: Data type of the column. 15466 :type data_type: str 15467 """ 15468 15469 _attribute_map = { 15470 'quoted_name': {'key': 'quotedName', 'type': 'str'}, 15471 'data_size': {'key': 'dataSize', 'type': 'str'}, 15472 'data_type': {'key': 'dataType', 'type': 'str'}, 15473 } 15474 15475 def __init__( 15476 self, 15477 *, 15478 quoted_name: Optional[str] = None, 15479 data_size: Optional[str] = None, 15480 data_type: Optional[str] = None, 15481 **kwargs 15482 ): 15483 super(SyncGroupSchemaTableColumn, self).__init__(**kwargs) 15484 self.quoted_name = quoted_name 15485 self.data_size = data_size 15486 self.data_type = data_type 15487 15488 15489class SyncMember(ProxyResource): 15490 """An Azure SQL Database sync member. 15491 15492 Variables are only populated by the server, and will be ignored when sending a request. 15493 15494 :ivar id: Resource ID. 15495 :vartype id: str 15496 :ivar name: Resource name. 15497 :vartype name: str 15498 :ivar type: Resource type. 15499 :vartype type: str 15500 :param database_type: Database type of the sync member. Possible values include: 15501 "AzureSqlDatabase", "SqlServerDatabase". 15502 :type database_type: str or ~azure.mgmt.sql.models.SyncMemberDbType 15503 :param sync_agent_id: ARM resource id of the sync agent in the sync member. 15504 :type sync_agent_id: str 15505 :param sql_server_database_id: SQL Server database id of the sync member. 15506 :type sql_server_database_id: str 15507 :param sync_member_azure_database_resource_id: ARM resource id of the sync member logical 15508 database, for sync members in Azure. 15509 :type sync_member_azure_database_resource_id: str 15510 :param use_private_link_connection: Whether to use private link connection. 15511 :type use_private_link_connection: bool 15512 :ivar private_endpoint_name: Private endpoint name of the sync member if use private link 15513 connection is enabled, for sync members in Azure. 15514 :vartype private_endpoint_name: str 15515 :param server_name: Server name of the member database in the sync member. 15516 :type server_name: str 15517 :param database_name: Database name of the member database in the sync member. 15518 :type database_name: str 15519 :param user_name: User name of the member database in the sync member. 15520 :type user_name: str 15521 :param password: Password of the member database in the sync member. 15522 :type password: str 15523 :param sync_direction: Sync direction of the sync member. Possible values include: 15524 "Bidirectional", "OneWayMemberToHub", "OneWayHubToMember". 15525 :type sync_direction: str or ~azure.mgmt.sql.models.SyncDirection 15526 :ivar sync_state: Sync state of the sync member. Possible values include: "SyncInProgress", 15527 "SyncSucceeded", "SyncFailed", "DisabledTombstoneCleanup", "DisabledBackupRestore", 15528 "SyncSucceededWithWarnings", "SyncCancelling", "SyncCancelled", "UnProvisioned", 15529 "Provisioning", "Provisioned", "ProvisionFailed", "DeProvisioning", "DeProvisioned", 15530 "DeProvisionFailed", "Reprovisioning", "ReprovisionFailed", "UnReprovisioned". 15531 :vartype sync_state: str or ~azure.mgmt.sql.models.SyncMemberState 15532 """ 15533 15534 _validation = { 15535 'id': {'readonly': True}, 15536 'name': {'readonly': True}, 15537 'type': {'readonly': True}, 15538 'private_endpoint_name': {'readonly': True}, 15539 'sync_state': {'readonly': True}, 15540 } 15541 15542 _attribute_map = { 15543 'id': {'key': 'id', 'type': 'str'}, 15544 'name': {'key': 'name', 'type': 'str'}, 15545 'type': {'key': 'type', 'type': 'str'}, 15546 'database_type': {'key': 'properties.databaseType', 'type': 'str'}, 15547 'sync_agent_id': {'key': 'properties.syncAgentId', 'type': 'str'}, 15548 'sql_server_database_id': {'key': 'properties.sqlServerDatabaseId', 'type': 'str'}, 15549 'sync_member_azure_database_resource_id': {'key': 'properties.syncMemberAzureDatabaseResourceId', 'type': 'str'}, 15550 'use_private_link_connection': {'key': 'properties.usePrivateLinkConnection', 'type': 'bool'}, 15551 'private_endpoint_name': {'key': 'properties.privateEndpointName', 'type': 'str'}, 15552 'server_name': {'key': 'properties.serverName', 'type': 'str'}, 15553 'database_name': {'key': 'properties.databaseName', 'type': 'str'}, 15554 'user_name': {'key': 'properties.userName', 'type': 'str'}, 15555 'password': {'key': 'properties.password', 'type': 'str'}, 15556 'sync_direction': {'key': 'properties.syncDirection', 'type': 'str'}, 15557 'sync_state': {'key': 'properties.syncState', 'type': 'str'}, 15558 } 15559 15560 def __init__( 15561 self, 15562 *, 15563 database_type: Optional[Union[str, "SyncMemberDbType"]] = None, 15564 sync_agent_id: Optional[str] = None, 15565 sql_server_database_id: Optional[str] = None, 15566 sync_member_azure_database_resource_id: Optional[str] = None, 15567 use_private_link_connection: Optional[bool] = None, 15568 server_name: Optional[str] = None, 15569 database_name: Optional[str] = None, 15570 user_name: Optional[str] = None, 15571 password: Optional[str] = None, 15572 sync_direction: Optional[Union[str, "SyncDirection"]] = None, 15573 **kwargs 15574 ): 15575 super(SyncMember, self).__init__(**kwargs) 15576 self.database_type = database_type 15577 self.sync_agent_id = sync_agent_id 15578 self.sql_server_database_id = sql_server_database_id 15579 self.sync_member_azure_database_resource_id = sync_member_azure_database_resource_id 15580 self.use_private_link_connection = use_private_link_connection 15581 self.private_endpoint_name = None 15582 self.server_name = server_name 15583 self.database_name = database_name 15584 self.user_name = user_name 15585 self.password = password 15586 self.sync_direction = sync_direction 15587 self.sync_state = None 15588 15589 15590class SyncMemberListResult(msrest.serialization.Model): 15591 """A list of Azure SQL Database sync members. 15592 15593 Variables are only populated by the server, and will be ignored when sending a request. 15594 15595 :ivar value: Array of results. 15596 :vartype value: list[~azure.mgmt.sql.models.SyncMember] 15597 :ivar next_link: Link to retrieve next page of results. 15598 :vartype next_link: str 15599 """ 15600 15601 _validation = { 15602 'value': {'readonly': True}, 15603 'next_link': {'readonly': True}, 15604 } 15605 15606 _attribute_map = { 15607 'value': {'key': 'value', 'type': '[SyncMember]'}, 15608 'next_link': {'key': 'nextLink', 'type': 'str'}, 15609 } 15610 15611 def __init__( 15612 self, 15613 **kwargs 15614 ): 15615 super(SyncMemberListResult, self).__init__(**kwargs) 15616 self.value = None 15617 self.next_link = None 15618 15619 15620class SystemData(msrest.serialization.Model): 15621 """Metadata pertaining to creation and last modification of the resource. 15622 15623 :param created_by: The identity that created the resource. 15624 :type created_by: str 15625 :param created_by_type: The type of identity that created the resource. Possible values 15626 include: "User", "Application", "ManagedIdentity", "Key". 15627 :type created_by_type: str or ~azure.mgmt.sql.models.CreatedByType 15628 :param created_at: The timestamp of resource creation (UTC). 15629 :type created_at: ~datetime.datetime 15630 :param last_modified_by: The identity that last modified the resource. 15631 :type last_modified_by: str 15632 :param last_modified_by_type: The type of identity that last modified the resource. Possible 15633 values include: "User", "Application", "ManagedIdentity", "Key". 15634 :type last_modified_by_type: str or ~azure.mgmt.sql.models.CreatedByType 15635 :param last_modified_at: The timestamp of resource last modification (UTC). 15636 :type last_modified_at: ~datetime.datetime 15637 """ 15638 15639 _attribute_map = { 15640 'created_by': {'key': 'createdBy', 'type': 'str'}, 15641 'created_by_type': {'key': 'createdByType', 'type': 'str'}, 15642 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, 15643 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, 15644 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, 15645 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, 15646 } 15647 15648 def __init__( 15649 self, 15650 *, 15651 created_by: Optional[str] = None, 15652 created_by_type: Optional[Union[str, "CreatedByType"]] = None, 15653 created_at: Optional[datetime.datetime] = None, 15654 last_modified_by: Optional[str] = None, 15655 last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, 15656 last_modified_at: Optional[datetime.datetime] = None, 15657 **kwargs 15658 ): 15659 super(SystemData, self).__init__(**kwargs) 15660 self.created_by = created_by 15661 self.created_by_type = created_by_type 15662 self.created_at = created_at 15663 self.last_modified_by = last_modified_by 15664 self.last_modified_by_type = last_modified_by_type 15665 self.last_modified_at = last_modified_at 15666 15667 15668class TdeCertificate(ProxyResource): 15669 """A TDE certificate that can be uploaded into a server. 15670 15671 Variables are only populated by the server, and will be ignored when sending a request. 15672 15673 :ivar id: Resource ID. 15674 :vartype id: str 15675 :ivar name: Resource name. 15676 :vartype name: str 15677 :ivar type: Resource type. 15678 :vartype type: str 15679 :param private_blob: The base64 encoded certificate private blob. 15680 :type private_blob: str 15681 :param cert_password: The certificate password. 15682 :type cert_password: str 15683 """ 15684 15685 _validation = { 15686 'id': {'readonly': True}, 15687 'name': {'readonly': True}, 15688 'type': {'readonly': True}, 15689 } 15690 15691 _attribute_map = { 15692 'id': {'key': 'id', 'type': 'str'}, 15693 'name': {'key': 'name', 'type': 'str'}, 15694 'type': {'key': 'type', 'type': 'str'}, 15695 'private_blob': {'key': 'properties.privateBlob', 'type': 'str'}, 15696 'cert_password': {'key': 'properties.certPassword', 'type': 'str'}, 15697 } 15698 15699 def __init__( 15700 self, 15701 *, 15702 private_blob: Optional[str] = None, 15703 cert_password: Optional[str] = None, 15704 **kwargs 15705 ): 15706 super(TdeCertificate, self).__init__(**kwargs) 15707 self.private_blob = private_blob 15708 self.cert_password = cert_password 15709 15710 15711class TimeZone(ProxyResource): 15712 """Time Zone. 15713 15714 Variables are only populated by the server, and will be ignored when sending a request. 15715 15716 :ivar id: Resource ID. 15717 :vartype id: str 15718 :ivar name: Resource name. 15719 :vartype name: str 15720 :ivar type: Resource type. 15721 :vartype type: str 15722 :ivar time_zone_id: The time zone id. 15723 :vartype time_zone_id: str 15724 :ivar display_name: The time zone display name. 15725 :vartype display_name: str 15726 """ 15727 15728 _validation = { 15729 'id': {'readonly': True}, 15730 'name': {'readonly': True}, 15731 'type': {'readonly': True}, 15732 'time_zone_id': {'readonly': True}, 15733 'display_name': {'readonly': True}, 15734 } 15735 15736 _attribute_map = { 15737 'id': {'key': 'id', 'type': 'str'}, 15738 'name': {'key': 'name', 'type': 'str'}, 15739 'type': {'key': 'type', 'type': 'str'}, 15740 'time_zone_id': {'key': 'properties.timeZoneId', 'type': 'str'}, 15741 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 15742 } 15743 15744 def __init__( 15745 self, 15746 **kwargs 15747 ): 15748 super(TimeZone, self).__init__(**kwargs) 15749 self.time_zone_id = None 15750 self.display_name = None 15751 15752 15753class TimeZoneListResult(msrest.serialization.Model): 15754 """A list of time zones. 15755 15756 Variables are only populated by the server, and will be ignored when sending a request. 15757 15758 :ivar value: Array of results. 15759 :vartype value: list[~azure.mgmt.sql.models.TimeZone] 15760 :ivar next_link: Link to retrieve next page of results. 15761 :vartype next_link: str 15762 """ 15763 15764 _validation = { 15765 'value': {'readonly': True}, 15766 'next_link': {'readonly': True}, 15767 } 15768 15769 _attribute_map = { 15770 'value': {'key': 'value', 'type': '[TimeZone]'}, 15771 'next_link': {'key': 'nextLink', 'type': 'str'}, 15772 } 15773 15774 def __init__( 15775 self, 15776 **kwargs 15777 ): 15778 super(TimeZoneListResult, self).__init__(**kwargs) 15779 self.value = None 15780 self.next_link = None 15781 15782 15783class TopQueries(msrest.serialization.Model): 15784 """TopQueries. 15785 15786 Variables are only populated by the server, and will be ignored when sending a request. 15787 15788 :ivar number_of_queries: Requested number of top queries. 15789 :vartype number_of_queries: int 15790 :ivar aggregation_function: Aggregation function used to calculate query metrics. 15791 :vartype aggregation_function: str 15792 :ivar observation_metric: Metric used to rank queries. 15793 :vartype observation_metric: str 15794 :ivar interval_type: Interval type (length). Possible values include: "PT1H", "P1D". 15795 :vartype interval_type: str or ~azure.mgmt.sql.models.QueryTimeGrainType 15796 :ivar start_time: The start time for the metric (ISO-8601 format). 15797 :vartype start_time: str 15798 :ivar end_time: The end time for the metric (ISO-8601 format). 15799 :vartype end_time: str 15800 :param queries: List of top resource consuming queries with appropriate metric data. 15801 :type queries: list[~azure.mgmt.sql.models.QueryStatisticsProperties] 15802 """ 15803 15804 _validation = { 15805 'number_of_queries': {'readonly': True}, 15806 'aggregation_function': {'readonly': True}, 15807 'observation_metric': {'readonly': True}, 15808 'interval_type': {'readonly': True}, 15809 'start_time': {'readonly': True}, 15810 'end_time': {'readonly': True}, 15811 } 15812 15813 _attribute_map = { 15814 'number_of_queries': {'key': 'numberOfQueries', 'type': 'int'}, 15815 'aggregation_function': {'key': 'aggregationFunction', 'type': 'str'}, 15816 'observation_metric': {'key': 'observationMetric', 'type': 'str'}, 15817 'interval_type': {'key': 'intervalType', 'type': 'str'}, 15818 'start_time': {'key': 'startTime', 'type': 'str'}, 15819 'end_time': {'key': 'endTime', 'type': 'str'}, 15820 'queries': {'key': 'queries', 'type': '[QueryStatisticsProperties]'}, 15821 } 15822 15823 def __init__( 15824 self, 15825 *, 15826 queries: Optional[List["QueryStatisticsProperties"]] = None, 15827 **kwargs 15828 ): 15829 super(TopQueries, self).__init__(**kwargs) 15830 self.number_of_queries = None 15831 self.aggregation_function = None 15832 self.observation_metric = None 15833 self.interval_type = None 15834 self.start_time = None 15835 self.end_time = None 15836 self.queries = queries 15837 15838 15839class TopQueriesListResult(msrest.serialization.Model): 15840 """A list of top resource consuming queries on managed instance. 15841 15842 Variables are only populated by the server, and will be ignored when sending a request. 15843 15844 :ivar value: Array of results. 15845 :vartype value: list[~azure.mgmt.sql.models.TopQueries] 15846 :ivar next_link: Link to retrieve next page of results. 15847 :vartype next_link: str 15848 """ 15849 15850 _validation = { 15851 'value': {'readonly': True}, 15852 'next_link': {'readonly': True}, 15853 } 15854 15855 _attribute_map = { 15856 'value': {'key': 'value', 'type': '[TopQueries]'}, 15857 'next_link': {'key': 'nextLink', 'type': 'str'}, 15858 } 15859 15860 def __init__( 15861 self, 15862 **kwargs 15863 ): 15864 super(TopQueriesListResult, self).__init__(**kwargs) 15865 self.value = None 15866 self.next_link = None 15867 15868 15869class TransparentDataEncryption(ProxyResource): 15870 """Represents a database transparent data encryption configuration. 15871 15872 Variables are only populated by the server, and will be ignored when sending a request. 15873 15874 :ivar id: Resource ID. 15875 :vartype id: str 15876 :ivar name: Resource name. 15877 :vartype name: str 15878 :ivar type: Resource type. 15879 :vartype type: str 15880 :ivar location: Resource location. 15881 :vartype location: str 15882 :param status: The status of the database transparent data encryption. Possible values include: 15883 "Enabled", "Disabled". 15884 :type status: str or ~azure.mgmt.sql.models.TransparentDataEncryptionStatus 15885 """ 15886 15887 _validation = { 15888 'id': {'readonly': True}, 15889 'name': {'readonly': True}, 15890 'type': {'readonly': True}, 15891 'location': {'readonly': True}, 15892 } 15893 15894 _attribute_map = { 15895 'id': {'key': 'id', 'type': 'str'}, 15896 'name': {'key': 'name', 'type': 'str'}, 15897 'type': {'key': 'type', 'type': 'str'}, 15898 'location': {'key': 'location', 'type': 'str'}, 15899 'status': {'key': 'properties.status', 'type': 'str'}, 15900 } 15901 15902 def __init__( 15903 self, 15904 *, 15905 status: Optional[Union[str, "TransparentDataEncryptionStatus"]] = None, 15906 **kwargs 15907 ): 15908 super(TransparentDataEncryption, self).__init__(**kwargs) 15909 self.location = None 15910 self.status = status 15911 15912 15913class TransparentDataEncryptionActivity(ProxyResource): 15914 """Represents a database transparent data encryption Scan. 15915 15916 Variables are only populated by the server, and will be ignored when sending a request. 15917 15918 :ivar id: Resource ID. 15919 :vartype id: str 15920 :ivar name: Resource name. 15921 :vartype name: str 15922 :ivar type: Resource type. 15923 :vartype type: str 15924 :ivar location: Resource location. 15925 :vartype location: str 15926 :ivar status: The status of the database. Possible values include: "Encrypting", "Decrypting". 15927 :vartype status: str or ~azure.mgmt.sql.models.TransparentDataEncryptionActivityStatus 15928 :ivar percent_complete: The percent complete of the transparent data encryption scan for a 15929 database. 15930 :vartype percent_complete: float 15931 """ 15932 15933 _validation = { 15934 'id': {'readonly': True}, 15935 'name': {'readonly': True}, 15936 'type': {'readonly': True}, 15937 'location': {'readonly': True}, 15938 'status': {'readonly': True}, 15939 'percent_complete': {'readonly': True}, 15940 } 15941 15942 _attribute_map = { 15943 'id': {'key': 'id', 'type': 'str'}, 15944 'name': {'key': 'name', 'type': 'str'}, 15945 'type': {'key': 'type', 'type': 'str'}, 15946 'location': {'key': 'location', 'type': 'str'}, 15947 'status': {'key': 'properties.status', 'type': 'str'}, 15948 'percent_complete': {'key': 'properties.percentComplete', 'type': 'float'}, 15949 } 15950 15951 def __init__( 15952 self, 15953 **kwargs 15954 ): 15955 super(TransparentDataEncryptionActivity, self).__init__(**kwargs) 15956 self.location = None 15957 self.status = None 15958 self.percent_complete = None 15959 15960 15961class TransparentDataEncryptionActivityListResult(msrest.serialization.Model): 15962 """Represents the response to a list database transparent data encryption activity request. 15963 15964 All required parameters must be populated in order to send to Azure. 15965 15966 :param value: Required. The list of database transparent data encryption activities. 15967 :type value: list[~azure.mgmt.sql.models.TransparentDataEncryptionActivity] 15968 """ 15969 15970 _validation = { 15971 'value': {'required': True}, 15972 } 15973 15974 _attribute_map = { 15975 'value': {'key': 'value', 'type': '[TransparentDataEncryptionActivity]'}, 15976 } 15977 15978 def __init__( 15979 self, 15980 *, 15981 value: List["TransparentDataEncryptionActivity"], 15982 **kwargs 15983 ): 15984 super(TransparentDataEncryptionActivityListResult, self).__init__(**kwargs) 15985 self.value = value 15986 15987 15988class UnlinkParameters(msrest.serialization.Model): 15989 """Represents the parameters for Unlink Replication Link request. 15990 15991 :param forced_termination: Determines whether link will be terminated in a forced or a friendly 15992 way. 15993 :type forced_termination: bool 15994 """ 15995 15996 _attribute_map = { 15997 'forced_termination': {'key': 'forcedTermination', 'type': 'bool'}, 15998 } 15999 16000 def __init__( 16001 self, 16002 *, 16003 forced_termination: Optional[bool] = None, 16004 **kwargs 16005 ): 16006 super(UnlinkParameters, self).__init__(**kwargs) 16007 self.forced_termination = forced_termination 16008 16009 16010class UpdateLongTermRetentionBackupParameters(msrest.serialization.Model): 16011 """Contains the information necessary to perform long term retention backup update operation. 16012 16013 :param requested_backup_storage_redundancy: The storage redundancy type of the copied backup. 16014 Possible values include: "Geo", "Local", "Zone". 16015 :type requested_backup_storage_redundancy: str or 16016 ~azure.mgmt.sql.models.RequestedBackupStorageRedundancy 16017 """ 16018 16019 _attribute_map = { 16020 'requested_backup_storage_redundancy': {'key': 'properties.requestedBackupStorageRedundancy', 'type': 'str'}, 16021 } 16022 16023 def __init__( 16024 self, 16025 *, 16026 requested_backup_storage_redundancy: Optional[Union[str, "RequestedBackupStorageRedundancy"]] = None, 16027 **kwargs 16028 ): 16029 super(UpdateLongTermRetentionBackupParameters, self).__init__(**kwargs) 16030 self.requested_backup_storage_redundancy = requested_backup_storage_redundancy 16031 16032 16033class UpdateManagedInstanceDnsServersOperation(ProxyResource): 16034 """A recoverable managed database resource. 16035 16036 Variables are only populated by the server, and will be ignored when sending a request. 16037 16038 :ivar id: Resource ID. 16039 :vartype id: str 16040 :ivar name: Resource name. 16041 :vartype name: str 16042 :ivar type: Resource type. 16043 :vartype type: str 16044 :ivar status: The status of the DNS refresh operation. Possible values include: "Succeeded", 16045 "Failed". 16046 :vartype status: str or ~azure.mgmt.sql.models.DnsRefreshConfigurationPropertiesStatus 16047 """ 16048 16049 _validation = { 16050 'id': {'readonly': True}, 16051 'name': {'readonly': True}, 16052 'type': {'readonly': True}, 16053 'status': {'readonly': True}, 16054 } 16055 16056 _attribute_map = { 16057 'id': {'key': 'id', 'type': 'str'}, 16058 'name': {'key': 'name', 'type': 'str'}, 16059 'type': {'key': 'type', 'type': 'str'}, 16060 'status': {'key': 'properties.status', 'type': 'str'}, 16061 } 16062 16063 def __init__( 16064 self, 16065 **kwargs 16066 ): 16067 super(UpdateManagedInstanceDnsServersOperation, self).__init__(**kwargs) 16068 self.status = None 16069 16070 16071class UpsertManagedServerOperationParameters(msrest.serialization.Model): 16072 """UpsertManagedServerOperationParameters. 16073 16074 :param family: 16075 :type family: str 16076 :param tier: 16077 :type tier: str 16078 :param v_cores: 16079 :type v_cores: int 16080 :param storage_size_in_gb: 16081 :type storage_size_in_gb: int 16082 """ 16083 16084 _attribute_map = { 16085 'family': {'key': 'family', 'type': 'str'}, 16086 'tier': {'key': 'tier', 'type': 'str'}, 16087 'v_cores': {'key': 'vCores', 'type': 'int'}, 16088 'storage_size_in_gb': {'key': 'storageSizeInGB', 'type': 'int'}, 16089 } 16090 16091 def __init__( 16092 self, 16093 *, 16094 family: Optional[str] = None, 16095 tier: Optional[str] = None, 16096 v_cores: Optional[int] = None, 16097 storage_size_in_gb: Optional[int] = None, 16098 **kwargs 16099 ): 16100 super(UpsertManagedServerOperationParameters, self).__init__(**kwargs) 16101 self.family = family 16102 self.tier = tier 16103 self.v_cores = v_cores 16104 self.storage_size_in_gb = storage_size_in_gb 16105 16106 16107class UpsertManagedServerOperationStep(msrest.serialization.Model): 16108 """UpsertManagedServerOperationStep. 16109 16110 :param order: 16111 :type order: int 16112 :param name: 16113 :type name: str 16114 :param status: Possible values include: "NotStarted", "InProgress", "SlowedDown", "Completed", 16115 "Failed", "Canceled". 16116 :type status: str or ~azure.mgmt.sql.models.UpsertManagedServerOperationStepStatus 16117 """ 16118 16119 _attribute_map = { 16120 'order': {'key': 'order', 'type': 'int'}, 16121 'name': {'key': 'name', 'type': 'str'}, 16122 'status': {'key': 'status', 'type': 'str'}, 16123 } 16124 16125 def __init__( 16126 self, 16127 *, 16128 order: Optional[int] = None, 16129 name: Optional[str] = None, 16130 status: Optional[Union[str, "UpsertManagedServerOperationStepStatus"]] = None, 16131 **kwargs 16132 ): 16133 super(UpsertManagedServerOperationStep, self).__init__(**kwargs) 16134 self.order = order 16135 self.name = name 16136 self.status = status 16137 16138 16139class Usage(msrest.serialization.Model): 16140 """ARM usage. 16141 16142 Variables are only populated by the server, and will be ignored when sending a request. 16143 16144 :ivar id: Resource ID. 16145 :vartype id: str 16146 :ivar name: Resource name. 16147 :vartype name: ~azure.mgmt.sql.models.Name 16148 :ivar type: Resource type. 16149 :vartype type: str 16150 :ivar unit: Usage unit. 16151 :vartype unit: str 16152 :ivar current_value: Usage current value. 16153 :vartype current_value: int 16154 :ivar limit: Usage limit. 16155 :vartype limit: int 16156 :ivar requested_limit: Usage requested limit. 16157 :vartype requested_limit: int 16158 """ 16159 16160 _validation = { 16161 'id': {'readonly': True}, 16162 'name': {'readonly': True}, 16163 'type': {'readonly': True}, 16164 'unit': {'readonly': True}, 16165 'current_value': {'readonly': True}, 16166 'limit': {'readonly': True}, 16167 'requested_limit': {'readonly': True}, 16168 } 16169 16170 _attribute_map = { 16171 'id': {'key': 'id', 'type': 'str'}, 16172 'name': {'key': 'name', 'type': 'Name'}, 16173 'type': {'key': 'type', 'type': 'str'}, 16174 'unit': {'key': 'unit', 'type': 'str'}, 16175 'current_value': {'key': 'currentValue', 'type': 'int'}, 16176 'limit': {'key': 'limit', 'type': 'int'}, 16177 'requested_limit': {'key': 'requestedLimit', 'type': 'int'}, 16178 } 16179 16180 def __init__( 16181 self, 16182 **kwargs 16183 ): 16184 super(Usage, self).__init__(**kwargs) 16185 self.id = None 16186 self.name = None 16187 self.type = None 16188 self.unit = None 16189 self.current_value = None 16190 self.limit = None 16191 self.requested_limit = None 16192 16193 16194class UsageListResult(msrest.serialization.Model): 16195 """A list of usages. 16196 16197 Variables are only populated by the server, and will be ignored when sending a request. 16198 16199 :ivar value: Array of results. 16200 :vartype value: list[~azure.mgmt.sql.models.Usage] 16201 :ivar next_link: Link to retrieve next page of results. 16202 :vartype next_link: str 16203 """ 16204 16205 _validation = { 16206 'value': {'readonly': True}, 16207 'next_link': {'readonly': True}, 16208 } 16209 16210 _attribute_map = { 16211 'value': {'key': 'value', 'type': '[Usage]'}, 16212 'next_link': {'key': 'nextLink', 'type': 'str'}, 16213 } 16214 16215 def __init__( 16216 self, 16217 **kwargs 16218 ): 16219 super(UsageListResult, self).__init__(**kwargs) 16220 self.value = None 16221 self.next_link = None 16222 16223 16224class UserIdentity(msrest.serialization.Model): 16225 """Azure Active Directory identity configuration for a resource. 16226 16227 Variables are only populated by the server, and will be ignored when sending a request. 16228 16229 :ivar principal_id: The Azure Active Directory principal id. 16230 :vartype principal_id: str 16231 :ivar client_id: The Azure Active Directory client id. 16232 :vartype client_id: str 16233 """ 16234 16235 _validation = { 16236 'principal_id': {'readonly': True}, 16237 'client_id': {'readonly': True}, 16238 } 16239 16240 _attribute_map = { 16241 'principal_id': {'key': 'principalId', 'type': 'str'}, 16242 'client_id': {'key': 'clientId', 'type': 'str'}, 16243 } 16244 16245 def __init__( 16246 self, 16247 **kwargs 16248 ): 16249 super(UserIdentity, self).__init__(**kwargs) 16250 self.principal_id = None 16251 self.client_id = None 16252 16253 16254class VirtualCluster(TrackedResource): 16255 """An Azure SQL virtual cluster. 16256 16257 Variables are only populated by the server, and will be ignored when sending a request. 16258 16259 All required parameters must be populated in order to send to Azure. 16260 16261 :ivar id: Resource ID. 16262 :vartype id: str 16263 :ivar name: Resource name. 16264 :vartype name: str 16265 :ivar type: Resource type. 16266 :vartype type: str 16267 :param location: Required. Resource location. 16268 :type location: str 16269 :param tags: A set of tags. Resource tags. 16270 :type tags: dict[str, str] 16271 :ivar subnet_id: Subnet resource ID for the virtual cluster. 16272 :vartype subnet_id: str 16273 :param family: If the service has different generations of hardware, for the same SKU, then 16274 that can be captured here. 16275 :type family: str 16276 :ivar child_resources: List of resources in this virtual cluster. 16277 :vartype child_resources: list[str] 16278 :param maintenance_configuration_id: Specifies maintenance configuration id to apply to this 16279 virtual cluster. 16280 :type maintenance_configuration_id: str 16281 """ 16282 16283 _validation = { 16284 'id': {'readonly': True}, 16285 'name': {'readonly': True}, 16286 'type': {'readonly': True}, 16287 'location': {'required': True}, 16288 'subnet_id': {'readonly': True}, 16289 'child_resources': {'readonly': True}, 16290 } 16291 16292 _attribute_map = { 16293 'id': {'key': 'id', 'type': 'str'}, 16294 'name': {'key': 'name', 'type': 'str'}, 16295 'type': {'key': 'type', 'type': 'str'}, 16296 'location': {'key': 'location', 'type': 'str'}, 16297 'tags': {'key': 'tags', 'type': '{str}'}, 16298 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, 16299 'family': {'key': 'properties.family', 'type': 'str'}, 16300 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, 16301 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 16302 } 16303 16304 def __init__( 16305 self, 16306 *, 16307 location: str, 16308 tags: Optional[Dict[str, str]] = None, 16309 family: Optional[str] = None, 16310 maintenance_configuration_id: Optional[str] = None, 16311 **kwargs 16312 ): 16313 super(VirtualCluster, self).__init__(location=location, tags=tags, **kwargs) 16314 self.subnet_id = None 16315 self.family = family 16316 self.child_resources = None 16317 self.maintenance_configuration_id = maintenance_configuration_id 16318 16319 16320class VirtualClusterListResult(msrest.serialization.Model): 16321 """A list of virtual clusters. 16322 16323 Variables are only populated by the server, and will be ignored when sending a request. 16324 16325 :ivar value: Array of results. 16326 :vartype value: list[~azure.mgmt.sql.models.VirtualCluster] 16327 :ivar next_link: Link to retrieve next page of results. 16328 :vartype next_link: str 16329 """ 16330 16331 _validation = { 16332 'value': {'readonly': True}, 16333 'next_link': {'readonly': True}, 16334 } 16335 16336 _attribute_map = { 16337 'value': {'key': 'value', 'type': '[VirtualCluster]'}, 16338 'next_link': {'key': 'nextLink', 'type': 'str'}, 16339 } 16340 16341 def __init__( 16342 self, 16343 **kwargs 16344 ): 16345 super(VirtualClusterListResult, self).__init__(**kwargs) 16346 self.value = None 16347 self.next_link = None 16348 16349 16350class VirtualClusterUpdate(msrest.serialization.Model): 16351 """An update request for an Azure SQL Database virtual cluster. 16352 16353 Variables are only populated by the server, and will be ignored when sending a request. 16354 16355 :param tags: A set of tags. Resource tags. 16356 :type tags: dict[str, str] 16357 :ivar subnet_id: Subnet resource ID for the virtual cluster. 16358 :vartype subnet_id: str 16359 :param family: If the service has different generations of hardware, for the same SKU, then 16360 that can be captured here. 16361 :type family: str 16362 :ivar child_resources: List of resources in this virtual cluster. 16363 :vartype child_resources: list[str] 16364 :param maintenance_configuration_id: Specifies maintenance configuration id to apply to this 16365 virtual cluster. 16366 :type maintenance_configuration_id: str 16367 """ 16368 16369 _validation = { 16370 'subnet_id': {'readonly': True}, 16371 'child_resources': {'readonly': True}, 16372 } 16373 16374 _attribute_map = { 16375 'tags': {'key': 'tags', 'type': '{str}'}, 16376 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, 16377 'family': {'key': 'properties.family', 'type': 'str'}, 16378 'child_resources': {'key': 'properties.childResources', 'type': '[str]'}, 16379 'maintenance_configuration_id': {'key': 'properties.maintenanceConfigurationId', 'type': 'str'}, 16380 } 16381 16382 def __init__( 16383 self, 16384 *, 16385 tags: Optional[Dict[str, str]] = None, 16386 family: Optional[str] = None, 16387 maintenance_configuration_id: Optional[str] = None, 16388 **kwargs 16389 ): 16390 super(VirtualClusterUpdate, self).__init__(**kwargs) 16391 self.tags = tags 16392 self.subnet_id = None 16393 self.family = family 16394 self.child_resources = None 16395 self.maintenance_configuration_id = maintenance_configuration_id 16396 16397 16398class VirtualNetworkRule(ProxyResource): 16399 """A virtual network rule. 16400 16401 Variables are only populated by the server, and will be ignored when sending a request. 16402 16403 :ivar id: Resource ID. 16404 :vartype id: str 16405 :ivar name: Resource name. 16406 :vartype name: str 16407 :ivar type: Resource type. 16408 :vartype type: str 16409 :param virtual_network_subnet_id: The ARM resource id of the virtual network subnet. 16410 :type virtual_network_subnet_id: str 16411 :param ignore_missing_vnet_service_endpoint: Create firewall rule before the virtual network 16412 has vnet service endpoint enabled. 16413 :type ignore_missing_vnet_service_endpoint: bool 16414 :ivar state: Virtual Network Rule State. Possible values include: "Initializing", "InProgress", 16415 "Ready", "Failed", "Deleting", "Unknown". 16416 :vartype state: str or ~azure.mgmt.sql.models.VirtualNetworkRuleState 16417 """ 16418 16419 _validation = { 16420 'id': {'readonly': True}, 16421 'name': {'readonly': True}, 16422 'type': {'readonly': True}, 16423 'state': {'readonly': True}, 16424 } 16425 16426 _attribute_map = { 16427 'id': {'key': 'id', 'type': 'str'}, 16428 'name': {'key': 'name', 'type': 'str'}, 16429 'type': {'key': 'type', 'type': 'str'}, 16430 'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'}, 16431 'ignore_missing_vnet_service_endpoint': {'key': 'properties.ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, 16432 'state': {'key': 'properties.state', 'type': 'str'}, 16433 } 16434 16435 def __init__( 16436 self, 16437 *, 16438 virtual_network_subnet_id: Optional[str] = None, 16439 ignore_missing_vnet_service_endpoint: Optional[bool] = None, 16440 **kwargs 16441 ): 16442 super(VirtualNetworkRule, self).__init__(**kwargs) 16443 self.virtual_network_subnet_id = virtual_network_subnet_id 16444 self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint 16445 self.state = None 16446 16447 16448class VirtualNetworkRuleListResult(msrest.serialization.Model): 16449 """A list of virtual network rules. 16450 16451 Variables are only populated by the server, and will be ignored when sending a request. 16452 16453 :ivar value: Array of results. 16454 :vartype value: list[~azure.mgmt.sql.models.VirtualNetworkRule] 16455 :ivar next_link: Link to retrieve next page of results. 16456 :vartype next_link: str 16457 """ 16458 16459 _validation = { 16460 'value': {'readonly': True}, 16461 'next_link': {'readonly': True}, 16462 } 16463 16464 _attribute_map = { 16465 'value': {'key': 'value', 'type': '[VirtualNetworkRule]'}, 16466 'next_link': {'key': 'nextLink', 'type': 'str'}, 16467 } 16468 16469 def __init__( 16470 self, 16471 **kwargs 16472 ): 16473 super(VirtualNetworkRuleListResult, self).__init__(**kwargs) 16474 self.value = None 16475 self.next_link = None 16476 16477 16478class VulnerabilityAssessmentRecurringScansProperties(msrest.serialization.Model): 16479 """Properties of a Vulnerability Assessment recurring scans. 16480 16481 :param is_enabled: Recurring scans state. 16482 :type is_enabled: bool 16483 :param email_subscription_admins: Specifies that the schedule scan notification will be is sent 16484 to the subscription administrators. 16485 :type email_subscription_admins: bool 16486 :param emails: Specifies an array of e-mail addresses to which the scan notification is sent. 16487 :type emails: list[str] 16488 """ 16489 16490 _attribute_map = { 16491 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 16492 'email_subscription_admins': {'key': 'emailSubscriptionAdmins', 'type': 'bool'}, 16493 'emails': {'key': 'emails', 'type': '[str]'}, 16494 } 16495 16496 def __init__( 16497 self, 16498 *, 16499 is_enabled: Optional[bool] = None, 16500 email_subscription_admins: Optional[bool] = True, 16501 emails: Optional[List[str]] = None, 16502 **kwargs 16503 ): 16504 super(VulnerabilityAssessmentRecurringScansProperties, self).__init__(**kwargs) 16505 self.is_enabled = is_enabled 16506 self.email_subscription_admins = email_subscription_admins 16507 self.emails = emails 16508 16509 16510class VulnerabilityAssessmentScanError(msrest.serialization.Model): 16511 """Properties of a vulnerability assessment scan error. 16512 16513 Variables are only populated by the server, and will be ignored when sending a request. 16514 16515 :ivar code: The error code. 16516 :vartype code: str 16517 :ivar message: The error message. 16518 :vartype message: str 16519 """ 16520 16521 _validation = { 16522 'code': {'readonly': True}, 16523 'message': {'readonly': True}, 16524 } 16525 16526 _attribute_map = { 16527 'code': {'key': 'code', 'type': 'str'}, 16528 'message': {'key': 'message', 'type': 'str'}, 16529 } 16530 16531 def __init__( 16532 self, 16533 **kwargs 16534 ): 16535 super(VulnerabilityAssessmentScanError, self).__init__(**kwargs) 16536 self.code = None 16537 self.message = None 16538 16539 16540class VulnerabilityAssessmentScanRecord(ProxyResource): 16541 """A vulnerability assessment scan record. 16542 16543 Variables are only populated by the server, and will be ignored when sending a request. 16544 16545 :ivar id: Resource ID. 16546 :vartype id: str 16547 :ivar name: Resource name. 16548 :vartype name: str 16549 :ivar type: Resource type. 16550 :vartype type: str 16551 :ivar scan_id: The scan ID. 16552 :vartype scan_id: str 16553 :ivar trigger_type: The scan trigger type. Possible values include: "OnDemand", "Recurring". 16554 :vartype trigger_type: str or ~azure.mgmt.sql.models.VulnerabilityAssessmentScanTriggerType 16555 :ivar state: The scan status. Possible values include: "Passed", "Failed", "FailedToRun", 16556 "InProgress". 16557 :vartype state: str or ~azure.mgmt.sql.models.VulnerabilityAssessmentScanState 16558 :ivar start_time: The scan start time (UTC). 16559 :vartype start_time: ~datetime.datetime 16560 :ivar end_time: The scan end time (UTC). 16561 :vartype end_time: ~datetime.datetime 16562 :ivar errors: The scan errors. 16563 :vartype errors: list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanError] 16564 :ivar storage_container_path: The scan results storage container path. 16565 :vartype storage_container_path: str 16566 :ivar number_of_failed_security_checks: The number of failed security checks. 16567 :vartype number_of_failed_security_checks: int 16568 """ 16569 16570 _validation = { 16571 'id': {'readonly': True}, 16572 'name': {'readonly': True}, 16573 'type': {'readonly': True}, 16574 'scan_id': {'readonly': True}, 16575 'trigger_type': {'readonly': True}, 16576 'state': {'readonly': True}, 16577 'start_time': {'readonly': True}, 16578 'end_time': {'readonly': True}, 16579 'errors': {'readonly': True}, 16580 'storage_container_path': {'readonly': True}, 16581 'number_of_failed_security_checks': {'readonly': True}, 16582 } 16583 16584 _attribute_map = { 16585 'id': {'key': 'id', 'type': 'str'}, 16586 'name': {'key': 'name', 'type': 'str'}, 16587 'type': {'key': 'type', 'type': 'str'}, 16588 'scan_id': {'key': 'properties.scanId', 'type': 'str'}, 16589 'trigger_type': {'key': 'properties.triggerType', 'type': 'str'}, 16590 'state': {'key': 'properties.state', 'type': 'str'}, 16591 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 16592 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, 16593 'errors': {'key': 'properties.errors', 'type': '[VulnerabilityAssessmentScanError]'}, 16594 'storage_container_path': {'key': 'properties.storageContainerPath', 'type': 'str'}, 16595 'number_of_failed_security_checks': {'key': 'properties.numberOfFailedSecurityChecks', 'type': 'int'}, 16596 } 16597 16598 def __init__( 16599 self, 16600 **kwargs 16601 ): 16602 super(VulnerabilityAssessmentScanRecord, self).__init__(**kwargs) 16603 self.scan_id = None 16604 self.trigger_type = None 16605 self.state = None 16606 self.start_time = None 16607 self.end_time = None 16608 self.errors = None 16609 self.storage_container_path = None 16610 self.number_of_failed_security_checks = None 16611 16612 16613class VulnerabilityAssessmentScanRecordListResult(msrest.serialization.Model): 16614 """A list of vulnerability assessment scan records. 16615 16616 Variables are only populated by the server, and will be ignored when sending a request. 16617 16618 :ivar value: Array of results. 16619 :vartype value: list[~azure.mgmt.sql.models.VulnerabilityAssessmentScanRecord] 16620 :ivar next_link: Link to retrieve next page of results. 16621 :vartype next_link: str 16622 """ 16623 16624 _validation = { 16625 'value': {'readonly': True}, 16626 'next_link': {'readonly': True}, 16627 } 16628 16629 _attribute_map = { 16630 'value': {'key': 'value', 'type': '[VulnerabilityAssessmentScanRecord]'}, 16631 'next_link': {'key': 'nextLink', 'type': 'str'}, 16632 } 16633 16634 def __init__( 16635 self, 16636 **kwargs 16637 ): 16638 super(VulnerabilityAssessmentScanRecordListResult, self).__init__(**kwargs) 16639 self.value = None 16640 self.next_link = None 16641 16642 16643class WorkloadClassifier(ProxyResource): 16644 """Workload classifier operations for a data warehouse. 16645 16646 Variables are only populated by the server, and will be ignored when sending a request. 16647 16648 :ivar id: Resource ID. 16649 :vartype id: str 16650 :ivar name: Resource name. 16651 :vartype name: str 16652 :ivar type: Resource type. 16653 :vartype type: str 16654 :param member_name: The workload classifier member name. 16655 :type member_name: str 16656 :param label: The workload classifier label. 16657 :type label: str 16658 :param context: The workload classifier context. 16659 :type context: str 16660 :param start_time: The workload classifier start time for classification. 16661 :type start_time: str 16662 :param end_time: The workload classifier end time for classification. 16663 :type end_time: str 16664 :param importance: The workload classifier importance. 16665 :type importance: str 16666 """ 16667 16668 _validation = { 16669 'id': {'readonly': True}, 16670 'name': {'readonly': True}, 16671 'type': {'readonly': True}, 16672 } 16673 16674 _attribute_map = { 16675 'id': {'key': 'id', 'type': 'str'}, 16676 'name': {'key': 'name', 'type': 'str'}, 16677 'type': {'key': 'type', 'type': 'str'}, 16678 'member_name': {'key': 'properties.memberName', 'type': 'str'}, 16679 'label': {'key': 'properties.label', 'type': 'str'}, 16680 'context': {'key': 'properties.context', 'type': 'str'}, 16681 'start_time': {'key': 'properties.startTime', 'type': 'str'}, 16682 'end_time': {'key': 'properties.endTime', 'type': 'str'}, 16683 'importance': {'key': 'properties.importance', 'type': 'str'}, 16684 } 16685 16686 def __init__( 16687 self, 16688 *, 16689 member_name: Optional[str] = None, 16690 label: Optional[str] = None, 16691 context: Optional[str] = None, 16692 start_time: Optional[str] = None, 16693 end_time: Optional[str] = None, 16694 importance: Optional[str] = None, 16695 **kwargs 16696 ): 16697 super(WorkloadClassifier, self).__init__(**kwargs) 16698 self.member_name = member_name 16699 self.label = label 16700 self.context = context 16701 self.start_time = start_time 16702 self.end_time = end_time 16703 self.importance = importance 16704 16705 16706class WorkloadClassifierListResult(msrest.serialization.Model): 16707 """A list of workload classifiers for a workload group. 16708 16709 Variables are only populated by the server, and will be ignored when sending a request. 16710 16711 :ivar value: Array of results. 16712 :vartype value: list[~azure.mgmt.sql.models.WorkloadClassifier] 16713 :ivar next_link: Link to retrieve next page of results. 16714 :vartype next_link: str 16715 """ 16716 16717 _validation = { 16718 'value': {'readonly': True}, 16719 'next_link': {'readonly': True}, 16720 } 16721 16722 _attribute_map = { 16723 'value': {'key': 'value', 'type': '[WorkloadClassifier]'}, 16724 'next_link': {'key': 'nextLink', 'type': 'str'}, 16725 } 16726 16727 def __init__( 16728 self, 16729 **kwargs 16730 ): 16731 super(WorkloadClassifierListResult, self).__init__(**kwargs) 16732 self.value = None 16733 self.next_link = None 16734 16735 16736class WorkloadGroup(ProxyResource): 16737 """Workload group operations for a data warehouse. 16738 16739 Variables are only populated by the server, and will be ignored when sending a request. 16740 16741 :ivar id: Resource ID. 16742 :vartype id: str 16743 :ivar name: Resource name. 16744 :vartype name: str 16745 :ivar type: Resource type. 16746 :vartype type: str 16747 :param min_resource_percent: The workload group minimum percentage resource. 16748 :type min_resource_percent: int 16749 :param max_resource_percent: The workload group cap percentage resource. 16750 :type max_resource_percent: int 16751 :param min_resource_percent_per_request: The workload group request minimum grant percentage. 16752 :type min_resource_percent_per_request: float 16753 :param max_resource_percent_per_request: The workload group request maximum grant percentage. 16754 :type max_resource_percent_per_request: float 16755 :param importance: The workload group importance level. 16756 :type importance: str 16757 :param query_execution_timeout: The workload group query execution timeout. 16758 :type query_execution_timeout: int 16759 """ 16760 16761 _validation = { 16762 'id': {'readonly': True}, 16763 'name': {'readonly': True}, 16764 'type': {'readonly': True}, 16765 } 16766 16767 _attribute_map = { 16768 'id': {'key': 'id', 'type': 'str'}, 16769 'name': {'key': 'name', 'type': 'str'}, 16770 'type': {'key': 'type', 'type': 'str'}, 16771 'min_resource_percent': {'key': 'properties.minResourcePercent', 'type': 'int'}, 16772 'max_resource_percent': {'key': 'properties.maxResourcePercent', 'type': 'int'}, 16773 'min_resource_percent_per_request': {'key': 'properties.minResourcePercentPerRequest', 'type': 'float'}, 16774 'max_resource_percent_per_request': {'key': 'properties.maxResourcePercentPerRequest', 'type': 'float'}, 16775 'importance': {'key': 'properties.importance', 'type': 'str'}, 16776 'query_execution_timeout': {'key': 'properties.queryExecutionTimeout', 'type': 'int'}, 16777 } 16778 16779 def __init__( 16780 self, 16781 *, 16782 min_resource_percent: Optional[int] = None, 16783 max_resource_percent: Optional[int] = None, 16784 min_resource_percent_per_request: Optional[float] = None, 16785 max_resource_percent_per_request: Optional[float] = None, 16786 importance: Optional[str] = None, 16787 query_execution_timeout: Optional[int] = None, 16788 **kwargs 16789 ): 16790 super(WorkloadGroup, self).__init__(**kwargs) 16791 self.min_resource_percent = min_resource_percent 16792 self.max_resource_percent = max_resource_percent 16793 self.min_resource_percent_per_request = min_resource_percent_per_request 16794 self.max_resource_percent_per_request = max_resource_percent_per_request 16795 self.importance = importance 16796 self.query_execution_timeout = query_execution_timeout 16797 16798 16799class WorkloadGroupListResult(msrest.serialization.Model): 16800 """A list of workload groups. 16801 16802 Variables are only populated by the server, and will be ignored when sending a request. 16803 16804 :ivar value: Array of results. 16805 :vartype value: list[~azure.mgmt.sql.models.WorkloadGroup] 16806 :ivar next_link: Link to retrieve next page of results. 16807 :vartype next_link: str 16808 """ 16809 16810 _validation = { 16811 'value': {'readonly': True}, 16812 'next_link': {'readonly': True}, 16813 } 16814 16815 _attribute_map = { 16816 'value': {'key': 'value', 'type': '[WorkloadGroup]'}, 16817 'next_link': {'key': 'nextLink', 'type': 'str'}, 16818 } 16819 16820 def __init__( 16821 self, 16822 **kwargs 16823 ): 16824 super(WorkloadGroupListResult, self).__init__(**kwargs) 16825 self.value = None 16826 self.next_link = None 16827