Skip to content

Commit

Permalink
[AutoRelease] t2-sql-2023-06-27-53795(can only be merged by SDK owner) (
Browse files Browse the repository at this point in the history
Azure#30903)

* code and test

* Update CHANGELOG.md

---------

Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: Yuchao Yan <[email protected]>
  • Loading branch information
azure-sdk and msyyc authored Jun 27, 2023
1 parent 4bbd687 commit 85132dc
Show file tree
Hide file tree
Showing 445 changed files with 3,326 additions and 7,915 deletions.
7 changes: 7 additions & 0 deletions sdk/sql/azure-mgmt-sql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 4.0.0b11 (2023-06-27)

### Features Added

- Added operation FailoverGroupsOperations.begin_try_planned_before_forced_failover
- Model SqlVulnerabilityAssessmentScanRecord has a new parameter last_scan_time

## 4.0.0b10 (2023-04-11)

### Features Added
Expand Down
6 changes: 3 additions & 3 deletions sdk/sql/azure-mgmt-sql/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "f66499b77cd90144ceb0d118c1bd8bda7dbd4cfc",
"commit": "d03c1964cb76ffd6884d10a1871bbe779a2f68ef",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.3",
"@autorest/python@6.6.0",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/sql/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.3 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/sql/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-composite-v5 --use=@autorest/python@6.6.0 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/sql/resource-manager/readme.md"
}
6 changes: 3 additions & 3 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
if xml_desc.get("attr", False):
if xml_ns:
ET.register_namespace(xml_prefix, xml_ns)
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
serialized.set(xml_name, new_attr) # type: ignore
continue
if xml_desc.get("text", False):
Expand Down Expand Up @@ -1271,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type):
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
xml_ns = internal_type_xml_map.get("ns", None)
if xml_ns:
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
return xml_name


Expand All @@ -1295,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data):
# Integrate namespace if necessary
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
if xml_ns:
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)

# If it's an attribute, that's simple
if xml_desc.get("attr", False):
Expand Down
220 changes: 110 additions & 110 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "4.0.0b10"
VERSION = "4.0.0b11"
220 changes: 110 additions & 110 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_sql_management_client.py

Large diffs are not rendered by default.

88 changes: 44 additions & 44 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from ._deleted_servers_operations import DeletedServersOperations
from ._elastic_pool_operations_operations import ElasticPoolOperationsOperations
from ._encryption_protectors_operations import EncryptionProtectorsOperations
from ._failover_groups_operations import FailoverGroupsOperations
from ._firewall_rules_operations import FirewallRulesOperations
from ._instance_pools_operations import InstancePoolsOperations
from ._job_agents_operations import JobAgentsOperations
Expand Down Expand Up @@ -122,7 +121,6 @@
from ._server_connection_policies_operations import ServerConnectionPoliciesOperations
from ._distributed_availability_groups_operations import DistributedAvailabilityGroupsOperations
from ._server_trust_certificates_operations import ServerTrustCertificatesOperations
from ._ipv6_firewall_rules_operations import IPv6FirewallRulesOperations
from ._endpoint_certificates_operations import EndpointCertificatesOperations
from ._managed_database_sensitivity_labels_operations import ManagedDatabaseSensitivityLabelsOperations
from ._managed_database_recommended_sensitivity_labels_operations import (
Expand All @@ -137,38 +135,13 @@
from ._database_advanced_threat_protection_settings_operations import DatabaseAdvancedThreatProtectionSettingsOperations
from ._server_advanced_threat_protection_settings_operations import ServerAdvancedThreatProtectionSettingsOperations
from ._managed_server_dns_aliases_operations import ManagedServerDnsAliasesOperations
from ._database_sql_vulnerability_assessment_baselines_operations import (
DatabaseSqlVulnerabilityAssessmentBaselinesOperations,
)
from ._database_sql_vulnerability_assessment_execute_scan_operations import (
DatabaseSqlVulnerabilityAssessmentExecuteScanOperations,
)
from ._database_sql_vulnerability_assessment_rule_baselines_operations import (
DatabaseSqlVulnerabilityAssessmentRuleBaselinesOperations,
)
from ._database_sql_vulnerability_assessment_scan_result_operations import (
DatabaseSqlVulnerabilityAssessmentScanResultOperations,
)
from ._database_sql_vulnerability_assessment_scans_operations import DatabaseSqlVulnerabilityAssessmentScansOperations
from ._database_sql_vulnerability_assessments_settings_operations import (
DatabaseSqlVulnerabilityAssessmentsSettingsOperations,
)
from ._managed_database_advanced_threat_protection_settings_operations import (
ManagedDatabaseAdvancedThreatProtectionSettingsOperations,
)
from ._managed_instance_advanced_threat_protection_settings_operations import (
ManagedInstanceAdvancedThreatProtectionSettingsOperations,
)
from ._replication_links_operations import ReplicationLinksOperations
from ._sql_vulnerability_assessment_baseline_operations import SqlVulnerabilityAssessmentBaselineOperations
from ._sql_vulnerability_assessment_baselines_operations import SqlVulnerabilityAssessmentBaselinesOperations
from ._sql_vulnerability_assessment_execute_scan_operations import SqlVulnerabilityAssessmentExecuteScanOperations
from ._sql_vulnerability_assessment_rule_baseline_operations import SqlVulnerabilityAssessmentRuleBaselineOperations
from ._sql_vulnerability_assessment_rule_baselines_operations import SqlVulnerabilityAssessmentRuleBaselinesOperations
from ._sql_vulnerability_assessment_scan_result_operations import SqlVulnerabilityAssessmentScanResultOperations
from ._sql_vulnerability_assessment_scans_operations import SqlVulnerabilityAssessmentScansOperations
from ._sql_vulnerability_assessments_settings_operations import SqlVulnerabilityAssessmentsSettingsOperations
from ._sql_vulnerability_assessments_operations import SqlVulnerabilityAssessmentsOperations
from ._managed_database_move_operations_operations import ManagedDatabaseMoveOperationsOperations
from ._managed_instance_dtcs_operations import ManagedInstanceDtcsOperations
from ._synapse_link_workspaces_operations import SynapseLinkWorkspacesOperations
Expand All @@ -185,6 +158,33 @@
from ._servers_operations import ServersOperations
from ._start_stop_managed_instance_schedules_operations import StartStopManagedInstanceSchedulesOperations
from ._transparent_data_encryptions_operations import TransparentDataEncryptionsOperations
from ._failover_groups_operations import FailoverGroupsOperations
from ._ipv6_firewall_rules_operations import IPv6FirewallRulesOperations
from ._sql_vulnerability_assessment_baseline_operations import SqlVulnerabilityAssessmentBaselineOperations
from ._sql_vulnerability_assessment_baselines_operations import SqlVulnerabilityAssessmentBaselinesOperations
from ._sql_vulnerability_assessment_execute_scan_operations import SqlVulnerabilityAssessmentExecuteScanOperations
from ._sql_vulnerability_assessment_rule_baseline_operations import SqlVulnerabilityAssessmentRuleBaselineOperations
from ._sql_vulnerability_assessment_rule_baselines_operations import SqlVulnerabilityAssessmentRuleBaselinesOperations
from ._sql_vulnerability_assessment_scan_result_operations import SqlVulnerabilityAssessmentScanResultOperations
from ._sql_vulnerability_assessment_scans_operations import SqlVulnerabilityAssessmentScansOperations
from ._sql_vulnerability_assessments_settings_operations import SqlVulnerabilityAssessmentsSettingsOperations
from ._sql_vulnerability_assessments_operations import SqlVulnerabilityAssessmentsOperations
from ._database_sql_vulnerability_assessment_baselines_operations import (
DatabaseSqlVulnerabilityAssessmentBaselinesOperations,
)
from ._database_sql_vulnerability_assessment_execute_scan_operations import (
DatabaseSqlVulnerabilityAssessmentExecuteScanOperations,
)
from ._database_sql_vulnerability_assessment_rule_baselines_operations import (
DatabaseSqlVulnerabilityAssessmentRuleBaselinesOperations,
)
from ._database_sql_vulnerability_assessment_scan_result_operations import (
DatabaseSqlVulnerabilityAssessmentScanResultOperations,
)
from ._database_sql_vulnerability_assessment_scans_operations import DatabaseSqlVulnerabilityAssessmentScansOperations
from ._database_sql_vulnerability_assessments_settings_operations import (
DatabaseSqlVulnerabilityAssessmentsSettingsOperations,
)

from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
Expand Down Expand Up @@ -215,7 +215,6 @@
"DeletedServersOperations",
"ElasticPoolOperationsOperations",
"EncryptionProtectorsOperations",
"FailoverGroupsOperations",
"FirewallRulesOperations",
"InstancePoolsOperations",
"JobAgentsOperations",
Expand Down Expand Up @@ -293,7 +292,6 @@
"ServerConnectionPoliciesOperations",
"DistributedAvailabilityGroupsOperations",
"ServerTrustCertificatesOperations",
"IPv6FirewallRulesOperations",
"EndpointCertificatesOperations",
"ManagedDatabaseSensitivityLabelsOperations",
"ManagedDatabaseRecommendedSensitivityLabelsOperations",
Expand All @@ -306,24 +304,9 @@
"DatabaseAdvancedThreatProtectionSettingsOperations",
"ServerAdvancedThreatProtectionSettingsOperations",
"ManagedServerDnsAliasesOperations",
"DatabaseSqlVulnerabilityAssessmentBaselinesOperations",
"DatabaseSqlVulnerabilityAssessmentExecuteScanOperations",
"DatabaseSqlVulnerabilityAssessmentRuleBaselinesOperations",
"DatabaseSqlVulnerabilityAssessmentScanResultOperations",
"DatabaseSqlVulnerabilityAssessmentScansOperations",
"DatabaseSqlVulnerabilityAssessmentsSettingsOperations",
"ManagedDatabaseAdvancedThreatProtectionSettingsOperations",
"ManagedInstanceAdvancedThreatProtectionSettingsOperations",
"ReplicationLinksOperations",
"SqlVulnerabilityAssessmentBaselineOperations",
"SqlVulnerabilityAssessmentBaselinesOperations",
"SqlVulnerabilityAssessmentExecuteScanOperations",
"SqlVulnerabilityAssessmentRuleBaselineOperations",
"SqlVulnerabilityAssessmentRuleBaselinesOperations",
"SqlVulnerabilityAssessmentScanResultOperations",
"SqlVulnerabilityAssessmentScansOperations",
"SqlVulnerabilityAssessmentsSettingsOperations",
"SqlVulnerabilityAssessmentsOperations",
"ManagedDatabaseMoveOperationsOperations",
"ManagedInstanceDtcsOperations",
"SynapseLinkWorkspacesOperations",
Expand All @@ -340,6 +323,23 @@
"ServersOperations",
"StartStopManagedInstanceSchedulesOperations",
"TransparentDataEncryptionsOperations",
"FailoverGroupsOperations",
"IPv6FirewallRulesOperations",
"SqlVulnerabilityAssessmentBaselineOperations",
"SqlVulnerabilityAssessmentBaselinesOperations",
"SqlVulnerabilityAssessmentExecuteScanOperations",
"SqlVulnerabilityAssessmentRuleBaselineOperations",
"SqlVulnerabilityAssessmentRuleBaselinesOperations",
"SqlVulnerabilityAssessmentScanResultOperations",
"SqlVulnerabilityAssessmentScansOperations",
"SqlVulnerabilityAssessmentsSettingsOperations",
"SqlVulnerabilityAssessmentsOperations",
"DatabaseSqlVulnerabilityAssessmentBaselinesOperations",
"DatabaseSqlVulnerabilityAssessmentExecuteScanOperations",
"DatabaseSqlVulnerabilityAssessmentRuleBaselinesOperations",
"DatabaseSqlVulnerabilityAssessmentScanResultOperations",
"DatabaseSqlVulnerabilityAssessmentScansOperations",
"DatabaseSqlVulnerabilityAssessmentsSettingsOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload

from azure.core.async_paging import AsyncItemPaged, AsyncList
Expand Down Expand Up @@ -37,10 +37,6 @@
build_update_request,
)

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -100,9 +96,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
cls: ClsType[_models.BackupShortTermRetentionPolicy] = kwargs.pop("cls", None)

request = build_get_request(
Expand Down Expand Up @@ -161,16 +155,14 @@ async def _create_or_update_initial(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Optional[_models.BackupShortTermRetentionPolicy]] = kwargs.pop("cls", None)

content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(parameters, (IO, bytes)):
if isinstance(parameters, (IOBase, bytes)):
_content = parameters
else:
_json = self._serialize.body(parameters, "BackupShortTermRetentionPolicy")
Expand Down Expand Up @@ -346,9 +338,7 @@ async def begin_create_or_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.BackupShortTermRetentionPolicy] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
Expand Down Expand Up @@ -415,16 +405,14 @@ async def _update_initial(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Optional[_models.BackupShortTermRetentionPolicy]] = kwargs.pop("cls", None)

content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(parameters, (IO, bytes)):
if isinstance(parameters, (IOBase, bytes)):
_content = parameters
else:
_json = self._serialize.body(parameters, "BackupShortTermRetentionPolicy")
Expand Down Expand Up @@ -600,9 +588,7 @@ async def begin_update(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.BackupShortTermRetentionPolicy] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
Expand Down Expand Up @@ -672,9 +658,7 @@ def list_by_database(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-02-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-02-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-02-01-preview"))
cls: ClsType[_models.BackupShortTermRetentionPolicyListResult] = kwargs.pop("cls", None)

error_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, Callable, Dict, Optional, TypeVar, Union

from azure.core.exceptions import (
Expand All @@ -28,10 +27,6 @@
from ..._vendor import _convert_request
from ...operations._capabilities_operations import build_list_by_location_request

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -84,9 +79,7 @@ async def list_by_location(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2020-11-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2020-11-01-preview")
)
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview"))
cls: ClsType[_models.LocationCapabilities] = kwargs.pop("cls", None)

request = build_list_by_location_request(
Expand Down
Loading

0 comments on commit 85132dc

Please sign in to comment.