Skip to content

Commit c7ca88f

Browse files
author
SDKAuto
committed
CodeGen from PR 34293 in Azure/azure-rest-api-specs
Merge bf408e5ec19f26a809b28d56c7ac9f3e9fc6e217 into 73bb75d03e887c7b4f91a02031069e33754e74b4
1 parent 765f880 commit c7ca88f

File tree

50 files changed

+2355
-460
lines changed

Some content is hidden

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

50 files changed

+2355
-460
lines changed

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

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

3+
## 1.1.0 (2025-04-28)
4+
5+
### Features Added
6+
7+
- Added model `CreateResourceOperationResponse`
8+
- Added model `DeleteResourceOperationResponse`
9+
- Added model `ExecuteCreateRequest`
10+
- Added model `ExecuteDeleteRequest`
11+
- Added model `ResourceProvisionPayload`
12+
- Model `ScheduledActionsOperations` added method `virtual_machines_execute_create`
13+
- Model `ScheduledActionsOperations` added method `virtual_machines_execute_delete`
14+
- Method `CreateResourceOperationResponse.__init__` has a new overload `def __init__(self: None, description: str, type: str, location: str, results: Optional[List[_models.ResourceOperation]])`
15+
- Method `CreateResourceOperationResponse.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
16+
- Method `DeleteResourceOperationResponse.__init__` has a new overload `def __init__(self: None, description: str, type: str, location: str, results: Optional[List[_models.ResourceOperation]])`
17+
- Method `DeleteResourceOperationResponse.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
18+
- Method `ExecuteCreateRequest.__init__` has a new overload `def __init__(self: None, resource_config_parameters: _models.ResourceProvisionPayload, execution_parameters: _models.ExecutionParameters, correlationid: Optional[str])`
19+
- Method `ExecuteCreateRequest.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
20+
- Method `ExecuteDeleteRequest.__init__` has a new overload `def __init__(self: None, execution_parameters: _models.ExecutionParameters, resources: _models.Resources, correlationid: Optional[str], force_deletion: Optional[bool])`
21+
- Method `ExecuteDeleteRequest.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
22+
- Method `ResourceProvisionPayload.__init__` has a new overload `def __init__(self: None, resource_count: int, base_profile: Optional[str], resource_overrides: Optional[List[str]], resource_prefix: Optional[str])`
23+
- Method `ResourceProvisionPayload.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
24+
- Method `ScheduledActionsOperations.virtual_machines_execute_create` has a new overload `def virtual_machines_execute_create(self: None, locationparameter: str, request_body: ExecuteCreateRequest, content_type: str)`
25+
- Method `ScheduledActionsOperations.virtual_machines_execute_create` has a new overload `def virtual_machines_execute_create(self: None, locationparameter: str, request_body: JSON, content_type: str)`
26+
- Method `ScheduledActionsOperations.virtual_machines_execute_create` has a new overload `def virtual_machines_execute_create(self: None, locationparameter: str, request_body: IO[bytes], content_type: str)`
27+
- Method `ScheduledActionsOperations.virtual_machines_execute_delete` has a new overload `def virtual_machines_execute_delete(self: None, locationparameter: str, request_body: ExecuteDeleteRequest, content_type: str)`
28+
- Method `ScheduledActionsOperations.virtual_machines_execute_delete` has a new overload `def virtual_machines_execute_delete(self: None, locationparameter: str, request_body: JSON, content_type: str)`
29+
- Method `ScheduledActionsOperations.virtual_machines_execute_delete` has a new overload `def virtual_machines_execute_delete(self: None, locationparameter: str, request_body: IO[bytes], content_type: str)`
30+
331
## 1.0.0 (2025-01-20)
432

533
### Features Added

sdk/computeschedule/azure-mgmt-computeschedule/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 Computeschedule 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "b6075dbc2321933382ea91c787ee62c6bdb87e5d",
2+
"commit": "ba5643b97e004a75557e8d0195a35d756d9acfe3",
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.44.1"
66
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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.Origin": "Azure.ResourceManager.CommonTypes.Origin",
39+
"azure.mgmt.computeschedule.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
40+
"azure.mgmt.computeschedule.models.ResourceOperationType": "Microsoft.ComputeSchedule.ResourceOperationType",
41+
"azure.mgmt.computeschedule.models.DeadlineType": "Microsoft.ComputeSchedule.DeadlineType",
42+
"azure.mgmt.computeschedule.models.OperationState": "Microsoft.ComputeSchedule.OperationState",
43+
"azure.mgmt.computeschedule.models.OptimizationPreference": "Microsoft.ComputeSchedule.OptimizationPreference",
44+
"azure.mgmt.computeschedule.operations.Operations.list": "Azure.ResourceManager.Operations.list",
45+
"azure.mgmt.computeschedule.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list",
46+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_submit_deallocate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate",
47+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_submit_deallocate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate",
48+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_submit_hibernate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate",
49+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_submit_hibernate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate",
50+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_submit_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart",
51+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_submit_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart",
52+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_execute_deallocate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate",
53+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_execute_deallocate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate",
54+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_execute_hibernate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate",
55+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_execute_hibernate": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate",
56+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_execute_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart",
57+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_execute_start": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart",
58+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_execute_create": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate",
59+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_execute_create": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteCreate",
60+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_execute_delete": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete",
61+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_execute_delete": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDelete",
62+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_get_operation_status": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus",
63+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_get_operation_status": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus",
64+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_cancel_operations": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations",
65+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_cancel_operations": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations",
66+
"azure.mgmt.computeschedule.operations.ScheduledActionsOperations.virtual_machines_get_operation_errors": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors",
67+
"azure.mgmt.computeschedule.aio.operations.ScheduledActionsOperations.virtual_machines_get_operation_errors": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors"
68+
}
69+
}

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

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from ._configuration import ComputeScheduleMgmtClientConfiguration
19-
from ._serialization import Deserializer, Serializer
21+
from ._utils.serialization import Deserializer, Serializer
2022
from .operations import Operations, ScheduledActionsOperations
2123

2224
if TYPE_CHECKING:
@@ -34,24 +36,30 @@ class ComputeScheduleMgmtClient:
3436
:type credential: ~azure.core.credentials.TokenCredential
3537
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3638
:type subscription_id: str
37-
:param base_url: Service host. Default value is "https://management.azure.com".
39+
:param base_url: Service host. Default value is None.
3840
:type base_url: str
39-
:keyword api_version: The API version to use for this operation. Default value is "2024-10-01".
41+
:keyword api_version: The API version to use for this operation. Default value is "2025-05-01".
4042
Note that overriding this default value may result in unsupported behavior.
4143
:paramtype api_version: str
4244
"""
4345

4446
def __init__(
45-
self,
46-
credential: "TokenCredential",
47-
subscription_id: str,
48-
base_url: str = "https://management.azure.com",
49-
**kwargs: Any
47+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
5048
) -> None:
5149
_endpoint = "{endpoint}"
50+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
51+
_endpoints = get_arm_endpoints(_cloud)
52+
if not base_url:
53+
base_url = _endpoints["resource_manager"]
54+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
5255
self._config = ComputeScheduleMgmtClientConfiguration(
53-
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
56+
credential=credential,
57+
subscription_id=subscription_id,
58+
base_url=cast(str, base_url),
59+
credential_scopes=credential_scopes,
60+
**kwargs
5461
)
62+
5563
_policies = kwargs.pop("policies", None)
5664
if _policies is None:
5765
_policies = [
@@ -70,7 +78,7 @@ def __init__(
7078
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7179
self._config.http_logging_policy,
7280
]
73-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
81+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
7482

7583
self._serialize = Serializer()
7684
self._deserialize = Deserializer()

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/_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
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) Python Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)