|
| 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 |
| 5 | +# license information. |
| 6 | +# |
| 7 | +# Code generated by Microsoft (R) AutoRest Code Generator. |
| 8 | +# Changes may cause incorrect behavior and will be lost if the code is |
| 9 | +# regenerated. |
| 10 | +# -------------------------------------------------------------------------- |
| 11 | + |
| 12 | +from .proxy_resource import ProxyResource |
| 13 | + |
| 14 | + |
| 15 | +class ServerSecurityAlertPolicy(ProxyResource): |
| 16 | + """A server security alert policy. |
| 17 | +
|
| 18 | + Variables are only populated by the server, and will be ignored when |
| 19 | + sending a request. |
| 20 | +
|
| 21 | + All required parameters must be populated in order to send to Azure. |
| 22 | +
|
| 23 | + :ivar id: Resource ID. |
| 24 | + :vartype id: str |
| 25 | + :ivar name: Resource name. |
| 26 | + :vartype name: str |
| 27 | + :ivar type: Resource type. |
| 28 | + :vartype type: str |
| 29 | + :param state: Required. Specifies the state of the policy, whether it is |
| 30 | + enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled' |
| 31 | + :type state: str or ~azure.mgmt.sql.models.SecurityAlertPolicyState |
| 32 | + :param disabled_alerts: Specifies an array of alerts that are disabled. |
| 33 | + Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, |
| 34 | + Access_Anomaly |
| 35 | + :type disabled_alerts: list[str] |
| 36 | + :param email_addresses: Specifies an array of e-mail addresses to which |
| 37 | + the alert is sent. |
| 38 | + :type email_addresses: list[str] |
| 39 | + :param email_account_admins: Specifies that the alert is sent to the |
| 40 | + account administrators. |
| 41 | + :type email_account_admins: bool |
| 42 | + :param storage_endpoint: Specifies the blob storage endpoint (e.g. |
| 43 | + https://MyAccount.blob.core.windows.net). This blob storage will hold all |
| 44 | + Threat Detection audit logs. |
| 45 | + :type storage_endpoint: str |
| 46 | + :param storage_account_access_key: Specifies the identifier key of the |
| 47 | + Threat Detection audit storage account. |
| 48 | + :type storage_account_access_key: str |
| 49 | + :param retention_days: Specifies the number of days to keep in the Threat |
| 50 | + Detection audit logs. |
| 51 | + :type retention_days: int |
| 52 | + """ |
| 53 | + |
| 54 | + _validation = { |
| 55 | + 'id': {'readonly': True}, |
| 56 | + 'name': {'readonly': True}, |
| 57 | + 'type': {'readonly': True}, |
| 58 | + 'state': {'required': True}, |
| 59 | + } |
| 60 | + |
| 61 | + _attribute_map = { |
| 62 | + 'id': {'key': 'id', 'type': 'str'}, |
| 63 | + 'name': {'key': 'name', 'type': 'str'}, |
| 64 | + 'type': {'key': 'type', 'type': 'str'}, |
| 65 | + 'state': {'key': 'properties.state', 'type': 'SecurityAlertPolicyState'}, |
| 66 | + 'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, |
| 67 | + 'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, |
| 68 | + 'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, |
| 69 | + 'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, |
| 70 | + 'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, |
| 71 | + 'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, |
| 72 | + } |
| 73 | + |
| 74 | + def __init__(self, **kwargs): |
| 75 | + super(ServerSecurityAlertPolicy, self).__init__(**kwargs) |
| 76 | + self.state = kwargs.get('state', None) |
| 77 | + self.disabled_alerts = kwargs.get('disabled_alerts', None) |
| 78 | + self.email_addresses = kwargs.get('email_addresses', None) |
| 79 | + self.email_account_admins = kwargs.get('email_account_admins', None) |
| 80 | + self.storage_endpoint = kwargs.get('storage_endpoint', None) |
| 81 | + self.storage_account_access_key = kwargs.get('storage_account_access_key', None) |
| 82 | + self.retention_days = kwargs.get('retention_days', None) |
0 commit comments