diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index fffd1dfc5d5f..f7da1a4021a9 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -14,7 +14,6 @@ from .backup_long_term_retention_policy import BackupLongTermRetentionPolicy from .backup_long_term_retention_vault import BackupLongTermRetentionVault from .tracked_resource import TrackedResource -from .restore_point import RestorePoint from .recoverable_database import RecoverableDatabase from .restorable_dropped_database import RestorableDroppedDatabase from .max_size_capability import MaxSizeCapability @@ -64,6 +63,8 @@ from .server_usage import ServerUsage from .database_usage import DatabaseUsage from .database_blob_auditing_policy import DatabaseBlobAuditingPolicy +from .automatic_tuning_options import AutomaticTuningOptions +from .database_automatic_tuning import DatabaseAutomaticTuning from .encryption_protector import EncryptionProtector from .failover_group_read_write_endpoint import FailoverGroupReadWriteEndpoint from .failover_group_read_only_endpoint import FailoverGroupReadOnlyEndpoint @@ -93,11 +94,14 @@ from .virtual_network_rule import VirtualNetworkRule from .database_operation import DatabaseOperation from .resource_move_definition import ResourceMoveDefinition +from .automatic_tuning_server_options import AutomaticTuningServerOptions +from .server_automatic_tuning import ServerAutomaticTuning from .server_dns_alias import ServerDnsAlias from .server_dns_alias_acquisition import ServerDnsAliasAcquisition +from .restore_point import RestorePoint +from .create_database_restore_point_definition import CreateDatabaseRestorePointDefinition from .backup_long_term_retention_policy_paged import BackupLongTermRetentionPolicyPaged from .backup_long_term_retention_vault_paged import BackupLongTermRetentionVaultPaged -from .restore_point_paged import RestorePointPaged from .recoverable_database_paged import RecoverableDatabasePaged from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged from .server_paged import ServerPaged @@ -135,9 +139,9 @@ from .virtual_network_rule_paged import VirtualNetworkRulePaged from .database_operation_paged import DatabaseOperationPaged from .server_dns_alias_paged import ServerDnsAliasPaged +from .restore_point_paged import RestorePointPaged from .sql_management_client_enums import ( BackupLongTermRetentionPolicyState, - RestorePointType, CapabilityStatus, MaxSizeUnits, PerformanceLevelUnit, @@ -170,6 +174,10 @@ ReplicationRole, ReplicationState, BlobAuditingPolicyState, + AutomaticTuningMode, + AutomaticTuningOptionModeDesired, + AutomaticTuningOptionModeActual, + AutomaticTuningDisabledReason, ServerKeyType, ReadWriteEndpointFailoverPolicy, ReadOnlyEndpointFailoverPolicy, @@ -185,6 +193,9 @@ SyncMemberState, VirtualNetworkRuleState, ManagementOperationState, + AutomaticTuningServerMode, + AutomaticTuningServerReason, + RestorePointType, ) __all__ = [ @@ -193,7 +204,6 @@ 'BackupLongTermRetentionPolicy', 'BackupLongTermRetentionVault', 'TrackedResource', - 'RestorePoint', 'RecoverableDatabase', 'RestorableDroppedDatabase', 'MaxSizeCapability', @@ -243,6 +253,8 @@ 'ServerUsage', 'DatabaseUsage', 'DatabaseBlobAuditingPolicy', + 'AutomaticTuningOptions', + 'DatabaseAutomaticTuning', 'EncryptionProtector', 'FailoverGroupReadWriteEndpoint', 'FailoverGroupReadOnlyEndpoint', @@ -272,11 +284,14 @@ 'VirtualNetworkRule', 'DatabaseOperation', 'ResourceMoveDefinition', + 'AutomaticTuningServerOptions', + 'ServerAutomaticTuning', 'ServerDnsAlias', 'ServerDnsAliasAcquisition', + 'RestorePoint', + 'CreateDatabaseRestorePointDefinition', 'BackupLongTermRetentionPolicyPaged', 'BackupLongTermRetentionVaultPaged', - 'RestorePointPaged', 'RecoverableDatabasePaged', 'RestorableDroppedDatabasePaged', 'ServerPaged', @@ -314,8 +329,8 @@ 'VirtualNetworkRulePaged', 'DatabaseOperationPaged', 'ServerDnsAliasPaged', + 'RestorePointPaged', 'BackupLongTermRetentionPolicyState', - 'RestorePointType', 'CapabilityStatus', 'MaxSizeUnits', 'PerformanceLevelUnit', @@ -348,6 +363,10 @@ 'ReplicationRole', 'ReplicationState', 'BlobAuditingPolicyState', + 'AutomaticTuningMode', + 'AutomaticTuningOptionModeDesired', + 'AutomaticTuningOptionModeActual', + 'AutomaticTuningDisabledReason', 'ServerKeyType', 'ReadWriteEndpointFailoverPolicy', 'ReadOnlyEndpointFailoverPolicy', @@ -363,4 +382,7 @@ 'SyncMemberState', 'VirtualNetworkRuleState', 'ManagementOperationState', + 'AutomaticTuningServerMode', + 'AutomaticTuningServerReason', + 'RestorePointType', ] diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py b/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py new file mode 100644 index 000000000000..d51528905ca8 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_options.py @@ -0,0 +1,57 @@ +# 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 AutomaticTuningOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + 'QueryStoreReadOnly', 'NotSupported' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningDisabledReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'}, + } + + def __init__(self, desired_state=None): + super(AutomaticTuningOptions, self).__init__() + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py b/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py new file mode 100644 index 000000000000..163fa8125cf1 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/automatic_tuning_server_options.py @@ -0,0 +1,56 @@ +# 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 AutomaticTuningServerOptions(Model): + """Automatic tuning properties for individual advisors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param desired_state: Automatic tuning option desired state. Possible + values include: 'Off', 'On', 'Default' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired + :ivar actual_state: Automatic tuning option actual state. Possible values + include: 'Off', 'On' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningOptionModeActual + :ivar reason_code: Reason code if desired and actual state are different. + :vartype reason_code: int + :ivar reason_desc: Reason description if desired and actual state are + different. Possible values include: 'Default', 'Disabled', + 'AutoConfigured' + :vartype reason_desc: str or + ~azure.mgmt.sql.models.AutomaticTuningServerReason + """ + + _validation = { + 'actual_state': {'readonly': True}, + 'reason_code': {'readonly': True}, + 'reason_desc': {'readonly': True}, + } + + _attribute_map = { + 'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'}, + 'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'}, + 'reason_code': {'key': 'reasonCode', 'type': 'int'}, + 'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'}, + } + + def __init__(self, desired_state=None): + super(AutomaticTuningServerOptions, self).__init__() + self.desired_state = desired_state + self.actual_state = None + self.reason_code = None + self.reason_desc = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py b/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py new file mode 100644 index 000000000000..14c582c5fd37 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/create_database_restore_point_definition.py @@ -0,0 +1,33 @@ +# 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 CreateDatabaseRestorePointDefinition(Model): + """Contains the information necessary to perform a create database restore + point operation. + + :param restore_point_label: The restore point label to apply + :type restore_point_label: str + """ + + _validation = { + 'restore_point_label': {'required': True}, + } + + _attribute_map = { + 'restore_point_label': {'key': 'restorePointLabel', 'type': 'str'}, + } + + def __init__(self, restore_point_label): + super(CreateDatabaseRestorePointDefinition, self).__init__() + self.restore_point_label = restore_point_label diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py new file mode 100644 index 000000000000..2bee39c6b0e6 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_automatic_tuning.py @@ -0,0 +1,57 @@ +# 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 DatabaseAutomaticTuning(ProxyResource): + """Database-level Automatic Tuning. + + 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 + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, ~azure.mgmt.sql.models.AutomaticTuningOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningOptions}'}, + } + + def __init__(self, desired_state=None, options=None): + super(DatabaseAutomaticTuning, self).__init__() + self.desired_state = desired_state + self.actual_state = None + self.options = options diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py b/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py index 7a2f5640a500..5a86dcac2e00 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/restore_point.py @@ -13,7 +13,7 @@ class RestorePoint(ProxyResource): - """A database restore point. + """Database restore points. Variables are only populated by the server, and will be ignored when sending a request. @@ -24,38 +24,48 @@ class RestorePoint(ProxyResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :ivar restore_point_type: The restore point type of the database restore - point. Possible values include: 'DISCRETE', 'CONTINUOUS' + :ivar location: Resource location. + :vartype location: str + :ivar restore_point_type: The type of restore point. Possible values + include: 'CONTINUOUS', 'DISCRETE' :vartype restore_point_type: str or ~azure.mgmt.sql.models.RestorePointType - :ivar restore_point_creation_date: Restore point creation time (ISO8601 - format). Populated when restorePointType = CONTINUOUS. Null otherwise. - :vartype restore_point_creation_date: datetime - :ivar earliest_restore_date: Earliest restore time (ISO8601 format). - Populated when restorePointType = DISCRETE. Null otherwise. + :ivar earliest_restore_date: The earliest time to which this database can + be restored :vartype earliest_restore_date: datetime + :ivar restore_point_creation_date: The time the backup was taken + :vartype restore_point_creation_date: datetime + :ivar restore_point_label: The label of restore point for backup request + by user + :vartype restore_point_label: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'readonly': True}, 'restore_point_type': {'readonly': True}, - 'restore_point_creation_date': {'readonly': True}, 'earliest_restore_date': {'readonly': True}, + 'restore_point_creation_date': {'readonly': True}, + 'restore_point_label': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'restore_point_type': {'key': 'properties.restorePointType', 'type': 'RestorePointType'}, - 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, 'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'}, + 'restore_point_creation_date': {'key': 'properties.restorePointCreationDate', 'type': 'iso-8601'}, + 'restore_point_label': {'key': 'properties.restorePointLabel', 'type': 'str'}, } def __init__(self): super(RestorePoint, self).__init__() + self.location = None self.restore_point_type = None - self.restore_point_creation_date = None self.earliest_restore_date = None + self.restore_point_creation_date = None + self.restore_point_label = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py new file mode 100644 index 000000000000..fd9963f37eab --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_automatic_tuning.py @@ -0,0 +1,60 @@ +# 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 ServerAutomaticTuning(ProxyResource): + """Server-level Automatic Tuning. + + 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 + :param desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :ivar actual_state: Automatic tuning actual state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :vartype actual_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'actual_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'desired_state': {'key': 'properties.desiredState', 'type': 'AutomaticTuningServerMode'}, + 'actual_state': {'key': 'properties.actualState', 'type': 'AutomaticTuningServerMode'}, + 'options': {'key': 'properties.options', 'type': '{AutomaticTuningServerOptions}'}, + } + + def __init__(self, desired_state=None, options=None): + super(ServerAutomaticTuning, self).__init__() + self.desired_state = desired_state + self.actual_state = None + self.options = options diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py b/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py index 2a19493bc5e7..b80618b70daf 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sql_management_client_enums.py @@ -18,12 +18,6 @@ class BackupLongTermRetentionPolicyState(Enum): enabled = "Enabled" -class RestorePointType(Enum): - - discrete = "DISCRETE" - continuous = "CONTINUOUS" - - class CapabilityStatus(Enum): visible = "Visible" @@ -333,6 +327,38 @@ class BlobAuditingPolicyState(Enum): disabled = "Disabled" +class AutomaticTuningMode(Enum): + + inherit = "Inherit" + custom = "Custom" + auto = "Auto" + unspecified = "Unspecified" + + +class AutomaticTuningOptionModeDesired(Enum): + + off = "Off" + on = "On" + default = "Default" + + +class AutomaticTuningOptionModeActual(Enum): + + off = "Off" + on = "On" + + +class AutomaticTuningDisabledReason(Enum): + + default = "Default" + disabled = "Disabled" + auto_configured = "AutoConfigured" + inherited_from_server = "InheritedFromServer" + query_store_off = "QueryStoreOff" + query_store_read_only = "QueryStoreReadOnly" + not_supported = "NotSupported" + + class ServerKeyType(Enum): service_managed = "ServiceManaged" @@ -450,3 +476,23 @@ class ManagementOperationState(Enum): failed = "Failed" cancel_in_progress = "CancelInProgress" cancelled = "Cancelled" + + +class AutomaticTuningServerMode(Enum): + + custom = "Custom" + auto = "Auto" + unspecified = "Unspecified" + + +class AutomaticTuningServerReason(Enum): + + default = "Default" + disabled = "Disabled" + auto_configured = "AutoConfigured" + + +class RestorePointType(Enum): + + continuous = "CONTINUOUS" + discrete = "DISCRETE" diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index f6cf50e2157e..59b10b1d495f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -11,7 +11,6 @@ from .backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations from .backup_long_term_retention_vaults_operations import BackupLongTermRetentionVaultsOperations -from .restore_points_operations import RestorePointsOperations from .recoverable_databases_operations import RecoverableDatabasesOperations from .restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations from .capabilities_operations import CapabilitiesOperations @@ -37,6 +36,7 @@ from .server_usages_operations import ServerUsagesOperations from .database_usages_operations import DatabaseUsagesOperations from .database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations +from .database_automatic_tuning_operations import DatabaseAutomaticTuningOperations from .encryption_protectors_operations import EncryptionProtectorsOperations from .failover_groups_operations import FailoverGroupsOperations from .operations import Operations @@ -47,12 +47,13 @@ from .subscription_usages_operations import SubscriptionUsagesOperations from .virtual_network_rules_operations import VirtualNetworkRulesOperations from .database_operations import DatabaseOperations +from .server_automatic_tuning_operations import ServerAutomaticTuningOperations from .server_dns_aliases_operations import ServerDnsAliasesOperations +from .restore_points_operations import RestorePointsOperations __all__ = [ 'BackupLongTermRetentionPoliciesOperations', 'BackupLongTermRetentionVaultsOperations', - 'RestorePointsOperations', 'RecoverableDatabasesOperations', 'RestorableDroppedDatabasesOperations', 'CapabilitiesOperations', @@ -78,6 +79,7 @@ 'ServerUsagesOperations', 'DatabaseUsagesOperations', 'DatabaseBlobAuditingPoliciesOperations', + 'DatabaseAutomaticTuningOperations', 'EncryptionProtectorsOperations', 'FailoverGroupsOperations', 'Operations', @@ -88,5 +90,7 @@ 'SubscriptionUsagesOperations', 'VirtualNetworkRulesOperations', 'DatabaseOperations', + 'ServerAutomaticTuningOperations', 'ServerDnsAliasesOperations', + 'RestorePointsOperations', ] diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py new file mode 100644 index 000000000000..006b4bbf630b --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_automatic_tuning_operations.py @@ -0,0 +1,182 @@ +# 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 .. import models + + +class DatabaseAutomaticTuningOperations(object): + """DatabaseAutomaticTuningOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2015-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Gets a database's automatic tuning. + + :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 database_name: The name of the database. + :type database_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: DatabaseAutomaticTuning or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.DatabaseAutomaticTuning or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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('DatabaseAutomaticTuning', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, server_name, database_name, desired_state=None, options=None, custom_headers=None, raw=False, **operation_config): + """Update automatic tuning properties for target database. + + :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 database_name: The name of the database. + :type database_name: str + :param desired_state: Automatic tuning desired state. Possible values + include: 'Inherit', 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or ~azure.mgmt.sql.models.AutomaticTuningMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningOptions] + :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: DatabaseAutomaticTuning or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.DatabaseAutomaticTuning or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.DatabaseAutomaticTuning(desired_state=desired_state, options=options) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/automaticTuning/current' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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, 'DatabaseAutomaticTuning') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, 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('DatabaseAutomaticTuning', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py index 39053faa125c..069134a69cfe 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/restore_points_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -23,7 +25,7 @@ class RestorePointsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An objec model deserializer. - :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". """ models = models @@ -33,13 +35,13 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2014-04-01" + self.api_version = "2017-03-01-preview" self.config = config def list_by_database( self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of database restore points. + """Gets a collection of restore points that belongs to the database. :param resource_group_name: The name of the resource group that contains the resource. You can obtain this value from the Azure @@ -47,8 +49,7 @@ def list_by_database( :type resource_group_name: str :param server_name: The name of the server. :type server_name: str - :param database_name: The name of the database to get available - restore points. + :param database_name: The name of the database. :type database_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -66,10 +67,10 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints' path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serverName': self._serialize.url("server_name", server_name, 'str'), - 'databaseName': self._serialize.url("database_name", database_name, 'str') + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -112,3 +113,199 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + + + def _create_initial( + self, resource_group_name, server_name, database_name, restore_point_label, custom_headers=None, raw=False, **operation_config): + parameters = models.CreateDatabaseRestorePointDefinition(restore_point_label=restore_point_label) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_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, 'CreateDatabaseRestorePointDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 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('RestorePoint', response) + if response.status_code == 201: + deserialized = self._deserialize('RestorePoint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, server_name, database_name, restore_point_label, custom_headers=None, raw=False, **operation_config): + """Creates a restore point for a data warehouse. + + :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 database_name: The name of the database. + :type database_name: str + :param restore_point_label: The restore point label to apply + :type restore_point_label: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns RestorePoint + or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.sql.models.RestorePoint] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + server_name=server_name, + database_name=database_name, + restore_point_label=restore_point_label, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = self._deserialize('RestorePoint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def get( + self, resource_group_name, server_name, database_name, restore_point_name, custom_headers=None, raw=False, **operation_config): + """Gets a restore point. + + :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 database_name: The name of the database. + :type database_name: str + :param restore_point_name: The name of the restore point. + :type restore_point_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: RestorePoint or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.RestorePoint or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_name, 'str'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'restorePointName': self._serialize.url("restore_point_name", restore_point_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('RestorePoint', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py new file mode 100644 index 000000000000..532834124125 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/server_automatic_tuning_operations.py @@ -0,0 +1,177 @@ +# 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 .. import models + + +class ServerAutomaticTuningOperations(object): + """ServerAutomaticTuningOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: The API version to use for the request. Constant value: "2017-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-03-01-preview" + + self.config = config + + def get( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Retrieves server automatic tuning options. + + :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: ServerAutomaticTuning or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.ServerAutomaticTuning or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_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('ServerAutomaticTuning', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, server_name, desired_state=None, options=None, custom_headers=None, raw=False, **operation_config): + """Update automatic tuning options on server. + + :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 desired_state: Automatic tuning desired state. Possible values + include: 'Custom', 'Auto', 'Unspecified' + :type desired_state: str or + ~azure.mgmt.sql.models.AutomaticTuningServerMode + :param options: Automatic tuning options definition. + :type options: dict[str, + ~azure.mgmt.sql.models.AutomaticTuningServerOptions] + :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: ServerAutomaticTuning or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.sql.models.ServerAutomaticTuning or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ServerAutomaticTuning(desired_state=desired_state, options=options) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/automaticTuning/current' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serverName': self._serialize.url("server_name", server_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, 'ServerAutomaticTuning') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, 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('ServerAutomaticTuning', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py b/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py index 321930d51ad4..bbe594e8efec 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py +++ b/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py @@ -15,7 +15,6 @@ from .version import VERSION from .operations.backup_long_term_retention_policies_operations import BackupLongTermRetentionPoliciesOperations from .operations.backup_long_term_retention_vaults_operations import BackupLongTermRetentionVaultsOperations -from .operations.restore_points_operations import RestorePointsOperations from .operations.recoverable_databases_operations import RecoverableDatabasesOperations from .operations.restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations from .operations.capabilities_operations import CapabilitiesOperations @@ -41,6 +40,7 @@ from .operations.server_usages_operations import ServerUsagesOperations from .operations.database_usages_operations import DatabaseUsagesOperations from .operations.database_blob_auditing_policies_operations import DatabaseBlobAuditingPoliciesOperations +from .operations.database_automatic_tuning_operations import DatabaseAutomaticTuningOperations from .operations.encryption_protectors_operations import EncryptionProtectorsOperations from .operations.failover_groups_operations import FailoverGroupsOperations from .operations.operations import Operations @@ -51,7 +51,9 @@ from .operations.subscription_usages_operations import SubscriptionUsagesOperations from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations from .operations.database_operations import DatabaseOperations +from .operations.server_automatic_tuning_operations import ServerAutomaticTuningOperations from .operations.server_dns_aliases_operations import ServerDnsAliasesOperations +from .operations.restore_points_operations import RestorePointsOperations from . import models @@ -98,8 +100,6 @@ class SqlManagementClient(object): :vartype backup_long_term_retention_policies: azure.mgmt.sql.operations.BackupLongTermRetentionPoliciesOperations :ivar backup_long_term_retention_vaults: BackupLongTermRetentionVaults operations :vartype backup_long_term_retention_vaults: azure.mgmt.sql.operations.BackupLongTermRetentionVaultsOperations - :ivar restore_points: RestorePoints operations - :vartype restore_points: azure.mgmt.sql.operations.RestorePointsOperations :ivar recoverable_databases: RecoverableDatabases operations :vartype recoverable_databases: azure.mgmt.sql.operations.RecoverableDatabasesOperations :ivar restorable_dropped_databases: RestorableDroppedDatabases operations @@ -150,6 +150,8 @@ class SqlManagementClient(object): :vartype database_usages: azure.mgmt.sql.operations.DatabaseUsagesOperations :ivar database_blob_auditing_policies: DatabaseBlobAuditingPolicies operations :vartype database_blob_auditing_policies: azure.mgmt.sql.operations.DatabaseBlobAuditingPoliciesOperations + :ivar database_automatic_tuning: DatabaseAutomaticTuning operations + :vartype database_automatic_tuning: azure.mgmt.sql.operations.DatabaseAutomaticTuningOperations :ivar encryption_protectors: EncryptionProtectors operations :vartype encryption_protectors: azure.mgmt.sql.operations.EncryptionProtectorsOperations :ivar failover_groups: FailoverGroups operations @@ -170,8 +172,12 @@ class SqlManagementClient(object): :vartype virtual_network_rules: azure.mgmt.sql.operations.VirtualNetworkRulesOperations :ivar database_operations: DatabaseOperations operations :vartype database_operations: azure.mgmt.sql.operations.DatabaseOperations + :ivar server_automatic_tuning: ServerAutomaticTuning operations + :vartype server_automatic_tuning: azure.mgmt.sql.operations.ServerAutomaticTuningOperations :ivar server_dns_aliases: ServerDnsAliases operations :vartype server_dns_aliases: azure.mgmt.sql.operations.ServerDnsAliasesOperations + :ivar restore_points: RestorePoints operations + :vartype restore_points: azure.mgmt.sql.operations.RestorePointsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -196,8 +202,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.backup_long_term_retention_vaults = BackupLongTermRetentionVaultsOperations( self._client, self.config, self._serialize, self._deserialize) - self.restore_points = RestorePointsOperations( - self._client, self.config, self._serialize, self._deserialize) self.recoverable_databases = RecoverableDatabasesOperations( self._client, self.config, self._serialize, self._deserialize) self.restorable_dropped_databases = RestorableDroppedDatabasesOperations( @@ -248,6 +252,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.database_blob_auditing_policies = DatabaseBlobAuditingPoliciesOperations( self._client, self.config, self._serialize, self._deserialize) + self.database_automatic_tuning = DatabaseAutomaticTuningOperations( + self._client, self.config, self._serialize, self._deserialize) self.encryption_protectors = EncryptionProtectorsOperations( self._client, self.config, self._serialize, self._deserialize) self.failover_groups = FailoverGroupsOperations( @@ -268,5 +274,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.database_operations = DatabaseOperations( self._client, self.config, self._serialize, self._deserialize) + self.server_automatic_tuning = ServerAutomaticTuningOperations( + self._client, self.config, self._serialize, self._deserialize) self.server_dns_aliases = ServerDnsAliasesOperations( self._client, self.config, self._serialize, self._deserialize) + self.restore_points = RestorePointsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-sql/azure/mgmt/sql/version.py b/azure-mgmt-sql/azure/mgmt/sql/version.py index c806fd2eb6c3..53a203f32aaf 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/version.py +++ b/azure-mgmt-sql/azure/mgmt/sql/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.8.5" +VERSION = ""