Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6205793
[AutoPR sql/resource-manager] Adding new value to VA baseline name (#…
AutorestCI May 31, 2018
bff5610
[AutoPR sql/resource-manager] Adding serverSecurityAlertPolicies.json…
AutorestCI Jun 11, 2018
0c50434
[AutoPR sql/resource-manager] Add BackupShortTermRetentionListResult …
AutorestCI Jun 12, 2018
a393fa9
[AutoPR sql/resource-manager] Fixed inconsistent definitions for SQL …
AutorestCI Jun 13, 2018
0f759c6
Generated from a82909eab07e7a383975701b09d09a5fd0dfb967 (#2751)
AutorestCI Jun 14, 2018
9e863b4
[AutoPR sql/resource-manager] Adding Swagger for POST APIs used to up…
AutorestCI Jun 21, 2018
ba12168
Generated from 7ddb78c4a14cb8b09c405b2ae17b49ff26c23bf5 (#2892)
AutorestCI Jul 18, 2018
9a3f5fd
[AutoPR sql/resource-manager] [DO NOT MERGE] Add DatabaseVulnerabilit…
AutorestCI Jul 27, 2018
39fcd43
Generated from 359416b0d2b799768c78568f0ecc5acab439c956 (#3077)
AutorestCI Aug 6, 2018
833e961
[AutoPR sql/resource-manager] [DO NOT MERGE] Adding VA support for ma…
AutorestCI Aug 9, 2018
8524bd9
Generated from 05549665a5f0b09fc5e7058ffec2c09d91bf3ab0 (#3127)
AutorestCI Aug 16, 2018
e429c66
[AutoPR sql/resource-manager] New Cmdlets for Management.Sql to allow…
AutorestCI Sep 4, 2018
41e6b1c
[AutoPR sql/resource-manager] Remove sensitivityLabels from sql readm…
AutorestCI Sep 10, 2018
6cca24a
Merge branch 'master' into restapi_auto_sql/resource-manager
lmazuel Sep 12, 2018
da75ff6
Generated from ae5e50da51607b6c59745d9d2969c4f6acba0d81 (#3326)
AutorestCI Sep 17, 2018
e240aa1
[AutoPR sql/resource-manager] Swagger Changes to Add DnsZonePartner a…
AutorestCI Sep 18, 2018
28f17e7
[AutoPR sql/resource-manager] Adding VA support for manged instance -…
AutorestCI Oct 4, 2018
5c36a58
Merge branch 'master' into restapi_auto_sql/resource-manager
lmazuel Oct 17, 2018
08184b8
Packaging update of azure-mgmt-sql
azuresdkci Oct 17, 2018
99a20f9
Update version.py
lmazuel Oct 17, 2018
6d3693f
Update HISTORY.rst
lmazuel Oct 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[AutoPR sql/resource-manager] Adding serverSecurityAlertPolicies.json…
… from pr (#2697)

* Generated from 462e8a68d6f8e8d169a1bf4340ca64ebdbce314d

Fix validation error

* Generated from bd7ff47b3e8549566c77c4ebc7de1e86703ac29e

fixed comments

* Generated from bd7ff47b3e8549566c77c4ebc7de1e86703ac29e

fixed comments
  • Loading branch information
AutorestCI authored Jun 11, 2018
commit bff56107ef35b8f197cefc254e3ca59c84e90975
5 changes: 5 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
from .server_automatic_tuning_py3 import ServerAutomaticTuning
from .server_dns_alias_py3 import ServerDnsAlias
from .server_dns_alias_acquisition_py3 import ServerDnsAliasAcquisition
from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy
from .restore_point_py3 import RestorePoint
from .create_database_restore_point_definition_py3 import CreateDatabaseRestorePointDefinition
from .database_operation_py3 import DatabaseOperation
Expand Down Expand Up @@ -243,6 +244,7 @@
from .server_automatic_tuning import ServerAutomaticTuning
from .server_dns_alias import ServerDnsAlias
from .server_dns_alias_acquisition import ServerDnsAliasAcquisition
from .server_security_alert_policy import ServerSecurityAlertPolicy
from .restore_point import RestorePoint
from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition
from .database_operation import DatabaseOperation
Expand Down Expand Up @@ -388,6 +390,7 @@
ManagedDatabaseCreateMode,
AutomaticTuningServerMode,
AutomaticTuningServerReason,
SecurityAlertState,
RestorePointType,
ManagementOperationState,
MaxSizeUnit,
Expand Down Expand Up @@ -508,6 +511,7 @@
'ServerAutomaticTuning',
'ServerDnsAlias',
'ServerDnsAliasAcquisition',
'ServerSecurityAlertPolicy',
'RestorePoint',
'CreateDatabaseRestorePointDefinition',
'DatabaseOperation',
Expand Down Expand Up @@ -652,6 +656,7 @@
'ManagedDatabaseCreateMode',
'AutomaticTuningServerMode',
'AutomaticTuningServerReason',
'SecurityAlertState',
'RestorePointType',
'ManagementOperationState',
'MaxSizeUnit',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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.sql.models.SecurityAlertState
: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': 'SecurityAlertState'},
'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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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.sql.models.SecurityAlertState
: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': 'SecurityAlertState'},
'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
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,12 @@ class AutomaticTuningServerReason(str, Enum):
auto_configured = "AutoConfigured"


class SecurityAlertState(str, Enum):

enabled = "Enabled"
disabled = "Disabled"


class RestorePointType(str, Enum):

continuous = "CONTINUOUS"
Expand Down
2 changes: 2 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from .managed_databases_operations import ManagedDatabasesOperations
from .server_automatic_tuning_operations import ServerAutomaticTuningOperations
from .server_dns_aliases_operations import ServerDnsAliasesOperations
from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations
from .restore_points_operations import RestorePointsOperations
from .database_operations import DatabaseOperations
from .elastic_pool_operations import ElasticPoolOperations
Expand Down Expand Up @@ -120,6 +121,7 @@
'ManagedDatabasesOperations',
'ServerAutomaticTuningOperations',
'ServerDnsAliasesOperations',
'ServerSecurityAlertPoliciesOperations',
'RestorePointsOperations',
'DatabaseOperations',
'ElasticPoolOperations',
Expand Down
Loading