diff --git a/azure-mgmt-sql/HISTORY.rst b/azure-mgmt-sql/HISTORY.rst index da2201881cff..275db7a692c0 100644 --- a/azure-mgmt-sql/HISTORY.rst +++ b/azure-mgmt-sql/HISTORY.rst @@ -3,6 +3,15 @@ Release History =============== +0.8.5 (2018-01-18) +++++++++++++++++++ + +**Features** + +- Added support for renaming databases +- Added missing database editions and service objectives +- Added ability to list long term retention vaults & policies + 0.8.4 (2017-11-14) ++++++++++++++++++ diff --git a/azure-mgmt-sql/README.rst b/azure-mgmt-sql/README.rst index cdbf2afdc967..be2356da21f0 100644 --- a/azure-mgmt-sql/README.rst +++ b/azure-mgmt-sql/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure SQL Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,8 +37,8 @@ Usage ===== For code examples, see `SQL Management -`__ -on readthedocs.org. +`__ +on docs.microsoft.com. Provide Feedback diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 82d0ed4f3163..531a679a81b5 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -92,8 +92,11 @@ from .subscription_usage import SubscriptionUsage from .virtual_network_rule import VirtualNetworkRule from .database_operation import DatabaseOperation +from .resource_move_definition import ResourceMoveDefinition from .server_dns_alias import ServerDnsAlias from .server_dns_alias_acquisition import ServerDnsAliasAcquisition +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 @@ -268,8 +271,11 @@ 'SubscriptionUsage', 'VirtualNetworkRule', 'DatabaseOperation', + 'ResourceMoveDefinition', 'ServerDnsAlias', 'ServerDnsAliasAcquisition', + 'BackupLongTermRetentionPolicyPaged', + 'BackupLongTermRetentionVaultPaged', 'RestorePointPaged', 'RecoverableDatabasePaged', 'RestorableDroppedDatabasePaged', diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_paged.py new file mode 100644 index 000000000000..609528d85e94 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_policy_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class BackupLongTermRetentionPolicyPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupLongTermRetentionPolicy ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupLongTermRetentionPolicy]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupLongTermRetentionPolicyPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_vault_paged.py b/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_vault_paged.py new file mode 100644 index 000000000000..79b7b79ab289 --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/backup_long_term_retention_vault_paged.py @@ -0,0 +1,27 @@ +# 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.paging import Paged + + +class BackupLongTermRetentionVaultPaged(Paged): + """ + A paging container for iterating over a list of :class:`BackupLongTermRetentionVault ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[BackupLongTermRetentionVault]'} + } + + def __init__(self, *args, **kwargs): + + super(BackupLongTermRetentionVaultPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py b/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py index 5b3815ed5676..ed1c66db0108 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py @@ -38,4 +38,5 @@ class CheckNameAvailabilityRequest(Model): type = "Microsoft.Sql/servers" def __init__(self, name): + super(CheckNameAvailabilityRequest, self).__init__() self.name = name diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py b/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py index a64e402302a2..26c98631887a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py @@ -47,6 +47,7 @@ class CheckNameAvailabilityResponse(Model): } def __init__(self): + super(CheckNameAvailabilityResponse, self).__init__() self.available = None self.message = None self.name = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database.py b/azure-mgmt-sql/azure/mgmt/sql/models/database.py index d67499b4b7e6..d1e3be1b7d5d 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database.py @@ -105,9 +105,11 @@ class Database(TrackedResource): NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - referred to by operationId: "Capabilities_ListByLocation.". Possible - values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'Free', - 'Stretch', 'DataWarehouse', 'System', 'System2' + referred to by operationId: "Capabilities_ListByLocation." or use the + Azure CLI command `az sql db list-editions -l westus --query [].name`. + Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2' :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition :param max_size_bytes: The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, @@ -124,7 +126,9 @@ class Database(TrackedResource): requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - referred to by operationId: "Capabilities_ListByLocation." + referred to by operationId: "Capabilities_ListByLocation." or use the + Azure CLI command `az sql db list-editions --location --query + [].supportedServiceLevelObjectives[].name` . :type requested_service_objective_id: str :param requested_service_objective_name: The name of the configured service level objective of the database. This is the service level @@ -132,14 +136,30 @@ class Database(TrackedResource): successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - referred to by operationId: "Capabilities_ListByLocation.". Possible - values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', 'P4', - 'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool' + referred to by operationId: "Capabilities_ListByLocation." or use the + Azure CLI command `az sql db list-editions --location --query + [].supportedServiceLevelObjectives[].name`. Possible values include: + 'System', 'System0', 'System1', 'System2', 'System3', 'System4', + 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', + 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', + 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', + 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', + 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', + 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', + 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', + 'DS2000', 'ElasticPool' :type requested_service_objective_name: str or ~azure.mgmt.sql.models.ServiceObjectiveName :ivar service_level_objective: The current service level objective of the - database. Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', - 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool' + database. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' :vartype service_level_objective: str or ~azure.mgmt.sql.models.ServiceObjectiveName :ivar status: The status of the database. diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py index 58c6175c6303..004219b09443 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_update.py @@ -100,9 +100,11 @@ class DatabaseUpdate(Resource): NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - referred to by operationId: "Capabilities_ListByLocation.". Possible - values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'Free', - 'Stretch', 'DataWarehouse', 'System', 'System2' + referred to by operationId: "Capabilities_ListByLocation." or use the + Azure CLI command `az sql db list-editions -l westus --query [].name`. + Possible values include: 'Web', 'Business', 'Basic', 'Standard', + 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + 'System2' :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition :param max_size_bytes: The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, @@ -119,7 +121,9 @@ class DatabaseUpdate(Resource): requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - referred to by operationId: "Capabilities_ListByLocation." + referred to by operationId: "Capabilities_ListByLocation." or use the + Azure CLI command `az sql db list-editions --location --query + [].supportedServiceLevelObjectives[].name` . :type requested_service_objective_id: str :param requested_service_objective_name: The name of the configured service level objective of the database. This is the service level @@ -127,14 +131,30 @@ class DatabaseUpdate(Resource): successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - referred to by operationId: "Capabilities_ListByLocation.". Possible - values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', 'P4', - 'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool' + referred to by operationId: "Capabilities_ListByLocation." or use the + Azure CLI command `az sql db list-editions --location --query + [].supportedServiceLevelObjectives[].name`. Possible values include: + 'System', 'System0', 'System1', 'System2', 'System3', 'System4', + 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', + 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', + 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', + 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', + 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', + 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', + 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', + 'DS2000', 'ElasticPool' :type requested_service_objective_name: str or ~azure.mgmt.sql.models.ServiceObjectiveName :ivar service_level_objective: The current service level objective of the - database. Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', - 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool' + database. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' :vartype service_level_objective: str or ~azure.mgmt.sql.models.ServiceObjectiveName :ivar status: The status of the database. diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py b/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py index e91f91cde3e9..e48c7413dd9a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py @@ -56,6 +56,7 @@ class DatabaseUsage(Model): } def __init__(self): + super(DatabaseUsage, self).__init__() self.name = None self.resource_name = None self.display_name = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py b/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py index f16fb0a3b8b2..ed7231f28a3a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py @@ -47,6 +47,7 @@ class EditionCapability(Model): } def __init__(self): + super(EditionCapability, self).__init__() self.name = None self.status = None self.supported_service_level_objectives = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_dtu_capability.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_dtu_capability.py index 162dd15d476b..e3ed2ab9b0bc 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_dtu_capability.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_dtu_capability.py @@ -62,6 +62,7 @@ class ElasticPoolDtuCapability(Model): } def __init__(self): + super(ElasticPoolDtuCapability, self).__init__() self.limit = None self.max_database_count = None self.status = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py index 9891e27fc3f2..747107147039 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_edition_capability.py @@ -47,6 +47,7 @@ class ElasticPoolEditionCapability(Model): } def __init__(self): + super(ElasticPoolEditionCapability, self).__init__() self.name = None self.status = None self.supported_elastic_pool_dtus = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_dtu_capability.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_dtu_capability.py index 7bcd388da01b..16f42b748d9e 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_dtu_capability.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_max_dtu_capability.py @@ -42,6 +42,7 @@ class ElasticPoolPerDatabaseMaxDtuCapability(Model): } def __init__(self): + super(ElasticPoolPerDatabaseMaxDtuCapability, self).__init__() self.limit = None self.status = None self.supported_per_database_min_dtus = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_dtu_capability.py b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_dtu_capability.py index 2d26e3dbad27..54e6b3cc8324 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_dtu_capability.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_dtu_capability.py @@ -36,5 +36,6 @@ class ElasticPoolPerDatabaseMinDtuCapability(Model): } def __init__(self): + super(ElasticPoolPerDatabaseMinDtuCapability, self).__init__() self.limit = None self.status = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py b/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py index 859d62566233..3d99fbd9f0af 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/export_request.py @@ -52,6 +52,7 @@ class ExportRequest(Model): } def __init__(self, storage_key_type, storage_key, storage_uri, administrator_login, administrator_login_password, authentication_type="SQL"): + super(ExportRequest, self).__init__() self.storage_key_type = storage_key_type self.storage_key = storage_key self.storage_uri = storage_uri diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py index 0e966f34f308..be2fed191312 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_only_endpoint.py @@ -26,4 +26,5 @@ class FailoverGroupReadOnlyEndpoint(Model): } def __init__(self, failover_policy=None): + super(FailoverGroupReadOnlyEndpoint, self).__init__() self.failover_policy = failover_policy diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py index 77562ffaaede..dc4ddf4a738f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_read_write_endpoint.py @@ -38,5 +38,6 @@ class FailoverGroupReadWriteEndpoint(Model): } def __init__(self, failover_policy, failover_with_data_loss_grace_period_minutes=None): + super(FailoverGroupReadWriteEndpoint, self).__init__() self.failover_policy = failover_policy self.failover_with_data_loss_grace_period_minutes = failover_with_data_loss_grace_period_minutes diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py index 4db70ded155e..7b6f0ae6416a 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/failover_group_update.py @@ -37,6 +37,7 @@ class FailoverGroupUpdate(Model): } def __init__(self, read_write_endpoint=None, read_only_endpoint=None, databases=None, tags=None): + super(FailoverGroupUpdate, self).__init__() self.read_write_endpoint = read_write_endpoint self.read_only_endpoint = read_only_endpoint self.databases = databases diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py b/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py index 9b4cb6b18424..98729e57ba4b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/import_extension_request.py @@ -68,6 +68,7 @@ class ImportExtensionRequest(Model): operation_mode = "Import" def __init__(self, storage_key_type, storage_key, storage_uri, administrator_login, administrator_login_password, name=None, type=None, authentication_type="SQL"): + super(ImportExtensionRequest, self).__init__() self.name = name self.type = type self.storage_key_type = storage_key_type diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py b/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py index 45f870c985b7..fd755b5fbd7c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/import_request.py @@ -35,13 +35,19 @@ class ImportRequest(ExportRequest): :param database_name: The name of the database to import. :type database_name: str :param edition: The edition for the database being created. Possible - values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'Free', - 'Stretch', 'DataWarehouse', 'System', 'System2' + values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', + 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2' :type edition: str or ~azure.mgmt.sql.models.DatabaseEdition :param service_objective_name: The name of the service objective to assign - to the database. Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', - 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', - 'ElasticPool' + to the database. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' :type service_objective_name: str or ~azure.mgmt.sql.models.ServiceObjectiveName :param max_size_bytes: The maximum size for the newly imported database. diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py b/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py index 0680fb48ea44..f6dd5a27e27c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/location_capabilities.py @@ -41,6 +41,7 @@ class LocationCapabilities(Model): } def __init__(self): + super(LocationCapabilities, self).__init__() self.name = None self.status = None self.supported_server_versions = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py b/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py index a7342f131ccb..5ccac1e3ccd2 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/max_size_capability.py @@ -41,6 +41,7 @@ class MaxSizeCapability(Model): } def __init__(self): + super(MaxSizeCapability, self).__init__() self.limit = None self.unit = None self.status = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/metric.py b/azure-mgmt-sql/azure/mgmt/sql/models/metric.py index 39500f0c0e6e..70f81037f8f3 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/metric.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/metric.py @@ -53,6 +53,7 @@ class Metric(Model): } def __init__(self): + super(Metric, self).__init__() self.start_time = None self.end_time = None self.time_grain = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py b/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py index 217b14eda175..aa25fa9523ca 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/metric_availability.py @@ -35,5 +35,6 @@ class MetricAvailability(Model): } def __init__(self): + super(MetricAvailability, self).__init__() self.retention = None self.time_grain = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py b/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py index 4a1b2f3cef99..3ff5e3f55fa4 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/metric_definition.py @@ -53,6 +53,7 @@ class MetricDefinition(Model): } def __init__(self): + super(MetricDefinition, self).__init__() self.name = None self.primary_aggregation_type = None self.resource_uri = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py b/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py index 818414cef086..46dca9e846cc 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/metric_name.py @@ -35,5 +35,6 @@ class MetricName(Model): } def __init__(self): + super(MetricName, self).__init__() self.value = None self.localized_value = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py b/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py index 258055cd869f..d7b6160727ea 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/metric_value.py @@ -51,6 +51,7 @@ class MetricValue(Model): } def __init__(self): + super(MetricValue, self).__init__() self.count = None self.average = None self.maximum = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/operation.py b/azure-mgmt-sql/azure/mgmt/sql/models/operation.py index 679d689da40b..63ba0d9f9805 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/operation.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/operation.py @@ -46,6 +46,7 @@ class Operation(Model): } def __init__(self): + super(Operation, self).__init__() self.name = None self.display = None self.origin = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py b/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py index 84b7cd87a0d9..a5b2f8412006 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/operation_display.py @@ -44,6 +44,7 @@ class OperationDisplay(Model): } def __init__(self): + super(OperationDisplay, self).__init__() self.provider = None self.resource = None self.operation = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py b/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py index 14b9509d94f0..7a0eda9f15bf 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/operation_impact.py @@ -44,6 +44,7 @@ class OperationImpact(Model): } def __init__(self): + super(OperationImpact, self).__init__() self.name = None self.unit = None self.change_value_absolute = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py b/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py index 65a59972e1ff..9c70bb3e4ad4 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/partner_info.py @@ -41,6 +41,7 @@ class PartnerInfo(Model): } def __init__(self, id): + super(PartnerInfo, self).__init__() self.id = id self.location = None self.replication_role = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py index 9be407d27a36..b2f93d73c324 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/recommended_elastic_pool_metric.py @@ -31,6 +31,7 @@ class RecommendedElasticPoolMetric(Model): } def __init__(self, date_time_property=None, dtu=None, size_gb=None): + super(RecommendedElasticPoolMetric, self).__init__() self.date_time_property = date_time_property self.dtu = dtu self.size_gb = size_gb diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/resource.py b/azure-mgmt-sql/azure/mgmt/sql/models/resource.py index 3883d2160984..a2ddd410be1b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/resource.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/resource.py @@ -39,6 +39,7 @@ class Resource(Model): } def __init__(self): + super(Resource, self).__init__() self.id = None self.name = None self.type = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py b/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py index 85548b45ea01..3a3f2222ba09 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/resource_identity.py @@ -40,6 +40,7 @@ class ResourceIdentity(Model): } def __init__(self, type=None): + super(ResourceIdentity, self).__init__() self.principal_id = None self.type = type self.tenant_id = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py b/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py new file mode 100644 index 000000000000..18df984819cd --- /dev/null +++ b/azure-mgmt-sql/azure/mgmt/sql/models/resource_move_definition.py @@ -0,0 +1,32 @@ +# 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 ResourceMoveDefinition(Model): + """Contains the information necessary to perform a resource move (rename). + + :param id: The target ID for the resource + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, id): + super(ResourceMoveDefinition, self).__init__() + self.id = id diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py index 3d5eb7543268..afc875395e0e 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_dns_alias_acquisition.py @@ -25,4 +25,5 @@ class ServerDnsAliasAcquisition(Model): } def __init__(self, old_server_dns_alias_id=None): + super(ServerDnsAliasAcquisition, self).__init__() self.old_server_dns_alias_id = old_server_dns_alias_id diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py index e8c5b1024bf5..dab00a870fba 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_update.py @@ -50,6 +50,7 @@ class ServerUpdate(Model): } def __init__(self, administrator_login=None, administrator_login_password=None, version=None, tags=None): + super(ServerUpdate, self).__init__() self.administrator_login = administrator_login self.administrator_login_password = administrator_login_password self.version = version diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py index 1621dd7c0bd3..97a70d1f148b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_usage.py @@ -56,6 +56,7 @@ class ServerUsage(Model): } def __init__(self): + super(ServerUsage, self).__init__() self.name = None self.resource_name = None self.display_name = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py b/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py index 3fdfa1d8c03b..2072fbab0c77 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/server_version_capability.py @@ -47,6 +47,7 @@ class ServerVersionCapability(Model): } def __init__(self): + super(ServerVersionCapability, self).__init__() self.name = None self.status = None self.supported_editions = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py b/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py index b5c2dfdfca48..dea16996d682 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/service_objective_capability.py @@ -60,6 +60,7 @@ class ServiceObjectiveCapability(Model): } def __init__(self): + super(ServiceObjectiveCapability, self).__init__() self.name = None self.status = None self.unit = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py b/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py index eb7c598d8cb3..8786479f0834 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/slo_usage_metric.py @@ -19,8 +19,15 @@ class SloUsageMetric(Model): sending a request. :ivar service_level_objective: The serviceLevelObjective for SLO usage - metric. Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', - 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool' + metric. Possible values include: 'System', 'System0', 'System1', + 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', + 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', + 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', + 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' :vartype service_level_objective: str or ~azure.mgmt.sql.models.ServiceObjectiveName :ivar service_level_objective_id: The serviceLevelObjectiveId for SLO @@ -44,6 +51,7 @@ class SloUsageMetric(Model): } def __init__(self): + super(SloUsageMetric, self).__init__() self.service_level_objective = None self.service_level_objective_id = None self.in_range_time_ratio = None 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 96bbc4b8fb73..9a91fbb9da44 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 @@ -106,6 +106,7 @@ class DatabaseEdition(Enum): basic = "Basic" standard = "Standard" premium = "Premium" + premium_rs = "PremiumRS" free = "Free" stretch = "Stretch" data_warehouse = "DataWarehouse" @@ -115,11 +116,26 @@ class DatabaseEdition(Enum): class ServiceObjectiveName(Enum): + system = "System" + system0 = "System0" + system1 = "System1" + system2 = "System2" + system3 = "System3" + system4 = "System4" + system2_l = "System2L" + system3_l = "System3L" + system4_l = "System4L" + free = "Free" basic = "Basic" s0 = "S0" s1 = "S1" s2 = "S2" s3 = "S3" + s4 = "S4" + s6 = "S6" + s7 = "S7" + s9 = "S9" + s12 = "S12" p1 = "P1" p2 = "P2" p3 = "P3" @@ -127,8 +143,43 @@ class ServiceObjectiveName(Enum): p6 = "P6" p11 = "P11" p15 = "P15" - system = "System" - system2 = "System2" + prs1 = "PRS1" + prs2 = "PRS2" + prs4 = "PRS4" + prs6 = "PRS6" + dw100 = "DW100" + dw200 = "DW200" + dw300 = "DW300" + dw400 = "DW400" + dw500 = "DW500" + dw600 = "DW600" + dw1000 = "DW1000" + dw1200 = "DW1200" + dw1000c = "DW1000c" + dw1500 = "DW1500" + dw1500c = "DW1500c" + dw2000 = "DW2000" + dw2000c = "DW2000c" + dw3000 = "DW3000" + dw2500c = "DW2500c" + dw3000c = "DW3000c" + dw6000 = "DW6000" + dw5000c = "DW5000c" + dw6000c = "DW6000c" + dw7500c = "DW7500c" + dw10000c = "DW10000c" + dw15000c = "DW15000c" + dw30000c = "DW30000c" + ds100 = "DS100" + ds200 = "DS200" + ds300 = "DS300" + ds400 = "DS400" + ds500 = "DS500" + ds600 = "DS600" + ds1000 = "DS1000" + ds1200 = "DS1200" + ds1500 = "DS1500" + ds2000 = "DS2000" elastic_pool = "ElasticPool" diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py index 58c32ab9780a..0a59841cee14 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_agent_key_properties.py @@ -31,4 +31,5 @@ class SyncAgentKeyProperties(Model): } def __init__(self): + super(SyncAgentKeyProperties, self).__init__() self.sync_agent_key = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py index 730b95317569..513dc81038ed 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_database_id_properties.py @@ -31,4 +31,5 @@ class SyncDatabaseIdProperties(Model): } def __init__(self): + super(SyncDatabaseIdProperties, self).__init__() self.id = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py index a7b20b63e70d..d3d414986b30 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_properties.py @@ -35,5 +35,6 @@ class SyncFullSchemaProperties(Model): } def __init__(self): + super(SyncFullSchemaProperties, self).__init__() self.tables = None self.last_update_time = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py index 09959c51990e..f8016e1f6cfb 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table.py @@ -47,6 +47,7 @@ class SyncFullSchemaTable(Model): } def __init__(self): + super(SyncFullSchemaTable, self).__init__() self.columns = None self.error_id = None self.has_error = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py index 1bbd1ba2bb10..bd0d5f167c7e 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_full_schema_table_column.py @@ -55,6 +55,7 @@ class SyncFullSchemaTableColumn(Model): } def __init__(self): + super(SyncFullSchemaTableColumn, self).__init__() self.data_size = None self.data_type = None self.error_id = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py index f0efc6a1fe36..170f5578c397 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_log_properties.py @@ -52,6 +52,7 @@ class SyncGroupLogProperties(Model): } def __init__(self): + super(SyncGroupLogProperties, self).__init__() self.timestamp = None self.type = None self.source = None diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py index d37de8120a33..1d1161572e6d 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema.py @@ -28,5 +28,6 @@ class SyncGroupSchema(Model): } def __init__(self, tables=None, master_sync_member_name=None): + super(SyncGroupSchema, self).__init__() self.tables = tables self.master_sync_member_name = master_sync_member_name diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py index dc04dc10d342..69f6f654394b 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table.py @@ -27,5 +27,6 @@ class SyncGroupSchemaTable(Model): } def __init__(self, columns=None, quoted_name=None): + super(SyncGroupSchemaTable, self).__init__() self.columns = columns self.quoted_name = quoted_name diff --git a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py index b70b6ce82322..56c962038bc1 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py +++ b/azure-mgmt-sql/azure/mgmt/sql/models/sync_group_schema_table_column.py @@ -30,6 +30,7 @@ class SyncGroupSchemaTableColumn(Model): } def __init__(self, quoted_name=None, data_size=None, data_type=None): + super(SyncGroupSchemaTableColumn, self).__init__() self.quoted_name = quoted_name self.data_size = data_size self.data_type = data_type diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py index be65c525c89d..7e9bd57ac0e7 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_policies_operations.py @@ -28,6 +28,8 @@ class BackupLongTermRetentionPoliciesOperations(object): :ivar backup_long_term_retention_policy_name: The name of the backup long term retention policy. Constant value: "Default". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -210,3 +212,78 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + + def list_by_database( + self, resource_group_name, server_name, database_name, custom_headers=None, raw=False, **operation_config): + """Returns a database backup long term retention policy. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param server_name: The name of the server. + :type server_name: str + :param 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: An iterator like instance of BackupLongTermRetentionPolicy + :rtype: + ~azure.mgmt.sql.models.BackupLongTermRetentionPolicyPaged[~azure.mgmt.sql.models.BackupLongTermRetentionPolicy] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies' + 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') + } + 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') + + else: + url = next_link + query_parameters = {} + + # 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, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.BackupLongTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BackupLongTermRetentionPolicyPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_vaults_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_vaults_operations.py index 2a6b6f1663f3..f8d54e622b8f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_vaults_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/backup_long_term_retention_vaults_operations.py @@ -28,6 +28,8 @@ class BackupLongTermRetentionVaultsOperations(object): :ivar backup_long_term_retention_vault_name: The name of the Azure SQL Server backup LongTermRetention vault. Constant value: "RegisteredVault". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -199,3 +201,75 @@ def get_long_running_output(response): return AzureOperationPoller( long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) + + def list_by_server( + self, resource_group_name, server_name, custom_headers=None, raw=False, **operation_config): + """Gets server backup long term retention vaults in a 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 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: An iterator like instance of BackupLongTermRetentionVault + :rtype: + ~azure.mgmt.sql.models.BackupLongTermRetentionVaultPaged[~azure.mgmt.sql.models.BackupLongTermRetentionVault] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults' + 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') + } + 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') + + else: + url = next_link + query_parameters = {} + + # 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, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.BackupLongTermRetentionVaultPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BackupLongTermRetentionVaultPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py index 82ffe0e3d58e..d9eaf1875d80 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/capabilities_operations.py @@ -26,6 +26,8 @@ class CapabilitiesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py index 6cd8bb49a019..ecc0d06a1860 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_policies_operations.py @@ -27,6 +27,8 @@ class DataMaskingPoliciesOperations(object): :ivar data_masking_policy_name: The name of the database for which the data masking rule applies. Constant value: "Default". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py index 78ed09caeec8..2d1b9549a56c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/data_masking_rules_operations.py @@ -27,6 +27,8 @@ class DataMaskingRulesOperations(object): :ivar data_masking_policy_name: The name of the database for which the data masking rule applies. Constant value: "Default". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py index 9ea34beb25aa..4c88d85cfb83 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_blob_auditing_policies_operations.py @@ -27,6 +27,8 @@ class DatabaseBlobAuditingPoliciesOperations(object): :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 diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py index a122ea3bdfdd..1a86839a893d 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_operations.py @@ -26,6 +26,8 @@ class DatabaseOperations(object): :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 diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py index 98279ff19edd..a66f523450a1 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_threat_detection_policies_operations.py @@ -27,6 +27,8 @@ class DatabaseThreatDetectionPoliciesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py index f25ad642d31a..5667c93847af 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/database_usages_operations.py @@ -26,6 +26,8 @@ class DatabaseUsagesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py index 836cdd684e94..d6401857ce61 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/databases_operations.py @@ -24,16 +24,16 @@ class DatabasesOperations(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 extension_name: The name of the operation to perform. Constant value: "import". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2014-04-01" self.extension_name = "import" self.config = config @@ -61,6 +61,8 @@ def import_method( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import' path_format_arguments = { @@ -72,7 +74,7 @@ def import_method( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -157,6 +159,8 @@ def create_import_operation( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}' path_format_arguments = { @@ -170,7 +174,7 @@ def create_import_operation( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -253,6 +257,8 @@ def export( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export' path_format_arguments = { @@ -265,7 +271,7 @@ def export( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -349,6 +355,8 @@ def list_metrics( ~azure.mgmt.sql.models.MetricPaged[~azure.mgmt.sql.models.Metric] :raises: :class:`CloudError` """ + api_version = "2014-04-01" + def internal_paging(next_link=None, raw=False): if not next_link: @@ -364,7 +372,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') else: @@ -425,6 +433,8 @@ def list_metric_definitions( ~azure.mgmt.sql.models.MetricDefinitionPaged[~azure.mgmt.sql.models.MetricDefinition] :raises: :class:`CloudError` """ + api_version = "2014-04-01" + def internal_paging(next_link=None, raw=False): if not next_link: @@ -440,7 +450,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') else: url = next_link @@ -499,6 +509,8 @@ def pause( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/pause' path_format_arguments = { @@ -511,7 +523,7 @@ def pause( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -580,6 +592,8 @@ def resume( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/resume' path_format_arguments = { @@ -592,7 +606,7 @@ def resume( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -620,7 +634,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [202, 200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -666,6 +680,8 @@ def create_or_update( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}' path_format_arguments = { @@ -678,7 +694,7 @@ def create_or_update( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -763,6 +779,8 @@ def update( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}' path_format_arguments = { @@ -775,7 +793,7 @@ def update( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -855,6 +873,8 @@ def delete( :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}' path_format_arguments = { @@ -867,7 +887,7 @@ def delete( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -918,6 +938,8 @@ def get( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}' path_format_arguments = { @@ -930,7 +952,7 @@ def get( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if expand is not None: query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') @@ -991,6 +1013,8 @@ def list_by_server( ~azure.mgmt.sql.models.DatabasePaged[~azure.mgmt.sql.models.Database] :raises: :class:`CloudError` """ + api_version = "2014-04-01" + def internal_paging(next_link=None, raw=False): if not next_link: @@ -1005,7 +1029,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if expand is not None: query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') if filter is not None: @@ -1072,6 +1096,8 @@ def get_by_elastic_pool( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases/{databaseName}' path_format_arguments = { @@ -1085,7 +1111,7 @@ def get_by_elastic_pool( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -1140,6 +1166,8 @@ def list_by_elastic_pool( ~azure.mgmt.sql.models.DatabasePaged[~azure.mgmt.sql.models.Database] :raises: :class:`CloudError` """ + api_version = "2014-04-01" + def internal_paging(next_link=None, raw=False): if not next_link: @@ -1155,7 +1183,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') else: url = next_link @@ -1218,6 +1246,8 @@ def get_by_recommended_elastic_pool( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + api_version = "2014-04-01" + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}' path_format_arguments = { @@ -1231,7 +1261,7 @@ def get_by_recommended_elastic_pool( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} @@ -1286,6 +1316,8 @@ def list_by_recommended_elastic_pool( ~azure.mgmt.sql.models.DatabasePaged[~azure.mgmt.sql.models.Database] :raises: :class:`CloudError` """ + api_version = "2014-04-01" + def internal_paging(next_link=None, raw=False): if not next_link: @@ -1301,7 +1333,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') else: url = next_link @@ -1338,3 +1370,71 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + + def rename( + self, resource_group_name, server_name, database_name, id, custom_headers=None, raw=False, **operation_config): + """Renames a 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 to rename. + :type database_name: str + :param id: The target ID for the resource + :type id: 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + parameters = models.ResourceMoveDefinition(id=id) + + api_version = "2017-03-01-preview" + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move' + 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("api_version", 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, 'ResourceMoveDefinition') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py index 8aa0b55b21df..ffaa12964b74 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_activities_operations.py @@ -26,6 +26,8 @@ class ElasticPoolActivitiesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py index 8959c0ecc16c..a42d8425b631 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pool_database_activities_operations.py @@ -26,6 +26,8 @@ class ElasticPoolDatabaseActivitiesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py index e1f2f6f7735d..caed9d6e6da6 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/elastic_pools_operations.py @@ -27,6 +27,8 @@ class ElasticPoolsOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py index cda1e37f6ede..5b1c4a3ab083 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/encryption_protectors_operations.py @@ -28,6 +28,8 @@ class EncryptionProtectorsOperations(object): :ivar encryption_protector_name: The name of the encryption protector to be retrieved. Constant value: "current". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py index 30ab305cb4f5..966f83bb68b5 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/failover_groups_operations.py @@ -27,6 +27,8 @@ class FailoverGroupsOperations(object): :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 @@ -172,7 +174,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [200, 202, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py index 571856f2d8c3..244ce10f1e76 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/firewall_rules_operations.py @@ -26,6 +26,8 @@ class FirewallRulesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py index 65d773295b8f..6ae1a0f10865 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/geo_backup_policies_operations.py @@ -27,6 +27,8 @@ class GeoBackupPoliciesOperations(object): :ivar geo_backup_policy_name: The name of the geo backup policy. Constant value: "Default". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -97,17 +99,17 @@ def create_or_update( response = self._client.send( request, header_parameters, body_content, **operation_config) - if response.status_code not in [201, 200]: + if response.status_code not in [200, 201]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('GeoBackupPolicy', response) if response.status_code == 200: deserialized = self._deserialize('GeoBackupPolicy', response) + if response.status_code == 201: + deserialized = self._deserialize('GeoBackupPolicy', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py index 9563306a7ab1..33033408bf61 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/operations.py @@ -26,6 +26,8 @@ class Operations(object): :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 diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py index 1f9be6d1462b..a87c927f50a8 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/recommended_elastic_pools_operations.py @@ -26,6 +26,8 @@ class RecommendedElasticPoolsOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py index 779d085b31e1..efbe6d1a0235 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/recoverable_databases_operations.py @@ -26,6 +26,8 @@ class RecoverableDatabasesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py index 2a654636c651..311ba77bcd2e 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/replication_links_operations.py @@ -27,6 +27,8 @@ class ReplicationLinksOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -233,7 +235,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [204, 202]: + if response.status_code not in [202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -319,7 +321,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [204, 202]: + if response.status_code not in [202, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py index cfd3c905eaf8..5a09b1185033 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/restorable_dropped_databases_operations.py @@ -26,6 +26,8 @@ class RestorableDroppedDatabasesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client 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 48a326ec5ff1..78027a869bc6 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 @@ -26,6 +26,8 @@ class RestorePointsOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py index ad65e01137cc..c925b627a74d 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/server_azure_ad_administrators_operations.py @@ -28,6 +28,8 @@ class ServerAzureADAdministratorsOperations(object): :ivar administrator_name: Name of the server administrator resource. Constant value: "activeDirectory". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -197,19 +199,19 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [202, 204, 200]: + if response.status_code not in [200, 202, 204]: 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('ServerAzureADAdministrator', response) if response.status_code == 202: deserialized = self._deserialize('ServerAzureADAdministrator', response) if response.status_code == 204: deserialized = self._deserialize('ServerAzureADAdministrator', response) - if response.status_code == 200: - deserialized = self._deserialize('ServerAzureADAdministrator', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py index 9df1627a86aa..2a3fd1c79213 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/server_communication_links_operations.py @@ -27,6 +27,8 @@ class ServerCommunicationLinksOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py index 05535aa11950..2e417e4e540c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/server_connection_policies_operations.py @@ -27,6 +27,8 @@ class ServerConnectionPoliciesOperations(object): :ivar connection_policy_name: The name of the connection policy. Constant value: "default". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py index a6fbda404548..770d4104dcaf 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/server_dns_aliases_operations.py @@ -27,6 +27,8 @@ class ServerDnsAliasesOperations(object): :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 @@ -166,7 +168,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [200, 202, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py index e6835fd30554..817d8b3b572c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/server_keys_operations.py @@ -27,6 +27,8 @@ class ServerKeysOperations(object): :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 @@ -247,7 +249,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [200, 202, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py index 8b7ba4b93070..eab99186047c 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/server_usages_operations.py @@ -26,6 +26,8 @@ class ServerUsagesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py index 4bc334b2c4f7..8f8a934ab2e1 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/servers_operations.py @@ -26,6 +26,8 @@ class ServersOperations(object): :param deserializer: An objec model deserializer. """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -369,7 +371,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [200, 202, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py index fae46d7252c1..9a14c85e3f28 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/service_objectives_operations.py @@ -26,6 +26,8 @@ class ServiceObjectivesOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py index 5e78149d8a88..b795d635f445 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/service_tier_advisors_operations.py @@ -26,6 +26,8 @@ class ServiceTierAdvisorsOperations(object): :ivar api_version: The API version to use for the request. Constant value: "2014-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py index 70ae5e0d120b..7ee07416002f 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/subscription_usages_operations.py @@ -26,6 +26,8 @@ class SubscriptionUsagesOperations(object): :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 diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py index 964ee0497051..1590d6907f22 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/sync_agents_operations.py @@ -27,6 +27,8 @@ class SyncAgentsOperations(object): :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 @@ -175,7 +177,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [200, 202, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py index a71eda4827a1..c216cc3cc394 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/sync_groups_operations.py @@ -27,6 +27,8 @@ class SyncGroupsOperations(object): :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 @@ -627,7 +629,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [200, 202, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py index 891452c3fbbe..240fea187b00 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/sync_members_operations.py @@ -27,6 +27,8 @@ class SyncMembersOperations(object): :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 @@ -186,7 +188,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [200, 202, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py index 81435c85142e..17aff326251e 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryption_activities_operations.py @@ -27,6 +27,8 @@ class TransparentDataEncryptionActivitiesOperations(object): :ivar transparent_data_encryption_name: The name of the transparent data encryption configuration. Constant value: "current". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py index a04003657e22..46d591ab0fe0 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/transparent_data_encryptions_operations.py @@ -27,6 +27,8 @@ class TransparentDataEncryptionsOperations(object): :ivar transparent_data_encryption_name: The name of the transparent data encryption configuration. Constant value: "current". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client diff --git a/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py b/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py index eb82032b2a66..82a4785fcbe9 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py +++ b/azure-mgmt-sql/azure/mgmt/sql/operations/virtual_network_rules_operations.py @@ -27,6 +27,8 @@ class VirtualNetworkRulesOperations(object): :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 @@ -178,7 +180,7 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [200, 202, 201]: + if response.status_code not in [200, 201, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp 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 0257907f7877..a54c814a166d 100644 --- a/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py +++ b/azure-mgmt-sql/azure/mgmt/sql/sql_management_client.py @@ -81,7 +81,7 @@ def __init__( super(SqlManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('sqlmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-sql/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials diff --git a/azure-mgmt-sql/azure/mgmt/sql/version.py b/azure-mgmt-sql/azure/mgmt/sql/version.py index 05e4c45c1c94..c806fd2eb6c3 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.4" +VERSION = "0.8.5" diff --git a/azure-mgmt-sql/build.json b/azure-mgmt-sql/build.json index d5356f60b700..d2ddfa00c96b 100644 --- a/azure-mgmt-sql/build.json +++ b/azure-mgmt-sql/build.json @@ -4,63 +4,167 @@ "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest-core", - "version": "2.0.4168", + "version": "2.0.4216", "engines": { "node": ">=7.10.0" }, "dependencies": {}, "optionalDependencies": {}, "devDependencies": { - "@microsoft.azure/async-io": "~1.0.22", - "@microsoft.azure/extension": "~1.2.12", "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.28", - "@types/pify": "0.0.28", + "@types/node": "^8.0.53", "@types/source-map": "^0.5.0", "@types/yargs": "^8.0.2", - "commonmark": "^0.27.0", - "file-url": "^2.0.2", - "get-uri": "^2.0.0", - "jsonpath": "^0.2.11", - "linq-es2015": "^2.4.25", - "mocha": "3.4.2", - "mocha-typescript": "1.1.5", - "pify": "^3.0.0", - "safe-eval": "^0.3.0", - "shx": "^0.2.2", - "source-map": "^0.5.6", - "source-map-support": "^0.4.15", - "strip-bom": "^3.0.0", - "typescript": "2.5.3", - "untildify": "^3.0.2", - "urijs": "^1.18.10", - "vscode-jsonrpc": "^3.3.1", - "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", - "yargs": "^8.0.2" + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" }, "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_shasum": "f6b97454df552dfa54bd0df23f8309665be5fd4c", "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest-core@2.0.4168", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4216", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", "_requested": { "type": "directory", "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" }, - "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" }, "extensionManager": { "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.8491.947977755912.personal-lock", + "options": { + "port": 47761, + "host": "2130719825", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4227", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "@types/z-schema": "^3.16.31", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "_shasum": "d29217f10a534571f15f28ad2556c308726c5e0e", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4227", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4227/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.8491.947977755912.personal-lock", + "options": { + "port": 47761, + "host": "2130719825", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" + }, + "file": "/tmp/_root_.autorest.lock" + }, "dotnetPath": "/root/.dotnet" }, "installationPath": "/root/.autorest" @@ -112,6 +216,37 @@ }, "extensionManager": { "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.8491.947977755912.personal-lock", + "options": { + "port": 47761, + "host": "2130719825", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" + }, + "file": "/tmp/_root_.autorest.lock" + }, "dotnetPath": "/root/.dotnet" }, "installationPath": "/root/.autorest" @@ -120,12 +255,14 @@ "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest.modeler", - "version": "2.1.22", + "version": "2.3.38", "dependencies": { "dotnet-2.0.0": "^1.4.4" }, "optionalDependencies": {}, "devDependencies": { + "@microsoft.azure/autorest.testserver": "2.3.1", + "autorest": "^2.0.4201", "coffee-script": "^1.11.1", "dotnet-sdk-2.0.0": "^1.4.4", "gulp": "^3.9.1", @@ -144,25 +281,56 @@ "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", "_shrinkwrap": null, "bin": null, - "_id": "@microsoft.azure/autorest.modeler@2.1.22", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_id": "@microsoft.azure/autorest.modeler@2.3.38", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", "_requested": { "type": "directory", "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" }, "extensionManager": { "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.8491.947977755912.personal-lock", + "options": { + "port": 47761, + "host": "2130719825", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" + }, + "file": "/tmp/_root_.autorest.lock" + }, "dotnetPath": "/root/.dotnet" }, "installationPath": "/root/.autorest" @@ -171,14 +339,14 @@ "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest.python", - "version": "2.0.19", + "version": "2.1.28", "dependencies": { "dotnet-2.0.0": "^1.4.4" }, "optionalDependencies": {}, "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", + "@microsoft.azure/autorest.testserver": "^2.3.13", + "autorest": "^2.0.4203", "coffee-script": "^1.11.1", "dotnet-sdk-2.0.0": "^1.4.4", "gulp": "^3.9.1", @@ -197,25 +365,56 @@ "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "_shasum": "864acf40daff5c5e073f0e7da55597c3a7994469", "_shrinkwrap": null, "bin": null, - "_id": "@microsoft.azure/autorest.python@2.0.19", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_id": "@microsoft.azure/autorest.python@2.1.28", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", "_requested": { "type": "directory", "where": "/git-restapi", - "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" }, - "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.28/node_modules/@microsoft.azure/autorest.python" }, "extensionManager": { "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.8491.947977755912.personal-lock", + "options": { + "port": 47761, + "host": "2130719825", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.8491.947977755912.personal-lock:47761" + }, + "file": "/tmp/_root_.autorest.lock" + }, "dotnetPath": "/root/.dotnet" }, "installationPath": "/root/.autorest" diff --git a/azure-mgmt-sql/setup.py b/azure-mgmt-sql/setup.py index fe6061ad46c1..b09d8a115f78 100644 --- a/azure-mgmt-sql/setup.py +++ b/azure-mgmt-sql/setup.py @@ -69,7 +69,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', @@ -78,7 +77,7 @@ zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure~=0.4.11', + 'msrestazure>=0.4.20,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass