Skip to content

Commit 1125381

Browse files
authored
Merge pull request #1718 from AutorestCI/RestAPI-PR2153
[SQL] Added missing SQL service objectives
2 parents ff2deac + 4912b9c commit 1125381

File tree

95 files changed

+896
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+896
-128
lines changed

azure-mgmt-sql/HISTORY.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
Release History
44
===============
55

6+
0.8.5 (2018-01-18)
7+
++++++++++++++++++
8+
9+
**Features**
10+
11+
- Added support for renaming databases
12+
- Added missing database editions and service objectives
13+
- Added ability to list long term retention vaults & policies
14+
615
0.8.4 (2017-11-14)
716
++++++++++++++++++
817

azure-mgmt-sql/README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the Microsoft Azure SQL Management Client Library.
66
Azure Resource Manager (ARM) is the next generation of management APIs that
77
replace the old Azure Service Management (ASM).
88

9-
This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6.
9+
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
1010

1111
For the older Azure Service Management (ASM) libraries, see
1212
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
@@ -37,8 +37,8 @@ Usage
3737
=====
3838

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

4343

4444
Provide Feedback

azure-mgmt-sql/azure/mgmt/sql/models/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,11 @@
9292
from .subscription_usage import SubscriptionUsage
9393
from .virtual_network_rule import VirtualNetworkRule
9494
from .database_operation import DatabaseOperation
95+
from .resource_move_definition import ResourceMoveDefinition
9596
from .server_dns_alias import ServerDnsAlias
9697
from .server_dns_alias_acquisition import ServerDnsAliasAcquisition
98+
from .backup_long_term_retention_policy_paged import BackupLongTermRetentionPolicyPaged
99+
from .backup_long_term_retention_vault_paged import BackupLongTermRetentionVaultPaged
97100
from .restore_point_paged import RestorePointPaged
98101
from .recoverable_database_paged import RecoverableDatabasePaged
99102
from .restorable_dropped_database_paged import RestorableDroppedDatabasePaged
@@ -268,8 +271,11 @@
268271
'SubscriptionUsage',
269272
'VirtualNetworkRule',
270273
'DatabaseOperation',
274+
'ResourceMoveDefinition',
271275
'ServerDnsAlias',
272276
'ServerDnsAliasAcquisition',
277+
'BackupLongTermRetentionPolicyPaged',
278+
'BackupLongTermRetentionVaultPaged',
273279
'RestorePointPaged',
274280
'RecoverableDatabasePaged',
275281
'RestorableDroppedDatabasePaged',
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.paging import Paged
13+
14+
15+
class BackupLongTermRetentionPolicyPaged(Paged):
16+
"""
17+
A paging container for iterating over a list of :class:`BackupLongTermRetentionPolicy <azure.mgmt.sql.models.BackupLongTermRetentionPolicy>` object
18+
"""
19+
20+
_attribute_map = {
21+
'next_link': {'key': 'nextLink', 'type': 'str'},
22+
'current_page': {'key': 'value', 'type': '[BackupLongTermRetentionPolicy]'}
23+
}
24+
25+
def __init__(self, *args, **kwargs):
26+
27+
super(BackupLongTermRetentionPolicyPaged, self).__init__(*args, **kwargs)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.paging import Paged
13+
14+
15+
class BackupLongTermRetentionVaultPaged(Paged):
16+
"""
17+
A paging container for iterating over a list of :class:`BackupLongTermRetentionVault <azure.mgmt.sql.models.BackupLongTermRetentionVault>` object
18+
"""
19+
20+
_attribute_map = {
21+
'next_link': {'key': 'nextLink', 'type': 'str'},
22+
'current_page': {'key': 'value', 'type': '[BackupLongTermRetentionVault]'}
23+
}
24+
25+
def __init__(self, *args, **kwargs):
26+
27+
super(BackupLongTermRetentionVaultPaged, self).__init__(*args, **kwargs)

azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_request.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ class CheckNameAvailabilityRequest(Model):
3838
type = "Microsoft.Sql/servers"
3939

4040
def __init__(self, name):
41+
super(CheckNameAvailabilityRequest, self).__init__()
4142
self.name = name

azure-mgmt-sql/azure/mgmt/sql/models/check_name_availability_response.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class CheckNameAvailabilityResponse(Model):
4747
}
4848

4949
def __init__(self):
50+
super(CheckNameAvailabilityResponse, self).__init__()
5051
self.available = None
5152
self.message = None
5253
self.name = None

azure-mgmt-sql/azure/mgmt/sql/models/database.py

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ class Database(TrackedResource):
105105
NonReadableSecondary or OnlineSecondary, this value is ignored. To see
106106
possible values, query the capabilities API
107107
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
108-
referred to by operationId: "Capabilities_ListByLocation.". Possible
109-
values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'Free',
110-
'Stretch', 'DataWarehouse', 'System', 'System2'
108+
referred to by operationId: "Capabilities_ListByLocation." or use the
109+
Azure CLI command `az sql db list-editions -l westus --query [].name`.
110+
Possible values include: 'Web', 'Business', 'Basic', 'Standard',
111+
'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System',
112+
'System2'
111113
:type edition: str or ~azure.mgmt.sql.models.DatabaseEdition
112114
:param max_size_bytes: The max size of the database expressed in bytes. If
113115
createMode is not Default, this value is ignored. To see possible values,
@@ -124,22 +126,40 @@ class Database(TrackedResource):
124126
requestedServiceObjectiveName. To see possible values, query the
125127
capabilities API
126128
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
127-
referred to by operationId: "Capabilities_ListByLocation."
129+
referred to by operationId: "Capabilities_ListByLocation." or use the
130+
Azure CLI command `az sql db list-editions --location <location> --query
131+
[].supportedServiceLevelObjectives[].name` .
128132
:type requested_service_objective_id: str
129133
:param requested_service_objective_name: The name of the configured
130134
service level objective of the database. This is the service level
131135
objective that is in the process of being applied to the database. Once
132136
successfully updated, it will match the value of serviceLevelObjective
133137
property. To see possible values, query the capabilities API
134138
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
135-
referred to by operationId: "Capabilities_ListByLocation.". Possible
136-
values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', 'P4',
137-
'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool'
139+
referred to by operationId: "Capabilities_ListByLocation." or use the
140+
Azure CLI command `az sql db list-editions --location <location> --query
141+
[].supportedServiceLevelObjectives[].name`. Possible values include:
142+
'System', 'System0', 'System1', 'System2', 'System3', 'System4',
143+
'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2',
144+
'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11',
145+
'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400',
146+
'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c',
147+
'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c',
148+
'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100',
149+
'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500',
150+
'DS2000', 'ElasticPool'
138151
:type requested_service_objective_name: str or
139152
~azure.mgmt.sql.models.ServiceObjectiveName
140153
:ivar service_level_objective: The current service level objective of the
141-
database. Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1',
142-
'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool'
154+
database. Possible values include: 'System', 'System0', 'System1',
155+
'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L',
156+
'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12',
157+
'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4',
158+
'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000',
159+
'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000',
160+
'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c',
161+
'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400',
162+
'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'
143163
:vartype service_level_objective: str or
144164
~azure.mgmt.sql.models.ServiceObjectiveName
145165
:ivar status: The status of the database.

azure-mgmt-sql/azure/mgmt/sql/models/database_update.py

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ class DatabaseUpdate(Resource):
100100
NonReadableSecondary or OnlineSecondary, this value is ignored. To see
101101
possible values, query the capabilities API
102102
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
103-
referred to by operationId: "Capabilities_ListByLocation.". Possible
104-
values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'Free',
105-
'Stretch', 'DataWarehouse', 'System', 'System2'
103+
referred to by operationId: "Capabilities_ListByLocation." or use the
104+
Azure CLI command `az sql db list-editions -l westus --query [].name`.
105+
Possible values include: 'Web', 'Business', 'Basic', 'Standard',
106+
'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System',
107+
'System2'
106108
:type edition: str or ~azure.mgmt.sql.models.DatabaseEdition
107109
:param max_size_bytes: The max size of the database expressed in bytes. If
108110
createMode is not Default, this value is ignored. To see possible values,
@@ -119,22 +121,40 @@ class DatabaseUpdate(Resource):
119121
requestedServiceObjectiveName. To see possible values, query the
120122
capabilities API
121123
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
122-
referred to by operationId: "Capabilities_ListByLocation."
124+
referred to by operationId: "Capabilities_ListByLocation." or use the
125+
Azure CLI command `az sql db list-editions --location <location> --query
126+
[].supportedServiceLevelObjectives[].name` .
123127
:type requested_service_objective_id: str
124128
:param requested_service_objective_name: The name of the configured
125129
service level objective of the database. This is the service level
126130
objective that is in the process of being applied to the database. Once
127131
successfully updated, it will match the value of serviceLevelObjective
128132
property. To see possible values, query the capabilities API
129133
(/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities)
130-
referred to by operationId: "Capabilities_ListByLocation.". Possible
131-
values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', 'P4',
132-
'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool'
134+
referred to by operationId: "Capabilities_ListByLocation." or use the
135+
Azure CLI command `az sql db list-editions --location <location> --query
136+
[].supportedServiceLevelObjectives[].name`. Possible values include:
137+
'System', 'System0', 'System1', 'System2', 'System3', 'System4',
138+
'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2',
139+
'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11',
140+
'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400',
141+
'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c',
142+
'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c',
143+
'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100',
144+
'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500',
145+
'DS2000', 'ElasticPool'
133146
:type requested_service_objective_name: str or
134147
~azure.mgmt.sql.models.ServiceObjectiveName
135148
:ivar service_level_objective: The current service level objective of the
136-
database. Possible values include: 'Basic', 'S0', 'S1', 'S2', 'S3', 'P1',
137-
'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System', 'System2', 'ElasticPool'
149+
database. Possible values include: 'System', 'System0', 'System1',
150+
'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L',
151+
'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12',
152+
'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4',
153+
'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000',
154+
'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000',
155+
'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c',
156+
'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400',
157+
'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'
138158
:vartype service_level_objective: str or
139159
~azure.mgmt.sql.models.ServiceObjectiveName
140160
:ivar status: The status of the database.

azure-mgmt-sql/azure/mgmt/sql/models/database_usage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class DatabaseUsage(Model):
5656
}
5757

5858
def __init__(self):
59+
super(DatabaseUsage, self).__init__()
5960
self.name = None
6061
self.resource_name = None
6162
self.display_name = None

0 commit comments

Comments
 (0)