Skip to content

Commit 039d6f1

Browse files
author
SDK Automation
committed
Generated from bb35b2c450fee8353c7e1fe95553d387b6a05cf7
Fixed json prettier issues.
1 parent 31d622e commit 039d6f1

18 files changed

+310
-484
lines changed

sdk/rdbms/azure-mgmt-rdbms/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is the Microsoft Azure RDBMS Management Client Library.
44
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5-
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)
5+
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77

88
# Usage

sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/_my_sql_management_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from .operations import ServerAdministratorsOperations
2525
from .operations import LocationBasedPerformanceTierOperations
2626
from .operations import CheckNameAvailabilityOperations
27+
from .operations import ServerSecurityAlertPoliciesOperations
2728
from .operations import Operations
2829
from .operations import QueryTextsOperations
2930
from .operations import TopQueryStatisticsOperations
@@ -35,7 +36,6 @@
3536
from .operations import PrivateEndpointConnectionsOperations
3637
from .operations import PrivateLinkResourcesOperations
3738
from .operations import ServerKeysOperations
38-
from .operations import ServerSecurityAlertPoliciesOperations
3939
from . import models
4040

4141

@@ -65,6 +65,8 @@ class MySQLManagementClient(MySQLManagementClientOperationsMixin, SDKClient):
6565
:vartype location_based_performance_tier: azure.mgmt.rdbms.mysql.operations.LocationBasedPerformanceTierOperations
6666
:ivar check_name_availability: CheckNameAvailability operations
6767
:vartype check_name_availability: azure.mgmt.rdbms.mysql.operations.CheckNameAvailabilityOperations
68+
:ivar server_security_alert_policies: ServerSecurityAlertPolicies operations
69+
:vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.operations.ServerSecurityAlertPoliciesOperations
6870
:ivar operations: Operations operations
6971
:vartype operations: azure.mgmt.rdbms.mysql.operations.Operations
7072
:ivar query_texts: QueryTexts operations
@@ -87,8 +89,6 @@ class MySQLManagementClient(MySQLManagementClientOperationsMixin, SDKClient):
8789
:vartype private_link_resources: azure.mgmt.rdbms.mysql.operations.PrivateLinkResourcesOperations
8890
:ivar server_keys: ServerKeys operations
8991
:vartype server_keys: azure.mgmt.rdbms.mysql.operations.ServerKeysOperations
90-
:ivar server_security_alert_policies: ServerSecurityAlertPolicies operations
91-
:vartype server_security_alert_policies: azure.mgmt.rdbms.mysql.operations.ServerSecurityAlertPoliciesOperations
9292
9393
:param credentials: Credentials needed for the client to connect to Azure.
9494
:type credentials: :mod:`A msrestazure Credentials
@@ -128,6 +128,8 @@ def __init__(
128128
self._client, self.config, self._serialize, self._deserialize)
129129
self.check_name_availability = CheckNameAvailabilityOperations(
130130
self._client, self.config, self._serialize, self._deserialize)
131+
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
132+
self._client, self.config, self._serialize, self._deserialize)
131133
self.operations = Operations(
132134
self._client, self.config, self._serialize, self._deserialize)
133135
self.query_texts = QueryTextsOperations(
@@ -150,5 +152,3 @@ def __init__(
150152
self._client, self.config, self._serialize, self._deserialize)
151153
self.server_keys = ServerKeysOperations(
152154
self._client, self.config, self._serialize, self._deserialize)
153-
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
154-
self._client, self.config, self._serialize, self._deserialize)

sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
from ._models_py3 import ServerUpdateParameters
5555
from ._models_py3 import Sku
5656
from ._models_py3 import StorageProfile
57-
from ._models_py3 import SystemData
5857
from ._models_py3 import TagsObject
5958
from ._models_py3 import TopQueryStatisticsInput
6059
from ._models_py3 import TrackedResource
@@ -106,7 +105,6 @@
106105
from ._models import ServerUpdateParameters
107106
from ._models import Sku
108107
from ._models import StorageProfile
109-
from ._models import SystemData
110108
from ._models import TagsObject
111109
from ._models import TopQueryStatisticsInput
112110
from ._models import TrackedResource
@@ -127,7 +125,6 @@
127125
from ._paged_models import ServerAdministratorResourcePaged
128126
from ._paged_models import ServerKeyPaged
129127
from ._paged_models import ServerPaged
130-
from ._paged_models import ServerSecurityAlertPolicyPaged
131128
from ._paged_models import VirtualNetworkRulePaged
132129
from ._paged_models import WaitStatisticPaged
133130
from ._my_sql_management_client_enums import (
@@ -147,7 +144,6 @@
147144
VirtualNetworkRuleState,
148145
OperationOrigin,
149146
ServerSecurityAlertPolicyState,
150-
CreatedByType,
151147
)
152148

153149
__all__ = [
@@ -195,7 +191,6 @@
195191
'ServerUpdateParameters',
196192
'Sku',
197193
'StorageProfile',
198-
'SystemData',
199194
'TagsObject',
200195
'TopQueryStatisticsInput',
201196
'TrackedResource',
@@ -218,7 +213,6 @@
218213
'PrivateEndpointConnectionPaged',
219214
'PrivateLinkResourcePaged',
220215
'ServerKeyPaged',
221-
'ServerSecurityAlertPolicyPaged',
222216
'ServerVersion',
223217
'SslEnforcementEnum',
224218
'MinimalTlsVersionEnum',
@@ -235,5 +229,4 @@
235229
'VirtualNetworkRuleState',
236230
'OperationOrigin',
237231
'ServerSecurityAlertPolicyState',
238-
'CreatedByType',
239232
]

sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models.py

Lines changed: 33 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def __init__(self, **kwargs):
158158
class CloudError(Model):
159159
"""An error response from the Batch service.
160160
161-
:param error: Error message
161+
:param error:
162162
:type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse
163163
"""
164164

@@ -1864,30 +1864,57 @@ class ServerSecurityAlertPolicy(ProxyResource):
18641864
enabled or disabled. Possible values include: 'Enabled', 'Disabled'
18651865
:type state: str or
18661866
~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState
1867-
:ivar system_data:
1868-
:vartype system_data: ~azure.mgmt.rdbms.mysql.models.SystemData
1867+
:param disabled_alerts: Specifies an array of alerts that are disabled.
1868+
Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
1869+
Access_Anomaly
1870+
:type disabled_alerts: list[str]
1871+
:param email_addresses: Specifies an array of e-mail addresses to which
1872+
the alert is sent.
1873+
:type email_addresses: list[str]
1874+
:param email_account_admins: Specifies that the alert is sent to the
1875+
account administrators.
1876+
:type email_account_admins: bool
1877+
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
1878+
https://MyAccount.blob.core.windows.net). This blob storage will hold all
1879+
Threat Detection audit logs.
1880+
:type storage_endpoint: str
1881+
:param storage_account_access_key: Specifies the identifier key of the
1882+
Threat Detection audit storage account.
1883+
:type storage_account_access_key: str
1884+
:param retention_days: Specifies the number of days to keep in the Threat
1885+
Detection audit logs.
1886+
:type retention_days: int
18691887
"""
18701888

18711889
_validation = {
18721890
'id': {'readonly': True},
18731891
'name': {'readonly': True},
18741892
'type': {'readonly': True},
18751893
'state': {'required': True},
1876-
'system_data': {'readonly': True},
18771894
}
18781895

18791896
_attribute_map = {
18801897
'id': {'key': 'id', 'type': 'str'},
18811898
'name': {'key': 'name', 'type': 'str'},
18821899
'type': {'key': 'type', 'type': 'str'},
18831900
'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'},
1884-
'system_data': {'key': 'systemData', 'type': 'SystemData'},
1901+
'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'},
1902+
'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'},
1903+
'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'},
1904+
'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'},
1905+
'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'},
1906+
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'},
18851907
}
18861908

18871909
def __init__(self, **kwargs):
18881910
super(ServerSecurityAlertPolicy, self).__init__(**kwargs)
18891911
self.state = kwargs.get('state', None)
1890-
self.system_data = None
1912+
self.disabled_alerts = kwargs.get('disabled_alerts', None)
1913+
self.email_addresses = kwargs.get('email_addresses', None)
1914+
self.email_account_admins = kwargs.get('email_account_admins', None)
1915+
self.storage_endpoint = kwargs.get('storage_endpoint', None)
1916+
self.storage_account_access_key = kwargs.get('storage_account_access_key', None)
1917+
self.retention_days = kwargs.get('retention_days', None)
18911918

18921919

18931920
class ServerUpdateParameters(Model):
@@ -2023,47 +2050,6 @@ def __init__(self, **kwargs):
20232050
self.storage_autogrow = kwargs.get('storage_autogrow', None)
20242051

20252052

2026-
class SystemData(Model):
2027-
"""Metadata pertaining to creation and last modification of the resource.
2028-
2029-
:param created_by: The identity that created the resource.
2030-
:type created_by: str
2031-
:param created_by_type: The type of identity that created the resource.
2032-
Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
2033-
:type created_by_type: str or ~azure.mgmt.rdbms.mysql.models.CreatedByType
2034-
:param created_at: The timestamp of resource creation (UTC).
2035-
:type created_at: datetime
2036-
:param last_modified_by: The identity that last modified the resource.
2037-
:type last_modified_by: str
2038-
:param last_modified_by_type: The type of identity that last modified the
2039-
resource. Possible values include: 'User', 'Application',
2040-
'ManagedIdentity', 'Key'
2041-
:type last_modified_by_type: str or
2042-
~azure.mgmt.rdbms.mysql.models.CreatedByType
2043-
:param last_modified_at: The type of identity that last modified the
2044-
resource.
2045-
:type last_modified_at: datetime
2046-
"""
2047-
2048-
_attribute_map = {
2049-
'created_by': {'key': 'createdBy', 'type': 'str'},
2050-
'created_by_type': {'key': 'createdByType', 'type': 'str'},
2051-
'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
2052-
'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
2053-
'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
2054-
'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
2055-
}
2056-
2057-
def __init__(self, **kwargs):
2058-
super(SystemData, self).__init__(**kwargs)
2059-
self.created_by = kwargs.get('created_by', None)
2060-
self.created_by_type = kwargs.get('created_by_type', None)
2061-
self.created_at = kwargs.get('created_at', None)
2062-
self.last_modified_by = kwargs.get('last_modified_by', None)
2063-
self.last_modified_by_type = kwargs.get('last_modified_by_type', None)
2064-
self.last_modified_at = kwargs.get('last_modified_at', None)
2065-
2066-
20672053
class TagsObject(Model):
20682054
"""Tags object for patch operations.
20692055

sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_models_py3.py

Lines changed: 34 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def __init__(self, **kwargs) -> None:
158158
class CloudError(Model):
159159
"""An error response from the Batch service.
160160
161-
:param error: Error message
161+
:param error:
162162
:type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse
163163
"""
164164

@@ -1864,30 +1864,57 @@ class ServerSecurityAlertPolicy(ProxyResource):
18641864
enabled or disabled. Possible values include: 'Enabled', 'Disabled'
18651865
:type state: str or
18661866
~azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicyState
1867-
:ivar system_data:
1868-
:vartype system_data: ~azure.mgmt.rdbms.mysql.models.SystemData
1867+
:param disabled_alerts: Specifies an array of alerts that are disabled.
1868+
Allowed values are: Sql_Injection, Sql_Injection_Vulnerability,
1869+
Access_Anomaly
1870+
:type disabled_alerts: list[str]
1871+
:param email_addresses: Specifies an array of e-mail addresses to which
1872+
the alert is sent.
1873+
:type email_addresses: list[str]
1874+
:param email_account_admins: Specifies that the alert is sent to the
1875+
account administrators.
1876+
:type email_account_admins: bool
1877+
:param storage_endpoint: Specifies the blob storage endpoint (e.g.
1878+
https://MyAccount.blob.core.windows.net). This blob storage will hold all
1879+
Threat Detection audit logs.
1880+
:type storage_endpoint: str
1881+
:param storage_account_access_key: Specifies the identifier key of the
1882+
Threat Detection audit storage account.
1883+
:type storage_account_access_key: str
1884+
:param retention_days: Specifies the number of days to keep in the Threat
1885+
Detection audit logs.
1886+
:type retention_days: int
18691887
"""
18701888

18711889
_validation = {
18721890
'id': {'readonly': True},
18731891
'name': {'readonly': True},
18741892
'type': {'readonly': True},
18751893
'state': {'required': True},
1876-
'system_data': {'readonly': True},
18771894
}
18781895

18791896
_attribute_map = {
18801897
'id': {'key': 'id', 'type': 'str'},
18811898
'name': {'key': 'name', 'type': 'str'},
18821899
'type': {'key': 'type', 'type': 'str'},
18831900
'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'},
1884-
'system_data': {'key': 'systemData', 'type': 'SystemData'},
1901+
'disabled_alerts': {'key': 'properties.disabledAlerts', 'type': '[str]'},
1902+
'email_addresses': {'key': 'properties.emailAddresses', 'type': '[str]'},
1903+
'email_account_admins': {'key': 'properties.emailAccountAdmins', 'type': 'bool'},
1904+
'storage_endpoint': {'key': 'properties.storageEndpoint', 'type': 'str'},
1905+
'storage_account_access_key': {'key': 'properties.storageAccountAccessKey', 'type': 'str'},
1906+
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'},
18851907
}
18861908

1887-
def __init__(self, *, state, **kwargs) -> None:
1909+
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:
18881910
super(ServerSecurityAlertPolicy, self).__init__(**kwargs)
18891911
self.state = state
1890-
self.system_data = None
1912+
self.disabled_alerts = disabled_alerts
1913+
self.email_addresses = email_addresses
1914+
self.email_account_admins = email_account_admins
1915+
self.storage_endpoint = storage_endpoint
1916+
self.storage_account_access_key = storage_account_access_key
1917+
self.retention_days = retention_days
18911918

18921919

18931920
class ServerUpdateParameters(Model):
@@ -2023,47 +2050,6 @@ def __init__(self, *, backup_retention_days: int=None, geo_redundant_backup=None
20232050
self.storage_autogrow = storage_autogrow
20242051

20252052

2026-
class SystemData(Model):
2027-
"""Metadata pertaining to creation and last modification of the resource.
2028-
2029-
:param created_by: The identity that created the resource.
2030-
:type created_by: str
2031-
:param created_by_type: The type of identity that created the resource.
2032-
Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
2033-
:type created_by_type: str or ~azure.mgmt.rdbms.mysql.models.CreatedByType
2034-
:param created_at: The timestamp of resource creation (UTC).
2035-
:type created_at: datetime
2036-
:param last_modified_by: The identity that last modified the resource.
2037-
:type last_modified_by: str
2038-
:param last_modified_by_type: The type of identity that last modified the
2039-
resource. Possible values include: 'User', 'Application',
2040-
'ManagedIdentity', 'Key'
2041-
:type last_modified_by_type: str or
2042-
~azure.mgmt.rdbms.mysql.models.CreatedByType
2043-
:param last_modified_at: The type of identity that last modified the
2044-
resource.
2045-
:type last_modified_at: datetime
2046-
"""
2047-
2048-
_attribute_map = {
2049-
'created_by': {'key': 'createdBy', 'type': 'str'},
2050-
'created_by_type': {'key': 'createdByType', 'type': 'str'},
2051-
'created_at': {'key': 'createdAt', 'type': 'iso-8601'},
2052-
'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'},
2053-
'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'},
2054-
'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'},
2055-
}
2056-
2057-
def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None:
2058-
super(SystemData, self).__init__(**kwargs)
2059-
self.created_by = created_by
2060-
self.created_by_type = created_by_type
2061-
self.created_at = created_at
2062-
self.last_modified_by = last_modified_by
2063-
self.last_modified_by_type = last_modified_by_type
2064-
self.last_modified_at = last_modified_at
2065-
2066-
20672053
class TagsObject(Model):
20682054
"""Tags object for patch operations.
20692055

sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_my_sql_management_client_enums.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class MinimalTlsVersionEnum(str, Enum):
3535

3636
class InfrastructureEncryption(str, Enum):
3737

38-
enabled = "Enabled" #: Default value for single layer of encryption for data at rest.
39-
disabled = "Disabled" #: Additional (2nd) layer of encryption for data at rest
38+
enabled = "Enabled"
39+
disabled = "Disabled"
4040

4141

4242
class PublicNetworkAccessEnum(str, Enum):
@@ -119,11 +119,3 @@ class ServerSecurityAlertPolicyState(str, Enum):
119119

120120
enabled = "Enabled"
121121
disabled = "Disabled"
122-
123-
124-
class CreatedByType(str, Enum):
125-
126-
user = "User"
127-
application = "Application"
128-
managed_identity = "ManagedIdentity"
129-
key = "Key"

sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/models/_paged_models.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -220,16 +220,3 @@ class ServerKeyPaged(Paged):
220220
def __init__(self, *args, **kwargs):
221221

222222
super(ServerKeyPaged, self).__init__(*args, **kwargs)
223-
class ServerSecurityAlertPolicyPaged(Paged):
224-
"""
225-
A paging container for iterating over a list of :class:`ServerSecurityAlertPolicy <azure.mgmt.rdbms.mysql.models.ServerSecurityAlertPolicy>` object
226-
"""
227-
228-
_attribute_map = {
229-
'next_link': {'key': 'nextLink', 'type': 'str'},
230-
'current_page': {'key': 'value', 'type': '[ServerSecurityAlertPolicy]'}
231-
}
232-
233-
def __init__(self, *args, **kwargs):
234-
235-
super(ServerSecurityAlertPolicyPaged, self).__init__(*args, **kwargs)

0 commit comments

Comments
 (0)