Skip to content

Commit 16a364b

Browse files
Azure CLI BotSDKAutoRAY-316
authored
[AutoRelease] t1-sql-2021-06-18-22132 (Azure#19320)
* CodeGen from PR 14841 in Azure/azure-rest-api-specs add sql tag to readme.go.md (Azure#14841) * version,CHANGELOG * test * test config Co-authored-by: SDKAuto <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Zed <[email protected]>
1 parent fd411ac commit 16a364b

15 files changed

+321
-657
lines changed

sdk/sql/azure-mgmt-sql/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Release History
22

3+
## 0.29.0 (2021-06-18)
4+
5+
**Features**
6+
7+
- Model ServerUpdate has a new parameter restrict_outbound_network_access
8+
- Model ServerUpdate has a new parameter federated_client_id
9+
- Model Server has a new parameter restrict_outbound_network_access
10+
- Model Server has a new parameter federated_client_id
11+
- Model BackupShortTermRetentionPolicy has a new parameter diff_backup_interval_in_hours
12+
13+
**Breaking changes**
14+
15+
- Operation ReplicationLinksOperations.get has a new signature
16+
- Operation BackupShortTermRetentionPoliciesOperations.create_or_update has a new signature
17+
- Operation BackupShortTermRetentionPoliciesOperations.update has a new signature
18+
319
## 0.28.0 (2021-05-24)
420

521
- Add resource identity

sdk/sql/azure-mgmt-sql/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"autorest": "V2",
33
"use": "@microsoft.azure/autorest.python@~4.0.71",
4-
"commit": "1c801aa70be460b277f1d81f9cced889ca5008fe",
4+
"commit": "a07f49e3f75a134c1acdacc338c9f9dc32386f66",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
66
"autorest_command": "autorest specification/sql/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk [email protected]/autorest.python@~4.0.71 --version=V2",
77
"readme": "specification/sql/resource-manager/readme.md"

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from .operations import TransparentDataEncryptionsOperations
2929
from .operations import TransparentDataEncryptionActivitiesOperations
3030
from .operations import ServerUsagesOperations
31-
from .operations import BackupShortTermRetentionPoliciesOperations
3231
from .operations import ExtendedDatabaseBlobAuditingPoliciesOperations
3332
from .operations import ExtendedServerBlobAuditingPoliciesOperations
3433
from .operations import ServerBlobAuditingPoliciesOperations
@@ -110,7 +109,6 @@
110109
from .operations import ServerDnsAliasesOperations
111110
from .operations import ServerKeysOperations
112111
from .operations import ServerOperations
113-
from .operations import ServersOperations
114112
from .operations import ServerSecurityAlertPoliciesOperations
115113
from .operations import ServerTrustGroupsOperations
116114
from .operations import ServerVulnerabilityAssessmentsOperations
@@ -125,13 +123,15 @@
125123
from .operations import VirtualNetworkRulesOperations
126124
from .operations import WorkloadClassifiersOperations
127125
from .operations import WorkloadGroupsOperations
126+
from .operations import BackupShortTermRetentionPoliciesOperations
128127
from .operations import DatabaseExtensionsOperations
129128
from .operations import DatabaseOperations
130129
from .operations import DatabaseUsagesOperations
131130
from .operations import LedgerDigestUploadsOperations
132131
from .operations import OutboundFirewallRulesOperations
133132
from .operations import RestorableDroppedDatabasesOperations
134133
from .operations import RestorableDroppedManagedDatabasesOperations
134+
from .operations import ServersOperations
135135
from .operations import UsagesOperations
136136
from . import models
137137

@@ -172,8 +172,6 @@ class SqlManagementClient(SDKClient):
172172
:vartype transparent_data_encryption_activities: azure.mgmt.sql.operations.TransparentDataEncryptionActivitiesOperations
173173
:ivar server_usages: ServerUsages operations
174174
:vartype server_usages: azure.mgmt.sql.operations.ServerUsagesOperations
175-
:ivar backup_short_term_retention_policies: BackupShortTermRetentionPolicies operations
176-
:vartype backup_short_term_retention_policies: azure.mgmt.sql.operations.BackupShortTermRetentionPoliciesOperations
177175
:ivar extended_database_blob_auditing_policies: ExtendedDatabaseBlobAuditingPolicies operations
178176
:vartype extended_database_blob_auditing_policies: azure.mgmt.sql.operations.ExtendedDatabaseBlobAuditingPoliciesOperations
179177
:ivar extended_server_blob_auditing_policies: ExtendedServerBlobAuditingPolicies operations
@@ -336,8 +334,6 @@ class SqlManagementClient(SDKClient):
336334
:vartype server_keys: azure.mgmt.sql.operations.ServerKeysOperations
337335
:ivar server_operations: ServerOperations operations
338336
:vartype server_operations: azure.mgmt.sql.operations.ServerOperations
339-
:ivar servers: Servers operations
340-
:vartype servers: azure.mgmt.sql.operations.ServersOperations
341337
:ivar server_security_alert_policies: ServerSecurityAlertPolicies operations
342338
:vartype server_security_alert_policies: azure.mgmt.sql.operations.ServerSecurityAlertPoliciesOperations
343339
:ivar server_trust_groups: ServerTrustGroups operations
@@ -366,6 +362,8 @@ class SqlManagementClient(SDKClient):
366362
:vartype workload_classifiers: azure.mgmt.sql.operations.WorkloadClassifiersOperations
367363
:ivar workload_groups: WorkloadGroups operations
368364
:vartype workload_groups: azure.mgmt.sql.operations.WorkloadGroupsOperations
365+
:ivar backup_short_term_retention_policies: BackupShortTermRetentionPolicies operations
366+
:vartype backup_short_term_retention_policies: azure.mgmt.sql.operations.BackupShortTermRetentionPoliciesOperations
369367
:ivar database_extensions: DatabaseExtensions operations
370368
:vartype database_extensions: azure.mgmt.sql.operations.DatabaseExtensionsOperations
371369
:ivar database_operations: DatabaseOperations operations
@@ -380,6 +378,8 @@ class SqlManagementClient(SDKClient):
380378
:vartype restorable_dropped_databases: azure.mgmt.sql.operations.RestorableDroppedDatabasesOperations
381379
:ivar restorable_dropped_managed_databases: RestorableDroppedManagedDatabases operations
382380
:vartype restorable_dropped_managed_databases: azure.mgmt.sql.operations.RestorableDroppedManagedDatabasesOperations
381+
:ivar servers: Servers operations
382+
:vartype servers: azure.mgmt.sql.operations.ServersOperations
383383
:ivar usages: Usages operations
384384
:vartype usages: azure.mgmt.sql.operations.UsagesOperations
385385
@@ -432,8 +432,6 @@ def __init__(
432432
self._client, self.config, self._serialize, self._deserialize)
433433
self.server_usages = ServerUsagesOperations(
434434
self._client, self.config, self._serialize, self._deserialize)
435-
self.backup_short_term_retention_policies = BackupShortTermRetentionPoliciesOperations(
436-
self._client, self.config, self._serialize, self._deserialize)
437435
self.extended_database_blob_auditing_policies = ExtendedDatabaseBlobAuditingPoliciesOperations(
438436
self._client, self.config, self._serialize, self._deserialize)
439437
self.extended_server_blob_auditing_policies = ExtendedServerBlobAuditingPoliciesOperations(
@@ -596,8 +594,6 @@ def __init__(
596594
self._client, self.config, self._serialize, self._deserialize)
597595
self.server_operations = ServerOperations(
598596
self._client, self.config, self._serialize, self._deserialize)
599-
self.servers = ServersOperations(
600-
self._client, self.config, self._serialize, self._deserialize)
601597
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
602598
self._client, self.config, self._serialize, self._deserialize)
603599
self.server_trust_groups = ServerTrustGroupsOperations(
@@ -626,6 +622,8 @@ def __init__(
626622
self._client, self.config, self._serialize, self._deserialize)
627623
self.workload_groups = WorkloadGroupsOperations(
628624
self._client, self.config, self._serialize, self._deserialize)
625+
self.backup_short_term_retention_policies = BackupShortTermRetentionPoliciesOperations(
626+
self._client, self.config, self._serialize, self._deserialize)
629627
self.database_extensions = DatabaseExtensionsOperations(
630628
self._client, self.config, self._serialize, self._deserialize)
631629
self.database_operations = DatabaseOperations(
@@ -640,5 +638,7 @@ def __init__(
640638
self._client, self.config, self._serialize, self._deserialize)
641639
self.restorable_dropped_managed_databases = RestorableDroppedManagedDatabasesOperations(
642640
self._client, self.config, self._serialize, self._deserialize)
641+
self.servers = ServersOperations(
642+
self._client, self.config, self._serialize, self._deserialize)
643643
self.usages = UsagesOperations(
644644
self._client, self.config, self._serialize, self._deserialize)

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

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,6 @@
676676
RestorePointType,
677677
AutomaticTuningServerMode,
678678
AutomaticTuningServerReason,
679-
ServerPublicNetworkAccess,
680-
ServerWorkspaceFeature,
681-
StorageKeyType,
682-
CheckNameAvailabilityReason,
683679
SyncAgentState,
684680
SyncMemberDbType,
685681
SyncGroupLogType,
@@ -695,7 +691,14 @@
695691
DatabaseReadScale,
696692
SecondaryType,
697693
CurrentBackupStorageRedundancy,
694+
StorageKeyType,
698695
LedgerDigestUploadsState,
696+
ReplicationRole,
697+
ReplicationState,
698+
ReplicationLinkType,
699+
ServerNetworkAccessFlag,
700+
ServerWorkspaceFeature,
701+
CheckNameAvailabilityReason,
699702
VulnerabilityAssessmentPolicyBaselineName,
700703
CapabilityGroup,
701704
DatabaseState,
@@ -962,7 +965,6 @@
962965
'ElasticPoolDatabaseActivityPaged',
963966
'TransparentDataEncryptionActivityPaged',
964967
'ServerUsagePaged',
965-
'BackupShortTermRetentionPolicyPaged',
966968
'ExtendedDatabaseBlobAuditingPolicyPaged',
967969
'ExtendedServerBlobAuditingPolicyPaged',
968970
'ServerBlobAuditingPolicyPaged',
@@ -1022,7 +1024,6 @@
10221024
'ServerDnsAliasPaged',
10231025
'ServerKeyPaged',
10241026
'ServerOperationPaged',
1025-
'ServerPaged',
10261027
'ServerSecurityAlertPolicyPaged',
10271028
'ServerTrustGroupPaged',
10281029
'ServerVulnerabilityAssessmentPaged',
@@ -1039,13 +1040,15 @@
10391040
'VirtualNetworkRulePaged',
10401041
'WorkloadClassifierPaged',
10411042
'WorkloadGroupPaged',
1043+
'BackupShortTermRetentionPolicyPaged',
10421044
'ImportExportExtensionsOperationResultPaged',
10431045
'DatabaseOperationPaged',
10441046
'DatabaseUsagePaged',
10451047
'LedgerDigestUploadsPaged',
10461048
'OutboundFirewallRulePaged',
10471049
'RestorableDroppedDatabasePaged',
10481050
'RestorableDroppedManagedDatabasePaged',
1051+
'ServerPaged',
10491052
'UsagePaged',
10501053
'ServerConnectionType',
10511054
'DataMaskingState',
@@ -1128,10 +1131,6 @@
11281131
'RestorePointType',
11291132
'AutomaticTuningServerMode',
11301133
'AutomaticTuningServerReason',
1131-
'ServerPublicNetworkAccess',
1132-
'ServerWorkspaceFeature',
1133-
'StorageKeyType',
1134-
'CheckNameAvailabilityReason',
11351134
'SyncAgentState',
11361135
'SyncMemberDbType',
11371136
'SyncGroupLogType',
@@ -1147,7 +1146,14 @@
11471146
'DatabaseReadScale',
11481147
'SecondaryType',
11491148
'CurrentBackupStorageRedundancy',
1149+
'StorageKeyType',
11501150
'LedgerDigestUploadsState',
1151+
'ReplicationRole',
1152+
'ReplicationState',
1153+
'ReplicationLinkType',
1154+
'ServerNetworkAccessFlag',
1155+
'ServerWorkspaceFeature',
1156+
'CheckNameAvailabilityReason',
11511157
'VulnerabilityAssessmentPolicyBaselineName',
11521158
'CapabilityGroup',
11531159
'DatabaseState',

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ class BackupShortTermRetentionPolicy(ProxyResource):
321321
:param retention_days: The backup retention period in days. This is how
322322
many days Point-in-Time Restore will be supported.
323323
:type retention_days: int
324+
:param diff_backup_interval_in_hours: The differential backup interval in
325+
hours. This is how many interval hours between each differential backup
326+
will be supported. This is only applicable to live databases but not
327+
dropped databases.
328+
:type diff_backup_interval_in_hours: int
324329
"""
325330

326331
_validation = {
@@ -334,11 +339,13 @@ class BackupShortTermRetentionPolicy(ProxyResource):
334339
'name': {'key': 'name', 'type': 'str'},
335340
'type': {'key': 'type', 'type': 'str'},
336341
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'},
342+
'diff_backup_interval_in_hours': {'key': 'properties.diffBackupIntervalInHours', 'type': 'int'},
337343
}
338344

339345
def __init__(self, **kwargs):
340346
super(BackupShortTermRetentionPolicy, self).__init__(**kwargs)
341347
self.retention_days = kwargs.get('retention_days', None)
348+
self.diff_backup_interval_in_hours = kwargs.get('diff_backup_interval_in_hours', None)
342349

343350

344351
class CheckNameAvailabilityRequest(Model):
@@ -9357,24 +9364,28 @@ class ReplicationLink(ProxyResource):
93579364
:vartype partner_database: str
93589365
:ivar partner_location: Resource partner location.
93599366
:vartype partner_location: str
9360-
:ivar role: Local replication role.
9361-
:vartype role: str
9362-
:ivar partner_role: Partner replication role.
9363-
:vartype partner_role: str
9367+
:ivar role: Local replication role. Possible values include: 'Primary',
9368+
'Secondary', 'NonReadableSecondary', 'Source', 'Copy'
9369+
:vartype role: str or ~azure.mgmt.sql.models.ReplicationRole
9370+
:ivar partner_role: Partner replication role. Possible values include:
9371+
'Primary', 'Secondary', 'NonReadableSecondary', 'Source', 'Copy'
9372+
:vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole
93649373
:ivar replication_mode: Replication mode.
93659374
:vartype replication_mode: str
93669375
:ivar start_time: Time at which the link was created.
93679376
:vartype start_time: datetime
93689377
:ivar percent_complete: Seeding completion percentage for the link.
93699378
:vartype percent_complete: int
93709379
:ivar replication_state: Replication state (PENDING, SEEDING, CATCHUP,
9371-
SUSPENDED).
9372-
:vartype replication_state: str
9380+
SUSPENDED). Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP',
9381+
'SUSPENDED'
9382+
:vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState
93739383
:ivar is_termination_allowed: Whether the user is currently allowed to
93749384
terminate the link.
93759385
:vartype is_termination_allowed: bool
9376-
:ivar link_type: Link type (GEO, NAMED).
9377-
:vartype link_type: str
9386+
:ivar link_type: Link type (GEO, NAMED). Possible values include: 'GEO',
9387+
'NAMED'
9388+
:vartype link_type: str or ~azure.mgmt.sql.models.ReplicationLinkType
93789389
"""
93799390

93809391
_validation = {
@@ -9401,8 +9412,8 @@ class ReplicationLink(ProxyResource):
94019412
'partner_server': {'key': 'properties.partnerServer', 'type': 'str'},
94029413
'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'},
94039414
'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'},
9404-
'role': {'key': 'properties.role', 'type': 'str'},
9405-
'partner_role': {'key': 'properties.partnerRole', 'type': 'str'},
9415+
'role': {'key': 'properties.role', 'type': 'ReplicationRole'},
9416+
'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'},
94069417
'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'},
94079418
'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'},
94089419
'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'},
@@ -10081,7 +10092,7 @@ class Server(TrackedResource):
1008110092
allowed for this server. Value is optional but if passed in, must be
1008210093
'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled'
1008310094
:type public_network_access: str or
10084-
~azure.mgmt.sql.models.ServerPublicNetworkAccess
10095+
~azure.mgmt.sql.models.ServerNetworkAccessFlag
1008510096
:ivar workspace_feature: Whether or not existing server has a workspace
1008610097
created and if it allows connection from workspace. Possible values
1008710098
include: 'Connected', 'Disconnected'
@@ -10090,10 +10101,19 @@ class Server(TrackedResource):
1009010101
:param primary_user_assigned_identity_id: The resource id of a user
1009110102
assigned identity to be used by default.
1009210103
:type primary_user_assigned_identity_id: str
10104+
:param federated_client_id: The Client id used for cross tenant CMK
10105+
scenario
10106+
:type federated_client_id: str
1009310107
:param key_id: A CMK URI of the key to use for encryption.
1009410108
:type key_id: str
1009510109
:param administrators: The Azure Active Directory identity of the server.
1009610110
:type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator
10111+
:param restrict_outbound_network_access: Whether or not to restrict
10112+
outbound network access for this server. Value is optional but if passed
10113+
in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled',
10114+
'Disabled'
10115+
:type restrict_outbound_network_access: str or
10116+
~azure.mgmt.sql.models.ServerNetworkAccessFlag
1009710117
"""
1009810118

1009910119
_validation = {
@@ -10126,8 +10146,10 @@ class Server(TrackedResource):
1012610146
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
1012710147
'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'},
1012810148
'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'},
10149+
'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'},
1012910150
'key_id': {'key': 'properties.keyId', 'type': 'str'},
1013010151
'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'},
10152+
'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'},
1013110153
}
1013210154

1013310155
def __init__(self, **kwargs):
@@ -10144,8 +10166,10 @@ def __init__(self, **kwargs):
1014410166
self.public_network_access = kwargs.get('public_network_access', None)
1014510167
self.workspace_feature = None
1014610168
self.primary_user_assigned_identity_id = kwargs.get('primary_user_assigned_identity_id', None)
10169+
self.federated_client_id = kwargs.get('federated_client_id', None)
1014710170
self.key_id = kwargs.get('key_id', None)
1014810171
self.administrators = kwargs.get('administrators', None)
10172+
self.restrict_outbound_network_access = kwargs.get('restrict_outbound_network_access', None)
1014910173

1015010174

1015110175
class ServerAutomaticTuning(ProxyResource):
@@ -11140,7 +11164,7 @@ class ServerUpdate(Model):
1114011164
allowed for this server. Value is optional but if passed in, must be
1114111165
'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled'
1114211166
:type public_network_access: str or
11143-
~azure.mgmt.sql.models.ServerPublicNetworkAccess
11167+
~azure.mgmt.sql.models.ServerNetworkAccessFlag
1114411168
:ivar workspace_feature: Whether or not existing server has a workspace
1114511169
created and if it allows connection from workspace. Possible values
1114611170
include: 'Connected', 'Disconnected'
@@ -11149,10 +11173,19 @@ class ServerUpdate(Model):
1114911173
:param primary_user_assigned_identity_id: The resource id of a user
1115011174
assigned identity to be used by default.
1115111175
:type primary_user_assigned_identity_id: str
11176+
:param federated_client_id: The Client id used for cross tenant CMK
11177+
scenario
11178+
:type federated_client_id: str
1115211179
:param key_id: A CMK URI of the key to use for encryption.
1115311180
:type key_id: str
1115411181
:param administrators: The Azure Active Directory identity of the server.
1115511182
:type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator
11183+
:param restrict_outbound_network_access: Whether or not to restrict
11184+
outbound network access for this server. Value is optional but if passed
11185+
in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled',
11186+
'Disabled'
11187+
:type restrict_outbound_network_access: str or
11188+
~azure.mgmt.sql.models.ServerNetworkAccessFlag
1115611189
:param tags: Resource tags.
1115711190
:type tags: dict[str, str]
1115811191
"""
@@ -11176,8 +11209,10 @@ class ServerUpdate(Model):
1117611209
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
1117711210
'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'},
1117811211
'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'},
11212+
'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'},
1117911213
'key_id': {'key': 'properties.keyId', 'type': 'str'},
1118011214
'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'},
11215+
'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'},
1118111216
'tags': {'key': 'tags', 'type': '{str}'},
1118211217
}
1118311218

@@ -11194,8 +11229,10 @@ def __init__(self, **kwargs):
1119411229
self.public_network_access = kwargs.get('public_network_access', None)
1119511230
self.workspace_feature = None
1119611231
self.primary_user_assigned_identity_id = kwargs.get('primary_user_assigned_identity_id', None)
11232+
self.federated_client_id = kwargs.get('federated_client_id', None)
1119711233
self.key_id = kwargs.get('key_id', None)
1119811234
self.administrators = kwargs.get('administrators', None)
11235+
self.restrict_outbound_network_access = kwargs.get('restrict_outbound_network_access', None)
1119911236
self.tags = kwargs.get('tags', None)
1120011237

1120111238

0 commit comments

Comments
 (0)