Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/sql/azure-mgmt-sql/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 1 addition & 1 deletion sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -217,6 +216,7 @@
"outbound_firewall_rules": "OutboundFirewallRulesOperations",
"restorable_dropped_databases": "RestorableDroppedDatabasesOperations",
"restorable_dropped_managed_databases": "RestorableDroppedManagedDatabasesOperations",
"servers": "ServersOperations",
"usages": "UsagesOperations"
}
}
10 changes: 5 additions & 5 deletions sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)

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

VERSION = "2.1.0"
VERSION = "0.9.0"
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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__ = [
Expand Down Expand Up @@ -225,7 +225,6 @@
'ServerDnsAliasesOperations',
'ServerKeysOperations',
'ServerOperationsOperations',
'ServersOperations',
'ServerSecurityAlertPoliciesOperations',
'ServerTrustGroupsOperations',
'ServerVulnerabilityAssessmentsOperations',
Expand All @@ -247,5 +246,6 @@
'OutboundFirewallRulesOperations',
'RestorableDroppedDatabasesOperations',
'RestorableDroppedManagedDatabasesOperations',
'ServersOperations',
'UsagesOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -564,20 +564,20 @@ 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.

: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
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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):
Expand Down Expand Up @@ -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)
Expand Down
Loading