Skip to content

Commit 433feb6

Browse files
author
SDKAuto
committed
CodeGen from PR 33742 in Azure/azure-rest-api-specs
Merge a1ff4f0830f1621f60c08853b82edf4a48d2ddc0 into b65cbab6abfdad4135f411bb1aaaeb76d27e4e70
1 parent b328d88 commit 433feb6

File tree

48 files changed

+2287
-379
lines changed

Some content is hidden

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

48 files changed

+2287
-379
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 1.1.0 (2025-04-07)
4+
5+
### Features Added
6+
7+
- Added operation ScheduledActionsOperations.virtual_machines_execute_create
8+
- Added operation ScheduledActionsOperations.virtual_machines_execute_delete
9+
310
## 1.0.0 (2025-01-20)
411

512
### Features Added

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "b6075dbc2321933382ea91c787ee62c6bdb87e5d",
2+
"commit": "85e703bf1861866e8cfe12847c601914dbb254ac",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/computeschedule/ComputeSchedule.Management",
5-
"@azure-tools/typespec-python": "0.37.3"
5+
"@azure-tools/typespec-python": "0.42.2"
66
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.ComputeSchedule",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.computeschedule.models.CancelOperationsRequest": "Microsoft.ComputeSchedule.CancelOperationsRequest",
5+
"azure.mgmt.computeschedule.models.CancelOperationsResponse": "Microsoft.ComputeSchedule.CancelOperationsResponse",
6+
"azure.mgmt.computeschedule.models.CreateResourceOperationResponse": "Microsoft.ComputeSchedule.CreateResourceOperationResponse",
7+
"azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse",
8+
"azure.mgmt.computeschedule.models.DeleteResourceOperationResponse": "Microsoft.ComputeSchedule.DeleteResourceOperationResponse",
9+
"azure.mgmt.computeschedule.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
10+
"azure.mgmt.computeschedule.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
11+
"azure.mgmt.computeschedule.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
12+
"azure.mgmt.computeschedule.models.ExecuteCreateRequest": "Microsoft.ComputeSchedule.ExecuteCreateRequest",
13+
"azure.mgmt.computeschedule.models.ExecuteDeallocateRequest": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest",
14+
"azure.mgmt.computeschedule.models.ExecuteDeleteRequest": "Microsoft.ComputeSchedule.ExecuteDeleteRequest",
15+
"azure.mgmt.computeschedule.models.ExecuteHibernateRequest": "Microsoft.ComputeSchedule.ExecuteHibernateRequest",
16+
"azure.mgmt.computeschedule.models.ExecuteStartRequest": "Microsoft.ComputeSchedule.ExecuteStartRequest",
17+
"azure.mgmt.computeschedule.models.ExecutionParameters": "Microsoft.ComputeSchedule.ExecutionParameters",
18+
"azure.mgmt.computeschedule.models.GetOperationErrorsRequest": "Microsoft.ComputeSchedule.GetOperationErrorsRequest",
19+
"azure.mgmt.computeschedule.models.GetOperationErrorsResponse": "Microsoft.ComputeSchedule.GetOperationErrorsResponse",
20+
"azure.mgmt.computeschedule.models.GetOperationStatusRequest": "Microsoft.ComputeSchedule.GetOperationStatusRequest",
21+
"azure.mgmt.computeschedule.models.GetOperationStatusResponse": "Microsoft.ComputeSchedule.GetOperationStatusResponse",
22+
"azure.mgmt.computeschedule.models.HibernateResourceOperationResponse": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse",
23+
"azure.mgmt.computeschedule.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
24+
"azure.mgmt.computeschedule.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
25+
"azure.mgmt.computeschedule.models.OperationErrorDetails": "Microsoft.ComputeSchedule.OperationErrorDetails",
26+
"azure.mgmt.computeschedule.models.OperationErrorsResult": "Microsoft.ComputeSchedule.OperationErrorsResult",
27+
"azure.mgmt.computeschedule.models.ResourceOperation": "Microsoft.ComputeSchedule.ResourceOperation",
28+
"azure.mgmt.computeschedule.models.ResourceOperationDetails": "Microsoft.ComputeSchedule.ResourceOperationDetails",
29+
"azure.mgmt.computeschedule.models.ResourceOperationError": "Microsoft.ComputeSchedule.ResourceOperationError",
30+
"azure.mgmt.computeschedule.models.ResourceProvisionPayload": "Microsoft.ComputeSchedule.ResourceProvisionPayload",
31+
"azure.mgmt.computeschedule.models.Resources": "Microsoft.ComputeSchedule.Resources",
32+
"azure.mgmt.computeschedule.models.RetryPolicy": "Microsoft.ComputeSchedule.RetryPolicy",
33+
"azure.mgmt.computeschedule.models.Schedule": "Microsoft.ComputeSchedule.Schedule",
34+
"azure.mgmt.computeschedule.models.StartResourceOperationResponse": "Microsoft.ComputeSchedule.StartResourceOperationResponse",
35+
"azure.mgmt.computeschedule.models.SubmitDeallocateRequest": "Microsoft.ComputeSchedule.SubmitDeallocateRequest",
36+
"azure.mgmt.computeschedule.models.SubmitHibernateRequest": "Microsoft.ComputeSchedule.SubmitHibernateRequest",
37+
"azure.mgmt.computeschedule.models.SubmitStartRequest": "Microsoft.ComputeSchedule.SubmitStartRequest",
38+
"azure.mgmt.computeschedule.models.VirtualMachineExtensionData": "Microsoft.ComputeSchedule.VirtualMachineExtensionData",
39+
"azure.mgmt.computeschedule.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
40+
"azure.mgmt.computeschedule.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
41+
"azure.mgmt.computeschedule.models.ResourceOperationType": "Microsoft.ComputeSchedule.ResourceOperationType",
42+
"azure.mgmt.computeschedule.models.DeadlineType": "Microsoft.ComputeSchedule.DeadlineType",
43+
"azure.mgmt.computeschedule.models.OperationState": "Microsoft.ComputeSchedule.OperationState",
44+
"azure.mgmt.computeschedule.models.OptimizationPreference": "Microsoft.ComputeSchedule.OptimizationPreference",
45+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.operations.list": "Azure.ResourceManager.Operations.list",
46+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_submit_deallocate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate",
47+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_submit_hibernate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate",
48+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_submit_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart",
49+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_execute_deallocate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate",
50+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_execute_hibernate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate",
51+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_execute_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart",
52+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_execute_create": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate",
53+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_execute_delete": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete",
54+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_get_operation_status": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus",
55+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_cancel_operations": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations",
56+
"azure.mgmt.computeschedule.ComputeScheduleMgmtClient.scheduled_actions.virtual_machines_get_operation_errors": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors"
57+
}
58+
}

sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ComputeScheduleMgmtClient:
3636
:type subscription_id: str
3737
:param base_url: Service host. Default value is "https://management.azure.com".
3838
:type base_url: str
39-
:keyword api_version: The API version to use for this operation. Default value is "2024-10-01".
39+
:keyword api_version: The API version to use for this operation. Default value is "2025-05-01".
4040
Note that overriding this default value may result in unsupported behavior.
4141
:paramtype api_version: str
4242
"""

sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instan
2929
:type subscription_id: str
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
32-
:keyword api_version: The API version to use for this operation. Default value is "2024-10-01".
32+
:keyword api_version: The API version to use for this operation. Default value is "2025-05-01".
3333
Note that overriding this default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
@@ -41,7 +41,7 @@ def __init__(
4141
base_url: str = "https://management.azure.com",
4242
**kwargs: Any
4343
) -> None:
44-
api_version: str = kwargs.pop("api_version", "2024-10-01")
44+
api_version: str = kwargs.pop("api_version", "2025-05-01")
4545

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

sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
# Licensed under the MIT License. See License.txt in the project root for
6-
# license information.
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) Python Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
78
# --------------------------------------------------------------------------
89
# pylint: disable=protected-access, broad-except
910

@@ -373,15 +374,34 @@ def __ne__(self, other: typing.Any) -> bool:
373374
return not self.__eq__(other)
374375

375376
def keys(self) -> typing.KeysView[str]:
377+
"""
378+
:returns: a set-like object providing a view on D's keys
379+
:rtype: ~typing.KeysView
380+
"""
376381
return self._data.keys()
377382

378383
def values(self) -> typing.ValuesView[typing.Any]:
384+
"""
385+
:returns: an object providing a view on D's values
386+
:rtype: ~typing.ValuesView
387+
"""
379388
return self._data.values()
380389

381390
def items(self) -> typing.ItemsView[str, typing.Any]:
391+
"""
392+
:returns: set-like object providing a view on D's items
393+
:rtype: ~typing.ItemsView
394+
"""
382395
return self._data.items()
383396

384397
def get(self, key: str, default: typing.Any = None) -> typing.Any:
398+
"""
399+
Get the value for key if key is in the dictionary, else default.
400+
:param str key: The key to look up.
401+
:param any default: The value to return if key is not in the dictionary. Defaults to None
402+
:returns: D[k] if k in D, else d.
403+
:rtype: any
404+
"""
385405
try:
386406
return self[key]
387407
except KeyError:
@@ -397,17 +417,38 @@ def pop(self, key: str, default: _T) -> _T: ...
397417
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
398418

399419
def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
420+
"""
421+
Removes specified key and return the corresponding value.
422+
:param str key: The key to pop.
423+
:param any default: The value to return if key is not in the dictionary
424+
:returns: The value corresponding to the key.
425+
:rtype: any
426+
:raises KeyError: If key is not found and default is not given.
427+
"""
400428
if default is _UNSET:
401429
return self._data.pop(key)
402430
return self._data.pop(key, default)
403431

404432
def popitem(self) -> typing.Tuple[str, typing.Any]:
433+
"""
434+
Removes and returns some (key, value) pair
435+
:returns: The (key, value) pair.
436+
:rtype: tuple
437+
:raises KeyError: if D is empty.
438+
"""
405439
return self._data.popitem()
406440

407441
def clear(self) -> None:
442+
"""
443+
Remove all items from D.
444+
"""
408445
self._data.clear()
409446

410447
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
448+
"""
449+
Updates D from mapping/iterable E and F.
450+
:param any args: Either a mapping object or an iterable of key-value pairs.
451+
"""
411452
self._data.update(*args, **kwargs)
412453

413454
@typing.overload
@@ -417,6 +458,13 @@ def setdefault(self, key: str, default: None = None) -> None: ...
417458
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
418459

419460
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
461+
"""
462+
Same as calling D.get(k, d), and setting D[k]=d if k not found
463+
:param str key: The key to look up.
464+
:param any default: The value to set if key is not in the dictionary
465+
:returns: D[k] if k in D, else d.
466+
:rtype: any
467+
"""
420468
if default is _UNSET:
421469
return self._data.setdefault(key)
422470
return self._data.setdefault(key, default)
@@ -910,6 +958,19 @@ def _failsafe_deserialize(
910958
return None
911959

912960

961+
def _failsafe_deserialize_xml(
962+
deserializer: typing.Any,
963+
value: typing.Any,
964+
) -> typing.Any:
965+
try:
966+
return _deserialize_xml(deserializer, value)
967+
except DeserializationError:
968+
_LOGGER.warning(
969+
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
970+
)
971+
return None
972+
973+
913974
class _RestField:
914975
def __init__(
915976
self,

sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_patch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
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+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize

0 commit comments

Comments
 (0)