Skip to content

Commit 2a2841e

Browse files
author
SDKAuto
committed
CodeGen from PR 33973 in Azure/azure-rest-api-specs
Merge 0302616ae8c4de5c1e217c7e4e9ddc28ff6ec8ec into b80151d5b8b7784d08a689bb040bfd0563aa3afb
1 parent cf1e8bd commit 2a2841e

File tree

175 files changed

+41616
-28435
lines changed

Some content is hidden

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

175 files changed

+41616
-28435
lines changed

sdk/oracledatabase/azure-mgmt-oracledatabase/CHANGELOG.md

Lines changed: 437 additions & 0 deletions
Large diffs are not rendered by default.

sdk/oracledatabase/azure-mgmt-oracledatabase/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Oracledatabase Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
{
2-
"commit": "a83c34348fbd25ad79a05e36816b91da0122b583",
2+
"commit": "5a8968865528cdd12056cababe827ac0a7c584ed",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.10.2",
5-
"use": [
6-
"@autorest/[email protected]",
7-
"@autorest/[email protected]"
8-
],
9-
"autorest_command": "autorest specification/oracle/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/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
10-
"readme": "specification/oracle/resource-manager/readme.md"
4+
"typespec_src": "specification/oracle/Oracle.Database.Management",
5+
"@azure-tools/typespec-python": "0.42.3"
116
}

sdk/oracledatabase/azure-mgmt-oracledatabase/apiview-properties.json

Lines changed: 258 additions & 0 deletions
Large diffs are not rendered by default.

sdk/oracledatabase/azure-mgmt-oracledatabase/azure/mgmt/oracledatabase/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,31 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python 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 ._oracle_database_mgmt_client import OracleDatabaseMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import OracleDatabaseMgmtClient # 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
"OracleDatabaseMgmtClient",
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()
Lines changed: 91 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
1415
from azure.mgmt.core import ARMPipelineClient
1516
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1617

17-
from . import models as _models
1818
from ._configuration import OracleDatabaseMgmtClientConfiguration
1919
from ._serialization import Deserializer, Serializer
2020
from .operations import (
@@ -30,31 +30,65 @@
3030
DbSystemShapesOperations,
3131
DnsPrivateViewsOperations,
3232
DnsPrivateZonesOperations,
33+
ExadbVmClustersOperations,
34+
ExascaleDbNodesOperations,
35+
ExascaleDbStorageVaultsOperations,
36+
FlexComponentsOperations,
37+
GiMinorVersionsOperations,
3338
GiVersionsOperations,
39+
ListActionsOperations,
3440
Operations,
3541
OracleSubscriptionsOperations,
3642
SystemVersionsOperations,
3743
VirtualNetworkAddressesOperations,
3844
)
3945

4046
if TYPE_CHECKING:
41-
# pylint: disable=unused-import,ungrouped-imports
4247
from azure.core.credentials import TokenCredential
4348

4449

45-
class OracleDatabaseMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
50+
class OracleDatabaseMgmtClient: # pylint: disable=too-many-instance-attributes
4651
"""OracleDatabaseMgmtClient.
4752
4853
:ivar operations: Operations operations
4954
:vartype operations: azure.mgmt.oracledatabase.operations.Operations
50-
:ivar autonomous_databases: AutonomousDatabasesOperations operations
51-
:vartype autonomous_databases:
52-
azure.mgmt.oracledatabase.operations.AutonomousDatabasesOperations
5355
:ivar cloud_exadata_infrastructures: CloudExadataInfrastructuresOperations operations
5456
:vartype cloud_exadata_infrastructures:
5557
azure.mgmt.oracledatabase.operations.CloudExadataInfrastructuresOperations
58+
:ivar list_actions: ListActionsOperations operations
59+
:vartype list_actions: azure.mgmt.oracledatabase.operations.ListActionsOperations
60+
:ivar db_servers: DbServersOperations operations
61+
:vartype db_servers: azure.mgmt.oracledatabase.operations.DbServersOperations
5662
:ivar cloud_vm_clusters: CloudVmClustersOperations operations
5763
:vartype cloud_vm_clusters: azure.mgmt.oracledatabase.operations.CloudVmClustersOperations
64+
:ivar virtual_network_addresses: VirtualNetworkAddressesOperations operations
65+
:vartype virtual_network_addresses:
66+
azure.mgmt.oracledatabase.operations.VirtualNetworkAddressesOperations
67+
:ivar system_versions: SystemVersionsOperations operations
68+
:vartype system_versions: azure.mgmt.oracledatabase.operations.SystemVersionsOperations
69+
:ivar oracle_subscriptions: OracleSubscriptionsOperations operations
70+
:vartype oracle_subscriptions:
71+
azure.mgmt.oracledatabase.operations.OracleSubscriptionsOperations
72+
:ivar db_nodes: DbNodesOperations operations
73+
:vartype db_nodes: azure.mgmt.oracledatabase.operations.DbNodesOperations
74+
:ivar gi_versions: GiVersionsOperations operations
75+
:vartype gi_versions: azure.mgmt.oracledatabase.operations.GiVersionsOperations
76+
:ivar gi_minor_versions: GiMinorVersionsOperations operations
77+
:vartype gi_minor_versions: azure.mgmt.oracledatabase.operations.GiMinorVersionsOperations
78+
:ivar db_system_shapes: DbSystemShapesOperations operations
79+
:vartype db_system_shapes: azure.mgmt.oracledatabase.operations.DbSystemShapesOperations
80+
:ivar dns_private_views: DnsPrivateViewsOperations operations
81+
:vartype dns_private_views: azure.mgmt.oracledatabase.operations.DnsPrivateViewsOperations
82+
:ivar dns_private_zones: DnsPrivateZonesOperations operations
83+
:vartype dns_private_zones: azure.mgmt.oracledatabase.operations.DnsPrivateZonesOperations
84+
:ivar flex_components: FlexComponentsOperations operations
85+
:vartype flex_components: azure.mgmt.oracledatabase.operations.FlexComponentsOperations
86+
:ivar autonomous_databases: AutonomousDatabasesOperations operations
87+
:vartype autonomous_databases:
88+
azure.mgmt.oracledatabase.operations.AutonomousDatabasesOperations
89+
:ivar autonomous_database_backups: AutonomousDatabaseBackupsOperations operations
90+
:vartype autonomous_database_backups:
91+
azure.mgmt.oracledatabase.operations.AutonomousDatabaseBackupsOperations
5892
:ivar autonomous_database_character_sets: AutonomousDatabaseCharacterSetsOperations operations
5993
:vartype autonomous_database_character_sets:
6094
azure.mgmt.oracledatabase.operations.AutonomousDatabaseCharacterSetsOperations
@@ -65,37 +99,21 @@ class OracleDatabaseMgmtClient: # pylint: disable=client-accepts-api-version-ke
6599
:ivar autonomous_database_versions: AutonomousDatabaseVersionsOperations operations
66100
:vartype autonomous_database_versions:
67101
azure.mgmt.oracledatabase.operations.AutonomousDatabaseVersionsOperations
68-
:ivar db_system_shapes: DbSystemShapesOperations operations
69-
:vartype db_system_shapes: azure.mgmt.oracledatabase.operations.DbSystemShapesOperations
70-
:ivar dns_private_views: DnsPrivateViewsOperations operations
71-
:vartype dns_private_views: azure.mgmt.oracledatabase.operations.DnsPrivateViewsOperations
72-
:ivar dns_private_zones: DnsPrivateZonesOperations operations
73-
:vartype dns_private_zones: azure.mgmt.oracledatabase.operations.DnsPrivateZonesOperations
74-
:ivar gi_versions: GiVersionsOperations operations
75-
:vartype gi_versions: azure.mgmt.oracledatabase.operations.GiVersionsOperations
76-
:ivar system_versions: SystemVersionsOperations operations
77-
:vartype system_versions: azure.mgmt.oracledatabase.operations.SystemVersionsOperations
78-
:ivar oracle_subscriptions: OracleSubscriptionsOperations operations
79-
:vartype oracle_subscriptions:
80-
azure.mgmt.oracledatabase.operations.OracleSubscriptionsOperations
81-
:ivar autonomous_database_backups: AutonomousDatabaseBackupsOperations operations
82-
:vartype autonomous_database_backups:
83-
azure.mgmt.oracledatabase.operations.AutonomousDatabaseBackupsOperations
84-
:ivar db_servers: DbServersOperations operations
85-
:vartype db_servers: azure.mgmt.oracledatabase.operations.DbServersOperations
86-
:ivar db_nodes: DbNodesOperations operations
87-
:vartype db_nodes: azure.mgmt.oracledatabase.operations.DbNodesOperations
88-
:ivar virtual_network_addresses: VirtualNetworkAddressesOperations operations
89-
:vartype virtual_network_addresses:
90-
azure.mgmt.oracledatabase.operations.VirtualNetworkAddressesOperations
91-
:param credential: Credential needed for the client to connect to Azure. Required.
102+
:ivar exadb_vm_clusters: ExadbVmClustersOperations operations
103+
:vartype exadb_vm_clusters: azure.mgmt.oracledatabase.operations.ExadbVmClustersOperations
104+
:ivar exascale_db_nodes: ExascaleDbNodesOperations operations
105+
:vartype exascale_db_nodes: azure.mgmt.oracledatabase.operations.ExascaleDbNodesOperations
106+
:ivar exascale_db_storage_vaults: ExascaleDbStorageVaultsOperations operations
107+
:vartype exascale_db_storage_vaults:
108+
azure.mgmt.oracledatabase.operations.ExascaleDbStorageVaultsOperations
109+
:param credential: Credential used to authenticate requests to the service. Required.
92110
:type credential: ~azure.core.credentials.TokenCredential
93111
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
94112
:type subscription_id: str
95-
:param base_url: Service URL. Default value is "https://management.azure.com".
113+
:param base_url: Service host. Default value is "https://management.azure.com".
96114
:type base_url: str
97-
:keyword api_version: Api Version. Default value is "2023-09-01". Note that overriding this
98-
default value may result in unsupported behavior.
115+
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
116+
Note that overriding this default value may result in unsupported behavior.
99117
:paramtype api_version: str
100118
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
101119
Retry-After header is present.
@@ -108,8 +126,9 @@ def __init__(
108126
base_url: str = "https://management.azure.com",
109127
**kwargs: Any
110128
) -> None:
129+
_endpoint = "{endpoint}"
111130
self._config = OracleDatabaseMgmtClientConfiguration(
112-
credential=credential, subscription_id=subscription_id, **kwargs
131+
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
113132
)
114133
_policies = kwargs.pop("policies", None)
115134
if _policies is None:
@@ -129,29 +148,30 @@ def __init__(
129148
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
130149
self._config.http_logging_policy,
131150
]
132-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
151+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
133152

134-
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
135-
self._serialize = Serializer(client_models)
136-
self._deserialize = Deserializer(client_models)
153+
self._serialize = Serializer()
154+
self._deserialize = Deserializer()
137155
self._serialize.client_side_validation = False
138156
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
139-
self.autonomous_databases = AutonomousDatabasesOperations(
140-
self._client, self._config, self._serialize, self._deserialize
141-
)
142157
self.cloud_exadata_infrastructures = CloudExadataInfrastructuresOperations(
143158
self._client, self._config, self._serialize, self._deserialize
144159
)
160+
self.list_actions = ListActionsOperations(self._client, self._config, self._serialize, self._deserialize)
161+
self.db_servers = DbServersOperations(self._client, self._config, self._serialize, self._deserialize)
145162
self.cloud_vm_clusters = CloudVmClustersOperations(
146163
self._client, self._config, self._serialize, self._deserialize
147164
)
148-
self.autonomous_database_character_sets = AutonomousDatabaseCharacterSetsOperations(
165+
self.virtual_network_addresses = VirtualNetworkAddressesOperations(
149166
self._client, self._config, self._serialize, self._deserialize
150167
)
151-
self.autonomous_database_national_character_sets = AutonomousDatabaseNationalCharacterSetsOperations(
168+
self.system_versions = SystemVersionsOperations(self._client, self._config, self._serialize, self._deserialize)
169+
self.oracle_subscriptions = OracleSubscriptionsOperations(
152170
self._client, self._config, self._serialize, self._deserialize
153171
)
154-
self.autonomous_database_versions = AutonomousDatabaseVersionsOperations(
172+
self.db_nodes = DbNodesOperations(self._client, self._config, self._serialize, self._deserialize)
173+
self.gi_versions = GiVersionsOperations(self._client, self._config, self._serialize, self._deserialize)
174+
self.gi_minor_versions = GiMinorVersionsOperations(
155175
self._client, self._config, self._serialize, self._deserialize
156176
)
157177
self.db_system_shapes = DbSystemShapesOperations(self._client, self._config, self._serialize, self._deserialize)
@@ -161,27 +181,39 @@ def __init__(
161181
self.dns_private_zones = DnsPrivateZonesOperations(
162182
self._client, self._config, self._serialize, self._deserialize
163183
)
164-
self.gi_versions = GiVersionsOperations(self._client, self._config, self._serialize, self._deserialize)
165-
self.system_versions = SystemVersionsOperations(self._client, self._config, self._serialize, self._deserialize)
166-
self.oracle_subscriptions = OracleSubscriptionsOperations(
184+
self.flex_components = FlexComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
185+
self.autonomous_databases = AutonomousDatabasesOperations(
167186
self._client, self._config, self._serialize, self._deserialize
168187
)
169188
self.autonomous_database_backups = AutonomousDatabaseBackupsOperations(
170189
self._client, self._config, self._serialize, self._deserialize
171190
)
172-
self.db_servers = DbServersOperations(self._client, self._config, self._serialize, self._deserialize)
173-
self.db_nodes = DbNodesOperations(self._client, self._config, self._serialize, self._deserialize)
174-
self.virtual_network_addresses = VirtualNetworkAddressesOperations(
191+
self.autonomous_database_character_sets = AutonomousDatabaseCharacterSetsOperations(
192+
self._client, self._config, self._serialize, self._deserialize
193+
)
194+
self.autonomous_database_national_character_sets = AutonomousDatabaseNationalCharacterSetsOperations(
195+
self._client, self._config, self._serialize, self._deserialize
196+
)
197+
self.autonomous_database_versions = AutonomousDatabaseVersionsOperations(
198+
self._client, self._config, self._serialize, self._deserialize
199+
)
200+
self.exadb_vm_clusters = ExadbVmClustersOperations(
201+
self._client, self._config, self._serialize, self._deserialize
202+
)
203+
self.exascale_db_nodes = ExascaleDbNodesOperations(
204+
self._client, self._config, self._serialize, self._deserialize
205+
)
206+
self.exascale_db_storage_vaults = ExascaleDbStorageVaultsOperations(
175207
self._client, self._config, self._serialize, self._deserialize
176208
)
177209

178-
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
210+
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
179211
"""Runs the network request through the client's chained policies.
180212
181213
>>> from azure.core.rest import HttpRequest
182214
>>> request = HttpRequest("GET", "https://www.example.org/")
183215
<HttpRequest [GET], url: 'https://www.example.org/'>
184-
>>> response = client._send_request(request)
216+
>>> response = client.send_request(request)
185217
<HttpResponse: 200 OK>
186218
187219
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -194,13 +226,17 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
194226
"""
195227

196228
request_copy = deepcopy(request)
197-
request_copy.url = self._client.format_url(request_copy.url)
229+
path_format_arguments = {
230+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
231+
}
232+
233+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
198234
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
199235

200236
def close(self) -> None:
201237
self._client.close()
202238

203-
def __enter__(self) -> "OracleDatabaseMgmtClient":
239+
def __enter__(self) -> Self:
204240
self._client.__enter__()
205241
return self
206242

0 commit comments

Comments
 (0)