-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add serverSecurityAlertPolicies APIs for MySQL servers
- Loading branch information
1 parent
bc0bbaa
commit 63d80a9
Showing
16 changed files
with
467 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_security_alert_policy.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .proxy_resource import ProxyResource | ||
|
||
|
||
class ServerSecurityAlertPolicy(ProxyResource): | ||
"""A server security alert policy. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:ivar id: Resource ID | ||
:vartype id: str | ||
:ivar name: Resource name. | ||
:vartype name: str | ||
:ivar type: Resource type. | ||
:vartype type: str | ||
:param state: Required. Specifies the state of the policy, whether it is | ||
enabled or disabled. Possible values include: 'Enabled', 'Disabled' | ||
:type state: str or | ||
~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState | ||
:param disabled_alerts: Specifies an array of alerts that are disabled. | ||
Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, | ||
Access_Anomaly | ||
:type disabled_alerts: list[str] | ||
:param email_addresses: Specifies an array of e-mail addresses to which | ||
the alert is sent. | ||
:type email_addresses: list[str] | ||
:param email_account_admins: Specifies that the alert is sent to the | ||
account administrators. | ||
:type email_account_admins: bool | ||
:param storage_endpoint: Specifies the blob storage endpoint (e.g. | ||
https://MyAccount.blob.core.windows.net). This blob storage will hold all | ||
Threat Detection audit logs. | ||
:type storage_endpoint: str | ||
:param storage_account_access_key: Specifies the identifier key of the | ||
Threat Detection audit storage account. | ||
:type storage_account_access_key: str | ||
:param retention_days: Specifies the number of days to keep in the Threat | ||
Detection audit logs. | ||
:type retention_days: int | ||
""" | ||
|
||
_validation = { | ||
'id': {'readonly': True}, | ||
'name': {'readonly': True}, | ||
'type': {'readonly': True}, | ||
'state': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, | ||
'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, | ||
'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, | ||
'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, | ||
'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, | ||
'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, | ||
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ServerSecurityAlertPolicy, self).__init__(**kwargs) | ||
self.state = kwargs.get('state', None) | ||
self.disabled_alerts = kwargs.get('disabled_alerts', None) | ||
self.email_addresses = kwargs.get('email_addresses', None) | ||
self.email_account_admins = kwargs.get('email_account_admins', None) | ||
self.storage_endpoint = kwargs.get('storage_endpoint', None) | ||
self.storage_account_access_key = kwargs.get('storage_account_access_key', None) | ||
self.retention_days = kwargs.get('retention_days', None) |
83 changes: 83 additions & 0 deletions
83
azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/server_security_alert_policy_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .proxy_resource_py3 import ProxyResource | ||
|
||
|
||
class ServerSecurityAlertPolicy(ProxyResource): | ||
"""A server security alert policy. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:ivar id: Resource ID | ||
:vartype id: str | ||
:ivar name: Resource name. | ||
:vartype name: str | ||
:ivar type: Resource type. | ||
:vartype type: str | ||
:param state: Required. Specifies the state of the policy, whether it is | ||
enabled or disabled. Possible values include: 'Enabled', 'Disabled' | ||
:type state: str or | ||
~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState | ||
:param disabled_alerts: Specifies an array of alerts that are disabled. | ||
Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, | ||
Access_Anomaly | ||
:type disabled_alerts: list[str] | ||
:param email_addresses: Specifies an array of e-mail addresses to which | ||
the alert is sent. | ||
:type email_addresses: list[str] | ||
:param email_account_admins: Specifies that the alert is sent to the | ||
account administrators. | ||
:type email_account_admins: bool | ||
:param storage_endpoint: Specifies the blob storage endpoint (e.g. | ||
https://MyAccount.blob.core.windows.net). This blob storage will hold all | ||
Threat Detection audit logs. | ||
:type storage_endpoint: str | ||
:param storage_account_access_key: Specifies the identifier key of the | ||
Threat Detection audit storage account. | ||
:type storage_account_access_key: str | ||
:param retention_days: Specifies the number of days to keep in the Threat | ||
Detection audit logs. | ||
:type retention_days: int | ||
""" | ||
|
||
_validation = { | ||
'id': {'readonly': True}, | ||
'name': {'readonly': True}, | ||
'type': {'readonly': True}, | ||
'state': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'}, | ||
'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'}, | ||
'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'}, | ||
'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'}, | ||
'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'}, | ||
'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'}, | ||
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'}, | ||
} | ||
|
||
def __init__(self, *, state, disabled_alerts=None, email_addresses=None, email_account_admins: bool=None, storage_endpoint: str=None, storage_account_access_key: str=None, retention_days: int=None, **kwargs) -> None: | ||
super(ServerSecurityAlertPolicy, self).__init__(**kwargs) | ||
self.state = state | ||
self.disabled_alerts = disabled_alerts | ||
self.email_addresses = email_addresses | ||
self.email_account_admins = email_account_admins | ||
self.storage_endpoint = storage_endpoint | ||
self.storage_account_access_key = storage_account_access_key | ||
self.retention_days = retention_days |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.