Skip to content

Commit a3dd882

Browse files
committed
Adding custom SDK from azure-rest-api-specs PR
1 parent 207cad1 commit a3dd882

File tree

103 files changed

+4945
-2097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4945
-2097
lines changed

src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._cosmos_db_management_client import CosmosDBManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._cosmos_db_management_client import CosmosDBManagementClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"CosmosDBManagementClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_configuration.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,26 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for CosmosDBManagementClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
2524
attributes.
2625
2726
:param credential: Credential needed for the client to connect to Azure. Required.
2827
:type credential: ~azure.core.credentials.TokenCredential
29-
:param subscription_id: The ID of the target subscription. Required.
28+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
30+
:keyword api_version: Api Version. Default value is "2024-12-01-preview". Note that overriding
3231
this default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-09-01-preview")
36+
api_version: str = kwargs.pop("api_version", "2024-12-01-preview")
3837

3938
if credential is None:
4039
raise ValueError("Parameter 'credential' must not be None.")

src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/_cosmos_db_management_client.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@
6767
)
6868

6969
if TYPE_CHECKING:
70-
# pylint: disable=unused-import,ungrouped-imports
7170
from azure.core.credentials import TokenCredential
7271

7372

74-
class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
75-
"""Azure Cosmos DB Database Service Resource Provider REST API.
73+
class CosmosDBManagementClient: # pylint: disable=too-many-instance-attributes
74+
"""Azure Cosmos DB Chaos Fault REST API.
7675
76+
:ivar chaos_fault: ChaosFaultOperations operations
77+
:vartype chaos_fault: azure.mgmt.cosmosdb.operations.ChaosFaultOperations
7778
:ivar database_accounts: DatabaseAccountsOperations operations
7879
:vartype database_accounts: azure.mgmt.cosmosdb.operations.DatabaseAccountsOperations
7980
:ivar operations: Operations operations
@@ -182,15 +183,13 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
182183
:ivar throughput_pool_account: ThroughputPoolAccountOperations operations
183184
:vartype throughput_pool_account:
184185
azure.mgmt.cosmosdb.operations.ThroughputPoolAccountOperations
185-
:ivar chaos_fault: ChaosFaultOperations operations
186-
:vartype chaos_fault: azure.mgmt.cosmosdb.operations.ChaosFaultOperations
187186
:param credential: Credential needed for the client to connect to Azure. Required.
188187
:type credential: ~azure.core.credentials.TokenCredential
189-
:param subscription_id: The ID of the target subscription. Required.
188+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
190189
:type subscription_id: str
191190
:param base_url: Service URL. Default value is "https://management.azure.com".
192191
:type base_url: str
193-
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
192+
:keyword api_version: Api Version. Default value is "2024-12-01-preview". Note that overriding
194193
this default value may result in unsupported behavior.
195194
:paramtype api_version: str
196195
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -231,6 +230,7 @@ def __init__(
231230
self._serialize = Serializer(client_models)
232231
self._deserialize = Deserializer(client_models)
233232
self._serialize.client_side_validation = False
233+
self.chaos_fault = ChaosFaultOperations(self._client, self._config, self._serialize, self._deserialize)
234234
self.database_accounts = DatabaseAccountsOperations(
235235
self._client, self._config, self._serialize, self._deserialize
236236
)
@@ -343,7 +343,6 @@ def __init__(
343343
self.throughput_pool_account = ThroughputPoolAccountOperations(
344344
self._client, self._config, self._serialize, self._deserialize
345345
)
346-
self.chaos_fault = ChaosFaultOperations(self._client, self._config, self._serialize, self._deserialize)
347346

348347
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
349348
"""Runs the network request through the client's chained policies.

0 commit comments

Comments
 (0)