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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions azure-mgmt-sql/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
++++++++++++++++++

Expand Down
6 changes: 3 additions & 3 deletions azure-mgmt-sql/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down Expand Up @@ -37,8 +37,8 @@ Usage
=====

For code examples, see `SQL Management
<https://azure-sdk-for-python.readthedocs.org/en/latest/sample_azure-mgmt-sql.html>`__
on readthedocs.org.
<https://docs.microsoft.com/python/api/overview/azure/sql>`__
on docs.microsoft.com.


Provide Feedback
Expand Down
6 changes: 6 additions & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -268,8 +271,11 @@
'SubscriptionUsage',
'VirtualNetworkRule',
'DatabaseOperation',
'ResourceMoveDefinition',
'ServerDnsAlias',
'ServerDnsAliasAcquisition',
'BackupLongTermRetentionPolicyPaged',
'BackupLongTermRetentionVaultPaged',
'RestorePointPaged',
'RecoverableDatabasePaged',
'RestorableDroppedDatabasePaged',
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <azure.mgmt.sql.models.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)
Original file line number Diff line number Diff line change
@@ -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 <azure.mgmt.sql.models.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)
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ class CheckNameAvailabilityRequest(Model):
type = "Microsoft.Sql/servers"

def __init__(self, name):
super(CheckNameAvailabilityRequest, self).__init__()
self.name = name
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class CheckNameAvailabilityResponse(Model):
}

def __init__(self):
super(CheckNameAvailabilityResponse, self).__init__()
self.available = None
self.message = None
self.name = None
Expand Down
38 changes: 29 additions & 9 deletions azure-mgmt-sql/azure/mgmt/sql/models/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -124,22 +126,40 @@ 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 <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
objective that is in the process of being applied to the database. Once
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 <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.
Expand Down
38 changes: 29 additions & 9 deletions azure-mgmt-sql/azure/mgmt/sql/models/database_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -119,22 +121,40 @@ 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 <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
objective that is in the process of being applied to the database. Once
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 <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.
Expand Down
1 change: 1 addition & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/edition_capability.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ class ElasticPoolPerDatabaseMinDtuCapability(Model):
}

def __init__(self):
super(ElasticPoolPerDatabaseMinDtuCapability, self).__init__()
self.limit = None
self.status = None
1 change: 1 addition & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/export_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ class FailoverGroupReadOnlyEndpoint(Model):
}

def __init__(self, failover_policy=None):
super(FailoverGroupReadOnlyEndpoint, self).__init__()
self.failover_policy = failover_policy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 11 additions & 5 deletions azure-mgmt-sql/azure/mgmt/sql/models/import_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class MaxSizeCapability(Model):
}

def __init__(self):
super(MaxSizeCapability, self).__init__()
self.limit = None
self.unit = None
self.status = None
1 change: 1 addition & 0 deletions azure-mgmt-sql/azure/mgmt/sql/models/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ class MetricAvailability(Model):
}

def __init__(self):
super(MetricAvailability, self).__init__()
self.retention = None
self.time_grain = None
Loading