Skip to content

Commit d457647

Browse files
authored
[AutoPR sql/resource-manager] SQL database, elastic pool, and capabilities 2017-10-01-preview (#2272)
* Generated from 60866124ae22fe440362fd0cd1faf52c55431b2b Fixed model validation errors by making minor example edits * Generated from 2f4cf0e92bc3e78cc62b4fac91e5b7ac4c6408cb Renamed Databases_Rename to Databases_Move * Generated from 5b2ebc1c2bacf73e322054a61806ff12f2fe4eee Fixed CapabilitiesList example param name
1 parent 86a9107 commit d457647

File tree

231 files changed

+11009
-4154
lines changed

Some content is hidden

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

231 files changed

+11009
-4154
lines changed

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

Lines changed: 301 additions & 167 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ class AutomaticTuningOptions(Model):
4949
'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'},
5050
}
5151

52-
def __init__(self, desired_state=None):
53-
super(AutomaticTuningOptions, self).__init__()
54-
self.desired_state = desired_state
52+
def __init__(self, **kwargs):
53+
super(AutomaticTuningOptions, self).__init__(**kwargs)
54+
self.desired_state = kwargs.get('desired_state', None)
5555
self.actual_state = None
5656
self.reason_code = None
5757
self.reason_desc = None
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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.serialization import Model
13+
14+
15+
class AutomaticTuningOptions(Model):
16+
"""Automatic tuning properties for individual advisors.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:param desired_state: Automatic tuning option desired state. Possible
22+
values include: 'Off', 'On', 'Default'
23+
:type desired_state: str or
24+
~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired
25+
:ivar actual_state: Automatic tuning option actual state. Possible values
26+
include: 'Off', 'On'
27+
:vartype actual_state: str or
28+
~azure.mgmt.sql.models.AutomaticTuningOptionModeActual
29+
:ivar reason_code: Reason code if desired and actual state are different.
30+
:vartype reason_code: int
31+
:ivar reason_desc: Reason description if desired and actual state are
32+
different. Possible values include: 'Default', 'Disabled',
33+
'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff',
34+
'QueryStoreReadOnly', 'NotSupported'
35+
:vartype reason_desc: str or
36+
~azure.mgmt.sql.models.AutomaticTuningDisabledReason
37+
"""
38+
39+
_validation = {
40+
'actual_state': {'readonly': True},
41+
'reason_code': {'readonly': True},
42+
'reason_desc': {'readonly': True},
43+
}
44+
45+
_attribute_map = {
46+
'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'},
47+
'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'},
48+
'reason_code': {'key': 'reasonCode', 'type': 'int'},
49+
'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningDisabledReason'},
50+
}
51+
52+
def __init__(self, *, desired_state=None, **kwargs) -> None:
53+
super(AutomaticTuningOptions, self).__init__(**kwargs)
54+
self.desired_state = desired_state
55+
self.actual_state = None
56+
self.reason_code = None
57+
self.reason_desc = None

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ class AutomaticTuningServerOptions(Model):
4848
'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'},
4949
}
5050

51-
def __init__(self, desired_state=None):
52-
super(AutomaticTuningServerOptions, self).__init__()
53-
self.desired_state = desired_state
51+
def __init__(self, **kwargs):
52+
super(AutomaticTuningServerOptions, self).__init__(**kwargs)
53+
self.desired_state = kwargs.get('desired_state', None)
5454
self.actual_state = None
5555
self.reason_code = None
5656
self.reason_desc = None
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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.serialization import Model
13+
14+
15+
class AutomaticTuningServerOptions(Model):
16+
"""Automatic tuning properties for individual advisors.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:param desired_state: Automatic tuning option desired state. Possible
22+
values include: 'Off', 'On', 'Default'
23+
:type desired_state: str or
24+
~azure.mgmt.sql.models.AutomaticTuningOptionModeDesired
25+
:ivar actual_state: Automatic tuning option actual state. Possible values
26+
include: 'Off', 'On'
27+
:vartype actual_state: str or
28+
~azure.mgmt.sql.models.AutomaticTuningOptionModeActual
29+
:ivar reason_code: Reason code if desired and actual state are different.
30+
:vartype reason_code: int
31+
:ivar reason_desc: Reason description if desired and actual state are
32+
different. Possible values include: 'Default', 'Disabled',
33+
'AutoConfigured'
34+
:vartype reason_desc: str or
35+
~azure.mgmt.sql.models.AutomaticTuningServerReason
36+
"""
37+
38+
_validation = {
39+
'actual_state': {'readonly': True},
40+
'reason_code': {'readonly': True},
41+
'reason_desc': {'readonly': True},
42+
}
43+
44+
_attribute_map = {
45+
'desired_state': {'key': 'desiredState', 'type': 'AutomaticTuningOptionModeDesired'},
46+
'actual_state': {'key': 'actualState', 'type': 'AutomaticTuningOptionModeActual'},
47+
'reason_code': {'key': 'reasonCode', 'type': 'int'},
48+
'reason_desc': {'key': 'reasonDesc', 'type': 'AutomaticTuningServerReason'},
49+
}
50+
51+
def __init__(self, *, desired_state=None, **kwargs) -> None:
52+
super(AutomaticTuningServerOptions, self).__init__(**kwargs)
53+
self.desired_state = desired_state
54+
self.actual_state = None
55+
self.reason_code = None
56+
self.reason_desc = None

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

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
class BackupLongTermRetentionPolicy(ProxyResource):
16-
"""A backup long term retention policy.
16+
"""A long term retention policy.
1717
1818
Variables are only populated by the server, and will be ignored when
1919
sending a request.
@@ -24,37 +24,39 @@ class BackupLongTermRetentionPolicy(ProxyResource):
2424
:vartype name: str
2525
:ivar type: Resource type.
2626
:vartype type: str
27-
:ivar location: The geo-location where the resource lives
28-
:vartype location: str
29-
:param state: The status of the backup long term retention policy.
30-
Possible values include: 'Disabled', 'Enabled'
31-
:type state: str or
32-
~azure.mgmt.sql.models.BackupLongTermRetentionPolicyState
33-
:param recovery_services_backup_policy_resource_id: The azure recovery
34-
services backup protection policy resource id
35-
:type recovery_services_backup_policy_resource_id: str
27+
:param weekly_retention: The weekly retention policy for an LTR backup in
28+
an ISO 8601 format.
29+
:type weekly_retention: str
30+
:param monthly_retention: The montly retention policy for an LTR backup in
31+
an ISO 8601 format.
32+
:type monthly_retention: str
33+
:param yearly_retention: The yearly retention policy for an LTR backup in
34+
an ISO 8601 format.
35+
:type yearly_retention: str
36+
:param week_of_year: The week of year to take the yearly backup in an ISO
37+
8601 format.
38+
:type week_of_year: int
3639
"""
3740

3841
_validation = {
3942
'id': {'readonly': True},
4043
'name': {'readonly': True},
4144
'type': {'readonly': True},
42-
'location': {'readonly': True},
43-
'state': {'required': True},
44-
'recovery_services_backup_policy_resource_id': {'required': True},
4545
}
4646

4747
_attribute_map = {
4848
'id': {'key': 'id', 'type': 'str'},
4949
'name': {'key': 'name', 'type': 'str'},
5050
'type': {'key': 'type', 'type': 'str'},
51-
'location': {'key': 'location', 'type': 'str'},
52-
'state': {'key': 'properties.state', 'type': 'BackupLongTermRetentionPolicyState'},
53-
'recovery_services_backup_policy_resource_id': {'key': 'properties.recoveryServicesBackupPolicyResourceId', 'type': 'str'},
51+
'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'},
52+
'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'},
53+
'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'},
54+
'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'},
5455
}
5556

56-
def __init__(self, state, recovery_services_backup_policy_resource_id):
57-
super(BackupLongTermRetentionPolicy, self).__init__()
58-
self.location = None
59-
self.state = state
60-
self.recovery_services_backup_policy_resource_id = recovery_services_backup_policy_resource_id
57+
def __init__(self, **kwargs):
58+
super(BackupLongTermRetentionPolicy, self).__init__(**kwargs)
59+
self.weekly_retention = kwargs.get('weekly_retention', None)
60+
self.monthly_retention = kwargs.get('monthly_retention', None)
61+
self.yearly_retention = kwargs.get('yearly_retention', None)
62+
self.week_of_year = kwargs.get('week_of_year', None)

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

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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 .proxy_resource import ProxyResource
13+
14+
15+
class BackupLongTermRetentionPolicy(ProxyResource):
16+
"""A long term retention policy.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
:ivar id: Resource ID.
22+
:vartype id: str
23+
:ivar name: Resource name.
24+
:vartype name: str
25+
:ivar type: Resource type.
26+
:vartype type: str
27+
:param weekly_retention: The weekly retention policy for an LTR backup in
28+
an ISO 8601 format.
29+
:type weekly_retention: str
30+
:param monthly_retention: The montly retention policy for an LTR backup in
31+
an ISO 8601 format.
32+
:type monthly_retention: str
33+
:param yearly_retention: The yearly retention policy for an LTR backup in
34+
an ISO 8601 format.
35+
:type yearly_retention: str
36+
:param week_of_year: The week of year to take the yearly backup in an ISO
37+
8601 format.
38+
:type week_of_year: int
39+
"""
40+
41+
_validation = {
42+
'id': {'readonly': True},
43+
'name': {'readonly': True},
44+
'type': {'readonly': True},
45+
}
46+
47+
_attribute_map = {
48+
'id': {'key': 'id', 'type': 'str'},
49+
'name': {'key': 'name', 'type': 'str'},
50+
'type': {'key': 'type', 'type': 'str'},
51+
'weekly_retention': {'key': 'properties.weeklyRetention', 'type': 'str'},
52+
'monthly_retention': {'key': 'properties.monthlyRetention', 'type': 'str'},
53+
'yearly_retention': {'key': 'properties.yearlyRetention', 'type': 'str'},
54+
'week_of_year': {'key': 'properties.weekOfYear', 'type': 'int'},
55+
}
56+
57+
def __init__(self, *, weekly_retention: str=None, monthly_retention: str=None, yearly_retention: str=None, week_of_year: int=None, **kwargs) -> None:
58+
super(BackupLongTermRetentionPolicy, self).__init__(, **kwargs)
59+
self.weekly_retention = weekly_retention
60+
self.monthly_retention = monthly_retention
61+
self.yearly_retention = yearly_retention
62+
self.week_of_year = week_of_year

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ class CheckNameAvailabilityRequest(Model):
1818
Variables are only populated by the server, and will be ignored when
1919
sending a request.
2020
21-
:param name: The name whose availability is to be checked.
21+
All required parameters must be populated in order to send to Azure.
22+
23+
:param name: Required. The name whose availability is to be checked.
2224
:type name: str
23-
:ivar type: The type of resource that is used as the scope of the
24-
availability check. Default value: "Microsoft.Sql/servers" .
25+
:ivar type: Required. The type of resource that is used as the scope of
26+
the availability check. Default value: "Microsoft.Sql/servers" .
2527
:vartype type: str
2628
"""
2729

@@ -37,6 +39,6 @@ class CheckNameAvailabilityRequest(Model):
3739

3840
type = "Microsoft.Sql/servers"
3941

40-
def __init__(self, name):
41-
super(CheckNameAvailabilityRequest, self).__init__()
42-
self.name = name
42+
def __init__(self, **kwargs):
43+
super(CheckNameAvailabilityRequest, self).__init__(**kwargs)
44+
self.name = kwargs.get('name', None)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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.serialization import Model
13+
14+
15+
class CheckNameAvailabilityRequest(Model):
16+
"""A request to check whether the specified name for a resource is available.
17+
18+
Variables are only populated by the server, and will be ignored when
19+
sending a request.
20+
21+
All required parameters must be populated in order to send to Azure.
22+
23+
:param name: Required. The name whose availability is to be checked.
24+
:type name: str
25+
:ivar type: Required. The type of resource that is used as the scope of
26+
the availability check. Default value: "Microsoft.Sql/servers" .
27+
:vartype type: str
28+
"""
29+
30+
_validation = {
31+
'name': {'required': True},
32+
'type': {'required': True, 'constant': True},
33+
}
34+
35+
_attribute_map = {
36+
'name': {'key': 'name', 'type': 'str'},
37+
'type': {'key': 'type', 'type': 'str'},
38+
}
39+
40+
type = "Microsoft.Sql/servers"
41+
42+
def __init__(self, *, name: str, **kwargs) -> None:
43+
super(CheckNameAvailabilityRequest, self).__init__(**kwargs)
44+
self.name = name

0 commit comments

Comments
 (0)