Skip to content
Merged
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
24 changes: 24 additions & 0 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
from .managed_database_security_alert_policy_py3 import ManagedDatabaseSecurityAlertPolicy
from .managed_server_security_alert_policy_py3 import ManagedServerSecurityAlertPolicy
from .sensitivity_label_py3 import SensitivityLabel
from .managed_instance_administrator_py3 import ManagedInstanceAdministrator
from .database_operation_py3 import DatabaseOperation
from .elastic_pool_operation_py3 import ElasticPoolOperation
from .max_size_capability_py3 import MaxSizeCapability
Expand Down Expand Up @@ -165,6 +166,11 @@
from .usage_py3 import Usage
from .managed_instance_py3 import ManagedInstance
from .managed_instance_update_py3 import ManagedInstanceUpdate
from .private_endpoint_property_py3 import PrivateEndpointProperty
from .private_link_service_connection_state_property_py3 import PrivateLinkServiceConnectionStateProperty
from .private_endpoint_connection_py3 import PrivateEndpointConnection
from .private_link_resource_properties_py3 import PrivateLinkResourceProperties
from .private_link_resource_py3 import PrivateLinkResource
except (SyntaxError, ImportError):
from .recoverable_database import RecoverableDatabase
from .restorable_dropped_database import RestorableDroppedDatabase
Expand Down Expand Up @@ -275,6 +281,7 @@
from .managed_database_security_alert_policy import ManagedDatabaseSecurityAlertPolicy
from .managed_server_security_alert_policy import ManagedServerSecurityAlertPolicy
from .sensitivity_label import SensitivityLabel
from .managed_instance_administrator import ManagedInstanceAdministrator
from .database_operation import DatabaseOperation
from .elastic_pool_operation import ElasticPoolOperation
from .max_size_capability import MaxSizeCapability
Expand Down Expand Up @@ -321,6 +328,11 @@
from .usage import Usage
from .managed_instance import ManagedInstance
from .managed_instance_update import ManagedInstanceUpdate
from .private_endpoint_property import PrivateEndpointProperty
from .private_link_service_connection_state_property import PrivateLinkServiceConnectionStateProperty
from .private_endpoint_connection import PrivateEndpointConnection
from .private_link_resource_properties import PrivateLinkResourceProperties
from .private_link_resource import PrivateLinkResource
from .recoverable_database_paged import RecoverableDatabasePaged
from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged
from .server_paged import ServerPaged
Expand Down Expand Up @@ -375,6 +387,7 @@
from .managed_database_security_alert_policy_paged import ManagedDatabaseSecurityAlertPolicyPaged
from .managed_server_security_alert_policy_paged import ManagedServerSecurityAlertPolicyPaged
from .sensitivity_label_paged import SensitivityLabelPaged
from .managed_instance_administrator_paged import ManagedInstanceAdministratorPaged
from .database_operation_paged import DatabaseOperationPaged
from .elastic_pool_operation_paged import ElasticPoolOperationPaged
from .vulnerability_assessment_scan_record_paged import VulnerabilityAssessmentScanRecordPaged
Expand All @@ -388,6 +401,8 @@
from .instance_pool_paged import InstancePoolPaged
from .usage_paged import UsagePaged
from .managed_instance_paged import ManagedInstancePaged
from .private_endpoint_connection_paged import PrivateEndpointConnectionPaged
from .private_link_resource_paged import PrivateLinkResourcePaged
from .sql_management_client_enums import (
CheckNameAvailabilityReason,
ServerConnectionType,
Expand Down Expand Up @@ -582,6 +597,7 @@
'ManagedDatabaseSecurityAlertPolicy',
'ManagedServerSecurityAlertPolicy',
'SensitivityLabel',
'ManagedInstanceAdministrator',
'DatabaseOperation',
'ElasticPoolOperation',
'MaxSizeCapability',
Expand Down Expand Up @@ -628,6 +644,11 @@
'Usage',
'ManagedInstance',
'ManagedInstanceUpdate',
'PrivateEndpointProperty',
'PrivateLinkServiceConnectionStateProperty',
'PrivateEndpointConnection',
'PrivateLinkResourceProperties',
'PrivateLinkResource',
'RecoverableDatabasePaged',
'RestorableDroppedDatabasePaged',
'ServerPaged',
Expand Down Expand Up @@ -682,6 +703,7 @@
'ManagedDatabaseSecurityAlertPolicyPaged',
'ManagedServerSecurityAlertPolicyPaged',
'SensitivityLabelPaged',
'ManagedInstanceAdministratorPaged',
'DatabaseOperationPaged',
'ElasticPoolOperationPaged',
'VulnerabilityAssessmentScanRecordPaged',
Expand All @@ -695,6 +717,8 @@
'InstancePoolPaged',
'UsagePaged',
'ManagedInstancePaged',
'PrivateEndpointConnectionPaged',
'PrivateLinkResourcePaged',
'CheckNameAvailabilityReason',
'ServerConnectionType',
'SecurityAlertPolicyState',
Expand Down
29 changes: 24 additions & 5 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Database(TrackedResource):
'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed',
'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing',
'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
'OnlineChangingDwPerformanceTiers'
'OnlineChangingDwPerformanceTiers', 'Disabled'
:vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus
:ivar database_id: The ID of the database.
:vartype database_id: str
Expand Down Expand Up @@ -150,11 +150,16 @@ class Database(TrackedResource):
:ivar earliest_restore_date: This records the earliest start date and time
that restore is available for this database (ISO8601 format).
:vartype earliest_restore_date: datetime
:param read_scale: The state of read-only routing. If enabled, connections
that have application intent set to readonly in their connection string
may be routed to a readonly secondary replica in the same region. Possible
values include: 'Enabled', 'Disabled'
:param read_scale: If enabled, connections that have application intent
set to readonly in their connection string may be routed to a readonly
secondary replica. This property is only settable for Premium and Business
Critical databases. Possible values include: 'Enabled', 'Disabled'
:type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale
:param read_replica_count: The number of readonly secondary replicas
associated with the database to which readonly application intent
connections may be routed. This property is only settable for Hyperscale
edition databases.
:type read_replica_count: int
:ivar current_sku: The name and tier of the SKU.
:vartype current_sku: ~azure.mgmt.sql.models.Sku
:param auto_pause_delay: Time in minutes after which database is
Expand All @@ -163,6 +168,12 @@ class Database(TrackedResource):
:param min_capacity: Minimal capacity that database will always have
allocated, if not paused
:type min_capacity: float
:ivar paused_date: The date when database was paused by user configuration
or action (ISO8601 format). Null if the database is ready.
:vartype paused_date: datetime
:ivar resumed_date: The date when database was resumed by user action or
database login (ISO8601 format). Null if the database is paused.
:vartype resumed_date: datetime
"""

_validation = {
Expand All @@ -182,6 +193,8 @@ class Database(TrackedResource):
'max_log_size_bytes': {'readonly': True},
'earliest_restore_date': {'readonly': True},
'current_sku': {'readonly': True},
'paused_date': {'readonly': True},
'resumed_date': {'readonly': True},
}

_attribute_map = {
Expand Down Expand Up @@ -218,9 +231,12 @@ class Database(TrackedResource):
'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'},
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'read_scale': {'key': 'properties.readScale', 'type': 'str'},
'read_replica_count': {'key': 'properties.readReplicaCount', 'type': 'int'},
'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'},
'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'},
'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'},
'paused_date': {'key': 'properties.pausedDate', 'type': 'iso-8601'},
'resumed_date': {'key': 'properties.resumedDate', 'type': 'iso-8601'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -253,6 +269,9 @@ def __init__(self, **kwargs):
self.max_log_size_bytes = None
self.earliest_restore_date = None
self.read_scale = kwargs.get('read_scale', None)
self.read_replica_count = kwargs.get('read_replica_count', None)
self.current_sku = None
self.auto_pause_delay = kwargs.get('auto_pause_delay', None)
self.min_capacity = kwargs.get('min_capacity', None)
self.paused_date = None
self.resumed_date = None
31 changes: 25 additions & 6 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Database(TrackedResource):
'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed',
'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing',
'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
'OnlineChangingDwPerformanceTiers'
'OnlineChangingDwPerformanceTiers', 'Disabled'
:vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus
:ivar database_id: The ID of the database.
:vartype database_id: str
Expand Down Expand Up @@ -150,11 +150,16 @@ class Database(TrackedResource):
:ivar earliest_restore_date: This records the earliest start date and time
that restore is available for this database (ISO8601 format).
:vartype earliest_restore_date: datetime
:param read_scale: The state of read-only routing. If enabled, connections
that have application intent set to readonly in their connection string
may be routed to a readonly secondary replica in the same region. Possible
values include: 'Enabled', 'Disabled'
:param read_scale: If enabled, connections that have application intent
set to readonly in their connection string may be routed to a readonly
secondary replica. This property is only settable for Premium and Business
Critical databases. Possible values include: 'Enabled', 'Disabled'
:type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale
:param read_replica_count: The number of readonly secondary replicas
associated with the database to which readonly application intent
connections may be routed. This property is only settable for Hyperscale
edition databases.
:type read_replica_count: int
:ivar current_sku: The name and tier of the SKU.
:vartype current_sku: ~azure.mgmt.sql.models.Sku
:param auto_pause_delay: Time in minutes after which database is
Expand All @@ -163,6 +168,12 @@ class Database(TrackedResource):
:param min_capacity: Minimal capacity that database will always have
allocated, if not paused
:type min_capacity: float
:ivar paused_date: The date when database was paused by user configuration
or action (ISO8601 format). Null if the database is ready.
:vartype paused_date: datetime
:ivar resumed_date: The date when database was resumed by user action or
database login (ISO8601 format). Null if the database is paused.
:vartype resumed_date: datetime
"""

_validation = {
Expand All @@ -182,6 +193,8 @@ class Database(TrackedResource):
'max_log_size_bytes': {'readonly': True},
'earliest_restore_date': {'readonly': True},
'current_sku': {'readonly': True},
'paused_date': {'readonly': True},
'resumed_date': {'readonly': True},
}

_attribute_map = {
Expand Down Expand Up @@ -218,12 +231,15 @@ class Database(TrackedResource):
'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'},
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'read_scale': {'key': 'properties.readScale', 'type': 'str'},
'read_replica_count': {'key': 'properties.readReplicaCount', 'type': 'int'},
'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'},
'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'},
'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'},
'paused_date': {'key': 'properties.pausedDate', 'type': 'iso-8601'},
'resumed_date': {'key': 'properties.resumedDate', 'type': 'iso-8601'},
}

def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, auto_pause_delay: int=None, min_capacity: float=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, collation: str=None, max_size_bytes: int=None, sample_name=None, elastic_pool_id: str=None, source_database_id: str=None, restore_point_in_time=None, source_database_deletion_date=None, recovery_services_recovery_point_id: str=None, long_term_retention_backup_resource_id: str=None, recoverable_database_id: str=None, restorable_dropped_database_id: str=None, catalog_collation=None, zone_redundant: bool=None, license_type=None, read_scale=None, read_replica_count: int=None, auto_pause_delay: int=None, min_capacity: float=None, **kwargs) -> None:
super(Database, self).__init__(location=location, tags=tags, **kwargs)
self.sku = sku
self.kind = None
Expand Down Expand Up @@ -253,6 +269,9 @@ def __init__(self, *, location: str, tags=None, sku=None, create_mode=None, coll
self.max_log_size_bytes = None
self.earliest_restore_date = None
self.read_scale = read_scale
self.read_replica_count = read_replica_count
self.current_sku = None
self.auto_pause_delay = auto_pause_delay
self.min_capacity = min_capacity
self.paused_date = None
self.resumed_date = None
29 changes: 24 additions & 5 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DatabaseUpdate(Model):
'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed',
'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing',
'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
'OnlineChangingDwPerformanceTiers'
'OnlineChangingDwPerformanceTiers', 'Disabled'
:vartype status: str or ~azure.mgmt.sql.models.DatabaseStatus
:ivar database_id: The ID of the database.
:vartype database_id: str
Expand Down Expand Up @@ -123,11 +123,16 @@ class DatabaseUpdate(Model):
:ivar earliest_restore_date: This records the earliest start date and time
that restore is available for this database (ISO8601 format).
:vartype earliest_restore_date: datetime
:param read_scale: The state of read-only routing. If enabled, connections
that have application intent set to readonly in their connection string
may be routed to a readonly secondary replica in the same region. Possible
values include: 'Enabled', 'Disabled'
:param read_scale: If enabled, connections that have application intent
set to readonly in their connection string may be routed to a readonly
secondary replica. This property is only settable for Premium and Business
Critical databases. Possible values include: 'Enabled', 'Disabled'
:type read_scale: str or ~azure.mgmt.sql.models.DatabaseReadScale
:param read_replica_count: The number of readonly secondary replicas
associated with the database to which readonly application intent
connections may be routed. This property is only settable for Hyperscale
edition databases.
:type read_replica_count: int
:ivar current_sku: The name and tier of the SKU.
:vartype current_sku: ~azure.mgmt.sql.models.Sku
:param auto_pause_delay: Time in minutes after which database is
Expand All @@ -136,6 +141,12 @@ class DatabaseUpdate(Model):
:param min_capacity: Minimal capacity that database will always have
allocated, if not paused
:type min_capacity: float
:ivar paused_date: The date when database was paused by user configuration
or action (ISO8601 format). Null if the database is ready.
:vartype paused_date: datetime
:ivar resumed_date: The date when database was resumed by user action or
database login (ISO8601 format). Null if the database is paused.
:vartype resumed_date: datetime
:param tags: Resource tags.
:type tags: dict[str, str]
"""
Expand All @@ -151,6 +162,8 @@ class DatabaseUpdate(Model):
'max_log_size_bytes': {'readonly': True},
'earliest_restore_date': {'readonly': True},
'current_sku': {'readonly': True},
'paused_date': {'readonly': True},
'resumed_date': {'readonly': True},
}

_attribute_map = {
Expand Down Expand Up @@ -180,9 +193,12 @@ class DatabaseUpdate(Model):
'max_log_size_bytes': {'key': 'properties.maxLogSizeBytes', 'type': 'long'},
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'read_scale': {'key': 'properties.readScale', 'type': 'str'},
'read_replica_count': {'key': 'properties.readReplicaCount', 'type': 'int'},
'current_sku': {'key': 'properties.currentSku', 'type': 'Sku'},
'auto_pause_delay': {'key': 'properties.autoPauseDelay', 'type': 'int'},
'min_capacity': {'key': 'properties.minCapacity', 'type': 'float'},
'paused_date': {'key': 'properties.pausedDate', 'type': 'iso-8601'},
'resumed_date': {'key': 'properties.resumedDate', 'type': 'iso-8601'},
'tags': {'key': 'tags', 'type': '{str}'},
}

Expand Down Expand Up @@ -214,7 +230,10 @@ def __init__(self, **kwargs):
self.max_log_size_bytes = None
self.earliest_restore_date = None
self.read_scale = kwargs.get('read_scale', None)
self.read_replica_count = kwargs.get('read_replica_count', None)
self.current_sku = None
self.auto_pause_delay = kwargs.get('auto_pause_delay', None)
self.min_capacity = kwargs.get('min_capacity', None)
self.paused_date = None
self.resumed_date = None
self.tags = kwargs.get('tags', None)
Loading