From 2073f8c0ab1cda6676e23f2320aee6a69d3b0fab Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 25 Apr 2018 20:33:12 +0000 Subject: [PATCH 1/2] Generated from d72c609ceddfc1089e98c9adf30007a0b5fdba61 Remove unused parameters --- .../mgmt/rdbms/postgresql/models/__init__.py | 11 + .../postgresql/models/configuration_py3.py | 2 +- .../rdbms/postgresql/models/database_py3.py | 2 +- .../postgresql/models/firewall_rule_py3.py | 2 +- .../mgmt/rdbms/postgresql/models/log_file.py | 4 - .../rdbms/postgresql/models/log_file_py3.py | 8 +- .../models/performance_tier_properties.py | 18 -- .../models/performance_tier_properties_py3.py | 20 +- ...rformance_tier_service_level_objectives.py | 18 ++ ...mance_tier_service_level_objectives_py3.py | 20 +- .../postgre_sql_management_client_enums.py | 6 + .../mgmt/rdbms/postgresql/models/resource.py | 45 ++++ .../rdbms/postgresql/models/resource_py3.py | 45 ++++ .../models/server_properties_for_create.py | 4 +- .../server_properties_for_create_py3.py | 4 +- .../server_properties_for_geo_restore.py | 51 +++++ .../server_properties_for_geo_restore_py3.py | 51 +++++ .../models/server_properties_for_restore.py | 2 +- .../server_properties_for_restore_py3.py | 2 +- .../models/server_security_alert_policy.py | 83 +++++++ .../server_security_alert_policy_py3.py | 83 +++++++ .../postgresql/models/tracked_resource_py3.py | 2 +- .../rdbms/postgresql/operations/__init__.py | 2 + .../check_name_availability_operations.py | 4 +- .../operations/configurations_operations.py | 4 +- .../operations/databases_operations.py | 4 +- .../operations/firewall_rules_operations.py | 4 +- ...ation_based_performance_tier_operations.py | 4 +- .../operations/log_files_operations.py | 4 +- .../rdbms/postgresql/operations/operations.py | 4 +- ...rver_security_alert_policies_operations.py | 212 ++++++++++++++++++ .../operations/servers_operations.py | 4 +- .../postgre_sql_management_client.py | 13 +- .../azure/mgmt/rdbms/postgresql/version.py | 2 +- 34 files changed, 665 insertions(+), 79 deletions(-) create mode 100644 azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource.py create mode 100644 azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource_py3.py create mode 100644 azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore.py create mode 100644 azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore_py3.py create mode 100644 azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy.py create mode 100644 azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy_py3.py create mode 100644 azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/server_security_alert_policies_operations.py diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py index 618ceb6faf62..6c210635df6a 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py @@ -16,6 +16,7 @@ from .server_properties_for_create_py3 import ServerPropertiesForCreate from .server_properties_for_default_create_py3 import ServerPropertiesForDefaultCreate from .server_properties_for_restore_py3 import ServerPropertiesForRestore + from .server_properties_for_geo_restore_py3 import ServerPropertiesForGeoRestore from .sku_py3 import Sku from .server_py3 import Server from .server_for_create_py3 import ServerForCreate @@ -31,6 +32,8 @@ from .performance_tier_properties_py3 import PerformanceTierProperties from .name_availability_request_py3 import NameAvailabilityRequest from .name_availability_py3 import NameAvailability + from .resource_py3 import Resource + from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy except (SyntaxError, ImportError): from .proxy_resource import ProxyResource from .tracked_resource import TrackedResource @@ -38,6 +41,7 @@ from .server_properties_for_create import ServerPropertiesForCreate from .server_properties_for_default_create import ServerPropertiesForDefaultCreate from .server_properties_for_restore import ServerPropertiesForRestore + from .server_properties_for_geo_restore import ServerPropertiesForGeoRestore from .sku import Sku from .server import Server from .server_for_create import ServerForCreate @@ -53,6 +57,8 @@ from .performance_tier_properties import PerformanceTierProperties from .name_availability_request import NameAvailabilityRequest from .name_availability import NameAvailability + from .resource import Resource + from .server_security_alert_policy import ServerSecurityAlertPolicy from .server_paged import ServerPaged from .firewall_rule_paged import FirewallRulePaged from .database_paged import DatabasePaged @@ -66,6 +72,7 @@ GeoRedundantBackup, SkuTier, OperationOrigin, + ServerSecurityAlertPolicyState, ) __all__ = [ @@ -75,6 +82,7 @@ 'ServerPropertiesForCreate', 'ServerPropertiesForDefaultCreate', 'ServerPropertiesForRestore', + 'ServerPropertiesForGeoRestore', 'Sku', 'Server', 'ServerForCreate', @@ -90,6 +98,8 @@ 'PerformanceTierProperties', 'NameAvailabilityRequest', 'NameAvailability', + 'Resource', + 'ServerSecurityAlertPolicy', 'ServerPaged', 'FirewallRulePaged', 'DatabasePaged', @@ -102,4 +112,5 @@ 'GeoRedundantBackup', 'SkuTier', 'OperationOrigin', + 'ServerSecurityAlertPolicyState', ] diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/configuration_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/configuration_py3.py index 9ad3350cf611..00d29c7be6dc 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/configuration_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/configuration_py3.py @@ -61,7 +61,7 @@ class Configuration(ProxyResource): } def __init__(self, *, value: str=None, source: str=None, **kwargs) -> None: - super(Configuration, self).__init__(, **kwargs) + super(Configuration, self).__init__(**kwargs) self.value = value self.description = None self.default_value = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/database_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/database_py3.py index e7880e928d6d..f5a2bce5f717 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/database_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/database_py3.py @@ -45,6 +45,6 @@ class Database(ProxyResource): } def __init__(self, *, charset: str=None, collation: str=None, **kwargs) -> None: - super(Database, self).__init__(, **kwargs) + super(Database, self).__init__(**kwargs) self.charset = charset self.collation = collation diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/firewall_rule_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/firewall_rule_py3.py index 2891333362da..c65ec79d8319 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/firewall_rule_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/firewall_rule_py3.py @@ -51,6 +51,6 @@ class FirewallRule(ProxyResource): } def __init__(self, *, start_ip_address: str, end_ip_address: str, **kwargs) -> None: - super(FirewallRule, self).__init__(, **kwargs) + super(FirewallRule, self).__init__(**kwargs) self.start_ip_address = start_ip_address self.end_ip_address = end_ip_address diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file.py index 60d3b7e27bd1..214dae4dbeea 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file.py @@ -24,8 +24,6 @@ class LogFile(ProxyResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param log_file_name: Log file name. - :type log_file_name: str :param size_in_kb: Size of the log file. :type size_in_kb: long :ivar created_time: Creation timestamp of the log file. @@ -50,7 +48,6 @@ class LogFile(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'log_file_name': {'key': 'properties.name', 'type': 'str'}, 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, @@ -60,7 +57,6 @@ class LogFile(ProxyResource): def __init__(self, **kwargs): super(LogFile, self).__init__(**kwargs) - self.log_file_name = kwargs.get('log_file_name', None) self.size_in_kb = kwargs.get('size_in_kb', None) self.created_time = None self.last_modified_time = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file_py3.py index 93cb8e07197e..a8dd0f908280 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/log_file_py3.py @@ -24,8 +24,6 @@ class LogFile(ProxyResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param log_file_name: Log file name. - :type log_file_name: str :param size_in_kb: Size of the log file. :type size_in_kb: long :ivar created_time: Creation timestamp of the log file. @@ -50,7 +48,6 @@ class LogFile(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'log_file_name': {'key': 'properties.name', 'type': 'str'}, 'size_in_kb': {'key': 'properties.sizeInKB', 'type': 'long'}, 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, 'last_modified_time': {'key': 'properties.lastModifiedTime', 'type': 'iso-8601'}, @@ -58,9 +55,8 @@ class LogFile(ProxyResource): 'url': {'key': 'properties.url', 'type': 'str'}, } - def __init__(self, *, log_file_name: str=None, size_in_kb: int=None, log_file_type: str=None, url: str=None, **kwargs) -> None: - super(LogFile, self).__init__(, **kwargs) - self.log_file_name = log_file_name + def __init__(self, *, size_in_kb: int=None, log_file_type: str=None, url: str=None, **kwargs) -> None: + super(LogFile, self).__init__(**kwargs) self.size_in_kb = size_in_kb self.created_time = None self.last_modified_time = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_properties.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_properties.py index c820966eaeb5..97268d3f7c9a 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_properties.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_properties.py @@ -17,16 +17,6 @@ class PerformanceTierProperties(Model): :param id: ID of the performance tier. :type id: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int :param service_level_objectives: Service level objectives associated with the performance tier :type service_level_objectives: @@ -35,18 +25,10 @@ class PerformanceTierProperties(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, } def __init__(self, **kwargs): super(PerformanceTierProperties, self).__init__(**kwargs) self.id = kwargs.get('id', None) - self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) - self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) - self.max_storage_mb = kwargs.get('max_storage_mb', None) - self.min_storage_mb = kwargs.get('min_storage_mb', None) self.service_level_objectives = kwargs.get('service_level_objectives', None) diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_properties_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_properties_py3.py index 94cdad4e2cb8..3d56f700d215 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_properties_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_properties_py3.py @@ -17,16 +17,6 @@ class PerformanceTierProperties(Model): :param id: ID of the performance tier. :type id: str - :param max_backup_retention_days: Maximum Backup retention in days for the - performance tier edition - :type max_backup_retention_days: int - :param min_backup_retention_days: Minimum Backup retention in days for the - performance tier edition - :type min_backup_retention_days: int - :param max_storage_mb: Max storage allowed for a server. - :type max_storage_mb: int - :param min_storage_mb: Max storage allowed for a server. - :type min_storage_mb: int :param service_level_objectives: Service level objectives associated with the performance tier :type service_level_objectives: @@ -35,18 +25,10 @@ class PerformanceTierProperties(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, - 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, - 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, - 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, 'service_level_objectives': {'key': 'serviceLevelObjectives', 'type': '[PerformanceTierServiceLevelObjectives]'}, } - def __init__(self, *, id: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, service_level_objectives=None, **kwargs) -> None: + def __init__(self, *, id: str=None, service_level_objectives=None, **kwargs) -> None: super(PerformanceTierProperties, self).__init__(**kwargs) self.id = id - self.max_backup_retention_days = max_backup_retention_days - self.min_backup_retention_days = min_backup_retention_days - self.max_storage_mb = max_storage_mb - self.min_storage_mb = min_storage_mb self.service_level_objectives = service_level_objectives diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_service_level_objectives.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_service_level_objectives.py index fb6bf82c0f1b..4f653dc28347 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_service_level_objectives.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_service_level_objectives.py @@ -24,6 +24,16 @@ class PerformanceTierServiceLevelObjectives(Model): :param hardware_generation: Hardware generation associated with the service level objective :type hardware_generation: str + :param max_backup_retention_days: Maximum Backup retention in days for the + performance tier edition + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the + performance tier edition + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int """ _attribute_map = { @@ -31,6 +41,10 @@ class PerformanceTierServiceLevelObjectives(Model): 'edition': {'key': 'edition', 'type': 'str'}, 'v_core': {'key': 'vCore', 'type': 'int'}, 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, } def __init__(self, **kwargs): @@ -39,3 +53,7 @@ def __init__(self, **kwargs): self.edition = kwargs.get('edition', None) self.v_core = kwargs.get('v_core', None) self.hardware_generation = kwargs.get('hardware_generation', None) + self.max_backup_retention_days = kwargs.get('max_backup_retention_days', None) + self.min_backup_retention_days = kwargs.get('min_backup_retention_days', None) + self.max_storage_mb = kwargs.get('max_storage_mb', None) + self.min_storage_mb = kwargs.get('min_storage_mb', None) diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_service_level_objectives_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_service_level_objectives_py3.py index 0c202901b237..083e4720ab47 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_service_level_objectives_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/performance_tier_service_level_objectives_py3.py @@ -24,6 +24,16 @@ class PerformanceTierServiceLevelObjectives(Model): :param hardware_generation: Hardware generation associated with the service level objective :type hardware_generation: str + :param max_backup_retention_days: Maximum Backup retention in days for the + performance tier edition + :type max_backup_retention_days: int + :param min_backup_retention_days: Minimum Backup retention in days for the + performance tier edition + :type min_backup_retention_days: int + :param max_storage_mb: Max storage allowed for a server. + :type max_storage_mb: int + :param min_storage_mb: Max storage allowed for a server. + :type min_storage_mb: int """ _attribute_map = { @@ -31,11 +41,19 @@ class PerformanceTierServiceLevelObjectives(Model): 'edition': {'key': 'edition', 'type': 'str'}, 'v_core': {'key': 'vCore', 'type': 'int'}, 'hardware_generation': {'key': 'hardwareGeneration', 'type': 'str'}, + 'max_backup_retention_days': {'key': 'maxBackupRetentionDays', 'type': 'int'}, + 'min_backup_retention_days': {'key': 'minBackupRetentionDays', 'type': 'int'}, + 'max_storage_mb': {'key': 'maxStorageMB', 'type': 'int'}, + 'min_storage_mb': {'key': 'minStorageMB', 'type': 'int'}, } - def __init__(self, *, id: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, **kwargs) -> None: + def __init__(self, *, id: str=None, edition: str=None, v_core: int=None, hardware_generation: str=None, max_backup_retention_days: int=None, min_backup_retention_days: int=None, max_storage_mb: int=None, min_storage_mb: int=None, **kwargs) -> None: super(PerformanceTierServiceLevelObjectives, self).__init__(**kwargs) self.id = id self.edition = edition self.v_core = v_core self.hardware_generation = hardware_generation + self.max_backup_retention_days = max_backup_retention_days + self.min_backup_retention_days = min_backup_retention_days + self.max_storage_mb = max_storage_mb + self.min_storage_mb = min_storage_mb diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/postgre_sql_management_client_enums.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/postgre_sql_management_client_enums.py index 067e776798b4..56adfdb34f8b 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/postgre_sql_management_client_enums.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/postgre_sql_management_client_enums.py @@ -49,3 +49,9 @@ class OperationOrigin(str, Enum): not_specified = "NotSpecified" user = "user" system = "system" + + +class ServerSecurityAlertPolicyState(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource.py new file mode 100644 index 000000000000..fc92549d32e9 --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource_py3.py new file mode 100644 index 000000000000..aedc5cfaf0b9 --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource_py3.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class Resource(Model): + """ARM resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_create.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_create.py index f8722d5af2d0..8c9b8a45eb69 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_create.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_create.py @@ -17,7 +17,7 @@ class ServerPropertiesForCreate(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore + ServerPropertiesForRestore, ServerPropertiesForGeoRestore All required parameters must be populated in order to send to Azure. @@ -45,7 +45,7 @@ class ServerPropertiesForCreate(Model): } _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore'} + 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore'} } def __init__(self, **kwargs): diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_create_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_create_py3.py index 29c3f2259eff..5983a5bff36d 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_create_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_create_py3.py @@ -17,7 +17,7 @@ class ServerPropertiesForCreate(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: ServerPropertiesForDefaultCreate, - ServerPropertiesForRestore + ServerPropertiesForRestore, ServerPropertiesForGeoRestore All required parameters must be populated in order to send to Azure. @@ -45,7 +45,7 @@ class ServerPropertiesForCreate(Model): } _subtype_map = { - 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore'} + 'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore'} } def __init__(self, *, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore.py new file mode 100644 index 000000000000..ccd84f7330fb --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore.py @@ -0,0 +1,51 @@ +# 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 .server_properties_for_create import ServerPropertiesForCreate + + +class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring to a different + region from a geo replicated backup. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '9.5', '9.6' + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param source_server_id: Required. The source server id to restore from. + :type source_server_id: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServerPropertiesForGeoRestore, self).__init__(**kwargs) + self.source_server_id = kwargs.get('source_server_id', None) + self.create_mode = 'GeoRestore' diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore_py3.py new file mode 100644 index 000000000000..2e01f31edeed --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_geo_restore_py3.py @@ -0,0 +1,51 @@ +# 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 .server_properties_for_create import ServerPropertiesForCreate + + +class ServerPropertiesForGeoRestore(ServerPropertiesForCreate): + """The properties used to create a new server by restoring to a different + region from a geo replicated backup. + + All required parameters must be populated in order to send to Azure. + + :param version: Server version. Possible values include: '9.5', '9.6' + :type version: str or ~azure.mgmt.rdbms.postgresql.models.ServerVersion + :param ssl_enforcement: Enable ssl enforcement or not when connect to + server. Possible values include: 'Enabled', 'Disabled' + :type ssl_enforcement: str or + ~azure.mgmt.rdbms.postgresql.models.SslEnforcementEnum + :param storage_profile: Storage profile of a server. + :type storage_profile: ~azure.mgmt.rdbms.postgresql.models.StorageProfile + :param create_mode: Required. Constant filled by server. + :type create_mode: str + :param source_server_id: Required. The source server id to restore from. + :type source_server_id: str + """ + + _validation = { + 'create_mode': {'required': True}, + 'source_server_id': {'required': True}, + } + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'source_server_id': {'key': 'sourceServerId', 'type': 'str'}, + } + + def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None: + super(ServerPropertiesForGeoRestore, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs) + self.source_server_id = source_server_id + self.create_mode = 'GeoRestore' diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore.py index 090c90c33f65..31ea1129095d 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore.py @@ -13,7 +13,7 @@ class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties to a new server by restoring from a backup. + """The properties used to create a new server by restoring from a backup. All required parameters must be populated in order to send to Azure. diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore_py3.py index f4f4660b4c51..61f4aedc4f7c 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_properties_for_restore_py3.py @@ -13,7 +13,7 @@ class ServerPropertiesForRestore(ServerPropertiesForCreate): - """The properties to a new server by restoring from a backup. + """The properties used to create a new server by restoring from a backup. All required parameters must be populated in order to send to Azure. diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy.py new file mode 100644 index 000000000000..2e42bd22f18d --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy.py @@ -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.postgresql.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) diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy_py3.py new file mode 100644 index 000000000000..0a40a1edd57d --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/server_security_alert_policy_py3.py @@ -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.postgresql.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 diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/tracked_resource_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/tracked_resource_py3.py index 6db5a5b1b40c..40868a3f44d8 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/tracked_resource_py3.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/tracked_resource_py3.py @@ -48,6 +48,6 @@ class TrackedResource(ProxyResource): } def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(, **kwargs) + super(TrackedResource, self).__init__(**kwargs) self.location = location self.tags = tags diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py index 323618c0dd5f..87879c9ea657 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py @@ -17,6 +17,7 @@ from .location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from .check_name_availability_operations import CheckNameAvailabilityOperations from .operations import Operations +from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations __all__ = [ 'ServersOperations', @@ -27,4 +28,5 @@ 'LocationBasedPerformanceTierOperations', 'CheckNameAvailabilityOperations', 'Operations', + 'ServerSecurityAlertPoliciesOperations', ] diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/check_name_availability_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/check_name_availability_operations.py index 0063ef2f00b8..18904a3d0024 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/check_name_availability_operations.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/check_name_availability_operations.py @@ -23,7 +23,7 @@ class CheckNameAvailabilityOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2017-12-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01-preview" + self.api_version = "2017-12-01" self.config = config diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/configurations_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/configurations_operations.py index 56659c8d70e5..a89d8b4a16a7 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/configurations_operations.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/configurations_operations.py @@ -25,7 +25,7 @@ class ConfigurationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2017-12-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01-preview" + self.api_version = "2017-12-01" self.config = config diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/databases_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/databases_operations.py index ddad0c26e74d..3cc265baa3af 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/databases_operations.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/databases_operations.py @@ -25,7 +25,7 @@ class DatabasesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2017-12-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01-preview" + self.api_version = "2017-12-01" self.config = config diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/firewall_rules_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/firewall_rules_operations.py index dc202e09a79d..1af3188087cf 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/firewall_rules_operations.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/firewall_rules_operations.py @@ -25,7 +25,7 @@ class FirewallRulesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2017-12-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01-preview" + self.api_version = "2017-12-01" self.config = config diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/location_based_performance_tier_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/location_based_performance_tier_operations.py index 939debda4c2c..6ec7e16a894e 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/location_based_performance_tier_operations.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/location_based_performance_tier_operations.py @@ -23,7 +23,7 @@ class LocationBasedPerformanceTierOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2017-12-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01-preview" + self.api_version = "2017-12-01" self.config = config diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/log_files_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/log_files_operations.py index 69dc04d78b0e..b1eb3b583f80 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/log_files_operations.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/log_files_operations.py @@ -23,7 +23,7 @@ class LogFilesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2017-12-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01-preview" + self.api_version = "2017-12-01" self.config = config diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/operations.py index 35bad449165d..0f99df04b8b4 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/operations.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2017-12-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01-preview" + self.api_version = "2017-12-01" self.config = config diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/server_security_alert_policies_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/server_security_alert_policies_operations.py new file mode 100644 index 000000000000..249d0f9b35ea --- /dev/null +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/server_security_alert_policies_operations.py @@ -0,0 +1,212 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ServerSecurityAlertPoliciesOperations(object): + """ServerSecurityAlertPoliciesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar security_alert_policy_name: The name of the security alert policy. Constant value: "Default". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.security_alert_policy_name = "Default" + self.api_version = "2017-12-01" + + self.config = config + + def get( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Get a server's security alert policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServerSecurityAlertPolicy or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServerSecurityAlertPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} + + + def _create_or_update_initial( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'securityAlertPolicyName': self._serialize.url("self.security_alert_policy_name", self.security_alert_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ServerSecurityAlertPolicy') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ServerSecurityAlertPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, server_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates or updates a threat detection policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param parameters: The server security alert policy. + :type parameters: + ~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + ServerSecurityAlertPolicy or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.rdbms.postgresql.models.ServerSecurityAlertPolicy]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + server_name=server_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('ServerSecurityAlertPolicy', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}'} diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/servers_operations.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/servers_operations.py index b3c556aab92b..4228e0f25cdd 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/servers_operations.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/servers_operations.py @@ -25,7 +25,7 @@ class ServersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2017-12-01-preview". + :ivar api_version: The API version to use for the request. Constant value: "2017-12-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01-preview" + self.api_version = "2017-12-01" self.config = config diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py index 183c1a955f84..d229633239af 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -21,6 +21,7 @@ from .operations.location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from .operations.check_name_availability_operations import CheckNameAvailabilityOperations from .operations.operations import Operations +from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations from . import models @@ -57,7 +58,7 @@ def __init__( self.subscription_id = subscription_id -class PostgreSQLManagementClient(object): +class PostgreSQLManagementClient(SDKClient): """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, log files and configurations with new business model. :ivar config: Configuration for client. @@ -79,6 +80,8 @@ class PostgreSQLManagementClient(object): :vartype check_name_availability: azure.mgmt.rdbms.postgresql.operations.CheckNameAvailabilityOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.rdbms.postgresql.operations.Operations + :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations + :vartype server_security_alert_policies: azure.mgmt.rdbms.postgresql.operations.ServerSecurityAlertPoliciesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -93,10 +96,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = PostgreSQLManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(PostgreSQLManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2017-12-01-preview' + self.api_version = '2017-12-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -116,3 +119,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) + self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/version.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/version.py index d2d4445f16cf..e5978466adba 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/version.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2017-12-01-preview" +VERSION = "2017-12-01" From 2bee6ca1b93cf1f867c05d6ba292435949defa1f Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 26 Apr 2018 08:08:45 +0000 Subject: [PATCH 2/2] Generated from 967363391d65d9ebef0879aff207880e5c67ee56 Merge securityAlertPolicies.json into postgresql.json --- .../mgmt/rdbms/postgresql/models/__init__.py | 3 -- .../mgmt/rdbms/postgresql/models/resource.py | 45 ------------------- .../rdbms/postgresql/models/resource_py3.py | 45 ------------------- .../rdbms/postgresql/operations/__init__.py | 4 +- .../postgre_sql_management_client.py | 12 ++--- 5 files changed, 8 insertions(+), 101 deletions(-) delete mode 100644 azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource.py delete mode 100644 azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource_py3.py diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py index 6c210635df6a..230e22f7d8ce 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/__init__.py @@ -32,7 +32,6 @@ from .performance_tier_properties_py3 import PerformanceTierProperties from .name_availability_request_py3 import NameAvailabilityRequest from .name_availability_py3 import NameAvailability - from .resource_py3 import Resource from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy except (SyntaxError, ImportError): from .proxy_resource import ProxyResource @@ -57,7 +56,6 @@ from .performance_tier_properties import PerformanceTierProperties from .name_availability_request import NameAvailabilityRequest from .name_availability import NameAvailability - from .resource import Resource from .server_security_alert_policy import ServerSecurityAlertPolicy from .server_paged import ServerPaged from .firewall_rule_paged import FirewallRulePaged @@ -98,7 +96,6 @@ 'PerformanceTierProperties', 'NameAvailabilityRequest', 'NameAvailability', - 'Resource', 'ServerSecurityAlertPolicy', 'ServerPaged', 'FirewallRulePaged', diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource.py deleted file mode 100644 index fc92549d32e9..000000000000 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource_py3.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource_py3.py deleted file mode 100644 index aedc5cfaf0b9..000000000000 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/models/resource_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# 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 msrest.serialization import Model - - -class Resource(Model): - """ARM resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py index 87879c9ea657..8da462eefd31 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/operations/__init__.py @@ -16,8 +16,8 @@ from .log_files_operations import LogFilesOperations from .location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from .check_name_availability_operations import CheckNameAvailabilityOperations -from .operations import Operations from .server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations +from .operations import Operations __all__ = [ 'ServersOperations', @@ -27,6 +27,6 @@ 'LogFilesOperations', 'LocationBasedPerformanceTierOperations', 'CheckNameAvailabilityOperations', - 'Operations', 'ServerSecurityAlertPoliciesOperations', + 'Operations', ] diff --git a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py index d229633239af..c0ccfb0cad71 100644 --- a/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py +++ b/azure-mgmt-rdbms/azure/mgmt/rdbms/postgresql/postgre_sql_management_client.py @@ -20,8 +20,8 @@ from .operations.log_files_operations import LogFilesOperations from .operations.location_based_performance_tier_operations import LocationBasedPerformanceTierOperations from .operations.check_name_availability_operations import CheckNameAvailabilityOperations -from .operations.operations import Operations from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations +from .operations.operations import Operations from . import models @@ -59,7 +59,7 @@ def __init__( class PostgreSQLManagementClient(SDKClient): - """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, log files and configurations with new business model. + """The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, security alert policies, log files and configurations with new business model. :ivar config: Configuration for client. :vartype config: PostgreSQLManagementClientConfiguration @@ -78,10 +78,10 @@ class PostgreSQLManagementClient(SDKClient): :vartype location_based_performance_tier: azure.mgmt.rdbms.postgresql.operations.LocationBasedPerformanceTierOperations :ivar check_name_availability: CheckNameAvailability operations :vartype check_name_availability: azure.mgmt.rdbms.postgresql.operations.CheckNameAvailabilityOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.rdbms.postgresql.operations.Operations :ivar server_security_alert_policies: ServerSecurityAlertPolicies operations :vartype server_security_alert_policies: azure.mgmt.rdbms.postgresql.operations.ServerSecurityAlertPoliciesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.rdbms.postgresql.operations.Operations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -117,7 +117,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.check_name_availability = CheckNameAvailabilityOperations( self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize)