Skip to content

Commit

Permalink
[AutoPR] sql/resource-manager (#7535)
Browse files Browse the repository at this point in the history
* Generated from 9402dbf3fb3d5fffcb80f501b1fc857ff97ab723 (#7329)

Fixing PR validation errors

* regenerated

* history and version
  • Loading branch information
AutorestCI authored and fengzhou-msft committed Nov 5, 2019
1 parent bf5da02 commit 4f6a419
Show file tree
Hide file tree
Showing 13 changed files with 624 additions and 148 deletions.
10 changes: 10 additions & 0 deletions sdk/sql/azure-mgmt-sql/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
Release History
===============

0.14.0 (2019-10-04)
+++++++++++++++++++

**Features**

- Added operation ServerBlobAuditingPoliciesOperations.list_by_server
- Added operation ManagedDatabasesOperations.complete_restore
- Added operation DatabaseBlobAuditingPoliciesOperations.list_by_database
- Added operation group ManagedDatabaseRestoreDetailsOperations

0.13.0 (2019-09-03)
+++++++++++++++++++

Expand Down
15 changes: 10 additions & 5 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
from .operations import LongTermRetentionBackupsOperations
from .operations import BackupLongTermRetentionPoliciesOperations
from .operations import ManagedBackupShortTermRetentionPoliciesOperations
from .operations import ManagedDatabasesOperations
from .operations import ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations
from .operations import ServerAutomaticTuningOperations
from .operations import ServerDnsAliasesOperations
Expand Down Expand Up @@ -96,6 +95,8 @@
from .operations import InstancePoolsOperations
from .operations import UsagesOperations
from .operations import ManagedInstancesOperations
from .operations import ManagedDatabaseRestoreDetailsOperations
from .operations import ManagedDatabasesOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import PrivateLinkResourcesOperations
from . import models
Expand Down Expand Up @@ -211,8 +212,6 @@ class SqlManagementClient(SDKClient):
:vartype backup_long_term_retention_policies: azure.mgmt.sql.operations.BackupLongTermRetentionPoliciesOperations
:ivar managed_backup_short_term_retention_policies: ManagedBackupShortTermRetentionPolicies operations
:vartype managed_backup_short_term_retention_policies: azure.mgmt.sql.operations.ManagedBackupShortTermRetentionPoliciesOperations
:ivar managed_databases: ManagedDatabases operations
:vartype managed_databases: azure.mgmt.sql.operations.ManagedDatabasesOperations
:ivar managed_restorable_dropped_database_backup_short_term_retention_policies: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies operations
:vartype managed_restorable_dropped_database_backup_short_term_retention_policies: azure.mgmt.sql.operations.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations
:ivar server_automatic_tuning: ServerAutomaticTuning operations
Expand Down Expand Up @@ -273,6 +272,10 @@ class SqlManagementClient(SDKClient):
:vartype usages: azure.mgmt.sql.operations.UsagesOperations
:ivar managed_instances: ManagedInstances operations
:vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations
:ivar managed_database_restore_details: ManagedDatabaseRestoreDetails operations
:vartype managed_database_restore_details: azure.mgmt.sql.operations.ManagedDatabaseRestoreDetailsOperations
:ivar managed_databases: ManagedDatabases operations
:vartype managed_databases: azure.mgmt.sql.operations.ManagedDatabasesOperations
:ivar private_endpoint_connections: PrivateEndpointConnections operations
:vartype private_endpoint_connections: azure.mgmt.sql.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResources operations
Expand Down Expand Up @@ -401,8 +404,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.managed_backup_short_term_retention_policies = ManagedBackupShortTermRetentionPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.managed_databases = ManagedDatabasesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.managed_restorable_dropped_database_backup_short_term_retention_policies = ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_automatic_tuning = ServerAutomaticTuningOperations(
Expand Down Expand Up @@ -463,6 +464,10 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.managed_instances = ManagedInstancesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.managed_database_restore_details = ManagedDatabaseRestoreDetailsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.managed_databases = ManagedDatabasesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
Expand Down
21 changes: 14 additions & 7 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
from ._models_py3 import LongTermRetentionBackup
from ._models_py3 import ManagedBackupShortTermRetentionPolicy
from ._models_py3 import ManagedDatabase
from ._models_py3 import ManagedDatabaseRestoreDetailsResult
from ._models_py3 import ManagedDatabaseSecurityAlertPolicy
from ._models_py3 import ManagedDatabaseUpdate
from ._models_py3 import ManagedInstance
Expand Down Expand Up @@ -242,6 +243,7 @@
from ._models import LongTermRetentionBackup
from ._models import ManagedBackupShortTermRetentionPolicy
from ._models import ManagedDatabase
from ._models import ManagedDatabaseRestoreDetailsResult
from ._models import ManagedDatabaseSecurityAlertPolicy
from ._models import ManagedDatabaseUpdate
from ._models import ManagedInstance
Expand Down Expand Up @@ -334,6 +336,7 @@
from ._models import VulnerabilityAssessmentScanError
from ._models import VulnerabilityAssessmentScanRecord
from ._paged_models import BackupShortTermRetentionPolicyPaged
from ._paged_models import DatabaseBlobAuditingPolicyPaged
from ._paged_models import DatabaseOperationPaged
from ._paged_models import DatabasePaged
from ._paged_models import DatabaseUsagePaged
Expand Down Expand Up @@ -381,6 +384,7 @@
from ._paged_models import RestorePointPaged
from ._paged_models import SensitivityLabelPaged
from ._paged_models import ServerAzureADAdministratorPaged
from ._paged_models import ServerBlobAuditingPolicyPaged
from ._paged_models import ServerCommunicationLinkPaged
from ._paged_models import ServerDnsAliasPaged
from ._paged_models import ServerKeyPaged
Expand Down Expand Up @@ -456,9 +460,6 @@
JobStepActionSource,
JobStepOutputType,
JobTargetGroupMembershipType,
ManagedDatabaseStatus,
CatalogCollationType,
ManagedDatabaseCreateMode,
AutomaticTuningServerMode,
AutomaticTuningServerReason,
RestorePointType,
Expand All @@ -470,6 +471,7 @@
CreateMode,
SampleName,
DatabaseStatus,
CatalogCollationType,
DatabaseLicenseType,
DatabaseReadScale,
ElasticPoolState,
Expand All @@ -481,6 +483,8 @@
ManagedServerCreateMode,
ManagedInstanceLicenseType,
ManagedInstanceProxyOverride,
ManagedDatabaseStatus,
ManagedDatabaseCreateMode,
LongTermRetentionDatabaseState,
VulnerabilityAssessmentPolicyBaselineName,
SensitivityLabelSource,
Expand Down Expand Up @@ -558,6 +562,7 @@
'LongTermRetentionBackup',
'ManagedBackupShortTermRetentionPolicy',
'ManagedDatabase',
'ManagedDatabaseRestoreDetailsResult',
'ManagedDatabaseSecurityAlertPolicy',
'ManagedDatabaseUpdate',
'ManagedInstance',
Expand Down Expand Up @@ -685,6 +690,8 @@
'SubscriptionUsagePaged',
'VirtualClusterPaged',
'VirtualNetworkRulePaged',
'ServerBlobAuditingPolicyPaged',
'DatabaseBlobAuditingPolicyPaged',
'DatabaseVulnerabilityAssessmentPaged',
'JobAgentPaged',
'JobCredentialPaged',
Expand All @@ -695,7 +702,6 @@
'JobVersionPaged',
'LongTermRetentionBackupPaged',
'ManagedBackupShortTermRetentionPolicyPaged',
'ManagedDatabasePaged',
'ServerDnsAliasPaged',
'ServerSecurityAlertPolicyPaged',
'RestorableDroppedManagedDatabasePaged',
Expand All @@ -717,6 +723,7 @@
'InstancePoolPaged',
'UsagePaged',
'ManagedInstancePaged',
'ManagedDatabasePaged',
'PrivateEndpointConnectionPaged',
'PrivateLinkResourcePaged',
'CheckNameAvailabilityReason',
Expand Down Expand Up @@ -771,9 +778,6 @@
'JobStepActionSource',
'JobStepOutputType',
'JobTargetGroupMembershipType',
'ManagedDatabaseStatus',
'CatalogCollationType',
'ManagedDatabaseCreateMode',
'AutomaticTuningServerMode',
'AutomaticTuningServerReason',
'RestorePointType',
Expand All @@ -785,6 +789,7 @@
'CreateMode',
'SampleName',
'DatabaseStatus',
'CatalogCollationType',
'DatabaseLicenseType',
'DatabaseReadScale',
'ElasticPoolState',
Expand All @@ -796,6 +801,8 @@
'ManagedServerCreateMode',
'ManagedInstanceLicenseType',
'ManagedInstanceProxyOverride',
'ManagedDatabaseStatus',
'ManagedDatabaseCreateMode',
'LongTermRetentionDatabaseState',
'VulnerabilityAssessmentPolicyBaselineName',
'SensitivityLabelSource',
Expand Down
84 changes: 82 additions & 2 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4440,7 +4440,7 @@ class ManagedDatabase(TrackedResource):
:param collation: Collation of the managed database.
:type collation: str
:ivar status: Status of the database. Possible values include: 'Online',
'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating'
'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Restoring', 'Updating'
:vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus
:ivar creation_date: Creation date of the database.
:vartype creation_date: datetime
Expand Down Expand Up @@ -4543,6 +4543,86 @@ def __init__(self, **kwargs):
self.recoverable_database_id = kwargs.get('recoverable_database_id', None)


class ManagedDatabaseRestoreDetailsResult(ProxyResource):
"""A managed database restore details.
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
:ivar status: Restore status.
:vartype status: str
:ivar current_restoring_file_name: Current restoring file name.
:vartype current_restoring_file_name: str
:ivar last_restored_file_name: Last restored file name.
:vartype last_restored_file_name: str
:ivar last_restored_file_time: Last restored file time.
:vartype last_restored_file_time: datetime
:ivar percent_completed: Percent completed.
:vartype percent_completed: float
:ivar unrestorable_files: List of unrestorable files.
:vartype unrestorable_files: list[str]
:ivar number_of_files_detected: Number of files detected.
:vartype number_of_files_detected: long
:ivar last_uploaded_file_name: Last uploaded file name.
:vartype last_uploaded_file_name: str
:ivar last_uploaded_file_time: Last uploaded file time.
:vartype last_uploaded_file_time: datetime
:ivar block_reason: The reason why restore is in Blocked state.
:vartype block_reason: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'status': {'readonly': True},
'current_restoring_file_name': {'readonly': True},
'last_restored_file_name': {'readonly': True},
'last_restored_file_time': {'readonly': True},
'percent_completed': {'readonly': True},
'unrestorable_files': {'readonly': True},
'number_of_files_detected': {'readonly': True},
'last_uploaded_file_name': {'readonly': True},
'last_uploaded_file_time': {'readonly': True},
'block_reason': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'str'},
'current_restoring_file_name': {'key': 'properties.currentRestoringFileName', 'type': 'str'},
'last_restored_file_name': {'key': 'properties.lastRestoredFileName', 'type': 'str'},
'last_restored_file_time': {'key': 'properties.lastRestoredFileTime', 'type': 'iso-8601'},
'percent_completed': {'key': 'properties.percentCompleted', 'type': 'float'},
'unrestorable_files': {'key': 'properties.unrestorableFiles', 'type': '[str]'},
'number_of_files_detected': {'key': 'properties.numberOfFilesDetected', 'type': 'long'},
'last_uploaded_file_name': {'key': 'properties.lastUploadedFileName', 'type': 'str'},
'last_uploaded_file_time': {'key': 'properties.lastUploadedFileTime', 'type': 'iso-8601'},
'block_reason': {'key': 'properties.blockReason', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ManagedDatabaseRestoreDetailsResult, self).__init__(**kwargs)
self.status = None
self.current_restoring_file_name = None
self.last_restored_file_name = None
self.last_restored_file_time = None
self.percent_completed = None
self.unrestorable_files = None
self.number_of_files_detected = None
self.last_uploaded_file_name = None
self.last_uploaded_file_time = None
self.block_reason = None


class ManagedDatabaseSecurityAlertPolicy(ProxyResource):
"""A managed database security alert policy.
Expand Down Expand Up @@ -4628,7 +4708,7 @@ class ManagedDatabaseUpdate(Model):
:param collation: Collation of the managed database.
:type collation: str
:ivar status: Status of the database. Possible values include: 'Online',
'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating'
'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Restoring', 'Updating'
:vartype status: str or ~azure.mgmt.sql.models.ManagedDatabaseStatus
:ivar creation_date: Creation date of the database.
:vartype creation_date: datetime
Expand Down
Loading

0 comments on commit 4f6a419

Please sign in to comment.