Skip to content

Commit

Permalink
[AutoRelease] t1-sql-2021-06-18-22132 (#19320)
Browse files Browse the repository at this point in the history
* CodeGen from PR 14841 in Azure/azure-rest-api-specs
add sql tag to readme.go.md (#14841)

* version,CHANGELOG

* test

* test config

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: Zed <601306339@qq.com>
  • Loading branch information
3 people authored Jun 18, 2021
1 parent fd411ac commit 16a364b
Show file tree
Hide file tree
Showing 15 changed files with 321 additions and 657 deletions.
16 changes: 16 additions & 0 deletions sdk/sql/azure-mgmt-sql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Release History

## 0.29.0 (2021-06-18)

**Features**

- Model ServerUpdate has a new parameter restrict_outbound_network_access
- Model ServerUpdate has a new parameter federated_client_id
- Model Server has a new parameter restrict_outbound_network_access
- Model Server has a new parameter federated_client_id
- Model BackupShortTermRetentionPolicy has a new parameter diff_backup_interval_in_hours

**Breaking changes**

- Operation ReplicationLinksOperations.get has a new signature
- Operation BackupShortTermRetentionPoliciesOperations.create_or_update has a new signature
- Operation BackupShortTermRetentionPoliciesOperations.update has a new signature

## 0.28.0 (2021-05-24)

- Add resource identity
Expand Down
2 changes: 1 addition & 1 deletion sdk/sql/azure-mgmt-sql/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "1c801aa70be460b277f1d81f9cced889ca5008fe",
"commit": "a07f49e3f75a134c1acdacc338c9f9dc32386f66",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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 --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
"readme": "specification/sql/resource-manager/readme.md"
Expand Down
20 changes: 10 additions & 10 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from .operations import TransparentDataEncryptionsOperations
from .operations import TransparentDataEncryptionActivitiesOperations
from .operations import ServerUsagesOperations
from .operations import BackupShortTermRetentionPoliciesOperations
from .operations import ExtendedDatabaseBlobAuditingPoliciesOperations
from .operations import ExtendedServerBlobAuditingPoliciesOperations
from .operations import ServerBlobAuditingPoliciesOperations
Expand Down Expand Up @@ -110,7 +109,6 @@
from .operations import ServerDnsAliasesOperations
from .operations import ServerKeysOperations
from .operations import ServerOperations
from .operations import ServersOperations
from .operations import ServerSecurityAlertPoliciesOperations
from .operations import ServerTrustGroupsOperations
from .operations import ServerVulnerabilityAssessmentsOperations
Expand All @@ -125,13 +123,15 @@
from .operations import VirtualNetworkRulesOperations
from .operations import WorkloadClassifiersOperations
from .operations import WorkloadGroupsOperations
from .operations import BackupShortTermRetentionPoliciesOperations
from .operations import DatabaseExtensionsOperations
from .operations import DatabaseOperations
from .operations import DatabaseUsagesOperations
from .operations import LedgerDigestUploadsOperations
from .operations import OutboundFirewallRulesOperations
from .operations import RestorableDroppedDatabasesOperations
from .operations import RestorableDroppedManagedDatabasesOperations
from .operations import ServersOperations
from .operations import UsagesOperations
from . import models

Expand Down Expand Up @@ -172,8 +172,6 @@ class SqlManagementClient(SDKClient):
:vartype transparent_data_encryption_activities: azure.mgmt.sql.operations.TransparentDataEncryptionActivitiesOperations
:ivar server_usages: ServerUsages operations
:vartype server_usages: azure.mgmt.sql.operations.ServerUsagesOperations
:ivar backup_short_term_retention_policies: BackupShortTermRetentionPolicies operations
:vartype backup_short_term_retention_policies: azure.mgmt.sql.operations.BackupShortTermRetentionPoliciesOperations
:ivar extended_database_blob_auditing_policies: ExtendedDatabaseBlobAuditingPolicies operations
:vartype extended_database_blob_auditing_policies: azure.mgmt.sql.operations.ExtendedDatabaseBlobAuditingPoliciesOperations
:ivar extended_server_blob_auditing_policies: ExtendedServerBlobAuditingPolicies operations
Expand Down Expand Up @@ -336,8 +334,6 @@ class SqlManagementClient(SDKClient):
:vartype server_keys: azure.mgmt.sql.operations.ServerKeysOperations
:ivar server_operations: ServerOperations operations
:vartype server_operations: azure.mgmt.sql.operations.ServerOperations
:ivar servers: Servers operations
:vartype servers: azure.mgmt.sql.operations.ServersOperations
:ivar server_security_alert_policies: ServerSecurityAlertPolicies operations
:vartype server_security_alert_policies: azure.mgmt.sql.operations.ServerSecurityAlertPoliciesOperations
:ivar server_trust_groups: ServerTrustGroups operations
Expand Down Expand Up @@ -366,6 +362,8 @@ class SqlManagementClient(SDKClient):
:vartype workload_classifiers: azure.mgmt.sql.operations.WorkloadClassifiersOperations
:ivar workload_groups: WorkloadGroups operations
:vartype workload_groups: azure.mgmt.sql.operations.WorkloadGroupsOperations
:ivar backup_short_term_retention_policies: BackupShortTermRetentionPolicies operations
:vartype backup_short_term_retention_policies: azure.mgmt.sql.operations.BackupShortTermRetentionPoliciesOperations
:ivar database_extensions: DatabaseExtensions operations
:vartype database_extensions: azure.mgmt.sql.operations.DatabaseExtensionsOperations
:ivar database_operations: DatabaseOperations operations
Expand All @@ -380,6 +378,8 @@ class SqlManagementClient(SDKClient):
:vartype restorable_dropped_databases: azure.mgmt.sql.operations.RestorableDroppedDatabasesOperations
:ivar restorable_dropped_managed_databases: RestorableDroppedManagedDatabases operations
:vartype restorable_dropped_managed_databases: azure.mgmt.sql.operations.RestorableDroppedManagedDatabasesOperations
:ivar servers: Servers operations
:vartype servers: azure.mgmt.sql.operations.ServersOperations
:ivar usages: Usages operations
:vartype usages: azure.mgmt.sql.operations.UsagesOperations
Expand Down Expand Up @@ -432,8 +432,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.server_usages = ServerUsagesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.backup_short_term_retention_policies = BackupShortTermRetentionPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.extended_database_blob_auditing_policies = ExtendedDatabaseBlobAuditingPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.extended_server_blob_auditing_policies = ExtendedServerBlobAuditingPoliciesOperations(
Expand Down Expand Up @@ -596,8 +594,6 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.server_operations = ServerOperations(
self._client, self.config, self._serialize, self._deserialize)
self.servers = ServersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_trust_groups = ServerTrustGroupsOperations(
Expand Down Expand Up @@ -626,6 +622,8 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.workload_groups = WorkloadGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.backup_short_term_retention_policies = BackupShortTermRetentionPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.database_extensions = DatabaseExtensionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.database_operations = DatabaseOperations(
Expand All @@ -640,5 +638,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.restorable_dropped_managed_databases = RestorableDroppedManagedDatabasesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.servers = ServersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.usages = UsagesOperations(
self._client, self.config, self._serialize, self._deserialize)
26 changes: 16 additions & 10 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,10 +676,6 @@
RestorePointType,
AutomaticTuningServerMode,
AutomaticTuningServerReason,
ServerPublicNetworkAccess,
ServerWorkspaceFeature,
StorageKeyType,
CheckNameAvailabilityReason,
SyncAgentState,
SyncMemberDbType,
SyncGroupLogType,
Expand All @@ -695,7 +691,14 @@
DatabaseReadScale,
SecondaryType,
CurrentBackupStorageRedundancy,
StorageKeyType,
LedgerDigestUploadsState,
ReplicationRole,
ReplicationState,
ReplicationLinkType,
ServerNetworkAccessFlag,
ServerWorkspaceFeature,
CheckNameAvailabilityReason,
VulnerabilityAssessmentPolicyBaselineName,
CapabilityGroup,
DatabaseState,
Expand Down Expand Up @@ -962,7 +965,6 @@
'ElasticPoolDatabaseActivityPaged',
'TransparentDataEncryptionActivityPaged',
'ServerUsagePaged',
'BackupShortTermRetentionPolicyPaged',
'ExtendedDatabaseBlobAuditingPolicyPaged',
'ExtendedServerBlobAuditingPolicyPaged',
'ServerBlobAuditingPolicyPaged',
Expand Down Expand Up @@ -1022,7 +1024,6 @@
'ServerDnsAliasPaged',
'ServerKeyPaged',
'ServerOperationPaged',
'ServerPaged',
'ServerSecurityAlertPolicyPaged',
'ServerTrustGroupPaged',
'ServerVulnerabilityAssessmentPaged',
Expand All @@ -1039,13 +1040,15 @@
'VirtualNetworkRulePaged',
'WorkloadClassifierPaged',
'WorkloadGroupPaged',
'BackupShortTermRetentionPolicyPaged',
'ImportExportExtensionsOperationResultPaged',
'DatabaseOperationPaged',
'DatabaseUsagePaged',
'LedgerDigestUploadsPaged',
'OutboundFirewallRulePaged',
'RestorableDroppedDatabasePaged',
'RestorableDroppedManagedDatabasePaged',
'ServerPaged',
'UsagePaged',
'ServerConnectionType',
'DataMaskingState',
Expand Down Expand Up @@ -1128,10 +1131,6 @@
'RestorePointType',
'AutomaticTuningServerMode',
'AutomaticTuningServerReason',
'ServerPublicNetworkAccess',
'ServerWorkspaceFeature',
'StorageKeyType',
'CheckNameAvailabilityReason',
'SyncAgentState',
'SyncMemberDbType',
'SyncGroupLogType',
Expand All @@ -1147,7 +1146,14 @@
'DatabaseReadScale',
'SecondaryType',
'CurrentBackupStorageRedundancy',
'StorageKeyType',
'LedgerDigestUploadsState',
'ReplicationRole',
'ReplicationState',
'ReplicationLinkType',
'ServerNetworkAccessFlag',
'ServerWorkspaceFeature',
'CheckNameAvailabilityReason',
'VulnerabilityAssessmentPolicyBaselineName',
'CapabilityGroup',
'DatabaseState',
Expand Down
61 changes: 49 additions & 12 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ class BackupShortTermRetentionPolicy(ProxyResource):
:param retention_days: The backup retention period in days. This is how
many days Point-in-Time Restore will be supported.
:type retention_days: int
:param diff_backup_interval_in_hours: The differential backup interval in
hours. This is how many interval hours between each differential backup
will be supported. This is only applicable to live databases but not
dropped databases.
:type diff_backup_interval_in_hours: int
"""

_validation = {
Expand All @@ -334,11 +339,13 @@ class BackupShortTermRetentionPolicy(ProxyResource):
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'retention_days': {'key': 'properties.retentionDays', 'type': 'int'},
'diff_backup_interval_in_hours': {'key': 'properties.diffBackupIntervalInHours', 'type': 'int'},
}

def __init__(self, **kwargs):
super(BackupShortTermRetentionPolicy, self).__init__(**kwargs)
self.retention_days = kwargs.get('retention_days', None)
self.diff_backup_interval_in_hours = kwargs.get('diff_backup_interval_in_hours', None)


class CheckNameAvailabilityRequest(Model):
Expand Down Expand Up @@ -9357,24 +9364,28 @@ class ReplicationLink(ProxyResource):
:vartype partner_database: str
:ivar partner_location: Resource partner location.
:vartype partner_location: str
:ivar role: Local replication role.
:vartype role: str
:ivar partner_role: Partner replication role.
:vartype partner_role: str
:ivar role: Local replication role. Possible values include: 'Primary',
'Secondary', 'NonReadableSecondary', 'Source', 'Copy'
:vartype role: str or ~azure.mgmt.sql.models.ReplicationRole
:ivar partner_role: Partner replication role. Possible values include:
'Primary', 'Secondary', 'NonReadableSecondary', 'Source', 'Copy'
:vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole
:ivar replication_mode: Replication mode.
:vartype replication_mode: str
:ivar start_time: Time at which the link was created.
:vartype start_time: datetime
:ivar percent_complete: Seeding completion percentage for the link.
:vartype percent_complete: int
:ivar replication_state: Replication state (PENDING, SEEDING, CATCHUP,
SUSPENDED).
:vartype replication_state: str
SUSPENDED). Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP',
'SUSPENDED'
:vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState
:ivar is_termination_allowed: Whether the user is currently allowed to
terminate the link.
:vartype is_termination_allowed: bool
:ivar link_type: Link type (GEO, NAMED).
:vartype link_type: str
:ivar link_type: Link type (GEO, NAMED). Possible values include: 'GEO',
'NAMED'
:vartype link_type: str or ~azure.mgmt.sql.models.ReplicationLinkType
"""

_validation = {
Expand All @@ -9401,8 +9412,8 @@ class ReplicationLink(ProxyResource):
'partner_server': {'key': 'properties.partnerServer', 'type': 'str'},
'partner_database': {'key': 'properties.partnerDatabase', 'type': 'str'},
'partner_location': {'key': 'properties.partnerLocation', 'type': 'str'},
'role': {'key': 'properties.role', 'type': 'str'},
'partner_role': {'key': 'properties.partnerRole', 'type': 'str'},
'role': {'key': 'properties.role', 'type': 'ReplicationRole'},
'partner_role': {'key': 'properties.partnerRole', 'type': 'ReplicationRole'},
'replication_mode': {'key': 'properties.replicationMode', 'type': 'str'},
'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'},
'percent_complete': {'key': 'properties.percentComplete', 'type': 'int'},
Expand Down Expand Up @@ -10081,7 +10092,7 @@ class Server(TrackedResource):
allowed for this server. Value is optional but if passed in, must be
'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled'
:type public_network_access: str or
~azure.mgmt.sql.models.ServerPublicNetworkAccess
~azure.mgmt.sql.models.ServerNetworkAccessFlag
:ivar workspace_feature: Whether or not existing server has a workspace
created and if it allows connection from workspace. Possible values
include: 'Connected', 'Disconnected'
Expand All @@ -10090,10 +10101,19 @@ class Server(TrackedResource):
:param primary_user_assigned_identity_id: The resource id of a user
assigned identity to be used by default.
:type primary_user_assigned_identity_id: str
:param federated_client_id: The Client id used for cross tenant CMK
scenario
:type federated_client_id: str
:param key_id: A CMK URI of the key to use for encryption.
:type key_id: str
:param administrators: The Azure Active Directory identity of the server.
:type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator
:param restrict_outbound_network_access: Whether or not to restrict
outbound network access for this server. Value is optional but if passed
in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled',
'Disabled'
:type restrict_outbound_network_access: str or
~azure.mgmt.sql.models.ServerNetworkAccessFlag
"""

_validation = {
Expand Down Expand Up @@ -10126,8 +10146,10 @@ class Server(TrackedResource):
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'},
'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'},
'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'},
'key_id': {'key': 'properties.keyId', 'type': 'str'},
'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'},
'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -10144,8 +10166,10 @@ def __init__(self, **kwargs):
self.public_network_access = kwargs.get('public_network_access', None)
self.workspace_feature = None
self.primary_user_assigned_identity_id = kwargs.get('primary_user_assigned_identity_id', None)
self.federated_client_id = kwargs.get('federated_client_id', None)
self.key_id = kwargs.get('key_id', None)
self.administrators = kwargs.get('administrators', None)
self.restrict_outbound_network_access = kwargs.get('restrict_outbound_network_access', None)


class ServerAutomaticTuning(ProxyResource):
Expand Down Expand Up @@ -11140,7 +11164,7 @@ class ServerUpdate(Model):
allowed for this server. Value is optional but if passed in, must be
'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled'
:type public_network_access: str or
~azure.mgmt.sql.models.ServerPublicNetworkAccess
~azure.mgmt.sql.models.ServerNetworkAccessFlag
:ivar workspace_feature: Whether or not existing server has a workspace
created and if it allows connection from workspace. Possible values
include: 'Connected', 'Disconnected'
Expand All @@ -11149,10 +11173,19 @@ class ServerUpdate(Model):
:param primary_user_assigned_identity_id: The resource id of a user
assigned identity to be used by default.
:type primary_user_assigned_identity_id: str
:param federated_client_id: The Client id used for cross tenant CMK
scenario
:type federated_client_id: str
:param key_id: A CMK URI of the key to use for encryption.
:type key_id: str
:param administrators: The Azure Active Directory identity of the server.
:type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator
:param restrict_outbound_network_access: Whether or not to restrict
outbound network access for this server. Value is optional but if passed
in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled',
'Disabled'
:type restrict_outbound_network_access: str or
~azure.mgmt.sql.models.ServerNetworkAccessFlag
:param tags: Resource tags.
:type tags: dict[str, str]
"""
Expand All @@ -11176,8 +11209,10 @@ class ServerUpdate(Model):
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'},
'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'},
'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'},
'key_id': {'key': 'properties.keyId', 'type': 'str'},
'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'},
'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
}

Expand All @@ -11194,8 +11229,10 @@ def __init__(self, **kwargs):
self.public_network_access = kwargs.get('public_network_access', None)
self.workspace_feature = None
self.primary_user_assigned_identity_id = kwargs.get('primary_user_assigned_identity_id', None)
self.federated_client_id = kwargs.get('federated_client_id', None)
self.key_id = kwargs.get('key_id', None)
self.administrators = kwargs.get('administrators', None)
self.restrict_outbound_network_access = kwargs.get('restrict_outbound_network_access', None)
self.tags = kwargs.get('tags', None)


Expand Down
Loading

0 comments on commit 16a364b

Please sign in to comment.