Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,13 +32,15 @@
from .performance_tier_properties_py3 import PerformanceTierProperties
from .name_availability_request_py3 import NameAvailabilityRequest
from .name_availability_py3 import NameAvailability
from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy
except (SyntaxError, ImportError):
from .proxy_resource import ProxyResource
from .tracked_resource import TrackedResource
from .storage_profile import StorageProfile
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
Expand All @@ -53,6 +56,7 @@
from .performance_tier_properties import PerformanceTierProperties
from .name_availability_request import NameAvailabilityRequest
from .name_availability import NameAvailability
from .server_security_alert_policy import ServerSecurityAlertPolicy
from .server_paged import ServerPaged
from .firewall_rule_paged import FirewallRulePaged
from .database_paged import DatabasePaged
Expand All @@ -66,6 +70,7 @@
GeoRedundantBackup,
SkuTier,
OperationOrigin,
ServerSecurityAlertPolicyState,
)

__all__ = [
Expand All @@ -75,6 +80,7 @@
'ServerPropertiesForCreate',
'ServerPropertiesForDefaultCreate',
'ServerPropertiesForRestore',
'ServerPropertiesForGeoRestore',
'Sku',
'Server',
'ServerForCreate',
Expand All @@ -90,6 +96,7 @@
'PerformanceTierProperties',
'NameAvailabilityRequest',
'NameAvailability',
'ServerSecurityAlertPolicy',
'ServerPaged',
'FirewallRulePaged',
'DatabasePaged',
Expand All @@ -102,4 +109,5 @@
'GeoRedundantBackup',
'SkuTier',
'OperationOrigin',
'ServerSecurityAlertPolicyState',
]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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'},
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -50,17 +48,15 @@ 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'},
'log_file_type': {'key': 'properties.type', 'type': 'str'},
'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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,27 @@ 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 = {
'id': {'key': 'id', 'type': 'str'},
'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):
Expand All @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,36 @@ 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 = {
'id': {'key': 'id', 'type': 'str'},
'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
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ class OperationOrigin(str, Enum):
not_specified = "NotSpecified"
user = "user"
system = "system"


class ServerSecurityAlertPolicyState(str, Enum):

enabled = "Enabled"
disabled = "Disabled"
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Loading