Skip to content

Commit 31d622e

Browse files
author
SDK Automation
committed
Update from release/v3
1 parent 2e2d63a commit 31d622e

File tree

11 files changed

+405
-95
lines changed

11 files changed

+405
-95
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 [azure sdk python release](https://aka.ms/azsdk/python/all).
5+
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)
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,7 +24,6 @@
2424
from .operations import ServerAdministratorsOperations
2525
from .operations import LocationBasedPerformanceTierOperations
2626
from .operations import CheckNameAvailabilityOperations
27-
from .operations import ServerSecurityAlertPoliciesOperations
2827
from .operations import Operations
2928
from .operations import QueryTextsOperations
3029
from .operations import TopQueryStatisticsOperations
@@ -36,6 +35,7 @@
3635
from .operations import PrivateEndpointConnectionsOperations
3736
from .operations import PrivateLinkResourcesOperations
3837
from .operations import ServerKeysOperations
38+
from .operations import ServerSecurityAlertPoliciesOperations
3939
from . import models
4040

4141

@@ -65,8 +65,6 @@ 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
7068
:ivar operations: Operations operations
7169
:vartype operations: azure.mgmt.rdbms.mysql.operations.Operations
7270
:ivar query_texts: QueryTexts operations
@@ -89,6 +87,8 @@ class MySQLManagementClient(MySQLManagementClientOperationsMixin, SDKClient):
8987
:vartype private_link_resources: azure.mgmt.rdbms.mysql.operations.PrivateLinkResourcesOperations
9088
:ivar server_keys: ServerKeys operations
9189
: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,8 +128,6 @@ 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)
133131
self.operations = Operations(
134132
self._client, self.config, self._serialize, self._deserialize)
135133
self.query_texts = QueryTextsOperations(
@@ -152,3 +150,5 @@ def __init__(
152150
self._client, self.config, self._serialize, self._deserialize)
153151
self.server_keys = ServerKeysOperations(
154152
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
from ._models_py3 import ServerUpdateParameters
5555
from ._models_py3 import Sku
5656
from ._models_py3 import StorageProfile
57+
from ._models_py3 import SystemData
5758
from ._models_py3 import TagsObject
5859
from ._models_py3 import TopQueryStatisticsInput
5960
from ._models_py3 import TrackedResource
@@ -105,6 +106,7 @@
105106
from ._models import ServerUpdateParameters
106107
from ._models import Sku
107108
from ._models import StorageProfile
109+
from ._models import SystemData
108110
from ._models import TagsObject
109111
from ._models import TopQueryStatisticsInput
110112
from ._models import TrackedResource
@@ -125,6 +127,7 @@
125127
from ._paged_models import ServerAdministratorResourcePaged
126128
from ._paged_models import ServerKeyPaged
127129
from ._paged_models import ServerPaged
130+
from ._paged_models import ServerSecurityAlertPolicyPaged
128131
from ._paged_models import VirtualNetworkRulePaged
129132
from ._paged_models import WaitStatisticPaged
130133
from ._my_sql_management_client_enums import (
@@ -144,6 +147,7 @@
144147
VirtualNetworkRuleState,
145148
OperationOrigin,
146149
ServerSecurityAlertPolicyState,
150+
CreatedByType,
147151
)
148152

149153
__all__ = [
@@ -191,6 +195,7 @@
191195
'ServerUpdateParameters',
192196
'Sku',
193197
'StorageProfile',
198+
'SystemData',
194199
'TagsObject',
195200
'TopQueryStatisticsInput',
196201
'TrackedResource',
@@ -213,6 +218,7 @@
213218
'PrivateEndpointConnectionPaged',
214219
'PrivateLinkResourcePaged',
215220
'ServerKeyPaged',
221+
'ServerSecurityAlertPolicyPaged',
216222
'ServerVersion',
217223
'SslEnforcementEnum',
218224
'MinimalTlsVersionEnum',
@@ -229,4 +235,5 @@
229235
'VirtualNetworkRuleState',
230236
'OperationOrigin',
231237
'ServerSecurityAlertPolicyState',
238+
'CreatedByType',
232239
]

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

Lines changed: 47 additions & 33 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:
161+
:param error: Error message
162162
:type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse
163163
"""
164164

@@ -1864,57 +1864,30 @@ 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-
: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
1867+
:ivar system_data:
1868+
:vartype system_data: ~azure.mgmt.rdbms.mysql.models.SystemData
18871869
"""
18881870

18891871
_validation = {
18901872
'id': {'readonly': True},
18911873
'name': {'readonly': True},
18921874
'type': {'readonly': True},
18931875
'state': {'required': True},
1876+
'system_data': {'readonly': True},
18941877
}
18951878

18961879
_attribute_map = {
18971880
'id': {'key': 'id', 'type': 'str'},
18981881
'name': {'key': 'name', 'type': 'str'},
18991882
'type': {'key': 'type', 'type': 'str'},
19001883
'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'},
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'},
1884+
'system_data': {'key': 'systemData', 'type': 'SystemData'},
19071885
}
19081886

19091887
def __init__(self, **kwargs):
19101888
super(ServerSecurityAlertPolicy, self).__init__(**kwargs)
19111889
self.state = kwargs.get('state', 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)
1890+
self.system_data = None
19181891

19191892

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

20522025

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+
20532067
class TagsObject(Model):
20542068
"""Tags object for patch operations.
20552069

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

Lines changed: 48 additions & 34 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:
161+
:param error: Error message
162162
:type error: ~azure.mgmt.rdbms.mysql.models.ErrorResponse
163163
"""
164164

@@ -1864,57 +1864,30 @@ 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-
: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
1867+
:ivar system_data:
1868+
:vartype system_data: ~azure.mgmt.rdbms.mysql.models.SystemData
18871869
"""
18881870

18891871
_validation = {
18901872
'id': {'readonly': True},
18911873
'name': {'readonly': True},
18921874
'type': {'readonly': True},
18931875
'state': {'required': True},
1876+
'system_data': {'readonly': True},
18941877
}
18951878

18961879
_attribute_map = {
18971880
'id': {'key': 'id', 'type': 'str'},
18981881
'name': {'key': 'name', 'type': 'str'},
18991882
'type': {'key': 'type', 'type': 'str'},
19001883
'state': {'key': 'properties.state', 'type': 'ServerSecurityAlertPolicyState'},
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'},
1884+
'system_data': {'key': 'systemData', 'type': 'SystemData'},
19071885
}
19081886

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:
1887+
def __init__(self, *, state, **kwargs) -> None:
19101888
super(ServerSecurityAlertPolicy, self).__init__(**kwargs)
19111889
self.state = state
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
1890+
self.system_data = None
19181891

19191892

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

20522025

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+
20532067
class TagsObject(Model):
20542068
"""Tags object for patch operations.
20552069

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

Lines changed: 10 additions & 2 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"
39-
disabled = "Disabled"
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
4040

4141

4242
class PublicNetworkAccessEnum(str, Enum):
@@ -119,3 +119,11 @@ 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,16 @@ 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)