Skip to content

Commit

Permalink
CodeGen from PR 24335 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Hub Generated] Publish private branch 'dev/alzahedi/update_arc_sql_mi_spec' (Azure#24335)

* Updated spec for arc sql mi to include security and network settings

* Fixed prettier issues

* Resolved spell checks
  • Loading branch information
SDKAuto committed Jun 8, 2023
1 parent eef79fc commit c644593
Show file tree
Hide file tree
Showing 67 changed files with 4,510 additions and 681 deletions.
6 changes: 3 additions & 3 deletions sdk/azurearcdata/azure-mgmt-azurearcdata/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "be6cd9ccfcb6ba08c1c206627026eabfbff31fc1",
"commit": "fd328e4b482537e9de0a425e768cd861eca43beb",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.2.7",
"@autorest/python@6.5.0",
"@autorest/modelerfour@4.24.3"
],
"autorest_command": "autorest specification/azurearcdata/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/azurearcdata/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.5.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/azurearcdata/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
from .operations import (
ActiveDirectoryConnectorsOperations,
DataControllersOperations,
FailoverGroupsOperations,
Operations,
PostgresInstancesOperations,
SqlManagedInstancesOperations,
SqlServerDatabasesOperations,
SqlServerInstancesOperations,
)

Expand All @@ -29,7 +31,7 @@
from azure.core.credentials import TokenCredential


class AzureArcDataManagementClient: # pylint: disable=client-accepts-api-version-keyword
class AzureArcDataManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""The AzureArcData management API provides a RESTful set of web APIs to manage Azure Data
Services on Azure Arc Resources.
Expand All @@ -38,6 +40,8 @@ class AzureArcDataManagementClient: # pylint: disable=client-accepts-api-versio
:ivar sql_managed_instances: SqlManagedInstancesOperations operations
:vartype sql_managed_instances:
azure.mgmt.azurearcdata.operations.SqlManagedInstancesOperations
:ivar failover_groups: FailoverGroupsOperations operations
:vartype failover_groups: azure.mgmt.azurearcdata.operations.FailoverGroupsOperations
:ivar sql_server_instances: SqlServerInstancesOperations operations
:vartype sql_server_instances: azure.mgmt.azurearcdata.operations.SqlServerInstancesOperations
:ivar data_controllers: DataControllersOperations operations
Expand All @@ -47,13 +51,15 @@ class AzureArcDataManagementClient: # pylint: disable=client-accepts-api-versio
azure.mgmt.azurearcdata.operations.ActiveDirectoryConnectorsOperations
:ivar postgres_instances: PostgresInstancesOperations operations
:vartype postgres_instances: azure.mgmt.azurearcdata.operations.PostgresInstancesOperations
:ivar sql_server_databases: SqlServerDatabasesOperations operations
:vartype sql_server_databases: azure.mgmt.azurearcdata.operations.SqlServerDatabasesOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the Azure subscription. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2022-03-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-01-15-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand All @@ -70,7 +76,7 @@ def __init__(
self._config = AzureArcDataManagementClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand All @@ -80,6 +86,7 @@ def __init__(
self.sql_managed_instances = SqlManagedInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.failover_groups = FailoverGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
self.sql_server_instances = SqlServerInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand All @@ -92,6 +99,9 @@ def __init__(
self.postgres_instances = PostgresInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.sql_server_databases = SqlServerDatabasesOperations(
self._client, self._config, self._serialize, self._deserialize
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down Expand Up @@ -122,5 +132,5 @@ def __enter__(self) -> "AzureArcDataManagementClient":
self._client.__enter__()
return self

def __exit__(self, *exc_details) -> None:
def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -35,14 +29,14 @@ class AzureArcDataManagementClientConfiguration(Configuration): # pylint: disab
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the Azure subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2022-03-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-01-15-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(AzureArcDataManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2022-03-01-preview"] = kwargs.pop("api_version", "2022-03-01-preview")
api_version: str = kwargs.pop("api_version", "2023-01-15-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Loading

0 comments on commit c644593

Please sign in to comment.