From 7d08d324db00c3e767907aa69939cccad1c7aea5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 9 Jun 2021 23:56:20 +0000 Subject: [PATCH] CodeGen from PR 14744 in Azure/azure-rest-api-specs Merge e2d27c67559cee1d5ce399e45e32d0d63ad6ae9a into 9d0897942951a808a0c7b3372c072de05b4e6cf0 --- sdk/sql/azure-mgmt-sql/_meta.json | 6 +- .../azure/mgmt/sql/_metadata.json | 2 +- .../azure/mgmt/sql/_sql_management_client.py | 10 ++-- .../azure-mgmt-sql/azure/mgmt/sql/_version.py | 2 +- .../mgmt/sql/aio/_sql_management_client.py | 10 ++-- .../azure/mgmt/sql/aio/operations/__init__.py | 4 +- .../_replication_links_operations.py | 46 ++++++++-------- .../sql/aio/operations/_servers_operations.py | 16 +++--- .../aio/operations/_sync_groups_operations.py | 4 +- .../azure/mgmt/sql/models/__init__.py | 20 ++++--- .../azure/mgmt/sql/models/_models.py | 47 ++++++++++++---- .../azure/mgmt/sql/models/_models_py3.py | 55 ++++++++++++++----- .../models/_sql_management_client_enums.py | 30 +++++++++- .../azure/mgmt/sql/operations/__init__.py | 4 +- .../_replication_links_operations.py | 46 ++++++++-------- .../sql/operations/_servers_operations.py | 16 +++--- .../sql/operations/_sync_groups_operations.py | 4 +- 17 files changed, 202 insertions(+), 120 deletions(-) diff --git a/sdk/sql/azure-mgmt-sql/_meta.json b/sdk/sql/azure-mgmt-sql/_meta.json index 73f3d6c3f8a4..a763ec80af28 100644 --- a/sdk/sql/azure-mgmt-sql/_meta.json +++ b/sdk/sql/azure-mgmt-sql/_meta.json @@ -2,10 +2,10 @@ "autorest": "3.4.2", "use": [ "@autorest/python@5.8.0", - "@autorest/modelerfour@4.19.1" + "@autorest/modelerfour@4.19.2" ], - "commit": "1c801aa70be460b277f1d81f9cced889ca5008fe", + "commit": "e65054611156edb3bcf53cdc253909ed10cf746c", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/sql/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.1 --version=3.4.2", + "autorest_command": "autorest specification/sql/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", "readme": "specification/sql/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_metadata.json b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_metadata.json index 1b930ac93a06..883eee8bbfb5 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_metadata.json +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_metadata.json @@ -195,7 +195,6 @@ "server_dns_aliases": "ServerDnsAliasesOperations", "server_keys": "ServerKeysOperations", "server_operations": "ServerOperationsOperations", - "servers": "ServersOperations", "server_security_alert_policies": "ServerSecurityAlertPoliciesOperations", "server_trust_groups": "ServerTrustGroupsOperations", "server_vulnerability_assessments": "ServerVulnerabilityAssessmentsOperations", @@ -217,6 +216,7 @@ "outbound_firewall_rules": "OutboundFirewallRulesOperations", "restorable_dropped_databases": "RestorableDroppedDatabasesOperations", "restorable_dropped_managed_databases": "RestorableDroppedManagedDatabasesOperations", + "servers": "ServersOperations", "usages": "UsagesOperations" } } \ No newline at end of file diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py index 4b81736ec8e8..edf7cf24e117 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py @@ -116,7 +116,6 @@ from .operations import ServerDnsAliasesOperations from .operations import ServerKeysOperations from .operations import ServerOperationsOperations -from .operations import ServersOperations from .operations import ServerSecurityAlertPoliciesOperations from .operations import ServerTrustGroupsOperations from .operations import ServerVulnerabilityAssessmentsOperations @@ -138,6 +137,7 @@ from .operations import OutboundFirewallRulesOperations from .operations import RestorableDroppedDatabasesOperations from .operations import RestorableDroppedManagedDatabasesOperations +from .operations import ServersOperations from .operations import UsagesOperations from . import models @@ -339,8 +339,6 @@ class SqlManagementClient(object): :vartype server_keys: azure.mgmt.sql.operations.ServerKeysOperations :ivar server_operations: ServerOperationsOperations operations :vartype server_operations: azure.mgmt.sql.operations.ServerOperationsOperations - :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.sql.operations.ServersOperations :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations :vartype server_security_alert_policies: azure.mgmt.sql.operations.ServerSecurityAlertPoliciesOperations :ivar server_trust_groups: ServerTrustGroupsOperations operations @@ -383,6 +381,8 @@ class SqlManagementClient(object): :vartype restorable_dropped_databases: azure.mgmt.sql.operations.RestorableDroppedDatabasesOperations :ivar restorable_dropped_managed_databases: RestorableDroppedManagedDatabasesOperations operations :vartype restorable_dropped_managed_databases: azure.mgmt.sql.operations.RestorableDroppedManagedDatabasesOperations + :ivar servers: ServersOperations operations + :vartype servers: azure.mgmt.sql.operations.ServersOperations :ivar usages: UsagesOperations operations :vartype usages: azure.mgmt.sql.operations.UsagesOperations :param credential: Credential needed for the client to connect to Azure. @@ -605,8 +605,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.server_operations = ServerOperationsOperations( self._client, self._config, self._serialize, self._deserialize) - self.servers = ServersOperations( - self._client, self._config, self._serialize, self._deserialize) self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( self._client, self._config, self._serialize, self._deserialize) self.server_trust_groups = ServerTrustGroupsOperations( @@ -649,6 +647,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.restorable_dropped_managed_databases = RestorableDroppedManagedDatabasesOperations( self._client, self._config, self._serialize, self._deserialize) + self.servers = ServersOperations( + self._client, self._config, self._serialize, self._deserialize) self.usages = UsagesOperations( self._client, self._config, self._serialize, self._deserialize) 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 83f24ab50946..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 = "2.1.0" +VERSION = "0.9.0" diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_sql_management_client.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_sql_management_client.py index 8f25ba4aee57..2b495b0b5624 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_sql_management_client.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_sql_management_client.py @@ -114,7 +114,6 @@ from .operations import ServerDnsAliasesOperations from .operations import ServerKeysOperations from .operations import ServerOperationsOperations -from .operations import ServersOperations from .operations import ServerSecurityAlertPoliciesOperations from .operations import ServerTrustGroupsOperations from .operations import ServerVulnerabilityAssessmentsOperations @@ -136,6 +135,7 @@ from .operations import OutboundFirewallRulesOperations from .operations import RestorableDroppedDatabasesOperations from .operations import RestorableDroppedManagedDatabasesOperations +from .operations import ServersOperations from .operations import UsagesOperations from .. import models @@ -337,8 +337,6 @@ class SqlManagementClient(object): :vartype server_keys: azure.mgmt.sql.aio.operations.ServerKeysOperations :ivar server_operations: ServerOperationsOperations operations :vartype server_operations: azure.mgmt.sql.aio.operations.ServerOperationsOperations - :ivar servers: ServersOperations operations - :vartype servers: azure.mgmt.sql.aio.operations.ServersOperations :ivar server_security_alert_policies: ServerSecurityAlertPoliciesOperations operations :vartype server_security_alert_policies: azure.mgmt.sql.aio.operations.ServerSecurityAlertPoliciesOperations :ivar server_trust_groups: ServerTrustGroupsOperations operations @@ -381,6 +379,8 @@ class SqlManagementClient(object): :vartype restorable_dropped_databases: azure.mgmt.sql.aio.operations.RestorableDroppedDatabasesOperations :ivar restorable_dropped_managed_databases: RestorableDroppedManagedDatabasesOperations operations :vartype restorable_dropped_managed_databases: azure.mgmt.sql.aio.operations.RestorableDroppedManagedDatabasesOperations + :ivar servers: ServersOperations operations + :vartype servers: azure.mgmt.sql.aio.operations.ServersOperations :ivar usages: UsagesOperations operations :vartype usages: azure.mgmt.sql.aio.operations.UsagesOperations :param credential: Credential needed for the client to connect to Azure. @@ -602,8 +602,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.server_operations = ServerOperationsOperations( self._client, self._config, self._serialize, self._deserialize) - self.servers = ServersOperations( - self._client, self._config, self._serialize, self._deserialize) self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations( self._client, self._config, self._serialize, self._deserialize) self.server_trust_groups = ServerTrustGroupsOperations( @@ -646,6 +644,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.restorable_dropped_managed_databases = RestorableDroppedManagedDatabasesOperations( self._client, self._config, self._serialize, self._deserialize) + self.servers = ServersOperations( + self._client, self._config, self._serialize, self._deserialize) self.usages = UsagesOperations( self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/__init__.py index eec1a7bd1b91..1b23edce4eab 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/__init__.py @@ -103,7 +103,6 @@ from ._server_dns_aliases_operations import ServerDnsAliasesOperations from ._server_keys_operations import ServerKeysOperations from ._server_operations_operations import ServerOperationsOperations -from ._servers_operations import ServersOperations from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations from ._server_trust_groups_operations import ServerTrustGroupsOperations from ._server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations @@ -125,6 +124,7 @@ from ._outbound_firewall_rules_operations import OutboundFirewallRulesOperations from ._restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations from ._restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations +from ._servers_operations import ServersOperations from ._usages_operations import UsagesOperations __all__ = [ @@ -225,7 +225,6 @@ 'ServerDnsAliasesOperations', 'ServerKeysOperations', 'ServerOperationsOperations', - 'ServersOperations', 'ServerSecurityAlertPoliciesOperations', 'ServerTrustGroupsOperations', 'ServerVulnerabilityAssessmentsOperations', @@ -247,5 +246,6 @@ 'OutboundFirewallRulesOperations', 'RestorableDroppedDatabasesOperations', 'RestorableDroppedManagedDatabasesOperations', + 'ServersOperations', 'UsagesOperations', ] diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_replication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_replication_links_operations.py index c123d5f97eae..01991aa927be 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_replication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_replication_links_operations.py @@ -486,27 +486,27 @@ def list_by_database( server_name: str, database_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ReplicationLinksListResult"]: + ) -> AsyncIterable["_models.ReplicationLinkListResult"]: """Gets a list of replication links on database. :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. :type resource_group_name: str - :param server_name: The name of the server containing the replication link. + :param server_name: The name of the server. :type server_name: str - :param database_name: The name of the database containing the replication link. + :param database_name: The name of the database. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ReplicationLinksListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.sql.models.ReplicationLinksListResult] + :return: An iterator like instance of either ReplicationLinkListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.sql.models.ReplicationLinkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationLinksListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationLinkListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -536,7 +536,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ReplicationLinksListResult', pipeline_response) + deserialized = self._deserialize('ReplicationLinkListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -564,7 +564,7 @@ async def get( resource_group_name: str, server_name: str, database_name: str, - replication_link_name: str, + link_id: str, **kwargs: Any ) -> "_models.ReplicationLink": """Gets a replication link. @@ -572,12 +572,12 @@ async def get( :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. :type resource_group_name: str - :param server_name: The name of the server containing the replication link. + :param server_name: The name of the server. :type server_name: str - :param database_name: The name of the database containing the replication link. + :param database_name: The name of the database. :type database_name: str - :param replication_link_name: The name of the replication link. - :type replication_link_name: str + :param link_id: The name of the replication link. + :type link_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ReplicationLink, or the result of cls(response) :rtype: ~azure.mgmt.sql.models.ReplicationLink @@ -588,7 +588,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" # Construct URL @@ -597,7 +597,7 @@ async def get( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'replicationLinkName': self._serialize.url("replication_link_name", replication_link_name, 'str'), + 'linkId': self._serialize.url("link_id", link_id, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -624,32 +624,32 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{replicationLinkName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}'} # type: ignore def list_by_server( self, resource_group_name: str, server_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ReplicationLinksListResult"]: + ) -> AsyncIterable["_models.ReplicationLinkListResult"]: """Gets a list of replication links. :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. :type resource_group_name: str - :param server_name: The name of the server containing the replication link. + :param server_name: The name of the server. :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 ReplicationLinksListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.sql.models.ReplicationLinksListResult] + :return: An iterator like instance of either ReplicationLinkListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.sql.models.ReplicationLinkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationLinksListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationLinkListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -678,7 +678,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ReplicationLinksListResult', pipeline_response) + deserialized = self._deserialize('ReplicationLinkListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_servers_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_servers_operations.py index 27badfdc3a96..112e6c5d3d49 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_servers_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_servers_operations.py @@ -66,7 +66,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -145,7 +145,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -324,7 +324,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -432,7 +432,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -566,7 +566,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -630,7 +630,7 @@ async def _import_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -764,7 +764,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" 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 ff03c1945865..1c7ef063c6b5 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 @@ -325,7 +325,7 @@ def list_logs( sync_group_name: str, start_time: str, end_time: str, - type: Union[str, "_models.Enum81"], + type: Union[str, "_models.Enum78"], continuation_token_parameter: Optional[str] = None, **kwargs: Any ) -> AsyncIterable["_models.SyncGroupLogListResult"]: @@ -345,7 +345,7 @@ def list_logs( :param end_time: Get logs generated before this time. :type end_time: str :param type: The types of logs to retrieve. - :type type: str or ~azure.mgmt.sql.models.Enum81 + :type type: str or ~azure.mgmt.sql.models.Enum78 :param continuation_token_parameter: The continuation token for this operation. :type continuation_token_parameter: str :keyword callable cls: A custom type or function that will be passed the direct response 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 fb48a34cc9e3..8036f7c9d652 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 @@ -237,7 +237,7 @@ from ._models_py3 import RecoverableManagedDatabase from ._models_py3 import RecoverableManagedDatabaseListResult from ._models_py3 import ReplicationLink - from ._models_py3 import ReplicationLinksListResult + from ._models_py3 import ReplicationLinkListResult from ._models_py3 import Resource from ._models_py3 import ResourceIdentity from ._models_py3 import ResourceIdentityWithUserAssignedIdentities @@ -579,7 +579,7 @@ from ._models import RecoverableManagedDatabase # type: ignore from ._models import RecoverableManagedDatabaseListResult # type: ignore from ._models import ReplicationLink # type: ignore - from ._models import ReplicationLinksListResult # type: ignore + from ._models import ReplicationLinkListResult # type: ignore from ._models import Resource # type: ignore from ._models import ResourceIdentity # type: ignore from ._models import ResourceIdentityWithUserAssignedIdentities # type: ignore @@ -729,7 +729,7 @@ ElasticPoolLicenseType, ElasticPoolState, EncryptionProtectorName, - Enum81, + Enum78, FailoverGroupReplicationRole, GeoBackupPolicyName, GeoBackupPolicyState, @@ -780,6 +780,9 @@ RecommendedActionInitiatedBy, RecommendedSensitivityLabelUpdateKind, ReplicaType, + ReplicationLinkType, + ReplicationRole, + ReplicationState, RequestedBackupStorageRedundancy, RestorableDroppedDatabasePropertiesBackupStorageRedundancy, RestoreDetailsName, @@ -796,7 +799,7 @@ SensitivityLabelUpdateKind, ServerConnectionType, ServerKeyType, - ServerPublicNetworkAccess, + ServerNetworkAccessFlag, ServerTrustGroupPropertiesTrustScopesItem, ServerWorkspaceFeature, ServiceObjectiveName, @@ -1059,7 +1062,7 @@ 'RecoverableManagedDatabase', 'RecoverableManagedDatabaseListResult', 'ReplicationLink', - 'ReplicationLinksListResult', + 'ReplicationLinkListResult', 'Resource', 'ResourceIdentity', 'ResourceIdentityWithUserAssignedIdentities', @@ -1207,7 +1210,7 @@ 'ElasticPoolLicenseType', 'ElasticPoolState', 'EncryptionProtectorName', - 'Enum81', + 'Enum78', 'FailoverGroupReplicationRole', 'GeoBackupPolicyName', 'GeoBackupPolicyState', @@ -1258,6 +1261,9 @@ 'RecommendedActionInitiatedBy', 'RecommendedSensitivityLabelUpdateKind', 'ReplicaType', + 'ReplicationLinkType', + 'ReplicationRole', + 'ReplicationState', 'RequestedBackupStorageRedundancy', 'RestorableDroppedDatabasePropertiesBackupStorageRedundancy', 'RestoreDetailsName', @@ -1274,7 +1280,7 @@ 'SensitivityLabelUpdateKind', 'ServerConnectionType', 'ServerKeyType', - 'ServerPublicNetworkAccess', + 'ServerNetworkAccessFlag', 'ServerTrustGroupPropertiesTrustScopesItem', 'ServerWorkspaceFeature', 'ServiceObjectiveName', diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py index a4f0d6da44e7..b31e47720a73 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/models/_models.py @@ -11179,22 +11179,25 @@ class ReplicationLink(ProxyResource): :vartype partner_database: str :ivar partner_location: Resource partner location. :vartype partner_location: str - :ivar role: Local replication role. - :vartype role: str - :ivar partner_role: Partner replication role. - :vartype partner_role: str + :ivar role: Local replication role. Possible values include: "Primary", "Secondary", + "NonReadableSecondary", "Source", "Copy". + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: Partner replication role. Possible values include: "Primary", "Secondary", + "NonReadableSecondary", "Source", "Copy". + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole :ivar replication_mode: Replication mode. :vartype replication_mode: str :ivar start_time: Time at which the link was created. :vartype start_time: ~datetime.datetime :ivar percent_complete: Seeding completion percentage for the link. :vartype percent_complete: int - :ivar replication_state: Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). - :vartype replication_state: str + :ivar replication_state: Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). Possible + values include: "PENDING", "SEEDING", "CATCH_UP", "SUSPENDED". + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState :ivar is_termination_allowed: Whether the user is currently allowed to terminate the link. :vartype is_termination_allowed: bool - :ivar link_type: Link type (GEO, NAMED). - :vartype link_type: str + :ivar link_type: Link type (GEO, NAMED). Possible values include: "GEO", "NAMED". + :vartype link_type: str or ~azure.mgmt.sql.models.ReplicationLinkType """ _validation = { @@ -11249,7 +11252,7 @@ def __init__( self.link_type = None -class ReplicationLinksListResult(msrest.serialization.Model): +class ReplicationLinkListResult(msrest.serialization.Model): """A list of replication links. Variables are only populated by the server, and will be ignored when sending a request. @@ -11274,7 +11277,7 @@ def __init__( self, **kwargs ): - super(ReplicationLinksListResult, self).__init__(**kwargs) + super(ReplicationLinkListResult, self).__init__(**kwargs) self.value = None self.next_link = None @@ -12084,17 +12087,23 @@ class Server(TrackedResource): :param public_network_access: Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.sql.models.ServerPublicNetworkAccess + :type public_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag :ivar workspace_feature: Whether or not existing server has a workspace created and if it allows connection from workspace. Possible values include: "Connected", "Disconnected". :vartype workspace_feature: str or ~azure.mgmt.sql.models.ServerWorkspaceFeature :param primary_user_assigned_identity_id: The resource id of a user assigned identity to be used by default. :type primary_user_assigned_identity_id: str + :param federated_client_id: The Client id used for cross tenant CMK scenario. + :type federated_client_id: str :param key_id: A CMK URI of the key to use for encryption. :type key_id: str :param administrators: The Azure Active Directory identity of the server. :type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator + :param restrict_outbound_network_access: Whether or not to restrict outbound network access for + this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible + values include: "Enabled", "Disabled". + :type restrict_outbound_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag """ _validation = { @@ -12127,8 +12136,10 @@ class Server(TrackedResource): 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'}, 'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'}, + 'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'}, 'key_id': {'key': 'properties.keyId', 'type': 'str'}, 'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'}, + 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, } def __init__( @@ -12148,8 +12159,10 @@ def __init__( self.public_network_access = kwargs.get('public_network_access', None) self.workspace_feature = None self.primary_user_assigned_identity_id = kwargs.get('primary_user_assigned_identity_id', None) + self.federated_client_id = kwargs.get('federated_client_id', None) self.key_id = kwargs.get('key_id', None) self.administrators = kwargs.get('administrators', None) + self.restrict_outbound_network_access = kwargs.get('restrict_outbound_network_access', None) class ServerAutomaticTuning(ProxyResource): @@ -13366,17 +13379,23 @@ class ServerUpdate(msrest.serialization.Model): :param public_network_access: Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.sql.models.ServerPublicNetworkAccess + :type public_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag :ivar workspace_feature: Whether or not existing server has a workspace created and if it allows connection from workspace. Possible values include: "Connected", "Disconnected". :vartype workspace_feature: str or ~azure.mgmt.sql.models.ServerWorkspaceFeature :param primary_user_assigned_identity_id: The resource id of a user assigned identity to be used by default. :type primary_user_assigned_identity_id: str + :param federated_client_id: The Client id used for cross tenant CMK scenario. + :type federated_client_id: str :param key_id: A CMK URI of the key to use for encryption. :type key_id: str :param administrators: The Azure Active Directory identity of the server. :type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator + :param restrict_outbound_network_access: Whether or not to restrict outbound network access for + this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible + values include: "Enabled", "Disabled". + :type restrict_outbound_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag """ _validation = { @@ -13399,8 +13418,10 @@ class ServerUpdate(msrest.serialization.Model): 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'}, 'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'}, + 'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'}, 'key_id': {'key': 'properties.keyId', 'type': 'str'}, 'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'}, + 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, } def __init__( @@ -13420,8 +13441,10 @@ def __init__( self.public_network_access = kwargs.get('public_network_access', None) self.workspace_feature = None self.primary_user_assigned_identity_id = kwargs.get('primary_user_assigned_identity_id', None) + self.federated_client_id = kwargs.get('federated_client_id', None) self.key_id = kwargs.get('key_id', None) self.administrators = kwargs.get('administrators', None) + self.restrict_outbound_network_access = kwargs.get('restrict_outbound_network_access', None) class ServerUsage(msrest.serialization.Model): 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 23976b7d80b6..54340db678a9 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 @@ -11764,22 +11764,25 @@ class ReplicationLink(ProxyResource): :vartype partner_database: str :ivar partner_location: Resource partner location. :vartype partner_location: str - :ivar role: Local replication role. - :vartype role: str - :ivar partner_role: Partner replication role. - :vartype partner_role: str + :ivar role: Local replication role. Possible values include: "Primary", "Secondary", + "NonReadableSecondary", "Source", "Copy". + :vartype role: str or ~azure.mgmt.sql.models.ReplicationRole + :ivar partner_role: Partner replication role. Possible values include: "Primary", "Secondary", + "NonReadableSecondary", "Source", "Copy". + :vartype partner_role: str or ~azure.mgmt.sql.models.ReplicationRole :ivar replication_mode: Replication mode. :vartype replication_mode: str :ivar start_time: Time at which the link was created. :vartype start_time: ~datetime.datetime :ivar percent_complete: Seeding completion percentage for the link. :vartype percent_complete: int - :ivar replication_state: Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). - :vartype replication_state: str + :ivar replication_state: Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). Possible + values include: "PENDING", "SEEDING", "CATCH_UP", "SUSPENDED". + :vartype replication_state: str or ~azure.mgmt.sql.models.ReplicationState :ivar is_termination_allowed: Whether the user is currently allowed to terminate the link. :vartype is_termination_allowed: bool - :ivar link_type: Link type (GEO, NAMED). - :vartype link_type: str + :ivar link_type: Link type (GEO, NAMED). Possible values include: "GEO", "NAMED". + :vartype link_type: str or ~azure.mgmt.sql.models.ReplicationLinkType """ _validation = { @@ -11834,7 +11837,7 @@ def __init__( self.link_type = None -class ReplicationLinksListResult(msrest.serialization.Model): +class ReplicationLinkListResult(msrest.serialization.Model): """A list of replication links. Variables are only populated by the server, and will be ignored when sending a request. @@ -11859,7 +11862,7 @@ def __init__( self, **kwargs ): - super(ReplicationLinksListResult, self).__init__(**kwargs) + super(ReplicationLinkListResult, self).__init__(**kwargs) self.value = None self.next_link = None @@ -12701,17 +12704,23 @@ class Server(TrackedResource): :param public_network_access: Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.sql.models.ServerPublicNetworkAccess + :type public_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag :ivar workspace_feature: Whether or not existing server has a workspace created and if it allows connection from workspace. Possible values include: "Connected", "Disconnected". :vartype workspace_feature: str or ~azure.mgmt.sql.models.ServerWorkspaceFeature :param primary_user_assigned_identity_id: The resource id of a user assigned identity to be used by default. :type primary_user_assigned_identity_id: str + :param federated_client_id: The Client id used for cross tenant CMK scenario. + :type federated_client_id: str :param key_id: A CMK URI of the key to use for encryption. :type key_id: str :param administrators: The Azure Active Directory identity of the server. :type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator + :param restrict_outbound_network_access: Whether or not to restrict outbound network access for + this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible + values include: "Enabled", "Disabled". + :type restrict_outbound_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag """ _validation = { @@ -12744,8 +12753,10 @@ class Server(TrackedResource): 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'}, 'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'}, + 'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'}, 'key_id': {'key': 'properties.keyId', 'type': 'str'}, 'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'}, + 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, } def __init__( @@ -12758,10 +12769,12 @@ def __init__( administrator_login_password: Optional[str] = None, version: Optional[str] = None, minimal_tls_version: Optional[str] = None, - public_network_access: Optional[Union[str, "ServerPublicNetworkAccess"]] = None, + public_network_access: Optional[Union[str, "ServerNetworkAccessFlag"]] = None, primary_user_assigned_identity_id: Optional[str] = None, + federated_client_id: Optional[str] = None, key_id: Optional[str] = None, administrators: Optional["ServerExternalAdministrator"] = None, + restrict_outbound_network_access: Optional[Union[str, "ServerNetworkAccessFlag"]] = None, **kwargs ): super(Server, self).__init__(location=location, tags=tags, **kwargs) @@ -12777,8 +12790,10 @@ def __init__( self.public_network_access = public_network_access self.workspace_feature = None self.primary_user_assigned_identity_id = primary_user_assigned_identity_id + self.federated_client_id = federated_client_id self.key_id = key_id self.administrators = administrators + self.restrict_outbound_network_access = restrict_outbound_network_access class ServerAutomaticTuning(ProxyResource): @@ -14053,17 +14068,23 @@ class ServerUpdate(msrest.serialization.Model): :param public_network_access: Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.sql.models.ServerPublicNetworkAccess + :type public_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag :ivar workspace_feature: Whether or not existing server has a workspace created and if it allows connection from workspace. Possible values include: "Connected", "Disconnected". :vartype workspace_feature: str or ~azure.mgmt.sql.models.ServerWorkspaceFeature :param primary_user_assigned_identity_id: The resource id of a user assigned identity to be used by default. :type primary_user_assigned_identity_id: str + :param federated_client_id: The Client id used for cross tenant CMK scenario. + :type federated_client_id: str :param key_id: A CMK URI of the key to use for encryption. :type key_id: str :param administrators: The Azure Active Directory identity of the server. :type administrators: ~azure.mgmt.sql.models.ServerExternalAdministrator + :param restrict_outbound_network_access: Whether or not to restrict outbound network access for + this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible + values include: "Enabled", "Disabled". + :type restrict_outbound_network_access: str or ~azure.mgmt.sql.models.ServerNetworkAccessFlag """ _validation = { @@ -14086,8 +14107,10 @@ class ServerUpdate(msrest.serialization.Model): 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'workspace_feature': {'key': 'properties.workspaceFeature', 'type': 'str'}, 'primary_user_assigned_identity_id': {'key': 'properties.primaryUserAssignedIdentityId', 'type': 'str'}, + 'federated_client_id': {'key': 'properties.federatedClientId', 'type': 'str'}, 'key_id': {'key': 'properties.keyId', 'type': 'str'}, 'administrators': {'key': 'properties.administrators', 'type': 'ServerExternalAdministrator'}, + 'restrict_outbound_network_access': {'key': 'properties.restrictOutboundNetworkAccess', 'type': 'str'}, } def __init__( @@ -14099,10 +14122,12 @@ def __init__( administrator_login_password: Optional[str] = None, version: Optional[str] = None, minimal_tls_version: Optional[str] = None, - public_network_access: Optional[Union[str, "ServerPublicNetworkAccess"]] = None, + public_network_access: Optional[Union[str, "ServerNetworkAccessFlag"]] = None, primary_user_assigned_identity_id: Optional[str] = None, + federated_client_id: Optional[str] = None, key_id: Optional[str] = None, administrators: Optional["ServerExternalAdministrator"] = None, + restrict_outbound_network_access: Optional[Union[str, "ServerNetworkAccessFlag"]] = None, **kwargs ): super(ServerUpdate, self).__init__(**kwargs) @@ -14118,8 +14143,10 @@ def __init__( self.public_network_access = public_network_access self.workspace_feature = None self.primary_user_assigned_identity_id = primary_user_assigned_identity_id + self.federated_client_id = federated_client_id self.key_id = key_id self.administrators = administrators + self.restrict_outbound_network_access = restrict_outbound_network_access class ServerUsage(msrest.serialization.Model): 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 795b3fc170c9..507465a4fd30 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 @@ -402,7 +402,7 @@ class EncryptionProtectorName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum CURRENT = "current" -class Enum81(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Enum78(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ALL = "All" ERROR = "Error" @@ -818,6 +818,32 @@ class RecommendedSensitivityLabelUpdateKind(with_metaclass(_CaseInsensitiveEnumM ENABLE = "enable" DISABLE = "disable" +class ReplicationLinkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Link type (GEO, NAMED). + """ + + GEO = "GEO" + NAMED = "NAMED" + +class ReplicationRole(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Local replication role. + """ + + PRIMARY = "Primary" + SECONDARY = "Secondary" + NON_READABLE_SECONDARY = "NonReadableSecondary" + SOURCE = "Source" + COPY = "Copy" + +class ReplicationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). + """ + + PENDING = "PENDING" + SEEDING = "SEEDING" + CATCH_UP = "CATCH_UP" + SUSPENDED = "SUSPENDED" + class ReplicaType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PRIMARY = "Primary" @@ -931,7 +957,7 @@ class ServerKeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SERVICE_MANAGED = "ServiceManaged" AZURE_KEY_VAULT = "AzureKeyVault" -class ServerPublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ServerNetworkAccessFlag(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' """ diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py index eec1a7bd1b91..1b23edce4eab 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/__init__.py @@ -103,7 +103,6 @@ from ._server_dns_aliases_operations import ServerDnsAliasesOperations from ._server_keys_operations import ServerKeysOperations from ._server_operations_operations import ServerOperationsOperations -from ._servers_operations import ServersOperations from ._server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations from ._server_trust_groups_operations import ServerTrustGroupsOperations from ._server_vulnerability_assessments_operations import ServerVulnerabilityAssessmentsOperations @@ -125,6 +124,7 @@ from ._outbound_firewall_rules_operations import OutboundFirewallRulesOperations from ._restorable_dropped_databases_operations import RestorableDroppedDatabasesOperations from ._restorable_dropped_managed_databases_operations import RestorableDroppedManagedDatabasesOperations +from ._servers_operations import ServersOperations from ._usages_operations import UsagesOperations __all__ = [ @@ -225,7 +225,6 @@ 'ServerDnsAliasesOperations', 'ServerKeysOperations', 'ServerOperationsOperations', - 'ServersOperations', 'ServerSecurityAlertPoliciesOperations', 'ServerTrustGroupsOperations', 'ServerVulnerabilityAssessmentsOperations', @@ -247,5 +246,6 @@ 'OutboundFirewallRulesOperations', 'RestorableDroppedDatabasesOperations', 'RestorableDroppedManagedDatabasesOperations', + 'ServersOperations', 'UsagesOperations', ] diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py index 64021630cd4e..648466320818 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_replication_links_operations.py @@ -498,27 +498,27 @@ def list_by_database( database_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ReplicationLinksListResult"] + # type: (...) -> Iterable["_models.ReplicationLinkListResult"] """Gets a list of replication links on database. :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. :type resource_group_name: str - :param server_name: The name of the server containing the replication link. + :param server_name: The name of the server. :type server_name: str - :param database_name: The name of the database containing the replication link. + :param database_name: The name of the database. :type database_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ReplicationLinksListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.sql.models.ReplicationLinksListResult] + :return: An iterator like instance of either ReplicationLinkListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.sql.models.ReplicationLinkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationLinksListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationLinkListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -548,7 +548,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ReplicationLinksListResult', pipeline_response) + deserialized = self._deserialize('ReplicationLinkListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -576,7 +576,7 @@ def get( resource_group_name, # type: str server_name, # type: str database_name, # type: str - replication_link_name, # type: str + link_id, # type: str **kwargs # type: Any ): # type: (...) -> "_models.ReplicationLink" @@ -585,12 +585,12 @@ def get( :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. :type resource_group_name: str - :param server_name: The name of the server containing the replication link. + :param server_name: The name of the server. :type server_name: str - :param database_name: The name of the database containing the replication link. + :param database_name: The name of the database. :type database_name: str - :param replication_link_name: The name of the replication link. - :type replication_link_name: str + :param link_id: The name of the replication link. + :type link_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ReplicationLink, or the result of cls(response) :rtype: ~azure.mgmt.sql.models.ReplicationLink @@ -601,7 +601,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" # Construct URL @@ -610,7 +610,7 @@ def get( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serverName': self._serialize.url("server_name", server_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'replicationLinkName': self._serialize.url("replication_link_name", replication_link_name, 'str'), + 'linkId': self._serialize.url("link_id", link_id, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -637,7 +637,7 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{replicationLinkName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}'} # type: ignore def list_by_server( self, @@ -645,25 +645,25 @@ def list_by_server( server_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ReplicationLinksListResult"] + # type: (...) -> Iterable["_models.ReplicationLinkListResult"] """Gets a list of replication links. :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. :type resource_group_name: str - :param server_name: The name of the server containing the replication link. + :param server_name: The name of the server. :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 ReplicationLinksListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.sql.models.ReplicationLinksListResult] + :return: An iterator like instance of either ReplicationLinkListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.sql.models.ReplicationLinkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationLinksListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationLinkListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -692,7 +692,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ReplicationLinksListResult', pipeline_response) + deserialized = self._deserialize('ReplicationLinkListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) diff --git a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py index b562c9484930..96a82d70fa4d 100644 --- a/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py +++ b/sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_servers_operations.py @@ -71,7 +71,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -151,7 +151,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" # Construct URL @@ -202,7 +202,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,7 +333,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -443,7 +443,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -579,7 +579,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -644,7 +644,7 @@ def _import_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -780,7 +780,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-11-01-preview" + api_version = "2021-02-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" 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 549c1297970f..4e7bafcbc46f 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 @@ -333,7 +333,7 @@ def list_logs( sync_group_name, # type: str start_time, # type: str end_time, # type: str - type, # type: Union[str, "_models.Enum81"] + type, # type: Union[str, "_models.Enum78"] continuation_token_parameter=None, # type: Optional[str] **kwargs # type: Any ): @@ -354,7 +354,7 @@ def list_logs( :param end_time: Get logs generated before this time. :type end_time: str :param type: The types of logs to retrieve. - :type type: str or ~azure.mgmt.sql.models.Enum81 + :type type: str or ~azure.mgmt.sql.models.Enum78 :param continuation_token_parameter: The continuation token for this operation. :type continuation_token_parameter: str :keyword callable cls: A custom type or function that will be passed the direct response