Skip to content

Commit c8551a5

Browse files
author
SDKAuto
committed
CodeGen from PR 25291 in Azure/azure-rest-api-specs
Merge 78d5105a853ed00d21333307af7d1cd16c145728 into 2d2d12d271c13bd1b56c1ed5e41c5f418ae46067
1 parent 1727c7a commit c8551a5

File tree

386 files changed

+70863
-369
lines changed

Some content is hidden

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

386 files changed

+70863
-369
lines changed

sdk/compute/azure-mgmt-compute/_meta.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "b5f54222a4a925eb0239cd6653ab8b27185195f4",
2+
"commit": "ac6b825a961200d3603a4ccf802b2dc08146deca",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.7",
55
"use": [
66
"@autorest/python@6.7.1",
77
"@autorest/modelerfour@4.26.2"
88
],
9-
"autorest_command": "autorest specification/compute/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/compute/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
1010
"readme": "specification/compute/resource-manager/readme.md",
1111
"package-2023-03-01-only": "2023-04-17 22:42:05 -0400 b06a6f45e472dd07c2e0dab06b1e52dfe2684c88 Microsoft.Compute/ComputeRP/stable/2023-03-01/virtualMachineScaleSet.json",
1212
"package-2023-01-02-only": "2023-06-28 00:48:15 -0400 b1d41f8dc643415d4dc6ee82bdb2fef04ef45bc9 Microsoft.Compute/DiskRP/stable/2023-01-02/snapshot.json",
@@ -46,5 +46,6 @@
4646
"package-compute-2017-03": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/stable/2017-03-30/disk.json",
4747
"package-compute-2016-04-preview": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/DiskRP/preview/2016-04-30-preview/disk.json",
4848
"package-compute-2016-03": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2016-03-30/compute.json",
49-
"package-compute-2015-06": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2015-06-15/compute.json"
49+
"package-compute-2015-06": "2022-07-31 21:47:43 -0400 2dcad6d6e9a96882eb6d317e7500a94be007a9c6 Microsoft.Compute/ComputeRP/stable/2015-06-15/compute.json",
50+
"package-2023-07-01-only": "2023-08-10 16:21:40 -0400 1a925d1afe288a5f20d078bbc89214a36a0e4287 Microsoft.Compute/ComputeRP/stable/2023-07-01/virtualMachineScaleSet.json"
5051
}

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py

Lines changed: 83 additions & 1 deletion
Large diffs are not rendered by default.

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/_compute_management_client.py

Lines changed: 83 additions & 1 deletion
Large diffs are not rendered by default.

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
from .v2022_03_03.models import *
99
from .v2022_09_04.models import *
1010
from .v2023_01_02.models import *
11-
from .v2023_03_01.models import *
11+
from .v2023_07_01.models import *
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from ._compute_management_client import ComputeManagementClient
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
13+
14+
try:
15+
from ._patch import __all__ as _patch_all
16+
from ._patch import * # pylint: disable=unused-wildcard-import
17+
except ImportError:
18+
_patch_all = []
19+
from ._patch import patch_sdk as _patch_sdk
20+
21+
__all__ = [
22+
"ComputeManagementClient",
23+
]
24+
__all__.extend([p for p in _patch_all if p not in __all__])
25+
26+
_patch_sdk()
Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from copy import deepcopy
10+
from typing import Any, TYPE_CHECKING
11+
12+
from azure.core.rest import HttpRequest, HttpResponse
13+
from azure.mgmt.core import ARMPipelineClient
14+
15+
from . import models as _models
16+
from .._serialization import Deserializer, Serializer
17+
from ._configuration import ComputeManagementClientConfiguration
18+
from .operations import (
19+
AvailabilitySetsOperations,
20+
CapacityReservationGroupsOperations,
21+
CapacityReservationsOperations,
22+
DedicatedHostGroupsOperations,
23+
DedicatedHostsOperations,
24+
ImagesOperations,
25+
LogAnalyticsOperations,
26+
Operations,
27+
ProximityPlacementGroupsOperations,
28+
RestorePointCollectionsOperations,
29+
RestorePointsOperations,
30+
SshPublicKeysOperations,
31+
UsageOperations,
32+
VirtualMachineExtensionImagesOperations,
33+
VirtualMachineExtensionsOperations,
34+
VirtualMachineImagesEdgeZoneOperations,
35+
VirtualMachineImagesOperations,
36+
VirtualMachineRunCommandsOperations,
37+
VirtualMachineScaleSetExtensionsOperations,
38+
VirtualMachineScaleSetRollingUpgradesOperations,
39+
VirtualMachineScaleSetVMExtensionsOperations,
40+
VirtualMachineScaleSetVMRunCommandsOperations,
41+
VirtualMachineScaleSetVMsOperations,
42+
VirtualMachineScaleSetsOperations,
43+
VirtualMachineSizesOperations,
44+
VirtualMachinesOperations,
45+
)
46+
47+
if TYPE_CHECKING:
48+
# pylint: disable=unused-import,ungrouped-imports
49+
from azure.core.credentials import TokenCredential
50+
51+
52+
class ComputeManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
53+
"""Compute Client.
54+
55+
:ivar operations: Operations operations
56+
:vartype operations: azure.mgmt.compute.v2023_07_01.operations.Operations
57+
:ivar usage: UsageOperations operations
58+
:vartype usage: azure.mgmt.compute.v2023_07_01.operations.UsageOperations
59+
:ivar virtual_machine_sizes: VirtualMachineSizesOperations operations
60+
:vartype virtual_machine_sizes:
61+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineSizesOperations
62+
:ivar virtual_machine_scale_sets: VirtualMachineScaleSetsOperations operations
63+
:vartype virtual_machine_scale_sets:
64+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineScaleSetsOperations
65+
:ivar virtual_machine_scale_set_extensions: VirtualMachineScaleSetExtensionsOperations
66+
operations
67+
:vartype virtual_machine_scale_set_extensions:
68+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineScaleSetExtensionsOperations
69+
:ivar virtual_machine_scale_set_rolling_upgrades:
70+
VirtualMachineScaleSetRollingUpgradesOperations operations
71+
:vartype virtual_machine_scale_set_rolling_upgrades:
72+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineScaleSetRollingUpgradesOperations
73+
:ivar virtual_machine_scale_set_vm_extensions: VirtualMachineScaleSetVMExtensionsOperations
74+
operations
75+
:vartype virtual_machine_scale_set_vm_extensions:
76+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineScaleSetVMExtensionsOperations
77+
:ivar virtual_machine_scale_set_vms: VirtualMachineScaleSetVMsOperations operations
78+
:vartype virtual_machine_scale_set_vms:
79+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineScaleSetVMsOperations
80+
:ivar virtual_machine_extensions: VirtualMachineExtensionsOperations operations
81+
:vartype virtual_machine_extensions:
82+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineExtensionsOperations
83+
:ivar virtual_machines: VirtualMachinesOperations operations
84+
:vartype virtual_machines: azure.mgmt.compute.v2023_07_01.operations.VirtualMachinesOperations
85+
:ivar virtual_machine_images: VirtualMachineImagesOperations operations
86+
:vartype virtual_machine_images:
87+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineImagesOperations
88+
:ivar virtual_machine_images_edge_zone: VirtualMachineImagesEdgeZoneOperations operations
89+
:vartype virtual_machine_images_edge_zone:
90+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineImagesEdgeZoneOperations
91+
:ivar virtual_machine_extension_images: VirtualMachineExtensionImagesOperations operations
92+
:vartype virtual_machine_extension_images:
93+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineExtensionImagesOperations
94+
:ivar availability_sets: AvailabilitySetsOperations operations
95+
:vartype availability_sets:
96+
azure.mgmt.compute.v2023_07_01.operations.AvailabilitySetsOperations
97+
:ivar proximity_placement_groups: ProximityPlacementGroupsOperations operations
98+
:vartype proximity_placement_groups:
99+
azure.mgmt.compute.v2023_07_01.operations.ProximityPlacementGroupsOperations
100+
:ivar dedicated_host_groups: DedicatedHostGroupsOperations operations
101+
:vartype dedicated_host_groups:
102+
azure.mgmt.compute.v2023_07_01.operations.DedicatedHostGroupsOperations
103+
:ivar dedicated_hosts: DedicatedHostsOperations operations
104+
:vartype dedicated_hosts: azure.mgmt.compute.v2023_07_01.operations.DedicatedHostsOperations
105+
:ivar ssh_public_keys: SshPublicKeysOperations operations
106+
:vartype ssh_public_keys: azure.mgmt.compute.v2023_07_01.operations.SshPublicKeysOperations
107+
:ivar images: ImagesOperations operations
108+
:vartype images: azure.mgmt.compute.v2023_07_01.operations.ImagesOperations
109+
:ivar restore_point_collections: RestorePointCollectionsOperations operations
110+
:vartype restore_point_collections:
111+
azure.mgmt.compute.v2023_07_01.operations.RestorePointCollectionsOperations
112+
:ivar restore_points: RestorePointsOperations operations
113+
:vartype restore_points: azure.mgmt.compute.v2023_07_01.operations.RestorePointsOperations
114+
:ivar capacity_reservation_groups: CapacityReservationGroupsOperations operations
115+
:vartype capacity_reservation_groups:
116+
azure.mgmt.compute.v2023_07_01.operations.CapacityReservationGroupsOperations
117+
:ivar capacity_reservations: CapacityReservationsOperations operations
118+
:vartype capacity_reservations:
119+
azure.mgmt.compute.v2023_07_01.operations.CapacityReservationsOperations
120+
:ivar log_analytics: LogAnalyticsOperations operations
121+
:vartype log_analytics: azure.mgmt.compute.v2023_07_01.operations.LogAnalyticsOperations
122+
:ivar virtual_machine_run_commands: VirtualMachineRunCommandsOperations operations
123+
:vartype virtual_machine_run_commands:
124+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineRunCommandsOperations
125+
:ivar virtual_machine_scale_set_vm_run_commands: VirtualMachineScaleSetVMRunCommandsOperations
126+
operations
127+
:vartype virtual_machine_scale_set_vm_run_commands:
128+
azure.mgmt.compute.v2023_07_01.operations.VirtualMachineScaleSetVMRunCommandsOperations
129+
:param credential: Credential needed for the client to connect to Azure. Required.
130+
:type credential: ~azure.core.credentials.TokenCredential
131+
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
132+
subscription. The subscription ID forms part of the URI for every service call. Required.
133+
:type subscription_id: str
134+
:param base_url: Service URL. Default value is "https://management.azure.com".
135+
:type base_url: str
136+
:keyword api_version: Api Version. Default value is "2023-07-01". Note that overriding this
137+
default value may result in unsupported behavior.
138+
:paramtype api_version: str
139+
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
140+
Retry-After header is present.
141+
"""
142+
143+
def __init__(
144+
self,
145+
credential: "TokenCredential",
146+
subscription_id: str,
147+
base_url: str = "https://management.azure.com",
148+
**kwargs: Any
149+
) -> None:
150+
self._config = ComputeManagementClientConfiguration(
151+
credential=credential, subscription_id=subscription_id, **kwargs
152+
)
153+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
154+
155+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
156+
self._serialize = Serializer(client_models)
157+
self._deserialize = Deserializer(client_models)
158+
self._serialize.client_side_validation = False
159+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize, "2023-07-01")
160+
self.usage = UsageOperations(self._client, self._config, self._serialize, self._deserialize, "2023-07-01")
161+
self.virtual_machine_sizes = VirtualMachineSizesOperations(
162+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
163+
)
164+
self.virtual_machine_scale_sets = VirtualMachineScaleSetsOperations(
165+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
166+
)
167+
self.virtual_machine_scale_set_extensions = VirtualMachineScaleSetExtensionsOperations(
168+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
169+
)
170+
self.virtual_machine_scale_set_rolling_upgrades = VirtualMachineScaleSetRollingUpgradesOperations(
171+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
172+
)
173+
self.virtual_machine_scale_set_vm_extensions = VirtualMachineScaleSetVMExtensionsOperations(
174+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
175+
)
176+
self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations(
177+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
178+
)
179+
self.virtual_machine_extensions = VirtualMachineExtensionsOperations(
180+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
181+
)
182+
self.virtual_machines = VirtualMachinesOperations(
183+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
184+
)
185+
self.virtual_machine_images = VirtualMachineImagesOperations(
186+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
187+
)
188+
self.virtual_machine_images_edge_zone = VirtualMachineImagesEdgeZoneOperations(
189+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
190+
)
191+
self.virtual_machine_extension_images = VirtualMachineExtensionImagesOperations(
192+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
193+
)
194+
self.availability_sets = AvailabilitySetsOperations(
195+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
196+
)
197+
self.proximity_placement_groups = ProximityPlacementGroupsOperations(
198+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
199+
)
200+
self.dedicated_host_groups = DedicatedHostGroupsOperations(
201+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
202+
)
203+
self.dedicated_hosts = DedicatedHostsOperations(
204+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
205+
)
206+
self.ssh_public_keys = SshPublicKeysOperations(
207+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
208+
)
209+
self.images = ImagesOperations(self._client, self._config, self._serialize, self._deserialize, "2023-07-01")
210+
self.restore_point_collections = RestorePointCollectionsOperations(
211+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
212+
)
213+
self.restore_points = RestorePointsOperations(
214+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
215+
)
216+
self.capacity_reservation_groups = CapacityReservationGroupsOperations(
217+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
218+
)
219+
self.capacity_reservations = CapacityReservationsOperations(
220+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
221+
)
222+
self.log_analytics = LogAnalyticsOperations(
223+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
224+
)
225+
self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations(
226+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
227+
)
228+
self.virtual_machine_scale_set_vm_run_commands = VirtualMachineScaleSetVMRunCommandsOperations(
229+
self._client, self._config, self._serialize, self._deserialize, "2023-07-01"
230+
)
231+
232+
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
233+
"""Runs the network request through the client's chained policies.
234+
235+
>>> from azure.core.rest import HttpRequest
236+
>>> request = HttpRequest("GET", "https://www.example.org/")
237+
<HttpRequest [GET], url: 'https://www.example.org/'>
238+
>>> response = client._send_request(request)
239+
<HttpResponse: 200 OK>
240+
241+
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
242+
243+
:param request: The network request you want to make. Required.
244+
:type request: ~azure.core.rest.HttpRequest
245+
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
246+
:return: The response of your network call. Does not do error handling on your response.
247+
:rtype: ~azure.core.rest.HttpResponse
248+
"""
249+
250+
request_copy = deepcopy(request)
251+
request_copy.url = self._client.format_url(request_copy.url)
252+
return self._client.send_request(request_copy, **kwargs)
253+
254+
def close(self) -> None:
255+
self._client.close()
256+
257+
def __enter__(self) -> "ComputeManagementClient":
258+
self._client.__enter__()
259+
return self
260+
261+
def __exit__(self, *exc_details: Any) -> None:
262+
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)