diff --git a/sdk/sql/azure-mgmt-sql/_meta.json b/sdk/sql/azure-mgmt-sql/_meta.json index c3167fcb24eb..6b462d81078c 100644 --- a/sdk/sql/azure-mgmt-sql/_meta.json +++ b/sdk/sql/azure-mgmt-sql/_meta.json @@ -1,11 +1,11 @@ { "autorest": "3.9.2", "use": [ - "@autorest/python@6.1.6", + "@autorest/python@6.1.11", "@autorest/modelerfour@4.24.3" ], - "commit": "14677ba21f6b5676e79b33d699f7a103dd8f255f", + "commit": "0ae1fb5e4c5d90d5224cf40ff10e5d6809eb73d5", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/sql/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.6 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/sql/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.1.11 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/sql/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py index 801cc4f5e015..c78e629b6f08 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "4.0.0b4" +VERSION = "0.9.0" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_backup_short_term_retention_policies_operations.py index b3074c044a4e..f4265b7cf3a8 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_backup_short_term_retention_policies_operations.py @@ -65,7 +65,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], **kwargs: Any ) -> _models.BackupShortTermRetentionPolicy: """Gets a database's short term retention policy. @@ -136,7 +136,7 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: Union[_models.BackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.BackupShortTermRetentionPolicy]: @@ -207,7 +207,7 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: _models.BackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -250,7 +250,7 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -293,7 +293,7 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: Union[_models.BackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.BackupShortTermRetentionPolicy]: @@ -381,7 +381,7 @@ async def _update_initial( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: Union[_models.BackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.BackupShortTermRetentionPolicy]: @@ -452,7 +452,7 @@ async def begin_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: _models.BackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -495,7 +495,7 @@ async def begin_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -538,7 +538,7 @@ async def begin_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: Union[_models.BackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.BackupShortTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_capabilities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_capabilities_operations.py index 2ecaaa23e372..557537603725 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_capabilities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_capabilities_operations.py @@ -52,7 +52,7 @@ def __init__(self, *args, **kwargs) -> None: @distributed_trace_async async def list_by_location( - self, location_name: str, include: Optional[Union[str, "_models.CapabilityGroup"]] = None, **kwargs: Any + self, location_name: str, include: Optional[Union[str, _models.CapabilityGroup]] = None, **kwargs: Any ) -> _models.LocationCapabilities: """Gets the subscription capabilities available for the specified location. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_data_warehouse_user_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_data_warehouse_user_activities_operations.py index 610550de7776..fe6f2db2d78d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_data_warehouse_user_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_data_warehouse_user_activities_operations.py @@ -58,7 +58,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - data_warehouse_user_activity_name: Union[str, "_models.DataWarehouseUserActivityName"], + data_warehouse_user_activity_name: Union[str, _models.DataWarehouseUserActivityName], **kwargs: Any ) -> _models.DataWarehouseUserActivities: """Gets the user activities of a data warehouse which includes running and suspended queries. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_advanced_threat_protection_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_advanced_threat_protection_settings_operations.py index 12577057c602..afbcdbd775d2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_advanced_threat_protection_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_advanced_threat_protection_settings_operations.py @@ -144,7 +144,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], **kwargs: Any ) -> _models.DatabaseAdvancedThreatProtection: """Gets a database's Advanced Threat Protection state. @@ -218,7 +218,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: _models.DatabaseAdvancedThreatProtection, *, content_type: str = "application/json", @@ -254,7 +254,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: IO, *, content_type: str = "application/json", @@ -290,7 +290,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.DatabaseAdvancedThreatProtection, IO], **kwargs: Any ) -> _models.DatabaseAdvancedThreatProtection: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_security_alert_policies_operations.py index 2b71913b14c9..68d3dde9504c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_security_alert_policies_operations.py @@ -62,7 +62,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], **kwargs: Any ) -> _models.DatabaseSecurityAlertPolicy: """Gets a database's security alert policy. @@ -135,7 +135,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: _models.DatabaseSecurityAlertPolicy, *, content_type: str = "application/json", @@ -170,7 +170,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -205,7 +205,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.DatabaseSecurityAlertPolicy, IO], **kwargs: Any ) -> _models.DatabaseSecurityAlertPolicy: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_baselines_operations.py index 3c3b15b163ce..485b5011c941 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_baselines_operations.py @@ -62,7 +62,7 @@ def list_by_sql_vulnerability_assessment( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> AsyncIterable["_models.DatabaseSqlVulnerabilityAssessmentBaselineSet"]: """Gets a list of database's sql vulnerability assessment rule baselines. @@ -155,8 +155,8 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentBaselineSet: """Gets a list of database's sql vulnerability assessment rule baselines. @@ -232,8 +232,8 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: _models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, *, content_type: str = "application/json", @@ -271,8 +271,8 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: IO, *, content_type: str = "application/json", @@ -309,8 +309,8 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: Union[_models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, IO], **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentBaselineSet: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_execute_scan_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_execute_scan_operations.py index 43681829bbd6..5177608cf2d9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_execute_scan_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_execute_scan_operations.py @@ -57,7 +57,7 @@ async def _execute_initial( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: error_map = { @@ -109,7 +109,7 @@ async def begin_execute( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> AsyncLROPoller[None]: """Executes a Vulnerability Assessment database scan. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_rule_baselines_operations.py index c65e2c963da7..932433a91fcb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_rule_baselines_operations.py @@ -63,8 +63,8 @@ def list_by_baseline( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], **kwargs: Any ) -> AsyncIterable["_models.DatabaseSqlVulnerabilityAssessmentRuleBaseline"]: """Gets a list of database's sql vulnerability assessment rule baselines. @@ -160,8 +160,8 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentRuleBaseline: @@ -241,8 +241,8 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: _models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, *, @@ -282,8 +282,8 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: IO, *, @@ -323,8 +323,8 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: Union[_models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, IO], **kwargs: Any @@ -424,8 +424,8 @@ async def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, **kwargs: Any ) -> None: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_scan_result_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_scan_result_operations.py index 4df4a406ab91..0c6add9f33c2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_scan_result_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_scan_result_operations.py @@ -61,7 +61,7 @@ def list_by_scan( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> AsyncIterable["_models.SqlVulnerabilityAssessmentScanResults"]: @@ -158,7 +158,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, scan_result_id: str, **kwargs: Any diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_scans_operations.py index 33a2380af22f..6907c5f23499 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessment_scans_operations.py @@ -61,7 +61,7 @@ def list_by_sql_vulnerability_assessments( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> AsyncIterable["_models.SqlVulnerabilityAssessmentScanRecord"]: """Lists the vulnerability assessment scans of a database. @@ -152,7 +152,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.SqlVulnerabilityAssessmentScanRecord: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessments_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessments_settings_operations.py index 93545cc68dae..73fe81bba96d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessments_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_sql_vulnerability_assessments_settings_operations.py @@ -143,7 +143,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.SqlVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SqlVulnerabilityAssessmentName], **kwargs: Any ) -> _models.SqlVulnerabilityAssessment: """Gets SQL Vulnerability Assessment policy for database. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessment_rule_baselines_operations.py index b21641af5c56..6533413a647f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessment_rule_baselines_operations.py @@ -60,9 +60,9 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentRuleBaseline: """Gets a database's vulnerability assessment rule baseline. @@ -144,9 +144,9 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: _models.DatabaseVulnerabilityAssessmentRuleBaseline, *, content_type: str = "application/json", @@ -188,9 +188,9 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: IO, *, content_type: str = "application/json", @@ -232,9 +232,9 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: Union[_models.DatabaseVulnerabilityAssessmentRuleBaseline, IO], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentRuleBaseline: @@ -335,9 +335,9 @@ async def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], **kwargs: Any ) -> None: """Removes the database's vulnerability assessment rule baseline. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessment_scans_operations.py index 4112e6483d86..ec4de9135115 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessment_scans_operations.py @@ -64,7 +64,7 @@ async def _initiate_scan_initial( # pylint: disable=inconsistent-return-stateme resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> None: @@ -118,7 +118,7 @@ async def begin_initiate_scan( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> AsyncLROPoller[None]: @@ -198,7 +198,7 @@ def list_by_database( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> AsyncIterable["_models.VulnerabilityAssessmentScanRecord"]: """Lists the vulnerability assessment scans of a database. @@ -289,7 +289,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.VulnerabilityAssessmentScanRecord: @@ -366,7 +366,7 @@ async def export( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentScansExport: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessments_operations.py index 2d50ef9b27e5..a9612b09386e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_database_vulnerability_assessments_operations.py @@ -63,7 +63,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessment: """Gets the database's vulnerability assessment. @@ -137,7 +137,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.DatabaseVulnerabilityAssessment, *, content_type: str = "application/json", @@ -173,7 +173,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -209,7 +209,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.DatabaseVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessment: @@ -305,7 +305,7 @@ async def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes the database's vulnerability assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_databases_operations.py index 1f9294f2c972..6fa7be106f4c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_databases_operations.py @@ -1189,7 +1189,7 @@ async def _failover_initial( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> None: error_map = { @@ -1241,7 +1241,7 @@ async def begin_failover( resource_group_name: str, server_name: str, database_name: str, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Failovers a database. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_encryption_protectors_operations.py index 062850c31bd3..2abf8f0bcdfb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_encryption_protectors_operations.py @@ -141,7 +141,7 @@ async def get( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> _models.EncryptionProtector: """Gets a server encryption protector. @@ -209,7 +209,7 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: Union[_models.EncryptionProtector, IO], **kwargs: Any ) -> Optional[_models.EncryptionProtector]: @@ -278,7 +278,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: _models.EncryptionProtector, *, content_type: str = "application/json", @@ -318,7 +318,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: IO, *, content_type: str = "application/json", @@ -358,7 +358,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: Union[_models.EncryptionProtector, IO], **kwargs: Any ) -> AsyncLROPoller[_models.EncryptionProtector]: @@ -442,7 +442,7 @@ async def _revalidate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> None: error_map = { @@ -492,7 +492,7 @@ async def begin_revalidate( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> AsyncLROPoller[None]: """Revalidates an existing encryption protector. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_geo_backup_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_geo_backup_policies_operations.py index e1396ff8a532..44d081ff0367 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_geo_backup_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_geo_backup_policies_operations.py @@ -62,7 +62,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], parameters: _models.GeoBackupPolicy, *, content_type: str = "application/json", @@ -97,7 +97,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -132,7 +132,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], parameters: Union[_models.GeoBackupPolicy, IO], **kwargs: Any ) -> _models.GeoBackupPolicy: @@ -227,7 +227,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], **kwargs: Any ) -> _models.GeoBackupPolicy: """Gets a geo backup policy. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_ledger_digest_uploads_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_ledger_digest_uploads_operations.py index b1284b7f895b..d87798fe1b2d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_ledger_digest_uploads_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_ledger_digest_uploads_operations.py @@ -65,7 +65,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], **kwargs: Any ) -> _models.LedgerDigestUploads: """Gets the current ledger digest upload configuration for a database. @@ -136,7 +136,7 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], parameters: Union[_models.LedgerDigestUploads, IO], **kwargs: Any ) -> Optional[_models.LedgerDigestUploads]: @@ -207,7 +207,7 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], parameters: _models.LedgerDigestUploads, *, content_type: str = "application/json", @@ -250,7 +250,7 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], parameters: IO, *, content_type: str = "application/json", @@ -293,7 +293,7 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], parameters: Union[_models.LedgerDigestUploads, IO], **kwargs: Any ) -> AsyncLROPoller[_models.LedgerDigestUploads]: @@ -460,7 +460,7 @@ async def _disable_initial( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], **kwargs: Any ) -> Optional[_models.LedgerDigestUploads]: error_map = { @@ -518,7 +518,7 @@ async def begin_disable( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], **kwargs: Any ) -> AsyncLROPoller[_models.LedgerDigestUploads]: """Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_backups_operations.py index eeef26709882..0e5a8805c6d9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_backups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_backups_operations.py @@ -756,7 +756,7 @@ def list_by_database( long_term_retention_server_name: str, long_term_retention_database_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.LongTermRetentionBackup"]: """Lists all long term retention backups for a database. @@ -848,7 +848,7 @@ def list_by_location( self, location_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.LongTermRetentionBackup"]: """Lists the long term retention backups for a given location. @@ -935,7 +935,7 @@ def list_by_server( location_name: str, long_term_retention_server_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.LongTermRetentionBackup"]: """Lists the long term retention backups for a given server. @@ -1749,7 +1749,7 @@ def list_by_resource_group_database( long_term_retention_server_name: str, long_term_retention_database_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.LongTermRetentionBackup"]: """Lists all long term retention backups for a database. @@ -1846,7 +1846,7 @@ def list_by_resource_group_location( resource_group_name: str, location_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.LongTermRetentionBackup"]: """Lists the long term retention backups for a given location. @@ -1938,7 +1938,7 @@ def list_by_resource_group_server( location_name: str, long_term_retention_server_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.LongTermRetentionBackup"]: """Lists the long term retention backups for a given server. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_managed_instance_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_managed_instance_backups_operations.py index 50ce69f5a558..f0177116a449 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_managed_instance_backups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_managed_instance_backups_operations.py @@ -253,7 +253,7 @@ def list_by_database( managed_instance_name: str, database_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists all long term retention backups for a managed database. @@ -347,7 +347,7 @@ def list_by_instance( location_name: str, managed_instance_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists the long term retention backups for a given managed instance. @@ -437,7 +437,7 @@ def list_by_location( self, location_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists the long term retention backups for managed databases in a given location. @@ -735,7 +735,7 @@ def list_by_resource_group_database( managed_instance_name: str, database_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists all long term retention backups for a managed database. @@ -834,7 +834,7 @@ def list_by_resource_group_instance( location_name: str, managed_instance_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists the long term retention backups for a given managed instance. @@ -929,7 +929,7 @@ def list_by_resource_group_location( resource_group_name: str, location_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> AsyncIterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists the long term retention backups for managed databases in a given location. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_policies_operations.py index 25424c64d223..0d462bff4517 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_long_term_retention_policies_operations.py @@ -64,7 +64,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], **kwargs: Any ) -> _models.LongTermRetentionPolicy: """Gets a database's long term retention policy. @@ -135,7 +135,7 @@ async def _create_or_update_initial( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], parameters: Union[_models.LongTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.LongTermRetentionPolicy]: @@ -206,7 +206,7 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], parameters: _models.LongTermRetentionPolicy, *, content_type: str = "application/json", @@ -248,7 +248,7 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -290,7 +290,7 @@ async def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], parameters: Union[_models.LongTermRetentionPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.LongTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_backup_short_term_retention_policies_operations.py index e91e2ebe56ad..f7ef897b863c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_backup_short_term_retention_policies_operations.py @@ -65,7 +65,7 @@ async def get( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], **kwargs: Any ) -> _models.ManagedBackupShortTermRetentionPolicy: """Gets a managed database's short term retention policy. @@ -136,7 +136,7 @@ async def _create_or_update_initial( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedBackupShortTermRetentionPolicy]: @@ -207,7 +207,7 @@ async def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -250,7 +250,7 @@ async def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -293,7 +293,7 @@ async def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedBackupShortTermRetentionPolicy]: @@ -381,7 +381,7 @@ async def _update_initial( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedBackupShortTermRetentionPolicy]: @@ -452,7 +452,7 @@ async def begin_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -495,7 +495,7 @@ async def begin_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -538,7 +538,7 @@ async def begin_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedBackupShortTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_advanced_threat_protection_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_advanced_threat_protection_settings_operations.py index 969c7c047277..4036b06ec644 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_advanced_threat_protection_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_advanced_threat_protection_settings_operations.py @@ -144,7 +144,7 @@ async def get( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], **kwargs: Any ) -> _models.ManagedDatabaseAdvancedThreatProtection: """Gets a managed database's Advanced Threat Protection state. @@ -218,7 +218,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: _models.ManagedDatabaseAdvancedThreatProtection, *, content_type: str = "application/json", @@ -254,7 +254,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: IO, *, content_type: str = "application/json", @@ -290,7 +290,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ManagedDatabaseAdvancedThreatProtection, IO], **kwargs: Any ) -> _models.ManagedDatabaseAdvancedThreatProtection: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_queries_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_queries_operations.py index ce55044ed231..06553c5939b6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_queries_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_queries_operations.py @@ -128,7 +128,7 @@ def list_by_query( query_id: str, start_time: Optional[str] = None, end_time: Optional[str] = None, - interval: Optional[Union[str, "_models.QueryTimeGrainType"]] = None, + interval: Optional[Union[str, _models.QueryTimeGrainType]] = None, **kwargs: Any ) -> AsyncIterable["_models.QueryStatistics"]: """Get query execution statistics by query id. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_restore_details_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_restore_details_operations.py index 9a82bc8e61b8..72ab0097de31 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_restore_details_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_restore_details_operations.py @@ -56,7 +56,7 @@ async def get( resource_group_name: str, managed_instance_name: str, database_name: str, - restore_details_name: Union[str, "_models.RestoreDetailsName"], + restore_details_name: Union[str, _models.RestoreDetailsName], **kwargs: Any ) -> _models.ManagedDatabaseRestoreDetailsResult: """Gets managed database restore details. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_security_alert_policies_operations.py index ccbc4aa8d7a2..d69106c98a51 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_security_alert_policies_operations.py @@ -62,7 +62,7 @@ async def get( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], **kwargs: Any ) -> _models.ManagedDatabaseSecurityAlertPolicy: """Gets a managed database's security alert policy. @@ -135,7 +135,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: _models.ManagedDatabaseSecurityAlertPolicy, *, content_type: str = "application/json", @@ -170,7 +170,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -205,7 +205,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ManagedDatabaseSecurityAlertPolicy, IO], **kwargs: Any ) -> _models.ManagedDatabaseSecurityAlertPolicy: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_sensitivity_labels_operations.py index 70f33c66711c..a1bf1335b2fb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_sensitivity_labels_operations.py @@ -70,7 +70,7 @@ async def get( schema_name: str, table_name: str, column_name: str, - sensitivity_label_source: Union[str, "_models.SensitivityLabelSource"], + sensitivity_label_source: Union[str, _models.SensitivityLabelSource], **kwargs: Any ) -> _models.SensitivityLabel: """Gets the sensitivity label of a given column. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_transparent_data_encryption_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_transparent_data_encryption_operations.py index 5b05078dc69e..042e8e23f51a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_transparent_data_encryption_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_transparent_data_encryption_operations.py @@ -62,7 +62,7 @@ async def get( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], **kwargs: Any ) -> _models.ManagedTransparentDataEncryption: """Gets a managed database's transparent data encryption. @@ -135,7 +135,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: _models.ManagedTransparentDataEncryption, *, content_type: str = "application/json", @@ -170,7 +170,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: IO, *, content_type: str = "application/json", @@ -205,7 +205,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: Union[_models.ManagedTransparentDataEncryption, IO], **kwargs: Any ) -> _models.ManagedTransparentDataEncryption: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py index abedc8ec1da3..e45234e792a7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py @@ -60,9 +60,9 @@ async def get( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentRuleBaseline: """Gets a database's vulnerability assessment rule baseline. @@ -144,9 +144,9 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: _models.DatabaseVulnerabilityAssessmentRuleBaseline, *, content_type: str = "application/json", @@ -188,9 +188,9 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: IO, *, content_type: str = "application/json", @@ -232,9 +232,9 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: Union[_models.DatabaseVulnerabilityAssessmentRuleBaseline, IO], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentRuleBaseline: @@ -335,9 +335,9 @@ async def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], **kwargs: Any ) -> None: """Removes the database's vulnerability assessment rule baseline. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessment_scans_operations.py index ca66915f759f..f96b79a47be3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessment_scans_operations.py @@ -64,7 +64,7 @@ async def _initiate_scan_initial( # pylint: disable=inconsistent-return-stateme resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> None: @@ -118,7 +118,7 @@ async def begin_initiate_scan( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> AsyncLROPoller[None]: @@ -198,7 +198,7 @@ async def export( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentScansExport: @@ -279,7 +279,7 @@ def list_by_database( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> AsyncIterable["_models.VulnerabilityAssessmentScanRecord"]: """Lists the vulnerability assessment scans of a database. @@ -370,7 +370,7 @@ async def get( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.VulnerabilityAssessmentScanRecord: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessments_operations.py index f87d46204062..b01509a685fd 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_database_vulnerability_assessments_operations.py @@ -63,7 +63,7 @@ async def get( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessment: """Gets the database's vulnerability assessment. @@ -137,7 +137,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.DatabaseVulnerabilityAssessment, *, content_type: str = "application/json", @@ -173,7 +173,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -209,7 +209,7 @@ async def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.DatabaseVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessment: @@ -305,7 +305,7 @@ async def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes the database's vulnerability assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_administrators_operations.py index 02b1e836c78f..38fd964e571a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_administrators_operations.py @@ -143,7 +143,7 @@ async def get( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> _models.ManagedInstanceAdministrator: """Gets a managed instance administrator. @@ -210,7 +210,7 @@ async def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: Union[_models.ManagedInstanceAdministrator, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceAdministrator]: @@ -282,7 +282,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: _models.ManagedInstanceAdministrator, *, content_type: str = "application/json", @@ -321,7 +321,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: IO, *, content_type: str = "application/json", @@ -360,7 +360,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: Union[_models.ManagedInstanceAdministrator, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedInstanceAdministrator]: @@ -443,7 +443,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> None: error_map = { @@ -493,7 +493,7 @@ async def begin_delete( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a managed instance administrator. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_advanced_threat_protection_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_advanced_threat_protection_settings_operations.py index 8d758a97a151..611c22511915 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_advanced_threat_protection_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_advanced_threat_protection_settings_operations.py @@ -142,7 +142,7 @@ async def get( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], **kwargs: Any ) -> _models.ManagedInstanceAdvancedThreatProtection: """Get a managed instance's Advanced Threat Protection state. @@ -211,7 +211,7 @@ async def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ManagedInstanceAdvancedThreatProtection, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceAdvancedThreatProtection]: @@ -280,7 +280,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: _models.ManagedInstanceAdvancedThreatProtection, *, content_type: str = "application/json", @@ -322,7 +322,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: IO, *, content_type: str = "application/json", @@ -364,7 +364,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ManagedInstanceAdvancedThreatProtection, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedInstanceAdvancedThreatProtection]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_azure_ad_only_authentications_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_azure_ad_only_authentications_operations.py index fdc38dadaf5c..95ba35eecbbc 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_azure_ad_only_authentications_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_azure_ad_only_authentications_operations.py @@ -64,7 +64,7 @@ async def get( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> _models.ManagedInstanceAzureADOnlyAuthentication: """Gets a specific Azure Active Directory only authentication property. @@ -132,7 +132,7 @@ async def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: Union[_models.ManagedInstanceAzureADOnlyAuthentication, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceAzureADOnlyAuthentication]: @@ -204,7 +204,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: _models.ManagedInstanceAzureADOnlyAuthentication, *, content_type: str = "application/json", @@ -247,7 +247,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: IO, *, content_type: str = "application/json", @@ -290,7 +290,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: Union[_models.ManagedInstanceAzureADOnlyAuthentication, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedInstanceAzureADOnlyAuthentication]: @@ -376,7 +376,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> None: error_map = { @@ -426,7 +426,7 @@ async def begin_delete( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing server Active Directory only authentication property. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_dtcs_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_dtcs_operations.py index 9dd4ad2e0cc1..9d79d629431b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_dtcs_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_dtcs_operations.py @@ -137,11 +137,7 @@ async def get_next(next_link=None): @distributed_trace_async async def get( - self, - resource_group_name: str, - managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], - **kwargs: Any + self, resource_group_name: str, managed_instance_name: str, dtc_name: Union[str, _models.DtcName], **kwargs: Any ) -> _models.ManagedInstanceDtc: """Gets managed instance DTC settings. @@ -207,7 +203,7 @@ async def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], parameters: Union[_models.ManagedInstanceDtc, IO], **kwargs: Any ) -> _models.ManagedInstanceDtc: @@ -274,7 +270,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], parameters: _models.ManagedInstanceDtc, *, content_type: str = "application/json", @@ -313,7 +309,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], parameters: IO, *, content_type: str = "application/json", @@ -352,7 +348,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], parameters: Union[_models.ManagedInstanceDtc, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedInstanceDtc]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_encryption_protectors_operations.py index fe5dcd5ad5cf..0d0d44464da1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_encryption_protectors_operations.py @@ -63,7 +63,7 @@ async def _revalidate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> None: error_map = { @@ -113,7 +113,7 @@ async def begin_revalidate( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> AsyncLROPoller[None]: """Revalidates an existing encryption protector. @@ -264,7 +264,7 @@ async def get( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> _models.ManagedInstanceEncryptionProtector: """Gets a managed instance encryption protector. @@ -332,7 +332,7 @@ async def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: Union[_models.ManagedInstanceEncryptionProtector, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceEncryptionProtector]: @@ -401,7 +401,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: _models.ManagedInstanceEncryptionProtector, *, content_type: str = "application/json", @@ -442,7 +442,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: IO, *, content_type: str = "application/json", @@ -483,7 +483,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: Union[_models.ManagedInstanceEncryptionProtector, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedInstanceEncryptionProtector]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_long_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_long_term_retention_policies_operations.py index 0395f0a6107b..4209df8362f5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_long_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_long_term_retention_policies_operations.py @@ -64,7 +64,7 @@ async def get( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], **kwargs: Any ) -> _models.ManagedInstanceLongTermRetentionPolicy: """Gets a managed database's long term retention policy. @@ -135,7 +135,7 @@ async def _create_or_update_initial( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], parameters: Union[_models.ManagedInstanceLongTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceLongTermRetentionPolicy]: @@ -206,7 +206,7 @@ async def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], parameters: _models.ManagedInstanceLongTermRetentionPolicy, *, content_type: str = "application/json", @@ -249,7 +249,7 @@ async def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -292,7 +292,7 @@ async def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], parameters: Union[_models.ManagedInstanceLongTermRetentionPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedInstanceLongTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_vulnerability_assessments_operations.py index 336a99acdff3..b0aea4a62ddc 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instance_vulnerability_assessments_operations.py @@ -62,7 +62,7 @@ async def get( self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> _models.ManagedInstanceVulnerabilityAssessment: """Gets the managed instance's vulnerability assessment. @@ -132,7 +132,7 @@ async def create_or_update( self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.ManagedInstanceVulnerabilityAssessment, *, content_type: str = "application/json", @@ -167,7 +167,7 @@ async def create_or_update( self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -202,7 +202,7 @@ async def create_or_update( self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.ManagedInstanceVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.ManagedInstanceVulnerabilityAssessment: @@ -296,7 +296,7 @@ async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes the managed instance's vulnerability assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instances_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instances_operations.py index 098069175862..4551fc5986e3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instances_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_instances_operations.py @@ -912,9 +912,9 @@ def list_by_managed_instance( databases: Optional[str] = None, start_time: Optional[str] = None, end_time: Optional[str] = None, - interval: Optional[Union[str, "_models.QueryTimeGrainType"]] = None, - aggregation_function: Optional[Union[str, "_models.AggregationFunctionType"]] = None, - observation_metric: Optional[Union[str, "_models.MetricType"]] = None, + interval: Optional[Union[str, _models.QueryTimeGrainType]] = None, + aggregation_function: Optional[Union[str, _models.AggregationFunctionType]] = None, + observation_metric: Optional[Union[str, _models.MetricType]] = None, **kwargs: Any ) -> AsyncIterable["_models.TopQueries"]: """Get top resource consuming queries of a managed instance. @@ -1020,7 +1020,7 @@ async def _failover_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> None: error_map = { @@ -1070,7 +1070,7 @@ async def begin_failover( self, resource_group_name: str, managed_instance_name: str, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Failovers a managed instance. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py index ae9255ddff34..b9459d68cd83 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py @@ -65,7 +65,7 @@ async def get( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], **kwargs: Any ) -> _models.ManagedBackupShortTermRetentionPolicy: """Gets a dropped database's short term retention policy. @@ -136,7 +136,7 @@ async def _create_or_update_initial( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedBackupShortTermRetentionPolicy]: @@ -207,7 +207,7 @@ async def begin_create_or_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -250,7 +250,7 @@ async def begin_create_or_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -293,7 +293,7 @@ async def begin_create_or_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedBackupShortTermRetentionPolicy]: @@ -381,7 +381,7 @@ async def _update_initial( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedBackupShortTermRetentionPolicy]: @@ -452,7 +452,7 @@ async def begin_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -495,7 +495,7 @@ async def begin_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -538,7 +538,7 @@ async def begin_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedBackupShortTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_server_security_alert_policies_operations.py index 39cf616805c2..018bea16a16f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_managed_server_security_alert_policies_operations.py @@ -63,7 +63,7 @@ async def get( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], **kwargs: Any ) -> _models.ManagedServerSecurityAlertPolicy: """Get a managed server's threat detection policy. @@ -130,7 +130,7 @@ async def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ManagedServerSecurityAlertPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedServerSecurityAlertPolicy]: @@ -199,7 +199,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: _models.ManagedServerSecurityAlertPolicy, *, content_type: str = "application/json", @@ -239,7 +239,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -279,7 +279,7 @@ async def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ManagedServerSecurityAlertPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ManagedServerSecurityAlertPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sensitivity_labels_operations.py index 97d11f904252..639279ad79b2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sensitivity_labels_operations.py @@ -572,7 +572,7 @@ async def get( schema_name: str, table_name: str, column_name: str, - sensitivity_label_source: Union[str, "_models.SensitivityLabelSource"], + sensitivity_label_source: Union[str, _models.SensitivityLabelSource], **kwargs: Any ) -> _models.SensitivityLabel: """Gets the sensitivity label of a given column. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_advanced_threat_protection_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_advanced_threat_protection_settings_operations.py index 7e1db336b54e..96183f40e8b3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_advanced_threat_protection_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_advanced_threat_protection_settings_operations.py @@ -142,7 +142,7 @@ async def get( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], **kwargs: Any ) -> _models.ServerAdvancedThreatProtection: """Get a server's Advanced Threat Protection state. @@ -211,7 +211,7 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ServerAdvancedThreatProtection, IO], **kwargs: Any ) -> Optional[_models.ServerAdvancedThreatProtection]: @@ -280,7 +280,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: _models.ServerAdvancedThreatProtection, *, content_type: str = "application/json", @@ -322,7 +322,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: IO, *, content_type: str = "application/json", @@ -364,7 +364,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ServerAdvancedThreatProtection, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ServerAdvancedThreatProtection]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_administrators_operations.py index ac353abc06f3..969dd23a8147 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_administrators_operations.py @@ -64,7 +64,7 @@ async def get( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> _models.ServerAzureADAdministrator: """Gets a Azure Active Directory administrator. @@ -132,7 +132,7 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: Union[_models.ServerAzureADAdministrator, IO], **kwargs: Any ) -> Optional[_models.ServerAzureADAdministrator]: @@ -204,7 +204,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: _models.ServerAzureADAdministrator, *, content_type: str = "application/json", @@ -244,7 +244,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: IO, *, content_type: str = "application/json", @@ -284,7 +284,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: Union[_models.ServerAzureADAdministrator, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ServerAzureADAdministrator]: @@ -368,7 +368,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> None: error_map = { @@ -418,7 +418,7 @@ async def begin_delete( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the Azure Active Directory administrator with the given name. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_only_authentications_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_only_authentications_operations.py index 32279e2e724c..fa3db284120b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_only_authentications_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_only_authentications_operations.py @@ -64,7 +64,7 @@ async def get( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> _models.ServerAzureADOnlyAuthentication: """Gets a specific Azure Active Directory only authentication property. @@ -132,7 +132,7 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: Union[_models.ServerAzureADOnlyAuthentication, IO], **kwargs: Any ) -> Optional[_models.ServerAzureADOnlyAuthentication]: @@ -204,7 +204,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: _models.ServerAzureADOnlyAuthentication, *, content_type: str = "application/json", @@ -247,7 +247,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: IO, *, content_type: str = "application/json", @@ -290,7 +290,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: Union[_models.ServerAzureADOnlyAuthentication, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ServerAzureADOnlyAuthentication]: @@ -376,7 +376,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> None: error_map = { @@ -426,7 +426,7 @@ async def begin_delete( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing server Active Directory only authentication property. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_connection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_connection_policies_operations.py index e9289bb9f412..e4d633b6be69 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_connection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_connection_policies_operations.py @@ -63,7 +63,7 @@ async def get( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], **kwargs: Any ) -> _models.ServerConnectionPolicy: """Gets a server connection policy. @@ -130,7 +130,7 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], parameters: Union[_models.ServerConnectionPolicy, IO], **kwargs: Any ) -> Optional[_models.ServerConnectionPolicy]: @@ -199,7 +199,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], parameters: _models.ServerConnectionPolicy, *, content_type: str = "application/json", @@ -238,7 +238,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -277,7 +277,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], parameters: Union[_models.ServerConnectionPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ServerConnectionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_dev_ops_audit_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_dev_ops_audit_settings_operations.py index 82a12a051d76..3f59922fd036 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_dev_ops_audit_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_dev_ops_audit_settings_operations.py @@ -58,9 +58,92 @@ def __init__(self, *args, **kwargs) -> None: self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace + def list_by_server( + self, resource_group_name: str, server_name: str, **kwargs: Any + ) -> AsyncIterable["_models.ServerDevOpsAuditingSettings"]: + """Lists DevOps audit settings of a server. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. Required. + :type resource_group_name: str + :param server_name: The name of the server. Required. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServerDevOpsAuditingSettings or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.sql.models.ServerDevOpsAuditingSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ServerDevOpsAuditSettingsListResult] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_server_request( + resource_group_name=resource_group_name, + server_name=server_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_server.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ServerDevOpsAuditSettingsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_server.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings"} # type: ignore + @distributed_trace_async async def get( - self, resource_group_name: str, server_name: str, dev_ops_auditing_settings_name: str, **kwargs: Any + self, + resource_group_name: str, + server_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], + **kwargs: Any ) -> _models.ServerDevOpsAuditingSettings: """Gets a server's DevOps audit settings. @@ -69,9 +152,8 @@ async def get( :type resource_group_name: str :param server_name: The name of the server. Required. :type server_name: str - :param dev_ops_auditing_settings_name: The name of the devops audit settings. This should - always be 'default'. Required. - :type dev_ops_auditing_settings_name: str + :param dev_ops_auditing_settings_name: "Default" Required. + :type dev_ops_auditing_settings_name: str or ~azure.mgmt.sql.models.DevOpsAuditingSettingsName :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerDevOpsAuditingSettings or the result of cls(response) :rtype: ~azure.mgmt.sql.models.ServerDevOpsAuditingSettings @@ -88,7 +170,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str cls = kwargs.pop("cls", None) # type: ClsType[_models.ServerDevOpsAuditingSettings] request = build_get_request( @@ -127,7 +209,7 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - dev_ops_auditing_settings_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], parameters: Union[_models.ServerDevOpsAuditingSettings, IO], **kwargs: Any ) -> Optional[_models.ServerDevOpsAuditingSettings]: @@ -142,7 +224,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ServerDevOpsAuditingSettings]] @@ -196,7 +278,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - dev_ops_auditing_settings_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], parameters: _models.ServerDevOpsAuditingSettings, *, content_type: str = "application/json", @@ -209,9 +291,8 @@ async def begin_create_or_update( :type resource_group_name: str :param server_name: The name of the server. Required. :type server_name: str - :param dev_ops_auditing_settings_name: The name of the devops audit settings. This should - always be 'default'. Required. - :type dev_ops_auditing_settings_name: str + :param dev_ops_auditing_settings_name: "Default" Required. + :type dev_ops_auditing_settings_name: str or ~azure.mgmt.sql.models.DevOpsAuditingSettingsName :param parameters: Properties of DevOps audit settings. Required. :type parameters: ~azure.mgmt.sql.models.ServerDevOpsAuditingSettings :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. @@ -236,7 +317,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - dev_ops_auditing_settings_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], parameters: IO, *, content_type: str = "application/json", @@ -249,9 +330,8 @@ async def begin_create_or_update( :type resource_group_name: str :param server_name: The name of the server. Required. :type server_name: str - :param dev_ops_auditing_settings_name: The name of the devops audit settings. This should - always be 'default'. Required. - :type dev_ops_auditing_settings_name: str + :param dev_ops_auditing_settings_name: "Default" Required. + :type dev_ops_auditing_settings_name: str or ~azure.mgmt.sql.models.DevOpsAuditingSettingsName :param parameters: Properties of DevOps audit settings. Required. :type parameters: IO :keyword content_type: Body Parameter content-type. Content type parameter for binary body. @@ -276,7 +356,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - dev_ops_auditing_settings_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], parameters: Union[_models.ServerDevOpsAuditingSettings, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ServerDevOpsAuditingSettings]: @@ -287,9 +367,8 @@ async def begin_create_or_update( :type resource_group_name: str :param server_name: The name of the server. Required. :type server_name: str - :param dev_ops_auditing_settings_name: The name of the devops audit settings. This should - always be 'default'. Required. - :type dev_ops_auditing_settings_name: str + :param dev_ops_auditing_settings_name: "Default" Required. + :type dev_ops_auditing_settings_name: str or ~azure.mgmt.sql.models.DevOpsAuditingSettingsName :param parameters: Properties of DevOps audit settings. Is either a model type or a IO type. Required. :type parameters: ~azure.mgmt.sql.models.ServerDevOpsAuditingSettings or IO @@ -312,7 +391,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 = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] cls = kwargs.pop("cls", None) # type: ClsType[_models.ServerDevOpsAuditingSettings] polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] @@ -358,82 +437,3 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}"} # type: ignore - - @distributed_trace - def list_by_server( - self, resource_group_name: str, server_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ServerDevOpsAuditingSettings"]: - """Lists DevOps audit settings of a server. - - :param resource_group_name: The name of the resource group that contains the resource. You can - obtain this value from the Azure Resource Manager API or the portal. Required. - :type resource_group_name: str - :param server_name: The name of the server. Required. - :type server_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ServerDevOpsAuditingSettings or the result of - cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.sql.models.ServerDevOpsAuditingSettings] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str - cls = kwargs.pop("cls", None) # type: ClsType[_models.ServerDevOpsAuditSettingsListResult] - - error_map = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_server_request( - resource_group_name=resource_group_name, - server_name=server_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=self.list_by_server.metadata["url"], - headers=_headers, - params=_params, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) # type: ignore - - else: - request = HttpRequest("GET", next_link) - request = _convert_request(request) - request.url = self._client.format_url(request.url) # type: ignore - request.method = "GET" - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("ServerDevOpsAuditSettingsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, stream=False, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged(get_next, extract_data) - - list_by_server.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings"} # type: ignore diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_security_alert_policies_operations.py index a33930b912d5..f6b166c5da3f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_security_alert_policies_operations.py @@ -63,7 +63,7 @@ async def get( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], **kwargs: Any ) -> _models.ServerSecurityAlertPolicy: """Get a server's security alert policy. @@ -130,7 +130,7 @@ async def _create_or_update_initial( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ServerSecurityAlertPolicy, IO], **kwargs: Any ) -> Optional[_models.ServerSecurityAlertPolicy]: @@ -199,7 +199,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: _models.ServerSecurityAlertPolicy, *, content_type: str = "application/json", @@ -238,7 +238,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -277,7 +277,7 @@ async def begin_create_or_update( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ServerSecurityAlertPolicy, IO], **kwargs: Any ) -> AsyncLROPoller[_models.ServerSecurityAlertPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_vulnerability_assessments_operations.py index 651d0c156799..68ea2bbdca20 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_vulnerability_assessments_operations.py @@ -62,7 +62,7 @@ async def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> _models.ServerVulnerabilityAssessment: """Gets the server's vulnerability assessment. @@ -132,7 +132,7 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.ServerVulnerabilityAssessment, *, content_type: str = "application/json", @@ -167,7 +167,7 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -202,7 +202,7 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.ServerVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.ServerVulnerabilityAssessment: @@ -296,7 +296,7 @@ async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes the server's vulnerability assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_baseline_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_baseline_operations.py index ae2427df6fe2..147fdbaf1d2d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_baseline_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_baseline_operations.py @@ -60,7 +60,7 @@ def list_by_sql_vulnerability_assessment( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> AsyncIterable["_models.DatabaseSqlVulnerabilityAssessmentBaselineSet"]: """Gets a list of database's sql vulnerability assessment rule baselines. @@ -156,8 +156,8 @@ async def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentBaselineSet: """Gets a list of database's sql vulnerability assessment rule baselines. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_baselines_operations.py index 4247c19a189b..97cb7b6f988a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_baselines_operations.py @@ -55,8 +55,8 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: _models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, *, content_type: str = "application/json", @@ -94,8 +94,8 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: IO, *, content_type: str = "application/json", @@ -132,8 +132,8 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: Union[_models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, IO], **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentBaselineSet: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_execute_scan_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_execute_scan_operations.py index eaab147a36cc..e6249138e760 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_execute_scan_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_execute_scan_operations.py @@ -56,7 +56,7 @@ async def _execute_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: error_map = { @@ -110,7 +110,7 @@ async def begin_execute( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> AsyncLROPoller[None]: """Executes a Vulnerability Assessment database scan. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_rule_baseline_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_rule_baseline_operations.py index 62450c0fd8af..eaaa0ab6e584 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_rule_baseline_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_rule_baseline_operations.py @@ -61,8 +61,8 @@ def list_by_baseline( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], **kwargs: Any ) -> AsyncIterable["_models.DatabaseSqlVulnerabilityAssessmentRuleBaseline"]: """Gets a system database's sql vulnerability assessment rule baseline. @@ -161,8 +161,8 @@ async def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentRuleBaseline: @@ -245,8 +245,8 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: _models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, *, @@ -286,8 +286,8 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: IO, *, @@ -327,8 +327,8 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: Union[_models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, IO], **kwargs: Any diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_rule_baselines_operations.py index d93b8008701f..b0693c0fd4f6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_rule_baselines_operations.py @@ -55,8 +55,8 @@ async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, **kwargs: Any ) -> None: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_scan_result_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_scan_result_operations.py index aa2997509234..e68d0c99b127 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_scan_result_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_scan_result_operations.py @@ -60,7 +60,7 @@ def list_by_scan( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> AsyncIterable["_models.SqlVulnerabilityAssessmentScanResults"]: @@ -160,7 +160,7 @@ async def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, scan_result_id: str, **kwargs: Any diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_scans_operations.py index 379fe56152cf..3f92fa9936f0 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessment_scans_operations.py @@ -60,7 +60,7 @@ def list_by_sql_vulnerability_assessments( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> AsyncIterable["_models.SqlVulnerabilityAssessmentScanRecord"]: """Lists the vulnerability assessment scans of a database. @@ -154,7 +154,7 @@ async def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.SqlVulnerabilityAssessmentScanRecord: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessments_operations.py index 9d9187ae003b..cc06a9c0e914 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessments_operations.py @@ -55,7 +55,7 @@ async def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes SQL Vulnerability Assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessments_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessments_settings_operations.py index 0facd1664300..0bf84d1b6bc1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessments_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sql_vulnerability_assessments_settings_operations.py @@ -140,7 +140,7 @@ async def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.SqlVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SqlVulnerabilityAssessmentName], **kwargs: Any ) -> _models.SqlVulnerabilityAssessment: """Gets SQL Vulnerability Assessment policy. @@ -210,7 +210,7 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.SqlVulnerabilityAssessment, *, content_type: str = "application/json", @@ -242,7 +242,7 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -274,7 +274,7 @@ async def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.SqlVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.SqlVulnerabilityAssessment: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sync_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sync_groups_operations.py index aaf7d0c61a5b..c35a2bc777b2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sync_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_sync_groups_operations.py @@ -351,7 +351,7 @@ def list_logs( sync_group_name: str, start_time: str, end_time: str, - type: Union[str, "_models.SyncGroupsType"], + type: Union[str, _models.SyncGroupsType], continuation_token_parameter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.SyncGroupLogProperties"]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_transparent_data_encryptions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_transparent_data_encryptions_operations.py index 951afb1d3b54..a3ae17c22483 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_transparent_data_encryptions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_transparent_data_encryptions_operations.py @@ -62,7 +62,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], **kwargs: Any ) -> _models.LogicalDatabaseTransparentDataEncryption: """Gets a logical database's transparent data encryption. @@ -135,7 +135,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: _models.LogicalDatabaseTransparentDataEncryption, *, content_type: str = "application/json", @@ -170,7 +170,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: IO, *, content_type: str = "application/json", @@ -205,7 +205,7 @@ async def create_or_update( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: Union[_models.LogicalDatabaseTransparentDataEncryption, IO], **kwargs: Any ) -> Optional[_models.LogicalDatabaseTransparentDataEncryption]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py index 58cc66808ac0..097acf993df3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/__init__.py @@ -436,6 +436,7 @@ from ._sql_management_client_enums import DatabaseState from ._sql_management_client_enums import DatabaseStatus from ._sql_management_client_enums import DayOfWeek +from ._sql_management_client_enums import DevOpsAuditingSettingsName from ._sql_management_client_enums import DiffBackupIntervalInHours from ._sql_management_client_enums import DtcName from ._sql_management_client_enums import ElasticPoolLicenseType @@ -977,6 +978,7 @@ "DatabaseState", "DatabaseStatus", "DayOfWeek", + "DevOpsAuditingSettingsName", "DiffBackupIntervalInHours", "DtcName", "ElasticPoolLicenseType", diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py index 29529b71c9bd..d0d0e0776df5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models_py3.py @@ -16872,6 +16872,9 @@ class ServerDevOpsAuditingSettings(ProxyResource): `_ or `Diagnostic Settings PowerShell `_. :vartype is_azure_monitor_target_enabled: bool + :ivar is_managed_identity_in_use: Specifies whether Managed Identity is used to access blob + storage. + :vartype is_managed_identity_in_use: bool :ivar state: Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Known values are: "Enabled" and "Disabled". :vartype state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState @@ -16909,6 +16912,7 @@ class ServerDevOpsAuditingSettings(ProxyResource): "type": {"key": "type", "type": "str"}, "system_data": {"key": "systemData", "type": "SystemData"}, "is_azure_monitor_target_enabled": {"key": "properties.isAzureMonitorTargetEnabled", "type": "bool"}, + "is_managed_identity_in_use": {"key": "properties.isManagedIdentityInUse", "type": "bool"}, "state": {"key": "properties.state", "type": "str"}, "storage_endpoint": {"key": "properties.storageEndpoint", "type": "str"}, "storage_account_access_key": {"key": "properties.storageAccountAccessKey", "type": "str"}, @@ -16919,6 +16923,7 @@ def __init__( self, *, is_azure_monitor_target_enabled: Optional[bool] = None, + is_managed_identity_in_use: Optional[bool] = None, state: Optional[Union[str, "_models.BlobAuditingPolicyState"]] = None, storage_endpoint: Optional[str] = None, storage_account_access_key: Optional[str] = None, @@ -16942,6 +16947,9 @@ def __init__( `_ or `Diagnostic Settings PowerShell `_. :paramtype is_azure_monitor_target_enabled: bool + :keyword is_managed_identity_in_use: Specifies whether Managed Identity is used to access blob + storage. + :paramtype is_managed_identity_in_use: bool :keyword state: Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Known values are: "Enabled" and "Disabled". :paramtype state: str or ~azure.mgmt.sql.models.BlobAuditingPolicyState @@ -16969,6 +16977,7 @@ def __init__( super().__init__(**kwargs) self.system_data = None self.is_azure_monitor_target_enabled = is_azure_monitor_target_enabled + self.is_managed_identity_in_use = is_managed_identity_in_use self.state = state self.storage_endpoint = storage_endpoint self.storage_account_access_key = storage_account_access_key diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py index 1e49b3e67734..7c254026bc8e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_sql_management_client_enums.py @@ -408,6 +408,12 @@ class DayOfWeek(str, Enum, metaclass=CaseInsensitiveEnumMeta): SATURDAY = "Saturday" +class DevOpsAuditingSettingsName(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """DevOpsAuditingSettingsName.""" + + DEFAULT = "Default" + + class DiffBackupIntervalInHours(int, Enum, metaclass=CaseInsensitiveEnumMeta): """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 diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py index 282f79aff7d2..9b7e1ea41030 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_backup_short_term_retention_policies_operations.py @@ -41,7 +41,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -79,7 +79,7 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -120,7 +120,7 @@ def build_update_request( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -214,7 +214,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], **kwargs: Any ) -> _models.BackupShortTermRetentionPolicy: """Gets a database's short term retention policy. @@ -285,7 +285,7 @@ def _create_or_update_initial( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: Union[_models.BackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.BackupShortTermRetentionPolicy]: @@ -356,7 +356,7 @@ def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: _models.BackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -398,7 +398,7 @@ def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -440,7 +440,7 @@ def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: Union[_models.BackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> LROPoller[_models.BackupShortTermRetentionPolicy]: @@ -527,7 +527,7 @@ def _update_initial( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: Union[_models.BackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.BackupShortTermRetentionPolicy]: @@ -598,7 +598,7 @@ def begin_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: _models.BackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -640,7 +640,7 @@ def begin_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -682,7 +682,7 @@ def begin_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.ShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ShortTermRetentionPolicyName], parameters: Union[_models.BackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> LROPoller[_models.BackupShortTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py index 0223cb26f8cc..2f3e28f35180 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_capabilities_operations.py @@ -38,7 +38,7 @@ def build_list_by_location_request( location_name: str, subscription_id: str, *, - include: Optional[Union[str, "_models.CapabilityGroup"]] = None, + include: Optional[Union[str, _models.CapabilityGroup]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -90,7 +90,7 @@ def __init__(self, *args, **kwargs): @distributed_trace def list_by_location( - self, location_name: str, include: Optional[Union[str, "_models.CapabilityGroup"]] = None, **kwargs: Any + self, location_name: str, include: Optional[Union[str, _models.CapabilityGroup]] = None, **kwargs: Any ) -> _models.LocationCapabilities: """Gets the subscription capabilities available for the specified location. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_warehouse_user_activities_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_warehouse_user_activities_operations.py index 69e2059c9260..596d752f6da9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_warehouse_user_activities_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_data_warehouse_user_activities_operations.py @@ -39,7 +39,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - data_warehouse_user_activity_name: Union[str, "_models.DataWarehouseUserActivityName"], + data_warehouse_user_activity_name: Union[str, _models.DataWarehouseUserActivityName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -132,7 +132,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - data_warehouse_user_activity_name: Union[str, "_models.DataWarehouseUserActivityName"], + data_warehouse_user_activity_name: Union[str, _models.DataWarehouseUserActivityName], **kwargs: Any ) -> _models.DataWarehouseUserActivities: """Gets the user activities of a data warehouse which includes running and suspended queries. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_advanced_threat_protection_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_advanced_threat_protection_settings_operations.py index 1f4d908c67bc..84758871f183 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_advanced_threat_protection_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_advanced_threat_protection_settings_operations.py @@ -71,7 +71,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -111,7 +111,7 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -256,7 +256,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], **kwargs: Any ) -> _models.DatabaseAdvancedThreatProtection: """Gets a database's Advanced Threat Protection state. @@ -330,7 +330,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: _models.DatabaseAdvancedThreatProtection, *, content_type: str = "application/json", @@ -366,7 +366,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: IO, *, content_type: str = "application/json", @@ -402,7 +402,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.DatabaseAdvancedThreatProtection, IO], **kwargs: Any ) -> _models.DatabaseAdvancedThreatProtection: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_security_alert_policies_operations.py index db04c880fd57..38e0c40f48cf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_security_alert_policies_operations.py @@ -39,7 +39,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -77,7 +77,7 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -171,7 +171,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], **kwargs: Any ) -> _models.DatabaseSecurityAlertPolicy: """Gets a database's security alert policy. @@ -244,7 +244,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: _models.DatabaseSecurityAlertPolicy, *, content_type: str = "application/json", @@ -279,7 +279,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -314,7 +314,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.DatabaseSecurityAlertPolicy, IO], **kwargs: Any ) -> _models.DatabaseSecurityAlertPolicy: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_baselines_operations.py index 95024b5b5094..c69833643812 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_baselines_operations.py @@ -39,7 +39,7 @@ def build_list_by_sql_vulnerability_assessment_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -79,8 +79,8 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -121,8 +121,8 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -187,7 +187,7 @@ def list_by_sql_vulnerability_assessment( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> Iterable["_models.DatabaseSqlVulnerabilityAssessmentBaselineSet"]: """Gets a list of database's sql vulnerability assessment rule baselines. @@ -280,8 +280,8 @@ def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentBaselineSet: """Gets a list of database's sql vulnerability assessment rule baselines. @@ -357,8 +357,8 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: _models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, *, content_type: str = "application/json", @@ -396,8 +396,8 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: IO, *, content_type: str = "application/json", @@ -434,8 +434,8 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: Union[_models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, IO], **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentBaselineSet: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_execute_scan_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_execute_scan_operations.py index bf7276f7153a..3395bc0bc740 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_execute_scan_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_execute_scan_operations.py @@ -40,7 +40,7 @@ def build_execute_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -94,7 +94,7 @@ def _execute_initial( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: error_map = { @@ -146,7 +146,7 @@ def begin_execute( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> LROPoller[None]: """Executes a Vulnerability Assessment database scan. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_rule_baselines_operations.py index 49ab665b12ec..6b9ed0a9a787 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_rule_baselines_operations.py @@ -39,8 +39,8 @@ def build_list_by_baseline_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -81,8 +81,8 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, subscription_id: str, **kwargs: Any @@ -125,8 +125,8 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, subscription_id: str, **kwargs: Any @@ -172,8 +172,8 @@ def build_delete_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, subscription_id: str, **kwargs: Any @@ -231,8 +231,8 @@ def list_by_baseline( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], **kwargs: Any ) -> Iterable["_models.DatabaseSqlVulnerabilityAssessmentRuleBaseline"]: """Gets a list of database's sql vulnerability assessment rule baselines. @@ -328,8 +328,8 @@ def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentRuleBaseline: @@ -409,8 +409,8 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: _models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, *, @@ -450,8 +450,8 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: IO, *, @@ -491,8 +491,8 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: Union[_models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, IO], **kwargs: Any @@ -592,8 +592,8 @@ def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, **kwargs: Any ) -> None: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_scan_result_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_scan_result_operations.py index 84fcd17d8ae2..9a4701c3901a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_scan_result_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_scan_result_operations.py @@ -39,7 +39,7 @@ def build_list_by_scan_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -81,7 +81,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, scan_result_id: str, subscription_id: str, @@ -146,7 +146,7 @@ def list_by_scan( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> Iterable["_models.SqlVulnerabilityAssessmentScanResults"]: @@ -243,7 +243,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, scan_result_id: str, **kwargs: Any diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_scans_operations.py index 2947350add4a..a00385b66626 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessment_scans_operations.py @@ -39,7 +39,7 @@ def build_list_by_sql_vulnerability_assessments_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -79,7 +79,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -142,7 +142,7 @@ def list_by_sql_vulnerability_assessments( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> Iterable["_models.SqlVulnerabilityAssessmentScanRecord"]: """Lists the vulnerability assessment scans of a database. @@ -233,7 +233,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.SqlVulnerabilityAssessmentScanRecord: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessments_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessments_settings_operations.py index c4c3a9cc2fd3..50d8f4d38a0d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessments_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_sql_vulnerability_assessments_settings_operations.py @@ -71,7 +71,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.SqlVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SqlVulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -213,7 +213,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.SqlVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SqlVulnerabilityAssessmentName], **kwargs: Any ) -> _models.SqlVulnerabilityAssessment: """Gets SQL Vulnerability Assessment policy for database. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py index 1a20788fd163..c65dcfabf0c6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_rule_baselines_operations.py @@ -38,9 +38,9 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -82,9 +82,9 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -129,9 +129,9 @@ def build_delete_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -188,9 +188,9 @@ def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentRuleBaseline: """Gets a database's vulnerability assessment rule baseline. @@ -272,9 +272,9 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: _models.DatabaseVulnerabilityAssessmentRuleBaseline, *, content_type: str = "application/json", @@ -316,9 +316,9 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: IO, *, content_type: str = "application/json", @@ -360,9 +360,9 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: Union[_models.DatabaseVulnerabilityAssessmentRuleBaseline, IO], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentRuleBaseline: @@ -463,9 +463,9 @@ def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], **kwargs: Any ) -> None: """Removes the database's vulnerability assessment rule baseline. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py index 689068e893f1..f03a239593b2 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessment_scans_operations.py @@ -41,7 +41,7 @@ def build_initiate_scan_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -77,7 +77,7 @@ def build_list_by_database_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -117,7 +117,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -159,7 +159,7 @@ def build_export_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -221,7 +221,7 @@ def _initiate_scan_initial( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> None: @@ -275,7 +275,7 @@ def begin_initiate_scan( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> LROPoller[None]: @@ -355,7 +355,7 @@ def list_by_database( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> Iterable["_models.VulnerabilityAssessmentScanRecord"]: """Lists the vulnerability assessment scans of a database. @@ -445,7 +445,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.VulnerabilityAssessmentScanRecord: @@ -522,7 +522,7 @@ def export( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentScansExport: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py index 972f1d628809..963399d69794 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_database_vulnerability_assessments_operations.py @@ -39,7 +39,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -79,7 +79,7 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -122,7 +122,7 @@ def build_delete_request( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -209,7 +209,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessment: """Gets the database's vulnerability assessment. @@ -283,7 +283,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.DatabaseVulnerabilityAssessment, *, content_type: str = "application/json", @@ -319,7 +319,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -355,7 +355,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.DatabaseVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessment: @@ -451,7 +451,7 @@ def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes the database's vulnerability assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py index 110d142d0fcb..bdf03d51f5df 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_databases_operations.py @@ -304,7 +304,7 @@ def build_failover_request( database_name: str, subscription_id: str, *, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1681,7 +1681,7 @@ def _failover_initial( # pylint: disable=inconsistent-return-statements resource_group_name: str, server_name: str, database_name: str, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> None: error_map = { @@ -1733,7 +1733,7 @@ def begin_failover( resource_group_name: str, server_name: str, database_name: str, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> LROPoller[None]: """Failovers a database. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py index 5b1abcefd6e3..c06919078b53 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_encryption_protectors_operations.py @@ -71,7 +71,7 @@ def build_list_by_server_request( def build_get_request( resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -107,7 +107,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -146,7 +146,7 @@ def build_create_or_update_request( def build_revalidate_request( resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -274,7 +274,7 @@ def get( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> _models.EncryptionProtector: """Gets a server encryption protector. @@ -342,7 +342,7 @@ def _create_or_update_initial( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: Union[_models.EncryptionProtector, IO], **kwargs: Any ) -> Optional[_models.EncryptionProtector]: @@ -411,7 +411,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: _models.EncryptionProtector, *, content_type: str = "application/json", @@ -451,7 +451,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: IO, *, content_type: str = "application/json", @@ -491,7 +491,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: Union[_models.EncryptionProtector, IO], **kwargs: Any ) -> LROPoller[_models.EncryptionProtector]: @@ -575,7 +575,7 @@ def _revalidate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> None: error_map = { @@ -625,7 +625,7 @@ def begin_revalidate( self, resource_group_name: str, server_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> LROPoller[None]: """Revalidates an existing encryption protector. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py index ee1002e5790e..946810c4e18e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_geo_backup_policies_operations.py @@ -39,7 +39,7 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -80,7 +80,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -171,7 +171,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], parameters: _models.GeoBackupPolicy, *, content_type: str = "application/json", @@ -206,7 +206,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -241,7 +241,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], parameters: Union[_models.GeoBackupPolicy, IO], **kwargs: Any ) -> _models.GeoBackupPolicy: @@ -336,7 +336,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - geo_backup_policy_name: Union[str, "_models.GeoBackupPolicyName"], + geo_backup_policy_name: Union[str, _models.GeoBackupPolicyName], **kwargs: Any ) -> _models.GeoBackupPolicy: """Gets a geo backup policy. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_ledger_digest_uploads_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_ledger_digest_uploads_operations.py index 187a3b6c9c8c..59a6e1d28f5b 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_ledger_digest_uploads_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_ledger_digest_uploads_operations.py @@ -41,7 +41,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -79,7 +79,7 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -152,7 +152,7 @@ def build_disable_request( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -211,7 +211,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], **kwargs: Any ) -> _models.LedgerDigestUploads: """Gets the current ledger digest upload configuration for a database. @@ -282,7 +282,7 @@ def _create_or_update_initial( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], parameters: Union[_models.LedgerDigestUploads, IO], **kwargs: Any ) -> Optional[_models.LedgerDigestUploads]: @@ -353,7 +353,7 @@ def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], parameters: _models.LedgerDigestUploads, *, content_type: str = "application/json", @@ -396,7 +396,7 @@ def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], parameters: IO, *, content_type: str = "application/json", @@ -439,7 +439,7 @@ def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], parameters: Union[_models.LedgerDigestUploads, IO], **kwargs: Any ) -> LROPoller[_models.LedgerDigestUploads]: @@ -606,7 +606,7 @@ def _disable_initial( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], **kwargs: Any ) -> Optional[_models.LedgerDigestUploads]: error_map = { @@ -664,7 +664,7 @@ def begin_disable( resource_group_name: str, server_name: str, database_name: str, - ledger_digest_uploads: Union[str, "_models.LedgerDigestUploadsName"], + ledger_digest_uploads: Union[str, _models.LedgerDigestUploadsName], **kwargs: Any ) -> LROPoller[_models.LedgerDigestUploads]: """Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py index 5f6356c7ae3d..55ed0bbedcc0 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_backups_operations.py @@ -212,7 +212,7 @@ def build_list_by_database_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -259,7 +259,7 @@ def build_list_by_location_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -301,7 +301,7 @@ def build_list_by_server_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -524,7 +524,7 @@ def build_list_by_resource_group_database_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -573,7 +573,7 @@ def build_list_by_resource_group_location_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -617,7 +617,7 @@ def build_list_by_resource_group_server_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -1363,7 +1363,7 @@ def list_by_database( long_term_retention_server_name: str, long_term_retention_database_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.LongTermRetentionBackup"]: """Lists all long term retention backups for a database. @@ -1455,7 +1455,7 @@ def list_by_location( self, location_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.LongTermRetentionBackup"]: """Lists the long term retention backups for a given location. @@ -1542,7 +1542,7 @@ def list_by_server( location_name: str, long_term_retention_server_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.LongTermRetentionBackup"]: """Lists the long term retention backups for a given server. @@ -2356,7 +2356,7 @@ def list_by_resource_group_database( long_term_retention_server_name: str, long_term_retention_database_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.LongTermRetentionBackup"]: """Lists all long term retention backups for a database. @@ -2453,7 +2453,7 @@ def list_by_resource_group_location( resource_group_name: str, location_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.LongTermRetentionBackup"]: """Lists the long term retention backups for a given location. @@ -2545,7 +2545,7 @@ def list_by_resource_group_server( location_name: str, long_term_retention_server_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.LongTermRetentionBackup"]: """Lists the long term retention backups for a given server. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_managed_instance_backups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_managed_instance_backups_operations.py index 754675cf7e80..630c6eaf3caf 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_managed_instance_backups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_managed_instance_backups_operations.py @@ -114,7 +114,7 @@ def build_list_by_database_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -158,7 +158,7 @@ def build_list_by_instance_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -200,7 +200,7 @@ def build_list_by_location_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -318,7 +318,7 @@ def build_list_by_resource_group_database_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -364,7 +364,7 @@ def build_list_by_resource_group_instance_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -408,7 +408,7 @@ def build_list_by_resource_group_location_request( subscription_id: str, *, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -652,7 +652,7 @@ def list_by_database( managed_instance_name: str, database_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists all long term retention backups for a managed database. @@ -746,7 +746,7 @@ def list_by_instance( location_name: str, managed_instance_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists the long term retention backups for a given managed instance. @@ -836,7 +836,7 @@ def list_by_location( self, location_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists the long term retention backups for managed databases in a given location. @@ -1134,7 +1134,7 @@ def list_by_resource_group_database( managed_instance_name: str, database_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists all long term retention backups for a managed database. @@ -1233,7 +1233,7 @@ def list_by_resource_group_instance( location_name: str, managed_instance_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists the long term retention backups for a given managed instance. @@ -1328,7 +1328,7 @@ def list_by_resource_group_location( resource_group_name: str, location_name: str, only_latest_per_database: Optional[bool] = None, - database_state: Optional[Union[str, "_models.DatabaseState"]] = None, + database_state: Optional[Union[str, _models.DatabaseState]] = None, **kwargs: Any ) -> Iterable["_models.ManagedInstanceLongTermRetentionBackup"]: """Lists the long term retention backups for managed databases in a given location. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_policies_operations.py index b41c06c3845e..9551f83cf8a3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_long_term_retention_policies_operations.py @@ -41,7 +41,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -79,7 +79,7 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -173,7 +173,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], **kwargs: Any ) -> _models.LongTermRetentionPolicy: """Gets a database's long term retention policy. @@ -244,7 +244,7 @@ def _create_or_update_initial( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], parameters: Union[_models.LongTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.LongTermRetentionPolicy]: @@ -315,7 +315,7 @@ def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], parameters: _models.LongTermRetentionPolicy, *, content_type: str = "application/json", @@ -357,7 +357,7 @@ def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -399,7 +399,7 @@ def begin_create_or_update( resource_group_name: str, server_name: str, database_name: str, - policy_name: Union[str, "_models.LongTermRetentionPolicyName"], + policy_name: Union[str, _models.LongTermRetentionPolicyName], parameters: Union[_models.LongTermRetentionPolicy, IO], **kwargs: Any ) -> LROPoller[_models.LongTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py index 98a4cd64a4c3..d9dd79bcdff0 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_backup_short_term_retention_policies_operations.py @@ -41,7 +41,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -79,7 +79,7 @@ def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -120,7 +120,7 @@ def build_update_request( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -214,7 +214,7 @@ def get( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], **kwargs: Any ) -> _models.ManagedBackupShortTermRetentionPolicy: """Gets a managed database's short term retention policy. @@ -285,7 +285,7 @@ def _create_or_update_initial( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedBackupShortTermRetentionPolicy]: @@ -356,7 +356,7 @@ def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -399,7 +399,7 @@ def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -442,7 +442,7 @@ def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> LROPoller[_models.ManagedBackupShortTermRetentionPolicy]: @@ -530,7 +530,7 @@ def _update_initial( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedBackupShortTermRetentionPolicy]: @@ -601,7 +601,7 @@ def begin_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -644,7 +644,7 @@ def begin_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -687,7 +687,7 @@ def begin_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> LROPoller[_models.ManagedBackupShortTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_advanced_threat_protection_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_advanced_threat_protection_settings_operations.py index 79b02f08378a..11f7d1ed6f99 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_advanced_threat_protection_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_advanced_threat_protection_settings_operations.py @@ -71,7 +71,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -111,7 +111,7 @@ def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -257,7 +257,7 @@ def get( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], **kwargs: Any ) -> _models.ManagedDatabaseAdvancedThreatProtection: """Gets a managed database's Advanced Threat Protection state. @@ -331,7 +331,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: _models.ManagedDatabaseAdvancedThreatProtection, *, content_type: str = "application/json", @@ -367,7 +367,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: IO, *, content_type: str = "application/json", @@ -403,7 +403,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ManagedDatabaseAdvancedThreatProtection, IO], **kwargs: Any ) -> _models.ManagedDatabaseAdvancedThreatProtection: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_queries_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_queries_operations.py index c4c340ed39eb..cab8abe25789 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_queries_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_queries_operations.py @@ -82,7 +82,7 @@ def build_list_by_query_request( *, start_time: Optional[str] = None, end_time: Optional[str] = None, - interval: Optional[Union[str, "_models.QueryTimeGrainType"]] = None, + interval: Optional[Union[str, _models.QueryTimeGrainType]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -216,7 +216,7 @@ def list_by_query( query_id: str, start_time: Optional[str] = None, end_time: Optional[str] = None, - interval: Optional[Union[str, "_models.QueryTimeGrainType"]] = None, + interval: Optional[Union[str, _models.QueryTimeGrainType]] = None, **kwargs: Any ) -> Iterable["_models.QueryStatistics"]: """Get query execution statistics by query id. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_restore_details_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_restore_details_operations.py index d740149efbc2..746f1686fd3d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_restore_details_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_restore_details_operations.py @@ -38,7 +38,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, database_name: str, - restore_details_name: Union[str, "_models.RestoreDetailsName"], + restore_details_name: Union[str, _models.RestoreDetailsName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -97,7 +97,7 @@ def get( resource_group_name: str, managed_instance_name: str, database_name: str, - restore_details_name: Union[str, "_models.RestoreDetailsName"], + restore_details_name: Union[str, _models.RestoreDetailsName], **kwargs: Any ) -> _models.ManagedDatabaseRestoreDetailsResult: """Gets managed database restore details. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py index faa1daf17157..91eb66f8281a 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_security_alert_policies_operations.py @@ -39,7 +39,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -77,7 +77,7 @@ def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -171,7 +171,7 @@ def get( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], **kwargs: Any ) -> _models.ManagedDatabaseSecurityAlertPolicy: """Gets a managed database's security alert policy. @@ -244,7 +244,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: _models.ManagedDatabaseSecurityAlertPolicy, *, content_type: str = "application/json", @@ -279,7 +279,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -314,7 +314,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ManagedDatabaseSecurityAlertPolicy, IO], **kwargs: Any ) -> _models.ManagedDatabaseSecurityAlertPolicy: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py index d4ec9848ea63..592fb79eb5f6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_sensitivity_labels_operations.py @@ -42,7 +42,7 @@ def build_get_request( schema_name: str, table_name: str, column_name: str, - sensitivity_label_source: Union[str, "_models.SensitivityLabelSource"], + sensitivity_label_source: Union[str, _models.SensitivityLabelSource], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -394,7 +394,7 @@ def get( schema_name: str, table_name: str, column_name: str, - sensitivity_label_source: Union[str, "_models.SensitivityLabelSource"], + sensitivity_label_source: Union[str, _models.SensitivityLabelSource], **kwargs: Any ) -> _models.SensitivityLabel: """Gets the sensitivity label of a given column. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_transparent_data_encryption_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_transparent_data_encryption_operations.py index 1adca2f7a26a..eea20bcd5aa9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_transparent_data_encryption_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_transparent_data_encryption_operations.py @@ -39,7 +39,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -77,7 +77,7 @@ def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -171,7 +171,7 @@ def get( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], **kwargs: Any ) -> _models.ManagedTransparentDataEncryption: """Gets a managed database's transparent data encryption. @@ -244,7 +244,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: _models.ManagedTransparentDataEncryption, *, content_type: str = "application/json", @@ -279,7 +279,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: IO, *, content_type: str = "application/json", @@ -314,7 +314,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: Union[_models.ManagedTransparentDataEncryption, IO], **kwargs: Any ) -> _models.ManagedTransparentDataEncryption: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py index 1a008a277765..abe2b80e81ae 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_rule_baselines_operations.py @@ -38,9 +38,9 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -82,9 +82,9 @@ def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -129,9 +129,9 @@ def build_delete_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -188,9 +188,9 @@ def get( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentRuleBaseline: """Gets a database's vulnerability assessment rule baseline. @@ -272,9 +272,9 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: _models.DatabaseVulnerabilityAssessmentRuleBaseline, *, content_type: str = "application/json", @@ -316,9 +316,9 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: IO, *, content_type: str = "application/json", @@ -360,9 +360,9 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], parameters: Union[_models.DatabaseVulnerabilityAssessmentRuleBaseline, IO], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentRuleBaseline: @@ -463,9 +463,9 @@ def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], rule_id: str, - baseline_name: Union[str, "_models.VulnerabilityAssessmentPolicyBaselineName"], + baseline_name: Union[str, _models.VulnerabilityAssessmentPolicyBaselineName], **kwargs: Any ) -> None: """Removes the database's vulnerability assessment rule baseline. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py index b2d97159e303..de9641716c35 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessment_scans_operations.py @@ -41,7 +41,7 @@ def build_initiate_scan_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -77,7 +77,7 @@ def build_export_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -119,7 +119,7 @@ def build_list_by_database_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -159,7 +159,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -221,7 +221,7 @@ def _initiate_scan_initial( # pylint: disable=inconsistent-return-statements resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> None: @@ -275,7 +275,7 @@ def begin_initiate_scan( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> LROPoller[None]: @@ -355,7 +355,7 @@ def export( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessmentScansExport: @@ -436,7 +436,7 @@ def list_by_database( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> Iterable["_models.VulnerabilityAssessmentScanRecord"]: """Lists the vulnerability assessment scans of a database. @@ -526,7 +526,7 @@ def get( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.VulnerabilityAssessmentScanRecord: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py index 22dcdc0f3d2b..06551184b7eb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_database_vulnerability_assessments_operations.py @@ -39,7 +39,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -79,7 +79,7 @@ def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -122,7 +122,7 @@ def build_delete_request( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -209,7 +209,7 @@ def get( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessment: """Gets the database's vulnerability assessment. @@ -283,7 +283,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.DatabaseVulnerabilityAssessment, *, content_type: str = "application/json", @@ -319,7 +319,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -355,7 +355,7 @@ def create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.DatabaseVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.DatabaseVulnerabilityAssessment: @@ -451,7 +451,7 @@ def delete( # pylint: disable=inconsistent-return-statements resource_group_name: str, managed_instance_name: str, database_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes the database's vulnerability assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py index d5b78cf329b8..688f75083f8e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_administrators_operations.py @@ -71,7 +71,7 @@ def build_list_by_instance_request( def build_get_request( resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -107,7 +107,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -146,7 +146,7 @@ def build_create_or_update_request( def build_delete_request( resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -275,7 +275,7 @@ def get( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> _models.ManagedInstanceAdministrator: """Gets a managed instance administrator. @@ -342,7 +342,7 @@ def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: Union[_models.ManagedInstanceAdministrator, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceAdministrator]: @@ -414,7 +414,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: _models.ManagedInstanceAdministrator, *, content_type: str = "application/json", @@ -453,7 +453,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: IO, *, content_type: str = "application/json", @@ -492,7 +492,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: Union[_models.ManagedInstanceAdministrator, IO], **kwargs: Any ) -> LROPoller[_models.ManagedInstanceAdministrator]: @@ -575,7 +575,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> None: error_map = { @@ -625,7 +625,7 @@ def begin_delete( self, resource_group_name: str, managed_instance_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> LROPoller[None]: """Deletes a managed instance administrator. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_advanced_threat_protection_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_advanced_threat_protection_settings_operations.py index d5374965a882..f3e33496a6e6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_advanced_threat_protection_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_advanced_threat_protection_settings_operations.py @@ -71,7 +71,7 @@ def build_list_by_instance_request( def build_get_request( resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -109,7 +109,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -250,7 +250,7 @@ def get( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], **kwargs: Any ) -> _models.ManagedInstanceAdvancedThreatProtection: """Get a managed instance's Advanced Threat Protection state. @@ -319,7 +319,7 @@ def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ManagedInstanceAdvancedThreatProtection, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceAdvancedThreatProtection]: @@ -388,7 +388,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: _models.ManagedInstanceAdvancedThreatProtection, *, content_type: str = "application/json", @@ -430,7 +430,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: IO, *, content_type: str = "application/json", @@ -472,7 +472,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ManagedInstanceAdvancedThreatProtection, IO], **kwargs: Any ) -> LROPoller[_models.ManagedInstanceAdvancedThreatProtection]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_azure_ad_only_authentications_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_azure_ad_only_authentications_operations.py index e396438f0130..e0e192d11cf9 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_azure_ad_only_authentications_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_azure_ad_only_authentications_operations.py @@ -40,7 +40,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -76,7 +76,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -115,7 +115,7 @@ def build_create_or_update_request( def build_delete_request( resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -197,7 +197,7 @@ def get( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> _models.ManagedInstanceAzureADOnlyAuthentication: """Gets a specific Azure Active Directory only authentication property. @@ -265,7 +265,7 @@ def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: Union[_models.ManagedInstanceAzureADOnlyAuthentication, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceAzureADOnlyAuthentication]: @@ -337,7 +337,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: _models.ManagedInstanceAzureADOnlyAuthentication, *, content_type: str = "application/json", @@ -380,7 +380,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: IO, *, content_type: str = "application/json", @@ -423,7 +423,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: Union[_models.ManagedInstanceAzureADOnlyAuthentication, IO], **kwargs: Any ) -> LROPoller[_models.ManagedInstanceAzureADOnlyAuthentication]: @@ -509,7 +509,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> None: error_map = { @@ -559,7 +559,7 @@ def begin_delete( self, resource_group_name: str, managed_instance_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> LROPoller[None]: """Deletes an existing server Active Directory only authentication property. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_dtcs_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_dtcs_operations.py index 0a4589700a06..bc284de68c56 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_dtcs_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_dtcs_operations.py @@ -71,7 +71,7 @@ def build_list_by_managed_instance_request( def build_get_request( resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -107,7 +107,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -241,11 +241,7 @@ def get_next(next_link=None): @distributed_trace def get( - self, - resource_group_name: str, - managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], - **kwargs: Any + self, resource_group_name: str, managed_instance_name: str, dtc_name: Union[str, _models.DtcName], **kwargs: Any ) -> _models.ManagedInstanceDtc: """Gets managed instance DTC settings. @@ -311,7 +307,7 @@ def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], parameters: Union[_models.ManagedInstanceDtc, IO], **kwargs: Any ) -> _models.ManagedInstanceDtc: @@ -378,7 +374,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], parameters: _models.ManagedInstanceDtc, *, content_type: str = "application/json", @@ -417,7 +413,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], parameters: IO, *, content_type: str = "application/json", @@ -456,7 +452,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - dtc_name: Union[str, "_models.DtcName"], + dtc_name: Union[str, _models.DtcName], parameters: Union[_models.ManagedInstanceDtc, IO], **kwargs: Any ) -> LROPoller[_models.ManagedInstanceDtc]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py index bfc5534defe1..7fc89ff3a5e3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_encryption_protectors_operations.py @@ -40,7 +40,7 @@ def build_revalidate_request( resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -101,7 +101,7 @@ def build_list_by_instance_request( def build_get_request( resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -137,7 +137,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -196,7 +196,7 @@ def _revalidate_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> None: error_map = { @@ -246,7 +246,7 @@ def begin_revalidate( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> LROPoller[None]: """Revalidates an existing encryption protector. @@ -396,7 +396,7 @@ def get( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], **kwargs: Any ) -> _models.ManagedInstanceEncryptionProtector: """Gets a managed instance encryption protector. @@ -464,7 +464,7 @@ def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: Union[_models.ManagedInstanceEncryptionProtector, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceEncryptionProtector]: @@ -533,7 +533,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: _models.ManagedInstanceEncryptionProtector, *, content_type: str = "application/json", @@ -574,7 +574,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: IO, *, content_type: str = "application/json", @@ -615,7 +615,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - encryption_protector_name: Union[str, "_models.EncryptionProtectorName"], + encryption_protector_name: Union[str, _models.EncryptionProtectorName], parameters: Union[_models.ManagedInstanceEncryptionProtector, IO], **kwargs: Any ) -> LROPoller[_models.ManagedInstanceEncryptionProtector]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_long_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_long_term_retention_policies_operations.py index ad78dd620353..85d61a6ded4e 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_long_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_long_term_retention_policies_operations.py @@ -41,7 +41,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -79,7 +79,7 @@ def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -173,7 +173,7 @@ def get( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], **kwargs: Any ) -> _models.ManagedInstanceLongTermRetentionPolicy: """Gets a managed database's long term retention policy. @@ -244,7 +244,7 @@ def _create_or_update_initial( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], parameters: Union[_models.ManagedInstanceLongTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedInstanceLongTermRetentionPolicy]: @@ -315,7 +315,7 @@ def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], parameters: _models.ManagedInstanceLongTermRetentionPolicy, *, content_type: str = "application/json", @@ -358,7 +358,7 @@ def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -401,7 +401,7 @@ def begin_create_or_update( resource_group_name: str, managed_instance_name: str, database_name: str, - policy_name: Union[str, "_models.ManagedInstanceLongTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedInstanceLongTermRetentionPolicyName], parameters: Union[_models.ManagedInstanceLongTermRetentionPolicy, IO], **kwargs: Any ) -> LROPoller[_models.ManagedInstanceLongTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py index 8542d2ef497e..e90c3f2e29b6 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instance_vulnerability_assessments_operations.py @@ -38,7 +38,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -76,7 +76,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -117,7 +117,7 @@ def build_create_or_update_request( def build_delete_request( resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -201,7 +201,7 @@ def get( self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> _models.ManagedInstanceVulnerabilityAssessment: """Gets the managed instance's vulnerability assessment. @@ -271,7 +271,7 @@ def create_or_update( self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.ManagedInstanceVulnerabilityAssessment, *, content_type: str = "application/json", @@ -306,7 +306,7 @@ def create_or_update( self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -341,7 +341,7 @@ def create_or_update( self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.ManagedInstanceVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.ManagedInstanceVulnerabilityAssessment: @@ -435,7 +435,7 @@ def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes the managed instance's vulnerability assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py index 41cb932fbc33..5adb4e74c1b5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_instances_operations.py @@ -273,9 +273,9 @@ def build_list_by_managed_instance_request( databases: Optional[str] = None, start_time: Optional[str] = None, end_time: Optional[str] = None, - interval: Optional[Union[str, "_models.QueryTimeGrainType"]] = None, - aggregation_function: Optional[Union[str, "_models.AggregationFunctionType"]] = None, - observation_metric: Optional[Union[str, "_models.MetricType"]] = None, + interval: Optional[Union[str, _models.QueryTimeGrainType]] = None, + aggregation_function: Optional[Union[str, _models.AggregationFunctionType]] = None, + observation_metric: Optional[Union[str, _models.MetricType]] = None, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) @@ -325,7 +325,7 @@ def build_failover_request( managed_instance_name: str, subscription_id: str, *, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1217,9 +1217,9 @@ def list_by_managed_instance( databases: Optional[str] = None, start_time: Optional[str] = None, end_time: Optional[str] = None, - interval: Optional[Union[str, "_models.QueryTimeGrainType"]] = None, - aggregation_function: Optional[Union[str, "_models.AggregationFunctionType"]] = None, - observation_metric: Optional[Union[str, "_models.MetricType"]] = None, + interval: Optional[Union[str, _models.QueryTimeGrainType]] = None, + aggregation_function: Optional[Union[str, _models.AggregationFunctionType]] = None, + observation_metric: Optional[Union[str, _models.MetricType]] = None, **kwargs: Any ) -> Iterable["_models.TopQueries"]: """Get top resource consuming queries of a managed instance. @@ -1325,7 +1325,7 @@ def _failover_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, managed_instance_name: str, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> None: error_map = { @@ -1375,7 +1375,7 @@ def begin_failover( self, resource_group_name: str, managed_instance_name: str, - replica_type: Optional[Union[str, "_models.ReplicaType"]] = None, + replica_type: Optional[Union[str, _models.ReplicaType]] = None, **kwargs: Any ) -> LROPoller[None]: """Failovers a managed instance. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py index 154160cf62a0..55d5a34704d3 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_restorable_dropped_database_backup_short_term_retention_policies_operations.py @@ -41,7 +41,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -81,7 +81,7 @@ def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -124,7 +124,7 @@ def build_update_request( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -226,7 +226,7 @@ def get( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], **kwargs: Any ) -> _models.ManagedBackupShortTermRetentionPolicy: """Gets a dropped database's short term retention policy. @@ -297,7 +297,7 @@ def _create_or_update_initial( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedBackupShortTermRetentionPolicy]: @@ -368,7 +368,7 @@ def begin_create_or_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -411,7 +411,7 @@ def begin_create_or_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -454,7 +454,7 @@ def begin_create_or_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> LROPoller[_models.ManagedBackupShortTermRetentionPolicy]: @@ -542,7 +542,7 @@ def _update_initial( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedBackupShortTermRetentionPolicy]: @@ -613,7 +613,7 @@ def begin_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: _models.ManagedBackupShortTermRetentionPolicy, *, content_type: str = "application/json", @@ -656,7 +656,7 @@ def begin_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -699,7 +699,7 @@ def begin_update( resource_group_name: str, managed_instance_name: str, restorable_dropped_database_id: str, - policy_name: Union[str, "_models.ManagedShortTermRetentionPolicyName"], + policy_name: Union[str, _models.ManagedShortTermRetentionPolicyName], parameters: Union[_models.ManagedBackupShortTermRetentionPolicy, IO], **kwargs: Any ) -> LROPoller[_models.ManagedBackupShortTermRetentionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py index 628d5bebac23..6f02d64862c1 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_managed_server_security_alert_policies_operations.py @@ -40,7 +40,7 @@ def build_get_request( resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -76,7 +76,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -167,7 +167,7 @@ def get( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], **kwargs: Any ) -> _models.ManagedServerSecurityAlertPolicy: """Get a managed server's threat detection policy. @@ -234,7 +234,7 @@ def _create_or_update_initial( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ManagedServerSecurityAlertPolicy, IO], **kwargs: Any ) -> Optional[_models.ManagedServerSecurityAlertPolicy]: @@ -303,7 +303,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: _models.ManagedServerSecurityAlertPolicy, *, content_type: str = "application/json", @@ -342,7 +342,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -381,7 +381,7 @@ def begin_create_or_update( self, resource_group_name: str, managed_instance_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ManagedServerSecurityAlertPolicy, IO], **kwargs: Any ) -> LROPoller[_models.ManagedServerSecurityAlertPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py index 1d999c44ef12..9056288c0b86 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sensitivity_labels_operations.py @@ -244,7 +244,7 @@ def build_get_request( schema_name: str, table_name: str, column_name: str, - sensitivity_label_source: Union[str, "_models.SensitivityLabelSource"], + sensitivity_label_source: Union[str, _models.SensitivityLabelSource], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -896,7 +896,7 @@ def get( schema_name: str, table_name: str, column_name: str, - sensitivity_label_source: Union[str, "_models.SensitivityLabelSource"], + sensitivity_label_source: Union[str, _models.SensitivityLabelSource], **kwargs: Any ) -> _models.SensitivityLabel: """Gets the sensitivity label of a given column. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_advanced_threat_protection_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_advanced_threat_protection_settings_operations.py index 9fc3a9641e4b..176798aea027 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_advanced_threat_protection_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_advanced_threat_protection_settings_operations.py @@ -71,7 +71,7 @@ def build_list_by_server_request( def build_get_request( resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -109,7 +109,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -249,7 +249,7 @@ def get( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], **kwargs: Any ) -> _models.ServerAdvancedThreatProtection: """Get a server's Advanced Threat Protection state. @@ -318,7 +318,7 @@ def _create_or_update_initial( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ServerAdvancedThreatProtection, IO], **kwargs: Any ) -> Optional[_models.ServerAdvancedThreatProtection]: @@ -387,7 +387,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: _models.ServerAdvancedThreatProtection, *, content_type: str = "application/json", @@ -428,7 +428,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: IO, *, content_type: str = "application/json", @@ -469,7 +469,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - advanced_threat_protection_name: Union[str, "_models.AdvancedThreatProtectionName"], + advanced_threat_protection_name: Union[str, _models.AdvancedThreatProtectionName], parameters: Union[_models.ServerAdvancedThreatProtection, IO], **kwargs: Any ) -> LROPoller[_models.ServerAdvancedThreatProtection]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py index 74fde4bb5c51..43665a42336f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_administrators_operations.py @@ -40,7 +40,7 @@ def build_get_request( resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -76,7 +76,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -115,7 +115,7 @@ def build_create_or_update_request( def build_delete_request( resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -197,7 +197,7 @@ def get( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> _models.ServerAzureADAdministrator: """Gets a Azure Active Directory administrator. @@ -265,7 +265,7 @@ def _create_or_update_initial( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: Union[_models.ServerAzureADAdministrator, IO], **kwargs: Any ) -> Optional[_models.ServerAzureADAdministrator]: @@ -337,7 +337,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: _models.ServerAzureADAdministrator, *, content_type: str = "application/json", @@ -377,7 +377,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: IO, *, content_type: str = "application/json", @@ -417,7 +417,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], parameters: Union[_models.ServerAzureADAdministrator, IO], **kwargs: Any ) -> LROPoller[_models.ServerAzureADAdministrator]: @@ -501,7 +501,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> None: error_map = { @@ -551,7 +551,7 @@ def begin_delete( self, resource_group_name: str, server_name: str, - administrator_name: Union[str, "_models.AdministratorName"], + administrator_name: Union[str, _models.AdministratorName], **kwargs: Any ) -> LROPoller[None]: """Deletes the Azure Active Directory administrator with the given name. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_only_authentications_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_only_authentications_operations.py index 4808a6d1ac04..baa2e0fe753f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_only_authentications_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_azure_ad_only_authentications_operations.py @@ -40,7 +40,7 @@ def build_get_request( resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -76,7 +76,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -115,7 +115,7 @@ def build_create_or_update_request( def build_delete_request( resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -197,7 +197,7 @@ def get( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> _models.ServerAzureADOnlyAuthentication: """Gets a specific Azure Active Directory only authentication property. @@ -265,7 +265,7 @@ def _create_or_update_initial( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: Union[_models.ServerAzureADOnlyAuthentication, IO], **kwargs: Any ) -> Optional[_models.ServerAzureADOnlyAuthentication]: @@ -337,7 +337,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: _models.ServerAzureADOnlyAuthentication, *, content_type: str = "application/json", @@ -379,7 +379,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: IO, *, content_type: str = "application/json", @@ -421,7 +421,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], parameters: Union[_models.ServerAzureADOnlyAuthentication, IO], **kwargs: Any ) -> LROPoller[_models.ServerAzureADOnlyAuthentication]: @@ -506,7 +506,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> None: error_map = { @@ -556,7 +556,7 @@ def begin_delete( self, resource_group_name: str, server_name: str, - authentication_name: Union[str, "_models.AuthenticationName"], + authentication_name: Union[str, _models.AuthenticationName], **kwargs: Any ) -> LROPoller[None]: """Deletes an existing server Active Directory only authentication property. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py index 48e7b43c915d..dd9d68cd5fb5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_connection_policies_operations.py @@ -40,7 +40,7 @@ def build_get_request( resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -76,7 +76,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -167,7 +167,7 @@ def get( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], **kwargs: Any ) -> _models.ServerConnectionPolicy: """Gets a server connection policy. @@ -234,7 +234,7 @@ def _create_or_update_initial( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], parameters: Union[_models.ServerConnectionPolicy, IO], **kwargs: Any ) -> Optional[_models.ServerConnectionPolicy]: @@ -303,7 +303,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], parameters: _models.ServerConnectionPolicy, *, content_type: str = "application/json", @@ -342,7 +342,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -381,7 +381,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - connection_policy_name: Union[str, "_models.ConnectionPolicyName"], + connection_policy_name: Union[str, _models.ConnectionPolicyName], parameters: Union[_models.ServerConnectionPolicy, IO], **kwargs: Any ) -> LROPoller[_models.ServerConnectionPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dev_ops_audit_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dev_ops_audit_settings_operations.py index 0042592c7ba2..758d70a2cfbb 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dev_ops_audit_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_dev_ops_audit_settings_operations.py @@ -37,26 +37,23 @@ _SERIALIZER.client_side_validation = False -def build_get_request( - resource_group_name: str, server_name: str, dev_ops_auditing_settings_name: str, subscription_id: str, **kwargs: Any +def build_list_by_server_request( + resource_group_name: str, server_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings", ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "serverName": _SERIALIZER.url("server_name", server_name, "str"), - "devOpsAuditingSettingsName": _SERIALIZER.url( - "dev_ops_auditing_settings_name", dev_ops_auditing_settings_name, "str" - ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -71,14 +68,17 @@ def build_get_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_or_update_request( - resource_group_name: str, server_name: str, dev_ops_auditing_settings_name: str, subscription_id: str, **kwargs: Any +def build_get_request( + resource_group_name: str, + server_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str - content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str accept = _headers.pop("Accept", "application/json") # Construct URL @@ -101,30 +101,36 @@ def build_create_or_update_request( _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers - if content_type is not None: - _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_list_by_server_request( - resource_group_name: str, server_name: str, subscription_id: str, **kwargs: Any +def build_create_or_update_request( + resource_group_name: str, + server_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], + subscription_id: str, + **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str + content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}", ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "serverName": _SERIALIZER.url("server_name", server_name, "str"), + "devOpsAuditingSettingsName": _SERIALIZER.url( + "dev_ops_auditing_settings_name", dev_ops_auditing_settings_name, "str" + ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -134,9 +140,11 @@ def build_list_by_server_request( _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") # Construct headers + if content_type is not None: + _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str") _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs) class ServerDevOpsAuditSettingsOperations: @@ -158,9 +166,91 @@ def __init__(self, *args, **kwargs): self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + @distributed_trace + def list_by_server( + self, resource_group_name: str, server_name: str, **kwargs: Any + ) -> Iterable["_models.ServerDevOpsAuditingSettings"]: + """Lists DevOps audit settings of a server. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. Required. + :type resource_group_name: str + :param server_name: The name of the server. Required. + :type server_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServerDevOpsAuditingSettings or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.sql.models.ServerDevOpsAuditingSettings] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str + cls = kwargs.pop("cls", None) # type: ClsType[_models.ServerDevOpsAuditSettingsListResult] + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_server_request( + resource_group_name=resource_group_name, + server_name=server_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_server.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + + else: + request = HttpRequest("GET", next_link) + request = _convert_request(request) + request.url = self._client.format_url(request.url) # type: ignore + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ServerDevOpsAuditSettingsListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access + request, stream=False, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_server.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings"} # type: ignore + @distributed_trace def get( - self, resource_group_name: str, server_name: str, dev_ops_auditing_settings_name: str, **kwargs: Any + self, + resource_group_name: str, + server_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], + **kwargs: Any ) -> _models.ServerDevOpsAuditingSettings: """Gets a server's DevOps audit settings. @@ -169,9 +259,8 @@ def get( :type resource_group_name: str :param server_name: The name of the server. Required. :type server_name: str - :param dev_ops_auditing_settings_name: The name of the devops audit settings. This should - always be 'default'. Required. - :type dev_ops_auditing_settings_name: str + :param dev_ops_auditing_settings_name: "Default" Required. + :type dev_ops_auditing_settings_name: str or ~azure.mgmt.sql.models.DevOpsAuditingSettingsName :keyword callable cls: A custom type or function that will be passed the direct response :return: ServerDevOpsAuditingSettings or the result of cls(response) :rtype: ~azure.mgmt.sql.models.ServerDevOpsAuditingSettings @@ -188,7 +277,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str cls = kwargs.pop("cls", None) # type: ClsType[_models.ServerDevOpsAuditingSettings] request = build_get_request( @@ -227,7 +316,7 @@ def _create_or_update_initial( self, resource_group_name: str, server_name: str, - dev_ops_auditing_settings_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], parameters: Union[_models.ServerDevOpsAuditingSettings, IO], **kwargs: Any ) -> Optional[_models.ServerDevOpsAuditingSettings]: @@ -242,7 +331,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] cls = kwargs.pop("cls", None) # type: ClsType[Optional[_models.ServerDevOpsAuditingSettings]] @@ -296,7 +385,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - dev_ops_auditing_settings_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], parameters: _models.ServerDevOpsAuditingSettings, *, content_type: str = "application/json", @@ -309,9 +398,8 @@ def begin_create_or_update( :type resource_group_name: str :param server_name: The name of the server. Required. :type server_name: str - :param dev_ops_auditing_settings_name: The name of the devops audit settings. This should - always be 'default'. Required. - :type dev_ops_auditing_settings_name: str + :param dev_ops_auditing_settings_name: "Default" Required. + :type dev_ops_auditing_settings_name: str or ~azure.mgmt.sql.models.DevOpsAuditingSettingsName :param parameters: Properties of DevOps audit settings. Required. :type parameters: ~azure.mgmt.sql.models.ServerDevOpsAuditingSettings :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. @@ -336,7 +424,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - dev_ops_auditing_settings_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], parameters: IO, *, content_type: str = "application/json", @@ -349,9 +437,8 @@ def begin_create_or_update( :type resource_group_name: str :param server_name: The name of the server. Required. :type server_name: str - :param dev_ops_auditing_settings_name: The name of the devops audit settings. This should - always be 'default'. Required. - :type dev_ops_auditing_settings_name: str + :param dev_ops_auditing_settings_name: "Default" Required. + :type dev_ops_auditing_settings_name: str or ~azure.mgmt.sql.models.DevOpsAuditingSettingsName :param parameters: Properties of DevOps audit settings. Required. :type parameters: IO :keyword content_type: Body Parameter content-type. Content type parameter for binary body. @@ -376,7 +463,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - dev_ops_auditing_settings_name: str, + dev_ops_auditing_settings_name: Union[str, _models.DevOpsAuditingSettingsName], parameters: Union[_models.ServerDevOpsAuditingSettings, IO], **kwargs: Any ) -> LROPoller[_models.ServerDevOpsAuditingSettings]: @@ -387,9 +474,8 @@ def begin_create_or_update( :type resource_group_name: str :param server_name: The name of the server. Required. :type server_name: str - :param dev_ops_auditing_settings_name: The name of the devops audit settings. This should - always be 'default'. Required. - :type dev_ops_auditing_settings_name: str + :param dev_ops_auditing_settings_name: "Default" Required. + :type dev_ops_auditing_settings_name: str or ~azure.mgmt.sql.models.DevOpsAuditingSettingsName :param parameters: Properties of DevOps audit settings. Is either a model type or a IO type. Required. :type parameters: ~azure.mgmt.sql.models.ServerDevOpsAuditingSettings or IO @@ -412,7 +498,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-02-01-preview")) # type: str content_type = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # type: Optional[str] cls = kwargs.pop("cls", None) # type: ClsType[_models.ServerDevOpsAuditingSettings] polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] @@ -457,81 +543,3 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}"} # type: ignore - - @distributed_trace - def list_by_server( - self, resource_group_name: str, server_name: str, **kwargs: Any - ) -> Iterable["_models.ServerDevOpsAuditingSettings"]: - """Lists DevOps audit settings of a server. - - :param resource_group_name: The name of the resource group that contains the resource. You can - obtain this value from the Azure Resource Manager API or the portal. Required. - :type resource_group_name: str - :param server_name: The name of the server. Required. - :type server_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ServerDevOpsAuditingSettings or the result of - cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.sql.models.ServerDevOpsAuditingSettings] - :raises ~azure.core.exceptions.HttpResponseError: - """ - _headers = kwargs.pop("headers", {}) or {} - _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - - api_version = kwargs.pop("api_version", _params.pop("api-version", "2020-11-01-preview")) # type: str - cls = kwargs.pop("cls", None) # type: ClsType[_models.ServerDevOpsAuditSettingsListResult] - - error_map = { - 401: ClientAuthenticationError, - 404: ResourceNotFoundError, - 409: ResourceExistsError, - 304: ResourceNotModifiedError, - } - error_map.update(kwargs.pop("error_map", {}) or {}) - - def prepare_request(next_link=None): - if not next_link: - - request = build_list_by_server_request( - resource_group_name=resource_group_name, - server_name=server_name, - subscription_id=self._config.subscription_id, - api_version=api_version, - template_url=self.list_by_server.metadata["url"], - headers=_headers, - params=_params, - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) # type: ignore - - else: - request = HttpRequest("GET", next_link) - request = _convert_request(request) - request.url = self._client.format_url(request.url) # type: ignore - request.method = "GET" - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize("ServerDevOpsAuditSettingsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, stream=False, **kwargs - ) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged(get_next, extract_data) - - list_by_server.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings"} # type: ignore diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py index f07678b3fefe..c933bcb09bed 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_security_alert_policies_operations.py @@ -40,7 +40,7 @@ def build_get_request( resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -76,7 +76,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -167,7 +167,7 @@ def get( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], **kwargs: Any ) -> _models.ServerSecurityAlertPolicy: """Get a server's security alert policy. @@ -234,7 +234,7 @@ def _create_or_update_initial( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ServerSecurityAlertPolicy, IO], **kwargs: Any ) -> Optional[_models.ServerSecurityAlertPolicy]: @@ -303,7 +303,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: _models.ServerSecurityAlertPolicy, *, content_type: str = "application/json", @@ -342,7 +342,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: IO, *, content_type: str = "application/json", @@ -381,7 +381,7 @@ def begin_create_or_update( self, resource_group_name: str, server_name: str, - security_alert_policy_name: Union[str, "_models.SecurityAlertPolicyName"], + security_alert_policy_name: Union[str, _models.SecurityAlertPolicyName], parameters: Union[_models.ServerSecurityAlertPolicy, IO], **kwargs: Any ) -> LROPoller[_models.ServerSecurityAlertPolicy]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py index d39fbeea7d21..c52481356981 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_server_vulnerability_assessments_operations.py @@ -38,7 +38,7 @@ def build_get_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -76,7 +76,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -117,7 +117,7 @@ def build_create_or_update_request( def build_delete_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -201,7 +201,7 @@ def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> _models.ServerVulnerabilityAssessment: """Gets the server's vulnerability assessment. @@ -271,7 +271,7 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.ServerVulnerabilityAssessment, *, content_type: str = "application/json", @@ -306,7 +306,7 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -341,7 +341,7 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.ServerVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.ServerVulnerabilityAssessment: @@ -435,7 +435,7 @@ def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes the server's vulnerability assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_baseline_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_baseline_operations.py index 852f98d88fb0..58fb6c8edbde 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_baseline_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_baseline_operations.py @@ -38,7 +38,7 @@ def build_list_by_sql_vulnerability_assessment_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -78,8 +78,8 @@ def build_list_by_sql_vulnerability_assessment_request( def build_get_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -141,7 +141,7 @@ def list_by_sql_vulnerability_assessment( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> Iterable["_models.DatabaseSqlVulnerabilityAssessmentBaselineSet"]: """Gets a list of database's sql vulnerability assessment rule baselines. @@ -237,8 +237,8 @@ def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentBaselineSet: """Gets a list of database's sql vulnerability assessment rule baselines. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_baselines_operations.py index bf6432d147fe..25035cc8d800 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_baselines_operations.py @@ -37,8 +37,8 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -103,8 +103,8 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: _models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, *, content_type: str = "application/json", @@ -142,8 +142,8 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: IO, *, content_type: str = "application/json", @@ -180,8 +180,8 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], parameters: Union[_models.DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, IO], **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentBaselineSet: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_execute_scan_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_execute_scan_operations.py index ad95dfaccbad..f8f7cf50a28c 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_execute_scan_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_execute_scan_operations.py @@ -39,7 +39,7 @@ def build_execute_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -93,7 +93,7 @@ def _execute_initial( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: error_map = { @@ -147,7 +147,7 @@ def begin_execute( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> LROPoller[None]: """Executes a Vulnerability Assessment database scan. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_rule_baseline_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_rule_baseline_operations.py index 8398e2c82695..fd6d5b258b2d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_rule_baseline_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_rule_baseline_operations.py @@ -38,8 +38,8 @@ def build_list_by_baseline_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -80,8 +80,8 @@ def build_list_by_baseline_request( def build_get_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, subscription_id: str, **kwargs: Any @@ -124,8 +124,8 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, subscription_id: str, **kwargs: Any @@ -192,8 +192,8 @@ def list_by_baseline( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], **kwargs: Any ) -> Iterable["_models.DatabaseSqlVulnerabilityAssessmentRuleBaseline"]: """Gets a system database's sql vulnerability assessment rule baseline. @@ -292,8 +292,8 @@ def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, **kwargs: Any ) -> _models.DatabaseSqlVulnerabilityAssessmentRuleBaseline: @@ -376,8 +376,8 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: _models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, *, @@ -417,8 +417,8 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: IO, *, @@ -458,8 +458,8 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, parameters: Union[_models.DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, IO], **kwargs: Any diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_rule_baselines_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_rule_baselines_operations.py index 82813c86faae..94c7517a38d7 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_rule_baselines_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_rule_baselines_operations.py @@ -37,8 +37,8 @@ def build_delete_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, subscription_id: str, **kwargs: Any @@ -96,8 +96,8 @@ def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], - baseline_name: Union[str, "_models.BaselineName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], + baseline_name: Union[str, _models.BaselineName], rule_id: str, **kwargs: Any ) -> None: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_scan_result_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_scan_result_operations.py index c2f1182da2a7..4bef6dd47375 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_scan_result_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_scan_result_operations.py @@ -38,7 +38,7 @@ def build_list_by_scan_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -80,7 +80,7 @@ def build_list_by_scan_request( def build_get_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, scan_result_id: str, subscription_id: str, @@ -145,7 +145,7 @@ def list_by_scan( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> Iterable["_models.SqlVulnerabilityAssessmentScanResults"]: @@ -245,7 +245,7 @@ def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.SQLVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SQLVulnerabilityAssessmentName], scan_id: str, scan_result_id: str, **kwargs: Any diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_scans_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_scans_operations.py index 45cc63aac6f8..31577a312296 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_scans_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessment_scans_operations.py @@ -38,7 +38,7 @@ def build_list_by_sql_vulnerability_assessments_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -78,7 +78,7 @@ def build_list_by_sql_vulnerability_assessments_request( def build_get_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, subscription_id: str, **kwargs: Any @@ -141,7 +141,7 @@ def list_by_sql_vulnerability_assessments( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> Iterable["_models.SqlVulnerabilityAssessmentScanRecord"]: """Lists the vulnerability assessment scans of a database. @@ -235,7 +235,7 @@ def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], scan_id: str, **kwargs: Any ) -> _models.SqlVulnerabilityAssessmentScanRecord: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessments_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessments_operations.py index db03ba2a363b..c3c0b37b5c63 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessments_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessments_operations.py @@ -37,7 +37,7 @@ def build_delete_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -90,7 +90,7 @@ def delete( # pylint: disable=inconsistent-return-statements self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], **kwargs: Any ) -> None: """Removes SQL Vulnerability Assessment. diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessments_settings_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessments_settings_operations.py index 3b4791cf70ef..9059651c691f 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessments_settings_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sql_vulnerability_assessments_settings_operations.py @@ -69,7 +69,7 @@ def build_list_by_server_request( def build_get_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.SqlVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SqlVulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -107,7 +107,7 @@ def build_get_request( def build_create_or_update_request( resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -247,7 +247,7 @@ def get( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.SqlVulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.SqlVulnerabilityAssessmentName], **kwargs: Any ) -> _models.SqlVulnerabilityAssessment: """Gets SQL Vulnerability Assessment policy. @@ -317,7 +317,7 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: _models.SqlVulnerabilityAssessment, *, content_type: str = "application/json", @@ -349,7 +349,7 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: IO, *, content_type: str = "application/json", @@ -381,7 +381,7 @@ def create_or_update( self, resource_group_name: str, server_name: str, - vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"], + vulnerability_assessment_name: Union[str, _models.VulnerabilityAssessmentName], parameters: Union[_models.SqlVulnerabilityAssessment, IO], **kwargs: Any ) -> _models.SqlVulnerabilityAssessment: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py index c24dc66a6473..c75f98104aef 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_sync_groups_operations.py @@ -144,7 +144,7 @@ def build_list_logs_request( *, start_time: str, end_time: str, - type: Union[str, "_models.SyncGroupsType"], + type: Union[str, _models.SyncGroupsType], continuation_token_parameter: Optional[str] = None, **kwargs: Any ) -> HttpRequest: @@ -733,7 +733,7 @@ def list_logs( sync_group_name: str, start_time: str, end_time: str, - type: Union[str, "_models.SyncGroupsType"], + type: Union[str, _models.SyncGroupsType], continuation_token_parameter: Optional[str] = None, **kwargs: Any ) -> Iterable["_models.SyncGroupLogProperties"]: diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py index f44c74ba2432..fc07c6e24149 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_transparent_data_encryptions_operations.py @@ -39,7 +39,7 @@ def build_get_request( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -77,7 +77,7 @@ def build_create_or_update_request( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], subscription_id: str, **kwargs: Any ) -> HttpRequest: @@ -171,7 +171,7 @@ def get( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], **kwargs: Any ) -> _models.LogicalDatabaseTransparentDataEncryption: """Gets a logical database's transparent data encryption. @@ -244,7 +244,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: _models.LogicalDatabaseTransparentDataEncryption, *, content_type: str = "application/json", @@ -279,7 +279,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: IO, *, content_type: str = "application/json", @@ -314,7 +314,7 @@ def create_or_update( resource_group_name: str, server_name: str, database_name: str, - tde_name: Union[str, "_models.TransparentDataEncryptionName"], + tde_name: Union[str, _models.TransparentDataEncryptionName], parameters: Union[_models.LogicalDatabaseTransparentDataEncryption, IO], **kwargs: Any ) -> Optional[_models.LogicalDatabaseTransparentDataEncryption]: